Releases: nevalang/neva
v0.24.0
What's Changed
- Upgrade command added by @dorian3343 in #608
- Group form entity declaration syntax removed by @emil14 in #614
Product
by @Catya3 in #641Zip
by @Catya3 in #642sync.WaitGroup
by @Catya3 in #628- New
std
components by @dorian3343 in #649 - Replace "component" keyword with "flow" by @emil14 in #659
For
andMap
components by @emil14 in #619
Full Changelog: v0.23.0...v0.24.0
v0.23.0
Removed net
keyword
Before
component Main(start) (stop) {
nodes { Println }
net {
:start -> println -> :stop
}
}
After
component Main(start) (stop) {
nodes { Println }
:start -> println -> :stop
}
Motivation
While being less explicit and consistent with the rest of the language, it saves us one level of nesting which is about 2 lines per component. Also it looks more like a regular function with var
block (it's nodes
in our case) and "list of instructions in a body" (it's list of connections for us).
New image
package in STDlib by @Catya3
New package with two public components: image.New
and image.Encode
. This package also have public types such as image.Image
, image.Pixel
and image.RGBA
. This is stream-based API. Check out examples/image_png
for a minimal example.
Also note that this is just the beginning. The goal is to make Neva language suitable for complex image processing. (It's still is and always will be general purpose language tho).
One-line multiple import
You are now allowed to import several packages in a single line by using ,
, this is consistent with the nodes
block syntax.
import { io, strconv }
However, old syntax (no ,
, newline for each package) is supported and should be preferred when you have a lot of imports.
import {
io
lists
strings
strconv
github.com/nevalang/x:foo
github.com/nevalang/x:foo/bar
github.com/nevalang/x:foo/bar/baz
@:/utils
@:/models/users
}
Rest
As usual little improvements and bug fixes in compiler here and there.
v0.22.0
v0.21.0
New Components
- New
http
package withhttp.Get
component by @Catya3 - New
List
component inbuiltin
that turnsstream
intolist
Backward Compatibility Changes
x
package was removed fromstd
module- New
strconv
package was added x.ParseNum
was moved tostrconv.ParseNum
x.Scanln
was moved toio.Scanln
Reduce
(decorator that allows stream processors likeAdd
accept array-inport slots) was renamed toReducePort
- New
strings
package Split
andJoin
components were moved tostrings
package, they are nowstrings.Split
andstrings.Join
respectfullyIndex
signature was updated to work with both lists and strings. Usage now looks likeIndex<list<T>>
orIndex<string>
Other
- Bug fixes and improvements
- Refactoring of internals
Full Changelog: v0.20.0...v0.21.0
v0.20.0
v0.19.1
v0.19.0
What's Changed
- Deps: Protect neva dir with .lock file by @Catya3 in #554
- Anon deps by @emil14 in #555
- DOT: Enhanced Graphviz with clearer in/out ports. by @Catya3 in #556
- Upd examples by @emil14 in #557
- reimplemented iter by @dorian3343 in #565
- feat(e2e): local imports by @emil14 in #569
- fix(cli): use module root to correctly identify main pkg name (path) by @emil14 in #570
Full Changelog: v0.17.0...v0.19.0
v0.17.0
What's Changed
- Runtime functions: get rid of select-hell and add few fixes by @emil14 in #548
- Port-less connections (new syntax sugar) by @emil14 in #549
- FileReader and FileWriter API by @Catya3 in #547
- Refactor examples by @emil14 in #551
- Parser: fix chained + deferred connection use-case by @emil14 in #550
- Refactor: remove unused code in desugarer by @emil14 in #552
Port-less connections syntax sugar
Now you can omit in/out port name if there's only one port per side. E.g. instead of
42 -> println:data
println:sig -> :stop
You can now write
42 -> println
println -> :stop
This can be combined with chaining:
42 -> println -> :stop
Could be infinitely chained:
p1 -> p2 -> p3 -> ... -> pN
Deferred connections backward compatibility broken
You can't have multiple deferred connections in a single ()
expression anymore. E.g. you can't write code like this
:start -> (
$l -> push:lst,
$f -> push:data
)
But you still can (and always will be able to) write it like this
:start -> [
($l -> push:lst),
($f -> push:data)
]
Full Changelog: v0.16.0...v0.17.0
v0.16.0
What's Changed
- New graphviz backend by @Catya3 in #540
- New chained connection syntax sugar and massive renaming in stdlib by @emil14 in #533
On new syntax sugar
You can now chain connections where inport and outport has the same name. E.g. instead of
a:b -> c:d
c:d -> e:f
You can now just write
a:b -> c:d -> e:f
It's also possible to chain as many as you want
a:b -> c:d -> e:f -> g:h ...
On renaming in standard library
Basically I decided to use shorter names and ditch "er" endings, use function-like (verbs) names instead:
- Emitter -> New
- Destructor -> Del
- Blocker -> Lock
- StructBuilder -> Struct
- StructSelector -> Field
- Adder -> Add
- Subtractor -> Sub
- Multiplier -> Mul
- Decrementor -> Decr
- Printer -> Println
- Fprinter -> Printf
- PortStreamer -> PortSequencer
- ISeqHandler -> ISeqReducer
- PortBridge -> PortReducer
- regexp.Submatcher -> regexp.Submatch
- x.NumParser -> x.ParseNum
- x.LineScanner -> x.Scanln
On Match and Mod
These two implement the same pattern, they had case
array-inport and then
array-outport. The outport is now also case
. The reason is new "chained" syntax. Now we have a reason to name outport like inport where it's convenient.
Stream vs Sequence
Some components emit sequences of messages separated by delimiters, maybe
type is used for that. The term used for that was "stream" and the thing is - it's a bad name for that. Classic FBP defines "stream" as messages that flows through connection. So streams are everywhere. The right word for that is "sequence". So stream
ports were renamed to seq
and word "sequence" must be used insted.
BTW the word for what is list
and map
is "collection". E.g. you can now find collections.neva
file in stdlib module.
Handlers vs Reducers
The word for "component that takes sequence of type T and produce one value of that type T" is now reducer, now handler. Also PortBridge
was renamed to PortReducer
because of that. Handler was too vague term. Reducer is what is exactly is.
Full Changelog: v0.15.0...v0.16.0
v0.15.0
What's Changed
- fix download script by @Mr-Ao-Dragon in #534
- add new arch support by @Mr-Ao-Dragon in #535
- fix(runtime): stringer for float by @emil14 in #538
- CLI: Add support for new "json" build target by @Catya3 in #539
- List Push & List Sort by @dorian3343 in #536
New Contributors
- @Mr-Ao-Dragon made their first contribution in #534
- @Catya3 made their first contribution in #539
Full Changelog: v0.14.0...v0.15.0