Live data from Hacker News

Eve: Programming designed for humans

programming.witheve.com

251–260 of 401 posts

Re: Eve: Programming designed for humans

#251
post #144

Earlier quoted context omitted.

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…

Agreed, so then most programming systems are wrong if things are not obvious?

Well, it's just a code smell. Smelly code isn't necessarily wrong, it's just more likely to be wrong.

Sometimes a piece of code needs to be highly optimized to the point of being basically unreadable, at that point it's probably worth adding explanatory comments that you would normally avoid.

Re: Eve: Programming designed for humans

#252

The first question I always ask, and often the most deadly: How do you handle version control, and merge conflicts? If you don't have that figured out, none of the rest of this matters. Because a programming language designed for one developer isn't designed for building software.

What exactly is going to be the problem when all version control systems do is merge based on text differences? Also the block separation here could actually be used semantically and provide better merging than for existing languages.

Re: Eve: Programming designed for humans

#253

Earlier quoted context omitted.

I think what they mean by "human" is non-professional. All programming tools are for humans. But they're also almost exclusively designed with the expectation that the user will be able to devote afternoons, weeks, months, years to learning the tool. That's a fair expectation if your target audience is programming professionals... If it's your job, you can amortize those learning costs over some months of paychecks.…

> But spreadsheets were probably the last quantum leap in the field. > We're overdue for another. I'm working on it, and do think I have a solution. Unlike Eve, for example, you can (and we do) create (almost said "write", but there's no textual code) an OS kernel in it. And it's nothing like the approach Eve is taking, which I consider to be nothing like why spreadsheets were (and are) successful. To me, Eve is noth…

I tend to agree that Eve isn't quite the right direction. The REPL is important, so that's good. And one-click deployment, one-click forking of development environment, those things are critically important. But from there...

I agree the high-level stdlib is a problem. I think what we need is an easy-to-dip-your-toes-into environment that provides a path down into "real programming" and ideally down to metal.

I think the big problem isn't exactly UI or language or high enough level APIs, it's the way the APIs are structured. The two big issues I see with most tools are:

1) tendency to layer opaque frameworks on top of opaque frameworks which makes debugging down into the system difficult, if not impossible. (i.e. React) In this sense I think it's interesting that Eve is trying to build on top of itself. Anywhere there's an opaque layer you are putting a massive learning curve for anyone who is grappling with the finer details of that API.

2) declarative interfaces. (i.e. Ember) These require the programmer to have detailed knowledge of the inner workings of the runtime. Feels like we need tools that are made of primitives that the consumers of the tools have a clear path to understanding. There is this idea that the user will never have to understand how the tool works, but my experience is that you always eventually do. You always need to understand the layer below you, so the task is to make those layers easy to dip into... not to try to insulate your users from the details.

Eve seems to partly fail on both of these.

What does your approach look like?

Re: Eve: Programming designed for humans

#254

"An IDE like Medium, not Vim" What's wrong with Vim? I think they're trying to cater to "the non-programmer crowd" with this, but by trying so hard it's alienating real programmers. I love vim, and I hate Medium with passion. I'm sure there are a lot of other HN people who are not so much a fan of the types of people who just write meta posts, rant posts, listicle posts, self help posts, growth hacking posts on Mediu…

That's what I was thinking. I'm a human, I like my Vim and C. The main limitation of a language like that is that, if you care about performance at all, you have to program for the machine first, not for humans. You're always writing for both to some extent. For me this is the main challenge of programming; writing code that executes efficiently and correctly, and that is legible to humans. I love Python and other hi…

I'm not so sure. Granted, I might write html in vim, but I'd prefer writing Markdown or ReStructuredText. We could have a (subset of) full html in the hn comments - but it'd likely get in the way, rather than be helpful. Medium is a nice way to publish some text with images. Note the "with images" part. Vim is a much better text editor, but I don't think it's a very good hypertext editor. I don't necessarily need WYSIWYG all the time, but an object oriented/rich graphical editing environment certainly has its place.

I'm reminded of the original MVC paper[1] - about presenting an interface that matches the users mental model, through the interactive graphics and back into the computers internal data model.

Earlier it occurred to me how crazy it is that so many of our popular languages work on such primitive data structures still. The most obvious being null-terminated ascii strings in a globalized world - where ascii is effectively always the wrong choice (or at least, "not best"). But I'm thinking more about using any other structure than images, 3d models, databases. Why do we work so often with bare variables? I mean, in embedded programming, I guess it's interesting to think about two's compliment, overflow etc - but really. If we can't even handle numbers, vectors in a natural way - aren't we doing something terribly wrong?

The more I think about it, the more I come to believe that many of the ideas of hypertext, Smalltalk/Object Orientation, HyperCard, CAD/3D programs and 2d drawing packages (as well as decent DTP programs) are on the right track: let us use type information and other meta-data to manipulate structures - both "code" and "data" in richer ways. Let me see my code as a graphical finite state machine/diagaram. Allow me to work with my generated matrix as a heightfield in 3d and as a greyscale image. Let me visualize the steps of my sort algorithm, not just look at assembler in a debugger. Why not show me my stack(s) as 2d or 3d stack(s)? Not all the time, but when I want to?

