PHPNews

Stack Machines: Variables

Stack Machines: Variables fundamentals << rpn-calculator << shunting-yard << io << jumps << conditionals << comments << calls << variables << stack-frames << heap << compilers The virtual machine that has been implemented …

Continue reading »

Written by igorw - - Aggregated on Thursday August 24, 2017


Stack Machines: Stack Frames

Stack Machines: Stack Frames fundamentals << rpn-calculator << shunting-yard << io << jumps << conditionals << comments << calls << variables << stack-frames << heap << compilers The last two posts introduced two separate …

Continue reading »

Written by igorw - - Aggregated on Thursday August 24, 2017


Stack Machines: Heap

Stack Machines: Heap fundamentals << rpn-calculator << shunting-yard << io << jumps << conditionals << comments << calls << variables << stack-frames << heap << compilers So far the machines presented have all been stack …

Continue reading »

Written by igorw - - Aggregated on Thursday August 24, 2017


Stack Machines: Compilers

Stack Machines: Compilers fundamentals << rpn-calculator << shunting-yard << io << jumps << conditionals << comments << calls << variables << stack-frames << heap << compilers This is a guest post by the one and only …

Continue reading »

Written by igorw - - Aggregated on Thursday August 24, 2017


Probabilistic Automata

Probabilistic Automata Have you seen those twitter bots that generate fake or parody tweets? The ones that look almost legit but are pretty much complete jibberish when you read them? Quite often, such accounts use a so-called markov chain to generate the text. A markov chain is a state machine that has probabili…

Continue reading »

Written by igorw - - Aggregated on Thursday August 24, 2017


Stack Machines: Fundamentals

Stack Machines: Fundamentals fundamentals << rpn-calculator << shunting-yard << io << jumps << conditionals << comments << calls << variables << stack-frames << heap << compilers This series will explore design and …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


How heavy is Silex?

How heavy is Silex? Quite often silex has been described as heavy or bloated. It's time to put this myth to rest. Quotes Silex: The world's largest microframework. Silex: All the bloat of Symfony but with only half the features. Silex is so big: It has more lines of code than your project. …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Composer Vendor Directory

Composer Vendor Directory A common question in composer support is to install packages into a directory other than vendor . I want to explain why that is a bad idea. Achtung: Might be a little ranty. One True Vendor You don't own your vendor directory. When you use composer, you are waiving your …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Dependency Responsibility

Dependency Responsibility Convenience is great, and many tools provide you with it. Dependency managers are one such tool that allow you to easily install any library instantly. But you should not use them blindly. There are more important considerations than "I want foo right now" . Which type of foo do you want, …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Git Branching Model

Git Branching Model Since the original A successful Git branching model post from nvie there have been numerous attempts to simplify his model. While it is a very solid branching strategy, you do end up with a ton of branches that you may not actually need. This post aims to document the general strategy that …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Stack Machines: RPN calculator

Stack Machines: RPN calculator fundamentals << rpn-calculator << shunting-yard << io << jumps << conditionals << comments << calls << variables << stack-frames << heap << compilers A very simple form of stack machine is a …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Stack Machines: Shunting-yard

Stack Machines: Shunting-yard fundamentals << rpn-calculator << shunting-yard << io << jumps << conditionals << comments << calls << variables << stack-frames << heap << compilers The RPN calculator (see previous post) was …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Functional Library: Iteration

Functional Library: Iteration Welcome to the functional library. This series will explore the state of functional programming in PHP and highlight some libraries for common tasks. This post will look at iteration and lazy operations based on a sequential abstraction. Sequence Yes, you heard right. …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Functional Library: Traversal

Functional Library: Traversal Traversing associative data structures in PHP is fun. Said no one ever. The problem is a common one if you're processing any kind of data, for example a response from a JSON API. You need to access some nested structure, but you don't know if what you're accessing actually exists. So …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Functional Library: Null

Functional Library: Null Tony Hoare famously described the invention of null references as a Billion Dollar Mistake . Nulls are something we need to deal with in almost any language. Any value that can be null must be null checked. An example of a very common error that will arise when nulls are present is: …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Reasoned PHP

Reasoned PHP Using logic to run your programs backwards! This is a transcript of a talk I gave at the Berlin PHP usergroup in August 2014. Logic This presentation is going to be about using logic to run your programs backwards. Let's begin with talking about logic. One of the first logicians was …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


The Right Way

The Right Way Community It's a word that a lot of people like to throw around as something they believe in. It's a fuzzy word that makes humans feel warm and fuzzy inside. It is a way for a group of individuals to co-exist in a space of shared values. Communities are useful, they unite us. They define a common …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Re: Recursion instead of goto

Re: Recursion instead of goto Why hello! Thank you for asking this most excellent question! I have indeed considered alternatives to the goto. I have evaluated them to a great extent, and I am happy to present the results to you here. When the PHP parser reads a source file, that source code is compiled down …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


End the war on tabs

End the war on tabs This is a transcript of a talk I gave at PHPNW14 in October 2014. The war on tabs Programming is an artistic medium. It is a form of self-expression. Yet we have groups, such as the PHP-FIG, that are trying to set up rules that restrict this expressive power. They have started a war on …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017


Compiling Brainfuck

Compiling Brainfuck After messing around with some assembly language for two days, I wrote a brainfuck compiler . Not that it hasn't been done before, but it was a fun exercise. I mean come on. It's a compiler! I'd like to share how it was created. Why would you put a joke language that people use to …

Continue reading »

Written by igorw - - Aggregated on Monday January 2, 2017