Live data from Hacker News

Eve: Programming designed for humans

programming.witheve.com

161–170 of 401 posts

Re: Eve: Programming designed for humans

#161
post #146

While this is a very early version, something like it will eventually put most programmers out of work. Probably it'll be another language/tool and it won't be very soon, but at some point writing trivial software will actually be trivial. It's ironic, being a programmer that automates things that people used to do manually, and kind of doing good but leaving someone unemployed. How fitting it will be to suddenly bec…

If we create an AI that can write software, no one in any profession will ever need to work again. So far all this has shown is it can places buttons on a form. Try building a path finding algorithm with it, that is actually performant enough to run inside a 60fps game engine across open terrain, and I think you'll find C++ isn't going anywhere yet.

Re: Eve: Programming designed for humans

#162

Earlier quoted context omitted.

Right, this is exactly the argument we are making. Given just the block of code above, we don't know enough to make the determination. Who is right? We can't possibly no without more. That's why commenting code is not enough, and that's why literate program is important. Imagine if you came across this in actual code. You might first check if the code was changed recently and by whom, and whether the comment or the c…

You didn't address at all what forces the programmer to keep the prose and code in sync. If you still have code that's read and translated by the compiler, and prose that's ignored by the compiler completely, how have you actually changed anything?

Well, I don't think anything can force the programmer to keep the prose and code in sync. The best we can do is give you an incentive to do so. The argument that was presented is that comments will get out of sync with code, but we're trying to provide tooling that will incentivize you to keep code and comments in sync.

I'd also like to say that if code is easier to read in the first place, there will be more eyes on it, and discrepancies will be resolved sooner. In most programming environments, a comment might describe a part of a much larger function. But the output of this code is far removed from the actual source. So discrepancies between comment and source are harder to spot.

It Eve, we intend these documents to be for more than just programmers. Who again, might not understand your code, but would understand the written prose and see the output /right there in the code/ that contradicts it. A bug like this would be brought to your attention much sooner than if your code was simply hosted as on GitHub.

Re: Eve: Programming designed for humans

#163

Earlier quoted context omitted.

A possible reason you were initially downvoted is that your interpretation doesn't seem terribly likely because the team gives off no air of looking down on anyone. Your edit sure won't help anything, the aggression is just uncalled for.

> Your edit sure won't help anything, the aggression is just uncalled for. Ok bud, shall we call an emergency UN meeting to discuss my 'aggression'?

I had no idea one had to involve the UN to unlock the downvote button! Serious business that.

I've avoided it myself as you seem to be quite "triggered" over losing a few meaningless points on the internet. I hope the rest of your day goes better.

Re: Eve: Programming designed for humans

#164
post #144

Earlier quoted context omitted.

So your defense of literate program gives, as a defense, what I would think of as an attack on literate programming: Take this strawman for instance, how could you find the bug in the following code without the accompanying comment? // Print every other line of the array to the console for (var i = 0; i Because the problem with that is that now you have two competing sources of authority -- the comment, and the code.…

This is why comments that specify what the code does are a "code smell". Comments should explain things that are not obvious from the code. Comments should be things like // Note: PCI-DSS requirements apply below // Must check status register and FIFO to determine completion due to flaky hardware // Algorithm below is modified Knuth-Morris-Pratt // This is O(scary), but seems quick enough in practice. (Now, if someon…

Most coding editors (even the "deprecated since the 70ies" Vim) shall let you follow links you put in comments. For someone who likes to have as much code as possible on a single screen, this is the best option.

Re: Eve: Programming designed for humans

#165
post #31

This smells like a game maker app, in the sense that it's hiding "all that messy coding stuff" behind "a simple friendly interface." Programming isn't about syntax. It's about telling the computer exactly what you want it to do, in every possible situation. The hard part isn't the language you use to tell the computer what to do. The hard part is making sure the instructions you're giving match what you want to happe…

Based on the name alone it seems like an attempt to get more women involved in computer programming.

Re: Eve: Programming designed for humans

#166
post #144

Earlier quoted context omitted.

So your defense of literate program gives, as a defense, what I would think of as an attack on literate programming: Take this strawman for instance, how could you find the bug in the following code without the accompanying comment? // Print every other line of the array to the console for (var i = 0; i Because the problem with that is that now you have two competing sources of authority -- the comment, and the code.…

