Can Jow Forums write a compiler?

Can Jow Forums write a compiler?

Attached: 1522619303824.jpg (350x384, 15K)

Other urls found in this thread:

youtube.com/watch?v=6rZ8NJhymPc
twitter.com/NSFWRedditGif

a compiler

I could write a program which takes in code from one language, converts it into C, then compiles.

>the "hardest" part is the lexer

it's not that hard
any undergrad is expected to be able to write one in the third year

a compiler
there you go

a compiler

Attached: SoGS6Ti.gif (357x296, 1.82M)

can Jow Forums write an compiler without using a compiler

Attached: 1501639547276.png (640x400, 32K)

are you meming or what? lexing is baby games

I took a compiler design course and I dropped it.
I was too much of a glowing pajeet to understand DFAs and NFAs.
May Terry have mercy on my fucken soul.

a complier

Unironic question: is it possible to create a new executable file in a hex editor and manually write an application that way?

compiling a compiler without a compiler would be the tough part.

I have already.
actually 2 of them.

a cmopielr

>lexing is baby games
>implying a compiler isnt
you might actually need reading glasses

post your compiler

technically yes, but it would be unreasonably complicated, even compared to doing it in assembly.

can a nigger?

I'll get started with the logo

You know this guy's a true programmer when he does this

fpbp

I took a compiler course that started out with CFG's, then moved to regular languages later. Why

Liked
You'll be writing code more than all of India

We have to start with circlejerking about tabs vs spaces, open source licenses and CoC first.

Neumann/Harvard architectures are pajeet tier

Good news, fren. Compiler construction courses are typically not representative on how to write industry strength compilers.
For a start, you could do craftinginterpreters.com which will teach you some of the basics. Sounds weird, but state of the art interpreter have a compiler in them.
You can create programs in paint: youtube.com/watch?v=6rZ8NJhymPc

That's the problem about most academic compiler courses. They should be named "All parsing techniques up to the 80s except the useful ones" instead

Course actually had assignments in haskell with (semi)modern parsing techniques.
writing a compiler in haskell is one of the most Jow Forums things i've ever done in school

>Course actually had assignments in haskell with (semi)modern parsing techniques.
>Hasklel
>likely using parser combinators
part of the problem

Yes. And I have.

>I was too much of a glowing pajeet to understand DFAs and NFAs.
I guess you not ready to comprehend a parser then. And that's the simple bit of a real compiler...

I wrote one just for this thread but I keep getting connection error when posting code

compiler = (bf) => {
let program = "program = (arg) => { let output = '';";
program += "let memory = [];";
program += "let ptr = 0;";
program += "let get = (ptr) => memory[ptr]||0;"
program += bf.split('').map(c => {
switch(c){
case '>': return "++ptr;";
case '

there we go, what the fuck do I need to solve two captchas for

I'm sure given time to research the topic to properly understand what I'm dealing with, I could, just as I could pick up any subject and write good code for it with some self-practice and evaluation.

The question is why the fuck would I waste my time writing such an utter nonsense project that nobody gains anything from.

>constantly redefining the string
>not just defining the string as a const in one go with concatenation

tl;dr no, its not ready to be public (and never will be)
both my compilers, that i continue to improve with time, are neither open source nor shareware, their binaries never even left my machines onto another one.
about a decade ago one of them got to the point where to squeeze more performance i create a helper to create a 15mb source code file, for the compiler itself, with various versions of output assembler and combinations of it (different function calls, inlined shit or not, loop unrolls, etc [similar to -o gcc])

it's open source my friend

go fork yourself :°)

I wrote one in uni in some meme language, I completely forget how to do it

based

I wrote a toy compiler with lex,yacc and gcc for school in the early 2000's.

easy, uses an interpreter :^)

I am a compiler.

I took a course where we had to write a compiler in C for a subset of freebasic as our final project. It was really satisfying seeing it actually generate code.

Attached: unnamed.jpg (900x900, 53K)

Yes

Yeah I made a small compiler for my portfolio (around 8000 lines) with my own parser generator and VM

stack or register?

To finish the tabs vs spaces debate, we should use a 2-space with tab followed by 2 spaces. This way everybody will be happy

I made an assembler and emulator for an architecture I designed. It was an 8 bit arch with like 50 or so instructions.
I interned to write a game for it, but never went beyond hello world

Registers. Have you ever tried implementing colouring register allocation?

Attached: 1498078219043.png (680x638, 9K)

no. seemed too complicated

>define a register machine in lisp
>define your own assembler for it
>make a compiler that compiles some primitive lisp to your register machine's machine code
>start writing a register machine in the primitive lisp of your register machine

Attached: 1526151764560.jpg (600x718, 66K)

Attached: Bitches.png (719x501, 844K)

computers are so fuckin rad man