Omansh (@PhantomC0der) header
Omansh (@PhantomC0der) profile picture

i will make it work.

New Delhi, India
Joined July 2024
rasbur is live. paste an encoded string and it figures out what it is, base64, hex, a jwt, morse or a few of those stacked together. it'll unwrap it layer by layer and tell you if it can't figure something out instead of guessing. try it: rasbur.vercel.app/?v=3 for your code: npm i @rasbur/decoders for your ai agent: @rasbur/mcp the site is just a free demo on free hosting, so the first load might take a minute. the packages run on your machine.
2
4
1,138
4/8 exams ✅
3
68
3/8 exams ✅
2
76
cooked for tomorrow's os exam 🥀🥀
1
1
58
1/8 exams ✅
3
185
i think it's going to be an all-nighter again, and that too for the first exam itself, even though i had 8 days of diwali break. cooked😭😭cooked
3
5
173
how do you tackle extreme procrastination? especially with college exams. i only get serious in the last 2 days, even when i have a whole week to prepare.
1
10
296
morning. a very long day ahead. have to revise everything for my first exam tomorrow.
1
4
237
never saw a guy with a gemini paid sub.
4
1
6
211
i have 2 more modules left to memorize for my exam on the 12th. need to get them done today, but i genuinely hate rote learning. will always prefer subjects where solving is priority than rote learning pages of facts.
6
253
recursion is tough.
1
1
1
22
1,972
single claude pro subscription isn't enough at this point.
2
4
227
end sem prep starts today.
1
1
8
213
a major question that comes up in the front end of the compilation process is why lexical analysis and syntax analysis have to be separate phases. the main reason is reusability. a lexer for a particular language can be reused with multiple parsers. as we know, there are different types of parsers, such as top-down and bottom-up parsers, each with its own variations. however, they all work with the same incoming token stream. if we tightly couple the lexer and parser, reusing the lexical analysis component with different parsers becomes more difficult. keeping them separate makes the design simpler and allows the same lexer to work with different parsers. 3/n
compilers are categorized based on the number of passes they take to convert the source program into target code. but what exactly is a pass? a single pass means the compiler traverses its input representation from beginning to end, processing it to perform the required compilation tasks. based on this, we have single-pass and multi-pass compilers. a single-pass compiler completes the compilation process in one pass. it reads the source program, performs the required phases and generates the target code. however, one challenge with this approach is forward references. a forward reference occurs when we refer to an entity before its definition appears in the source code. to handle this more easily, we have two-pass compilers. in the first pass, the compiler analyses the source program and collects all the relevant information. in the second pass, it uses that information to generate the target code. in some compiler designs, the first pass converts the source program into an intermediate representation (ir) and the second pass converts that ir into the target code. 2/n
1
8
390
thank me later. mockaroo.com/
1
5
109
11,789
compilers are categorized based on the number of passes they take to convert the source program into target code. but what exactly is a pass? a single pass means the compiler traverses its input representation from beginning to end, processing it to perform the required compilation tasks. based on this, we have single-pass and multi-pass compilers. a single-pass compiler completes the compilation process in one pass. it reads the source program, performs the required phases and generates the target code. however, one challenge with this approach is forward references. a forward reference occurs when we refer to an entity before its definition appears in the source code. to handle this more easily, we have two-pass compilers. in the first pass, the compiler analyses the source program and collects all the relevant information. in the second pass, it uses that information to generate the target code. in some compiler designs, the first pass converts the source program into an intermediate representation (ir) and the second pass converts that ir into the target code. 2/n
overview of the compilation process. the first phase is lexical analysis. the compiler takes a stream of characters and groups them into tokens, identifying whether each one is an identifier, keyword, operator or something else. next comes syntax analysis. the parser takes this stream of tokens and checks whether it follows the language's grammar, which is usually defined using a context-free grammar. it also builds a parse tree or syntax tree. once the syntax is verified, we move to semantic analysis. this phase checks whether the code actually makes sense. for example, are we using a variable before declaring it? are we assigning incompatible types? are we passing the right arguments to a function? semantic analysis traverses the syntax tree and reports these kinds of errors. these three phases form the front end of the compiler and are largely dependent on the source language. next comes intermediate code generation. the compiler converts the syntax tree into an intermediate representation (ir), often in the form of three-address code. each instruction has at most three addresses, usually two operands and one result. this ir acts as a bridge between the front end and the back end and is largely independent of the source language. once the ir is ready, we move to code optimization. the goal is to make the generated code more efficient, either in terms of execution time or space. techniques like dead code elimination, code motion, constant propagation and copy propagation are used here. finally we have code generation. the compiler translates the optimized ir into target assembly code. this is where register allocation, stack frames and instruction selection come into play. compilers often try to use registers efficiently to improve execution speed. the generated assembly file, usually with a .s extension, is then passed to the assembler which converts it into machine code. 1/n
1
11
797