Git Product home page Git Product logo

noulith's People

Contributors

betaveros avatar crides avatar max-sixty avatar the9000 avatar zegl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

noulith's Issues

Unsolicited suggestions?

Generic from with

An chaining operator like elixir's |> but appends additional arguments i.e. a zip b <| c <| d is a zip with b with c with d is zip(a, b, c, d).

I think <| will look nice when you want to provide an argument per line:

a zip b
  <| c
  <| d
  ;

Function parameters should be the last parameter

When you inline function arguments with multi-line lambdas, any arguments following multi line lambda become unreadable. i.e. from start in the following:

rng fold (\accum, el ->
(
    # multi line
    # lambda
)) from start;

So I think having fold1 :: [a] -> (a -> a -> a) -> a and fold :: [a] -> a -> (a -> a -> a) -> a is better alternative than an optional from as you could write:

rng fold start <| (\accum, el ->
(
    # multi line
    # lambda
));

Good luck with this language 👍.

Another precedence question

(not expecting support, feel free to skip — adding some issues as I come across them)


Generally I would expect:

X = foo bar;
print baz (X);

to be equivalent to

print (baz (foo bar));

...i.e. extracting something into a variable doesn't change the semantics1.

But here it doesn't seem to be. This works:

X := {"foo"}.keys;
print pop X;

But this doesn't:

print (pop ({"foo"}.keys));
PARSE ERROR: can't to_lvalue
print (pop ({"foo"}.keys));

    (expr 22:13-22:20)
    at first expr in call arg list (22:8)
    at first expr in assign LHS (22:1)

Is my mental model wrong for what's going on? I didn't completely understand the error message either.

Thank you!

Footnotes

  1. I realize that languages like rust occasionally don't honor this, since the assignment can avoid temporary values, but I'm guessing that's not the issue here...

1 < _ < 9

  1. Using _ for both lambdas and discards seems confusing. Have you considered some alternatives?
  2. Would it be possible to extend the readme regarding pattern matching (in function args and in switches)?

add `into` keyword documentation

The rest of your documentation is quite complete. Here's a toy example

noulith> print! for(i <- 65 to 70) yield [i, chr(i)] into dict;
{67: "C", 66: "B", 69: "E", 65: "A", 68: "D", 70: "F"}

Indexing precedence

I'm not sure whether you're here to answer questions — no worries at all if you're not.

Does this fail because indexing is lower precedence than a function call?

X := [1,2,3];

print X[0];

# ERROR: type error: Chain cannot use nonblock in operator position: [1, 2, 3]
# print X[0];

#    at op 1/1 (14:7-8)
#    at ;-sequence(2/4) (12:13-18:9)

But this seems to work:

X[0].print;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.