Coder Social home page Coder Social logo

chapel-ls-playground's People

Contributors

anubhavujjawal avatar

Watchers

 avatar

chapel-ls-playground's Issues

Add Support for Common Chapel Idioms

Currently only a limited number of statements/expressions are shown in auto-completion, but I see this as a massive opportunity to support more common Chapel idioms.

Common Idioms

Spawn on task per locale

coforall loc in Locales do on loc {

} 

SPMD: one task per core per locale

coforall loc in Locales do on loc {
   coforall tid in 1..here.maxTaskPar {

   }
}

Data-Parallelism

forall a in A {

}

The iterable used can be based on what is in scope.

@bradcray

Any suggested idioms? I think this is a rather exciting start. @bradcray What do you think are the most useful Chapel idioms?

Hack for implementing type inference

I believe that you can possibly implement type inference by taking advantage of compilerWarning to obtain the type. For example, imagine you have something like this...

var x : int;
var y = x;
var z = (x + y) : real(32);

How would you get this type information? Like this.

var x : int;
compilerWarning("__TYPE__INFERENCE__ x:", x.type : string);
var y = x;
compilerWarning("__TYPE__INFERENCE__ y:", y.type : string);
var z = (x + y) : real(32);
compilerWarning("__TYPE__INFERENCE__ z:", z.type : string);

TIO

I suggest that the LSP could possibly instrument the original program by adding this to all variable declarations to query their type, which can then be parsed.

@lydia-duncan Any opinions on this approach? Should be a nice and decent short-term solution.

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.