Projects Jams Discord News
Resources
Unwind Fishbowls Forums
About
Manifesto Our values About
Log In

Odin Goals for 2019

Ginger Bill December 26, 2018

Odin is extremely far along and pretty much nearing a conclusion as a language. However, there is still a lot to do!

The following list has not yet to been finalized:

[ul]

  • Extend Foreign System
    • Support Assembly
    • Support C-Header file generation for Odin libraries
    • Support for Automatic DLL Loading

  • ]Custom Back End
    • To replace LLVM as the default backend (but also support LLVM too)
    • AMD64 and x86-32 support initially
    • Debugging Symbols (PDB/DWARF Generation)
    li]
  • Designing and Implementation of the Core Packages
    • Compression
    • CLI Tools
    • Mathematics and Statistics
    • Containers
    • Custom Allocators
    • OS
    • Image Reading/Writing
    • String Utilities
    • Unicode Lookups
    • Basic Networking

  • g Utilities [ul]
  • Compiler/Core Packages
  • [li]User Co

    Read more

    Exceptions - And Why Odin Will Never Have Them

    Ginger Bill September 4, 2018

    Original Comments: https://github.com/odin-lang/Odin/issues/256#issuecomment-418073701 https://github.com/odin-lang/Odin/issues/256#issuecomment-418289626

    There will never be software exceptions in the traditional sense. I hate the entire philosophy behind the concept.

    Go does have exceptions with the defer, panic, recover approach. They are weird on purpose. Odin could have something similar for exceptional cases.

    You can the exact same semantics as a try except block by using a switch in statement. The same is true in Go. The difference is that the stack does not need to be unwinded and it's structural control flow.

    Odin has discriminated unions, enums, bit sets, distinct type definitions, any type, and more. Odin also have multiple return values. Use the type system to your advantage.

    I do hate how most languages handle "errors". Treat errors like any other piece of code. Handle errors there and then and don't pass them up the stack. You make your mess; you clean

    Read more

    On the Aesthetics of the Syntax of Declarations

    Ginger Bill March 16, 2018

    n.b. This is a philosophical article and not a technical article. There are no correct answers to the questions that I will pose -- only compromises.

    I'm considering what the "best" declaration syntax would be. Historically, there have been two categories: which I will call qualifier-focused and type-focused. An example of qualifier-focused would be the Pascal family. An example of type-focused would be the C family. Odin, like Jai, have been experimenting with an name-focused declaration syntax. These categories place emphasis on different aspects of the declarations.

    [ul]

  • Qualifier-focused places emphasis on the kind/qualifier of declaration (`var x = 123; const K = true;`)
  • Type-focused places emphasis on the type of the declaration (`int x = 123; bool const K = true;`)
  • [li]Name-focused places emphasis on the name of the declarations and that the right hand side must be an expression (`x := 123; K ::

    Read more

    Odin Changes, Improvements, and the Future

    Ginger Bill November 6, 2017

    Hello everyone!

    Odin is been through many changes and improvements lately, many of which I have not announced at all.

    Below is an overview of the new upcoming features in the next release of Odin:

    • Decent import system
      - `import`, `using import`, `export`
      - Library Collections
    • Foreign library system
      - `foreign`, `foreign export`, `foreign import`
    • File scope `when` statements
    • Attributes
    • Syntax updates
      - `switch`
      - `inline proc "c" (x: string) {}`
    • Array Programming
    • `uintptr`
    • Polymorphic value parameters
      - `[$N]$T`

    Import System

    For v0.7, the main feature I have been working on is the import system. I wanted a system that was: [ul]

  • Simple to use
  • Make it possible to "think locally" about a problem
  • Allowing for a form of cyclic importation
  • Be able to store a library across multiple files
  • [li]Al

    Read more

    Odin now has a Patreon!

    Ginger Bill June 18, 2017

    I've just started a Patreon page for Odin to aid with development (and beer money).

    https://www.patreon.com/gingerbill

    Odin will still remain free and open for everyone so please don't feel forced to donate if you don't want to.

    Thank you very much for everyone's support so far and let's make Odin great for everyone!

    Read more

    Working on a Custom Backend for Odin

    Ginger Bill March 9, 2017

    For the past few months, Odin has been using LLVM as its backend (with Microsoft's Linker) to compile to machine code (and before that I compiled to C). It has done its job whilst the language has grown to what it is now.

    As a continuing project for Odin, we are going to create a new backend. The backend will use a form of Static Single Assignment (SSA) to do the majority of its optimizations, which can be lowered to a generic byte code. From this generic byte code, it can be further specialized to the needed machine architecture (e.g. amd64, mips64, x86, etc) or even execute it with an interpreter.

    You might be thinking we are crazy to try and replace LLVM (you might be right :D) but LLVM has been a huge problem for this compiler and language. The main problems being:

    [ul]

  • LLVM is slow - It takes up 85%+ of the total compilation time; even for non-optimized code. Why not have a different backend which fast to compile but may not be very fast compiled code?
  • [li]LLVM

    Read more

    Thoughts about metaprogramming - Discord "Conversion"

    Ginger Bill December 21, 2016

    Below is a copy of a discord "conversion" between (mostly) me and ezysigh about problems with compile time execution and maybe a partial solution to the problem. This is recorded here for future reference. n.b. It includes all my amazing typos, grammatical errors, and swearing.

    [10:30 PM] ezysigh: Have you added meta/compiletime stuff yet? [10:30 PM] gingerBill: Not yet as I'm still designing it. [10:30 PM] gingerBill: I usually design the feature first then implement it. [10:31 PM] ezysigh: (sorry, i didn't looka the videos... I kind of burned out of trying to parse everyones 1hr video presentations) [10:32 PM] ezysigh: Any thoughts on the facilities? Rust macro-ish? Jai #run ish? [10:37 PM] gingerBill: I thinking Nim-style "templates" or rust macros but I want them to be sane and act like a superset of procedure. [10:38 PM] gingerBill: Jai #run was original thought of and I think it's a clever idea but it has huge fundamental problems which I discuss here: https:

    Read more

    The Metaprogramming Dilemma

    Ginger Bill November 28, 2016

    Designing this language has been difficult but fun. Two of the original goals of this language were simplicity and metaprogramming however, these together could be an oxymoron. But before I explain why, I first need to explain what I mean by "metaprogramming".

    Metaprogramming is an "art" of writing programs to treats other programs as their data. This means that a program could generate, read, analyse, and transform code or even itself to achieve a certain solution. The approaches of metaprogramming can be split into a few distinct categories:

    • Introspection (and Reflection for OOP languages)
    • Compile Time Execution (CTE)
    • Template Programming
    • Macros (Textual and Syntactic)
    • Parametric Polymorphism ("Generics")

    Many languages have metaprogramming functionalities: C has textual macros; C++ has textual macros, a functional templating language, and rudimentary introspection; Nim has all of the above; Go has external textua

    Read more

    Odin v0.0.3c

    Ginger Bill November 23, 2016

    Odin v0.0.3c

    What's New

    • Rewritten in C99 (from C++)
    • `nil` - Zero value for all types, except:
      • integers
      • floats
      • strings
      • booleans
    • Maybe types (nillable types)
      • `m: ?int; ...; i, ok := m?;`
    • `match type` for `any`
    • `union_cast`
      • `x, ok := var union_cast Foo.Bar`
    • Backend and stability improvements

    Bug fixes

    • `#import "..." as .` will not act like `#load` and keep imported entities local to that file
    • Initialize global memory at compile time if possible
    • Fix enums with duplicate entries crash
    • Remove some duplicate error messages

    Linux and OSX

    Coming Soon™

    Enjoy!

    Read more

    The Odin License

    Ginger Bill November 23, 2016

    Copyright (c) 2016 Ginger Bill. All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUT

    Read more