Skip to content

Instantly share code, notes, and snippets.

@lazywithclass
Last active March 21, 2017 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lazywithclass/f1f5cacff3e8adab95e64eb640ab8e56 to your computer and use it in GitHub Desktop.
Save lazywithclass/f1f5cacff3e8adab95e64eb640ab8e56 to your computer and use it in GitHub Desktop.
[RC Diary] Web dev 101, finished first version of project-lamp first chapter (-97)

[RC Diary] Web dev 101, finished first version of project-lamp first chapter (-97)

Code an example mutation and apply it to an AST

The idea is to have three modules:

  • one that reads source files into memory making them ASTs
  • one that reads mutations
  • one that applies mutations onto ASTs returning the modified ASTs

By combining those I am just leaving out the module that translates the modified ASTs back into memory and runs the test suite.

I was facing a problem where I could require a module but not another one, so it turns out filenames cannot have dash - as part of their name, while underscore _ is ok.

Also, note to self: always, ALWAYS evaluate the buffer you're going to need somewhere else, otherwise you're asking for troubles. Possibly there's a smarter / faster way though...

Project lamp

We are polishing the interface for tomorrow's presentation, I can't believe I am creating CSS files.

BTW I learned that white-space: pre-wrap respects tabs and newlines, good stuff since we get lots of those as response from the backend.

In the end I am quite happy about how it works, given the amount of time we worked on it. We are ready to host a presentation on it for tomorrow and hopefully everything's going to stay intact, I have the feeling that when I don't write tests for something or when I write it quickly it will eventually break in the most unpredictable way, it's kind of a "testing uneasiness".

Finish webapp

It's ready and finished, here: https://github.com/lazywithclass/web-101

I would like to add some more README instructions, just so that people could go on and continue working / extending it to suit their needs, but for now that's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment