enso-org / enso Goto Github PK
View Code? Open in Web Editor NEWHybrid visual and textual functional programming.
Home Page: https://enso.org
License: Apache License 2.0
Hybrid visual and textual functional programming.
Home Page: https://enso.org
License: Apache License 2.0
Things like HTTP timeouts, TLS errors or even invalid urls (just try Http.getJSON "someurl"
) are displayed in the console instead of being passed to Luna. We need them inside our own error monad.
Visualisation is part of the node. The only things that behave differently are the name and expression.
Following code:
def main:
powers 1 . take 100
def powers s:
Prepend s (powers (-2*s))
Produces following error:
SomeParserException FIXME: prec not found between "#uminus#" and "*"
CallStack (from HasCallStack):
error, called at src/Luna/Syntax/Text/Scope.hs:74:35 in luna-syntax-text-parser-0.2-EhiUrnuqfI18wmiz5Qdsxa:Luna.Syntax.Text.Scope
While this code works correctly:
def main:
powers 1 . take 100
def powers s:
Prepend s (powers ((-2)*s))
Following the instructions for installation in README.md, the stack install
failed with
fatal: repository 'https://github.com/luna/visualization-api.git/' not found
I think this comes from shell/stack.yaml
, line 55.
location: {commit: ddfcd1e0372b93e947b380b911c123fe67227b21, git: 'https://github.com/luna/visualization-api.git'}
[Enter steps to reproduce:]
Atom: 1.18.0 x64
Electron: 1.3.15
OS: Debian GNU/Linux
Thrown From: luna-studio package 1.0.0
Uncaught TypeError: parsed.forEach is not a function
At /home/andy/.luna/config/luna-studio/1.0/atom/packages/luna-studio/lib/projects.coffee:160
TypeError: parsed.forEach is not a function
at Request._callback (/packages/luna-studio/lib/projects.coffee:160:32)
at Request.self.callback (/packages/settings-view/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at /packages/settings-view/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at /packages/settings-view/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:286:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
3x -0:37.5.0 dev-live-reload:reload-all (atom-workspace.workspace.scrollbars-visible-always)
-0:12.6.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-luna-syntax.theme-luna-dark-ui)
advanced-open-file 0.16.6
busy-signal 1.4.3
color-picker 2.2.5
column-select 0.2.0
cursor-history 0.11.1
custom-window-title 1.0.4
file-icons 2.1.11
git-blame 1.2.2
git-history 3.3.0
git-log 0.4.1
git-plus 7.9.3
hasklig 0.4.0
highlight-line 0.12.0
highlight-selected 0.13.1
intentions 1.1.5
language-gitignore 0.3.0
language-haskell 1.13.2
luna-dark-ui 0.1.1
luna-dpi 0.1.2
luna-studio 1.0.0
luna-syntax 0.1.0
minimap 4.29.6
minimap-codeglance 0.4.7
minimap-cursorline 0.2.0
minimap-find-and-replace 4.5.2
minimap-git-diff 4.3.1
minimap-highlight-selected 4.6.1
multi-cursor 2.1.5
sort-lines 0.14.0
split-diff 1.5.0
web-view 3.0.0
The following code:
Http.getJSON "http://example.com?foo=bar"
results in a request with empty param list. In order to pass any query params we need to write
defaultHttpRequest "http://example.com" . setParam "foo" (Just "bar") . perform . json
but we should be handling params coming from the URI too.
We have it painfully copy-pasted between luna and luna-studio. It should be a separate repo used by the other 2.
This is a curious case, probably resulting from broken resolution of CurrentTarget
in Luna typechecker. This code:
class Complex:
real :: Real
imag :: Real
def + that:
Complex (self.real + that.real) (self.imag + that.imag)
yields compile errors whenever addition on complex numbers is used. Errors suggest that the TC is messing reals and complex numbers together. Everything works fine when the +
definition is changed to explicit use of method instead of the operator wrapper:
def + that:
Complex (self.real.+ that.real) (self.imag.+ that.imag)
Interestingly enough, this only happens when the operator used in body is the same as one currently being defined (i.e. using the operator *
inside definition of +
method works fine. And it breaks when using *
in the definition of *
, but +
works fine there).
I've noticed that our class Maybe
has two methods toText
and it does not result with any errors which is not correct.
Time.beginningOfDay
, Time.endOfYear
etc.hours
, days
, possibly more, TimeIntervals.I use c9.io for my projects. And c9.io doesn't have possibility to use Luna visually.
Can I use luna compiler in terminal mode only? c9.io uses Ubuntu LTS.
How to reproduce:
Say we have a node n
with an instance of a List
class, which exposes the average
method. Incidentally, this is also a function taking a Stream
, defined in the same file (Std.Base
).
Now, when we click on the node with the list and hit "Tab" -> ". average" -> "Enter" we expect the resulting expression to be n . average
. However, we end up with average n
, which is nonsensical type- and sematics- wise.
This epic aims to capture all the tasks necessary to provide our users with a usable standard library.
The goals here are:
4.toReal
) and so on..equals
) or show-able (within reason).Rudimentary โ just the most common parts of spec will do for now. We need parsing and generation of these.
[Enter steps to reproduce:]
Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.13.2
Thrown From: luna-studio package 1.0.0
Uncaught TypeError: parsed.forEach is not a function
At /Users/viraptor/.luna/config/luna-studio/1.0/atom/packages/luna-studio/lib/projects.coffee:160
TypeError: parsed.forEach is not a function
at Request._callback (/packages/luna-studio/lib/projects.coffee:160:32)
at Request.self.callback (/packages/settings-view/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at /packages/settings-view/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at /packages/settings-view/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:286:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
3x -3:26.6.0 dev-live-reload:reload-all (atom-workspace.workspace.scrollbars-visible-when-scrolling)
-1:46.4.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-luna-syntax.theme-luna-dark-ui)
advanced-open-file 0.16.6
busy-signal 1.4.3
color-picker 2.2.5
column-select 0.2.0
cursor-history 0.11.1
custom-window-title 1.0.4
file-icons 2.1.11
git-blame 1.2.2
git-history 3.3.0
git-log 0.4.1
git-plus 7.9.3
hasklig 0.4.0
highlight-line 0.12.0
highlight-selected 0.13.1
intentions 1.1.5
language-gitignore 0.3.0
language-haskell 1.13.2
luna-dark-ui 0.1.1
luna-dpi 0.1.2
luna-studio 1.0.0
luna-syntax 0.1.0
minimap 4.29.6
minimap-codeglance 0.4.7
minimap-cursorline 0.2.0
minimap-find-and-replace 4.5.2
minimap-git-diff 4.3.1
minimap-highlight-selected 4.6.1
multi-cursor 2.1.5
sort-lines 0.14.0
split-diff 1.5.0
web-view 3.0.0
With this code
a = 10
b = a . succ
c = a + a
we'd like to shorten (dotify) the a
in c
, and keep the one in b
untouched. Current approach requires us to treat both occurences the same way, no matter their positions in the respective expressions.
After a node is edited (its expression or connections changed) all the nodes that depend on its result should also be grayed-out. Their types are most probably invalid anyway and this way we get a clear indication as to which nodes have valid results and types, and which are being recomputed.
Given a function which uses properties on a value:
The type doesn't mention the referenced properties:
I read the polymorphism as "forall b d" but it seems like I can't use the function for all types, I can only use the function when the value has a "mappend2" method.
Is the type I'm reading in the use of "mappend" accurate? Is it just not being printed correctly?
I see this as a big problem, because I can't determine the implementation of a function by reading the type, like I can usually do with polymorphic types. I don't know what values a function can take by looking at the type.
At the very least: Ideally they would tell you (natural language) what's wrong with the code.
Right now the numbers are very misleading: I expected them to be line/column numbers but I quickly found out they are not that :D
[sylwia@linux luna]$ ./dist-package/appimage/out/luna.AppImage
Found the standard library at: /tmp/.mount_luna.AYiagHO/usr/config/env/Std
Requested module: Std.Base
Compiling module: Std.Base
Requested module: Std.HTTP
Compiling module: Std.HTTP
Requested module: Std.System
Compiling module: Std.System
Requested module: Std.Time
Compiling module: Std.Time
Requested module: Std.WebSockets
Compiling module: Std.WebSockets
/tmp/.mount_luna.AYiagHO/usr/src/: /tmp/.mount_luna.AYiagHO/usr/src/: getSymbolicLinkStatus: does not exist (No such file or directory)
Requested module: Main.Main
luna: user error (Pattern match failure in do expression at src/Luna/Shell.hs:174:5-18)
How to reproduce
Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.12.6
Thrown From: luna-studio package 1.0.0
Uncaught TypeError: parsed.forEach is not a function
At /Users/saltzm/.luna/config/luna-studio/1.0/atom/packages/luna-studio/lib/projects.coffee:160
TypeError: parsed.forEach is not a function
at Request._callback (/packages/luna-studio/lib/projects.coffee:160:32)
at Request.self.callback (/packages/settings-view/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at /packages/settings-view/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at /packages/settings-view/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:286:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
3x -0:46.5.0 dev-live-reload:reload-all (atom-workspace.workspace.scrollbars-visible-when-scrolling)
-0:17 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-luna-syntax.theme-luna-dark-ui)
advanced-open-file 0.16.6
busy-signal 1.4.3
color-picker 2.2.5
column-select 0.2.0
cursor-history 0.11.1
custom-window-title 1.0.4
file-icons 2.1.11
git-blame 1.2.2
git-history 3.3.0
git-log 0.4.1
git-plus 7.9.3
hasklig 0.4.0
highlight-line 0.12.0
highlight-selected 0.13.1
intentions 1.1.5
language-gitignore 0.3.0
language-haskell 1.13.2
luna-dark-ui 0.1.1
luna-dpi 0.1.2
luna-studio 1.0.0
luna-syntax 0.1.0
minimap 4.29.6
minimap-codeglance 0.4.7
minimap-cursorline 0.2.0
minimap-find-and-replace 4.5.2
minimap-git-diff 4.3.1
minimap-highlight-selected 4.6.1
multi-cursor 2.1.5
sort-lines 0.14.0
split-diff 1.5.0
web-view 3.0.0
# not a docstring at all, just a comment for the devs using this private function
def _foo a b:
a + b
I would expect code like this to work just fine: it's a comment, not a docstring (I don't want it to be one).
@piotrMocz commented on Sun Aug 20 2017
Say we have a datatype:
class Foo:
a :: List Text
The following gives a parsing error:
def f:
x = Foo [
"ala",
"ma",
"kota"
]
x
And the error says Unexpected token: x
.
Lately when I was developing System library error from parser have occurred with this code:
import Std.HTTP
import Std.System
def main:
putStr "luna"
foo = Process "ls" (Empty . prepend "/Users/LJK/Desktop/") "" . readProcessWithExitCode
putStr foo.toText```
Console output:
```luna: unsupported
CallStack (from HasCallStack):
error, called at src/Luna/Syntax/Text/Parser/Parsing.hs:686:30 in luna-syntax-text-parser-0.2-FmYTGPSXj6D8zT6gDdHkTj:Luna.Syntax.Text.Parser.Parsing```
Debugging shows that if third argument of `Process` is not empty string or empty string in parenthesis it works correctly.
this code:
def main:
foo = newMVar 0
putStr foo.read.toText
yields a runtime error (being unable to apply newMVar
to anything), instead of detecting this when typechecking
Steps to reproduce:
/Applications/LunaStudio.app
Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.13.1
Thrown From: luna-studio package 1.0.0
Uncaught TypeError: parsed.forEach is not a function
At /Users/yigitozkavci/.luna/config/luna-studio/1.0/atom/packages/luna-studio/lib/projects.coffee:160
TypeError: parsed.forEach is not a function
at Request._callback (/packages/luna-studio/lib/projects.coffee:160:32)
at Request.self.callback (/packages/settings-view/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at /packages/settings-view/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at /packages/settings-view/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:286:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
3x -1:16.2.0 dev-live-reload:reload-all (atom-workspace.workspace.scrollbars-visible-when-scrolling)
-0:09.9.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-luna-syntax.theme-luna-dark-ui)
advanced-open-file 0.16.6
busy-signal 1.4.3
color-picker 2.2.5
column-select 0.2.0
cursor-history 0.11.1
custom-window-title 1.0.4
file-icons 2.1.11
git-blame 1.2.2
git-history 3.3.0
git-log 0.4.1
git-plus 7.9.3
hasklig 0.4.0
highlight-line 0.12.0
highlight-selected 0.13.1
intentions 1.1.5
language-gitignore 0.3.0
language-haskell 1.13.2
luna-dark-ui 0.1.1
luna-dpi 0.1.2
luna-studio 1.0.0
luna-syntax 0.1.0
minimap 4.29.6
minimap-codeglance 0.4.7
minimap-cursorline 0.2.0
minimap-find-and-replace 4.5.2
minimap-git-diff 4.3.1
minimap-highlight-selected 4.6.1
multi-cursor 2.1.5
sort-lines 0.14.0
split-diff 1.5.0
web-view 3.0.0
We need to add balancing to the structure and other operations that are now missing (like deleting keys)
With this code:
class Foo:
Foo Bool
def main:
putStr "hello world!"
the function main
is parsed as a method of class Foo
, not a module-level definition. This is fixed when we add any methods inside Foo
โ this code parses correctly:
class Foo:
Foo Bool
def dummy: None
def main:
putStr "hello world!"
I have suspicion that in some cases luna is not lazy when we really need it to be. Console version of luna hangs on following code (I haven't tested it in luna studio):
import Std.Base
import Std.HTTP
import Std.System
def main:
putStr (powers 1 . take 10 . toText)
def powers s:
Prepend s (powers ((-2)*s))
Module processing pass ignores marked defs on toplevel. Should ignore the markers and make the function usable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.