Every repository with this icon (
Every repository with this icon (
| Description: | A multi-paradigm programming language edit |
-
Sugaring for sequence (strings, lists) slicing might be useful. How might this fit into the current syntax?
Comments
-
Explore available open source regex libraries and how they might fit into the language.
Comments
-
It is useful to have a destructuring bind facility.
Of course the only way to do this is to destructure lists. The general rules would be:
- If the arity of the LHS matches that of the RHS matches, then do expected binds
let X, Y <- [1 2] ;; X is 1 ;; Y is 2 - If the arity of the LHS < that of the RHS, then do a 1-1 bind where you can,
then the last variable gets the rest of the RHS listlet X, Y <- [1 2 3 4] ;; X is 1 ;; Y is [2 3 4] - If the arity of the LHS > that of the RHS, then throw an error
let X, Y <- [1] ;; error!
-m
Comments
- If the arity of the LHS matches that of the RHS matches, then do expected binds
-
fn function should return the symbolic name of the defined function
0 comments Created 8 months ago by fogusIn the first step to creating embedded functions, lambda, and closure functions should simply return the symbol that refers to their name:
fn( foo || 2) ;; returns fooComments
-
Allow the definition of functions within other functions and constructs
0 comments Created 8 months ago by fogusIt would be nice to be able to define functions within other functions:
fn( foo || fn( bar || 2))Comments
-
Anonymous functions should be allowed. The name returned should not be directly called, but instead called through the var() syntax:
fn( foo || fn( || 2))As you see, to create an anonymous function just do not give it a name.
The returned symbol would be of the form (anon-fn blahblah), which would not be directly executable. Instead to execute just do:
let X <- fn( foo || fn( || 2)) X() ;; returns 2-m
Comments
-
How would list comprehensions fit into Ix?
-mComments
-
The machinery is there, but it needs to make sense in the context of the Ix syntax.
-mComments
-
Currently everything is a function, so math is done using
+(2 3)which can be awkward. Therefore, the easiest way to implement infix math is to provide a null function, that is, one without a name. This would require that every infix equation would need to be wrapped in parens:let X <- (2 + 3) let Y <- (X * (100 / 10))The null function would thus transform the above into:
let X <- +(2 3) let Y <- *(X /(100 10))This is a path toward #12
-m
Comments
-
Explore allowing any function as an infix operator
0 comments Created 8 months ago by fogusIf #11 is implemented generically, we could allow any symbol between any typed var or literal to act as an infix operator. For example, imagine a function that concatenates two strings:
fn ( ^ |X Y| cat(X Y))Using the null function, we could allow it to be an infix operator:
let Foobar <- ("foo" ^ "bar")-m
Comments
-
Currently, there are many functions that should be local static functions but are not. Identify and deal with them.
-mComments
-
... and keep it up to date.
-m
Comments
-
Currently there are a ton of functions at startup. It would be nice to virtually namespace some things like extended math so that they are not loaded until they are explicitly requested:
import(ix/math)-m
Comments
-
-m
Comments
-
____________________ / / /_______ _______/ / / ____ ____ / / \ \ / / / / \ \/ / / / / /\ \ / / /___/ \___\ _______/ /_______ / / /__________________/ ____ / / /___/ ____ / / / / / / X /___/-m
Comments
-
see title.
-mComments
-
0 comments Created 7 months ago by fogusfunctionsxList in vararg part is flattenedvarargsxGiven a function:
fn( foo [X Y:*_] out("Got " X " with additional " Y crlf))If this function is called with a list in the vararg position, then it is flattened:
foo(1 2 [3 4]) ;; prints Got 1 with additional [2 3 4] foo(1 2 [3 4] [5 6]) ;; prints Got 1 with additional [2 3 4 5 6] foo(1 2 [3 4] [[5]]) ;; prints Got 1 with additional [2 3 4 [5]]The expected behavior is:
foo(1 2 [3 4]) ;; prints Got 1 with additional [2 [3 4]]-m
Comments
-
0 comments Created 7 months ago by fogusfactsxsyntaxxXML literal syntax as fact syntaxxmlx.. can/should it be done? -m
Comments
-
1 comment Created 6 months ago by fogusImplement a `yield` function to be used in progn function(s)functionsx -
Bindings are created with the
letform. However, the parser does not currently handle this form in all appropriate contexts. Blah.
The current form is:
let <var> <- <expr>This certainly follows the (eventual) form for rule bindings, I think it would be better to allow something along the lines of:let [<symbol> <expr> ... <symbol> <expr>]. This is cleaner and follows a more dynamic approach.
-mComments
-
-m
Comments
-
Given the following:
fun(foo [a] out(,@a crlf)) foo([1 2 3])Ix will crash hard.
Comments











