Code Monkey home page Code Monkey logo

parens's Introduction

Hi there ๐Ÿ‘‹

I am Shivaprasad Bhat. A Software Engineer (Since 2016) from India.

  • โ™ฅ๏ธ I love building interesting things. They may not always be useful or unique ๐Ÿ˜. Feel free to checkout my repositories.

  • ๐Ÿ—๏ธ I build SaaS tools in my free time

  • ๐Ÿคฉ Apart from tech & brain things, I also watch a lot of movies & play a lot of Arma 3 (King of the Hill mainly. Add me on Steam if you know what I am talking about ) ๐Ÿ˜Ž.

  • โœ๏ธ I blog very rarely at https://spy16.in


๐Ÿ“ก LinkedIn | E-mail | Website

parens's People

Contributors

lthibault avatar spy16 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

Watchers

 avatar  avatar  avatar  avatar

parens's Issues

Implement Namespaces

Namespaces were omitted from the rewrite, but I think we should include this feature in the v1.0 release.

Any thoughts on how this should work with our new architecture?

Implement `reader` package

  • Implement Reader with macro-table + dispatch-table. (Mostly take from Sabre)
  • Implement New() with functional options to customise all internal tables, number-reader.
  • Implement WithMacroTable, WithDispatchTable, WithNumberReader etc.
type Reader interface {
    All() ([]Any, error)
    One() (Any, error)
}

proxy golang stale cache

@lthibault I was looking at https://pkg.go.dev/github.com/spy16/parens today and realized it is still showing the old Parens releases which don't exist anymore. Also, after discussion on Gophers slack, I came to know that it's not possible to update that anymore. I don't know what do about this. The cleanest and the right thing to do would be move to a new repository with different name ๐Ÿ˜” .. But we have changed this way too many times already. any thoughts?

Implement Builtin Expander (Macro System)

  • Implement BuiltinExpander that expands Seq based macro-invocation forms.

Need to figure out how a symbol/value would be identified as a macro (Clojure uses a ^:macro tag)

Implement Builtin Analyser

  • Define Expr and Context contracts (interfaces)
  • Implement builtin primitive data types + seq (linked-list) type.
  • Implement a concurrent-safe parens.Analyser which can analyse and produce Expr for builtin types.

Note: Vector, Set, Map are out-of-scope for this issue.

Implement the interpreter in parens package

  • Implement a stateless Interpreter that performs macro-expansion, syntax analysis to get Expr and dispatches for Eval.
  • Implement Eval that evaluates the Expr in a thread context for results.

@lthibault Another concern is usually VM is not the one doing the syntax-analysis ๐Ÿ˜…. I would like to use this thread for discussing the design before implementing it.

I am thinking following is the approach we can take:

  1. A parens.Interpreter or parens.Instance struct that contains the Analyser, Expander etc.
  2. Above type will have a Eval(form Any) (Any, error) method that performs macro-expansion and syntax analysis and dispatches it for eval under a context..
  3. It can also house a main-thread context that it uses to execut all forms. A GoExpr (or something equivalent) can create a child from that context and launch the eval further. (just initial thoughts)
type Interpreter struct {
    analyser Analyser
    expander Expander
    mainCtx Context
}
func (i *Interpreter) Eval(form Any) (Any, error) {
     expr, _ := expandAnalyse(form)
     return  expr.Eval(i.mainCtx)
}

Archive Parens

I have finished migrating over to Slurp; we should archive this repo to avoid confusion.

RIP parens ... ๐Ÿ˜ข

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.