LinCAS-lang: A math programming language with a built in CAS

https://github.com/LinCAS-lang/LinCAS https://lincas-lang.gitbook.io/lincas/

The LinCAS programming language's porposal is to unify a flexible language with a computer algebra system and plotting libraries, to create a powerful tool for computation.

function := ${ 2 * x + x * y }
printl "Calculating df/dx of ".concat( function.to_s() )
printl function.diff(${ x })
​
#=> Calculating df/dx of 2 * x + x * y
#=> 2 + y

Await and async in Crystal

https://github.com/anykeyh/await_async

Usage

  • Call async on any method or block to create a MiniFuture
  • Call await on any MiniFuture to wait for/get the result
  • Conveniently, you can call await on iterators (eg. Array) .
  • Can improve drastically application which relay on blocking IO like web API or file writing.
def fetch_websites_async
  %w(www.github.com
  www.yahoo.com
  www.facebook.com
  www.twitter.com
  crystal-lang.org).map do |ws|
    async do
      HTTP::Client.get "https://#{ws}"
    end
  end
end

# Process the websites concurrently. Start querying another website when the
# first one is waiting for response
await(fetch_websites_async).each do |response|
 #...
end