Releases: vain0x/milone-lang
v0.6.1
v0.6.1 - 2024-01-07
This version fixes a build issue. It also provides .NET tool version upgrade and some performance improvement.
CLI Tools
- (Windows)
milonecommand now generates VS2022 project files to build C code.
LSP Server
- Parse results are now memoized
- Some refactoring
Internal Changes
Compiler:
- Type synonym expansions is now faster
- Preparations for workspaces:
- Multiple
mainfunctions are now allowed - (Windows) MSBuild backend supports multi-projects
- Multiple
Others:
- Use
--allsigoptions in F# projects (to reduce compilation time) - Add
scripts/profanddocs/internals/profiling.md - Fix build/pack scripts
v0.6.0
From CHANGELOG:
Documentation
- Clarify limitation of
__nativeDeclarguments - Add explanation of generic nominal types
- Add type synonyms page
Language Features
- Support generic records
- Fix type check bugs
- Fix unicode string literals broken
- Add
nevertype - Add primitives:
- Add byte literals (
'a'Bsyntax) - Add bitwise negation operator (
~~~)
- Add byte literals (
- Improve for native interop (still incomplete):
- Add
FunPtr<P, T>(fromStd.Ptr), type of function pointers (replacing experimental__nativeFuntype) - Add
FunPtr.invokeprimitive (fromStd.Ptr) to invoke a function pointer - Add Ptr-of operator (
&&) to obtain pointers of named functions (replacing experimental__nativeFun funNamesyntax) - Add
Opaquetypes - Add
Exportattribute on functions (to preserve the function name to link time)
- Add
- Improve manifest:
- Add directives to specify output binary type in manifest
binary shared(*.so,*.dll)binary staticlib(*.a,*.lib)
- Add
subsystem windowsdirective (only on Windows)
- Add directives to specify output binary type in manifest
Standard Libraries
- Add
Std.CStr,Std.CMemorymodules for native interop - Add
Std.StringBuffermodule - Remake
Std.File
CLI Tool
- Add
milone parsesubcommand - Fix
milone run .that didn't work
LSP Server
- Support
prepareRenamerequest (the editor can now reject at invalid position) - Support
completionof static namespace members and record fields - Fix
diagnosticsare too frequently updated - Fix the server tries to continue after out of memory
- Fix the server didn't do almost anything if type errors present
VSCode Extension
- Add
Show Syntax Treecommand - Support double-backticks (``) as brackets
Build Chain
- Change default install directories (to match match XDG):
$HOME/.local/bin(rather than$HOME/bin)$HOME/.local/share(rather than$HOME/.milone)
Internal Changes
Compiler:
- Change project structure to revert separation of types and implementation projects (lack of benefits)
- Transfer module load process to clients (CLI tool and LSP server)
- Improve separate compilation by generating label names per function
- Add SyntaxTree generation
- Allow
DocIdrepresentation to vary in clients- Compiler still uses
P.Mmodule paths. LSP server now uses absolute file paths to avoid conflict.
- Compiler still uses
- Change
exitto a regular function in Prelude
Standard Libraries:
- Add
Std/FormatBase.miloneas wrapper ofsprintf-like code- (It isn't a public interface of Std but no way to express such privacy)
Nursery:
- Add LibPoda
SHA256
289dc4362477dda4e8ef48725d2c05f964d184f9ac17b81758655081662d6edd milone-0.6.0-x86_64-unknown-linux-gnu.tar.gz
77503e0c46836bd670535292d1ccf16c187c13ef639912ce552417d607a30fbb milone-0.6.0-x86_64-pc-windows-msvc.zip
v0.5.0
This release is made because of its size:
- 9 months have passed since the previous release
- many changes have happened.
The milone-lang isn't still practical nor production-quality. Even language design is incomplete, especially expressiveness of side-effect. Build system, C-interop, LSP server need more works. I'm exploring the way for the language to grow.
From CHANGELOG:
Documentation
- Rewrite README
- Update ARCHITECTURE
- Add Glossary
- Add documentation for:
- Syntax
- Name resolution (incomplete)
- Arity check
- AST bundle
- Add design policy
- Add developer notes
Language Features
- Improve syntax:
- Support hex escape in quotes
- Support integer suffix
- Parse
funexpressions in arguments better - More strict syntax for
<token (space-sensitive) - Fix precedence of binary operators for compatibility with F#
- Unreserve some of keywords as unreserved in F# 4.1
- Improve type checks:
- Fix lots of incorrect type checks
- No longer nested functions are generic
- No longer type variables are unified with particular types (unlike
_types are) - Resolve trait bounds before generalization as possible
- Support equality for built-in types: list, option, tuple and discriminated union
- (Note
open Std.Equalis required to enable this feature.)
- (Note
unitis comparable nowcharis now convertible only from/to 8-bit integers to avoid incompatibility with F#optionis defined as a discriminated union now (which is still built-in type, almost non-functional change)Resultis a new built-in type (which is also defined as a discriminated union)
- Improve transformation:
- Small generic unions can now be unboxed
- Improve code generation:
- Use
int32_ttype from C forinttype- Same for
uint
- Same for
- Top-level expressions are generated in C file of that module (rather than collected into single module)
- Fix an issue of
__nativeTypecontaining spaces - Emit a directive to include
<milone.h>(rather than"milone.h") to search system directories - Emit
__nativeDeclin more suitable order - Emit verbose, context-preserving symbol names for more stable compilation outputs
- Inline
ifstatement in use-site ofassert - Change name of Cons struct to
FooCons(rather thanFooList) - Change style of pointer-type to
T *(rather thanT*) - Generate
typedeffor function pointer types to fix invalid code generation issues
- Use
- Support ownership for better expressiveness
- Add
OwnmoduleOwn<'T>typeacquire,releaseprimitives
- Support ownership check
- Add several standard libraries built on top of it
- Add
- Support more pointer types and primitives
- Add
OutPtr<'T>andVoidInPtr<'T>types - Change
__constptr<'T>toInPtr<'T> - Add ptr-of (
&&) operator - Add
Ptrmoduleselect,read,writenullPtr,invalidcast,asIn,asNativedistance
- Add
- Improve primitives:
- Fix an issue that
string : bool -> stringdidn't work at all - Add
__discriminant - Add
sizeof<'T>, remove__sizeOfValprimitive in favor of this - Rename
inRegiontoRegion.run __nativeExpretc. can now embed some expressions and types
- Fix an issue that
- Support provisional manifest files (
milone_manifest)
Runtime Library
- Reduce headers included in
milone.h - Heaps are now stored in thread-local variables (rather than static)
- Rename most of functions
- Prefer
uint32_tfor size/length/capacity (overint)
Standard Libraries
- Rename to
Std(fromMiloneStd) - Add modules:
StdAssocStdErrorStdIterStdJsonStdListStdLoopStdMultimapStdNativeInteropStdOptionStdPairStdResultStdTestingOwnPtrRegionIO,File,Path,OsStringVector,ByteVector,Block,Box,HashMapStringBuffer
- Add functions:
Option.foldList.takeWhileStdCharevalDigit,evalHex
StdStringcut,cutLastformattoLower,toUpperlowerFirst,upperFirstsplit,splitAtstripStart,stripEndparseHexAsUInt64,uint64ToHexStringExtasPtr, etc.
- Change
StdMap.TreeMapto a generic union (from a synonym) - Fix an issue that
StdString.cutLineandtoLinesaren't binary-safe
CLI Tool
- Add
milone evalsubcommand milonenow definesNDEBUGmacro on release build as convention of C compilation- Outputs of runtime library are now written in the target directory (rather than source directory of runtime library)
LSP Server
- Support find references for more kinds of symbols: variants, fields, types and modules
- Support
textDocument/documentSymbol - Support
textDocument/completion- module names in open/module declarations
- local values
- Support
textDocument/codeAction- "Generate module head"
- "Generate module synonym"
- "Generate open"
- Support
textDocument/formatting(by spawningfantomas, an F# formatter) - Improve ranges of diagnostics
- Improve error handling, report failed requests
- Detect projects created after starting a server
- Fix an issue that sever doesn't work on Windows due to Windows-style pathnames
VSCode Extension
- Rewrite syntax definition for better highlights
- Run LSP server with limited heap size to workaround out-of-memory issue
Build Chain
- Migrate to .NET 6 (from .NET 5)
- No longer require
busybox - Installation script for Linux now requires
curland automatically downloadsninjabinary
Internal Changes
Compiler:
- Change directory structure
- Source files are in
srcdirectory, including scripts and runtime library - Projects for types and functions are separated for less dependencies
- Source files are in
- No longer support
MiloneOnlymodules DocIds are interned as Symbol- Passes run per module as possible
- Move works about type check from name resolution to the Typing module
- Redesign name resolution, introduce IR for name resolution (NIR)
- Map of non-static variables are split into modules
- HIR no longer has visibility of symbols and
recmodifiers - Rewrite monomorphization algorithm for more efficiency
- Change parameter order
S -> T -> Sfor foldS -> T -> T * Sfor map-fold
- Remove intermediate type information from MIR expressions
LSP server:
- Use fixed-sized intermediate buffer for simplicity
- Rewrite concurrent part for better cancellation supports
- Decouple from .NET and side-effect functions for tests and porting to milone-lang
- Add tests a bit
Nursery:
nursery/CmdLspServerproject has started (not working though)nursery/ExDyLibas experiment of interop with Rust
Suspended works:
- Fixing type check of recursive functions (difficult)
- Compiling pattern matching in better way (difficult)
- Designing SSA-style IR (difficult)
- Serializing (caching) compilation results (Writing in JSON makes too large outputs. It needs to switch to an appropriate binary format.)
- Adding
cloneprimitive for lower memory usage peak (less priority) - Improving test scripts (less priority)
v0.4.0
Updated so many things.
- Added
milone buildsubcommand andmilone runsubcommand to use milone programs easily. - Supported generic discriminated union types.
- Fixed many issues about typing etc.
SHA256
af32f55effd2b38e496694a268711b65560787218a6bcb76216e43935726d3b6 milone-0.4.0-x86_64-linux-gnu.tar.gz
6596f2a087a01c1424bebc9f0d474e109ec99e5c4ee9b904d4527c466aa62990 milone-0.4.0-x86_64-pc-windows-msvc.zip
v0.3.0
- Fixed an issue that generated code was not C11-comliant
- Improved mechanism of projects and modules
- Added optimization to unwrap newtype variants
SHA256
4f1fc8d80c9df77ae6be3f0c16aa6c381bc8b52d7aa1b42fa8bcd3a999c090ea milone-0.3.0-linux-x64.tar.gz
20b2e27edd0c6691f44fd6bd5f43a3075345fe9ecf5b9719fd55ce7d0becdd74 milone-0.3.0-win10-x64.zip
v0.2.0
Improved error reporting, compiler's stability and performance.
Download the package to try it on your local computer.
- Executables work only on Linux of x86_64 architecture.
- .NET executables need .NET 5 runtime for linux-x64.
SHA256: 79233e22e5a639414fe767b8088f333fde382cf80c7817beaa64f7fd528cb923 milone-0.2.0.tar.gz