News for hackers. Stuff that matters.
Re:The Future of Programming by ibdknox on Tuesday July 30, 2013 @03:30PM (#6129430)
Haha it sucks actually - I love talking about this stuff, but I know I really need to save it for my talk so I'm tearing myself to pieces trying to keep quiet.

I guess one thing I will say is that our definition of programming is all over the place right now and that in order for us to get anywhere we need to scale it back to something that simplifies what it means to program. We're bogged down in so much incidental complexity that the definitions I hear from people are convoluted messes that have literally nothing to do with solving problems. That's a bad sign.

My thesis is that given the right definition all of the sudden things magically "just work" and you can use it to start cleaning up the mess. Without giving too much away I'll say that it has to do with focusing on data. :)

Re:The Future of Programming by tiglionabbit on Tuesday July 30, 2013 @05:31PM (#6130189)
I feel the same way. As a programmer, I feel like there are tons of irrelevant details I have to deal with every day that really have nothing to do with the exercise of giving instructions to a computer.

That's what inspired me to work on my [nameless graph language](http://nickretallack.com/visual_language/#/ace0c51e4ee3f9d74...). I thought it would be simpler to express a program by connecting information sinks to information sources, instead of ordering things procedurally. By using a graph, I could create richer expressions than I could in text, which allowed me to remove temporary variables entirely. By making names irrelevant, using UUIDs instead, I no longer had to think about shadowing or namespacing.

Also, by avoiding text and names, I avoid many arguments about "coding style", which I find extremely stupid.

I find that people often argue about programming methodologies that are largely equivalent and interchangeable. For example, for every Object Oriented program, there is an equivalent non-object-oriented program that uses conditional logic in place of inheritance. For every curried program, there is an equivalent un-curried program that explicitly names its function arguments. In fact, it wouldn't even be that hard to write a program to convert from one to the other.

I'm pretty excited about the array of parallel processors in the presentation though. If we had that, with package-on-package memory for each one, message passing would be the obvious way to do everything. Not sure how to apply this to my own language yet, but I'll think of something.

Re:The Future of Programming by msutherl on Wednesday July 31, 2013 @01:59AM (#6132132)
Have you used any of the graph ("dataflow") environments in common usage?

Max/MSP, Pure Data, vvvv, meemoo, Quartz Composer, Touch Designer, LabView, Grasshopper, WebAudioToy, just to name a few.

Re:The Future of Programming by tiglionabbit on Wednesday July 31, 2013 @03:46AM (#6132381)
I have. I should play with them more, since I don't quite get DataFlow yet.

I'm used to JavaScript, so that's what I based my language on. It's really a traditional programming language in disguise, kinda like JavaScript with some Haskell influence. It's nothing like a dataflow language. On that front, perhaps those languages are a lot more avante-guarde than mine.

Re:The Future of Programming by mietek on Tuesday July 30, 2013 @11:03PM (#6131669)
> I'm pretty excited about the array of parallel processors in the presentation though. If we had that, with package-on-package memory for each one, message passing would be the obvious way to do everything.

Chuck Moore, the inventor of Forth, is working on these processors.

http://www.greenarraychips.com/home/products/index.html

It hasn't been an easy road.

http://colorforth.com/blog.htm

Re:The Future of Programming by pshc on Tuesday July 30, 2013 @07:19PM (#6130782)
>By making names irrelevant, using UUIDs instead, I no longer had to think about shadowing or namespacing.

I've been trying to do something similar with a pet language :) Human names should never touch the compiler, they are annotations on a different layer.

But writing an editor for such a programming environment with better UX and scalability than a modern text-based editor is... an engineering challenge.

Re:The Future of Programming by tiglionabbit on Tuesday July 30, 2013 @07:33PM (#6130847)
What do you think of my graph editor?

It's not perfect, and making lambdas is still a little awkward because I haven't made them resizable. Also, eventually I'd like the computer to automatically arrange and scale the nodes for you, for maximum readability. But I think it's pretty fun to use. It'd probably be even more fun on an iPad.

I'd love to make my IDE as fun to use as DragonBox

Re:The Future of Programming by pshc on Tuesday July 30, 2013 @08:01PM (#6130976)
I think it's really nice! Usually these flow-chart languages have difficult UI, but this one is pretty easy to mess around in.

It would be good if, while clicking and dragging a new connection line that will replace an old one, the latter's line is dimmed to indicate that it will disappear. Also, those blue nodes need a distinguishing selection color.

It sounds like you're aiming more toward a fun tablet-usable interface, but:

Have you thought about what it would take to write large programs in such an editor? For small fun programs a graph visualization is cool, but larger programs will tend toward a nested indented structure (like existing text) for the sake of visual bandwidth, readability of mathematical expressions, control flow, etc.

Re:The Future of Programming by tiglionabbit on Tuesday July 30, 2013 @08:48PM (#6131145)
There actually is a rather large program in there: http://nickretallack.com/visual_language/#/f2983238d90bd3e0a...

Use the arrow keys to move the box around. I suppose that's still a bit primitive, but I'll make some more involved programs once I fix up the scoping model a bit.

When I first started on this project, I thought at some point I would need to make a "zoom out" feature, because you might end up making a lot of nodes in one function. However, I have never needed this. As soon as you have too much stuff going on, you can just box-select some things and hit the "Join" button to get a new function. The restricted workspace actually forces you to abstract things more, and the lack of syntax allows you to reduce repetition more than would be practical in a textual language.

For example, in textual languages, reducing repetition often requires you to introduce intermediate variables, which could actually make the program's text longer, so people will avoid doing it. However, in my language you get intermediate variables by connecting two sinks to the same source. The addition in program length hardly noticeable.

Re:The Future of Programming by morpher on Tuesday July 30, 2013 @06:18PM (#6130473)
Your visual language looks a lot like labview. I'm on a phone on a bus and haven't dug in too far, but have you used labview before?
Re:The Future of Programming by tiglionabbit on Tuesday July 30, 2013 @07:24PM (#6130811)
I'd like to try labview, but doesn't it cost lots of money? I guess I'll sign up for an evaluation copy.

The closest things to my language that I have seen are Kismet and UScript. Mine is different though because it is lazily evaluated and uses recursion as the only method of looping.

Some other things that look superficially similar such as Quartz Composer, ThreeNode, PureData, etc. are actually totally different animals. They are more like circuit boards, and my language is a lot more like JavaScript.

Re:The Future of Programming by nathana on Wednesday July 31, 2013 @03:53AM (#6132410)
Buy yourself a LEGO Mindstorms NXT kit. $200 USD. The LEGO NXT programming environment is a scaled-down version of LabVIEW.
Re:The Future of Programming by tlarkworthy on Tuesday July 30, 2013 @07:31PM (#6130839)
Nice but still classical programming. I personally think if statements are the problem. The easiest languages are trivial ones with no branching. Not Turing complete, but they rock when applicable e.g. html, gcode
Re:The Future of Programming by tiglionabbit on Tuesday July 30, 2013 @08:36PM (#6131109)
That's true. I intended it to be feature-comparable with JavaScript, since I think JavaScript is a pretty cool language, and that is what it is interpreted in.

I don't think it is possible to make a program without conditional branches.

Somebody posted a link below about "Data Driven" design in C++. In it was an example of a pattern where each object has a "dirty" flag, which determines whether it needs processing, but they found that failing branch prediction here took more cycles than simply removing the branch.

My thought was, instead, what if you created two versions of that method -- one to represent when the dirty flag is true, and another to represent when the dirty flag is false -- and then instead of toggling the dirty flag, you could change the jump address for that method to point to the version it should use. If this toggle happens long enough before the the processor calls that method, you would remove any possibility of branch prediction failure =].

I have no idea if this is practical or not, but it is amusing to consider programs that modify jump targets instead of using traditional conditional branches.

Re:The Future of Programming by xitrium on Wednesday July 31, 2013 @12:13AM (#6131856)
In actual compiled code, conditional branches (without branch prediction) are translated to jumps to different targets, which are specified inline with the instructions. Specifying a modifiable target would mean fetching it from a register (or worse, memory) and delaying execution until the fetch is complete (several cycles minimum on a pipelined machine). With branch prediction, instructions are predicated on a condition inline and we avoid the costly jump instructions.

Read more: http://en.wikipedia.org/wiki/Branch_predication EDIT: Also: http://en.wikipedia.org/wiki/Branch_predictor

I think we more commonly use the latter, which tries to guess which way the code will branch and load the appropriate jump target. It's actually typically very successful in modern processors.

Re:The Future of Programming by tiglionabbit on Wednesday July 31, 2013 @03:49AM (#6132400)
What if it modified the program text, instead of some external load-able value? Self-modifying code could allow explicit branch prediction.
Re:The Future of Programming by tlarkworthy on Friday August 02, 2013 @05:36PM (#6149832)
I think we need to shift to a different model ... like liquid flow. Liquid dynamics are non-linear (ie. computable), yet a river has no hard IF/ELSE boundaries, it has regions of high pressure etc. which alter its overall behaviour. You can still compute using (e.g. graph) flows, but you don't get the hard edges which are a cause of bugs. Of course it won't be good at building CRUD applications, but it would be natural for a different class of computational tasks (e.g. material stress, neural networks)

(PS angular-js has done all that dirty flag checking if you like that approach)

Re:The Future of Programming by psgibbs on Tuesday July 30, 2013 @06:22PM (#6130495)
I don't get it, why are you afraid of scooping yourself?

In the same way that HN frowns upon stealth startups, shouldn't we frown upon 'stealth theories'? If your thoughts are novel and deep enough, revealing something about them will only increase interest in your future talks, since you are definitionally the foremost thinker in your unique worldview. If the idea fails scrutiny in some way, you should want to hear about it now so you can strengthen your position.

What's the downside, outside of using mystery to create artificial hype?

Re:The Future of Programming by jpadkins on Wednesday July 31, 2013 @02:23PM (#6135805)
can't speak for the thread starter, but one downside to prematurely talking about something is confusion. Half formed thoughts, rambling imprecise language, etc can create confusion for his audience. The process of editing and preparing for a talk makes it more clear and concise. Maybe he is not ready yet to clearly communicate his concepts yet.
Re:The Future of Programming by groby_b on Tuesday July 30, 2013 @03:40PM (#6129501)
This reminds me of the "data-oriented design" debate that's been raging in game programming for a while. I assume you've seen e.g. http://harmful.cat-v.org/software/OO_programming/_pdf/Pitfal... (or similar papers)
Re:The Future of Programming by ibdknox on Tuesday July 30, 2013 @03:46PM (#6129532)
I actually have a post about data-centricity in games, though from a very different angle. http://www.chris-granger.com/2012/12/11/anatomy-of-a-knockou...
Re:The Future of Programming by johnrob on Tuesday July 30, 2013 @04:16PM (#6129716)
It seems like one large breakthrough in programming could simply be using the features of a language in a manner that best suits the problem. That's what I get from your blog post: design for what makes sense - not for what looks normal during a review. One thing I envy from LISP is that there seem to be few 'best practices' that ultimately make our applications harder to modify.
Re:The Future of Programming by taeric on Tuesday July 30, 2013 @09:09PM (#6131228)
That should have a nice catch phrase "solidified into disaster by 'best practices'"?
Re:The Future of Programming by casual_slacker on Wednesday July 31, 2013 @01:53AM (#6132110)
I've been thinking a lot about such issues too; particularly the pain points I have when ramping up against new systems. What information is missing that leaves me with questions? Can code deliver something thorough enough to be maintainable as a single source of truth?

I think, the differences between reading and writing code are as big as sending and receiving packets. It's difficult to write code that extrapolates the base information in your head driving the decisions. Not only that, but you also have to juggle logic puzzles as you're doing it. And on the other side, you have to learn new domain languages (or type hierarchies), as well as what the program is supposed to do in the first place.

I think the idea of interacting with code as you build it is great, but how can we do that AND fix the information gap at the same time?

Re:The Future of Programming by ericHosick on Tuesday July 30, 2013 @08:06PM (#6130993)
> definition of programming is all over the place

I agree.

For example, people do seem to assume that programming must involve, in some way, coding. Do we really need to code in some programming-language to be programming?

Changing security settings, for example, in a browser lead to quite different behaviors of the program. Isn't the user of the browser programming because they change the behavior of the program?

And this leads to....

> with focusing on data

If we focus on data, and hopefully better abstractions on how to manipulate that data, then wouldn't any user able to alter a program because they can adjust "settings" at almost any point within the program: in real time.

Wouldn't this then enable a lot more people to become programmers?

Anyway, just some thoughts.

Re:The Future of Programming by astrobe_ on Tuesday July 30, 2013 @09:04PM (#6131204)
The difference between setting parameters and programming is obviously that programming allows the creation of new functions. "Coding" is literally the act of translating a more-or-less formally specified program (that is, a set of planned actions) into a particular computer language. However, if being a programmer was only like being a translator, programming wouldn't be too hard for mere mortals. That's on the other part - the one that involves methods, logic, knowledge like the CAP theorem - they have problems with. The fact is, not every one can re-discover the bubble sort algorithm like we all here did when we were 8 or so. That's why we are programmers, and that's why they are not (and don't even want to be -- but they are nonetheless nice people and have other qualities, like having money). And these problems don't vanish if you switch from control-flow to data-flow or some bastardized-flow; they just change shape.
Re:The Future of Programming by ericHosick on Tuesday July 30, 2013 @09:58PM (#6131430)
As some people have mentioned in this HN post, it is hard to define what programming means.

A program is the result of the automation of some process (system) that people have thought up (even things that couldn't exist before computers). Programming is the act of taking that process (system) and describing it in a computing device of some kind.

Programming currently requires some kind of mapping from the "real world" to the "computer world". The current mapping is done primarily with source code. So, it currently seems that people who are good at programming are good at mapping from the "real world" into the "computer world" via coding.

You seem to be making the point that some people are just good at programming because they can do things like "re-discover the bubble sort algorithm" or understand CAP theorem. These are very domain specific problems.

For people who are able to "re-discover inventory control management" they would do a great job of automating it (programming) if they had an easier way to map that process (system) to a computing device.

The ultimate goal (other than maybe AI) is a 1-to-1 mapping between a "real world" process (system) and a computing device that automates it.

Re:The Future of Programming by stelonix on Tuesday July 30, 2013 @04:04PM (#6129643)
I'm working on a system based on Bret Victor's "Programming in Principle" talk. I believe to achieve such a system, you need to find a way to add semantics to code, as well as the utilization of proofs in order to have enough constraints that your environment is seamlessly self-aware while at the same time extensible.

I'm curious what you mean by data though. Is it data in the "big data" sense? What I mean is, are we talking about gathering a lot of data on coding? My approach is based on that, anyway: lots of data on code with a number of different analyzers (static and dynamic) that allows for extraction of common idioms and constraints, while allowing for the system to more easily help the user.

Of course, there's no magic and a lot of times I reach dead-ends, and while I'm eager to have enough to show the world, progress has been kinda slow lately.

Looking forward for your talk, be sure to link here on HN.