1. 3

    I wrote up an introduction to custom elements for Elm developers, and I’m experimenting with a tool that would help with UI development in Elm.

    1. 2

      Ultimately, I couldn’t extract much out of this article besides the common platitudes about competitiveness and efficiency. Even though I generally agree with the idea of outsourcing technology, my reasons for it are different, and in any case, they’re based on hunches and conjecture, just as Intercom’s.

      You can also find articles stating just the opposite: using niche technology gives you an advantage. There are companies succeeding either way, and I suspect the reasons for success can probably be better attributed to their marketing departments and luck. Technology is mostly incidental.

      I’m not even sure that the title is supported by the article. It’s not clear that they are running less software in any meaningful way.

      1. 3

        In addition to all the other comments: you can open 10s of tabs (from bookmarks, feedly, pocket, whatever) and you will not be banned like on HN ;D

        1. 4

          I feel out of the loop. What is this referencing?

          1. 2

            I currently have a bunch of HN tabs open right now since I haven’t got around to moving them off mobile. People have been banned for that?

            1. 5

              OP probably had many HN tabs open, browser crashes or session reloads. All those tab loads come in at once and HN will blackhole your IP for a bit. They are pretty strict about crawl rate as well. Even at much less than a regular browser session and you will be banned.

              1. 3

                What a curious way to deal with scalability! While developers are usually too quick to jump onto technical solutions, in this case there seems to be an inordinate amount of persistence in the opposite direction. It’s especially amusing in the context of a text-only site for a developer audience. Perhaps it’s more of a statement.

                1. 1

                  That’s what I suspected. It would look like a DOS by a scraper or attacker. I wasnt sure about the threshold. A regular session, huh? Well, Im still not banned so maybe it’s profiled by user (post rate and/or karma).

                  I think Ill try to play it safe just moving five a day oldest to newest until I get them cleared. Oldest to newest means Ill hit their cache eventually. That might reduce risk if the mitigation counts expensive, dynamic reloads instead of faster, cache hits. Appreciate the tips.

            1. 6

              I like the quality of the links, but also the quality of the comments. The comments are generally pretty good, and the downvotes are mostly on target. I also like that there is a community effort to maintain this standard of quality, eg via @friendlysock’s comments. I think that without comments which flag low-quality or off-topic links and educate people about what’s appropriate, the quality would go down.

              1. 8

                If we can collectively reject awful hiring practices, we all win. Employers already have most of the power in this relationship, so we need to band together and consider how each of our individual actions affect the community as a whole.

                I think maybe this has been done before, to great effect (eg, the forty-hour work week, etc.).

                1. [Comment removed by author]

                  1. 4

                    You must be lucky to live in a place where it’s cheap to keep your belly full and a roof over your head, and where programmers command such high pay, and has tons of places to work, in lots of different professions! If that weren’t so, you wouldn’t be so glib about leaving and going somewhere better. In fact, if such a place didn’t actually exist, you’d look like a heartless and uninformed child, which can’t be true, or else you youldn’t be here. So I’m probably missing something that unifies and resolves this apparent contradiction. Maybe you just forgot about how hard it is to pay rent in Silicon Valley without an SV salary, or what it’s like to have a partner with different skills and needs, or have children or family or community that would be devastating to leave behind.

                    You claim that the members of the labor pool for programmers is already more powerful, individually, than the members of the capital pool, and therefore, it is not worthwhile to unionize. Maybe you’re right, which is maybe why the capital members have taken it upon themselves to organize collectively against labor. But why would you want to wait until you were desperate before you organized to realize your strength? Why wouldn’t you want to strengthen your position even more, especially when vastly more powerful forces will inevitably organize against you?

                    You’ve also characterized the alternative to “leaving and going somewhere better” in a very strange and passive way: “sit around and hope a union will come along and fix things for you”. I’d ask for clarity on how you think unions actually work, and what kind of dynamic they would introduce to the labor market, but I suspect there wouldn’t be much coherence. Instead, I’ll just point out that “sitting around and waiting” to be saved by a union is an odd thing to do after pointing out that there are no relevant unions.

                    Anyway, enjoy your coding challenges and unpaid overtime and no vacation accrual and equity that you can’t afford to exercise!

                    1. 2

                      I deleted my comment because after I posted it, I realized that since you hadn’t specifically mentioned unions and figured it was out of line for me to go assuming you meant unions. But since it’s very clear now you were, for the benefit of other readers, the main point I made was that I literally can’t imagine a profession least in need of unions than software developers.

                      You must be lucky to live in a place where it’s cheap to keep your belly full and a roof over your head, and where programmers command such high pay, and has tons of places to work, in lots of different professions! If that weren’t so, you wouldn’t be so glib about leaving and going somewhere better.

                      I do live in such a place, I live in the US where even the poorest of the poor have better living conditions than half the world. I should have qualified my statements by saying that they apply mainly to western countries. I understand that in other parts of the world opportunity is not as easy to come by no matter what your skill set. If that’s the case for you, then it’s possible my comments don’t apply to you and unions might be necessary where you are.

                      Maybe you just forgot about how hard it is to pay rent in Silicon Valley without an SV salary, or what it’s like to have a partner with different skills and needs, or have children or family or community that would be devastating to leave behind.

                      There’s always the option to leave Silicon Valley. There are a lot of famous companies with headquarters there but the Valley does not in any way have a monopoly on tech jobs.

                      Yes, I do have a partner with different skills to myself and we have children. I have already made one major move to get out of a shitty job and into a better one. And I would happily do it again if I had to.

                      1. 4

                        But since it’s very clear now you were, for the benefit of other readers, the main point I made was that I literally can’t imagine a profession least in need of unions than software developers.

                        Really? I don’t think doctors need a union either, but they have the AMA. Lawyers have the ABA. Other engineering professions have their professional societies. No, these aren’t formal unions, and they don’t have collective bargaining rights, but they do fulfill many of the same functions that unions fulfill for “blue-collar” workers.

                        In fact, the more I look around at other professions, the stranger I think it is that programmers don’t have a union or professional organization.

                        1. 4

                          I do find the argument that you can just uproot your whole life and move somewhere else with better work conditions to be extremely weak. People shouldn’t be put in a position to consider this a valid option in the first place. People have relatives, friends, children who need a stable environment, even just things they are used to and feel comfortable with.

                          Consider how you might have come about that way of thinking, and who it really benefits to have people willing to do this, from a broader perspective.

                          1. 2

                            I do live in such a place, I live in the US where even the poorest of the poor have better living conditions than half the world.

                            Therefore, there is no place for unions in the US? P.S.: you have just admitted you don’t live in such a place.

                            There’s always the option to leave Silicon Valley. There are a lot of famous companies with headquarters there but the Valley does not in any way have a monopoly on tech jobs.

                            It, along with the other areas with a monopsonistic local labor market (Seattle, New York to a lessor extent), does have a near exclusive lock on the disproportionately large salaries you mention as an intrinsic benefit of being a member of that industry, and all those places are very expensive to live in. Some people might get lucky by living some place cheap while working remotely and getting paid with SV/Seattle/NY wages, but compared to the total number of jobs, that number is low.

                            Yes, I do have a partner with different skills to myself and we have children. I have already made one major move to get out of a shitty job and into a better one. And I would happily do it again if I had to.

                            How great for you! I’m sure it wasn’t a huge pain and you’d not put down any roots (kids making friends at school, etc.) and everyone was happier for having done so. That’s fantastic, and I’m not even being insincere, because even if it were true, it wouldn’t support the argument that it is, in general, easy and painless to do, and that reasonable people shouldn’t desire to not have to do that.

                            You have not presented any argument against unions other than, “I don’t think we need them because the costs currently imposed on us by capital are either low enough that I don’t mind, or I’m somehow not paying them because I’ve been lucky or something.” Why are you so against the idea?

                            1. 1

                              I essentially agree about not uprooting, but the point about kids and school is probably a bit off. We considered it an argument for not changing countries. We also considered the problems kids (which we didn’t have at the time) would have integrating if we moved back. But a friend - a teacher of young children - set the record straight: Kids make new friends.

                              The biggest nope here is girls around puberty. They can be the worst psychological bullies, even deciding in advance to hate the new girl the teacher talked about.

                              With kids and a career, you don’t necessarily see your friends very often, at least IME. Moving should be such an upgrade that you can travel to see your friends about as often as you would otherwise.

                              Just something to keep in mind when considering a big move. We didn’t move for other reasons, at least not yet.

                              1. 2
                                1. 1

                                  I generally don’t do PDFs on the phone, but the middle link makes a good point about the age at which to move. I’m also quite sure that moving a lot can be detrimental. But moving like once at a less fragile age shouldn’t wreck the kid.

                                  Same as what I’ve heard about divorces and relationships. There are ages when you should keep the facade going.

                      2. 1

                        Reading the title and this comment, you might conclude, “coding challenges are awful hiring practice” and get on with your day.

                        Don’t do this, the article is about how coding challenges can be improved and what prospective employees should expect out of employers who use them.

                      1. 27

                        I’d like to provide a more sympathetic outside perspective.

                        There are a few common complaints about Elm and Elm community:

                        • Blocking discussion (locking threads etc.)
                        • Insufficient communication about Elm development
                        • Things getting removed from the language.

                        With regards to blocking discussion, I think the logic is something like this:

                        • The core developers have a roadmap for Elm development and they want to stick to it
                        • They tried including more developers but haven’t found an effective way to deal with more contributors
                        • Therefore, they have limited time
                        • They can spend this time rehashing the same arguments and debating half-baked ideas, or they can spend this time following their roadmap, but not both.

                        I would prefer that the discussions weren’t removed or locked, but on the other hand, it’s got to be grating to deal with the same entitled, uninformed or complaining comments all the time. I’ve read most of these discussions, and other than people venting, nothing is ever achieved in them. My reflexive reaction is to be uncomfortable (like a lot of other people) but then, there is also a certain clarity when people just say that they will not engage in a discussion.

                        With regards to insufficient communication, I think the main things to understand is that Elm is an experiment in doing things differently, and it’s causing a clash with conventional understanding. Elm is about getting off the upgrade treadmill. So, for example, when a new release like Elm 0.19 comes out, it happens without a public alpha and beta phases, and it’s not actually the point where you go and immediately migrate your production code to it! It’s only the point to start experimenting with it, it’s the point where library and tool authors can upgrade and so on. (There was quite a bit of activity prior to release anyway, it just wasn’t advertised publicly.)

                        Finally, the most contentious example of a “feature” getting removed is the so called native modules (which basically means the ability to have impure functions written in JS in your Elm code base). As far as I can tell (having followed Elm since 0.16), native modules were always an internal implementation detail and their use was never encouraged. Nevertheless, some people started using them as a shortcut anyway. However, they were a barrier to enabling function-level dead code elimination which is the main feature of the 0.19 release, so the loophole was finally closed. Sure, it’s inconvenient for people who used them, but does anyone complain when, say, Apple removes an internal API?

                        Ultimately, Elm is just an open source project and the core maintainers don’t really owe anybody anything - no contracts are entered into and no funds are exchanged. They can do whatever they want.

                        Of course, there is a question of the long term effects this approach is going to have on the community. Will it alienate too many people and cause Elm to wither? Will Elm remain a niche language for a narrow class of applications? That remains to be seen.

                        1. 23

                          but on the other hand, it’s got to be grating to deal with the same entitled, uninformed or complaining comments all the time.

                          Over the years, I have come to believe this is a vital part of building a community. Using draconian tactics to stomp out annoying comments is using power unwisely and worse yet – cripples your community in multiple ways.

                          The first thing to remember is that when a comment (entitled, uninformed or otherwise) comes up repeatedly – that is a failure of the community to provide a resource to answer/counter/assist with that comment. That resource can be a meme, a link, an image, a FAQ, a full on detailed spec document, whatever. This type of thing is part of how a community gets a personality. I think a lot of the reason there are a bunch of dead discourse servers for projects is too stringent policing. You should have a place for people to goof off and you have to let the community self police and become a real community. Not entirely, obviously, but on relevant topics.

                          This constant repetition of questions/comments is healthy, normal, it is the entrance of new people to the community. More importantly, if gives people who are just slightly deeper in the community someone to help, someone to police, someone to create resources for, even to a degree someone to mock (reminding them they aren’t THAT green anymore) – a way to be useful! This is a way to encourage growth, each “generation” of people helps the one that comes after them – and it is VITAL for building up a healthy community. In a healthy community the elders will only wade in occasionally and sporadically to set the tone and will focus on the more high minded, reusable solutions that move the project forward. Leave the minor stuff be done by the minor players, let them shine!

                          Beyond being vital to build the community – it is a signal of where newcomers are hurting. Now if documentation fixes the problem, or a meme… terrific! But if it doesn’t, and if it persists … that is a pain point to look at – that is a metric – that is worth knowing.

                          1. 5

                            Yeah, each one of these people gives you a chance to improve how well you communicate, and to strengthen your message. But shutting down those voices then run the risk of surrounding yourself with ‘yes people’ who don’t challenge your preconceptions. Now, it’s entirely up to the Elm people to do this, but I think they are going to find it harder to be mainstream with this style of community.

                            Note that I’m perfectly fine with blocking and sidelining people who violate a CoC, or are posting hurtful, nonconstructive comments. You do have to tread a fine line in your moderation though. Being overly zealous in ‘controlling the message’ can backfire in unpredictable ways.

                            Anyway, I continue to follow Elm because I think the designer has some excellent ideas and approaches, even if I do disagree with some of the ways the way the community is managed.

                            1. 5

                              even if I do disagree with some of the ways the way the community is managed.

                              I don’t think the two jobs (managing the community and managing the project) should necessarily be done by the same person. I actually think it probably shouldn’t. Each job is phenomenally challenging on its own – trying to do both is too much.

                              1. 2

                                Yeah, completely agree! I think it would take a huge weight of that person’s shoulders too! :)

                                1. 1

                                  I don’t think Evan personally moderates the forums. Other people do it these days.

                                  1. 3

                                    But, they do it on his behalf? This policy of locking and shutting down discussions comes from somewhere. That person directly or indirectly is the person who “manages” the community, the person who sets the policies/tone around such things.

                                    I personally have no idea, I am not active in the Elm community.

                                    1. 1

                                      I’m not sure who sets the policy and how.

                              2. 2

                                That’s a very interesting perspective, thanks.

                              3. 12

                                I’ll add the perspective of someone who loved Elm and will never touch it again. We’re rewriting in PureScript right now :) I’m happy I learned Elm, it was a nice way of doing things while it lasted.

                                In Elm you may eventually hit a case where you can’t easily wrap your functionality in ports, the alternative to native modules. We did, many times. The response on the forum and other places is often to shut down your message, to give you a partial version of that functionality that isn’t quite what you need, to tell you to wait until that functionality is ready in Elm (a schedule that might be years!), or until recently to point you at native modules. This isn’t very nice. It’s actually very curious how nice the Elm community is unless you’re talking about this feature, in which case it feels pretty hostile. But that’s how open source rolls.

                                Look at the response to message linked in the story: “We recently used a custom element to replace a native modules dealing with inputs in production at NoRedInk. I can’t link to it because it’s in a proprietary code base but I’ll be writing an speaking about it over the next couple months.”

                                This is great! But I can’t wait months in the hope that someone will talk about a solution to a problem I have today. Never mind releasing one.

                                Many people did not see native modules as a shortcut or a secret internal API. They were an escape valve. You would hit something that was impossible without large efforts that would make you give up on Elm as not being viable. Then you would overcome the issues using native modules which many people in the community made clear was the only alternative. Now, after you invest effort you’re told that there’s actually no way to work around any of these issues without “doing them the right way” which turns out to be so complicated that companies keep them proprietary. :(

                                I feel like many people are negative about this change because it was part of how Elm was sold to people. “We’re not there yet, but here, if we’re falling short in any way you can rely on this thing. So keep using Elm.”

                                That being said, it feels like people are treating this like an apocalypse, probably because they got emotionally invested in something they like and they feel like it’s being changed in a way that excludes them.

                                You’re right though. Maybe in the long term this will help the language. Maybe it will not. Some people will enjoy the change because it does lead to a cleaner ecosystem and it will push people to develop libraries to round out missing functionality. In the short term, I have to get things done. The two perspectives often aren’t compatible.

                                I’m personally more worried about what will happen with the next major change where Elm decides to jettison part of its community. I don’t want to be around for that.

                                1. 2

                                  If people encouraged you to use native modules, then that was unfortunate.

                                  I’m not sure I understand the issue with custom elements. Sure, they’re a bit complicated and half baked but it certainly doesn’t require a research lab to use them (in fact, I’ve just implemented one now).

                                  I would agree, however, that the Elm developers have a bit of a hardline approach to backward compatibility. Perhaps there is a misunderstanding around the state of Elm - ie whether it’s still an experiment that can break compatibility or a stable system that shouldn’t.

                                  I’m not sure how I feel about backward compatibility. As a user, it’s very convenient. As a developer, it’s so easy to drown in the resulting complexity.

                                2. 10

                                  I would prefer that the discussions weren’t removed or locked, but on the other hand, it’s got to be grating to deal with the same entitled, uninformed or complaining comments all the time. I’ve read most of these discussions, and other than people venting, nothing is ever achieved in them. My reflexive reaction is to be uncomfortable (like a lot of other people) but then, there is also a certain clarity when people just say that they will not engage in a discussion.

                                  I’ll go one further and say I’m quite glad those discussions get locked. Once the core team has made a decision, there’s no point in having angry developers fill the communication channels the community uses with unproductive venting. I like the decisions the core team is making, and if those threads didn’t get locked, I’d feel semi-obligated to respond and say that I’m in favor of the decision, or I’d feel guilty not supporting the core devs because I have other obligations. I’m glad I don’t have to wade through that stuff. FWIW, it seems like the community is really good at saying “We’re not going to re-hash this decision a million times, but if you create a thread about a specific problem you’re trying to solve, we’ll help you find an approach that works” and they follow through on that.

                                  I don’t have a lot of sympathy for folks who are unhappy with the removal of the ability to compile packages that include direct JS bindings to the Elm runtime. For as long as I’ve been using Elm the messaging around that has consistently been that it’s not supported, it’s just an accidental side effect of how things are built, and you shouldn’t do it or you’re going to have a bad time. Now it’s broken and they’re having a bad time. This should not be a surprise. I also think it’s good decision to actively prohibit it. If people started using that approach widely, it would cause a lot of headaches for both the community and hamstring the core team’s ability to evolve the language.

                                  1. 6

                                    I’m quite glad those discussions get locked

                                    and

                                    I like the decisions the core team is making

                                    Do you believe your perspective would change if you didn’t agree with the developers decisions? Obviously I have a different perspective but I am curious if think you would still have this perspective if you were on the other side?

                                    Additionally, just because the core team has “made a decision” doesn’t mean it wasn’t a mistake, nor that it is permanent. Software projects make mistakes all the time, and sometimes the only way to really realize the mistake is the hear the howls of your users.

                                    1. 3

                                      I’m pretty confident I wouldn’t change my position on this if I wasn’t in agreement with the core team’s choices. I might switch to PureScript or ReasonML, if I think the trade-offs are worth it, but I can’t see myself continuing to complain/vent after the decision has been made. I think appropriate user input is “I have this specific case, here’s what the code look like, here’s the specific challenge with any suggested alternative” If the core team decides to go another way after seeing their use cases, it’s clear we don’t have the same perspective on the trade-offs for those decisions. I can live with that. I don’t expect everybody to share my opinion on every single technical decision.

                                      As an example, I use Clojure extensively at work, and I very much disagree with Rich Hickey’s opinions about type systems, but it’s pretty clear he’s thought through his position and random folks on the internet screaming differently isn’t going to change it, it’ll just make his job more difficult. I can’t imagine ever wanting to do that to someone.

                                      sometimes the only way to really realize the mistake is the hear the howls of your users

                                      It’s been my experience that the folks who can provide helpful feedback about mistaken technical decisions rarely howl. They can usually speak pretty clearly about how decisions impact their work and are able to move on when it’s clear there’s a fundamental difference in goals.

                                      1. 2

                                        It’s been my experience that the folks who can provide helpful feedback about mistaken technical decisions rarely howl.

                                        We fundamentally disagree on this point (and the value of the noisy new users), and I don’t think either of us is going to convince the other. So, I think this is a classic case of agree to disagree.

                                  2. 10

                                    I think what bothers me the most about the core team’s approach to features is not that they keep removing them, but that for some they do not provide a valid alternative.

                                    They’ll take away the current implementation of native modules, but coming up with a replacement is too hard, so even though the core libraries can use native code, us peasants will have to do without.

                                    They won’t add a mechanism for higher rank polymorphism because coming up with a good way to do it is hard, so even though the base library has a few magic typeclasses for its convenience, us peasants will have to make do with mountains of almost duplicated code and maybe some code generation tool.

                                    So where does that leave Elm right now? Should it be considered a production-ready tool just by virtue of not having very frequent releases? Or should it be regarded as an incomplete toy language, because of all the breaking changes between releases, all the things that haven’t been figured out yet, and how the response to requests for ways to do things that are necessary in real code is either “you don’t need that”, which I can live with most of the time, or “deal with it for the moment”, which is unacceptable.

                                    I think Elm should make it more clear that it’s ostensibly an unfinished project.

                                    1. 3

                                      They’ll take away the current implementation of native modules, but coming up with a replacement is too hard

                                      They won’t add a mechanism for higher rank polymorphism because coming up with a good way to do it is hard

                                      I don’t think this is a fair characterization of the core team’s reasons for not supporting those features. I’ve read/watched/listened to a lot of the posts/videos/podcasts where Evan and other folks discuss these issues, and I don’t think I’ve ever heard anyone say “We can’t do it because it’s too difficult.” There’s almost always a pretty clear position about the trade-offs and motivations behind those decisions. You might not agree with those motivations, or weigh the trade-offs the same way, but it’s disingenuous to characterize them as “it’s too hard”

                                      1. 4

                                        I exaggerate in my comment, but what I understood from the discussions around rank n polymorphism I’ve followed is basically that Evan doesn’t think any of the existing solutions fit Elm.

                                        I understand that language design, especially involving more complex features like this, is a hard issue, and I’m sure Evan and the core team have thought long and hard about this and have good reasons for not having a good solution yet, but the problem remains that hard things are hard and in the meantime the compiler can take an escape hatch and the users cannot.

                                      2. 2

                                        Should it be considered a production-ready tool just by virtue of not having very frequent releases? Or should it be regarded as an incomplete toy language

                                        I always struggle with this line of questioning because “incomplete and broken” describes pretty much all of the web platform in the sense that whenever you do non-trivial things, you’re going to run into framework limitations, bugs, browser incompatibilities and so on.

                                        All you can do is evaluate particular technologies in the context of your specific projects. For certain classes of problems, Elm works well and is indeed better than other options. For others, you’ll have to implement workarounds with various degrees of effort. But again, I can say the same thing for any language and framework.

                                        Is it good that it’s so easy to bump up against bugs and limitations? No. But at least Elm is no worse than anything else.

                                        Taking a tangent, the main problem is that Elm is being built on top of the horrifically complex and broken foundation that is the web platform. It’s mostly amazing to me that anything works at all.

                                        1. 10

                                          Is it good that it’s so easy to bump up against bugs and limitations? No. But at least Elm is no worse than anything else.

                                          Having worked with ClojureScript on the front-end for the past 3 years, I strongly disagree with this statement. My team has built a number of large applications using Reagent and whenever new versions of ClojureScript or Reagent come out all we’ve had to do was bump up the versions. We haven’t had to rewrite any code to accommodate the language or Reagent updates. My experience is that it’s perfectly possible to build robust and stable tools on top of the web platform despite its shortcomings.

                                          1. 4

                                            I have the opposite experience. Team at day job has some large CLJS projects (also 2-3 years old) on Reagent and Re-Frame. We’re stuck on older versions because we can’t update without breaking things, and by nature of the language it’s hard to change things with much confidence that we aren’t also inadvertently breaking things.

                                            These projects are also far more needlessly complex than their Elm equivalents, and also take far longer to compile so development is a real chore.

                                            1. 6

                                              Could you explain what specifically breaks things in your project, or what makes it more complex than the Elm equivalent. Reagent API had no regressions in it that I’m aware of, and re-frame had a single breaking change where the original reg-sub was renamed to reg-sub-raw in v 0.7 as I recall. I’m also baffled by your point regarding compiling. The way you develop ClojureScript is by having Figwheel or shadow-cljs running in the background and hotloading code as you change it. The changes are reflected instantly as you make them. Pretty much the only time you need to recompile the whole project is when you change dependencies. The projects we have at work are around 50K lines of ClojureScript on average, and we’ve not experienced the problems you’re describing.

                                            2. 2

                                              I think the ease of upgrades is a different discussion. There is a tool called elm-upgrade which provides automated code modifications where possible. That’s pretty nice, I haven’t seen a lot of languages with similar assistance.

                                              My point was, you cannot escape the problems of the web platform when building web applications. Does ClojureScript fully insulate you from the web platform while providing all of its functionality? Do you never run into cross-browser issues? Do you never have to interoperate with JavaScript libraries? Genuinely asking - I don’t know anything about ClojureScript.

                                              1. 3

                                                My experience is that vast majority of issues I had with the web platform went away when my team started using ClojureScript. We run into cross-browser issues now and then, but it’s not all that common since React and Google Closure do a good job handling cross-browser compatibility. Typically, most of the issues that we run into are CSS related.

                                                We interoperate with Js libraries where it makes sense, however the interop is generally kept at the edges and wrapped into libraries providing idiomatic data driven APIs. For example, we have a widgets library that provides all kinds of controls like data pickers, charts, etc. The API for the library looks similar to this to our internal widgets API.

                                                1. 1

                                                  Sounds like a great development experience!

                                                  Let me clarify my thinking a bit. For a certain class of problems, Elm is like that as well. But it certainly has limitations - not a huge number of libraries etc.

                                                  However, I think that pretty much everything web related is like that - limitations are everywhere, and they’re much tighter than I’d like. For example, every time I needed to add a date picker, it was complicated, no matter the language/framework. But perhaps your widgets library has finally solved it - that would be cool!

                                                  So I researched Elm and got a feel for it’s limitations, and then I could apply it (or not) appropriately.

                                                  I would agree, however, that the Elm developers have a bit of a hardline approach to backward compatibility. Perhaps there is a misunderstanding around the state of Elm - ie whether it’s still an experiment that can break compatibility or a stable system that shouldn’t.

                                                  I’m not sure how I feel about backward compatibility. As a user, it’s very convenient. As a developer, it’s so easy to drown in the resulting complexity.

                                                  1. 3

                                                    Yeah, I agree that the main question is around the state of Elm. If the message is that Elm isn’t finished, and don’t invest into it unless you’re prepared to invest time into keeping up, that’s perfectly fine. However, if people are being sold on a production ready language that just works there appears to be a bit of a disconnect there.

                                                    It’s obviously important to get things right up front, and if something turns out not to work well it’s better to change it before people get attached to it. On the other hand, if you’re a user of a platform then stability is really important. You’re trying to deliver a solution to your customers, and any breaking changes can become a serious cost to your business.

                                                    I also think it is important to be pragmatic when it comes to API design. The language should guide you to do things the intended way, but it also needs to accommodate you when you have to do something different. Interop is incredibly important for a young language that’s leveraging a large existing ecosystem, and removing the ability for people to use native modules in their own projects without an alternative is a bit bewildering to me.

                                            3. 7

                                              To me the problem is that Elm is not conceptually complete. I listed those issues specifically because they’re both things that the compiler and the core libraries can do internally, but the users of the language cannot.

                                              But at least Elm is no worse than anything else.

                                              No, Elm is a language, and not being able to do things in a language with so few metaprogramming capabilities is a pretty big deal compared to a missing feature in a library or a framework, which can easily be added in your own code or worked around.

                                              1. 1

                                                But how is this different from any other ecosystem? The compiler always has more freedom internally. There are always internal functions that platform APIs can use but your library cannot. Following your logic, we should condemn the Apple core APIs and Windows APIs too.

                                                1. 3

                                                  No, what I meant is that the core libraries use their “blessed” status to solve those problems only for themselves, thus recognizing that those problems effectively exist, but the users aren’t given any way to deal with them.

                                                  1. 2

                                                    But there are actually solutions on offer: ports and custom elements. What’s wrong with using them?

                                                    1. 4

                                                      Ports are very limiting and require much more work to set up than a normal library, and I haven’t used custom elements so I can’t speak for those.

                                                      There’s also no workaround for the lack of ad-hoc polymorphism. One of the complaints I hear the most about Elm is that writing json encoders and decoders is tedious and that they quickly become monstrously big and hard to maintain; often the json deserialization modules end up being the biggest modules in an Elm project.

                                                      This is clearly a feature the language needs (and already uses with some compiler magic, in the form of comparable, appendable, and so on).

                                          2. 2

                                            I was hoping to read other points of view on that matter, thanks for taking the time writing down yours!

                                          1. 5
                                            1. 4

                                              So, I work on two projects at work. One is a agent, part of a distributed system, that runs in several servers and provides access to some hardware connected to said servers. We maintain some of those servers, others are run by users. The other project is a library, used by the first project.

                                              The agent system is release once every sprint, and our sprints take 2 weeks. In the Tuesday of the second week, we ‘close’ the release: nothing merged after this will get in the release, unless it’s a bugfix. Then for the next 3 days, we run manual tests on the whole system (of which the agent is a part). If errors are found, we merge the fixes. We use a sort of trunk based development, so, if we find a bug, we’ll create a release branch and cherry-pick it there. Once we ran all tests, we manually generate a zip package (which involves creating a fresh clone, copying a bunch of files around, and zipping the resulting folder) and a) manually deploy it to the servers we maintain, and b) upload it to an internal confluence page.

                                              It’s very manual and very error-prone. We’re finally automating some parts of it, but it’s not done yet. The system is written in python, so we could be a simple pip package, but for permission reasons (not everyone is allowed to run it), we’re not there yet.

                                              The library is kinda worse. First, it has a binary dependency, that lives in separated repositories, so we have to make sure we keep the versions synced. It’s also a python project, but also not packaged as a pip package. The way it’s release is: We compile the binary dependency, copy it over to the development repo. We than commit and merge the release in the development branch. Then, we copy the changes, MANUALLY, to a “release” repository, commit it in there, and merge it. The users get the updates from the release repository, and we work in the development repository. I tried to sync the repositories history, to simplify this freaking mess, but there are manually applied changes in the release repository that make it impossible (or nearly) to just squash and push the changes from the development repo to the release repo.

                                              I recently wrote a small makefile to automate some of this terrible process, and my plan is to bring all this crap together in a single repo, split the library into two parts, and package both of them as proper pip-installable packages, but we’re a fairly long way from that, yet.

                                              Tell me that ain’t painful.

                                              1. 3

                                                Oh, also important to note: the agent system has some automated tests, that are supposed to run for every pushed commit and give it a -1 code review if it fails. That’s broken, currently, and because our PO is a , we haven’t had time to fix it yet. When it used to run, it was a good thing, but we don’t have lots of coverage, and the main server (that controls all agent servers), has almost no automated tests, so, there’s that.

                                                The library has some unit tests, but it’s a library to communicate with smartphones, so, there’s only so much test you can do without actually connecting it to a real phone and testing it. We do have a separated repo with integration tests that use real hardware, but it’s completely broken and I haven’t got time to fix it yet. So right now the reality is: I run the unit tests before a release, run a basic connection test, and hope for the best =/ Our release cycle is pretty tiny, one week, and we have release a worrying amount of bugs into production in the last months. I raised that with our manager and got the usual “Yeah, we should worry about that” response that will likely turn into no actual action.

                                                1. 2

                                                  Thanks for elaborating. I think that managers can be motivated by costs sometimes. If you add up the time it takes to do all the manual steps, say, over a month, then the effort required for automation might look more attractive. Maybe you could show that it will pay off within 6 months or a year.

                                              2. 7

                                                Your comment doesn’t answer the OP’s questions and doesn’t contribute anything to the discussion. Please write something useful instead. I’m disappointed that several people thought this one-word comment should be upvoted.

                                                1. 2

                                                  It’s just a joke…

                                                  1. 4

                                                    It would be better if lobste.rs didn’t devolve into obvious one-word jokes. There’s already Reddit.

                                                    1. 1

                                                      And as with all jokes, it has some reality to it =/

                                                  2. 3

                                                    Please don’t post snarky, unsubstantial comments like this. They’re the candy of forums: delightful for a sweet moment and ruinous in quantity.

                                                    1. 3

                                                      I don’t want to sound arrogant but just stating ‘Painful.’ doesn’t seem to be helpful imho… Care to explain why it’s painful en what actions you have taken/you will take to make it less painful?

                                                    1. 4

                                                      Never heard of it, but it seems like a super interesting approach to interactive environment. I cannot help but remember this Bret Victor’s talk about how we have been programming in almost-anachronistic ways with no innovation in the interfaces.

                                                      1. 8

                                                        There’s nothing obsolete about text. Visual languages don’t work. They’ve been tried hundreds of times, to no avail, because GUIs are fundamentally bad user interfaces for experienced users. Text is a better interface for power users, and programming languages are for power users.

                                                        1. 14

                                                          Why can’t I re-sort the definitions in my source instead of scrolling around then? Why is it hard to see a dependency graph for all my functions? Why do I have to jump between files all the time? Text - an interface for linear presentation of information - is fundamentally a kludge for code, which is anything but linear.

                                                          1. 1

                                                            Why can’t I re-sort the definitions in my source instead of scrolling around then?

                                                            Sort them by what? It wouldn’t be difficult to write a script using the compiler module of Python to reorder the declarations in your file in an order you chose, which you could then use to replace the text of a buffer in your text editor. But usually I’d suggest what you want is to see a list of definitions in a particular order, which you could then use to jump to the definitions.

                                                            In every case that I’ve seen of not using plain text, it inevitably become inscrutable. What is actually in my Smalltalk/Lisp image? What is actually there? What can people get out of it later when I deploy it?

                                                            Why is it hard to see a dependency graph for all my functions?

                                                            Because nobody has written something that will take your source files, determine their dependencies, and produce the DOT output (a very popular text-based format for graphs, far superior in my opinion to any binary graph description format) for that graph? It’s not like it’s particularly difficult.

                                                            Why do I have to jump between files all the time?

                                                            Because it turns out it’s useful to organise things into parts. Because it turns out it’s useful to be able to parallelise compilation and not reparse every bit of code you’ve ever written every time you change any part of it.


                                                            I think that it’s definitely a requirement of any decent programming language to have a way to easily take the source code of that programming language and reify it into a syntax tree, for example. That’s very useful to have in a standard library. In Lisp it’s just read, Python has more complex syntax and requires more machinery which is in a standard library module, other languages have similar things.

                                                            One point might be: maybe you don’t need a dependency graph if you can just make your code simpler, maybe you don’t need to jump around files much if your code is properly modularised (and you have a big enough screen and narrow enough maximum line length to have multiple files open at once), maybe sorting your definitions is wrong and what you want is a sortable list of declarations you can jump to the definitions.

                                                            Not to mention that version control is important and version controlling things that aren’t text is a problem with conventional version control tools. Might not be an issue, you have your own VCS, but then you enter the land of expecting new users of your language to not only not use their standard editor, but also to not use their standard VCS, not use their standard pastebin, etc. How do you pastebin a snippet of a visual language so someone on an IRC channel can see it and give you help? How do you ask questions on StackOverflow about a visual language?

                                                            It’s not even an issue of them being unusual and unsupported. By their very nature, not using text means that these languages aren’t compatible with generic tools for working with text. And never will be. That’s the thing about text, rather than having many many many binary formats and few tools, you have one binary format and many many tools.

                                                            1. 8

                                                              Hey Miles, thanks for elaborating. I think we could have more interesting discussions if you give me a bit more credit and skip the trivial objections. You’re doing the same thing you did last time with C++ compilers. Yes, I know I could write a script, it’s not the point. I’m talking about interactive tools for source code analysis and manipulation, not a one-off sort.

                                                              I don’t agree with your objections about parallel compilation and parsing. It seems to me that you’re just thinking about existing tools and arguing from the status quo.

                                                              Further down, you make a suggestion which I interpret as “better languages could mitigate these issues” which is fair, but again I have to disagree because better languages always lead to more complex software which again requires better tools, so that’s a temporary solution at best.

                                                              You also raise a few objections, and here I should clarify that what I have in mind is not some kind of visual flowchart editor. What I’m claiming is that the conflation of internal representation and visual representation for code is counterproductive, but I think that a display representation that mostly looks like text is fine (as long as it’s actually within a structured editor). What I’m interested in is being able to manipulate symbols and units of code as well as aspects of its structure rather than individual characters.

                                                              Consequently, for pastebin or StackOverflow, you could just paste some text projection of the code, no problem. When it comes to VCS, well, the current situation is quite poor, so I’d welcome better tools there. For example, if there was a VCS that showed me diffs that take into account the semantics of the language (eg like this: https://www.semanticmerge.com), that would be pretty cool.

                                                              For the rest of your objections, I offer this analogy: imagine that we only had ASCII pictures, and none of this incompatible JPG/PSD/PNG nonsense with few complicated tools. Then we could use generic tools for working with text to manipulate these files, and we wouldn’t be constrained in any way whether we wanted to create beautiful paintings or complex diagrams. That’s the thing about text!

                                                              I think the practitioners and particularly academics in our field should have more sense of possibilities and less affection for things the way they are.

                                                              1. 1

                                                                When it comes to VCS, well, the current situation is quite poor, so I’d welcome better tools there.

                                                                Existing VCS could work reasonably well if the serialisation/“text projection” was deterministic and ‘stable’, i.e. minimising the amount of spurious changes like re-ordering of definitions, etc. As a first approximation I can imagine an s-expression language arranging the top-level expressions into lexicographic order, spreading them out so each sub-expression gets its own line, normalising all unquoted whitespace, etc. This would be like a very opinionated gofmt.

                                                                If users wan’t to preserve some layout/etc. then the editor can store that as metadata in the file. I agree that semantics-aware diffing would be great though ;)

                                                                1. 1

                                                                  So you always end up separating the storage format from display representation in order to create better tools, which is exactly my point.

                                                                  1. 1

                                                                    Yes, I agree with your points. Was just remarking that some of these improvements (e.g. VCS) are easier to prototype and experiment with than others (e.g. semantics-aware queries of custom file formats).

                                                                2. 1

                                                                  The way I see it is that there are tools for turning text into an AST and you can use them to build the fancy things you want. My point wasn’t ‘you can write that sort as a one-off’. You can edit code written in a text-based programming language with a really fancy editor that immediately parses it to an AST and works with it as an AST, and only turns it into text when written to disk. I have no problem with that. But really you’re still editing text when using something like paredit.

                                                                  Something like vim but where the text objects are ‘identifier’, ‘ast node’, ‘expression’, ‘statement’, ‘logical line of code’, ‘block’, etc. rather than ‘text between word separators’, ‘text between spaces’, ‘line’, etc. would be a useful thing. In fact, you could probably do this in vim. I have an extension I use that lets you modify quotes around things taking into account escaped quotes within, etc. That’d probably work way better if it had that default structure for normal text and then could be customised to actually take into account the proper grammar of particular programming languages for which that is supported.

                                                                  What I’m concerned about is the idea that it’s a good idea to store code in a proprietary binary file format that’s different for every language, where you can’t use the same tools with multiple languages. And then having to reimplement the same basic functionality for every single language in separate IDEs for each, where everything works slightly differently.

                                                                  I do find it useful that I can do ci( and vim will delete everything inside the nearest set of parentheses, properly taking into account nesting. So if I have (foo (hello 1 2 3) bar) and my cursor is on the a, it’ll delete everything, even though the nearest ( and ) are beside hello and not foo. That kind of thing, more structured editing? I’m all for that.

                                                                  Consequently, for pastebin or StackOverflow, you could just paste some text projection of the code, no problem. When it comes to VCS, well, the current situation is quite poor, so I’d welcome better tools there. For example, if there was a VCS that showed me diffs that take into account the semantics of the language (eg like this: https://www.semanticmerge.com), that would be pretty cool.

                                                                  Ultimately I think if you have a recognised standardised text projection of your code, you might as well just make that the standardised format for it, then your fancy editor or editor plugin can parse it into the structures it needs. This helps ensure you can edit code over SSH, and have a variety of editors compatible with it, rather than just the single language-designer-provided IDE.

                                                                  One of the nice things about git is that it stores snapshots internally rather than diffs. So if you have a language-specific tool that can produce diffs that are better due to being informed by the grammar of the language (avoiding the problem of adding a function and the diff being ‘added a new closing brace to the previous function then writing a new function except for a closing brace’, for example), then you can do that! Change the diff algorithm.

                                                                  For the rest of your objections, I offer this analogy: imagine that we only had ASCII pictures, and none of this incompatible JPG/PSD/PNG nonsense with few complicated tools. Then we could use generic tools for working with text to manipulate these files, and we wouldn’t be constrained in any way whether we wanted to create beautiful paintings or complex diagrams. That’s the thing about text!

                                                                  Well I mean I do much prefer creating a graph by writing some code to emit DOT than by writing code to emit PNG. I did so just the other day in fact. http://rout.nz/nfa.svg. Thank god for graphviz, eh?

                                                                  Note that there’s also for example farbfeld, and svg, for that matter: text-based formats for images. Just because it’s text underneath doesn’t mean it has to be rendered as ASCII art.

                                                                  1. 1

                                                                    Cool, I’m glad we can agree that better tools would be good to have.

                                                                    As far as the storage format, I don’t actually have a clear preference. What’s clearly needed is a separation of storage format and visual representation. If we had that, arguments about tabs vs spaces, indent size, let/in vs where, line length, private methods first or public methods first, vertical vs horizontal space (and on and on) could be nullified because everybody could arrange things however they like. Why can’t we have even such simple conveniences? And that’s just the low hanging fruit, there are far more interesting operations and ways of looking at source that could be implemented.

                                                                    The other day there was a link to someone’s experiment (https://github.com/forest-lang/forest-compiler) where they use one of the text projections as the storage format. That might work, but it seems to me that the way parsing currently happens, there’s a lot of unnecessary work as whole files are constantly being reparsed because there is no structure to determine the relevant scope. It seems that controlling operations on the AST and knowing which branches are affected could be a lot more efficient. I’m sure there’s plenty of literature of this - I’ll have to look for it (and maybe I’m wrong about this).

                                                                    What I’m concerned about is the idea that it’s a good idea to store code in a proprietary binary file format that’s different for every language, where you can’t use the same tools with multiple languages. And then having to reimplement the same basic functionality for every single language in separate IDEs for each, where everything works slightly differently.

                                                                    I understand your concern, but this sounds exactly like the current state of affairs (other than really basic stuff like syntax highlighting maybe). There’s a separate language plugin (or plugins) for every combination of editor/IDE and language, and people keep rewriting all that stuff every time a new editor becomes popular, don’t they?

                                                                    One of the nice things about git is that it stores snapshots internally rather than diffs.

                                                                    Sure, we can glean a bit more information from a pair of snapshots, but still not much. It’s still impossible to track a combination of “rename + change definition”, or to treat changes in the order of definitions as a no-op, for example. Whereas if we were tracking changes in a more structured way (node renamed, sub-nodes modified etc.), it seems like we could say a lot more meaningful things about the evolution of the tree.

                                                                    Thank god for graphviz, eh?

                                                                    Perhaps the analogy was unclear. Being able to write a set of instructions to generate an image with a piece of software has nothing to do with having identical storage format and visual representation. If we approached images the same way we approach code, we would only have ASCII images as the output format, because that’s what is directly editable with text tools. Since you see the merits of PNG and SVG, you’re agreeing that there’s merit in separating internal/storage representation from the output representation.

                                                                    1. 1

                                                                      What I’m concerned about is the idea that it’s a good idea to store code in a proprietary binary file format that’s different for every language

                                                                      I might have missed something, but I didn’t see anyone proposing this.

                                                                      In particular, my understanding of Luna is that the graphical and textual representations are actually isomorphic (i.e. one can be derived if given the other). This means we can think of the textual representation as the being both a traditional text-based programming language and as a “file format” for serialising the graphical programming language.

                                                                      Likewise we can switch to a text view, use grep/sed/etc. as much as we like, then switch back to a graphical view if we want (assuming that the resulting text is syntactically valid).

                                                                3. 1

                                                                  Tools that improve navigation within textual source have existed for a long time. I’ve been using cscope to bounce around in C and Javascript source bases for as long as I can remember. The more static structure a language has, the easier it is to build these tools without ambiguity. The text source part isn’t really an issue – indeed it enables ad hoc tooling experiments to be built with existing text management tools; e.g., grep.

                                                                  1. 4

                                                                    Those tools aren’t text, though. They’re other things the augment the experience over just using text which becomes an incidental form of storage. Tools might also use AST’s, objects, data flows, constraints, and so on. They might use anything from direct representation to templates to synthesis.

                                                                    I think the parent’s point was just text by itself is far more limited than that. Each thing I mentioned is available in some programming environment with an advantage over text-driven development.

                                                                    1. 1

                                                                      I think it’s wrong to say that the text storage is incidental. Line-oriented text files are about the lowest common denominator way we have to store data like this.

                                                                      For starters, it’s effectively human-readable – you can lift the hood up and look at what’s underneath, understanding the effect that each individual character has on the result. Any more complicated structure, as would be generally required to have a more machine-first structured approach to program storage, is not going to have that property; at least not to the same extent.

                                                                      If this thread demonstrates anything, it’s that we all have (at times, starkly!) different preferences for software engineering tools. Falling back on a textual representation allows us to avoid the need to seek consensus on a standard set of tools – I can use the editor and code manipulation tools that make sense to me, and you can stick to what makes sense to you. I think a lot of the UNIX philosophy posturing ends up being revisionist bunk, but the idea that text is a pretty universal interface for data interchange isn’t completely without merit.

                                                                      1. 6

                                                                        The under-the-hood representation is binary-structured electricity that gets turned into human-readable text by parsing and display code. If already parsing it and writing display code, then one might just as well use a different encoding or structure. Text certainly has advantages as one encoding of many to have available. Plugins or input modules can take care of any conversions.

                                                                        Text does often have tooling advantages in systems like UNIX built with it in mind, though.

                                                                        1. 1

                                                                          I think it’s a reductionist argument for the good-enough, hard earned status quo. I think it can be valid, but only within a very narrow perspective - operational and short term.

                                                                          To my mind, your position is equivalent to this: we should only have ASCII images, and we don’t need any of that PNG/JPG/PSD stuff with complicated specialised tools. Instead, we can use generic text tools to make CAD drawings, diagrams, paintings - whatever. All of those things can be perfectly represented in ASCII, and the text tools will not limit us in any way!

                                                                      2. 2

                                                                        I want to search my code like a database, e.g. “show my where this identifier is used as a parameter to a function” - the tooling for text doesn’t support this. Structured tooling would be super useful.

                                                                        1. 2

                                                                          Many things can be “queried” with grep and regular expressions. Which is also great to find “similar occurrences” that need to be checked but are only related by some operators and function calls following another. But on the other hand I’d definitely argue that IDEs at least have a tiny representation of the current source file for navigation or something and that you can click some token and find its uses, definitions, implementations … But it only works if I disable the low power mode. And with my 8Gb RAM MacBook I sometimes have to kill the IDE before running the program to make sure I can still use it at the same time.

                                                                          1. 7

                                                                            Maybe if it wasn’t parsing and re-parsing massive amounts of text all the time, it would be more energy efficient…

                                                                          2. 1

                                                                            Exactly. And it could extend beyond search; code could be manipulated and organised in more powerful ways. We still have rudimentary support for refactoring in most IDEs, and so we keep going through files and manually making structurally similar changes one by one, for no reason other than the inadequate underlying representation used for code.

                                                                            I could be wrong and maybe this is impossible to implement in any kind of general way beyond the few specific examples I’ve thought of, but I find it strange that most people dismiss the very possibility of anything better despite the fact that it’s obviously difficult and inconvenient to work with textual source code.

                                                                            1. 1

                                                                              The version of cscope that I use does things of that nature. The list of queries it supports:

                                                                              Find this C symbol:
                                                                              Find this global definition:
                                                                              Find functions called by this function:
                                                                              Find functions calling this function:
                                                                              Find this text string:
                                                                              Change this text string:
                                                                              Find this egrep pattern:
                                                                              Find this file:
                                                                              Find files #including this file:
                                                                              Find assignments to this symbol:
                                                                              

                                                                              I use Find functions calling this function a lot, as well as Find assignments to this symbol. You could conceivably add more query types, and I’m certain there are other tools that are less to my admittedly terminal-heavy aesthetic preference that offer more flexible code search and analysis.

                                                                              The base structure of the software being textual doesn’t get in the way of this at all.

                                                                              1. 3

                                                                                Software isn’t textual. We read the text into structures. Our tools should make these structures easier to work with. We need data structures other than text as the common format.

                                                                                Can I take cscope’s output and filter down to “arguments where the identifiers are of even length”?

                                                                                1. 5

                                                                                  Compilers and interpreters use structured representations because those representations are more practical for the purposes of compiling and interpreting. It’s not a given that structured data is the most practical form for authoring. It might be. But what the compiler/interpreter does is not evidence of that.

                                                                                  1. 1

                                                                                    Those representations are more practical for searching and manipulating. Try it!

                                                                                  2. 1

                                                                                    I would also be interested on your thoughts about Lisp where the code is already structured data. This is an interesting property of Lisp but it does not seem to make it clearly easier to use.

                                                                                    1. 2

                                                                                      but it does not seem to make it clearly easier to use.

                                                                                      Sure it does: makes macros easier to write than a language not designed like that. Once macros are easy, you can extend the language to more easily express yourself. This is seen in the DSL’s of Common LISP, Rebol, and Racket. I also always mention sklogic’s tool since he DSL’s about everything with a LISP underneath for when they don’t work.

                                                                              2. 2

                                                                                Sure, but all of these tools (including IDEs) are complicated to implement, error-prone, and extremely underpowered. cscope is just a glorified grep unless I’m missing something (I haven’t used it, just looked it up). The fact that you bring it up as a good example attests to the fact that we’re still stuck somewhere near mid-twentieth century in terms of programming UI.

                                                                                1. 4

                                                                                  I bring it up as a good example because I use it all the time to great effect while working on large scale software projects. It is relatively simple to understand what it does, it’s been relatively reliable in my experience, and it helps a lot in understanding the code I work on. I’ve also tried exuberant ctags on occasion, and it’s been pretty neat as well.

                                                                                  I don’t feel stuck at all. In fact, I feel wary of people attempting to invalidate positive real world experiences with assertions that merely because something has been around for a long time that it’s not still a useful way to work.

                                                                            2. 2

                                                                              Have you noted, that the Luna language has dual representation? Where each visual program has an immediate and easily editable text representation, and the same is true in the other direction as well? This is intended to be able to keep the benefits of the text interface, while adding the benefits of a visual representation! That’s actually the main idea behind Luna.

                                                                              1. 1

                                                                                What about the power users who use things like Excel or Salesforce? These are GUIs perfectly tailored to specific tasks. A DJ working with a sound board certainly wouldn’t want a textual interface.

                                                                                Textual interfaces are bad, but they are generic and easy to write. It’s a lot harder to make an intuitive GUI, let alone one that works on something as complex as a programming language. Idk if Luna is worthwhile, but text isn’t the best user interface possible imho

                                                                                1. 3

                                                                                  DJs use physical interfaces, and the GUIs emulation of those physical interfaces are basically all terrible.

                                                                                  I’ve never heard of anyone liking Salesforce, I think that must be Stockholm Syndrome. Excel’s primary problem in my opinion is that it has essentially no way of seeing how data is flowing around. If something had the kind of ‘reactive’ nature of Excel while being text-based I’d much prefer that.

                                                                                  Textual interfaces are excellent. While there are tasks that benefit from a GUI - image editing for example - in most cases GUIs are a nicer way of representing things to a new user but are bad for power users. I wouldn’t expect first year computer science students to use vim, as it’s not beginner-friendly, but it’s by far the best text editor out there in the hands of an experienced user.

                                                                                  1. 2

                                                                                    I wouldn’t expect first year computer science students to use vim, as it’s not beginner-friendly, but it’s by far the best text editor out there in the hands of an experienced user.

                                                                                    I’d call myself an “experienced user” of vim. I’ve written extensions, given workshops, and even written a language autoindent plugin, which anyone who’s done it knows is like shoving nails through your eyeballs. About once a year I get fed up with the limitations of text-only programming and try to find a good visual IDE, only to switch back when I can’t find any. Just because vim is the best we currently have doesn’t mean it’s actually any good. We deserve better.

                                                                                    (For the record, vim isn’t beginner-unfriendly because it’s text only. It’s beginner-unfriendly because it’s UI is terrible and inconsistent and the features are all undiscoverable.)

                                                                                    1. 2

                                                                                      Most people don’t bother to learn vimscript properly, treating it much like people treated Javascript for years: a bunch of disparate bits they’ve picked up over time, with no unifying core. But once you actually learn it, it becomes much easier to use and more consistent. The difference between expressions and commands becomes sensible instead of seeming like an inconsistency.

                                                                                      I never get fed up with the limitations of text-only programming, because I don’t think they exist. Could you elaborate on what you are saying those limitations are?

                                                                                      And I totally, 100% disagree with any claim that vim’s UI is bad or inconsistent. On the contrary, it’s extremely consistent. It’s not a bunch of little individual inconsistent commands, it’s motions and text objects and such. It has extensive and well-written help. Compared to any other IDE I’ve used (a lot), it’s way more consistent. Every time I use a Mac program I’m surprised at how ad-hoc the random combinations of letters for shortcuts are. And everything requires modifier keys, which are written with ridiculous indecipherable symbols instead of ‘Ctrl’ ‘Shift’ ‘Alt’ etc. Given that Mac is generally considered to be very easy to use, I don’t think typical general consensus on ease of use is very instructive.

                                                                              2. 3

                                                                                Bret Victor explains the persistence of textual languages as resistance to change, drawing an equivalence between users of textual languages now and assembly programmers who scoffed at the first higher-level programming languages. But this thread is evidence that at least some people are interested in using a language that isn’t text-based. Not everyone is fairly characterized by Bret Victor’s generalization. So then why hasn’t that alternative emerged? There are plenty of niche languages that address a minority preference with reasonable rates of adoption. With the exception of Hypercard, I can’t think of viable graphical programming language. Even Realtalk, the language that runs Dynamicland (Bret Victor’s current focus), is text-based, being a superset of Lua. I keep hearing about how text-based languages are old-fashioned and should die out, but I never hear anything insightful about why this hasn’t happened naturally. I’m not denying that there are opportunities for big innovation but “make a visual programming language” seems like an increasingly naive or simplistic approach.

                                                                                1. 4

                                                                                  I think it has to do with the malleability of text. There’s a basic set of symbols and one way to arrange them (sequentially.) Almost any problem can be encoded that way. Emacs’ excellent org-mode is a testament to the virtue of malleability.

                                                                                  Excel also has that characteristic. Many, many kind of problems can be encoded in rectangles of text with formulas. (Though I might note that having more ways to arrange things allows new kinds of errors, as evidenced by the growing cluster of Excel features for tracing dependencies & finding errors.)

                                                                                  Graphical languages are way less malleable. The language creator decides what elements, relations, and constraints are allowed. None of them let me redefine what a rectangle represents, or what relations are allowed between them. I think that’s why these languages can be great at solving one class of problem, but a different class of problem seems to require a totally different graphical language.

                                                                                  1. 1

                                                                                    My suspicion is that it’s because graphical languages merge functionality and aesthetics, meaning you have to think very, VERY hard about UI/UX and graphic design. You need to be doing that from the start to have a hope of it working out.

                                                                                1. 16

                                                                                  Fuck, it’s Friday?

                                                                                  1. 11

                                                                                    Nope, I’m midway through Saturday already! (I live in New Zealand.)

                                                                                  1. 2

                                                                                    This is interesting, but another 20 years of software development continues to prove him wrong.

                                                                                    The current dominant paradigm is flat, single-ordered lists, and search (perhaps augmented with tags like our dear lobste.rs here).

                                                                                    This is even more of all the bad stuff he’s railing against at the start of the article, but this is the stuff that works and there are innumerable other approaches dead or dying.

                                                                                    It suspect that for UI’s less freedom is simpler (one button, one list, one query, one purpose, etc.) and not the other way around.


                                                                                    For developers, I think he was right, and it’s also what we’ve got today. It’s clearly preferable for developers to have a simple model to work against (Like URIs + JSON).

                                                                                    apt-get install firefox (Which unpacks to a resource identifier and a standardized, machine-readable package file) is quite probably as good as it gets. It’s a directed graph instead of an undirected graph like his zipper system, but undirected graphs require an unrealistic (and in my opinion probably harmful) amount of federation between producers of API’s and their consumers.

                                                                                    1. 7

                                                                                      When the pitch is “good computing is possible”, “bad computing has dominated” isn’t actually a great counterargument – particularly when the history of so much of it comes down to dumb luck, path dependence, tradeoffs between technical ability & marketing skills, and increasingly fast turnover and the dominance of increasingly inexperienced devs in the industry.

                                                                                      If you’re trying to suggest that the way things shook out is actually ideal for users – I don’t know how to even start arguing against that. If you’re suggesting that it’s inevitable, then I can’t share that kind of cynicism because it would kill me.

                                                                                      A better world is possible but nobody ever said it would be easy.

                                                                                      1. 4

                                                                                        Your comment is such a good expression of how I feel about the status quo! I was just having a similar discussion in another thread about source code, where I said “text is hugely limiting for working with source code”, and somebody objected with “but look at this grep-like tool, it’s totally enough for me”. I can understand when people raise practical objections to better tools (hard to get traction, hard to interface with existing systems etc.). What’s dispiriting is the refusal to even admit that better tools are possible.

                                                                                        1. 2

                                                                                          The mistake is believing that we’re anywhere close to status quo in software development. The tools and techniques used today are completely different from the tools we used 5 and 10 years ago, and are almost unrecognizable next to the tools and techniques used 40 and 50 years ago.

                                                                                          Some stuff sticks around, (keyboards are fast!) but other things change and there is loads of innovative stuff going on all the time. With reference to visual programming: I recently spent a weekend playing with the Unreal 4 SDK’s block programming language (they call it blueprints) it has fairly seamless C++ integration and I was surprised with how nice it was for certain operations… You might also be interested in Scratch.

                                                                                          Often, these systems are out there, already existing. Sometimes they’re not in the mainstream because of institutional momentum, but more often they’re not in the mainstream because they’re not good (the implementations or the ideas themselves).

                                                                                          The proof of the pudding is in the eating.

                                                                                          1. 4

                                                                                            I don’t think I can agree with this. I’m pretty sure the “write code-compile-run” approach to writing code that is still in incredibly widespread use is over 40 years old. Smalltalk was developed in the 70s. Emacs was developed in the 70s. Turbo Pascal, which had an integrated compiler and editor, was released in mid-80s (more than 30 years ago). CVS was developed in mid-80s (more than 30 years ago). Borland Delphi and Microsoft Visual Studio, which were pretty much full-fledged IDEs, were released in the 90s (20 years ago). I could go on.

                                                                                            What do we have now that’s qualitatively different from 20 years ago?

                                                                                            1. 3

                                                                                              Yup. Some very shallow things have changed but the big ideas in computing really all date to the 70s (and even the ‘radical’ ideas from the 70s still seem radical). I blame the churn: half of the industry has less than 10 years of experience, and degree programs don’t emphasize an in-depth understanding of the variety of ideas (focusing instead on the ‘royal road’ between Turing’s UTM paper and Java, while avoiding important but complicated side-quests into domains like computability).

                                                                                              Somebody graduating with a CS degree today can be forgiven for thinking that the web is hypertext, because they didn’t really receive an education about it. Likewise, they can be forgiven for thinking (for example) that inheritance is a great way to do code reuse in large java codebases – because they were taught this, despite the fact that everybody knows it isn’t true. And, because more than half their coworkers got fundamentally the same curriculum, they can stay blissfully unaware of all the possible (and actually existing) alternatives – and think that what they work with is anywhere from “all there is” to “the best possible system”.

                                                                                              1. 1

                                                                                                I got your book of essays - interested in your thinking on these topics.

                                                                                                1. 1

                                                                                                  Thanks!

                                                                                                  There are more details in that, but I’m not sure whether or not they’ll be any more accessible than my explanation here.

                                                                                              2. 2
                                                                                                • Most languages aren’t AOT compiled, there’s usually a JIT in place (if even that, Ruby and python are run-time languages through and through). These languages did not exist 20 years ago, though their ancestors did (and died, and had some of the good bits resurrected, I use Clojure regularly, which is both modern and a throwback).

                                                                                                • Automated testing is very much the norm today, it was a fringe idea 10 years ago and something that you were only crazy enough to do if you were building rockets or missiles or something.

                                                                                                • Packages and entire machines are regularly downloaded from the internet and executed in production. I had someone tell me that a docker image was the best way to distribute and run a desktop Linux application.

                                                                                                • Smartphones, and the old-as-new challenges of working around vendors locking them down.

                                                                                                • The year of the Linux desktop surely came sometime in the last or next 20 years.

                                                                                                • Near dominance of Linux in the cloud.

                                                                                                • Cloud computing and the tooling around it.

                                                                                                • The browser wars ended, though they started to heat up before the 20 year cutoff.

                                                                                                • The last days of Moore’s law and the 10 years it took most of the industry to realize the party was over.

                                                                                                • CUDA, related, the almost unbelievable advances in computer graphics. (Which we aren’t seeing in web/UI design, again, probably not for lack of trying, but maybe the right design hasn’t been struck)

                                                                                                • Success with Neural Networks on some problem sets and their fledgling integration into other parts of the stack. Wondering when or if I’ll see a NN based linter I can drop into Emacs.


                                                                                                I could go on too, QWERTY keyboards have been around 150 years because it’s good enough and the alternatives aren’t better then having one standard. I don’t think that the fact that my computer has a QWERTY keyboard on it is an aberration or failure, and not for lack of experimentation on my own part and on the parts of others. Now if only we could do something about that caps lock key… Oh wait, I remapped it.


                                                                                                It’s easy to pick up on the greatest hits in computer science, 20, 30, and 40 years ago. There’s a ton of survivorship bias and you don’t point to all of those COBOL-alikes and stack-based languages which have all but vanished from the industry. If it seems like there’s no progress today, it’s only because it’s more difficult to pick the winners without the benefit of hindsight. There might be some innovation still buried that makes two way linking better then one way linking, but I don’t know what it is and my opinion is that it doesn’t exist.

                                                                                                1. 3

                                                                                                  Fair enough. Let me clarify my comment, which was narrowly focused on developer tools for no good reason.

                                                                                                  There is no question that there have been massive advances in hardware, but I think the software is a lot more hit and miss.

                                                                                                  In terms of advances on the software front, I would point to distributed storage in addition to cloud computing and machine learning. For end users, navigation and maps are finally really good too. There are probably hundreds of other specific examples like incredible technology for animated films.

                                                                                                  I think my complaints are to do with the fact that most of the effort in the last 20 years seems to have been directed to reimplementing mainframes on top of the web. In many ways, there is churn without innovation. I do not see much change in software development either, as I mentioned in the previous comment (I don’t think automated testing counts), and it’s what I spend most of my time on so there’s an availability bias to my complaints. There is also very little progress in tools for information management and, for lack of a better word, “end user computing” (again, spreadsheets are very old news).

                                                                                                  I think my perception is additionally coloured by the fact that we ended up with both smartphones and the web as channels for addictive consumption and advertising industry surveillance. It often feels like one step forward and ten back.

                                                                                                  I hope this comment provides a more balanced perspective.

                                                                                          2. 2

                                                                                            In the last 20 years, the ideas in that paper have been attempted a lot, by a lot of people.

                                                                                            Opensource and the internet have given a ton of ideas a fair shake, including these ideas. Stuff is getting better (not worse). The two way links thing is crummy, and you don’t have to take my word for it, you can go engage with any of the dozens of systems implementing it (including several by the author of that paper) and form your own opinions.

                                                                                            1. 4

                                                                                              In the last 20 years, the ideas in that paper have been attempted a lot, by a lot of people.

                                                                                              Dozens of people, and I’ve met or worked with approximately half of them. Post-web, the hypertext community is tiny. I can describe at length the problems preventing these implementations from becoming commercially successful, but none of them are that the underlying ideas are difficult or impractical.

                                                                                              The two way links thing is crummy, and you don’t have to take my word for it, you can go engage with any of the dozens of systems implementing it (including several by the author of that paper) and form your own opinions.

                                                                                              I wrote some of those systems, while working under the author of that paper. That’s how I formed my opinions.

                                                                                              1. 1

                                                                                                That’s awesome. Maybe you can change my mind!

                                                                                                Directed graphs are more general then undirected graphs (You can implement two-way undirected graphs out of one way arrows, you can’t go the other way around). Almost every level of the stack from the tippy top of the application layer to the deepest depths of CPU caching and branch prediction is implemented in terms of one-way arrows and abstractions, I find it difficult to believe that this is a mistake.


                                                                                                EDIT: I realized that ‘general’ in this case has a different meaning for a software developer then it does in mathematics and here I was using the software-developers perspective of “can be readily implemented using”. Mathematically, something is more general when it can be described with fewer terms or axioms. Undirected graphs are more maths general because you have to add arrowheads to an undirected graph to make a directed graph, but for the software developer it feels more obvious that you could get a “bidirected” graph by adding a backwards arrow to each forwards arrow. The implementation of a directed graph from an undirected graph is difficult for a software developer because you have to figure out which way each arrow is supposed to go.

                                                                                                1. 1

                                                                                                  Bidirectional links are not undirected edges. The difference is not that direction is unknown – it’s that the edge is visible whichever side of the node you’re on.

                                                                                                  (This is only hard on the web because HTML decided against linkbases in favor of embedded representations that must be mined by a third party in order to reverse them – which makes jump links a little bit easier to initially implement but screws over other forms of linking. The issue, essentially, is that with a naive host-centric way of performing jump links, no portion of the graph is actually known without mining.

                                                                                                  Linkbases are literally the connection graph, and links are constructed from linkbases. In the XanaSpace/XanaduSpace model, you’ve got a bunch of arbitrary linkbases representing arbitrary subgraphts that are ‘resident’ – created by whoever and distributed however – and when a node intersects with one of the resident links, the connection is displayed and made navigable.

                                                                                                  Also in this model a link might actually be a node in itself where it has multiple points on either side, or it might have zero end points on one side, but that’s a generalization & not necessarily interesting since it’s equivalent to all combinations of either end’s endsets.)

                                                                                                  TL;DR: bidirectional links are not undirected links – merely links understood above the level of the contents of a single node.

                                                                                                  1. 1

                                                                                                    Ok then, and how is it that you construct a graph out of a set of subgraphs? Is that construction also two way links thereby assuring that every participant constructs the same graph?

                                                                                                    1. 1

                                                                                                      Participants are not guaranteed to construct the same graph, and the graphs aren’t guaranteed to even be fully connected. (The only difference between bidirectional links & jump links is that you can see both points.)

                                                                                                      Instead, you get whatever collection of connected subgraphs are navigable from the linkbases you have resident (which are just lists of directed edges).

                                                                                                      This particular kind of graph-theory analysis isn’t terribly meaningful for either the web or translit, since it’s the technical detail of how much work you have to do to get a link graph that differs, not the kind of graph itself. (Graph theory is useful for talking about ZigZag, but ZigZag is basically unrelated to translit / hypertext and is more like an everted tabular database.)

                                                                                                      1. 1

                                                                                                        I guess I’m trying to understand how this is better or different from what already exists. If it’s a curated list of one way links that you can search and discuss freely with others, then guess what, lobste.rs is your dream, the future is now, time to throw one back and celebrate.

                                                                                                        1. 1

                                                                                                          I’m trying to understand how this is better or different from what already exists

                                                                                                          Well, when the project started, none of what we have existed. This was the first attempt.

                                                                                                          If it’s a curated list of one way links that you can search and discuss freely with others, then guess what, lobste.rs is your dream, the future is now,

                                                                                                          ‘Link’ doesn’t actually mean ‘URL’ in this sense. A link is an edge between two nodes – each of these nodes being a collection of positions within a document. So, a linkbase isn’t anything like a collection of URLs, but it it’s a lot like a collection of pairs of URLs with an array of byte offsets & lengths affixed to each URL. (In fact, this is exactly what it is in the XanaSpace ODL model.) A URL by itself is only capable of creating a jump link, not a bidirectional link.

                                                                                                          It’s not a matter of commenting on a URL, but of creating sharable lists of connections between sections of already-existing content. That’s the point of linking: that you can indicate a connection between two existing things without coordinating with any authors or owners.

                                                                                                          URL-sharing sites like lobste.rs provide one quarter of that function: by coordinating with one site, you can share a URL to another site, but you don’t have control over either side beyond the level of an entire document (or, if you’re very lucky and the author put useful anchors, you can point to the beginning of a section on only the target side of the link).

                                                                                                          1. 1

                                                                                                            To take an example of a system which steps in the middle and does take greater control over both ends, Google’s AMP. I feel like it is one of the worse things anyone has ever tried to do to the internet in it’s entire existence.

                                                                                                            Control oriented systems like AMP and to a lesser degree sharing sites like Imgur, Pinterest, Facebook, and soon (probably) Medium, represent existential threats to forums like lobste.rs.

                                                                                                            So, in short, you’re really not selling me on why this two way links thing is better.

                                                                                                            1. 2

                                                                                                              We actually don’t have centralization like that in the system. (We sort of did in XU88 and XU92 but that stopped in the mid-80s.)

                                                                                                              It’s not about controlling the ends. The edges are not part of the ends, and therefore the edges can be distributed and handled without permission from the ends.

                                                                                                              Links are not part of a document. Links are an association between sections of documents. Therefore, it doesn’t make any sense to embed them in a document (and then require a big organization like Google to extract them and sell them back to you). Instead, people create connections between existing things & share them.

                                                                                                              I’m having a hard time understanding what your understanding of bidirectional linking is, so let me get down to brass tacks & implementation details:

                                                                                                              A link is a pair of spanpointers. A spanpointer is a document address, a byte offset from the beginning of the document, and a span length. Anyone can make one of these between any two things so long as you have the addresses. This doesn’t require control of either endpoint. It doesn’t require any third party to control anything either. I can write a link on a piece of paper and give it to you, and you can make the same link on your own computer, without any bits being transferred between our machines.

                                                                                                              We do not host the links. We do not host the endpoints. We don’t host anything. We let you see connections between documents.

                                                                                                              Seeing connections between documents manifests in two ways:

                                                                                                              1. transpointing windows – we draw a line between the sections that are linked together, and maybe color them the same color as the line
                                                                                                              2. bidirectional navigation – since you can see the link from either side, you can go left instead of going right

                                                                                                              It’s not about control, or centralization. Documents aren’t aware of their links.

                                                                                                              The only requirement for bidirectional linking is that an address points to the same document forever. (This is a solved problem: ignore hosts & use content addressing, like IPFS.)

                                                                                                              1. 1

                                                                                                                Wow, thank you for taking the time to walk me through these ideas. I think I’m starting to understand a little better.

                                                                                                                I still think we’ve got this, or could implement it on the existing web stack. I think any user could implement zig-zag links in a hierarchal windows-style file structure since ’98 if not ‘95. I think it’s informative that most users do not construct those links, who knows how many of us have tried it in the name of getting organized.

                                                                                                                I really believe that any interface more complex then a single item is too complex, and if you absolutely must you can usually present a list without distracting from a UI too badly. I think a minimalist and relatively focused UI is what allows this website to thrive and us to have this discussion.

                                                                                                                I’m going to be thinking over this a lot more. A system like git stores the differences between documents instead of the documents themselves, so clearly there are places for other ways of relating documents to each other then what we’ve got, which work!

                                                                                                                1. 3

                                                                                                                  I should clarify: I’ve been describing bidirectional links in translit (aka hypertext or transliterature). ZigZag is actually a totally different (incompatible) system. The only similarity is that they’re both interactive methods of looking at associations between data invented by Ted Nelson.

                                                                                                                  If we want to compare to existing stacks, transliterature is a kind of whole-document authoring and annotation thing like Word, while ZigZag is a personal database like Access – though in both cases the assumptions have been turned inside-out.

                                                                                                                  You’re right that these things, once they’re understood, aren’t very difficult to implement. (I implemented open source versions of core data structures after leaving the project, specifically as demonstrations of this.)

                                                                                                                  I really believe that any interface more complex then a single item is too complex, and if you absolutely must you can usually present a list without distracting from a UI too badly. I think a minimalist and relatively focused UI is what allows this website to thrive and us to have this discussion.

                                                                                                                  Depending on how you chunk, a site like this has a whole host of items. I see a lot of characters, for instance. I see multiple buttons, and multiple jump links. We’ve sort of gotten used to a particular way of working with the web, so its inherent complexity is forgotten.

                                                                                                                  thank you for taking the time to walk me through these ideas. I think I’m starting to understand a little better.

                                                                                                                  No problem! I feel like it’s my duty to explain Xanadu ideas because they’re explained so poorly elsewhere. I spent years trying to fully understand them from public documentation before I joined the project and got direct feedback, and I want to make it easier for other people to learn it than it was for me.

                                                                                            2. 1

                                                                                              I wouldn’t say so. What you have is more and more people are using the same tools, therefore you will never get a “perfect” solution. Generally, nature doesn’t provide a perfect system but “good enough to survive”. My partner and I are getting a child at the moment, and the times the doctor told us: “This is not perfect, but nature doesn’t care about that. It just cares about good enough to get the job done”.

                                                                                              After I’ve heard this statement, I see it everywhere. Also with computers. Code and how we work run a huge chunk of important systems, and somehow they work. Maybe they work because they are not perfect.

                                                                                              I agree that things will change (“for the better”), but it will come in phases. We will have a bigger catastrophic thing happening and afterwards systems and tools will change and adapt. As long everything sort of works, well, there is no big reason to change it (for the majority of people) since they can get the job done and then enjoy the sun, beaches and human interactions.

                                                                                              1. 1

                                                                                                Nobody’s complaining that we don’t have perfection here. We’re complaining about the remarkable absence of not-awful in projects by people who should know better.

                                                                                            3. 3

                                                                                              I think the best way to describe what we have is “Design by Pop Culture”. Our socio-economic system is a low pass filter, distilling ideas until you can package them and sell them. Is it the best we got given those economic constraints? maybe…

                                                                                              But that’s like saying “Look, this is the best way to produce cotton, it’s the best we got” during the slave era…(slavery being a different socio-economic system)

                                                                                            1. 2

                                                                                              I mostly write about Elm at the moment but really I post about whatever happens to be my primary area of interest at the time: https://korban.net/posts/

                                                                                              1. 3

                                                                                                I’ve just finished Infomocracy by Malka Older. It was entertaining as “political intrigue + gadgets” but really lacking in terms of scientific plausibility, character development and other kinds of depth, so it didn’t live up to the recommendations I’ve seen for it. But then, I have a strong preference for hard sci-fi so it’s not totally unexpected.

                                                                                                Before that, I read The Arrows of Time by Greg Egan, the last book in his Orthogonal theory. That was fascinating, like all of his books I’ve read, and takes place in a universe with different physics. Egan also wrote a ~250 page primer on those physics. It blows my mind that somebody can take literary research to such levels.

                                                                                                Now I’m back to Thinking, Fast and Slow by Daniel Kahneman. I keep stepping away from it because it’s just so uncomfortable to see how deeply irrational we are. Lots to think about.

                                                                                                1. 1

                                                                                                  The Orthogonal trilogy is a great introduction to General Relativity.

                                                                                                1. 12

                                                                                                  A realization I recently had:

                                                                                                  Why don’t we abstract away all display affordances from a piece of code’s position in a file? That is, the editor reads the file, parses its AST, and displays it according to the programmer’s preference (e.g., elastic tabstops, elm-like comma-leading lists, newline/no-newline before opening braces, etc). And prior to save, the editor simply runs it through an uncustomized prettier first.

                                                                                                  There are a million and one ways to view XML data without actually reading/writing pure XML. Why not do that with code as well?

                                                                                                  1. 4

                                                                                                    This idea is floating around the interwebz for a long time. I recall it being stated almost verbatim on Reddit, HN, probably on /.

                                                                                                    1. 6

                                                                                                      And once you take it a step further, it’s clear that it shouldn’t be in a text file in the first place. Code just isn’t text. If you store it as a tree or a graph in some sort of database, it becomes possible to interact with it in much more powerful ways (including displaying it any way you like). We’ve been hobbled by equating display representation with storage format.

                                                                                                      1. 7

                                                                                                        This talk touches on this issue, along with some related ones and HCI in general: Bret Victor: The Future of Programming

                                                                                                        1. 2

                                                                                                          God, I have been trying to recall the name of this talk for ages! Thank you so much, it is a great recommendation

                                                                                                        2. 5

                                                                                                          Text is great when (not if) your more complicated tools fail or do something you can’t tolerate and you need to use tools which don’t Respect The Intent of designers who, for whatever reason, don’t respect your intent or workflow. Sometimes, solving a problem means working around a breakage, whether or not that breakage is intentional on someone else’s part.

                                                                                                          Besides, we just (like, last fifteen or so years) got text to the point where it’s largely compatible. Would be a shame to throw that away in favor of some new AST-database-thing which only exists on a few platforms.

                                                                                                          1. 1

                                                                                                            I’m not sure I get your point about about intent. Isn’t the same already true of, say, compilers? There are compiler bugs that we have to work around, there are programs that seem logical to us but the compiler won’t accept, and so on. Still, everybody seems to be mostly happy to file a compiler bug or a feature request, and live with a workaround for the present. Seems like it works well enough in practice.

                                                                                                            I understand your concern about introducing a new format but it sounds like a case of worse-is-better. Sure, we get a lot of convenience from the ubiquity of text, but it would nevertheless be sad if we were stuck with it for the next two centuries.

                                                                                                            1. 1

                                                                                                              With compilers, there are multiple of them for any given language, if the language is important enough, and you can feed the same source into all of them, assuming that source is text.

                                                                                                              1. 2

                                                                                                                I’ve never seen anyone casually swap out the compiler for production code. Also, for the longest time, if you wrote C++ for Windows, you pretty much had to use the Microsoft compiler. I’m sure that there are many embedded platforms with a single compiler.

                                                                                                                If there’s a bug in the compiler, in most casss you work around it, then patiently wait for a fix from the vendor.

                                                                                                                So that’s hardly a valid counterpoint.

                                                                                                                1. 1

                                                                                                                  Re: swapping out compiler for production code: most if not all cross-platform C++ libraries can be compiled on at least llvm, gcc and msvc.

                                                                                                                  1. 1

                                                                                                                    Yes, I’m aware of that, but what does it have to do with anything I said?

                                                                                                                    EDIT: Hey, I went to Canterbury :)

                                                                                                                    1. 1

                                                                                                                      “I’ve never seen anyone casually swap out the compiler for production code” sounded like you were saying people didn’t tend to compile the same production code on multiple compilers, which of course anyone that compiles on windows and non-windows does. Sorry if I misinterpreted your comment!

                                                                                                                      My first comment is in response to another Kiwi. Small world. Pretty cool.

                                                                                                          2. 1

                                                                                                            This, this, a thousand times this. Text is a good user-interface for code (for now). But it’s a terrible storage and interchange format. Every tool needs its own parser, and each one is slightly different, leaving begging the amount of cpu and programmer time we waste going from text<->ast<->text.

                                                                                                            1. 2

                                                                                                              Yeah, it’s obviously wasteful and limiting. Why do you think we are still stuck with text? Is it just sheer inertia and incrementalism, or does text really offer advantages that are challenging to recreate with other formats?

                                                                                                              1. 7

                                                                                                                The text editor I use can handle any computer language you can throw at it. It doesn’t matter if it’s BASIC, C, BCPL, C++, SQL, Prolog, Fortran 77, Pascal, x86 Assembler, Forth, Lisp, JavaScript, Java, Lua, Make, Hope, Go, Swift, Objective-C, Rexx, Ruby, XSLT, HTML, Perl, TCL, Clojure, 6502 Assembler, 68000 Assembler, COBOL, Coffee, Erlang, Haskell, Ocaml, ML, 6809 Assembler, PostScript, Scala, Brainfuck, or even Whitespace. [1]

                                                                                                                Meanwhile, the last time I tried an IDE (last year I think) it crashed hard on a simple C program I attempted to load into it. It was valid C code [2]. That just reinforced my notion that we aren’t anywhere close to getting away from text.

                                                                                                                [1] APL is an issue, but only because I can’t type the character set on my keyboard.

                                                                                                                [2] But NOT C++, which of course, everybody uses, right?

                                                                                                                1. 0

                                                                                                                  To your point about text editors working with any language, I think this is like arguing that the only tool required by a carpenter is a single large screwdriver: you can use it as a hammer, as a chisel, as a knife (if sharpened), as a wedge, as a nail puller, and so on. Just apply sufficient effort and ingenuity! Does that sound like an optimal solution?

                                                                                                                  My preference is for powerful specialised tools rather than a single thing that can be kind of sort of applied to a task.

                                                                                                                  Or, to approach from the opposite direction, would you say that a CAD application or Blender are bad tools because they only work with a limited number of formats? If only they also allowed you to edit JPEGs and PDFs, they would be so much better!

                                                                                                                  To your point about IDEs: I think that might even support my argument. Parsing of freeform text is apparently sufficiently hard that we’re still getting issues like the one you saw.

                                                                                                                  1. 9

                                                                                                                    I use other tools besides the text editor—I use version control, compilers, linkers, debuggers, and a whole litany of Unix tools (grep, sed, awk, sort, etc). The thing I want to point out is that as long as the source code is in ASCII (or UTF-8), I can edit it. I can study it. I might not be able to compile it (because I lack the INRAC compiler but I can still view the code). How does one “view” Smalltalk code when one doesn’t have Smalltalk? Or Visual Basic? Last I hear, Microsoft wasn’t giving out the format for Visual Basic programs (and good luck even finding the format for VB from the late 90s).

                                                                                                                    The other issue I have with IDEs (and I will come out and say I have a bias against the things because I’ve never had one that worked for me for any length of time without crashing, and I’ve tried quite a few over 30 years) is that you have one IDE for C++, and one for Java, and one for Pascal, and one for Assembly [1] and one for Lua and one for Python and man … that’s just too many damn environments to deal with [2]. Maybe there are IDEs now that can work with more than one language [3] but again, I’ve yet to find one that works.

                                                                                                                    I have nothing against specialized tools like AutoCAD or Blender or PhotoShop or even Deluxe Paint, as long as there is a way to extract the data when the tool (or the company) is no longer around. Photo Shop and Deluxe Paint work with defined formats that other tools can understand. I think Blender works with several formats, but I am not sure about AutoCAD (never having used it).

                                                                                                                    So, why hasn’t anyone stored and manipulated ASTs? I keep hearing cries that we should do it, but yet, no one has yet done it … I wonder if it’s harder than you even imagine …

                                                                                                                    Edited to add: Also, I’m a language maven, not a tool maven. It sounds like you are a tool maven. That colors our perspectives.

                                                                                                                    [1] Yes, I’ve come across several of those. Never understood the appeal …

                                                                                                                    [2] For work, I have to deal with C, C++, Lua, Make and Perl.

                                                                                                                    [3] Yeah, the last one that claimed C/C++ worked out so well for me.

                                                                                                                    1. 1

                                                                                                                      For your first concern about the long term accessibility of the code, you’ve already pointed out the solution: a defined open format.

                                                                                                                      Regarding IDEs: I’m not actually talking about IDEs; I’m talking about an editor that works with something other than text. Debugging, running the code, profiling etc. are different concerns and they can be handled separately (although again, the input would be something other than text). I suppose it would have some aspects of an IDE because you’d be manipulating the whole code base rather than individual files.

                                                                                                                      Regarding the language maven post: I enjoyed reading it a few years ago (and in practice, I’ve always ended up in the language camp as an early adopter). It was written 14 years ago, and I think the situation is different now. People have come to expect tooling, and it’s much easier to provide it in the form of editor/IDE plugins. Since language creators already have to do a huge amount of work to make programs in their languages executable in some form, I don’t think it would be an obstacle if the price of admission also included dealing with the storage format and representation.

                                                                                                                      To your point about lack of implementations: don’t Smalltalk and derivatives such as Pharo qualify? I don’t know if they store ASTs but at least they don’t store text. I think they demonstrate that it’s at least technically possible to get away from text, so the lack of mainstream adoption might be caused by non-technical reasons like being in a local maximum in terms of tools.

                                                                                                                      The problem, as always, is that there is such a huge number of tools already built around text that it’s very difficult to move to something else, even if the post-transition state of affairs would be much better.

                                                                                                                      1. 1

                                                                                                                        Text editors are language agnostic.

                                                                                                                        I’m trying to conceive of an “editor” that works with something other than text. Say an AST. Okay, but in Pascal, you have to declare variables at the top of each scope; you can declare variables anywhere in C++. In Lua, you can just use a variable, no declaration required. LISP, Lua and JavaScript allow anonymous functions; only the latest versions of C++ and Java allow anonymous functions, but they they’re restricted in that you can’t create closures, since C++ and Java have no concept of closures. C++ has exceptions, Java has two types of exceptions, C doesn’t; Lua kind of has exceptions but not really. An “AST editor” would have to somehow know that is and isn’t allowed per language, so if I’m editing C++ and write an anonymous function, I don’t reference variables outside the scope of said function, but that it can for Lua.

                                                                                                                        Okay, so we step away from AST—what other format do you see as being better than text?

                                                                                                                        1. 1

                                                                                                                          I don’t think it could be language agnostic - it would defeat the purpose as it wouldn’t be any more powerful than existing editors. However, I think it could offer largely the same UI, for similar languages at least.

                                                                                                                          1. 1

                                                                                                                            And that is my problem with it. As stated, I use C, C++ [1], Lua, Make and a bit of Perl. That’s at least what? Three different “editors” (C/C++, Lua/Perl (maybe), Make). No thank you, I’ll stick with a tool that can work with any language.

                                                                                                                            [1] Sparingly and where we have no choice; no one on my team actually enjoys it.

                                                                                                                          2. 1

                                                                                                                            Personally, I’m not saying you should need to give up your editor of choice. Text is a good (enough for now) UI for coding. But it’s a terrible format to build tools on. If the current state of the code lived in some sort of event-based graph database for example, your changes could trigger not only your incremental compiler, but source analysis (only on what’s new), it could also maintain a semantic changelog for version control, trigger code-generation (again, only what’s new).

                                                                                                                            There’s a million things that are currently “too hard” which would cease to be too hard if we had a live model of the code as various graphs (not just the ast, but call graphs, inheritance graphs, you-name-it) that we could subscribe to, or even write purely-functional consumers that are triggered only on changes.

                                                                                                                  2. 4

                                                                                                                    Inertia, arrogance, worse-is-better; Working systems being trapped behind closed doors at big companies; Hackers taking their language / editor / process on as part of their identity that needs to be defended with religious zeal; The complete destruction of dev tools as a viable business model; Methodologies-of-the-week…. The causes are numerous and varied, and the result is software dev is being hamstrung and we’re all wasting countless hours and dollars doing things computers should be doing for us.

                                                                                                                    1. 2

                                                                                                                      I think that part of the issue is that we haven’t seen good structured editor support outside of Haskell and some Lisps.

                                                                                                                      Having a principled foundation for structured editor + a critical mass by having it work for a language like Javascript/Ruby, would go a long way to making this concept more mainstream. After which we could say “provide a grammar for favorite language X and get structured editor support!”. This then becomes “everything is structured at all levels!”

                                                                                                                      1. 3

                                                                                                                        I think it’s possible that this only works for a subset of languages.

                                                                                                                        Structured editing is good in that it operates at a higher level than characters, but ultimately it’s still a text editing tool, isn’t it? For example, I think it should be trivial to pull up a list of (editable) definitions for all the functions in a project that call a given function, or to sort function and type definitions in different ways, or to substitute function calls in a function with the bodies of those functions to a given depth (as opposed to switching between different views to see what those functions do). I don’t think structured editing can help with tasks like that.

                                                                                                                        There are also ideas like Luna, have you seen it? I’m not convinced by the visual representation (it’s useful in some situations but I’m not sure it’s generally effective), but the interesting thing is they provide both a textual and a visual representation of the code.

                                                                                                                    2. 1

                                                                                                                      Python has a standard library module for parsing Python code into an AST and modifying the AST, but I don’t know of any Python tools that actually use it. I’m sure some of them do, though.

                                                                                                                    3. 1

                                                                                                                      Smalltalk. The word you’re looking for is Smalltalk. ;)

                                                                                                                      1. 2

                                                                                                                        Lisp, in fact. Smalltalk lives in an image, Lisp lives in the real world. ;)

                                                                                                                        Besides, Lisp already is the AST. Smalltalk has too much sugar, which is a pain in the AST.

                                                                                                                        1. 1

                                                                                                                          Possibly, but I’m only talking about a single aspect of it: being able to analyse and manipulate the code in more powerful ways than afforded by plain text. I think that’s equally possible for FP languages.

                                                                                                                      2. 1

                                                                                                                        Ultimately I think this is the only teneble solution. I feel I must be in the minority in having an extreme dislike of columnar-style code, and what I call “white space cliffs” where a column dictates a sudden huge increase in whitespace. But I realize how much it comes down to personal aesthetics, so I wish we could all just coexist :)

                                                                                                                        1. 1

                                                                                                                          Yeah, I’ve been messing around with similar ideas, see https://nick.zoic.org/art/waste-web-abstract-syntax-tree-editor/ although it’s only vapourware so far because things got busy …

                                                                                                                          1. 1

                                                                                                                            Many editors already do this to some extent. They just render 4-space tabs as whatever the user asks for. Everything after the indent, though, is assumed to be spaced appropriately (which seems right, anyway?)

                                                                                                                            1. 1

                                                                                                                              You can’t convert to elastic-tabstop style from that, and without heavy language-grammar knowledge you can’t do this for 4-space “tabs” generally.

                                                                                                                              Every editor ever supports this for traditional indent style, though: http://intellindent.info/seriously/

                                                                                                                              1. 1

                                                                                                                                To be clear, you can absolutely render a file that doesn’t have elastic tabstops as if it did. The way a file is rendered has nothing to do with the actual text in the file.

                                                                                                                                It’s like you’re suggesting that you can’t render a file containing a ton of numbers as a 3D scene in a game engine. That would be just wrong.

                                                                                                                                Regardless, my point is specifically that this elastic tabstops thing is not necessary and hurts code readability more than it helps.

                                                                                                                                The pefantics of clarifying between tabs and tabstops is a silly thing as well. Context gives more than enough information to know which one is being talked about.

                                                                                                                                It sounds like this concept is creating more problems than it solves, and is causing your editor to solve problems that only exist in the seveloper’s imagination. It’s not “KISS” at all, quite the opposite.

                                                                                                                            2. 1

                                                                                                                              Because presentation isn’t just a function of the AST. Indentation usually is, but alignment can be visually useful for all kinds of reasons.

                                                                                                                            1. 6

                                                                                                                              I prefer to hope that we will avoid worst case scenarios such as a complete breakdown of human civilisation, so I’m taking actions based on that assumption.

                                                                                                                              I’d be very pleased if I could apply my skills directly towards mitigating climate change. In all likelihood, we will need technologies for negative emissions, ie ways of sequestering carbon from the atmosphere. There isn’t a viable pathway to keeping warming under 2 degrees without it. Additionally, it appears that the energy storage required to even out the intermittent electricity generation from renewable sources is still an unsolved problem. As such, I’m keeping an eye out for opportunities to put my skills to use in those spaces. Also, since my country (New Zealand) is now planning legislation to reach net zero emissions by 2050, I’m also looking for opportunities around the changes that will be triggered as a result.

                                                                                                                              Aside from that, since I haven’t found a way to contribute more directly, I donate some of my earnings to organisations which are working towards systemic change that will drive emissions down (that includes legislative changes and things like divestment from fossil fuel companies that 350.org campaigns for).

                                                                                                                              1. 7

                                                                                                                                It looks like they haven’t even paid the previous fine and are still appealing: https://www.theverge.com/2017/9/11/16291482/google-alphabet-eu-fine-antitrust-appeal

                                                                                                                                I guess this one will go the same way? Even if their appeals are unsuccessful, these fines are probably not a big deal if they are able to drag these things out for years (ie cost per year wouldn’t be that high). By the time they have to pay and change their practices, they might have some other strategy in place.

                                                                                                                                This reminds me a lot of Microsoft of the 2000s.

                                                                                                                                1. 6

                                                                                                                                  I’m not sure if its a recent change but Google will have to pay the fine into a trust account if they want to appeal. either way they will have to pay now and if the win the appeal then they get it back ( without interest)


                                                                                                                                  posted from my phone

                                                                                                                                  1. 2

                                                                                                                                    That’s good to know. It might be a bit more convincing then.

                                                                                                                                    1. 2

                                                                                                                                      That’s great, apparently they did learn from Microsoft!

                                                                                                                                    2. 3

                                                                                                                                      There are five different investigations the EU is doing into Google. They are at different stages. The previous fine is being appealed now. https://imgur.com/6uLtQX5

                                                                                                                                      This chart comes from a WSJ article from the day of the fine announcement.

                                                                                                                                      1. 1

                                                                                                                                        They may be fined for every day of not complying. EU is effective: if there’s will to do so.

                                                                                                                                      1. 13

                                                                                                                                        Can someone explain to me how Apple gets away with a dictatorship on iOS without any lawsuits?

                                                                                                                                        • Apple controls the only app store allowed on iOS

                                                                                                                                        • Apple apps get access to features not available in third party apps

                                                                                                                                        • Third party apps aren’t allowed to compete with Apple apps in many instances and are banned from the store

                                                                                                                                        • All defaults are Apple apps, and in many cases can’t be changed to something else

                                                                                                                                        As a consumer I felt less restricted when I’ve been on Google’s platform than when I’ve been on Apple’s. I don’t have any horse in this race, I’m just curious how Apple has managed to avoid scrutiny. I’ve switched back and forth am currently using an iPhone 6S that I’ve had for over 3 years.

                                                                                                                                        1. 10

                                                                                                                                          This is not about Android, but about the Google Search monopoly. If you feel like it, read the announcement: it’s amazingly clear writing, a joy to read.

                                                                                                                                          Excerpt, emphasis added:

                                                                                                                                          The Commission decision concerns three specific types of contractual restrictions that Google has imposed on device manufacturers and mobile network operators. These have enabled Google to use Android as a vehicle to cement the dominance of its search engine. In other words, the Commission decision does not question the open source model or the Android operating system as such.

                                                                                                                                          1. 5

                                                                                                                                            There are a couple of obvious things:

                                                                                                                                            • the abuse in question is to do with Google search, Android is just a tool in this case
                                                                                                                                            • Apple has a relatively small market share, so presumably consumers have a choice of buying one of the many android phones.

                                                                                                                                            Aside from that, I suppose platform restrictions don’t get classified as monopolistic behaviour.

                                                                                                                                            1. 2

                                                                                                                                              Is it really just a marketshare thing? The iOS lockdown seems a lot more insidious than Microsoft’s IE bundling, for example. If it was iOS that had a 80%+ marketshare would Apple be the ones targeted?

                                                                                                                                              1. 7

                                                                                                                                                Not necessarily - it seems there are specific criteria for what constitutes abuse of a dominant market position. The issue that caused the fine is that Google is abusing its position in search:

                                                                                                                                                Google has used Android as a vehicle to cement the dominance of its search engine. These practices have denied rivals the chance to innovate and compete on the merits. They have denied European consumers the benefits of effective competition in the important mobile sphere. This is illegal under EU antitrust rules.

                                                                                                                                                In particular, Google:

                                                                                                                                                • has required manufacturers to pre-install the Google Search app and browser app (Chrome), as a condition for licensing Google’s app store (the Play Store);
                                                                                                                                                • made payments to certain large manufacturers and mobile network operators on condition that they exclusively pre-installed the Google Search app on their devices; and
                                                                                                                                                • has prevented manufacturers wishing to pre-install Google apps from selling even a single smart mobile device running on alternative versions of Android that were not approved by Google (so-called “Android forks”).
                                                                                                                                                1. 5

                                                                                                                                                  If it was iOS that had a 80%+ marketshare would Apple be the ones targeted?

                                                                                                                                                  Exactly.

                                                                                                                                            1. 15

                                                                                                                                              Interesting to see so many people with unusual keyboards. I’ll be the dissenting voice: I use the keyboard on my 2013 MacBook Pro and I’m happy with it. Before that, I used a cheap Logitech keyboard with my Linux machine, and was happy with it too. As long as I don’t type in weird positions (like sitting on a couch with a laptop) and keep my wrists more or less straight, I don’t have issues with RSI or anything.

                                                                                                                                              1. 5

                                                                                                                                                I, too, use my MacBook keyboard, and it’s been my primary way of interacting with computers for about 7 years now (prior to that, I had a desktop with a Microsoft Natural). The main thing I’ve gotten used to that I’ve found I now have trouble adjusting away from is the way the MacBook combines the keyboard with a trackpad just below it. It feels much easier on my right arm/wrist/elbow to move between kb and trackpad in this setup, versus in my previous desktop setup, where the mouse was on my desk off to the right side of the keyboard, and I had to move my arm back and forth between the two.

                                                                                                                                                I’m sometimes tempted to go full-on keyboard-only, but as long as I’m using a mouse regularly, the trackpad-below-kb combo feels more comfortable to me than having separate devices. Wanting to stick with that is also the reason I don’t use a docking station for my laptop even when in the office.

                                                                                                                                                1. 2

                                                                                                                                                  I agree, the trackpad is so convenient that I haven’t bothered learning a lot of keyboard substitutes when I moved to a Mac. That’s why, despite my seeming indifference to input devices, I’m reluctant to move to the new MBP - the current combination works really well, and I’m not sure that’s carried over to the new model.

                                                                                                                                                  1. 1

                                                                                                                                                    I haven’t found any touchpad issues moving from the 2013 Macbook Air to the 2016 Macbook Pro. I don’t think there’s any particular advantage to the bigger touchpad, but it hasn’t got in my way at all. I don’t think I’ve ever had a problem of accidentally triggering mouse input with my palm, or anything like that.

                                                                                                                                                    The one thing that would concern me with the new laptops is the stuck/broken keys issue, which seems widespread (I’ve had keys that have got stuck, and unstuck themselves) but now that the replacement program is in place I’m be much less concerned about it.

                                                                                                                                                    1. 1

                                                                                                                                                      That’s good to know. I’m also concerned about the new keyboards - even on the 2013 MBP I’m on my second keyboard. I don’t think the replacement program covers the 2018 MBP, does it?

                                                                                                                                                      1. 1

                                                                                                                                                        I assume the 2018 MBP isn’t covered by the replacement program, since the machine’s only just been launched. It would be a little weird to launch a new product and a replacement program for an anticipated failure at the same time :)

                                                                                                                                                        Anyway, I’m not a close follower of Apple, but I think they tend to take their time before instituting replacement programs. People were complaining about the keyboards jamming up on the MBP for quite a while before Apple acknowledged it as a real issue.

                                                                                                                                                        And, though Apple’s denying it, it seems really unlikely to me that the changes to the 2018 design weren’t at least partly in response to the issues that have come up.

                                                                                                                                              1. 5

                                                                                                                                                I’m working on my book, Practical Elm for a Busy Developer.

                                                                                                                                                1. 2
                                                                                                                                                  1. 2

                                                                                                                                                    Yes, thanks! Clearly time for a break.

                                                                                                                                                1. 10

                                                                                                                                                  This is the same tired argument in favor of static typing that you see in every blog. The problem is that while the arguments sound convincing on paper, there appears to be a serious lack of empirical evidence to support many of the benefits ascribed to the approach. Empiricism is a critical aspect of the scientific method because it’s the only way to separate ideas that work from those that don’t.

                                                                                                                                                  An empirical approach would be to start by studying real world open source projects written in different languages. Studying many projects helps average out differences in factors such as developer skill, so if particular languages have a measurable impact it should be visible statistically. If we see empirical evidence that projects written in certain types of languages consistently perform better in a particular area, such as reduction in defects, we can then make a hypothesis as to why that is.

                                                                                                                                                  For example, if there was statistical evidence to indicate that using Haskell reduces defects, a hypothesis could be made that the the Haskell type system plays a role here. That hypothesis could then be further tested, and that would tell us whether it’s correct or not. This is pretty much the opposite of what happens in discussions about static typing however, and it’s a case of putting the cart before the horse in my opinion.

                                                                                                                                                  The common rebuttal is that it’s just too hard to make such studies, but I’ve never found that to be convincing myself. If showing the benefits is truly that difficult, that implies that static typing is not a dominant factor. One large scale study of GitHub projects fails to show a significant impact overall, and shows no impact for functional languages. At the end of the day it’s entirely possible that the choice of language in general is eclipsed by factors such as skill of the programmers, development practices, and so on.

                                                                                                                                                  I think it’s important to explore different approaches until such time when we have concrete evidence that one approach is strictly superior to others. Otherwise, we risk repeating the OOP hype when the whole industry jumped on it as the one true way to write software.

                                                                                                                                                  1. 6

                                                                                                                                                    One large scale study of GitHub projects fails to show a significant impact overall, and shows no impact for functional languages.

                                                                                                                                                    That is not the language used by the authors of the paper:

                                                                                                                                                    The data indicates functional languages are better than procedural languages; it suggests that strong typing is better than weak typing; that static typing is better than dynamic; and that managed memory usage is better than un-managed.

                                                                                                                                                    1. 2

                                                                                                                                                      Look at the actual results in the paper as opposed to the language.

                                                                                                                                                    2. 3

                                                                                                                                                      Annecdote but Typescript exists purely to make an existing language use static types. It has near universal appeal among those who have tried it, and in my experience an entire class of errors disappeared overnight while being having almost no cost at all apart from the one-time transition cost

                                                                                                                                                      Meanwhile “taking all projects will average things out” is unlikely to work well. Language differences are rarely just about types, and different languages have different open source communities with different skill levels and expectations

                                                                                                                                                      1. 3

                                                                                                                                                        As much as I like empiricism and the “there’s not actually that much difference” hypothesis, that article has flaws. In particular, it has sloppy categorization, fex classifying bitcoin as “typescript”. Also, some of its conclusions set off my “wait what” meter, such as Ruby being much safer than python and typescript being the safest language of all.

                                                                                                                                                        1. 3

                                                                                                                                                          The study has many flaws, and by no means does it provide any definitive answers. I linked it as an example of people trying to approach this problem empirically. My main point is that this work needs to be done before we can meaningfully discuss the impacts of different languages and programming styles. Absent empirical evidence we’re stuck relying on our own anecdotal experiences, and we have to be intellectually honest in that regard.

                                                                                                                                                        2. 2

                                                                                                                                                          That link doesn’t seem to be working. Is this the same study?: http://web.cs.ucdavis.edu/~filkov/papers/lang_github.pdf

                                                                                                                                                          I think you make very good points (even though I currently have a preference for static types). I’d love to see more empirical evidence.

                                                                                                                                                          1. 1

                                                                                                                                                            Thanks, and that is the same study. It’s far from perfect, but I do think the general idea behind it is on the right track.

                                                                                                                                                            1. 2

                                                                                                                                                              I only skimmed the study, but doesn’t it actually show a small positive effect for functional languages? From the study:

                                                                                                                                                              Result 2: There is a small but significant relationship between language class and defects. Functional languages have a smaller relationship to defects than either procedural or scripting languages.

                                                                                                                                                              I realise that overall language had a small effect on defect rate, and they noted that it could be due to factors like the kind of people attracted to a particular language, rather than language itself.

                                                                                                                                                              1. 4

                                                                                                                                                                The results listed show a small positive effect for imperative languages, and no effect among functional ones. In fact, Clojure and Erlang appear to do better than Haskell and Scala pretty much across the board:

                                                                                                                                                                lang/bug fixes/lines of code changed
                                                                                                                                                                Clojure  6,022 163
                                                                                                                                                                Erlang  8,129 1,970
                                                                                                                                                                Haskell  10,362 508
                                                                                                                                                                Scala  12,950 836
                                                                                                                                                                
                                                                                                                                                                defective commits model
                                                                                                                                                                Clojure −0.29 (0.05)∗∗∗
                                                                                                                                                                Erlang −0.00 (0.05)
                                                                                                                                                                Haskell −0.23 (0.06)∗∗∗
                                                                                                                                                                Scala −0.28 (0.05)∗∗∗
                                                                                                                                                                
                                                                                                                                                                memory related errors
                                                                                                                                                                Scala −0.41 (0.18)∗
                                                                                                                                                                0.73 (0.25)∗∗ −0.16 (0.22) −0.91 (0.19)∗∗∗
                                                                                                                                                                Clojure −1.16 (0.27)∗∗∗ 0.10 (0.30) −0.69 (0.26)∗∗ −0.53 (0.19)∗∗
                                                                                                                                                                Erlang −0.53 (0.23)∗
                                                                                                                                                                0.76 (0.29)∗∗ 0.73 (0.22)∗∗∗ 0.65 (0.17)∗∗∗
                                                                                                                                                                Haskell −0.22 (0.20) −0.17 (0.32) −0.31 (0.26) −0.38 (0.19)
                                                                                                                                                                

                                                                                                                                                                The study further goes to caution against overestimating the impact of the language:

                                                                                                                                                                One should take care not to overestimate the impact of language on defects. While these relationships are statistically significant, the effects are quite small. In the analysis of deviance table above we see that activity in a project accounts for the majority of explained deviance. Note that all variables are significant, that is, all of the factors above account for some of the variance in the number of defective commits. The next closest predictor, which accounts for less than one percent of the total deviance, is language.

                                                                                                                                                                This goes back to the original point that it’s premature to single out static typing as the one defining feature of a language.

                                                                                                                                                        1. 12

                                                                                                                                                          a harrowing tale from a GCP customer who had their entire project shut down by Google’s fraud protection system, with full deletion scheduled for 3 business days later

                                                                                                                                                          This is where the advantage of small hosting companies is. With prgmr, I’m dealing with a few friendly sysadmins who email me about my OS freezing, instead of a Corporate Monster with Automatic Fraud Detection (will probably be marketed as AI™ soon) that Deletes My Account.

                                                                                                                                                          1. 2

                                                                                                                                                            Just use several providers or with several accounts, to be sure that you’re fine. If you’ve been using the rights tools and workflow, this would be totally feasible to achieve and probably a good guarantee.

                                                                                                                                                            1. 4

                                                                                                                                                              Are you sure the use of “just” is justified with a suggestion to use multiple providers? Surely the complexity and cost would be significantly different? I’m puzzled.

                                                                                                                                                              1. 2

                                                                                                                                                                I guess it all depends of your size and your needs. Although, I do apologies for the “just”, it’s not helping anyone. What I meant is that for many usecases, using tools like terraform,ansible,docker (with all the hype around), can help a lot to be compatible with multiple providers. For example using terraform to setup vms,storage and networks on aws/gcloud/azure (or even on vmware), which is an initial cost to work on, but then would save a lot of time when scaling or just for disaster recovery. The output of terraform can be used by ansible to deploy on the machines.

                                                                                                                                                                I know there are issues with some providers, but the low cost and the flexibility is also a great advantage.

                                                                                                                                                                1. 1

                                                                                                                                                                  Thanks for elaborating, that makes sense.

                                                                                                                                                            2. 1

                                                                                                                                                              This is exactly why I still use Rimu - if I need to, I can contact the owner of the company, and the rest of the time there are actual people available to provide extra assistance/Info if required.