Live data from Hacker News

Ask HN: Which people and groups are researching new approaches to programming?

news.ycombinator.com

101–110 of 123 posts

Re: Ask HN: Which people and groups are researching new approaches to programming?

#101
Wow, these comments mentions lots of work I wasn't aware of! We've been building a community of people working in this area: the Future Programming Workshop. http://www.future-programming.org/ We will all do better if we get together to exchange ideas and criticism. Suggestions for improving FPW are welcome.

Re: Ask HN: Which people and groups are researching new approaches to programming?

#102
post #52

https://treeline.io/ YC company run by Mike McNeil. Visual backend programming. Built off Node, Sails and Machine Spec. The latter is particularly interesting: http://node-machine.org/

@rl3 Thanks for the mention :)

@maryrosecook I'm glad this post showed up in our Slack feed- really cool topic! As I'm sure you've noticed from the volume, variety, and impressive comments in this thread, improving approachability/usability for software development is an exciting (albeit broad) effort, and there is a lot of amazing work underway. In the area of declarative programming specifically, there's a lot still to do, but as a community we're getting really close. That said, there is far too much work to do here for any one team to do it by themselves.

To be successful, or at least to expedite the process of democratizing software development, I believe we need to establish a common set of semantics for describing _what software is_. And the first step towards that is deconstructing functions-- or perhaps more accurately: "subroutines".

The rest of the Sails.js core team and I have been working on this problem for quite some time now, primarily as a reaction to having to build plugin system after plugin system in Sails as the framework's user base grew, and getting frustrated with every plugin system being a little bit different. After we had our first working prototype of the tech that would become Treeline, we extrapolated and open-sourced the machine specification and related utilities as a way of exposing building blocks for other devs to reuse for their own projects.

To add a little background, machines are stateless building blocks; nothing fancy. They're more or less equivalent to asynchronous functions in JavaScript, just highly specified. In particular, machines encapsulate definitions of their inputs, their exits, and whether they are "cacheable", just "idempotent", or neither (and therefore have side effects). Machines are oftentimes implemented as JavaScript functions-- although part of the project's philosophy is that what's important is the _usage_, not the implementation.

From the perspective of a traditional "intro to programming", an example of a machine is `moveTurtleDown()`: https://gist.github.com/mikermcneil/864b930a67b0d00d3d8b

As a more practical example, here's the documentation for a handful of machines related to string manipulation: http://node-machine.org/machinepack-strings (To try any of them out, just copy and paste the generated sample code into e.g. a Tonic sandbox: https://tonicdev.com/npm/machinepack-strings)

Each of a machine's expected inputs may be required or optional (with a potential default value) and declare a type schema. Each of its exits may optionally declare a return value, and if so declare a type schema for it. In addition, machines have strict conventions for meta properties (e.g. the machine `description`, which summarizes the machine's behavior when run, is ~80 characters or less of English, written in the imperative mood and in sentence case with ending punctuation)

This can be used to generate documentation, code for interactive form elements, or in the case of the default machine runner, runtime type validations.

But most important of all, once a piece of code is written to the machine spec and open-sourced, it can be used by any tool or platform which consumes that spec (think USB).

As an example, in Treeline we use machines as draggable/droppable components that you can compose into what we call a "circuit"; which can _itself_ be used as the implementation of another "composite" machine with its own inputs and exits (vs. an "analog" machine; i.e. a machine implemented with JavaScript code). We are planning to publish the circuit spec and related tooling for composite machines later this year. In the mean time, the analog machine spec is stable and ready to use. Around 500 MIT-licensed machines are available today on NPM, with generated documentation hosted on the Node Machine registry.

Hopefully that was a helpful first look- if I can help explain further or if you'd like to discuss the project roadmap, just hit me up on Twitter. It's really awesome to see so much new interest and progress in this tech, and particularly in the context of education. Excited to see where you go with CodeLauren!

Re: Ask HN: Which people and groups are researching new approaches to programming?

#103

I think "visual" programming is the incorrect approach, something I would like to see more of is "tactile-spatial" programming. Anybody have an example of these? Most work I've seen is visual/flowchart which is not optimal for touch devices or large projects.

I've been thinking about this a lot; the problem I keep coming up against is abstraction. If you do allow abstraction, then the temptation is to make everything doable with a pinky finger. If you don't allow abstraction...

On the other hand, we do have two good examples: emacs and paredit. We don't abstract away text because we haven't really figured out how (some in this thread are trying, but the exceptions prove the rule), and parentheses we just abstract into fewer parentheses.

The point being: the medium must remain the same for the pleasant feeling of muscle memory to occur.

