skiplang / skip Goto Github PK
View Code? Open in Web Editor NEWA programming language to skip the things you have already computed
Home Page: http://skiplang.com
License: MIT License
A programming language to skip the things you have already computed
Home Page: http://skiplang.com
License: MIT License
Fedora 30 ships with LLVM version 8 and apparently some command line options have changed.
llc
should be invoked with -frame-pointer=all
(I think) instead of -disable-fp-elim
, otherwise this breaks the skip_to_native
script and stalls the build.
The prose mentions a Users
interface, but no interfaces are declared, nor used. The inconsistency is significant enough I can't figure out what point was intended.
This repository doesn't have some useful GitHub template files at the barest :
which are templates that can assist contributors in communicating their intentions better,
I would love to work on this 😄
You can find more details in tests/src/runtime/native/test_memoize.cpp
Can we add Skip to GitHub's linguist
?
Disclaimer: This is a bot
It looks like your repo is trending. The github_trending_videos Instgram account automatically shows the demo gifs of trending repos in Github.
Your README doesn't seem to have any demo gifs. Add one and the next time the parser runs it will pick it up and post it on its Instagram feed. If you don't want to just close this issue we won't bother you again.
I have made a pr to fix typo for docs, but wait for a long time to run circle ci,
though the changes were not releated to the tests.
Hi,
This project seems really interesting. As such I would like to know more about it.
It seems that some members of the core (previously at Facebook) hang around here. If this is the case, can one of them communicate (a bit more) about the language. For example:
Do they have any plan to continue to work on it? If yes, what features are planned? Do they have a vision for the future of the language? If no, do they plan to give away the ownership of the repository? etc...
Posting as an issue since I don't know how to reach the authors otherwise.
Skip is a very interesting language.
I scanned the docs but could not find any information about the feature giving the language its name: memoization.
EG:
I'd be interested in how this works, is implemented, etc.
Also, since the language is a "now concluded research project", it would be very interesting to read about the conclusions of the project: how useful is the concept in practice, are there performance wins to be had in realistic workloads, etc.
Currently, we solve lambdas based on the order they were declared. This was likely done as solving one lambda could influence tvars that are used/captured by later lambdas.
But, it does not work well when one lambda is captured by another.
We should order lambda solving first by the capture order, i.e. if a lambda is captured by another lambda, solve the captured one first. And then defer to declared order
If an error is present in the project file, at launch, the skip server consumes 100% of the CPU and does nothing.
When adding constraints we do some wonky joining of constraints so they are consistent with all tvars.
This is so all type variables have the same physical constraint when entering the NBE. (Physical constraints does not include any KTraits)
Ideally, when constraints are solved, solve each constraint individually with separate accs. After solving all of them, join the physical values contravariantly. This should provide physical values for all tvars that overlap without having to do this constraint forwarding.
class X(() ~> Int)
untracked fun foo(): Int {
0
}
untracked fun main(): void {
_ = X(() ~> foo())
}
Chatted with @josephsavona about this the other day.
Here's a plan which would result in a JS backend which had perf on par with hand written JS. Goals would be:
We would need to make some concessions:
Work plan would look like:
The cool thing at this point is that primitives still behave like other Skip types. They may participate in traits and everything just works. Generic code which references primitives will dispatch through the monkey patched methods rather than inlined. Future work could also:
Dead code removal (aka tree shaking) would be pretty trivial. So there’d be no penalty for using a large library in a small application.
To improve the programming model we could additionally:
We should collapse most constraints into into a single type when possible.
For example
fun ex<U, T: Show & Eq & U>
We get an upper bounds array of
T => [%Show, %Eq, U]
We should instead collapse these into a single point
So
T => [-{Show, Eq}, U]
We can likely accomplish this by contra-promote joining the constraints
There are likely some issues though around tuples.
Such as
fun ex<T: (L, R) & (R, L)>
And even worse with
fun ex<U: R, T: (L, U) & (U, L)>
Since you likely want
T => [(L, U), (U, L), (L & R, L & R)]
But if we can accomplish this simplification it will
Currently algebraic method declarations can be used for any valid child of the given type.
We should limit it to only children declared in the given class with 'children'
So
base class X1 {
fun no(): void
| C1() -> void // SHOULD ERROR
}
class C1() extends X1
base class X {
children = A() | B()
fun no(): void
| A() -> void // Valid!
| C() -> void // SHOULD ERROR
| X _ -> void // Valid!
}
class C() extends X
Doing this will make a lot of the override rules MUCH simpler.
After this is done, the whole pass for method inheritance can probably be rewritten and simplified
In docs/blog/2017-11-30-parallelism.md
you stated that skip is going to have incremental compiler based on memoization:
Although this was a fun hack, the next big exciting change won't involve parallelism, and will take a lot longer than a weekend — it's making the compiler incremental, using Skip's own reactive memoizer to only recompile code affected by modified files. Stay tuned!
But there was no follow up post on this topic, even though it's almost 3 years already. Therefore, I have few questions:
If we go on matches function of String doc
Links to the regular expression module are available.
However, the documents targeted by these links are not accessible.
In addition, like Regexp, some other very useful modules like Subprocess, Math, ... are not present in the Stdlib documentation
If the paths to the executables are too long the 'sk' script can't find skip_server because the root path is truncated.
The two 'ps xa' lines should be 'ps xawww' to fix this.
Joining of named args in skipTypes seems like it was never implemented
Current problem as of commit b26a4e
If you have a skip.project.json which refers to globs of files ("foo/**") and you add or remove files then you need to restart the server to pick up the new files.
Example:
{
"skipVersion": "1.0",
"programUnits": {
"test": {
"sources": [
"srcs/**",
],
"kind": "Program",
}
}
}
Have a file srcs/file1.sk
and run sk check
to start the server and let it type-check.
Add a new file srcs/file2.sk
and run sk check
. It doesn't notice that file2.sk now exists until you sk restart
.
Hello Everyone!
I'm a student and am interested in learning more about Skip, about how it works and probably build something on top of this. I'm new around here so how can I still contribute to this and learn about how programming languages are built.
Danke!
Prerequisites of centos disappeared in docs/developer/README-cmake.md
Prebuilt binaries for Win/Mac/Linux (and/or Brew), or at least a Docker image. Thoughts?
The following program:
trait MyTrait {
static fun foo(): void;
static fun bar(): void {
static::foo();
}
}
Gives the error:
File "/home/ci/skfs/lexer.sk", line 6, characters 5-17:
Invalid abstract call
4 | static fun foo(): void;
5 | static fun bar(): void {
6 | static::foo();
| ^^^^^^^^^^^^^
7 | }
File "/home/ci/skfs/lexer.sk", line 4, characters 14-16:
'foo' is abstract. It can be used only from 'static' or a Concrete<_> object
2 |
3 | trait MyTrait {
4 | static fun foo(): void;
| ^^^
5 | static fun bar(): void {
request http://skiplang.com/
get error
Error: connect ECONNREFUSED 127.0.0.1:8082
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
Hi. Are there any Skip examples out there? Programs which have:
👋 skiplang team,
I'm working at Algolia on the a project called DocSearch which goal is to enhance documentation websites with exhaustive, fast and relevant search. You might have seen DocSearch live already on websites like Bootstrap, ESLint or Babel.
As Docusaurus user, you would need to enable our search experience.
Looking forward to have it? Just update your siteConfig.js
.:
apiKey: '7d79ea7bb5fdb8d123b2ed2c40d781a5',
indexName: 'skiplang',
Feel free to reach me out for any issue.
We do offer free search analytics regarding the usage of your search. Send us the email of the ppl to add [email protected]
In the README it says "with alpha versions of IDE plugins providing near-instantaneous errors as you type". Where can I find these alpha IDE plugins?
[83/168] : && /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -mtune=native -pipe -Wl,-O1 -Wl,--as-needed lkg/tmp/skip_to_llvm.gen.o lkg/CMakeFiles/skip_to_llvm.lkg.dir/runtime/native/src/sk_standalone.cpp.o -o lkg/bin/skip_to_llvm lkg/runtime/native/libskip_runtime.a third-party/googletest/libgtest_main.a third-party/install/lib/libfolly.a /usr/lib/libdouble-conversion.so /usr/lib/libgflags.so /usr/lib/libglog.so -ldl /usr/lib/libevent.so /usr/lib/libboost_thread-mt.so /usr/lib/libboost_system-mt.so /usr/lib/libboost_context-mt.so /usr/lib/libboost_filesystem-mt.so /usr/lib/libboost_chrono-mt.so /usr/lib/libboost_date_time-mt.so /usr/lib/libboost_atomic-mt.so -Wl,-rpath,/usr/lib /usr/lib/libunwind.a -lpthread third-party/install/lib/libicutu.a third-party/install/lib/libicuio.a third-party/install/lib/libicui18n.a third-party/install/lib/libicuuc.a third-party/install/lib/libicudata.a -lpcre -lrt /usr/lib/libjemalloc.so && :
FAILED: lkg/bin/skip_to_llvm
: && /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -mtune=native -pipe -Wl,-O1 -Wl,--as-needed lkg/tmp/skip_to_llvm.gen.o lkg/CMakeFiles/skip_to_llvm.lkg.dir/runtime/native/src/sk_standalone.cpp.o -o lkg/bin/skip_to_llvm lkg/runtime/native/libskip_runtime.a third-party/googletest/libgtest_main.a third-party/install/lib/libfolly.a /usr/lib/libdouble-conversion.so /usr/lib/libgflags.so /usr/lib/libglog.so -ldl /usr/lib/libevent.so /usr/lib/libboost_thread-mt.so /usr/lib/libboost_system-mt.so /usr/lib/libboost_context-mt.so /usr/lib/libboost_filesystem-mt.so /usr/lib/libboost_chrono-mt.so /usr/lib/libboost_date_time-mt.so /usr/lib/libboost_atomic-mt.so -Wl,-rpath,/usr/lib /usr/lib/libunwind.a -lpthread third-party/install/lib/libicutu.a third-party/install/lib/libicuio.a third-party/install/lib/libicui18n.a third-party/install/lib/libicuuc.a third-party/install/lib/libicudata.a -lpcre -lrt /usr/lib/libjemalloc.so && :
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: lkg/tmp/skip_to_llvm.gen.o: in function `sk.Instr__visitInputs':
/Users/joesavona/github/skip-oss/src/native/IR.sk:626: undefined reference to `SKIP_Obstack_note_inl'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: lkg/tmp/skip_to_llvm.gen.o: in function `BoolCmpEq__clone':
/Users/joesavona/github/skip-oss/src/native/IR.sk:963: undefined reference to `SKIP_Obstack_note_inl'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: lkg/tmp/skip_to_llvm.gen.o: in function `Int::>=<Int>':
/Users/joesavona/github/skip-oss/src/runtime/prelude/core/primitives/Int.sk:82: undefined reference to `SKIP_Obstack_note_inl'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /Users/joesavona/github/skip-oss/src/runtime/prelude/core/primitives/Int.sk:82: undefined reference to `SKIP_Obstack_note_inl'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: lkg/tmp/skip_to_llvm.gen.o: in function `Sequence<String>::iterator':
/Users/joesavona/github/skip-oss/src/runtime/prelude/core/language/Sequence.sk:37: undefined reference to `SKIP_Obstack_note_inl'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: lkg/tmp/skip_to_llvm.gen.o:/Users/joesavona/github/skip-oss/src/runtime/prelude/core/primitives/Array.sk:303: more undefined references to `SKIP_Obstack_note_inl' follow
collect2: error: ld returned 1 exit status
base class A
class B() extends A
Removing the class B makes the server crash
In tutorial for exercice n°10:
Now, let's write the mutable version. Notice the keywords 'mutable' placed in front of the field and the method. this.!field = value modifies object in place, much like in any other programming language.
mutable class Point {mutable x: Int, y: Int} {
mutable fun incrX(): void {
// TODO: increment the field 'x' by 1
// HINT: 'this.!x = value' sets the field 'x' to 'value'
}
}
A compilation error is returned regardless of the expression tested with run:
File "playground.sk", line 1, characters 15-19:
In 'Point's version of the member '!=' inherited from 'Equality'
1 | mutable class Point {mutable x: Int, y: Int} {
| ^^^^^
2 | mutable fun incrX(): void {
File "tests/runtime/prelude/core/traits/Equality.sk", line 26, characters 12-13:
Cannot call this method on a readonly object
24 |
25 | overridable readonly fun !=(other: inst): Bool {
26 | !(this == other)
| ^^
27 | }
File "playground.sk", line 13, characters 7-8:
Try annotating '==' method as 'readonly'
11 | extension class Point uses Equality, Show {
12 | // Defining equality for a Point
13 | fun ==(other: this): Bool {
| ^^
14 | other.x == this.x && other.y == this.y
Chars.escape is defined as '\x0E' (14) but should be '\x1B' (27)
Get install process via homebrew on MacOS
Install the product via homebrew brings skip inline with other languages and product that get installed on MacOS. It is a fairly easy and straightforward process. The current process is not very clear and somewhat cumbersome.
Simple and straightforward installation process on MacOS will help to bring more developers into the language due to the simplicity of the process.
Follow homebrew guideline to add new formula.
N/A
skip/server lists all the source files in src/native, this is wrong.
We should create a library for src/native and then make both the skip_to_llvm binary and src/server use that library.
Hi there,
the documentation anchors in docs/specification are not working.
When we wrote
value = if (test) {v1} else {0.0} - v2;
We expect to have something equals to if (test) {v1 - v2} else {- v2} but it's equals to if (test) {v1} else {- v2};
A message should warn to use parentheses when if/then/else is used with operators .
The client does not check that the binary file was really written before writing the message "Written ..." which leads to this very confusing case where we get a log that something was written when in reality nothing happened.
The git history is already looking a bit hairy due to merge commits. I propose that we change the github settings for this repository to default to 'rebase and merge'.
Hello!
Please add an RSS feed for your blog to make it easier to follow progress.
when install, at step 3 run the Skip docker image
# Replace <skip-dir> with the directory you created above
docker run -it --user skip --mount type=bind,source=<skip-dir>,target=/home/skip/app verlaguet/skip
the mount target is /home/skip/app
at step 6, write, compile and run the example.sk program
# From docker container shell
> cd /home/skip/apps
> ls # should show example.sk created above
> ../skip/run.sh example.sk
now the mount target is /home/skip/apps
Nuclide Version: 0.351.0.
Available language settings:
General, Clang, Remote Ctags, Flow, Hack, Infer AL, Obj-C, Ocaml, Python, Swift
But nothing for SKIP.
Is there an additional package to install to allow Nuclide to work with skip?
Or should we use a specific version of Nuclide?
third-party/install/include/folly/synchronization/AtomicStruct.h:77:11: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of type ‘struct std::chrono::duration<long int, std::ratio<1, 1000000000> >’ with ‘private’ member ‘std::chrono::duration<long int, std::ratio<1, 1000000000> >::__r’ from an array of ‘using Raw = folly::_t<folly::detail::AtomicStructRaw<3> >’ {aka ‘long unsigned int’}; use assignment or copy-initialization instead [-Werror=class-memaccess]
memcpy(&v, &d, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from third-party/install/include/folly/detail/Futex.h:21,
from third-party/install/include/folly/MicroLock.h:24,
from ../lkg/runtime/native/include/skip/InternTable.h:17,
from ../lkg/runtime/native/include/skip/objects.h:14,
from ../lkg/runtime/native/include/skip/String.h:13,
from ../lkg/runtime/native/include/skip/Exception.h:11,
from ../lkg/runtime/native/src/sk_standalone.cpp:27:
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/chrono:302:14: note: ‘struct std::chrono::duration<long int, std::ratio<1, 1000000000> >’ declared here
struct duration
^~~~~~~~
cc1plus: all warnings being treated as errors
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.