Hello everyone,
We’ve got a new preview of Eve v0.3 for you today, with two big enhancements. To download and run preview 3 yourself, follow the instructions on the Eve starter repository.
Let’s dive in and look at what’s new!
The Eve Syntax Returns
The parser for the Eve syntax returns in Preview 3. While the parser is included again, there’s still no editor bundled, so parsing a program written in the Eve syntax can accomplished in JavaScript like so:
import {Program} from "witheve";
let program = new Program("program name");
program.parseDoc(`some eve code`)
Where `some eve code` is a complete multiline Eve document (i.e. the contents of a *.eve file). A second method is to download eve-starter, and put your *.eve file in the “programs” directory. Then launch the program switcher (run npm start in the eve-start directory, then direct your browser to localhost:8000), and you will see your program listed in the left panel.
We also updated the example Eve applications for v0.3. This entailed removing any references to databases, and updating records to use the new namespaced tags. We haven’t documented the various watchers yet (e.g. html, svg, events) so if you’re curious how to use these, you can use the example programs as a reference for now.
Documentation Refresh
As part of this release, we’re also making available our [documentation refresh](http://docs.witheve.com/v0.3/). We’ve updated the layout to match the new Eve website, and we’ve added some summary documents to help new users get oriented in the language. These include:
These documents represent the minimum viable documentation to the Eve language. We hope you’ll take a look, and let us know if anything need more clarity or if we’ve omitted any important details. As we update the current docs for v0.3, they'll become available on the v0.3 docs site.
One other note about documentation -- from now on we’ll be maintaining documentation for the current and future versions of Eve. To that end, when you go to docs.witheve.com, you’ll currently see an option to select v0.2 or v0.3
program.load(“some eve markdown”)
--
You received this message because you are subscribed to the Google Groups "Eve talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eve-talk+unsubscribe@googlegroups.com.
To post to this group, send email to eve-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eve-talk/3c2590a9-b505-4808-82e6-cc8ca48872ff%40googlegroups.com.
Felix,
Yes, you can mix and match syntax. The blocks from the Eve syntax and the JavaScript Syntax compile into the same program. This is a nice example of how Eve blocks from two different interfaces compose without any additional work on your part.
That said, we’re not sure the JavaScript Syntax will make it to the full release. It was a nice experiment, but the Eve syntax is a better experience overall. We did an experiment, and wrote the same program in both the Eve syntax and the JavaScript Syntax.
Here I’ve mapped a histogram of characters used in each program. You’ll see not only are there more characters typed in the JavaScript Syntax, but there’s a much wider variety of characters.
In addition to just generally being harder to read and write, there are usability issues as well. For example, having to constantly import commonly used functions. Other slight differences between true JavaScript and our JavaScript syntax were more confusing than helpful. Code written in the JavaScript Syntax does not follow the principals of Eve.
Instead, we are thinking about allowing you to just write Eve code in strings like so:
program.block(`
search
[#hello]
bind
[#world]`);Enter code here...The watcher and function API could remain the same, so we would still maintain interoperability with JavaScript. What do you think of this idea? Did you like the idea of using the Eve Syntax and DSL side by side?
Ravil,
Right now we are focusing on the getting started experience for v0.3. Once that’s squared away, Josh’s next task is to start working with error messages. If you’d like, you guys could coordinate something, just to make sure work isn’t duplicated.
Zubair,
Eventually this quick start will be able to run in the editor, so we can provide a similar experience to play.witheve.com.
Best,
program.bind("Demo row.", ({record}) => {
let jeff = find("person", {name: "Jeff"});
return [
record("ui/text", {text: "Hi Jeff"})
];
});
program.block(`
search
jeff = [#person name: "Jeff"]
bind
[#ui/text text: "Hi Jeff"]
`);