1. 1

    It seems to me that this is a set of very specific views for web applications. The perspective is certainly implementation focused, but what is often important (and emphasised by ArchiMate, but not so much by UML) is capturing requirements, modeling business processes and giving an implementation-agnostic view of the solution. Maybe the underlying issue that C4 tries to address is that architecture work does not seem useful to developers? I personally would argue that architecture should shift the focus out of the implementation and onto requirements. Designers need to understand the requirements, information structure and processes to create interfaces. Developers should also have that information to understand how the software could be used. Architects can help there, and it’s a critical part of application design that is often neglected.

    1. 9

      I find that the Python 3 languages changes were courageous (not in the Apple way) and the core Python group did listen to the community and reintroduced features that eased the transition in 3.3 and 3.5. Meanwhile, lots has happened in the language, from list and iterator comprehension, to a pretty good async foundation layer and supporting syntax, and now best in class typing annotations. I mean, look at Ruby in comparison. It’s fair to say that the Py3K transition has taken a long time, but I think it actually happened quite well, with good communication between the community and the maintainers.

      1. 3

        Can’t wait to read the ST port, as there was only a blitter on the STe. I remember buying the ST copies in Paris, and the first batch had a production issue that made them unreadable. I ended playing the game on Amiga only years later.

        1. 5

          I’m working today and tomorrow, but then I’ll be off until the second week of January.

          My wife has some medical procedures we’ll be doing in that time, and I plan on working on Tabula Scripta off and on during the downtime (spending time with my wife is the priority, but there is definitely time to spend on that sort of side project), and catching up with paperwork and the like.

          I’m currently grinding away at the CRUD aspects of that project, but one of the bigger challenges I see coming out of it is figuring out a nice UI for the client-side spreadsheet side of things. For now, I’m mostly focusing on getting the all the connections and scripting bits working, which will be plenty to keep me busy. Does anyone here have experience with the various “Data Grid” type controls I’ve seen around?

          1. 2

            Please keep us posted on your work on Tabula Scripta, it seems ambitious and very interesting! I would recommend implementing the grid as a canvas-rendered component, where you use HTML for the cursor and rest of the UI, otherwise it might get too slow. All the best for your wife’s medical procedures.

            1. 1

              How would you recommend putting the input box over a canvas? Right now, I’m rendering out an HTML table (since I can SSR that), but I could see a canvas working. It’d be a solid bit of JS work to get it working, I think.

              Also, what draws your attention to it, in particular?

              1. 1

                Your cursor could be absolutely positioned, and you could manage the layout (and scrolling offset) manually. I’m interested in your project because spreadsheets are like Visual Basic: an incredibly simple way to create custom applications. They need to evolve, though, and projects like TreeSheets and AirTable show that there are interesting possibilities. I’m curious to see how your project will take shape!

          1. 3

            The language looked a lot like Rust at first. It turns out the “Impala” tab on the sidebar refers to this language, which has Rust syntax mixed with functional flavors, like sane function types (as in f: fn(int) -> int) as well as @ added for partial evaluation (as in let fxy = @f(x, y)).

            I was pretty confused at first since I mixed up partial application and partial evaluation, which are two different things. Partial application means applying some parameters to a function to get a new function closed over those parameters. Partial evaluation, which I never heard of before, is a compiler optimization that precomputes all known compile-time input at the call site. It’s more than just inlining – it specializes the code of the function based on static input, which you can imagine a programmer doing if they inlined code by hand. For example, factorial(5) becomes 5*4*3*2*1, which, as you might notice, stripped not only the recursive calls but also the base case check.

            Although it said “More advanced examples can be found in the AnyDSL GitHub organization.”, I wasn’t able to find many examples except for this

            1. 2

              I also found the Partial Evaluation a bit mysterious, but it’s actually presented clearly in the AnyDSL paper: “[Partial Evaluation] partitions the input of the program and its execution into two stages. In the first stage, the program is partially evaluated on the static inputs (algorithmic variants, parameter values, target-machine dependent code) to produce the residuum. In the second stage, the residuum is fully evaluated on the actual, so-called dynamic inputs to produce the actual outputs.”. Zig, I think, has a similar concept where expressions can be evaluated and expanded at compile time, but Impala (and Thorin) go quite far in producing a minimal residuum.

              If you haven’t looked at them, here are the advanced examples that the docs were most probably referring to: Rodent, Stincilla and Ratrace.

              1. 1

                Really nice explanation of the explanation! My learning is accelerating.

              2. 1

                Impala looks like OCaml + Lua + Rust, aka wunderbar.

              1. 3

                See also Saarland University’s Compiler Design Lab’s prior work, AnySL. SL is for Shading Language. Naming connection is obvious.

                1. 3

                  Ah, and Leißa’s masters’ thesis was on automatic SIMD codegen http://www.cdl.uni-saarland.de/publications/theses/leissa_dipl.pdf

                  1. 1

                    I didn’t see that one, and it explains why AnyDSL has renderers as examples and GPU support from the get go. Auto vectorization is a though technical issue, but AnyDSL seems to put the emphasis on partial evaluation (aka. compile-time evaluation) and collapsing the layers of abstraction.

                  1. 1

                    I personally found that the problem with dotfiles was that they’re very hard to share in a team. One of my pain points was getting new team members up and running quickly (ie. have all their tools properly setup) and also be able to go on their workstation and switch to my own configuration so that I can type property (I use vim bindings pretty much everywhere). I made dotenv to solve these problem, it’s still a bit rough but has done the job fairly well so far – maybe it can be helpful to other people as well!

                    1. 20

                      Before I clicked, I thought to myself, “what is Google going to sneak in this time?”

                      Our long-term goal is to define badging for high-quality experiences, which may include signals beyond just speed.

                      Ah, there it is. Badges for the Google-approved, and warning badges for the rest.

                      1. 7

                        This certainly goes too far – there should be a concept of content neutrality, or experience neutrality: browsers are a conduit, and more importantly, the interface we user to interact with a growing number of services. There should be ethical guidelines around designing browser features, as it offers a growing surface for abuse.

                        1. 7

                          I see what you’re saying, and I wish we still used the old term “User Agent”, since they are meant to be agents for the user, not for the browser vendors.

                          1. 2

                            Ha, that’s a great way to put it!

                            1. 1

                              It is telling that the User-Agent string is basically a giant amalgamation of brands now :)

                        1. 4

                          It’s a great example of guerilla a activism, it’s fun and might make people pause and think about it. Ethics in software are becoming more and more important, and we need more moments to break out from our routine and think about what we’re doing and how it impacts society.

                          1. 24

                            Bitbucket’s termination of Hg repos made me move to SourceHut, and I’m very happy to see it growing. Like Pinboard and Instapaper, it shows that SaaS doesn’t have to be venture-backed. Thanks a lot, Drew for being so transparent!

                            1. 6

                              Me too, and I wasn’t even using Hg.

                            1. 3

                              Interesting. Looking forward to seeing what @andyc has to say about this one, although I suspect it’s pretty much already been said at http://www.oilshell.org . Do you suppose the author (Terry Jones) is aware of https://xon.sh ? It’s not mentioned in the README.

                              1. 3

                                There’s an issue on the bug tracker: https://github.com/terrycojones/daudin/issues/6

                                1. 1

                                  I used Xonsh for a while, until I ran into some pretty annoying performance issues (that was ~2 years ago). I did love the blending of Python and shell, but remember it lead to some awkward syntactic edge cases. I eventually settled for Fish, but continue to write my scripts in Bash (and the amazing ShellCheck) – the pipe remains a very powerful abstraction, so maybe Daudin would hit that sweet spot, where we get first-class integration with the command-line environment and a good language. It seems to me it has more potential as a shell-scripting replacement than a real REPL shell.

                                  1. 1

                                    Hi Sebastien. I’m also a fish user :-) I’m trying to avoid awkward edge cases in daudin, but sometimes it’s not clear how best to do things. E.g., if you run ls --color=auto in daudin you get nice coloured output because it runs in a pseudo-tty and you probably want to keep the output for later pipeline usage. But if you run git status you also want the coloured output in your terminal but do you actually want to keep the output to use in a pipeline. Worse, what if you run (say) vim from inside daudin? It works fine, but what should be in the output / pipeline from that command? I could “fix” that at the expense of not allowing one to continue a pipeline by starting the subsequent line with a pipe.

                                    Anyway, I tried to stay as close to pure Python as I could manage, with the explicit goal of minimizing edge cases. The special % commands can all be done with a very small (usually one line) piece of Python, so they’re just syntactic sugar.

                                    There are certainly rough edges in daudin with respect to exception handling. Hopefully I’ll improve that as issues arise.

                                    BTW, tonight I made some changes so that you can run a daudin script by putting commands in a file (#!/usr/bin/env daudin works too).

                                    Thanks for the comment. I don’t know where this is all going, and I didn’t think much before writing it. It’s just a fun project. But I think it’s getting to the point where I can consider actually using it (I now also have a dynamic and coloured prompt). But I’ll certainly miss the awesome predictive powers of fish…

                                  2. 1

                                    Hi @minimax. As @ngoldbaum says below, I didn’t know about xonsh. I’ve since had a little look at it, but only a bit. I should make time to read it more carefully. If I’d known about it I might not have started. But OTOH, I figured I could make something work in one evening and I love coding, so…… Implementing daudin was really more of an exercise in thinking than anything else - provoked by comments from my Lisp-loving friend.

                                  1. 3

                                    I think this is a great example of what types can be: the explicit (what it is) or implicit (what it isn’t) definition of a set of possible values within the superset of all possible values. This set-like perspective on types opens the door to thinking of types as constraints within an infinite space – maybe it’s what type theorists already do, but as someone who comes more from soft.eng than comp.sci the moment I realized that was definitely an “aha” moment.

                                    1. 2

                                      This looks like a formalization of what React and Redux do. The main problem with this architecture is bottom-up communication, ie. when a child component wants to interact with the parent. I personally find the cells/FRP model to be a better fit for composable UIs or complex apps.

                                      1. 1

                                        I’m pretty sure the Elm Architecture predates and influenced the development of React. But I don’t have any proof of that.

                                        1. 1

                                          The Elm architecture went through many iterations, and what is presented is quite different from what it was in the beginning. There’s no shame in applying solutions that work. If I remember correctly, Elm had an FRP-inspired model before, but decided to go in a more React-like way (top-down, full state generation on any change).

                                          1. 1

                                            They moved from signals to pub/sub, but the “Elm Architecture” aspect is unchanged as far as I can tell. State was always global and immutable, and there was always a virtual DOM. Well, maybe not always, but the first time I looked at it many years ago.

                                      1. 3

                                        Last time I checked, Adapton was making heavy use of caching, and it wasn’t clear what the memory overhead would be compared to a full recomputation approach. The shift that needs to happen, I think, is to reify the notion of change in the API or language, so that functions emit changes to data structures and the compiler then combines the changes together, collapsing intermediate steps that are just transient.

                                        1. 1

                                          I think that software architecture is an increasingly important field. The approach from the 90s showed its limits (ie. applying the metaphor of building construction to software), but given that creating programs has shifted from a handful of relatively independent, experienced hackers to an army of bootcamp-trained developers, the role of architecture is going to be more and more prominent. The key challenge is the same: how do we approach the design of a computer program, taking into account not only what it should do, but how it’s going to be made.

                                          1. 4

                                            The article is very clear and accessible. Now I’d be curious to hear people’s practical experiences in leveraging the properties of algebraic data structures in their programs. It seems similar to UML: a great idea and a potentially impactful tool, which is very rarely used in practice.

                                            1. 1

                                              Yeah, I’m really interested in that, too. It seems most interest is either formal verification or people that program in Haskell. I’m wondering how much if any practical value it has outside those groups. That is, outside it just being interesting and mind-expanding.

                                            1. 2

                                              Is there some docs on writing the grammar? I like where the project is going (I remember your last post here).

                                              This may be a silly question, but how do you represent a list of nodes (I see named maps in the examples) and attributes?

                                              1. 1

                                                We don’t have good human made docs yet on Grammar authoring. I know some volunteers were working on that, but I don’t think they’ve published anything yet and not sure the timeframe.

                                                Here’s the best we have at the moment: http://treenotation.org/sandbox/build/#standard%20grammar

                                                The Grammar language is itself written in the Grammar language. So any keyword you see in “foo.grammar” will be defined in “grammar.grammar”.

                                                I’m also hoping we will add auto-generated docs by the end of the week (https://github.com/treenotation/jtree/issues/26).

                                                how do you represent a list of nodes (I see named maps in the examples) and attributes?

                                                The base node actually has children as a list of nodes, and not a named map. Thank for asking that (a few folks have had questions about that and so it I just created an issue to improve it). Here’s the basic data structure:

                                                interface TreeNode {
                                                  parent: &TreeNode
                                                  children: TreeNode[]
                                                  line: string
                                                }
                                                

                                                The Stump Tree Language, which compiles to HTML, implements a list of htmlTag nodes with attributes, may serve as a good reference: http://treenotation.org/sandbox/build/#standard%20stump

                                              1. 5

                                                The link is broken now https://github.com/DutchmanDavid/DeluxePaint, but it seems to be available at https://github.com/historicalsource/DeluxePaint. I’m quite surprised to see it’s written in C, I would have thought that most of the apps back then were written in assembly.

                                                1. 16

                                                  I’ve been doing tabs for indent and spaces for alignment for a similar reason: some people like a tabwidth of 2, some of 4, some of 8. Also, using tabs makes parsing slightly easier, and provides visual guides when you represent tabs with glyphs in your editor. But nothing beats this accessibility argument, it makes the choice much more obvious.

                                                  1. 6

                                                    The problem with tabs is that lots of people use tabs in such a way, that it looks sane only when you’re using their tabwidth, and looks confusing if you’re using a different tabwidth. So not only this defeats the purpose of tabs, but you also need to know their tabwidth in order to even read the source code, let alone modifying it.

                                                    1. 1

                                                      Can you elaborate on this? It should only be an issue if different lines in the same file use spaces on one line, tabs on another.

                                                      1. 4

                                                        Here is an example of what I have in mind:

                                                        http://anadoxin.org/blog/youre-using-tabs-in-a-wrong-way.html

                                                    2. 2

                                                      Seems reasonable. I still have one problem, though: in the editors I have used to date (emacs, QtCreator, VisualStudio, XCode), I haven’t found an easy way to actually do that.

                                                      Emacs has the best UI when you agree with the mode’s settings: hitting [tab] will instantly indent and align the current line of code. If you are using tabs however, emacs will use as much tabs as possible, then fill the remainder with spaces. Which is hell with variable width tabs.

                                                      The other editors, by default would just add one tab character (or 4-8 spaces) when I hit [tab]. No more easy alignment, that’s a drag.

                                                      It’s been a while since I used a modern IDE, though, and I never tried to have Emacs do the right thing (I only used it on spaces projects) Can we now easily set up our editors to help us indent with tabs and align with spaces correctly?

                                                      1. 2

                                                        I just had a quick look in the QtCreator settings (Tools menu > Options > C++ > Edit… > General), and it looks like if you select these options, you will get tabs for indent and spaces for alignment within the indentation level:

                                                        • Tab policy: “Tabs Only”
                                                        • Align continuation lines: “With Spaces”

                                                        I haven’t tested it thoroughly, but it appears to do the right thing in the example code next to the settings.

                                                    1. 3

                                                      Unpopular opinion ahead: I don’t think this corporate point of view onto the issue solves the actual problem, it only gets it out of the hair of corporate and makes it someone else’s instead.

                                                      Let’s consider the assumption that an “asshole” can be “fixed”, i.e. will adjust their behavior after being reprimanded with sufficent frequency. As far as I can tell, you haven’t changed their nature, just the symptom. There must be an underlying reason why the person is like this: Be it stress, disliking their job (but feeling trapped into it with no viable alternatives) or possibly inherent malice. If and only if the cause was stress induced by other people at the workplace, this alleviates the cause as well as the symptoms. Otherwise, you’ve merely shifted the problem on someone else, such as their family or random strangers. Possibly, lacking an outlet for their “assholery”, this might even intensify the outlash at others outside a workplace. I’m not sure what would actually fix this; possibly some trips to the psychiatrist and subsequent therapdy and medication?

                                                      Let’s consider the assumption that an “asshole” cannot be “fixed”. In that case, it is a fixed personality trait, likely rooting in inherent malice. This article makes the point that assholes should not be permitted to work in a workplace. At the same time, the assumption is that they’re irredeemable. Thus, they cannot work in anything but one-person self-employment scenarios, which is an economically unrealistic scenario for many people. Therefore, these people cannot be allowed to work at all according to this line to thinking. What does a society do with people that cannot work? Banishing them out of the country or outright killing them is apparently out of the question for the morals of society right now, so they’d have to join welfare. In a capitalist state, the question turns into whether, on a macroeconomic scale, putting “assholes” on welfare comes cheaper than keeping them in the workforce.

                                                      In either case, you have an unsolved problem.

                                                      1. 8

                                                        “Therefore, these people cannot be allowed to work at all according to this line to thinking. “

                                                        A tiny percentage of environments that read and apply writing like this won’t hire them. Most environments hire assholes. So, these people will be allowed to work in most environments. Might even thrive in them. They’ll simply go to the asshole-tolerating companies.

                                                        1. 3

                                                          you’ve merely shifted the problem on someone else, such as their family or random strangers.

                                                          They are already assholes to other people in their lives.

                                                          1. 2

                                                            It is interesting to consider what you propose from a “corporate social responsibility” perspective: a company might then help society in general by helping resolve “assholistic” behaviour, and offering an environment where the person can improve and eventually resolve or reduce the problematic behaviour. This leads to interesting moral and ethical questions, and ultimately to the role of a company and its indirect social impact.