Skip to content

Releases: odin-lang/Odin

Odin v0.2.1

01 May 14:33
Compare
Choose a tag to compare

Added

  • Allow vector math with its element type
  • for in iteration of enum Type

Changes

  • bprint* returns a string now

Fixes

  • Fix statement parsing of unary & and ^
  • Fix IR vector arithmetic bug
  • Fix unary expression for vectors

Odin v0.2.0 - Windows

30 Apr 16:00
Compare
Choose a tag to compare

Added

  • Complex numbers

    • complex64, complex128
  • Quaternions

    • quaternion128, quaternion256
  • New built in procedures

    • conj(x)
    • len(x), cap(x)
    • make([]T), make([dynamic]T), make(map[K]V)
    • transmute(T, x)
  • #require_results for procedures

  • Interval syntax

    • a..b open range [a, b]
    • a..<b half-closed range [a, b)
  • Interval expression is match statements

    • case 'A'..'Z', 'a'..'z':
  • Addressing operator & (replaces ^)

    • x: int; p: ^int = &x; i: int = p^;
  • New casting syntax

    • Basic type conversion: type(x)
      • Replaces cast(type)x
    • Type assertion: x.(type)
      • Replaces union_cast and works with any not just unions
    • Bitcast: transmute(T, x)
      • Replaces transmute(T)x
  • os.args Command line arguments in os.odin

  • Correct C ABI for x86/amd64 on Windows

Changes

  • Remove .count and .capacity and replace with len() and cap()
  • Remove new_slice and replace with `make
  • Removed down_cast
  • Move Raw_* types to raw.odin
  • Change memory layout of any
  • Changes to fmt.odin
    • Remove sprint*
    • Add aprint*, bprint*, sbprint*
  • strconv.parse_int in strconv.odin

Bug fixes

  • Cast to any of untyped constants
  • Fix append crash when pointer is passed
  • Fix slicing bug on dynamic arrays
  • Fix map key not getting transferred on rehash
  • Bugs with union size and alignment
  • Fix procedure literal scopes and dependencies
  • Fix subtype polymorphism
  • Fix double declaration in when statements
  • Fix float precision printing

Odin v0.1.3

27 Mar 19:46
Compare
Choose a tag to compare

Added

  • Slices now store have capacity (again)
  • Added multiple type cases for match in
  • Named for and match statements (#label)
  • ++ -- statements return

Changes

  • fmt.odin uses ^[]byte and []byte rather than custom buffer type
  • ... and ..< removed and replace with ..
  • .. is used for slice parameters and in for in statements which is equivalent to the old ..<
  • append allows pointers
  • new_slice allows for capacity

Bug Fixes

  • Signed integer conversion
  • fmt.odin fix printing enums
  • Fix tuple type info bug

Odin v0.1.1

24 Feb 19:56
Compare
Choose a tag to compare

Added

  • Entities and record fields prefixed with an underscore do not get exported on imports
  • Records have an implicit names fields, a []string of all the names for that record (struct/raw_union/enum)
  • New built-in procedures
    • slice_to_bytes - convert any slice to a slice of bytes
    • delete - remove an entry from a map
    • clear - clear the contents of a map or dynamic array (e.g. set the count to zero)
    • reserve - reserve memory for the dynamic map or array
  • union_cast allows for an optional "ok" check; will panic if the cast is invalid and the ok check was not used
  • ?: ternary operator (replaces block and if expressions)
  • Unions with variants and common fields

Changed

  • Core library additions to Windows specific stuff

Fixes

  • Overloading bug due to comparison of named types
  • Overloading bug due to #import . collision
  • Disallow a cast from a pointer of a union (use union_cast instead)
  • Minor bugs in generated IR code for slices

Odin v0.1.0

11 Feb 21:22
Compare
Choose a tag to compare

Added:

  • Dynamic Arrays [...]Type
  • Dynamic Maps map[Key]Value
  • Dynamic array and map literals
  • Custom struct alignemnt struct #align 8 { bar: i8 }
  • Allow _ in numbers
  • Variadic append
  • fmt.sprint*
  • Entities prefixes with an underscore do not get exported on imports
  • Overloaded free for pointers, slices, strings, dynamic arrays, and dynamic maps
  • enum types have an implict names field, a []string of all the names in that enum

Removed:

  • Maybe/option types
  • immutable variables
  • Remove type keyword and other "reserved" keywords

Changed:

  • compile_assert and assertreturn the value of the condition for semantic reasons
  • thread_local -> #thread_local
  • #include -> #load
  • Files only get checked if they are actually used
  • match x in y {} // For type match statements
  • Version numbering now starts from 0.1.0 and uses the convention:
    • major.minor.patch

Fixes:

  • Many fmt.* fixes

To come very Soon™:

  • Linux and OS X builds (unofficial ones do exist already)

Odin v0.0.6b

29 Jan 14:47
Compare
Choose a tag to compare

Bug Fixes

  • Fix assignment of "untyped" constants to any (issue #13)
  • Fix crash when passing arguments with no value/type to a call

Odin v0.0.6a

28 Jan 20:19
Compare
Choose a tag to compare

What's New

  • Overloaded free
    • Accepts pointers, slices, and strings
  • 3 dotted ellipsis ...

Odin v0.0.6

27 Jan 23:12
Compare
Choose a tag to compare

What's New

  • Procedure Overloading
  • All loops are for loops:
    • for i := 0; i < 12; i+=1 {}
    • for cond {}
    • for {}
    • for val in 0..<12 {}
    • for val in 0..12 {}
    • for val, idx in 3..<12 {}
    • for _ in array {}
  • match type name in expr {}
  • cast(T) transmute(T) down_cast(T) union_cast(T)
  • Improved fmt.printf
  • Record fields separated by commas struct { x: int, y: f32, z: int }
  • Capacity removed slices. Slices are just ptr + count
  • Helper type
    • type int
    • type proc(int) -> f32
  • Prefixes: immutable using thread_local no_alias
  • Library names - explicit library need for foreign procedures
  • Basic directives: #file #line #procedure

Odin v0.0.5e

07 Jan 11:49
Compare
Choose a tag to compare

Bug fixes

  • Fix problems with core library (os.odin, mem.odin, sys/windows.odin)
  • Disable adding entity definitions for blank identifiers

Thanks

Thank you @Fyoucon for testing 0.0.5? and for the numerous patches I've had to do 😛.

Odin v0.0.5d

06 Jan 15:49
Compare
Choose a tag to compare

Bug Fixes

  • Fix pointer to arrays as for iterators
  • Remove need for extra stack allocations in runtime startup.