Skip to main content

Posts

Showing posts from September, 2016

Connecting to Elixir web channels from the Angular 2 quickstart application

I am busy learning Elixir , a language that adds syntactic sugar to the awesomely scalable and concurrent Erlang language.  The "go to" framework in Elixir is Phoenix  and I'm busy writing my "hello world" application which will serve up data across a web channel. I followed the Typescript version of the Quickstart guide for Angular 2 ( here ).  I really like what I've seen of Typescript so far.  Dependencies are easy to manage and the ability to define interfaces is a good sign of how well structured the language is.  I think Satya Nadella should be made an open source hero, if such an award exists. Anyway, what I wanted to do was get my Angular 2 application to be able to connect to the Elixir server channel and send a request to listen to a particular stream.  The idea is to use the Actor concurrency model (explained brilliantly in " The Little Elixir & OTP Book ") to start up a new process whenever a request for a stream arrives.  This ...

Laravel refusing to start up

I'm very much a fan of the clean implementation of Laravel but really dislike the fact that if there is something wrong with the .env file it refuses to give any meaningful information. Laravel uses the vlucas/phpdotenv package to manage its environment. It's pretty well known that if you have a space on either side the = sign in a key value pair then the .env file is invalid, but I had checked for this (and checked again). Laravel will try to use its standard logging methods before they have actually had a chance to be booted up with the result that you're left with a "reflection error" exception message on the CLI rather than the actual cause of the problem in the dotenv package. Debugging this is not trivial and I resorted to using strace to try and determine exactly what was going on.  Don't do this at home kids!  The easier solution is at the end of the article. I used the following command to generate a trace of the system calls being made by ...