I do like vim, for editing text, and working with our rather dumb programming languages, that might be considered "text+". But they're not really rich, they are hard to visualize, listen to, paint on. And for some things, that's fine. All we need is some text.

But I would argue most good history books has a few images, and maps. Rich media. Even math books do. Maybe the problem with fourth generation languages have been that they wanted to "fix" programming. Rather than just fix some parts, like Elm, with its natural integration of stepping back and forth in time.

Vim is a great tool - but it may be overspecialized on manipulating text: text objects, lines and letters. Those are not generally the semantic objects of programming (excepting perhaps those that make a living coding in brainfuck). I view lisp as a way to simplify "down" to text. And something like hypercard, smalltalk or the lively kernel project as attempts at simplifying "upward" -- to work with the structure. But that requires something beyond simple, human-readable text. You need to save a workspace, and a memory image. The systems acquire a lot of complexity in order to realize their simplicity.

But in case of lisp, the system is generally rather complex underneath. There's still compilation to machine code. There's still some kind of graphical interface, font rendering. Maybe what amounts to a different operating system who's only job is to boot your operating system that runs your lisp environment...

Personally I don't really think C is particularly simple. I still have to look at the assembly to know what's going on. And if the code ends up running on an Arm, or a CPU not yet invented, I'm still kind of lost. I don't really understand the details of how the assembly I can read, interacts with hyperthreading. In the end, what I really care about is the effect of the code - and that is really something I need to test and measure in the context of a running system. And the complexity of that, is likely so that I end up with sampling under various conditions, and doing some timing runs.

This "eagle view" approach doesn't mean I don't ever think about memory layout, algorithm complexity and such. But it does mean I rather rarely think about what actually happens deep inside the machine and the three cache layers.

[1] http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html

Re: Eve: Programming designed for humans

#255
I think the best way to introduce a new concept to someone is to do it in terms of something the person is already familiar with.

You can introduce programming by making an analogy with a cooking recipe, where you have ingredients (input), and a desired output (whatever the recipe is for). The recipe would process the input and through a sequence of defined steps, turn it into the output.

The average human is familiar with the concept of cooking to some extent so we can say that analogy would work "for humans".

This, in contrast, fast-forwards directly into some concepts like functions, how to evaluate functions, etc... and that's where I stopped reading. This is not "for humans". Might be a viable language, sure. But let's be objective, leave superlatives and weird claims aside.

Re: Eve: Programming designed for humans

#256
post #2

Hi All! Many of the folks here have been following us for a long time and we're really excited to finally pull everything together to show you all where our research has taken us. Eve is still very early [1], but it shows a lot of promise and I think this community especially will be interested in the ideas we've put together. As many of you were also big Light Table supporters, we wanted to talk about Eve's relation…

Are values/records in Eve immutable?

Re: Eve: Programming designed for humans

#257
post #32

Earlier quoted context omitted.

You can do this with Jupyter notebooks.

I just tried Jupyter... I couldn't figure it out. Could you post a link to a tutorial that I could use?

The easiest way (and the method I use) is to just use the version packaged with Anaconda. See: http://jupyter.readthedocs.io/en/latest/install.html#id3 .

There are also instructions on that page you can follow (installation via pip) if you already have a reasonably modern version of Python installed, and you have an appropriate C compiler available. This is a pain to configure if you are using a Windows machine.

Assuming the 'jupyter notebook' command succeeds, a browser window should pop up, displaying a UI for manipulating individual notebooks.

If you have already successfully completed the installation, and are instead looking for guidance on using Jupyter Notebook itself, then your best bet would be to look at some of the examples: https://try.jupyter.org/

Re: Eve: Programming designed for humans

#258

Sorry, but what about this is "designed for humans"? What do the keywords mean? What's the language paradigm? Why do I want this when it's essentially coalescing a lot of APIs into a language that you've provided no spec for? Why would I want my language to work with slack?! I'm not impressed. It just looks like another functional language with a bunch of addons tacked on to make things "easier" or "for humans". Drop…

The meat is that most programming languages are not designed for humans. Many weren't designed at all so much as hacked together for context they were originally used in with terrible consequences for learning or effective use by average person. C and early PHP probably lead that. Many others were affected by committee thinking, backward compatibility, preference of their designer, or the biases of people who previou…

Smalltalk was very consciously, and conscientiously, designed for humans.

Re: Eve: Programming designed for humans

#259
post #2

Hi All! Many of the folks here have been following us for a long time and we're really excited to finally pull everything together to show you all where our research has taken us. Eve is still very early [1], but it shows a lot of promise and I think this community especially will be interested in the ideas we've put together. As many of you were also big Light Table supporters, we wanted to talk about Eve's relation…

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

Rule of thumb: If comment and code disagree, usually both are wrong.

Re: Eve: Programming designed for humans

#260
post #144

Earlier quoted context omitted.

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…

You didn't solve the OPs problem, you just moved it around. In his case, his algo said X, and his code did Y.. very easy to see the mistake. In your case, lets add a comment // Note: PCI-DSS requirements apply below Now 3 years later, the law changes and the requirements do not apply. So you are at the same situation. Code does X, comments say Y. Which is right? Not a very easy to keep comments and code in sync

That comment I'd interpret as the requirements must be considered in this region; so if the law changes, the requirements still apply, it's just that the code needs to be updated.

Requirements are usually exogenous to the code.

Post reply on HN