

Eve Development Blog, from Light Table developers - dahjelle
http://incidentalcomplexity.com/

======
ericHosick
>Passing cursors quickly became tedious when trying to change code. If a
function suddenly needed access to IO the cursor had to be passed down through
every function above it in the callstack.

This is the function-calling train issue and what happens if you try to make a
sort of quasi homoiconic language ("Hierarchical organisation of data
complects the data itself with the common access paths.") and attempt a push-
pull approach to programming (you push the data down into the hierarchy) with
traditional data scoping through parameters.

The bad is not the hierarchical organization of data. That is the correct
direction.

The bad is trying to use a traditional scoping approach to what is effectively
a homoiconic type language. Homoiconic type systems need a different scoping
approach.

~~~
DennisP
So how should it be done?

~~~
ericHosick
The way we do scoping now is to rely on the programming language which is
basically the stack.

But we can implement our own scoping mechanisms based on the domain we are
developing a program in.

For example, Eve mentioned that they were looking at a sort of "Excel"
spreadsheet type visual language.

The scoping mechanism of spreadsheets are a sheet with row/column. So, I would
create objects that are able to quickly pull from a row/column and push into a
row/column. For example, somewhere in their hierarchy they had an algorithm
that required access to a cursor.

Since it is a spreadsheet we can have our global active spreadsheet which,
somewhere, contains the cursor. We know it is there because we put it there.

Somewhere deep in the bowels of the data hierarchy we have this line of code
to get a cursor:

    
    
        var cursorCurrent = global.curSpread[34,65];
    

because our scoping mechanism is based on an excel spreadsheet and not the one
"forced" on us by the programming language: usually a stack.

There is no need to push that current cursor down the function calling train
and, in the end, it is probably faster because we are doing a simple cell
lookup.

~~~
ibdknox
The cursors were long before we were thinking explicitly of spreadsheets. Our
model now has no encapsulating scope, which is just like access to some global
object like you're suggesting here.

~~~
seanmcdirmid
Why not full on adopt dynamic scoping? This is what McCarthy did in the
original LISP (some say it was an accident, but it has lots of advantages
compared to lexical scoping). Global scope, in contrast, is like having no
scope at all. There is also nothing really wrong with this if you can manage
your namespace separately Subtext style, but the use cases are still different
from dynamic scoping.

~~~
jamii
> if you can manage your namespace separately Subtext style

We do

> the use cases are still different from dynamic scoping.

What are the use cases? We so far haven't felt the need for any kind of
scoping (although we admittedly have only written a few 'real' programs).

It's not clear what dynamic scope would even really mean in Eve - there is no
control-flow stack to set the scope and no notion of computer-time to dictate
when a nested scope exists.

A better analog might be ML functors. We could take a chunk of Eve code and
parametrise it by the input/output tables. Then you could wire it into your
dataflow graph in multiple places.

~~~
seanmcdirmid
LISP being technically based on the lambda calculus doesn't have any control
flow either, but it does have hierarchy defined by callee/caller
relationships. If you have any kind of hierarchy at all in your program
execution (even if its just rules being used to for other rules...), you can
leverage that as a "scope."

Dynamic scoping is useful when you want to configure different executions with
different behaviors without invasively passing down contexts to do that. There
is a whole body of work on context-oriented programming which essentially
leverages dynamic scoping to make code execution more adaptive without
sacrificing viscosity.

~~~
jamii
> when you want to configure different executions with different behaviors
> without invasively passing down contexts

That is certainly something we want, but I don't know if scoping is definitely
the right way to do it, especially since both our code and data are entirely
flat at the moment. We will likely have some kind of tagging of tables/rules
for organisation and those tags could be the unit of reuse. The mechanism I
have in mind feels more like copy-and-paste (I want _that_ chunk of code but
with _these_ changes) or ML functors than it does dynamic scoping. In
particular, the ability to change the dataflow graph at runtime without
recompilation prevents lots of important optimisations.

~~~
seanmcdirmid
With ML functors, however, you are duplicating the code and managing
separately; you could already do that for each scope (what I basically do in
Glitch), or better yet, try and optimize duplication away (copy your data flow
graph, but memoize and try to reuse).

Anyways, the right path to take will probably become apparent as you do more
development...keeping it simple at first is a good idea.

~~~
jamii
> try and optimize duplication away (copy your data flow graph, but memoize
> and try to reuse)

We sort of do that by hand at the moment. Rather than parametrise _code_ , we
attach ids to the data that is pushed through it. For example, instead of
having a reusable 'compile' function we have a dataflow that just compiles
anything thats added to the code tables and anything that wants to compile
pushes code in one end and looks for the matching id coming out the other end.

I'm not sure how far that will take us. It's certainly annoying when what you
want is more like a function with a return value rather than a side effect.
Still, we might be able to address that with a little sugar. We'll see.

------
lbotos
What's going on with Light Table? Anyone use it? Is it "done"? Python? JS? It
was hot for a while and I haven't heard anything in a bit.

~~~
jamii
[https://groups.google.com/forum/#!topic/light-table-
discussi...](https://groups.google.com/forum/#!topic/light-table-
discussion/XNNi2yxrlPs)

TLDR: There are three new maintainers ([https://github.com/one-more-
minute](https://github.com/one-more-minute)
[https://github.com/cldwalker](https://github.com/cldwalker)
[https://github.com/joshuafcole](https://github.com/joshuafcole)). The docs
are now community owned. The plugin server will be soon. We will be hosting a
weekly hack night in our new office to get community members up to speed.

~~~
scrollaway
I'm glad to see you guys picked up the pace big time. Really glad. Props.

------
divs1210
Nice thought, nice venture. I hope it leads to unexplored territory. Good to
see constant tests with potential users, and no fear of making major changes.

------
dusklight
Eve, Aurora, Light Table, these names all share the similar property in that
they are difficult to google because they are common words. We've already gone
through this once with go, can we please get a name that is going to be easy
to search for?

------
minikomi
If the blog maintainer is about - can you allow user zooming on mobile? The
screenshots are very tricky to look at and are important to the context of
this blog I think.

~~~
gone35
Use this bookmarklet to un-cripple the page (from [1]):

    
    
      javascript:document.querySelector('meta[name=viewport]')
        .setAttribute('content','
          width=device-width,
          initial-scale=1.0,
          maximum-scale=10.0,
          user-scalable=1
        ');
    

Shame on the author to force users to retort to hacks like this, by the way.
"B-but you can click on the images!" is _not_ an answer, damn it [2]. Pinch-
and-zoom is arguably _the_ premier feature/innovation of the post-iOS era, for
you geniuses to disable it for whatever UI/UX cargo-culting fad is going
through your head. Seriously. Just stop [3].

[1] [http://apple.stackexchange.com/questions/28391/how-can-i-
for...](http://apple.stackexchange.com/questions/28391/how-can-i-force-pinch-
to-zoom-on-some-websites)

[2]
[https://news.ycombinator.com/item?id=8468745](https://news.ycombinator.com/item?id=8468745)

[3] [http://motherfuckingwebsite.com/](http://motherfuckingwebsite.com/)

~~~
ibdknox
What an aggressive response. :/

Thanks for the indirect pointer on how to correct the issue though. If you
hard refresh you can zoom now.

~~~
gone35
Well, expectancy violation/mismatch is a reliable stressor down to the
mesolimbic-corticostriatal level[1], so maybe that's that.

In any case, thank you for re-enabling it. I'm sure many future readers would
thank you too.

[1] See for instance Box 2 in Proulx _et al._ 2012
([http://www.michaelinzlicht.com/wp/wp-
content/uploads/downloa...](http://www.michaelinzlicht.com/wp/wp-
content/uploads/downloads/2012/04/Proulx-Inzlicht-Harmon-Jones-2012.pdf)).

------
duaneb
God, that's confusing. I thought this was the EVE development blog, i.e.
[http://community.eveonline.com/news/dev-
blogs/](http://community.eveonline.com/news/dev-blogs/). Eve is, frankly, a
terrible name for a tool. It sounds like a brand name and gives ZERO
indication as to its utility.

At the very least, the post (edit: post title) could give some indication as
to what the hell Eve is and why I should care—it looks like a spreadsheet
meets a repl.

~~~
dang
We restored the submitter's title which made the Light Table connection
explicit.

~~~
_halgari
Sadly, even then I thought the title was about how CCP (makers of EVE Online)
were using LightTable in development...

~~~
dang
That _is_ sad. I doubt there's much we can do for you.

