Skip to content

Commit

Permalink
Release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
perlun committed Feb 27, 2022
1 parent 3aa2993 commit f484f87
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions .metadata/latest-release.txt
@@ -0,0 +1 @@
v0.1.0
91 changes: 91 additions & 0 deletions release-notes/v0.1.0.md
@@ -0,0 +1,91 @@
## [0.1.0] - 2022-02-27. _🇺🇦 We stand with Ukraine 🇺🇦_
- The first public release of Perlang. 🎉 Over [200 pull requests](https://github.com/perlang-org/perlang/pulls?q=is%3Apr+milestone%3A0.1.0+is%3Aclosed) were merged to form this version. This changelog will regretfully not go into _all_ of them, but will list some of the major achievements.
- A basic interpreter for [the Lox language](https://craftinginterpreters.com/the-lox-language.html) was written, first [in Java](https://github.com/perlun/jlox) (by following @munificent's great tutorial), then [rewritten in C#](https://github.com/perlun/cslox/) by @perlun. This provided the foundation of the Perlang code base. A stable, well-documented interpreter for a dynamic language that could be extended to provide what we wanted.

One important difference between the Lox language and Perlang as it currently stands is that _Perlang doesn't support user-defined classes_. I originally had support for defining classes (but not methods) in the language, but I decided to take it away because it was confusing to be able to define a class but not define methods in it as in other OOP-based languages. For now, `class` is a reserved keyword.

The reason I was hesitant to add class support is that I felt that a _class_ in Perlang would rightfully be a CLR class within the runtime, i.e. a proper .NET type. By doing it like that, it would be possible to interop between Perlang and .NET code easily; otherwise it would be hard to e.g. subclass a .NET type from Perlang and use the result as a parameter when calling a .NET/C# method. Making it be a proper, dynamically defined .NET type (with methods dynamically defined) seemed rather complex though. For now, there is also no compelling reason _forcing_ us to add class support. User-defined functions (supported in both Lox and Perlang) are good-enough as basic building blocks for Perlang programs at this stage.

The text below tries to briefly highlight some of the features added/changed compared to the Lox code base. For the full details, see the [list of merged pull requests](https://github.com/perlang-org/perlang/pulls?q=is%3Apr+is%3Aclosed+milestone%3A0.1.0) in this release.

In addition to the features listed below, a significant effort was made to bring the [project web site](https://perlang.org) to a reasonable MVP state. The web site is a good entry point to the project: please help me proof-read the text and submit pull requests (or issues) if you find anything there that seems obviously wrong. There is a nice little _"Improve this Doc"_ link on each web page that takes you right to the corresponding `.md` file in the GitHub repo.

### Added
#### Operators
- Add support for postfix increment and decrement [[#17][17]]
- Implement `**` exponential operator [[#133][133]]
- Implement shift left (`<<`) and shift right (`>>`) operators [[#247][247]]

#### Language features
- Support `int` literals in addition to `double`s [[#40][40]]
- Support for binary, octal and hexadecimal literals [[#219][219], [#220][220], [#217][217]]
- Support underscores in integer literals [[#221][221]]
- Move away from relying on dynamic for unary prefix/postfix operators [[#227][227]]
- When [#40][40] was first implemented, the `dynamic` approach was used since it made the implementation much simpler. However, it turned out to be more and more problematic and we managed to eventually rewrite all boolean operators to use predictable, fixed type handling instead.
- Warn on ambiguous combination of boolean operators [[#256][256]]

#### Data types
- Add `long` datatype [[#210][210]]
- Add `bigint` type [[#238][238]]

#### CI
- Add CI & config for publishing packages on each `master` commit [[#20][20]]
- Use build matrix for release publishing [[#244][244]]
- Run tests on all supported platforms [[#257][257]]

#### Platform support
- Publish packages for `linux-x64`, `osx-x64`, `win-x64` [[#20][20]]
- Add `osx-arm64` builds to the list of supported architectures [[#136][136]]
- Add `linux-arm` support [[#242][242]]
- Add `linux-arm64` support [[#243][243]]

#### General
- Build with .NET 5.0 [[#126][126]]
- Upgrade to .NET 6 [[#223][223]]

### Changed
- `and` and `or` was changed to `&&` and `||` [[#253][253]]

### Fixed
(Note: these bugs were both _introduced_ and _fixed_ in this version. They are noted here for the sake of completeness. The list below is a very small subset of the [full list](https://github.com/perlang-org/perlang/issues?q=label%3Abug+is%3Aclosed+milestone%3A0.1.0) which contains no less than 60 (!) bug fixes.)

- Detect invalid numbers in the REPL [[#137][137]]
- 'System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types' when executing Perlang program from R2R binary [[#199][199]]
- 'System.OverflowException: Value was either too large or too small for a UInt64' on integer assignment [[#205][205]]
- `BigInteger ** BigInteger` causes TargetInvocationException [[#224][224]]
- Operator '+' cannot be applied to operands of type 'System.Numerics.BigInteger' and 'double' [[#226][226]]
- Fix integer expansions to `bigint` [[#234][234]]
- Make number-to-string conversions use invariant culture. [[#261][261]]

### Special thanks

Thanks to @slovdahl who helped verify that the `linux-arm` and `linux-arm64` ports worked correctly on various Raspberry Pi devices.

[17]: https://github.com/perlang-org/perlang/pull/17
[20]: https://github.com/perlang-org/perlang/pull/20
[40]: https://github.com/perlang-org/perlang/pull/40
[126]: https://github.com/perlang-org/perlang/pull/126
[133]: https://github.com/perlang-org/perlang/pull/133
[136]: https://github.com/perlang-org/perlang/pull/136
[137]: https://github.com/perlang-org/perlang/pull/137
[199]: https://github.com/perlang-org/perlang/pull/199
[205]: https://github.com/perlang-org/perlang/pull/205
[210]: https://github.com/perlang-org/perlang/pull/210
[217]: https://github.com/perlang-org/perlang/pull/217
[219]: https://github.com/perlang-org/perlang/pull/219
[220]: https://github.com/perlang-org/perlang/pull/220
[221]: https://github.com/perlang-org/perlang/pull/221
[223]: https://github.com/perlang-org/perlang/pull/223
[224]: https://github.com/perlang-org/perlang/pull/224
[226]: https://github.com/perlang-org/perlang/pull/226
[227]: https://github.com/perlang-org/perlang/pull/227
[234]: https://github.com/perlang-org/perlang/pull/234
[238]: https://github.com/perlang-org/perlang/pull/238
[242]: https://github.com/perlang-org/perlang/pull/242
[243]: https://github.com/perlang-org/perlang/pull/243
[244]: https://github.com/perlang-org/perlang/pull/244
[247]: https://github.com/perlang-org/perlang/pull/247
[253]: https://github.com/perlang-org/perlang/pull/253
[256]: https://github.com/perlang-org/perlang/pull/256
[257]: https://github.com/perlang-org/perlang/pull/257
[261]: https://github.com/perlang-org/perlang/pull/261

1 comment on commit f484f87

@perlun
Copy link
Collaborator Author

@perlun perlun commented on f484f87 Mar 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #298 for an issue describing how to use this for creating an aggregated CHANGELOG.md file.

Please sign in to comment.