Threads for ansible-rs

  1. 3

    I’d finally get to see whether or not ternary (base 3) computing is more efficient than binary (base-2). It should be around 10% more resource / volume / cost efficient, but a lot of that depends on the technology used for the computational substrate (silicon photolithography, molecular nanotechnology rod logic using true 3D design, quantum computing, etc.).

    For conventional CMOS circuitry, you can represent the ternary states as -1: negative voltage, 0 (0V), and 1 (positive voltage). So the wires are the same, but the logic gates get more complex.

    What gets a little tricky is what trit size do you use for the system. 3 ^ 27 can represent integer values up to 7.6 trillion. Is that enough? Or do we need to go to 3 ^ 81 instead?

    1. 3

      Flash memory already uses multiple bits per cell. If ternary were significantly more efficient with the current type of manufacturing technology, we’d already be using it, and emulating x86_64 atop it.

      I played with designing a ternary VM a while ago, though never got around to implementing it. Once you get past the basics it actually ends up terribly mundane.

    1. 1

      It would be neat to combine this with a 6 DoF space mouse or similar input device, so that you can easily rotate or translate any given 3D image and zoom in to subsections.

      1. 3

        I’ve been fairly successful in working on Garnet lately, so I’ll try to keep rolling on that! If I can get monomorph done soon I’ll be able to play with generics that can’t be expressed by the Rust backend, and then hopefully I can play with my ML-y module system to see if it can actually do what I want it to do.

        Apart from that though I should probably get some Real Life Stuff done too, like cleaning and doing various smol house repairs.

        1. 1

          I’ve read a little bit about Garnet, and I find myself interested in the design directions you are pursuing. There’s a lot that I like with Rust, but it feels more complex than necessary.

          1. 2

            Awww, thank you! Hopefully I’ll have something that has a basic set of features working… sometime this year, maybe?

        1. 3

          Nice to hear the inside story.

          I got my start with Linux by buying a set of 5.25in floppies for SLS from some random person on Usenet. It came with Linux kernel version 0.99pl13, IIRC. My first PC compatible system was a Gateway 2000 386 system with a whopping 4MB of RAM and a new / fancy IDE drive. I don’t think I had to deal with harder-to-configure MFM or RLL drives at home, just at work.

          My home network in the next years got a couple NE2000 Ethernet cards, so I could try out NFS and other networking.

          1. 3

            At my first job, my boss wanted me to name the oldest computer after… the director of the organization. I countered with an argument along the lines of situations that are likely to occur:

            • “Doe (not the real last name of the director) is down.”
            • “Doe is not responding.”
            • “Doe needs to be replaced.”
            • … and so on.

            I went with cars instead, so the first two were “Legend” and “Prizm”.


            At work, we’ve got a very utilitarian naming scheme. “ws22” is “workstation 22”, “fs8” is “file server 8”, and so on.

            At home, I’ve been naming computers after characters from Ghost in the Shell. Motoko, Kusanagi (yes, I know), Batou, Boma, Aramaki, Togusa, etc. Though I broke that trend recently with my StarFive VisionFive2 board (RISC-V), which is just named “vf2”. My excuse was that I was flashing and re-flashing the OS many times, and I haven’t figured out its “identity” yet.

            1. 1

              Nice. I’ve had issues using an old Acer R11 with Linux. I installed Xubuntu, and selected the Chrome keyboard layout. I still need to figure out why suspend-to-RAM doesn’t work. I haven’t found the applet I can bind to the brightness keys for controlling the screen backlight. And I still need to adjust the keyboard map for Delete, Caps Lock, Page up/down, and more.

              With this much fiddling, I should probably try another distro.

              1. 4

                As yetanotherjosh mentions on the orange site, please take a moment to verify the SHA256 of the new key after you remove the old one and try connecting to github.com again.

                1. 1

                  You can also just copy and paste their keys from the docs

                  github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
                  github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
                  github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=
                  
                1. 32

                  Like many others who went to engineering school in the ‘80s, I appreciate high fidelity audio gear to the point of being a little bit of an audiophile. Also, like many people who knew electrical engineers from that era, the amount of bad advice that you can find in “audiophile” circles is astounding. And don’t get me wrong, I’ll tell you to your face that popular music sounds better today on vinyl rather than CD. What I won’t do is try to convince you that the reason for this is because digital is an inferior technology incapable of meeting audiophile standards because that’s not even close to the reason.

                  1. 8

                    (What’s the real reason? :-))

                    1. 69

                      As far as your ears are concerned, louder sounds better. CD and digital have far greater fidelity to the original wave form than vinyl does. Vinyl also has less dynamic range, the difference between the loudest sound that you can record and the softest sound that you can record. When music was regularly sold in both formats in the late eighties, the mastering process for popular music was the same for both formats. In the early ‘90s people discovered that the common mastering process for CD and LP was leaving a lot of dynamic range unused when the music was pressed onto CDs. As the vinyl LP was falling out of favor, people discovered that you if you reduce the dynamic range of the music you can master it at a higher sound level or loudness on CD without generating distortion. To people listening to the music these louder pressings initially sound better. Every rock and pop artist on the planet wants their song to sound the best when played alongside other music. So artist started asking for this as part of the mastering process. The problem with doing this is that everything begins to get a wall of sound feeling to it. By making the soft parts louder and the loud parts softer so you can make the whole thing louder, you take some of the impact that the music would have with its original dynamic range. When vinyl records starting coming back in to favor, the music destined for LP was mastered the way they used to for vinyl back in the ‘80s. If you listen to two versions of a song, one mastered for LP, and the other mastered for CD, the LP will sound better in the first few plays before vinyl’s entropic nature ruins it, because the LP version will have more dynamic range. The same is true of two pressings of Pink Floyd’s “Dark Side of the Moon” if you are comparing an early 1980’s issue CD to a late ’90s CD reissue. This is really only true of Rock, Pop, and R&B. Classical and Jazz were unaffected by the Loudness War because fans of those genres put fidelity highest in their desired traits.

                      1. 18

                        Summarizing: when you say you prefer vinyl over CD, you say that you prefer 80’s style mastering over the overly compressed end-90s+ mastering.

                        It’s interesting that the extra headroom on CDs sparked the loudness war, instead of resulting in better dynamics. And now that people expect music to have a certain loudness, I guess we can’t go back.

                        Perhaps one day we could get a new wave of artists mastering their 320kbps mp3s 80s-stlye?

                        1. 8

                          A loud mix makes sense if you’re listening to music in a noisy environment. (On your commute, say.) But I’d rather have the ability to compress the dynamic range at the time of playing, so I can adjust it to suit the environment.

                          1. 1

                            I used to have a decent, though inexpensive, stereo system setup. Back when I would sit down just to listen to music, with no other distractions, like the Internet.

                            But when was the last time I really sat down to listen to music? For me it is usually in the car, or through a pair of earbuds. Or maybe washing the dishes.

                          2. 4

                            The extra headroom mostly provided the opportunity, alongside the fidelity and lack of physical limitations of a CD: on a vinyl if you try to brickwall you end up with unusable media.

                            What sparked the loudness war is the usual prisoner’s dilemna, where producers ask for more volume in order to stand out, leading the next producer to do the same, until you end up with tons of compression and no dynamic range left. Radio was a big contributor, as stations tend(ed?) to do peak normalisation[0], so if you leverage dynamic range widely you end up very quiet next to the pieces played before and after.

                            Perhaps one day we could get a new wave of artists mastering their 320kbps mp3s 80s-stlye?

                            To an extent it’s already been happening for about a decade: every streaming service does loudness normalisation[1], so by over-compressing you end up with a track that’s no louder than your neighbours, but it clips and sounds dead.

                            Lots of “legacy” media companies (software developers, production companies, distributors, …) have also been using loudness normalisation for about a decade following the spread of EBU R 128 (a european recommendation for loudness normalisation), for the same reason.

                            [0] where the highest sound of every track is set to the same level

                            [1] where the target is a perceived overall loudness for the entire track

                            1. 2

                              That’s me. When I buy rock music on LP, I’m purchasing music mastered to the 1980’s LP standards. I do that because Rock music works well with the 60 dB or so of dynamic range that vinyl LP offers.

                            2. 7

                              It really is quite shocking to take a CD mastered in the early 90s and another in the late 90s-early 2000s and play them at the same volume settings.

                              1. 4

                                This is an excellent explanation. Being able to explain things clearly without hiding behind technical terms like “compression” is a strong indicator to me that you are a true expert in this field.

                                1. 3

                                  For drummers and bassists, “compression” is a well-known term, because compressing dynamic range is almost required in order to record them faithfully. The typical gigging bassist will have a compressor pedal in their effects chain for live performance, too.

                                2. 4

                                  I do appreciate it when digital releases are mastered in way that preserves dynamic range, and playing it after any typical digital release in the affected genres, it will sound really quiet.

                                  Some bands have demonstrated to me that you can be a loud rock band with dynamic range mostly intact.

                                3. 13

                                  I think it’s fun to watch the record spin around. :-)

                                  1. 2

                                    I listen to 90% of stuff on vinyl, and I have no rational explanation beyond yours as to why I like it more than streaming.

                                    1. 4

                                      I heard on the radio that Metallica are investing in their own vinyl-pressing plant.

                                      1. 3

                                        I stream way more than I use my turntable, basically for the same reasons @fs111 mentions. But I definitely prefer vinyl because while streaming is pure consumption, vinyl is participatory. I enjoy handling the vinyl and really taking care of it (cleaning it when I get it/before I play it, taking care of the jacket, etc.). It makes me feel like a caretaker of music that’s important to me - a participant in the process, instead of just a consumer.

                                        On my phone I listen to music. On my turntable I play music.

                                        1. 3

                                          I like the physicality of it, too, and I also love the actual artifacts, the records and their sleeves and such.

                                        2. 1

                                          While I can see the appeal most of my music consumption is while working. I would not like getting up constantly to switch records.

                                      2. 2

                                        Possibly: I’ve read that over time many pop songs get remastered with more and more dynamic range compression. This makes all parts of the song sound similar in loudness, but also removes some musical features (dynamics) and depending on the DRC method (fast attack/decay, slow attack/decay, manual envelope adjustment) can introduce audible distortion.

                                        Older vinyl record and CD releases are from earlier masters. Albeit some records are newly manufactured, so some will be based on newer remasters anyway.

                                        Cannot confirm or deny, I don’t buy or listen to pop :/

                                        1. 3

                                          This is called the loudness war. This site collects the dynamic range for albums: https://dr.loudness-war.info

                                        2. 1

                                          In addition to the loudness wars people have been talking about, certain technical restrictions limit what can accurately be recorded on vinyl. This leads to a subtle “sound” that people get used to and prefer. This could be reproduced when mastering for digital audio formats, but people either don’t do that processing or “audiophiles” claim that it gets lost in translation somehow.

                                      1. 2

                                        I have TikTok installed on a tablet that I don’t have anything else really installed on (a couple games like solitaire). I see a LOT of people talking about how TikTok changes how people think or interferes in election stuff, but my feed is a bunch of horses, dogs, and people cleaning cow hooves. I’ve never even seen a political video on it before so I’m not sure how it gets to that point.

                                        I agree with him that people should be free to choose to watch what they want, but I also agree with the gov that government devices should not allow TikTok on it. That seems pretty obvious.

                                        1. 2

                                          … and people cleaning cow hooves …

                                          I’ve watched a few of those because it was interesting. But also disgusting. Then YT kept putting more on my home screen, so I had to “don’t recommend channel” a few times to stop seeing them.

                                        1. 10

                                          I’m pretty sure that banning the app from the two major app stores would be enough to kill TikTok In the US.

                                          1. 5

                                            Either that, or we’d suddenly have normies actually using alternative app stores in large enough numbers to make them matter, weakening the duopoly’s stranglehold on mobile software distribution. I certainly wouldn’t mind that outcome.

                                            1. 3

                                              We’d also see a rise in normies getting malware installed on their phones. The amount of malware that still makes it into the official app stores is already too much.

                                              1. 2

                                                That assumes the alternative app stores allow malware at a higher rate than the dominant ones.

                                                1. 2

                                                  I doubt it. The rate at which malware makes it onto the Apple App Store and the Google Play Store far exceeds that of most other moderated software distribution platforms.

                                            1. 16

                                              I think he is kind of missing the point. If TikTok is banned from Google and Apple app stores, it will become less popular and won’t melt brains at the same rate. Sure it can be circumvented, but it is not a “terrible idea” with “intolerable” side effects. And sure, there will be other apps that replace TikTok; when that happens maybe it will be easier to argue for comprehensive rather than ad hoc regulation.

                                              Also disappointed to see him arguing for “commerce” as an important bedrock value, and leaning on State Department talking points like Cuba being a “censorship-loving autocracy.” I suppose Schneier is still a good source on the technical side of things.

                                              1. 15

                                                From here it looks like you missed the point. He says the effective bans would be terrible/intolerable. Then he points out that merely banning the apps would not be effective.

                                                If you’re disappointed to learn that Schneier isn’t a hardline Leftist, you may have been mistaking him for someone else, maybe Noam Chomsky?

                                                1. 23

                                                  If you’re disappointed to learn that Schneier isn’t a hardline Leftist, you may have been mistaking him for someone else, maybe Noam Chomsky?

                                                  Maybe keep the over-the-top snark to Hacker News or somewhere else?

                                                  1. 29

                                                    It’s not about being a “hardline Leftist.” It’s about parroting false propaganda. Cuba has public wifi hotspots that provide access to the open web and are not meaningfully firewalled. Its internet practices are nothing like China’s and Iran’s and it is an error of fact to claim that they are.

                                                    1. 5

                                                      In strictly technical terms, that’s true, but… uh, how do I put it so that I don’t start a political flamewar again.

                                                      It’s very easy to underestimate how governments like the Cuban government can enforce these things if you haven’t lived under one. The Cuban government doesn’t use the exact same technical means that China uses partly because it has better, more easily-enforceable non-technical means to achieve its goals, and partly because it just doesn’t have the tremendous resources that the Chinese government has.

                                                      The two don’t belong together in terms of specific technical means (deep packet inspection firewalls) but that’s quite literally a technicality. I understand why it doesn’t look the same from a technical perspective, but take it from someone who’s familiar with that kind of legal climate – it’s pretty much the same.

                                                      1. 15

                                                        I don’t really understand what you are alluding to. Cubans can and do routinely use mainstays of the open internet like Google, Wikipedia, Facebook, Reddit, and Youtube, all of which are blocked in China. Cuba does not employ any means–whether deep packet inspection, social pressure, mind control rays, or anything else–to prevent this.

                                                        1. 5

                                                          I’m sorry, I’m not trying to be mysterious here :-(. I just don’t want to go there because the last time I did, I started a big flamewar and I really regret it. I know it comes off as pretentious. I’m just trying to stay away from the politics underneath it.

                                                          Let me try to state it in as non-political terms as I can, because I really think this is technically relevant, the way social engineering attacks are technically relevant for network security, even though they are a non-technical matter. Please don’t take any of this as a political statement. This is really not my intention.

                                                          If one’s goal is to ensure that some information doesn’t go through a censorship-resistant network (like the Internet), or that if it does, it at least doesn’t spread, there are more ways to do it than one. One is through tight content access control at the network layer – firewalling, strict control of telecom equipment etc.. Another is through tight information access and dissemination control, where one openly allows access at the network layer but ensures everyone stays away from information they want restricted, and that anyone who does not is at least unable to disseminate it easily. Both can be equally effective.

                                                          I don’t want to get into the “how” of it because I don’t think I can do that in a way that’s not open to political interpretation and this is not the place. All I want is to caution, based not just on specific technical and legal understanding of this particular matter, but also on my own experience, against a line of thought like “Internet access is effectively open, as it is not subject to firewall restrictions”. “Not subject to firewall restrictions” is one conotation of open, and it’s correct in this case. But many others are not, and “not subject to firewall restrictions” doesn’t automatically imply all the other ones.

                                                          1. 3

                                                            Another is through tight information access and dissemination control, where one openly allows access at the network layer but ensures everyone stays away from information they want restricted, and that anyone who does not is at least unable to disseminate it easily. Both can be equally effective.

                                                            I don’t want to get into the “how” of it because I don’t think I can do that in a way that’s not open to political interpretation and this is not the place.

                                                            If this is not the place to explain your very political claim, maybe it’s also not the place to state it?

                                                            1. 1

                                                              I don’t think what I stated is a political claim, otherwise I wouldn’t have stated it. I’ve strived to make sure that:

                                                              • It’s not about a political current or doctrine.
                                                              • It’s stated in generic terms, rather than political notions – i.e. in terms of how the flow of information can be restricted, not in terms of what information ought to be restricted or not, or if it should be restricted in the first place.
                                                              • It doesn’t include my position on whether that is good or not.

                                                              I’m sorry if it made anyone uncomfortable, or if I didn’t keep my own views out of it as well as I should have. It wasn’t my intention.

                                                              Edit: just to clarify, I’m obviously not insensitive to the fact that this is all being said in a thread regarding a government’s policies. My remarks apply equally well to information access in any network environment, from schools to corporate networks. They are about the specific case being dicussed here only insofar as… this is literally what the topic is about. They aren’t – or at least I have no intention of them being – any more political than your own root post in this thread about Schneier “leaning on State Department talking points”.

                                                              1. 2

                                                                I’m not aware of a taboo on political discussion, and the article is about government policy, so I didn’t see a problem with pointing out State Department talking points.

                                                                My issue with your statements is that they require more detail to evaluate – Is the Cuban government restricting the flow of information in a way that is comparable to network layer consorship, or in a way that exceeds what Western governments do? That would require going beyond generic statements that apply to literally every government, and explaining the non-technical means that you think are employed by the Cuban government. But you have refused to do saying it would cross a line into being too political.

                                                                1. 2

                                                                  I’m not aware of a taboo on political discussion, and the article is about government policy, so I didn’t see a problem with pointing out State Department talking points.

                                                                  There is one. Just look at how many people have flagged this as off-topic.

                                                          2. 3

                                                            Plus they have El Paquete, which I’m sure a lot of Americans would envy if they knew about it.

                                                            (Yes, admittedly, El Paquete is illegal, there as here.)

                                                          3. 7

                                                            I don’t know if you familiar with American-mass media or social networking, but there is a lot of easily-enforceable non-technical censorship at play. Its easy to handwave about some technical or non-techinal cencorship in Cuba but ff Iran or Cuba had the same ability to project propaganda as the US there would certainly be a great American firewall.

                                                        2. 4

                                                          Apps like TikTok (or FB, Youtube, Twitter … ) rely on network effects to get their popularity. People use TikTok because their peers are on TikTok. Make it sufficiently hard to install (and yes, sideloading apks on a device is suffiently hard that most people won’t bother), and people will flock to the next ephemeral video platform.

                                                          Sure, it won’t prevent a dedicated person from installing TikTok on their phone - but most people won’t even want to.

                                                          Then the question becomes “should companies like Apple and Google be required to facilitate the installation of TikTok, and, if so, can the US govt require them not to?”. That question seems to revolve more about free trade/commerce than about free speech.

                                                          1. 3

                                                            And I would wager that there are several clones to TikTok spinning up as we speak. They’ll use the same dark patterns to increase engagement that TikTok does, but at least one of them will be owned / controlled by a Western company, and thus be “acceptable” to the State Department.

                                                            All that’s missing is sourcing some content to start things off, and spending some millions on advertising to start to attract users.

                                                            The end result will be nearly the same amount of harm to the users, but with less spying by the CCP, and more spying by some Western companies.

                                                            1. 1

                                                              These seem like two separate concerns to me. Unfortunately, we live in a time when companies can iterate quickly to make their products as addictive as possible.

                                                              1. 1

                                                                Nearly the same amount of harm, but still less. There would still be a drop in addictive usage patterns before the new western TikTok becomes socially compulsory for teens. Could make a difference in the development of children who otherwise wouldn’t have a gap in that mode of interaction during their school years.

                                                            2. 1

                                                              From here it looks like you missed the point. He says the effective bans would be terrible/intolerable. Then he points out that merely banning the apps would not be effective.

                                                              And do you see what’s missing from that?

                                                            3. 2

                                                              And sure, there will be other apps that replace TikTok; when that happens maybe it will be easier to argue for comprehensive rather than ad hoc regulation.

                                                              YouTube Shorts is already eating TikTok’s lunch in a lot of ways. The addiction-optimized-queue-of-clips format is almost certainly here to stay.

                                                              1. 2

                                                                Am I… not the right audience for YouTube Shorts? I do watch a fair amount of YouTube, but these clips are mostly uninteresting to me. The best of them are just clips from channels I already subscribe to.

                                                                The one thing I want but don’t get with the Shorts is how old the video is. If I’m seeking news on The War, space and astronomy news, etc, I don’t want to look at something from last year or even six months ago. But since the Shorts don’t show the date, I’m mostly unlikely to click on them, and am usually unsatisfied when I do. I just looked in the Settings again, and don’t see a way to just hide those on the home screen.

                                                                1. 2

                                                                  You and me both! I’m basing my anecdote on what I’ve observed among friends and family, particularly those who are banned from using TikTok by their government and government-adjacent employers. I think it’s just very hard to fit genuinely interesting content into such a short clip, but presenting many such clips in rapid sequence is great for engaging that slot-machine-seeking hunger some people seem to have.

                                                                  (Unless I’m misunderstanding your comment. If you’re implying that you were able to get what you wanted out of TikTok, teach me your ways! I’ve been trying and failing to get into it.)

                                                            1. 54

                                                              Totally agreed about kebab case. It’s an unusually major quality-of-life improvement.

                                                              I’d also add being allowed to use ? in an identifier. user-record-valid? is pretty clear, both as a function or as a variable.

                                                              1. 55

                                                                The argument I hear against kebab case is that it makes it impossible to write subtraction as foo-bar but like … that’s … good actually? Why are we designing our syntax specifically in order to accommodate bad readability patterns? Just put a space in there and be done with it. Same logic applies to question marks in identifiers. If there’s no space around it, it’s part of the identifier.

                                                                1. 12

                                                                  Agreed! (hi phil 👋)

                                                                  This is mentioned in the article too in a way. In addition to the readability point you make, the author makes the argument that most of us use multi-word identifiers far, far more often than we do subtractions.

                                                                  1. 9

                                                                    I dunno, I think there’s a lot of pesky questions here. Are all mathematical operators whitespace sensitive, or just -? Is kebab-case really worth pesky errors when someone doesn’t type things correctly?

                                                                    I format my mathematical operators with whitespace, but I also shotgun down code and might leave out the spaces, then rely on my formatter to correct it.

                                                                    Basically, I think kebab-case is nice, but properly reserved for lisps.

                                                                    1. 28

                                                                      Are all mathematical operators whitespace sensitive?

                                                                      Yes, of course! There’s no reason to disallow tla+ as an identifier either or km/h for a variable to keep speed other than “that’s the way it’s been done for decades”.

                                                                      I also shotgun down code and might leave out the spaces, then rely on my formatter to correct it.

                                                                      The compiler should catch it immediately since it’d be considered an unrecognized identifier.

                                                                      1. 3

                                                                        I’m not sure if this is an argument for or against what you’re saying here, but this discussion reminded me of the old story about how fortran 77 and earlier just ignore all spaces in code:

                                                                        There is a useful lesson to be learned from the failure of one of the earliest planetary probes launched by NASA. The cause of the failure was eventually traced to a statement in its control software similar to this:

                                                                        DO 15 I = 1.100

                                                                        when what should have been written was: DO 15 I = 1,100

                                                                        but somehow a dot had replaced the comma. Because Fortran ignores spaces, this was seen by the compiler as:

                                                                        DO15I = 1.100

                                                                        which is a perfectly valid assignment to a variable called DO15I and not at all what was intended.

                                                                        (from https://www.star.le.ac.uk/~cgp/prof77.html)

                                                                      2. 8

                                                                        If I see x-y, I always parse it visually as a single term, not x minus y. I think that’s a completely fair assumption to make.

                                                                    2. 16

                                                                      I have always found kebab-case easier on the eyes than snake_case, I wish the former was more prevalent in languages.

                                                                      1. 14

                                                                        Raku (previously known as Perl 6) does exactly this: dashes are allowed in variables names, and require spaces to be parsed as the minus operator.

                                                                        1. 6

                                                                          Crazy idea: reverse _ and - in your keyboard map :)

                                                                          Probably would work out well for programmers. All your variables are easier to type

                                                                          When you need to use minus, which is not as often, you press shift

                                                                          1. 10

                                                                            More crazy ideas.

                                                                            • Use ASCII hyphen (-) in identifiers, and use the Unicode minus sign (−) for subtraction.
                                                                            • Permit -- (two hyphens) as a synonym for − (minus). Related to the fact that some languages let you write ≤ instead of <=, and so on. Related to the fact that -- turns to – in markdown.
                                                                            • Your text editor automatically converts -- to − and <= to ≤.
                                                                            • This makes more sense if you are viewing source code using a proportional font. Identifiers consume less precious horizontal screen space in a proportional font. Hyphens are shorter than underscores, so it looks better and is nicer to read.
                                                                            1. 15

                                                                              Use ASCII hyphen (-) in identifiers, and use the Unicode minus sign (−) for subtraction.

                                                                              #include <vader.gif> Nooooooo!!!!!!!!!

                                                                              I really don’t like this idea. I’m all for native support for Unicode strings and identifiers. And if you want to create locale-specific keywords, that is also fine. I might even be OK with expanding the set of common operators to specific Unicode symbols, provided there is a decent way to input them. [1]

                                                                              But we should never, ever use two visually similar symbols for different things. Yes, I know, the compiler will immediately warn you if you mixed them up, but I would like to strongly discourage ever even starting down that path.

                                                                              [1] Something like :interpunct: for the “·” for example. Or otherwise let’s have the entire world adopt new standard keyboards that have all the useful mathematical symbols. At any rate, I’d want to think about more symbols a lot more before incorporating it into a programming language.

                                                                              1. 4

                                                                                The hyphen and minus sign differ greatly in length, and are easily distinguished, when the correct character codes and a properly designed proportional font is used. According to The Texbook (Donald Knuth, page 4), a minus sign is about 3 times as long as a hyphen. Knuth designed the standards we still use for mathematical typesetting.

                                                                                When I type these characters into Lobsters and view in Firefox, Unicode minus sign (−) U+2212 is about twice the width of Unicode hyphen (‐) U+2010. I’m not sure if everybody is seeing the same font I am, but the l and I are also indistinguishable, which is also bad for programming.

                                                                                A programming language that is designed to be edited and viewed using traditional mathematical typesetting conventions would need to use a font designed for the purpose. Programming fonts that clearly distinguish all characters (1 and l and I, 0 and O), are not a new idea.

                                                                              2. 7

                                                                                Sun Labs’ Fortress project (An HPC language from ~15 years ago, a one time friendly competitor to Chapel, mentioned in the article) had some similar ideas to this, where unicode chars were allowed in programs, and there were specific rules for how to render Fortress programs when they were printed or even edited. for example

                                                                                (a) If the identifier consists of two ASCII capital letters that are the same, possibly followed by digits, then a single capital letter is rendered double-struck, followed by full-sized (not subscripted) digits in roman font.

                                                                                QQ is rendered as ℚ

                                                                                RR64 is rendered as ℝ64

                                                                                it supported identifier naming conventions for superscripts and subscripts, overbars and arrows, etc. I used to have a bookmark from that project that read “Run your whiteboard!”

                                                                                the language spec is pretty interesting to read and has a lot of examples of these. I found one copy at https://homes.luddy.indiana.edu/samth/fortress-spec.pdf

                                                                                1. 9

                                                                                  Thanks, this is cool!

                                                                                  I feel that the programming community is mostly stuck in a bubble where the only acceptable way to communicate complex ideas is using a grid of fixed width ASCII characters. Need to put a diagram into a comment? ASCII graphics! Meanwhile, outside the bubble we have Unicode, Wikipedia and technical journals are full of images, diagrams, and mathematical notation with sophisticated typography. And text messages are full of emojis.

                                                                                  It would be nice to write code using richer visual notations.

                                                                                2. 3

                                                                                  Use dieresis to indicate token break, as in some style guides for coöperate:

                                                                                  kebab-case

                                                                                  infix⸚s̈ubtract

                                                                                  (Unserious!)

                                                                                  1. 1

                                                                                    Nice. All the cool people (from the 1800’s) spell this word diaëresis, which I think improves the vibe.

                                                                                    1. 2

                                                                                      Ah yes, but if you want to get really cool (read: archaic), methinks you’d be even better served by diæresis, its ligature also being (to my mind at least) significantly less offensive than the Neëuw Yorker style guide’s abominable diære…sizing(?) ;-)

                                                                                      1. 3

                                                                                        Thank you for pointing this out. I think that diæresis is more steampunk, but diaëresis is self-referential, which is a different kind of cool.

                                                                                3. 7

                                                                                  I’ve tried that before and it turns out dash is more common than underscore even in programming. For example terminal stuff is riddle with dashes.

                                                                                  1. 7

                                                                                    For me, this is not at all about typing comfort, it’s all about reading. Dashes, underscores and camel case all sound different in my head when reading them, the underscore being the least comfortable.

                                                                                    1. 10

                                                                                      For me, this is not at all about typing comfort, it’s all about reading. Dashes, underscores and camel case all sound different in my head when reading them

                                                                                      I am the same way, except they all sound different from my screenreader, not just in my head. I prefer dashes. It’s also a traditional way to separate a compound word.

                                                                                      1. 2

                                                                                        Interesting, you must have some synesthesia :-)

                                                                                        As far as I can tell, different variable styles don’t sound like anything in my head. They make it harder for me to read when it’s inconsistent, and I have to adjust to different styles, but an all_underscore codebase is just as good to me as an all camelCase.

                                                                                        I use Ctrl-N in vim so typing underscore names doesn’t seem that bad. Usually the variable is already there somewhere. I also try to read and test “what I need” and then think about the code away from the computer, without referring to specific names

                                                                                    2. 5

                                                                                      I like ? being an operator you can apply to identifiers, like how it’s used with nullables in C#, or, as I recall, some kind of test in Ruby.

                                                                                      1. 6

                                                                                        In Ruby, ? is part of the ternary operator and a legal method suffix so method names like dst? are idiomatic.

                                                                                        1. 1

                                                                                          Ah, that makes sense. I don’t use Ruby so I wasn’t sure, I just knew I had seen it.

                                                                                        2. 3

                                                                                          In zig maybe.? resolves maybe to not be null, and errors if it is null.

                                                                                          maybe? is different, in my mind.

                                                                                          1. 1

                                                                                            In Ruby it’s just convention to name your function valid? instead of the is_valid or isValid you have in most languages. The ? Is just part of the function name.

                                                                                        1. 30

                                                                                          for me, the most exciting thing about golang is that i can easily walk junior engineers through a codebase with 0 prep. i love accessible code that doesn’t require a krang-like brain to intuit. rust is so non-intuitive to me that i’ve bounced off of it several times, despite wanting to learn it - and i’m a seasoned engineer!

                                                                                          i didn’t go to school for CS, and i don’t have a traditional background - there are a lot of people like me in the industry. approachability of languages matters, and golang does a fine job.

                                                                                          it obv has warts. but between the inflammatory title & the cherry picked “bad things”, the article winds up feeling really cynical, and makes me feel like fasterthanli.me is probably cynical too.

                                                                                          continues to write fun, stable code quickly in golang

                                                                                          1. 9

                                                                                            What to you makes the code written in Go’s monotonous style fun?

                                                                                            1. 27

                                                                                              For me—and for most who choose Go—the fun lies in watching your ideas for software come to life. Go is so easy to think in; it enables building stuff without having to fight the language.

                                                                                              1. 24

                                                                                                I’d rather work with a stable language, so that I can be creative in the approach to the problem (not the language expression) than a language where I have to spend significant valuable background mental effort on the choice of words

                                                                                                1. 6

                                                                                                  And you don’t mind having to spend valuable background mental effort on typing if err != nil over and over?

                                                                                                  1. 10

                                                                                                    I do mind, but I think you can argue it produces low cognitive load

                                                                                                    1. 5

                                                                                                      The Rust folks had a similar issue with returning Option and Result and fixed it with the question mark operator.

                                                                                                      The Error type can be named anything, but the community very quickly settled on naming it err, following the convention started by the standard library. The language designers should have just made that the default, and created a similar construct to the question mark.

                                                                                                      1. 5

                                                                                                        after the first few times, it comes naturally for me and i don’t really think about it much. In fact, in situations where it is unnecessary I often have to stop and think about it more.

                                                                                                    2. 20

                                                                                                      bc go code mostly looks the same everywhere thanks to gofmt and a strong stdlib, i spend a lot less time thinking about package choice & a lot more time doing implementation. yesterday i wrote a prometheus to matrix alert bot from scratch in 30 minutes - i spent most of that time figuring out what the prometheus API layout was. now that it’s deployed, i have faith that the code will be rock solid for basically eternity.

                                                                                                      what’s not fun is writing similar code in ruby/python and having major language upgrades deprecate my code, or having unexpected errors show up during runtime. or, god forbid, doing dep management.

                                                                                                      part of that is thanks to go’s stability, which is another good reason to choose it for the sort of work i do.

                                                                                                      having a binary means not having to worry about the linux package ecosystem either - i just stick the binary where i want it to run & it’s off to the races forever.

                                                                                                      to me, that’s the fun of it. focusing on domain problems & not implementation, and having a solid foundation - it feels like sitting with my back against a wall instead of a window. it saves me significant time & having dealt with a lot of other languages & their ecosystems, golang feels like relief.

                                                                                                      1. 4

                                                                                                        it’s a language created at a specific workplace for doing the type of work that those workers do. Do you think bricklayers worry about how to make laying bricks fun?

                                                                                                        1. 4

                                                                                                          continues to write fun, stable code quickly in golang

                                                                                                          That’s why I was asking why they found writing Go fun, it wasn’t out of nowhere. I have received some satisfactory answers to that question, too.

                                                                                                          1. 3

                                                                                                            If it was possible for brick laying to be fun, I’m sure bricklayers would take it.

                                                                                                            1. 8

                                                                                                              Fun fact, Winston Churchill took up brick laying as a hobby. He certainly seemed to think it was fun!

                                                                                                      1. 3

                                                                                                        Digression: Lua does something spiritually similar to this with its metatables. It’s pretty great! Basically each value has a “metatable” attached that has some magical methods on it that are called by operators, comparisons, etc. It also includes methods that are called on function application and on method lookup failure, so with these small primitives you can build just about anything.

                                                                                                        It is almost a rite-of-passage for a beginning Lua programmer to read up on tables and metatables, and then create their own object-oriented system. You can find many implementations of varying scope and complexity.

                                                                                                        1. 2

                                                                                                          Yep! I’ve done it. It’s fun and magical and mind-bending!

                                                                                                        1. 8

                                                                                                          I aspire to some day give presentations as well as Mickens does. It feels like a comedy routine, but he actually uses it to make good points about computer security in an accessible way.

                                                                                                          1. 6

                                                                                                            James Mickens is the best. This is canon.

                                                                                                            1. 3

                                                                                                              I’ve watched this presentation before, and I will watch it again. Love this guy.

                                                                                                          1. 7

                                                                                                            Can someone help me parse “maliciously secure”? Seems it’s used broadly in SMPC research, would love a primer (or rather a pointer to one) on what that claim means.

                                                                                                            1. 9

                                                                                                              Here, maliciously secure is about the thread model. It implies that an adversary may arbitrarily deviate from the protocol, may arbitrarily corrupt data, abort the protocol, and more.

                                                                                                              The Pragmatic MPC book has a much better explanation though: https://securecomputation.org/docs/ch2-definingmpc.pdf – chapter 2.3.3:

                                                                                                              A malicious (also known as active) adversary may instead cause corrupted parties to deviate arbitrarily from the prescribed protocol in an attempt to violate security. A malicious adversary has all the powers of a semi-honest one in analyzing the protocol execution, but may also take any actions it wants during protocol execution. Note that this subsumes an adversary that can control, manipulate, and arbitrarily inject messages on the network (even through throughout this book we assume direct secure channels between each pair of parties).

                                                                                                              1. 1

                                                                                                                Appreciate the brief explanation and pointer in the right direction!

                                                                                                              2. 8

                                                                                                                It should mean “it’s secure, and it uses the fact that it’s secure for evil purposes”, but I don’t think that’s what they’re going for.

                                                                                                                1. 2

                                                                                                                  … or “The protocol is secure even against certain ‘evil’ adversaries”

                                                                                                                  1. 13

                                                                                                                    … or “The protocol is secure even against certain ‘evil’ adversaries”

                                                                                                                    Isn’t that just “secure”? Because anything less is “not secure”.

                                                                                                                    1. 2

                                                                                                                      That doesn’t really fall out of the syntax though — you have to read it in an unnatural way.

                                                                                                                      Plus I pretty much agree with ansible-rs here. I get it, it’s defining the capabilities of the adversary as being a Mallory, not an Eve, or an Eve who participates but without blowing cover — but A) as soon as you take away even a little bit of context, and try to read it as English, it’s terrible (“Yeah, we’re secure against people who are actually trying to break things for bad reasons!” “Okay, gold star.”), and B) why not just call M-secure “secure”, and E-secure “confidential”?

                                                                                                                      Not that I really think there’s a chance of changing anything, I just think it’s an unfortunate sequence of words.

                                                                                                                1. 1

                                                                                                                  Unanswered question: What kind of terrible thermal paste was used with the original cooler? I’ve seen stuff get hard, but not turn into super glue.

                                                                                                                  Also, if the backplate is sliding around inside the case, it is possible it has damaged the components on that side of the motherboard. I would recommend trying to closely inspect the motherboard for that kind of damage, or at least checking the bottom of the case for debris from such components.

                                                                                                                  1. 1

                                                                                                                    Unanswered question: What kind of terrible thermal paste was used with the original cooler? I’ve seen stuff get hard, but not turn into super glue.

                                                                                                                    It was pre-applied on the heaksink when I got it (if I recall correctly) and I never bothered to check. I did a quick search now, but I couldn’t find the exact make of the paste.

                                                                                                                    Also, if the backplate is sliding around inside the case, it is possible it has damaged the components on that side of the motherboard. I would recommend trying to closely inspect the motherboard for that kind of damage, or at least checking the bottom of the case for debris from such components.

                                                                                                                    Thanks for the advice. I’ll take a look at some point, but I guess that if it’s working now it’s probably fine.

                                                                                                                  1. -4

                                                                                                                    It almost seems that Rust doesn’t want the competition from other compilers, like intel and or nvidia. If Rust would actually become popular outside the blogosphere, commercial compilers are bound to appear.

                                                                                                                    1. 17

                                                                                                                      That’s a baseless assumption. There’s mrustc and gcc-rs already, and existence of other compilers would benefit the language.

                                                                                                                      1. -7

                                                                                                                        There’s mrustc and gcc-rs already

                                                                                                                        They exist but they don’t work and I bet you know this, not sure why you decided to write this bullshit.

                                                                                                                        1. 5

                                                                                                                          If you knew that much about them, you’d know that mrustc is working perfectly fine to bootstrap rustc 1.54.0 for systems that aren’t supported. That means it is a rust compiler, otherwise it couldn’t bootstrap the (rust written) rustc. The borrow-rules are irrelevant for that. So all you’re doing is being rude.

                                                                                                                          GCC-RS is in the works and is also pretty much endorsed by everyone - you’re bashing something that went from 0 to halfway there in a tiny fraction of the time rustc exists. The only thing rustc wants to avoid is the difference you have between clang, gcc and msvc - despite a supposedly standard.

                                                                                                                          1. 1

                                                                                                                            If you knew that much about them, you’d know that mrustc is working perfectly fine to bootstrap rustc 1.54.0 for systems that aren’t supported. That means it is a rust compiler, otherwise it couldn’t bootstrap the (rust written) rustc. The borrow-rules are irrelevant for that. So all you’re doing is being rude.

                                                                                                                            hmm… why would it need to bootstrap rustc if it’s a rust compiler in its own right?

                                                                                                                            1. 1

                                                                                                                              You don’t “need” to, but for various reasons some people want to.

                                                                                                                          2. 1

                                                                                                                            Rust Evangelism Strikeforce

                                                                                                                        2. 10

                                                                                                                          If someone wanted to create a commercial compiler, they’d be more likely to fork the (permissively licensed) reference implementation and add some secret-sauce optimisations on top. They wouldn’t worry too much about a spec because they’d be using the same front end as the reference implementation. A spec is useful for understanding whether a particular output of the reference compiler is the result of an implementation bug or a language design choice.

                                                                                                                          1. 7

                                                                                                                            It almost seems that Rust doesn’t want the competition from other compilers, like intel and or nvidia.

                                                                                                                            Who is this “Rust” you are talking about? The core team? They have done nothing I’m aware of to deter or discourage alternate implementations.

                                                                                                                            As /u/kornel mentions, there is already mrustc, GCC Rust and even things like cranelift that can eventually become full alternate implementations.

                                                                                                                            If Rust would actually become popular outside the blogosphere, …

                                                                                                                            Real people are using it for real projects, and seeing real benefits. If you don’t like it, that’s fine. But as it turns out, a lot of people like tools that help them write correct and reliable code.

                                                                                                                            … commercial compilers are bound to appear.

                                                                                                                            Eh, maybe. A valid criticism of Rust is that it is itself complex, and the toolchain implementation is big and complicated. It would be a lot of work to create an entire implementation from scratch, and you wouldn’t see benefit for years. If the Rust core team displays bad governance, is slow and / or recalcitrant to accept outside contributions or other issues, I could see a stronger push for a commercial offering. But I think you would have a hard time arguing that is the case right now.