Marketing the Odin programming language is weird
gingerbill.org
gingerbill.org
Otherwise, I'm generally a fan of Odin, but I do find it quite irritating that only place to ask questions and participate in the "community" is locked behind discord. I even gritted my teeth and tried to make an account for discord just for this, but discord wouldn't accept my (apparently mandatory) phone number. Community questions and answers need to be readable and searchable without yet another login. If I'm learning a language and can't find an answer to a question that was almost certainly asked already, that's just another stumbling block that will prevent me from using said language.
Shame, I've never seen Odin before and got excited over the show cases. I've been looking to tinker with another language outside of the main three, (python, go, rust) and this looks nice.
I think I may try Lazarus again.
Why Lazarus? You're talking about the Pascal RAD IDE, right?
It's a tradeoff. The platform is a closed-source silo.
But for a lot of people, it works really well.
I avoided it until eventually one community made me want to be a member.
Those who dislike Discord in that community set up relay bots.
> Community questions and answers need to be readable and searchable without yet another login.
This is a big tragedy that any technical community will suffer from long-term for choosing Discord:
They may cultivate a community, but they will not grow their garden of knowledge.
But to have your resources and attention spread too thin can be devastating, too.
Only huge projects can afford to have multiple Discords, Telegrams, IRCs, Wikis, and not worry too much about the overflow and redundancy.
Small projects like Odin must focus on having a few high-traffic places.
There's one option available to small projects and actually you already named it yourself:
> relay bots.
Take for example Nim community. It's not huge by any margin, but we have fairly active forum[0], occasionally active Telegram channel and most of activity is on Discord, IRC and Matrix. I've grouped these three because they're almost seamlessly connected with relay bots into one platform. You can join one of several bridged platforms[1] and talk to everyone on Discord, Gitter, Matrix, etc. with quotes, pings and attachments working as you'd expect them to.
It is certainly an extra burden to moderate and manage all of this, but now you can atleast have an IRC archive[2] that's indexable and searchable [3].
On the other hand, having Discord as your *only* place for discussions is plain stupid (read: foolish). Because I know several people, including myself some years ago, that just 'nope out' from using a project when they see that the only place to get support is a Discord channel.
[0] - https://forum.nim-lang.org/
[1] - https://nim-lang.org/community.html
[2] - https://irclogs.nim-lang.org/30-05-2012.html
[3] - https://duckduckgo.com/?t=ffab&q=site%3Airclogs.nim-lang.org...
And yes, I similarly 'nope out' when I see Matrix. The clients are just terrible.
The main point of "killer feature" is not to make the language more "hypeable" but to give a potential user a clear reason why the benefits of learning your language will outweigh the costs of using a less mature or less popular technology.
But my main point is that being an early adopter of a non-mainstream tech is fundamentally unpragmatic and usually people are driven to try something new by desire to try something __cool__ not by pragmatic considerations.
If the language doesn't at least have a book written on it, then it can be argued it's way too early to take the language seriously. Some of the reasons why the language has not reached the stage to be written about: still too unstable, few followers, or still making a lot of breaking changes. Other reasons, like laziness or arrogance, are equally not good.
Some of these new hyped languages like Odin, C3, hare, beef, pony, etc... They get a lot of continuous attention on here and specific other places, but then when we go to find out more about them, there is little of real substance. Their GitHub has few stars, few contributors, no Wikipedia page, not a thing about them on Amazon, etc...
At least start with step 1. Where is the book on this programming language? Would be nice to be able to actually read or see more than just a blog entry or an ad.
But I'm glad I did it because it checks off all the "C but nicer" checkboxes.
I've been programming in Odin for a few months now, and I've come to actually like this choice.
I still use the occasional dependency, and installing it is even easier than with a package manager!
I download a repo as zip from github, extract it in my project, and voilà, it's ready to use. No compilation, transpilation, peer dependencies, locking versions, etc.
Another positive of this approach is that I can now easily read the dependency source code and if needed modify it, as it's become a part of my project, not some transpiled and minified version of that code sitting in an unversioned folder.
Overall, in Odin I use dependencies much more sparingly than when I work with JS. The reason is that the core and vendor packages of the language already include a surprising amount of things you'd normally reach npm/cargo for. Need linear algebra primitives? Specialized data structures like a priority queue? SDL2? stbi? It's all included in the language (and so much more), ready to use.
I've come to realize that more often than not it's fine to reinvent the wheel to solve your specific problem rather than relying on a generalized (and thus unoptimized) 3rd party library.
This sounds like what I already do in C++ (except I use git submodules for dependencies because it makes it easier to pull new versions, check for versions, etc), and tbh I don’t much like it. I do it out of necessity. I’d much rather keep tabs of all my libraries and versions on a project file and have a tool that will download the version for me, build it, tell me when new versions are available, update to the latest version (if I so choose), and so on. In C++, I have to manually do to each dependency and check if there’s a new version, and pull it if I decide I want it. In, eg, Gleam, I can ask gleam what’s new.
In Odin, it sounds like I have to do the same — either use submodules or download the release files by hand. I have to manually check for updates and then replace my local files.
It’s just not something I personally like to do. The author is entitled to be opinionated about this, but it clashes with my own opinion, so that means I probably won’t try the language even though it looks pretty good from a language design point of view.
With that said, could we do this without a package manager? I mean.. yes.. instead of a nuget folder structure it would be a dll folder structure. Certainly possible, generally speaking.
I guess there is negatives on either side. Without a package manager you have to be more manual. With it updating is easy.. and I know developers that update them without looking into the details. There was one example where nuget said there was an update.. so the developer updated it and it caused errors. Thats because the update was for a later .NET version.
However, when it comes to odin, I have found it to be a pleasant experience doing a `git pull` of any odin library I need to a 'thirdparty' directory and to import them into my odin code.
So we have the builtin ones like core, vendor, etc... then I have thirdparty. If any of those libraries in thirdparty made its way into odins vendor.. it would be a simple change in the code.
I use Odin in my own personal projects but if I used it at my current workplace, I would likely setup a structure similar to my C# setup.. with a shared directory holding libraries we need -- simply git pulls, etc.
You can't be a general language without general tooling.
Partly because of this, I try to avoid external dependencies as much as possible. When I need something that's not built in to the language, I choose in the following order of preference:
1. The standard library and target platform libraries, augmenting any inadequate features with my own extensions if necessary.
2. A very well known, well maintained, and widely used library with few dependencies of its own. Something that could almost be mistaken for #1.
3. Write my own minimal version of what I need, if I can do so with a reasonable level of effort.
4. A lesser-known third-party library, if it appears well maintained, and if I am willing to audit it and every future update to it.
A happy side effect is that a language with no built-in dependency manager is still perfectly viable for me, since it wouldn't be saving me much work anyway.
Matrices are built in(!), and look nicely implemented. So are complex numbers and quaternions!
The array programming aspects in general look great.
Zig might be the nicer language for a kernel or a server of some kind, but Odin looks like the better language not just for games, but also for robotics and for scientific programming.
The only problem I forsee is that it seems hard to write nice mathematical libraries for anything that isn't built in.
For example, suppose I want to work with polynomials using a natural infix syntax. Or that I want to wrap matrices/quaternions in types representing various mathematical groups. Or that I want to implement geometric algebra with wedge products and such. Or that I want to form matrices of elements from some finite field. Those sorts of things might push a person back to C++ (or maybe Nim can do it).
I love the SoA/array/matrix stuff though, and the "standard package" selections look great.
Go is the same thing: I learned it because in devops it's the dominant language, which tells me it must be pretty good for those use cases (even if so many people dislike it, no one can claim it's not good enough).
I've looked into Odin and thought it was interesting, but given the amount of work being put into Zig, right now I feel like that's the safest choice (I must say I dislike how even basic things are still being changed in Zig, but no one said it would be otherwise so that's on me). Zig gives very tangible benefits, like not depending on just the LLVM (WIP) as a compiler backend, being able to compile to basically any combination of C stdlib/arch/OS from anywhere without worrying about toolchains and other things that I believe Odin lags behind, despite perhaps being the better language of the two when looking solely at its design (I am not too sure about that as I haven't used Odin for anything yet, and done very little Zig).
I actually really enjoyed the language back when I'd used it. One issue I think every language leaves out there is that the language is just a tool and increasingly only one part of a larger tool the IDE/SDK/Engine/Platform. I don't want to really learn a language so much as make useful programs.
Right now we all pay attention when someone announces their new language that's supposed to do things better than existing ones out there but there is a limit to what problems a new language can address.
If you want to make a game for the Switch/PlayStation/Xbox you'll need an SDK and likely can't even use anything but c or c++. If you don't want to make your own engine you'll use whatever languages the engine uses to get things done in. If you want to make a cross platform app that handles accessibility and internationalization you're going to be making a web or electron app.
As much as I am interested in APL, Lisp and smalltalk right now, I get stuck when I ask 'What project am I interested in using this in?'
The main thing it seems to have, is the hype and the cult of personality around its creator, ginger bill and lots of interviews and close ups of red hair. The problem with that, it becomes more about him and the bragging about his achievements.
> I don't want to really learn a language so much as make useful programs.
That's why instead of the language creator bragging about themselves, many users want to be taught or see examples of what the language can actually do for them. That starts with books, code examples, more demo projects, etc...
Money's a different question hey - there's more funding in open source than there used to be and you can really just ask for money and fill out paperwork and get grants and such if it's a useful project, otherwise it will need to embed into some kinds of important projects so that companies need to invest in it. Can Odin do that?
Asking the internet how to market a niche thing that they've never built is questionable at the outset though :v) Do wish the best for Odin though, it's kino.
(There are many other good episodes too - it's one of the best developer podcasts about imo)
This is a fantastic way to turn everyone off of your language: dismiss everything they like about the ones they're already using!
I see that there are two paragraphs on memory management (https://odin-lang.org/docs/overview/#allocators) in the overview but they dive into the details very soon and don't really paint the big picture (I think the sentence "This means that Odin programmers must manage their own memory, allocations, and tracking" is not a great selling point, all other things being equal).
Correct me if i'm wrong but it seems to me that there are Zig, Nim, Dart, Carbon, C3, ooc, (maybe Eiffel?) too in this space, and that only counting C/C++ replacements that you can compile in a way or another.
HN crowd would not agree with me, but indentation-based syntax is easier to read, less cluttered and more intuitive than multiple nested ()'s or {}'s . And the success of python, despite it's countless flaws is the proof.
I also like the way Nim with its command calls and so on is even more compact and "to the point" than Python is. Whenever I go back to Python from Nim, I think to myself "Why all this clutter?" :-)
I don't understand how is that an issue, unless you write your code in notepad =).
And even if you do use dumb text editor, you can quickly write code with 1-space indentation and reformat it with nph[0].
There's also a neat trick for people who like C-style languages. If you use sufficiently enough parenthesis and semicolons - you don't need indentation at all:
import os;proc main = (let file = paramstr(1);(for line in file.lines:(echo line; if line == "": return)))
Random thought: it shouldn't be too hard to write a formatting tool that translates braces to indentation and vice versa. But I have yet to see a project like this for Nim.Yeah, bliss-style, you know in docs it isn't made clear that that works but i sensed that would.
> Random thought: it shouldn't be too hard to write a formatting tool that translates braces to indentation and vice versa. But I have yet to see a project like this for Nim.
It's a hour-long "project" if you don't care about how to treat pragma annotations. I did just that.
Yes, they should both be free.
It was near the top an hour or so ago, and now I can't even find it!
Fwiw i really like the top comment (also related to the differentiable (for Rao observers: hypernormal) beast at the heart of Goodhart’s law)
And the second comment hints at a possible interesting non-Varian framing of solutions to “common antiresource pool” (nonexcludable but rivalrous antigoods) problems
PS: this is just off the cuff comment, not too thought out. also, Odin has a chance to beat Zig, due to better syntax and being essentially complete, beside having official spec. Which is not the case of Zig. Zig has traction but lacks in areas where Odin does not. So I would focus on Zig as the competitor, Rust as second. The simplified go-like syntax is one of the main selling points. But there must be more to the language.
PPS: I think the choice of ^ to handle pointers is one of the worst decision in the syntax. The * and & are the norm and should not be messed with.
I was surprised by this since all I need on Linux is llvm and clang, but looking at the official getting started page, it does indeed say "MSVC compiler and windows SDK" are required. Is that really the only way to run it on windows, or is that just the path most familiar to a typical windows developer?
I personally disagree with saying it requires IDE support. I want to write a ctags parser for it, but that's all I would ever use; as a die-hard vim user, I never liked all the language server stuff people are so reliant on these days. But if that's what people want to use, it's available for Odin as well: https://odin-lang.org/showcase/ols/ -or- https://github.com/DanielGavin/ols
As for IDE, people who use plain editors like vim, emacs... exist but their numbers are merely a statistical error compared to people that use IDEs(i am counting VS code into this category even though it's just electron). Of course we could debate what is and what is not IDE, but the point here is that we need syntax highlighting, refactoring, jumping to definitions, finding usages and other functionality that IDEs provide.
IIRC there are slimmer packages to get it but you’re still talking a gigabyte, not tens of megs.
But anyway, if you're in the Odin target audience on Windows you most likely have Visual Studio installed anyway. Also IIRC even Clang and Rust depend on the MSVC linker on Windows, Zig is really an "outlier" (in a good way) in that regard.
At best you get support in the standard lib, but whether things like this should go into the stdlib or 3rd party libs is a decision that isn't set in stone forever, and probably doesn't even matter if it is easy to integrate 3rd party libs into Odin projects. AFAIK Odin has the concept of vendor libraries, which live somewhere between stdlib and 3rd party - so networking could go there).
Compared to Zig specifically, Odin has a couple of language features that might make it less pure from an academic language designers pov, but more convenient from the user's pov and only the last one matters for getting shit done. I wouldn't dismiss Odin only because it doesn't have features XYZ, because it does some other things very right compared to other languages.
Re IDE integration, google for "Odin language server".
Erlang has cluster aware message passing built in as a fundamental aspect of the language.
C++ before the days of C++98, when each C++ compiler vendor provided a nice C++ framework alongside their compiler.
Not much of a problem for people who are used to C syntax of course, but may be confusing to anybody else, especially in expressions which have both pointer dereference and multiplication, for instance this is entirely valid C:
int a = 3 ** int_ptr;
The '^' is the pointer symbol in Pascal, so it's not a new thing either, it just fell a bit out of fashion. int a = powl(3,int_ptr);
edit: The parent's code does a dereference and then a multiplcation. This is because of (imho) bizarre parsing rules for a dereference asterisk. I'm saying that's so horrifying that I would be less horrified if it really was an exponent (as it might seem by mixing languages). int a = 3 ** int_ptr;
Calculates 3 times (*int_ptr)?In Python and Fortran for example:
3 ** 2 = 9It's a multiplication with the value pointed to by int_ptr, e.g. rewritten to make more sense:
int a = 3 * (*int_ptr);
...or in Odin it would look like this (I think, haven't used Odin all that much yet): a := 3 * int_ptr^3 ** int_ptr multiplies the vakue pointed at by int_ptr by 3. It is exactly the same code as 3 * (*int_ptr) which is the point the parent was making.
powl(3, int_ptr) would be (int)int_ptr * (int)int_ptr * (int)int_ptr which is also unlikely what you wanted. You probably wanted to say powl(3, *int_ptr)
EDIT: actually even my last paragraph is wrong because the first arg is base... I'm not going to write it out but you get the point...
(No, it's not a real operator, it's another case of weird but allowed spacing causing confusion)
Odin had no such block to improvement. Props to them.
"Persona oriented development" (POP) when?
Funny that's my favourite aspect of Odin's syntax.
p: ^int
Easy on the eyes.I also like the convention of the type on the left and its usage on the right:
p: ^int // ^ on the left
x := p^ // ^ on the right
Very similar to languages of the Pascal family, but less verbose.And with structs:
p^.x // not necessary
p.x // this will doOdin uses curly braces which (in QWERTY) are shifted and typed with your pinky—the worst possible combination. Are there layouts where ^ is worse than that?
How do they compare?
https://www.gingerbill.org/article/2019/05/13/a-reply-to-the...