tl/dr; I tried to expand the cookie-based auth I implemented in servant and failed. While I’ll probably try again some other day, for now I just resorted to writing functions to get the functions for a user and do checking directly in my handlers Here’s the tale of how I tried to add Role checking (based on my application’s defined Role type) to my servant app, and ran into a few issues and things I didn’t understand and ultimately failed.
One of the applications I’ve been working on exclusively lately is a surprisingly large Job Board application. Not the most exciting concept, I know, but it’s quickly becoming the culmination of some of the best development (and consequently “engineering”) work that I’ve ever done. The codebase is growing huge – 11,000+ lines counting both front and backend code, and while I haven’t gone on any large refactoring sprees, most of the code does not make me feel bad.
Getting started with servant, part 2 tldr; Use enter to inject database information, monads and monad transformers rear their ugly heads but not for long. Multi-part blog post alert This is a multi-part blog-post! Part 1 - Getting Started with servant Part 2 - Getting Started with servant, Part 2 What are the ways to pass database information into an application using servant? From what I can tell, there are 3 main approaches to getting the database management object (whatever that is) into the app:
Getting started with Servant tldr; Haskell cool, Servant is awesome, and is a really interesting way to represent APIs in a way blessed by Haskell’s enormously powerful type system. Starting with it can be kind of difficult, but it’s a good kind of mind-bending. Multi-part blog post alert This is a multi-part blog-post! Part 1 - Getting Started with servant Part 2 - Getting Started with servant, Part 2 Background Recently I’ve been working on a project called The Start, which is meant to be a job board targeting some niches job markets in Tokyo/Japan.
… Or you shouldn’t. I don’t know, I’m just a random person on the internet. Don’t let random internet blog posts make your decisions for you, carefully weigh the options and decide what’s right for you. Or don’t. Disclaimers aside, many people have brought up the fact that despite hosting much of the best open source code on the planet, Github itself was not open source. Recently there was quite a rustling over an open letter to Github, which seemingly spurred Github to make all the actions they were taking to make the platform greater more publicly accessible.
I recently ran into the issue of emoji that I was sure FirefoxOS had already implemented not showing up in my app (Firegraph). Many of the Instagram comments that were being displayed were filled with little boxes with numbers in them, despite the many emojis that are implemented already, as described in a blog post on Emoji by Patryk on the Mozilla UX team. After a few web searches to try and determine what was causing this, I realized that the problem was that I was using the incorrect font (or maybe an outdated version of gaia styling).
Splash screen for Firegraph Instagram API login for Firegraph Random picture Firegraph Sidebar navigation inside Firegraph After months of on and off development, I’m finally releasing version 0.1.0 of Firegraph. Firegraph is a FirefoxOS read-only (due to some API key restrictions) packaged webapp for accessing Instagram. While staggeringly incomplete, it does offer basic feed viewing functionality for users that download it, and that I’m proud of!
After much (close to zero) fanfare, VCFPorter 1.1 has been released! Check it out on the VCFPorter marketplace page Here are the changes in v1.1: Small bugfixes in this release Already-parsed file was not properly redirecting to select contacts view Fix small typo in code for handling categories Fix slack space on left and right in vcf file and contact lists Fixed issue #18 (select/deselect not updating lists in UI) Personal notes: After a pleasant experience developing the app and publishing it to the FirefoxOS marketplace, I received a review (and am super grateful to have anyone even use the app, much less leave a review with some pointers on what to fix) from a user that noticed the (very noticable) bug affecting select/deselect all buttons.
So today, I ran into a problem that I’m pretty surprised that I haven’t run into before. Using Org-Mode in Emacs, I was unable to use the keybinding for insert-heading to insert a new heading. The keybinding is M- but for some reason, when I pressed those magical keys, no new heading was created, just an indented newline. These changes lead me to making some modifications to the ~/.Xdefaults file in my home directory, which I thought would be the perfect thing to save up on configr.