Giter Site home page Giter Site logo

Shedding dependencies? about grain HOT 7 CLOSED

grain-lang avatar grain-lang commented on August 22, 2024
Shedding dependencies?

from grain.

Comments (7)

ospencer avatar ospencer commented on August 22, 2024 4

Hey! Just replied to your comment on #57.

Specifically, do you plan on porting and bootstrapping the compiler?

Eventually. Right now, our main focus is building out the language itself and making it as easy as possible for contributors to contribute. We're at a decent point with thatβ€”we do have fairly heavy dependencies, but everything is handled through yarn. Contributors don't have to figure out how to install OCaml or anything like that.

There's quite a bit of work that needs to be done with the language before we'd be at a good point to start working on a compiler port to Grain, but we're getting there (we'll need a fully fleshed-out filesystem library, macro system, etc.).

Bootstrapped Grain (let's call it Whole Grain πŸ˜‚) is a Grain v2.0.0 idea and we're still working towards v0.1.0. Granted, as soon as GC lands, we pretty much have everything we need for v0.1.0.

Once we're at v0.1.0, we'll start distributing binaries, so all of the OCaml and whatnot will be invisible to users. The Node dependency will slowly go away. Node is a dependency largely because portions of our runtime is written is JS, but we're slowly moving all of it to WebAssembly. Ideally Grain will be able to be run on any WASI-compliant runtime.

Long story short, that's a potential plan for the future, but we've got quite a few hurdles to clear before we get there. Right now we're continuing to put all of our effort towards core language features.

from grain.

mindplay-dk avatar mindplay-dk commented on August 22, 2024

Very good answers, thanks! πŸ™‚πŸ‘

One more question, if you don't mind: what's the story with regards to parallelism?

Threads, fibers, workers, coroutines... something else?

from grain.

ospencer avatar ospencer commented on August 22, 2024

Of course. We haven't talked about it much, but my guess right now would be threads since WebAssembly should make that pretty easy. πŸ‘

from grain.

mindplay-dk avatar mindplay-dk commented on August 22, 2024

And what would thread support look like in the language?

Async/await maybe? Or just an API with threading primitives?

I suppose locks and mutexes wouldn't be required since everything is immutable. (except boxes?)

Some kind of lightweight threading primitive like fibers might be worth considering though - proper thread scheduling is hard, and most modern languages offer something a little more abstract, so that things like web/socket servers can be built to scale safely and easily. (?)

from grain.

ospencer avatar ospencer commented on August 22, 2024

I can't yet say what thread support will look like yet, since I haven't put much thought towards it. Since we're aiming to make things like this as easy as possible for users, I imagine that we'll have a decent level of abstraction with whatever we do. Fibers are something to consider, though if we do have them we'll probably still also have access to threads.

Generally, you're rightβ€”most kinds of computation won't need locks/mutexes which should just in general make parallelism fairly easy, though we'll have to keep in mind that we'll need to make it just as easy for mutable structures as well (to adhere to our language goals).

from grain.

mindplay-dk avatar mindplay-dk commented on August 22, 2024

Yeah, threads would be useful as well and might be an easier place to start. Makes sense.

Well, thanks for your time! I will definitely be watching this project to see where it goes. πŸ™‚βœŒοΈ

from grain.

ospencer avatar ospencer commented on August 22, 2024

Of course! :D

from grain.

Related Issues (20)

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.