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

i will make it work.

New Delhi, India
Joined July 2024
Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)Photo by Omansh (@PhantomC0der)
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,056
single claude pro subscription isn't enough at this point.
2
3
151
Omansh retweeted
Finally build it and make it work. Still there are too many ways to optimize. also I have to rethink some design choices. using adaptive locks instead of std::mutex 80k RPS -> 100k RPS added in mem caching now at 140 RPS.
building a edge authentication from scratch. - less duplicate code - key rotation , changing token rules becomes easy - gateway goes heavy work , services does light check - faster services - protecting internal services tech stack : rust, redis, axum, tokio.
4
2
23
625
end sem prep starts today.
1
7
182
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
381
thank me later. mockaroo.com/
2
5
111
11,594
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
782
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
1
15
961
buffered vs unbuffered channels in go. when creating a channel, we have two options. we can either give it a size or leave it unbuffered. a buffered channel allows the sender to send values until the buffer is full. the sender doesn't have to wait for the receiver to receive each value immediately. it only blocks when there's no space left in the buffer. an unbuffered channel, on the other hand, creates a synchronous interaction between the sender and receiver. the sender has to wait until the receiver is ready to receive the value.
2
3
23
798
messed up the compiler design course the whole semester. not letting that happen again during end sems. will share some good learnings with you.
1
7
291
gemini new look for diwali!!
1
11
246
what's everyone doing this diwali?
9
11
460
another morning with go.
2
4
114
2,279
good read. it's the same thing i implemented in my storage engine(mnemosyne) project.
Indexing is always asked in the interviews and sometimes interviewers go in depth to understand your database fundamentals This article is all you need!
2
33
1,054