This is why comments that specify what the code does are a "code smell". Comments should explain things that are not obvious from the code. Comments should be things like // Note: PCI-DSS requirements apply below // Must check status register and FIFO to determine completion due to flaky hardware // Algorithm below is modified Knuth-Morris-Pratt // This is O(scary), but seems quick enough in practice. (Now, if someon…

+1 for images. It's been my main reason for looking into tools like doxygen

Re: Eve: Programming designed for humans

#167
post #144

Earlier quoted context omitted.

So your defense of literate program gives, as a defense, what I would think of as an attack on literate programming: Take this strawman for instance, how could you find the bug in the following code without the accompanying comment? // Print every other line of the array to the console for (var i = 0; i Because the problem with that is that now you have two competing sources of authority -- the comment, and the code.…

This is why comments that specify what the code does are a "code smell". Comments should explain things that are not obvious from the code. Comments should be things like // Note: PCI-DSS requirements apply below // Must check status register and FIFO to determine completion due to flaky hardware // Algorithm below is modified Knuth-Morris-Pratt // This is O(scary), but seems quick enough in practice. (Now, if someon…

A state transfer diagram would probably be more useful as a view on the code (similar to how the Smalltalk browser is a simple graphical representation/layout of code. Or indeed any IDE with advanced code folding (show me the class name and public methods only).

But there's ways to mix the two: Python doctests is one. The lp approach is to "escape" the code, not the comments. I really do think some richer data structure than flat text files is needed - simple multi-/hyper-text seems like a minimum. Not only links (most ides have this: hoover to display help, click to goto definition etc).

Why so few seem to successfully add vector graphics and diagrams I don't know. I guess jupyter / ipython might be a rare breath of air. But who really wants to maintain 10k locs of code and 15k locs of tests in ipython notebooks?

We need something more (lively kernel might be more interesting here - webdav for persistence Web browser for run/edit/view - I'm not sure if the required power Canberra realised any simpler).

Re: Eve: Programming designed for humans

#168

Earlier quoted context omitted.

Right, this is exactly the argument we are making. Given just the block of code above, we don't know enough to make the determination. Who is right? We can't possibly no without more. That's why commenting code is not enough, and that's why literate program is important. Imagine if you came across this in actual code. You might first check if the code was changed recently and by whom, and whether the comment or the c…

You didn't address at all what forces the programmer to keep the prose and code in sync. If you still have code that's read and translated by the compiler, and prose that's ignored by the compiler completely, how have you actually changed anything?

Every company needs a human-readable definition of what a product does. There is no way to eliminate the problem of keeping prose and code in sync. Traditionally, we just hide the problem by keeping the prose and code entirely separate. Keeping them together makes it harder for them to drift apart.

Re: Eve: Programming designed for humans

#169

Earlier quoted context omitted.

So your defense of literate program gives, as a defense, what I would think of as an attack on literate programming: Take this strawman for instance, how could you find the bug in the following code without the accompanying comment? // Print every other line of the array to the console for (var i = 0; i Because the problem with that is that now you have two competing sources of authority -- the comment, and the code.…

Right, this is exactly the argument we are making. Given just the block of code above, we don't know enough to make the determination. Who is right? We can't possibly no without more. That's why commenting code is not enough, and that's why literate program is important. Imagine if you came across this in actual code. You might first check if the code was changed recently and by whom, and whether the comment or the c…

Your example doesn't make sense to me. If I see a comment that says something different from what the code does I assume that the comment is wrong and I do a simple blame that will show me the jira that has been implemented in that code to double check. For sure I don't need to read all that is specified in the Jiras whenever I look at any piece of code. The code explains itself quite well. If you write code that is not understandable then that is the problem, and adding thousands of comments in the form of documents will only make the things worse instead of solving your problem.

Re: Eve: Programming designed for humans

#170

I think that Eve is tackling the wrong problem. Allow me an analogy: "Bronk, the math designed for humans." Instead of dense algebraic expressions like "3x+49", you get to write "thrice the value of x plus 49." You may consider this a straw man, but I think that if you look hard at existing programming languages, you'll see that they are all designed for humans, and that the challenge in programming is in formulating…

There's still code here, the text is just for people, so I wonder if this is maybe a misunderstanding.

The language presented is a variant of datalog and is as formal as any other language. If you're curious in the semantics, they boil down to Dedalus [1].

As a simple example of that, here's a clock: http://play.witheve.com/#/examples/clock.eve

[1]: https://www2.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-...

Post reply on HN