
An introduction to LLVM in Go - 0xbadb002
https://blog.felixangell.com/an-introduction-to-llvm-in-go/
======
iagooar
This little tutorial is so perfectly written. It makes no assumptions about
what you know besides basic computer science and guides you through getting
going with LLVM. I love it, makes it look so simple.

~~~
obeattie
Agree completely, this is a really well-written and informative article. Even
more impressive is when you scroll to the bottom and notice this was written
by a "17 year old student from Brighton who programs for a hobby."

~~~
ycmbntrthrwaway
I wish I had github when I was 17 year old, publishing all the codes you while
learning to program is really great idea:
[https://github.com/0xbadb002](https://github.com/0xbadb002)

~~~
nulltype
Wow this guy looks exactly like Jonathon Blow

------
giancarlostoro
This makes me wonder if Haxe will ever have official LLVM support within it's
own compiler, it already gets translated into numerous languages (Haxe
technically is never compiled, but always translated as far as I'm aware), why
not LLVM's own IR? I found a couple of projects attempting this, but it would
be interesting to see it happen officially.

------
pori
As a web developer, LLVM has always been a mystery to me. I have a basic
understanding of computer science, but that has never been enough to parse
through the documentation, written for those more used to lower level
development. This is a wonderful article for absolute beginners, showing quite
literally what LLVM does and how to use it.

~~~
jerf
Rather than learning LLVM per se, I'd recommend running through any of the
many fine "build a compiler" tutorials out there on the internet. A google
search on "build a compiler" pulls up a lot of interesting resources.

I would suggest sticking to a simple language, rather than trying to build a C
compiler or something. The principles are what you really ought to learn, and
those are the same. Even just writing a brainfuck interpreter is a good
exercise if you don't know how to do it. (Despite the profane name and its
implication that it ought to be something very complicated, brainfuck is
actually very simple. Some people use "write a brainfuck interpreter" as their
test project whenever they pick up a new language.)

Compilers and interpreters are one of the things that make the difference
between a "code monkey" and a "software engineer", and even in web development
they can be incredibly useful.

~~~
pori
You are right. It isn't best to start with LLVM, the top tier. I've made the
mistake of letting it stop me in the past.

Writing a Brainfuck interpreter is a good idea! (I'm aware of the language.)
Perhaps I could also try ArnoldC. :3

Recently, I began working with HHVM, I've been very interested in the subject
of compilers and interpreters. I would certainly love to build such a thing
for JS one day.

------
josteink
> LLVM is an infrastructure for creating compilers. It was initially created
> by Chris Lattner in 2000, and released in 2003. Since then it has evolved
> into an umbrella project that has a wide array of tools such as the LLVM
> Linker lld,LLVM Debugger _lldd_ , and so on.

I'm pretty sure the author means _lldb_?

I'm sure it's a good article and all that, but such a typo for a core tool in
the beginning of an article kind of makes you lose confidence in the accuracy
of what follows.

The author might want to fix things up :)

~~~
0xbadb002
Ah yeah I meant that, I don't usually make typos so I'm not sure how that
happened :-)

