timowest / symbol Goto Github PK
View Code? Open in Web Editor NEWtyped lisp adventure
typed lisp adventure
They could be interpreted as constructor invocations
The form (. obj member) can refer to either a method invocation or field access.
The cases are matched via this code
(matcha [membert ?args type]
([['method argst type] ?args type])
([['pointer ['fn argst type]] ?args type])
([type [] type]))
Possibly via a type suffix like in Java
For each test file: load file, parse, macroexpand, analyze, emit and compile
Closures in Extempore make the context editable. This could be supported by converting structures similar to the following
(let [a ...
b ...]
(fn [] ...))
into
(do
(defstruct structX
(a typeA)
(b typeB)
(apply (method ...))
(structX. ...))
Extempore : https://github.com/digego/extempore
Add support for explicit const flags
(def name (fn* ([...
should be expanded into a static function and not into a lambda declaration like now.
fix dot expansion
(ns <name>
(use <namespaces>))
should expand into
(do
(ns* <name>)
(use <namespaces>))
This will guarantee better compatibility with clojure sources.
The pair of
(loop [bindings* ] exprs_)
(recur exprs_)
can be transformed into
(loop name [bindings* ] exprs_)
(recur name exprs_)
in the analysis stage.
Infer types for class structures
Support for def in type inference
A subset of Clojure's deftype constructs could be supported
(deftype <name> <columns vector> & <functions>)
e.g.
(deftype Person [contents]
; clojure.lang.IPersistentMap (no implements declarations for the moment)
(assoc [_ k v] (Person. (.assoc contents k v)))
(assocEx [_ k v] (Person. (.assocEx contents k v)))
(without [_ k] (Person. (.without contents k))))
Replace gccxml since it doesn't support templates. Here are some alternatives
http://scottmcpeak.com/elkhound/sources/elsa/
https://blog.mozilla.org/tglek/2009/01/29/semantic-rewriting-of-code-with-pork-a-bitter-recap/
http://stackoverflow.com/questions/526797/good-tools-for-creating-a-c-c-parser-analyzer
Support for includes
Maybe start with http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
Parse includes and type infer them
Maybe the type for
(if <condition> (recur ...))
could be void ?
But how to detect it? There could any amount of extra expressions between if and recur.
To reduce compilation time the type information for common includes should be made available in the classpath
e.g.
Using a subset of the core.match match macro https://github.com/clojure/core.match/blob/master/src/main/clojure/clojure/core/match.clj#L1740
Instead of only the top level type the types for the included forms should be returned as an environment
Automatic garbage collection would be a nice addition to simplify the coding experience in symbol.
Alternatively smart pointers could be used.
This will be needed for macro expansion etc
They are currently skipped
Tests for macroexpansion
Support for additional constructors in deftype
To be implemented with similar semantics to clojure
Add support for function return type annotation
Support for static methods in deftype
This will also simplify type inference for mathematical forms without form simplification.
Support for new in type inference
Extend include support to handle file specific additional include folders
e.g. to get the needed includes for gccxml execution when using gtkmm
pkg-config gtkmm-3.0 --cflags
Annotated metadata type should be used when available
Full transformation from sources to C++ (or other target) would be
The third step might be dependent on type information
These might be of some help
http://www.larcenists.org/Twobit/ultimate.html
http://www.aiai.ed.ac.uk/~jeff/scheme/scheme-to-c++-translations
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.