Skip to content
forked from nevalang/neva

🌊 Next-generation programming language that solves programmers' problems

License

Notifications You must be signed in to change notification settings

WoodyAtHome/neva

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nevalang logo

Neva Programming Language

Dataflow

Next-generation programming language that solves programmers' problems

tests lint go report Discord ChatGPT OS Go License: MIT

Documentation | Examples | Community | Releases | Contributing | Architecture

⚠️ WARNING: This project is under active development and not yet production-ready!

πŸ€” What Is Nevalang?

Nevalang 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 and everything runs 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.

Combined with built-in stream processing support and features like advanced error handling, Nevalang is the perfect choice for cloud-native applications requiring high concurrency.

Future updates will include visual programming and Go interoperability to allow gradual adoption and leverage existing ecosystem.

Why Yet Another Programming Language?

We created Nevalang because we saw a gap in the programming language landscape:

  1. Visual Programming Done Right - While there are many visual programming tools, they're usually limited to specific domains or lack the power of traditional programming. Nevalang is designed from the ground up to be a hybrid visual/text-based programming environment.
  2. Simple Parallel Programming - Most languages treat concurrency as an advanced feature, making it complex and error-prone. In Nevalang, parallelism is the default, and the language design prevents common issues like data races.
  3. Modern Developer Experience - We combine the best ideas from modern languages with dataflow programming to create a unique development experience focused on productivity.

Finally, we believe exploring new programming paradigms is valuable for the entire programming community, even if only to learn what works and what doesn't.

πŸ‘‹ Hello, World!

import { fmt }

def Main(start any) (stop any) {
	println fmt.Println<string>
	---
	:start -> 'Hello, World!' -> println -> :stop
}

What's happening here:

  • import { fmt } loads the fmt package for printing
  • def Main defines the main component with input port start and output port stop of type any (it's safe since it's only used as a signal)
  • :start -> 'Hello, World!' -> println -> :stop defines a connection that sends the string to println when program starts and terminates after printing (runtime sends a message to Main:start at startup and waits for Main:stop to terminate)

πŸ”₯ Features

  • Dataflow Programming - Write programs as message-passing graphs
  • Implicit Parallelism - Everything is parallel by default, no async-await/threads/goroutines/etc.
  • Strong Static Typing - Robust type system with generics and pattern-matching
  • Machine Code Compilation - Compile for any Go-supported platform, including WASM
  • Stream Processing - Handle real-time data with streams as first class citizens
  • Advanced Error Handling - Errors as values with ? operator to avoid boilerplate
  • Functional Patterns - Immutability and higher-order components
  • Dependency Injection - Modularity with interfaces and DI
  • Minimal Core - Simple language with limited abstractions
  • Package Manager - Publish packages by pushing a git-tag
  • Garbage Collection - Automatic memory management using Go's low-latency GC
  • Visual Programming (WIP): Edit programs as visual graphs
  • Go Interoperability (WIP): Call Go from Neva and Neva from Go
  • NextGen Debugging (WIP): Observe execution in realtime and intercept messages on the fly

🧐 Why Use Nevalang?

Let's compare Nevalang with Go. We could compare it to any language but Go is a simple reference since Nevalang is written in Go.

Feature Neva Go
Paradigm Dataflow - nodes send and receive messages through connections Control flow - execution moves through instructions step by step
Concurrency Implicit - everything is concurrent by default Explicit - goroutines, channels, and mutexes
Error Handling Errors as values with ? operator to avoid boilerplate Errors as values with if err != nil {} boilerplate
Mutability Immutable - no variables and pointers; data races are not possible Mutable - variables and pointers; programmer must avoid data races
Null Safety Yes - nil pointer dereference is impossible No - nil pointer dereference is possible
Zero Values No zero values - everything must be explicitly initialized Zero values by default - everything can be initialized implicitly
Subtyping Structural - types are equal by their shape Nominal - types are equal by their name
Traceback Automatic - every message traces its path Manual - programmer must explicitly wrap every error to add context
Dependency Injection Built-in - any component with dependency expects injection Manual - programmer must create constructor function that takes dependencies
Stream Processing Native support with components like Map/Filter/Reduce Programmer must manually implement dataflow patterns with goroutines and channels

🏭 Architecture

This is a high-level overview. For a more detailed overview of the architecture, please see ARCHITECTURE.md

flowchart LR
  source_code-->compiler-->|go_code| go_compiler

  subgraph compiler
    parser-->analyzer-->backend
  end

  go_compiler-->machine_code
  go_compiler-->wasm
Loading

Nevalang compiles to dependency-free, human-readable Go code that uses goroutines and channels for message-passing with parallelism. The Go compiler then produces optimized platform-specific code for any supported platform. This approach gives our programs access to Go's production-grade runtime with an advanced scheduler, garbage collector, and battle-tested standard library. We stand on the shoulders of giants.

⭐️ Star History

Star History Chart

πŸ’­ What's Next?

ℹ️ We take development seriously but have limited time to keep everything current. Feel free to reach out on our social platforms with any questions!

Community

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.

Discord Telegram Reddit Twitter

Contributing

  1. See contributing and architecture
  2. Check out roadmap and kanban-board
  3. Also please read our CoC
  4. Join discord server

Support

Please give us a star ⭐️ to increase our chances of getting into GitHub trends - the more attention Nevalang gets, the higher our chances of actually making a difference.

GitHub Star

Please share this project with your friends! Every share helps us reach more developers and grow our community. The more developers we reach, the more likely we are to build something truly revolutionary together. πŸš€

share on x share on facebook share on reddit share on telegram share on whatsapp share on hackernews share on linkedin

About

🌊 Next-generation programming language that solves programmers' problems

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.6%
  • HTML 1.1%
  • Other 2.3%