--
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+u...@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/fd31efba-7186-4ebf-b663-d25d91befcf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@thierry
> What is the rationale for removing databases? Writing data driven programs without databases will be hard to explain to newcomers.
Databases seemed like a pretty intuitive and straightforward idea at the time, but we actually found it was one of the biggest sources of confusion for newcomers. The problem was you had to not only think about the presence of records, but the presence of records in specific places. Whatsmore, the concept of databases made records a leaky abstraction; when you dealt with records that spanned multiple databases, you had to consider the subset of the record that existed in one database versus another. This commonly cropped up with events, where the event itself was in @event, but the element attribute held a reference to a record in the @browser database, which in turn could possibly hold references to records in the @session DB.
Users faced problems of UI not being displayed because it wasn't in the @browser database. Another problem was when using multiple databases, it was difficult to keep track of what was where. This could have been solved with a database explorer, but it would still lead to code that looked like this:
```
search @browser @event @session
[#click element: [#div children: [#foo]]]
```
It's not clear what is coming from where in that case. Databases will be replaced with explicit namespacing on tags (which we will probably call groups). Some benefits of this direction:
1 - you no longer have to worry about "where" a record is located. If you search for the right shape, you'll find the record.
2 - you can write special rules for groups in Eve itself instead of having to worry about custom "blessed" databases with opaque rules. If you want to know the rules associated with a group, you can just look them up, and even modify them yourself to get custom behavior.
3 - because of 2, this means a record gains the properties of the group simply by becoming a member of that group. This paves the way to things like permissions.
@owen
Thanks for taking the time to present your suggestions. Let me address some of your points, to let you know how we’re handling your concerns:
> With the new database-less syntax, how will I indicate that something should translate to an “external” HTML element?
Databases are being replaced with explicit namespacing. So instead of putting records in the `@browser` database, you'll put them in the "html" namespace. To render a div, you would write this
```
commit
[#html/div text: “Foo”]
```
Which at the low level would look like this:
```
commit
[#html/element tagname: "div" text: "Foo"]
```
Unfortunately this makes html records a little more verbose, but it also means we've removed a special case from the language and made it more uniform, so there's one less thing to explain/learn. So no, there are no "blessed" tags anymore, but there are namespaces that have special meaning. This also means that you can write special rules to confer this meaning in Eve itself. This wasn't possible before with databases.
> The overloading of “#“ to mean “one of an arbitrary set of tags” as well as “the html tag name which is used to match an element” feels inherently dangerous, especially given Eve’s lack of order.
As you can see in the example above, we don't give special meaning to tags in the case of the renderer anymore. The type of an elements is now explicitly called out in the record, so there isn't any confusion. Users have run into the problem you describe, so this will fix that issue.
> The use of <> to output elements can inherently signal to eve “order is important for the stuff in here.”
I definitely agree with you that having to do this is onerous. Writing UI is not one of the strengths of Eve at the moment. That said, instead of adding order in special cases, I think we have opportunities to lessen this pain in other areas. In general, our philosophy is keep the language small and uniform, and handle sharp edges with good tooling.
Since we're still very much in the language development phase, a dearth of tooling exposes our rough edges. I think if the text syntax were the end-point for our language, your angle bracket suggestion would work out pretty well. But wouldn't it be better to have a graphical UI builder, something like Sketch, that interfaces directly with Eve? We explored a prototype here (http://incidentalcomplexity.com/2015/07/02/mar-jun/) which worked pretty well given how rough it was, so we'd like to do something like this again in the future. This would allow us to sidestep the order issue in the language, and give us a tool that is better than both what we have now and keep the language small.
> Maybe I just haven’t spent enough time in LISP to like the 100’s of parentheses thing, but I find the above really tedious to read and work with.
I agree fully. I've never been a huge lisp user, and there's a reason most lisp tooling focuses on making parenthesis easier to work with. In the programs we've written, the proliferation of parens usually occurs only in UI, where elements tend to be deeply nested. In non-UI eve code, records end up being flatter, so this issue isn't as painful. That said, I think there are still some tooling solutions here for us as well (matching paren highlighting, auto closing parens, or even rainbow coloring parens)
> In many cases, with the <> syntax, I may be able to copy and paste static HTML into an input or output block and then just decorate it with “variables”.
This is a very good point, but I think again we might have a good tooling solution here. For example, in a UI specific editor there could be a way to import HTML, and then you can bind Eve records into the template you paste in. This would effectively turn static HTML into a live site backed by data pretty quickly.
Corey
--
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+u...@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/6c1488f1-c700-48ce-bf11-011e05cfb9a5%40googlegroups.com.
To render a div, you would write this
```
commit
[#html/div text: “Foo”]
```
On Apr 29, 2017, at 9:11 AM, Zubair Quraishi <zub...@gmail.com> wrote:I was thinking that:
"Search", "Bind", "Commit"
: could be changed to :
"Find", "Link", “Save"
--
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+u...@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/85F0AD79-3BFE-4CF2-82AC-4F6CB3FBD3B3%40mgrep.com.
. I could provide some information to Eve to say that #ucla/star is located at some other Eve instance. When I then search for #ucla/star, my local instance will negotiate with UCLA's to determine how we want to share the records. In this way, the universe of your program is a constellation of many sources of data without the need to explicitly care about where it's located or how it's meant to be transported - those details are divorced from the code you write.
I think this is where data is heading, I’ve been playing with a ‘reactor’ function in ‘Red’ Unfortunately the react usage in Red is only local at present, I am imagining having code on my system that can react to changes in data on another system – or several other system, possibilities makes my head hurt 😊
Steven Thornton
On May 4, 2017, at 5:01 PM, Chris Granger <ibd...@gmail.com> wrote:> "syntax doesn't matter"FWIW, you'll never hear us say that - syntax matters quite a bit.
Python still has many grouping characters, they just chose not to use them for control flow. That's actually the same approach we've taken with our only "control flow"-like operator being `if`.
> the equals symbol (=) is perilous; imho it shouldn't be used for assignment but rather only for math-like comparison and constant / constraint / formula definition.That is the only definition of equality in our language. The update operators (:=, +=, -=) are explicitly fenced off from searches in the bind/commit section of a block. We've tried to come up with other syntactic treatments for those, but they've ended up being verbose, hard to read, and often confusing. If you have thoughts on something better, we'd love to hear about it.
> are #tags set intersection or union or...? A method of pathing through hierarchical namespaces e.g. #friends/name/first=Joe would help immensely.I think there might be some confusion on what tags are. When everything is a uniform type, we want a way to put subsets of the universe into meaningful groupings. For example, I may have an Eve instance that has celestial bodies in it and I want to easily identify things that are planets or stars or comets. Instead of having people add an adhoc "type" property everywhere, we decided to formalize the idea into a "tag" on the record. There's nothing actually special about this property, it's merely a convention that indicates that a record is a member of some group and because that's so common, we made it syntactically simple to state. So I can have records that are [#star] or [#planet] and I can search for them specifically. Like other attributes, you can have as many values for tag as you want, meaning you could have something that is both a #star and #planet. The namespacing is only there to ensure that you don't collide with #movie/star when you're talking about #celestial/star.
On May 5, 2017, at 1:57 PM, Chris Granger <ibd...@gmail.com> wrote:
> But how might I compose a find to get me the union of all #foo and all #bar?If can also be used without exclusion, which makes it a union:```searchstuff = if a = [#foo] then aif b = [#bar] then bbind