One interesting point is programming paradigms; a paradigm is (among other things) a relatively constrained set of actions one takes. Were programming changed to a more physical activity, one could imagine watching a developer and discerning, "ah, the object-oriented style," much as popular imagination imagines a martial artist watching another fight and discerning his style.

The last idea I'm having as I write this: I have also worried about "be careful what you wish for." Do we really want to repeat the same gross movements not as comfort demand, but as the code requires?

So one idea I have is: what if you tied certain operations/manipulations not to body movements, but to aspects of that movement. Short, staccato movements of any kind might correspond to indents or whatever: what's important is that one can do short staccato movements while walking, or golfing around with a pen, or reaching for a snack.

Weird stuff, just throwing it out there.

Re: Ask HN: Which people and groups are researching new approaches to programming?

#104
post #76

Earlier quoted context omitted.

My language is not only about user defined syntax; it's also about user defined code generation. For example, you can define your own syntax that compiles directly into a DB stored procedure or into GPU shader, or into whatever technology that might be invented in the future, like for example quantum computing. In fact, it's less about user defined syntax than it is about user defined code generation as I am trying t…

That's what macros are in Lisp and Scheme.

Does scheme give you access to the compiler's internal data structures? Can you for example write an extension that scans through the compiled code looking for, say, for loops and replacing them with something else?

Re: Ask HN: Which people and groups are researching new approaches to programming?

#105
post #97
post #46

Earlier quoted context omitted.

Also check out datalog. Datomic is a database that uses it as its query language -- it is really nice to work with.

Datalog not "click" to me. Is weird to understand and another uncommon programming model, and think that the ideao of build a relational language exhaust the limit of paradigm switch for my potential users. However I wonder if can be used as a internal engine and will provide efficient/easier backend for all the relational stuff?

It's almost 'free' if you know even just basic Prolog.

I learnt it before Prolog, and personally really like it, much more than I do SQL. It's a slightly different mindset - "what is a result" rather than "how do I go about finding a result" - but one that I found more intuitive in an Intro to DB course.

Re: Ask HN: Which people and groups are researching new approaches to programming?

#107

http://urbit.org/docs/theory/whitepaper

This sounds amazing. It's almost exactly what I've been wanting to do, on an even grander scale, and by people with much greater chance of it working (even if it's only ever 'beta quality') than I would!

"Re-inventing the wheel" is a phrase usually used in derogatory manner, but it's computing has changed so much in its brief lifetime that I've often wondered why we haven't started over; shed things we don't need any more, and built everything as we would today with all those lessons learned.

It's too easy to be confused over or not sure how to accomplish something Unix-y, and for the answer to begin with "oh well because originally", or "well, you see, in the eighties.."

Re: Ask HN: Which people and groups are researching new approaches to programming?

#108
post #104

Earlier quoted context omitted.

That's what macros are in Lisp and Scheme.

Does scheme give you access to the compiler's internal data structures? Can you for example write an extension that scans through the compiled code looking for, say, for loops and replacing them with something else?

Macro expansion happens just before compilation; you have the chance to alter the source code as it's being read by the reader just before compilation.

But I see what you're getting at; you mean global modifications to the compiler to interpret the whole language differently. A macro allows you to make syntax, but it doesn't change the meaning of other syntax elsewhere in the program; only allows the programmer to add syntax to the language.

Re: Ask HN: Which people and groups are researching new approaches to programming?

#109
post #52

https://treeline.io/ YC company run by Mike McNeil. Visual backend programming. Built off Node, Sails and Machine Spec. The latter is particularly interesting: http://node-machine.org/

@rl3 Thanks for the mention :) @maryrosecook I'm glad this post showed up in our Slack feed- really cool topic! As I'm sure you've noticed from the volume, variety, and impressive comments in this thread, improving approachability/usability for software development is an exciting (albeit broad) effort, and there is a lot of amazing work underway. In the area of declarative programming specifically, there's a lot stil…

Just checked out the node-machines.org and theJsDot presentaion there. Many parts of it has paralells to things I'm playing around with[1]. What are the reasons for not going with an established concepts for the machines? Like contracts for specifying pre-conditions (input requirements) and post-conditions? Or Promises for error vs success scenarios?

1. https://github.com/jonnor/projects/blob/master/introspectabl..., maybe especially Agree

Re: Ask HN: Which people and groups are researching new approaches to programming?

#110

Earlier quoted context omitted.

That's what macros are in Lisp and Scheme.

Macros generate assembly?

Macros generate code, any code you want, including inline assembly if the scheme supports inline assembly, if not no.
Post reply on HN