Skip to content

Releases: nevalang/neva

v0.24.0

27 May 21:53
883a7ae
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.23.0...v0.24.0

v0.23.0

07 May 17:05
5c2f015
Compare
Choose a tag to compare

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.23.0

v0.22.0

04 May 15:45
cc76527
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.21.0...v0.22.0

v0.21.0

03 May 19:22
01ef0df
Compare
Choose a tag to compare

New Components

  • New http package with http.Get component by @Catya3
  • New List component in builtin that turns stream into list

Backward Compatibility Changes

  • x package was removed from std module
  • New strconv package was added
  • x.ParseNum was moved to strconv.ParseNum
  • x.Scanln was moved to io.Scanln
  • Reduce (decorator that allows stream processors like Add accept array-inport slots) was renamed to ReducePort
  • New strings package
  • Split and Join components were moved to strings package, they are now strings.Split and strings.Join respectfully
  • Index signature was updated to work with both lists and strings. Usage now looks like Index<list<T>> or Index<string>

Other

  • Bug fixes and improvements
  • Refactoring of internals

Full Changelog: v0.20.0...v0.21.0

v0.20.0

29 Apr 17:07
4c534e0
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.19.1...v0.20.0

v0.19.1

28 Apr 10:46
d55e088
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.19.0...v0.19.1

v0.19.0

26 Apr 16:44
dfea7f2
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.17.0...v0.19.0

v0.17.0

10 Apr 16:54
696b911
Compare
Choose a tag to compare

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

07 Apr 18:44
19a19c7
Compare
Choose a tag to compare

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

06 Apr 17:55
31224ae
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.14.0...v0.15.0