1. 5

    Sounds like decent stuff but I do find it amusing that some really basic things are getting big headlines: “Notepad Supports Linux Line Endings” and “Copy/Paste Arrives for Linux/WSL Consoles”.

    I’m hoping the console improvements are actually useful since the worst part about the WSL (aside from I/O performance) are the really poor consoles in Windows, including current 3rd party offerings.

    1. 2

      I actually did get excited about a couple of those. Which I guess just illustrates how low the bar was to begin with!

      1. 1

        including current 3rd party offerings

        ConEmu is pretty good. The only problem I’ve noticed is that it likes to put the cursor one line above (than the actual prompt line) in my zsh prompt :D

        1. 3

          ConEmu is an ok console, but it’s a poor Terminal Emulator, in my experience. (In part due to lag and some minor issues when processing VT-100 codes).

          If you don’t use Vim or co, it seems to do quite servicably

          1. 1

            I used it for neovim in tmux, haven’t noticed any problems (though it’s not very fast indeed)

          2. 1

            UPD: another issue: in ConEmu, paste doesn’t work inside tmux. Switched to wsltty (mintty) :)

          3. 1

            The user, of course doesn’t (shouldn’t) care about how hard something was to implement, but the people writing these release notes are biased by that sometimes, it’s only normal. The LF change must’ve been a ton of work. Most of it probably not coding, but still work.

            I don’t know it for a fact, it’s just speculation based on experience. By the way, I work at Microsoft though nowhere near notepad.exe.

            1. 1

              Yup. it’s amusing, but sadly it’s a Thing. I adopted WSL here at work because for some kinds of access it’s Windows or the hiighway and WSL is a LOT better than being stuck in CMD.EXE/ Powershell.

              Thing is the cut&past experience at least before these changes was AWFUL. I’m embarrassed to admit that our workflow involves a LOT of cut&paste, and the experience was abysmal.

              1. 1

                The Notepad update was quite interesting considering it took 33 years for that basic feature to finally be there. No more opening config files and seeing nothing but a very long single line.

              1. 6

                I really like this approach to building compilers - I used the nanopass framework for a compiler I wrote for my undergrad thesis: https://github.com/charles-l/comp

                It’s not perfect. There are still a few limitations that can only be circumvented with some messy mutation, but most transformations can be performed quite elegantly with the nanopass DSL.

                1. 7

                  One of the framework’s authors gave a nice talk at Clojure/conj a few years back.

                  https://www.youtube.com/watch?v=Os7FE3J-U5Q

                1. 16

                  Unit testing, auto-test on save, and working in very very small increments.

                  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. 3

                                                I’m Michael and I write about software architecture and design at http://www.michaelnygard.com

                                                1. 4

                                                  Wait, we have a Chicken developer here. Why speculate… Hey C-Keen, how would you briefly pitch Chicken vs other Schemes to someone that already knows a little about CL’s or Schemes?

                                                  EDIT: There is an elevator pitch on the site but I was just curious if C-Keen would say anything different.

                                                  1. 9

                                                    There are some technical differences in the compiler design for example. CHICKEN uses cheney-on-the-mta CPS compilation for implementing scheme in C. But for the user the most outstanding difference is that it generates host binaries, that are easy to distribute.

                                                    With CHICKEN 5 these binaries as well as core itself are built reproducably. Also cross-compilation is a feature of the system.

                                                    Because CHICKEN compiles to C, FFI into C is really really easy and there’s schemely syntax support for doing so. Wrapping your favourite library becomes an easy task allowing an explorative approach to understanding your problem while using your external library from the interpreter.

                                                    In the previous version a lot of external modules that provided functionality (called eggs have been written by chicken users). For the next release the most important and used ones are already ported or a work in progress.

                                                    Chicken scheme has a small but newcomer friendly and live community. You can easily reach us on #chicken on freenode or via our mailing lists.

                                                    From the language point of view scheme vs. CL comparisons apply (lexical scope, continuations, hygienic macros, yadda yadda yadda)

                                                    There are many more and I have glossed over a lot of things. Let me know if there’s some special topic you’d like to know more.

                                                    1. 1

                                                      Thanks!

                                                      1. 1

                                                        Thanks, that is informative.

                                                        Exploring C libraries from a REPL is really cool.

                                                    1. 8

                                                      “A practical and portable Scheme system”

                                                      From the website

                                                      (The post and the linked email didn’t give me any idea what Chicken was.)

                                                      1. 6

                                                        The way I remember it is it’s the Scheme that compiles to C for speed and portability. silentbicycle posted this interview with the author. aminb added someone’s blog posts on interesting work.

                                                        1. 5

                                                          I believe it’s package ecosystem is better than other schemes as well.

                                                        2. 1

                                                          Thanks! I was over here saying “wtf is chicken”

                                                        1. 12

                                                          Say what you will about the Ruby community, but I’ve never seen them fly into a moral panic over a tiny syntax improvement to an inelegant and semi-common construct.

                                                          The person-years and energy spent bikeshedding PEP 572 are just astoundingly silly.

                                                          1. 7

                                                            Say what you will about the Ruby community, but I’ve never seen them fly into a moral panic over a tiny syntax improvement to an inelegant and semi-common construct.

                                                            Try suggesting someone use “folks” instead of “guys” sometime…

                                                            1. 13

                                                              I switched to folks and do you know how satisfying of a word it is to say? “Hey folks? How’s it going folks? Listen up folks!” I love it.

                                                              On the other hand the interns weren’t too keen on “kiddos.”

                                                              1. 6

                                                                I’ve gotten used to saying “’sup, nerds” or “what are you nerds up to?”

                                                                1. 5

                                                                  A man/woman (or nerd, I guess) after my own heart! This has been my go-to for a while, until one time I walked into my wife’s work (a local CPA / tax service) and said, “What up, nerds?” It didn’t go over so well and apparently I offended some people – I guess “nerd” isn’t so endearing outside of tech?

                                                                  Thankfully, I don’t think I learned anything from the encounter.

                                                                  1. 3

                                                                    It’s not endearing within tech to anyone over 40.

                                                                    1. 2

                                                                      I generally only use it in a technical setting – so within my CS friend group from college, other programmers at work, etc… whenever it’s clear that yes, I am definitely not trying to insult people because I too am a nerd.

                                                              2. 1

                                                                as @lmm notes above, a minimalist, consistent syntax is an important part of python’s value proposition. in ruby’s case, adding syntactic improvements is aligned with their value proposition of expressiveness and “programmer joy”, so it’s far less controversial to do something like this.

                                                              1. 10

                                                                Hey @mtnygard, I’m thrilled to see the Lobsters codebase used to help teach, thanks for writing this up.

                                                                One thing I don’t love in the Lobsters codebase is that it’s very relaxed about RESTfulness. I’ve specifically considered reworking the hat code to separate hats from hat requests, each with the standard REST verbs. I’ll have to read some more of your blog posts, because I can’t make it down to Florida for your workshop. :)

                                                                1. 7

                                                                  Alas, the Florida workshop didn’t happen. Somehow I couldn’t convince enough people to come to Florida in March when it was still blizzards and nor’easters up north.

                                                                  I’ll have more to come on the topic of hats, but take it with a grain of salt. My audience is people who’ve already decided that microservices make sense for them. I really don’t know that the added complexity and operational expense would be right for Lobste.rs.

                                                                  I picked this code base because I think it’s good for teaching. It is a well structured monolith in a domain with which most people will be familiar.

                                                                  1. 4

                                                                    It is a well structured monolith in a domain with which most people will be familiar.

                                                                    I really wish more people were comfortable with the idea of such things. Thank you for mentioning it!

                                                                    1. 3

                                                                      Ah, too bad. Good luck in the future, and please share your blog posts (especially those that happen to use our codebase).

                                                                  1. 4

                                                                    On HN someone said: “This will be a tongue in cheek comment, but there’s another thing Datomic isn’t making you do either: GDPR compliance.”

                                                                    Immutable data stores are great but the world wants some level of mutability. I’ll link to the comment and responses if anyone is interested.

                                                                    1. 6

                                                                      I’m probably biased, but I think Datomic’s model of deletion is perfect for GDPR.

                                                                      When you delete something permanently, we call it “excision.” (As in “cutting out”.) After the excision, the data is gone, gone, gone. Any old storage segments that held the excised data get reindexed and garbage collected.

                                                                      But, we record the event of the excision as its own transaction. So there’s a permanent record of what got deleted (by the matching criteria) and when. And like any transaction, the excision transaction can have extra attributes attached like who did it and in response to what document number, etc.

                                                                      With any other database, once data is deleted, you don’t know that it ever existed and you don’t know who deleted it, when, or why.

                                                                      1. 1

                                                                        The link @mfeathers linked to says that excision is very expensive but it’s unclear what that means for use. Do you have any guidance on that?

                                                                        1. 1

                                                                          Excision does require a full scan of the log, plus a full index job. Depending on the size of your database that can take a while. Because this has to be done atomically, the transactor can’t do anything else while that excision runs.

                                                                          This is for the on-prem version of the product. I don’t know how the cloud version does it… it may be friendlier to throughput there.

                                                                          1. 2

                                                                            The way you describe it seems like it could be so expensive as to not be viable in production.

                                                                            1. 1

                                                                              EDIT: Sorry for the wall of text… I wanted to say a bit more than “you have to design for it.”

                                                                              I have seen installations where we had to get creative to work around 3 or 4 hour excision times. But I’ve also seen installations where it took a couple of minutes. But even on the low end, it requires design work to handle those delays.

                                                                              There’s a cluster of related design techniques to achieve high throughput with Datomic. I’m still learning these, even after 6 years with the product. But it turns out that designing for stability under high throughput makes you less sensitive to excision time.

                                                                              Mostly it comes down to the queue. Datomic clients send transactions to the transactor via a queue. (This is actually true for any database… most just don’t make the queues evident.) Any time you look at the result of a transaction, you’re exposed to queuing time. “Transaction” here specifically means changing data, not queries. Those are unaffected by excision or the tx queue.

                                                                              I design my systems to start with a DB value that I capture at the beginning of a request. That means I freeze a point in time and all my queries are based at that point in time. This would be similar to a BEGIN TRAN with repeatable read isolation. Then while processing a request, I accumulate all the transaction data that I want to submit. At the end of the request, I make a single transaction out of that data so all the effects of the request happen atomically.

                                                                              When I call the transact function, I get back a future. I pass that future off to an in-memory queue (really a core.async channel, if you’re a Clojurist.) A totally different thread goes through and checks the futures for system errors.

                                                                              All this means that even if the tx-queue is slow or backed up, I can keep handling requests.

                                                                              As a separate mechanism, I’m also exploring the idea of separating databases by the calendar. So like you’d roll a SALES table over each year and keep a history of SALES_2016, SALES_2017, etc. Since I can query across multiple databases quite easily, I can keep my working set smaller by doing that.

                                                                              1. 1

                                                                                All this means that even if the tx-queue is slow or backed up, I can keep handling requests.

                                                                                Can you? For example, let’s say we have a request from the web that is updating my Tinder profile and we’re running an excise to remove old GPS coordinates and this takes 3 minutes. That means my request will hang 3 minutes, right? While you might technically be correct, from a UX perspective, you’re not continuing to handle requests. Or did I misunderstand your description? If I understand you correctly, if you were pitching this technology to me I would probably reject it. I can’t have multi-minute write outages in my super important most popular product ever.

                                                                                like you’d roll a SALES table over each year and keep a history of SALES_2016, SALES_2017,

                                                                                I haven’t used Datomic so maybe the model is so great putting up with things like this is worth it, but I do really dislike having to decide a sharding strategy (should I do years? months? weeks? how do I know? How expensive is it to change after I decide?). Certainly most databases have pretty miserable payoffs, though. Also, is excise just inside a DB or is it across all DBs?

                                                                      2. 5
                                                                        1. 1

                                                                          That was one of my points against blockchains due to encumberance pollution attacks repos. I had ideas for dealing with it but each had tradeoffs. Tricky paradox to address.

                                                                        1. 3

                                                                          Datomic is really great, I just want to use Go or python and those don’t work so well with with it iirc :(

                                                                          1. 6

                                                                            And there’s you a startup idea. ;)

                                                                            1. 1

                                                                              When did you last try those? I’m asking because there’s a new “client” API that might make it easier to access.

                                                                            1. 2

                                                                              When I read that GDPR is not enough (which is probably true) I also remember myself that a tremendous amount of companies are totally panicked about this subject. Some friends are running some basic shops (not even online) some of them are pretty bad at technology. From their point of view, GDPR is another trick to kill little business in favor of bigger ones that will have no issues at following the directives.

                                                                              1. 3

                                                                                The thing that keeps nagging me about GDPR is that the complexity seems to stem from the optionality of it. What I mean is that it’s harder to respond to selective individuals’ requests for information about data usage or deletion than it would be to just delete everyone after 90 days.

                                                                                No question, it would be enormous amounts of work to age out PII that quickly. But at least it would be uniform instead of conditional.

                                                                              1. 5

                                                                                What is JavaFX? Every time I’m trying to figure out what is it, I find only lots of nonsensical marketing terms like “Rich Internet Applications”, “Rich Client Platform”, as well as ancient dotcom-crash-era buzzwords like “multimedia”. Looks like it’s GUI toolkit that had been planned to replace Swing, but it completely lacks native look and everything is based on skins (hello from 2001). Is it usable toolkit, or just enterprise gimmick to display interactive sales charts?

                                                                                1. 10

                                                                                  I used it on a large-ish desktop project. It’s quite a nice library. It’s easy to use in common cases, has a very clean and regular UI, and is really, really fast. We use the CSS styling just a bit (to offer a dark theme) but not much of the XML-based scripting stuff.

                                                                                  It’s much easier to use than Swing, thanks in part to backing away from the L&F split.

                                                                                  Oh, JavaFX also makes it dead easy to get an OpenGL context in a panel.

                                                                                  1. 2

                                                                                    So, it’s more similar to Qt Quick and Clutter than Silverlight or Adobe Air?

                                                                                    And is “traditional” GUI with input boxes, lots of buttons, resizable layouts doable in it? Can I just instantiate trees of these elements without dealing with skinning details or OpenGL? Do standard interactions (selecting text in text boxes with mouse or keys, clipboard, cursor movement, scrolling) work as expected, unlike, for example, some GUIs in game engines?

                                                                                    1. 8

                                                                                      I don’t know Qt Quick and Clutter, so I can’t comment. Definitely in the first release, JavaFX was positioned as a competitor to Silverlight and Air. JavaFX 1 was all about the XML to make it declarative and script-driven. With JavaFX 2 they seemed to back away from that positioning a bit.

                                                                                      As far as the expected complement of widgets, yep. They’re all there. You don’t have to deal with CSS or skinning if you don’t want to. Just instantiate the components and go. All the interactions you’d expect are there. It’s not like an OpenGL rebuild of a GUI toolkit. It’s a GUI toolkit that also makes it easy to show OpenGL.

                                                                                      (The docs can be a little misleading here again, because they talk about a “stage” and a “scene”, which makes it sound like a 3d engine. It’s not.)

                                                                                      Another thing I liked is that they extended the JavaBeans getter/setter model with active property objects. Instead of creating a custom listener interface for everything like in AWT, you can just bind to specific properties and get notified about changes to those. That gives you a narrower interface that’s used more broadly… which makes it super-easy to use from Clojure. :-)

                                                                                      One thing I dislike is that you’re expected to have your main class be a subclass of javafx.application.Application. They want to take control of initial class loading and application startup. There’s a goofy workaround needed if you want (like me) to have main be a Clojure function. That’s not of general interest though so I won’t clutter this post up with it.

                                                                                  2. 4

                                                                                    JavaFX was, if I recall properly, the first widespread attempt at doing reactive programming in the UI. I think it grew from the community (Romain Guy was the main developer), as it is too innovative to be something that was created out of a top-down approach. I was happily surprised when it got integrated into the JDK, for obvious strategic reasons at the time, as mentioned in other comments.

                                                                                    1. 2

                                                                                      Oracle’s marketing is strange. I got interest to try it only after comments here, official webpages for JavaFX only repelled me. It looked like top-down thing to resurrect applets, I didn’t even know it’s a GUI toolkit and not chart plotting or animation lib.

                                                                                    2. 3

                                                                                      It has confusingly referred to several different things over the past, but in this context, it’s really just a UI toolkit - it could be seen as a replacement for Swing.

                                                                                      I find that it’s nicer to use in some ways than Swing (I don’t particularly like the concept of CSS for regular UIs, but it does make altering style and positioning quick and easy), but it’s less complete, lacking features (such as an extensible text editor kit) that the more mature Swing does have. It’s also more buggy and sometimes slower than Swing, and has some ill-conceived design choices (weak references in property bindings, urgh).

                                                                                      1. 0

                                                                                        It’s basically like the interface builder in xcode but just for Java.

                                                                                        1. 3

                                                                                          Examples for beginners “Getting started with JavaFX” does not use any builder: first widgets are instantiated directly and then defined in xml. Interface builder probably exists too but it’s definitely not a killer feature of JavaFX, and UI builders exist for Swing too.

                                                                                          1. 1

                                                                                            Thanks for the correction! So it’s more like the XML layouts for Android?

                                                                                            1. 2

                                                                                              According to other comments here and some introductional docs, it’s just another GUI toolkit for Java, alternative to Swing, but more “modern” and without native look-and-feels. XML is just one of features. It was initially marketed as alternative to Silverlight, but in reality it’s another GUI toolkit.

                                                                                      1. 22

                                                                                        Ironically, the biggest thing that stops people from joining a Mastodon instance is the paradox of choice. If you want a Twitter account, there’s exactly one place to go and a newcomer has zero things to figure out before joining.

                                                                                        If you want to join a Mastodon instance, you have to grok the distributed nature, figure out why some instances block other instances, which code of conduct you endorse (or pick an instance without one). All those choices create a higher barrier new users have to overcome to “get in”.

                                                                                        1. 2

                                                                                          Ironically, the biggest thing that stops people from joining a Mastodon instance is the paradox of choice.

                                                                                          And network effects. I am not very active on Mastodon, since most friends and colleagues (computational linguistics, ML) are not on Mastodon.

                                                                                          I also think that the default user interface, even though it is nice for advanced users, is not simple enough.

                                                                                          1. 2

                                                                                            I think it largerly depends on how your interests match the instance you join.

                                                                                            I was invited to join mastodon.social social but I now realize that I mainly follow people from other instances.

                                                                                            Probably the fact that I’m mostly interested in software related matters (even if from a wide range of perpectives, including law and ethics) is what make the local timeline pretty boring to me…

                                                                                            Finding the right instance might not be simple.

                                                                                            Maybe a tag cloud representing the topics threated in the instance could help in the decision (together with the code of conduct obviously).

                                                                                          2. 2

                                                                                            I can see why you’d think this, but my experience has been that it really doesn’t matter, other than obvious stuff like not picking a fascist-friendly place. If you’re on a small instance then your local timeline will be quieter, but personally I found the majority of people to follow thru IRC or threads like this, so the local timeline didn’t really come into it.

                                                                                            1. 1

                                                                                              I have never depended heavily on the local or federated timeline for discoverability, but I joined during a wave of signups where lots of people I already knew on Twitter were already joining.

                                                                                              I imagine that, if the one person you know on the fediverse is also the person who told you about it, and that person is also a newbie or has mostly different interests, the local timeline matters a lot more. (And, if you’re reasonably ‘normie’ – if your strong interests aren’t geared toward witchcraft, furry fandoms, communism, and the internal politics of the FSF – you might have a really hard time finding an instance geared toward you anyway.)

                                                                                              I couldn’t be the one to do it, but I wonder if it would make sense to make a handful of sports-centric nodes. It would probably attract a lot of users.

                                                                                            2. 1

                                                                                              And so instead of taking the time to make informed choices, these users would rather delegate that responsibilty to a corporation which then makes all sorts of important choices for them….

                                                                                              1. 12

                                                                                                I think it’s a bit flippant to say that they don’t make an informed choice. Some people really do prioritize their time over other things.

                                                                                                1. 3

                                                                                                  or they have no idea what advantages a decentralised system would provide, and completely overlook its existence

                                                                                                  1. 5

                                                                                                    or they don’t value the benefits the decentralised system provides, and consider the centralisation a pro.

                                                                                            1. 1

                                                                                              I suspect this will motivate some legislation to require all digital cameras embed a unique cryptographic signature in their images.

                                                                                              1. 1

                                                                                                It’s going to be interesting to see whether governments actually catch up with this, or whether it’s left to industry to respond to “market” demand for “video and photos that we can trust”. Seems like a pretty good case for regulation, in that when these techniques get good enough that we can’t tell whether they’re genuine or not (without getting into an infinite ML-turtle regression), pretty much all legal infrastructure that could ever rely on visual recordings as evidence is going to be up for grabs until there’s a way of proving the evidence is valid.

                                                                                              1. 2

                                                                                                I can think of a couple of stumbling blocks that might be in your way. First, how are you getting the leads in the first place? Are they coming from personal connections and referrals or are they from job boards? Your interview experience sounds like job boards. Personal connections can give you a “warm introduction” that pre-positions you as an advancing professional before you ever walk through the door or send in a resume. Friends and mentors can be a good place to start.

                                                                                                Second, your resume may be “coded” toward lower level positions. There’s a certain way of describing projects that emphasizes the strategic or large-scale work versus detailed work. Fair or not, people expect that detail work equates to entry level whereas work described in terms of its business impact equates to senior developer or architect. This also goes for “work on tech” versus “work on people.” Senior developers, tech leads, and architects spend as much time teaching, guiding, and mentoring the team as they do implementing the code.

                                                                                                The truth is that every position involves a combination of detail work and high level. People and code. But how you express those positions on your resume makes a statement about where your personal focus lies.

                                                                                                1. 1

                                                                                                  This seems like a niche begging for a product.

                                                                                                  1. 2

                                                                                                    You mean like Ubiquiti’s AmpliFi Teleport?

                                                                                                    1. 1

                                                                                                      Ubiquiti’s AmpliFi Teleport

                                                                                                      I hadn’t seen that before. Looks very useful.

                                                                                                  1. 0

                                                                                                    I’m a big fan of Alan Kay and the VPRI, but I always wondered why some of their most interesting projects (COLA by Ian Piumarta, for instance) never really got much traction. It seems to me that the dynamics of innovation have drastically changed since the PARC era. Now innovation seems much more social and decentralized, and new developments happen much more organically without the need for third-party funding. The open-source distributed model is actually quite effective, see the RepRap community in 3D printing. That being said, major breakthroughs or radical ideas are probably less likely to happen without proper funding, simply because they require a critical mass of people and initial time investment. However, I can’t help but see a lot of nostalgia from Alan Kay’s recent talks and writing. Maybe it’s time for other Alan Kays to emerge from the distributed innovation community?

                                                                                                    1. 2

                                                                                                      I wonder if an innovation needs a gradual shift from protected environment to public engagement. Really groundbreaking ideas can’t happen on a plan or in the spotlight. They take time away, as Alan says. But to go from breakthrough to impact on the world today takes vast investment from many people, usually under an open-source model. (Heavy funding can substitute for broadly distributed passion, of course.)

                                                                                                    1. 1

                                                                                                      This is really interesting! The author hypothesized an algorithm that may or may not be how it’s really done. But the demo video looked like it was learning the programmer’s characteristic errors.

                                                                                                      I’ve had alias mkae = 'make' in my .bashrc for years. I need this feature!

                                                                                                      1. 1

                                                                                                        I find this worrisome, since we still see nearly-daily browser hijacking exploits. It sounds like a cliche, but I have to clear out 3rd party “toolbar extensions” and “search enhancers” from my mother-in-law’s laptop about once a month.

                                                                                                        The idea that any of them could drive a payment API is troubling.