Releases: nevalang/neva
v0.31.0
Neva is a new kind of programming language where instead of writing step-by-step instructions, you create networks where data flows between nodes as immutable messages, with everything running in parallel by default. After type-checking, your program is compiled into machine code and can be distributed as a single executable with zero dependencies.
It excels at stream processing and concurrency while remaining simple and enjoyable for general development. Future updates will add visual programming and Go interop to enable gradual adoption.
What's Changed?
This release extends standard library with new errors
package plus contains some minor fixes for documentations (thanks our community). No backward incompatible changes so far.
errors
package
New stdlib package errors
added with 3 public components:
def New(data string) (res error)
- creates a new error with the given text.def Must<T, Y>(data T) (res Y)
- converts a node that has an error outport to one that doesn't. It handles the error internally by panicking.def Lift<T, Y>(data T) (res Y, err error)
- converts a node that doesn't have an error outport to one that does. The error outport is fictional and will always be silent.
Example - Lift
// errors.Lift wraps handler so it behaves like a node with error outport.
def Main(start any) (stop any) {
lift errors.Lift<any, any>{Handler}
panic Panic
---
:start -> lift
lift:res -> :stop
lift:err -> panic
}
// Handler doesn't have error outport.
def Handler(data any) (res any) {
println fmt.Println<any>
---
:data -> '42' -> println -> :res
}
Example - Must
// errors.Must wraps handler so it behaves like a node without error outport.
def Main(start any) (stop any) {
println fmt.Println<any>
must_handle errors.Must<any, any>{Handler}
---
:start -> 'create_me.txt' -> must_handle -> 'success!' -> println -> :stop
}
// Handler have error outport.
def Handler(data string) (res any, err error) {
write_all io.WriteAll?
---
:data -> write_all:filename
'Hello, io.WriteAll!' -> write_all:data
write_all -> :res
}
Other Changes
- Update tutorial.md by @WoodyAtHome in #851
- docs: update
constants.md
by @eltociear in #852 - Update README.md by @emil14 in #858
New Contributors
- @WoodyAtHome made their first contribution in #851
- @eltociear made their first contribution in #852
Full Changelog: v0.30.2...v0.31.0
Important
This is an ambitious project maintained by a small group of enthusiasts. Your support by joining us will show interest and motivate us to continue.
Also, please give us a star ⭐️ to increase our chances of getting into GitHub's trending repositories and tell your friends about the project. The more attention Nevalang gets, the higher our chances of actually making a difference!
v0.30.2
What's Changed
- Use proper .exe extension on windows by @hardliner66 in #840
- Fix LSP compiler errors by @emil14 in #845
- Fix CI/CD tests (and add more) by @emil14 in #850
Full Changelog: v0.30.1...v0.30.2
Important
This is an ambitious project maintained by a small group of enthusiasts. Your support by joining us will show interest and motivate us to continue.
Also, please give us a star ⭐️ to increase our chances of getting into GitHub's trending repositories and tell your friends about the project. The more attention Nevalang gets, the higher our chances of actually making a difference!
v0.30.1
What's Changed
loongarch
support added to install script by @Mr-Ao-Dragon in #837neva.lock
file is now released properly (improvesneva build
andneva get
behaviour) by @Mr-Ao-Dragon in #836README.md
improved for better promotion
Full change-log: v0.30.0...v0.30.1
Important
This is an ambitious project maintained by a small group of enthusiasts. Your support by joining us will show interest and motivate us to continue.
Also, please give us a star ⭐️ to increase our chances of getting into GitHub's trending repositories and tell your friends about the project. The more attention Nevalang gets, the higher our chances of actually making a difference!
v0.30.0
Cross-Compilation Support
Target Flags
You can now use target-os
and target-arch
flags to specify operational system and architecture when using neva build
command. This is only supported when --target=native
(or omitted, which is the same). You must always use these flags in pair or omit both of them, they cannot be used in separate
neva build --target-os=windows --target-arch=arm64 examples/hello_world
Osarch Command
New command neva osarch
lists all possible combinations of target-os
and target-arch
values. At the moment of publishing this release, the list is the following:
aix/ppc64
android/386
android/amd64
android/arm
android/arm64
darwin/amd64
darwin/arm64
dragonfly/amd64
freebsd/386
freebsd/amd64
freebsd/arm
freebsd/arm64
freebsd/riscv64
illumos/amd64
ios/amd64
ios/arm64
js/wasm
linux/386
linux/amd64
linux/arm
linux/arm64
linux/loong64
linux/mips
linux/mips64
linux/mips64le
linux/mipsle
linux/ppc64
linux/ppc64le
linux/riscv64
linux/s390x
netbsd/386
netbsd/amd64
netbsd/arm
netbsd/arm64
openbsd/386
openbsd/amd64
openbsd/arm
openbsd/arm64
openbsd/ppc64
openbsd/riscv64
plan9/386
plan9/amd64
plan9/arm
solaris/amd64
wasip1/wasm
windows/386
windows/amd64
windows/arm
windows/arm64
CLI Help Improved
This release closes #820 issue by improving the --help
flag and help
command (which are the same thing) by adding more information about build
command, especially using --target
(lists supported targets such as native
, go
, wasm
, json
and dot
) and corresponding --target-os
and --target-arch
flags
Important
As you can see, this is quite an ambitious project. Typically, such projects are backed by companies, but Nevalang is maintained by a very small group of enthusiasts. Your support by joining us will show interest and motivate us to continue.
Also, please give us a star ⭐️ to increase our chances of getting into GitHub's trending repositories and tell your friends about the project. The more attention Nevalang gets, the higher our chances of actually making a difference!
v0.29.1
v0.29.0
Nevalang is a general purpose dataflow programming language with implicit parallelism and static typing that compiles to Go and machine code:
What's New?
This is another big release. This time we ship 2 big things and a lot of small ones. Number one big thing is support for anonymous ports in interfaces and another is solving DI drilling problem
Interfaces With Anonymous Ports
// before
interface IDoer(data any) (sig any)
// after
interface IDoer(any) (any)
This allows to have interfaces with many more implementations and makes implementing an interface much simpler. All this leads to much better composability in the ecosystem.
This is however only supported for nodes with 1 inport and 1 outport.
DI Drilling
The name is similar to React's "props drilling" problem
import { fmt } // package with dependency (with interface implementation)
def Main(start any) (stop any) {
foo Foo{printer fmt.Println<any>} // dependency injected
---
:start -> foo -> :stop
}
interface IPrinter(any) (any) // anonymous ports, baby
def Foo(start any) (stop any) {
bar Bar{printer IPrinter} // dependency passed through
---
:start -> bar -> :stop
}
def Bar(start any) (stop any) {
printer IPrinter // dependency defined
---
:start -> printer -> :stop
}
Nevalang supports dependency injection natively almost from the beginning. However, it was very limited up to this point. It was impossible to have intermediate layer between dependency provider and dependency consumer.
For example, Filter
uses Split
inside. Split needs dependency IPredicate
(which is now any component that receives T and sends bool implements, thanks to anonymous ports interfaces feature!). And now you as a user can pass dependency to Filter
, so Filter can bypass it right into split.
This was fundamental limitation for several years of development and solving it was a bit step for the language.
WARNING: You have to explicitly reference name of the dependency at each layer (in this case "printer") because otherwise compiler won't figure out where defined dependency comes from. This might be and might not be a temporary limitation, but that's the way it is.
Nevalang supports anonymous dependency injection similar to how it supports anonymous ports for interfaces (oh yeah) now, so if you don't have DI drilling in your case (Dependency flow is 1 level from parent to direct child), then feel free to pass deps
Node{Dep}
. Remember it's only possible when there's 1 dependency so compiler don't have to guess
Everything Else
- Refactoring (stdlib) - renaming of ports of components for consistency
- Refactor (compiler) - irgen package doesn't use
compiler.Error
because any error at that step is internal - Bug fix (compiler) automatically trims trailing
/
withneva run
andneva build
- Bug fix (lsp) - language server doesn't lookup neva modules upper than current workspace
- Improvement (compiler) - parser saves location of each entity for better compiler errors
- Bug fix (stdlib) -
Filter
component is re-implemented and is available to use again and all its e2e tests are active. New implementation handles.idx
field of astream<T>
message properly (this caused a deadlock in specific programs) - ... and more!
This release closes following issues
v0.28.2
What's Changed
- Fixes in analyzer - add missing support for binary and ternary expressions inside
switch
- Tutorial fixes
Full Changelog: v0.28.1...v0.28.2
v0.28.1
What's Changed
Sub
operator fixed: left and right operands were confused- More e2e tests for operators added
- Tutorial fixed
Full Changelog: v0.28.0...v0.28.1
v0.28.0
What's New?
Compiler
- Error messages improved in several places, by using correct location
Stdlib
- New
fmt.Print
component that works likefmt.Println
but without the newline. - Outport of
http.Get
renamed fromresp
tores
for consistency with other stdlib components. - New
strings.ToUpper
andstrings.ToLower
components.
Documentation
- Book updated to match latest language changes
- Tutorial extended with new section about switch expressions
Full Changelog: v0.27.1...v0.28.0
v0.27.1
What's New?
This is small release that only contains bug-fixes, new tests and documentation updates.
Compiler Error Fixes
Special thanks @gavr123456789 for testing and feedback
- Only print deepest child error and ignore all the upper hierarchy until we figure out how to properly build context for errors.
- Fix error location for non-properly used ports, now location of the node is used, instead of the node's interface location
- E2E test was added to check that we won't broke error location for unused outport
Neva CLI
- Now generates hello world with chained connection instead of deferred one, because we support references and literals as chained now
Documentation
- Book was updated to match latest language changes
- Tutorial is extended with Dataflow section, still WIP
Autogenerated Changelog
- feat(tutorial): updated due to new syntax for constants (support for … by @emil14 in #775
- fix(docs,tutorial): typo cNina -> cHina by @emil14 in #776
- Readme upd3 by @emil14 in #784
- Readme upd3 by @emil14 in #785
- feat(version): 0.27.1 by @emil14 in #786
Full Changelog: v0.27.0...v0.27.1