littlelogs

Keep a social journal of your work progress as you make and learn things.

#haskell

March 2017

rhitakorrr
rhitakorrr

Submitted that #shortstory I edited down by 600 words last week to a contest. Now I have two pending stories which I won’t hear back about for a while. I’d like to write and submit at least one more before then. Maybe I’ll work on that tomorrow since I’ll be snowed in by a blizzard and possibly will lose power again.

On another note, I’ve sunk way too much time into CodeFights over the past week thanks to @wearing2raincoats, who got me into it. Problem solving with #Haskell is addicting. If anyone wants to codefight me, add me on there!

February 2017

rhitakorrr
rhitakorrr

Did some more work on my #hakyll_portfolio_blog tonight. I made some progress on the design/css, made some custom routes (they convert default routes like /content/posts/a-blog-post.html to /posts/a-blog-post/index.html to get rid of parent directories and hide ugly .html extensions), added some functionality to direct all links to the “clean” routes instead of the index.html ones, and got started on a #yaml config file which I’m successfully reading in and parsing (turns out this is pretty easy in #Haskell with the right libraries). All in all, a pretty good start after the initial setup yesterday.

September 2016

rhitakorrr
rhitakorrr

I’m back! This has been a longer break than I meant to take, but it was probably a good idea. I started working on forming some good habits and life balance. You know, eating, sleeping, and taking breaks instead of dev’ing 15 hours/day–just little things that help in the process of staying alive and keeping my apartment intact.

To that end, I’ve spent a couple days configuring #LifeRPG to make the process a little more fun. Progress bars are always good encouragement. Some goals I’ve set include daily reading (just joined Goodreads), regular writing, daily/weekly/monthly house chores, getting some exercise (even if that just means a mile walk), socializing more, and being more effective at my job.

So far this week I:

  • Wrote a #Haskell tool to figure out the RP value of LifeRPG rewards
  • Played Smash Bros. Melee w/ some office mates
  • Finished two books I’d been slacking on
  • Started another book
  • Finally got back to working on #midnightmurderparty!
rhitakorrr
rhitakorrr

I didn’t get to post all weekend, but I haven’t been slacking. Promise! I actually got a lot done with my #hakyll_portfolio_blog.

  • Friday. Added logic to conditionally show fields based on metadata. Turns out it was tricky, but not impossible, @josh. I had to go on a type safari through #hakyll docs and source to figure it out. Since I couldn’t find any resources on doing this, I’ll write up an explanation in a blog post once my blog is done.
  • Saturday. I got the résumé JSON into a #hakyll Context and displayed in the template. I also figured out how to get #pandoc to inject values from the JSON into a #LaTeX template and render that template to PDF. All from #Haskell! Also, went to a diner for dinner.
  • Sunday. Tried to learn #LaTeX and ended up breaking my entire installation. Spent the first half of the day fixing it. Spent the rest of the day hanging out with @JorfimusPrime. Went to the diner again. I might like diners too much.
rhitakorrr
rhitakorrr

Got #Disqus working on my #hakyll_portfolio_blog tonight. Had to append the window.location.protocol to the beginning of the this.page.url variable, which I’ve never had to do before (and I’ve set up Disqus two or three times before this). Weird.

I moved some stuff around the home page as well. I’m thinking of making it a résumé page instead of just blog posts. Still getting the balance between portfolio and blog right.

The biggest thing left, aside from continued design, is generating a résumé from JSON as a PDF and as HTML on the home page. Going to try to use #pandoc for that, I think, but I’m still very hazy on how to transition from JSON -> LaTeX -> PDF. All I know is that #Haskell’s aeson library will probably come in handy.

rhitakorrr
rhitakorrr

Made a good amount of progress on my #hakyll_portfolio_blog:

  • Added support for tags, which are shared between projects and blog posts.
  • Added support for teasers / “read more” links in the post listings.
  • Redid all the dependency handling with Stack.
  • Split the #Haskell source code into its own repo, apart from all the generated HTML. Now I can see my #Haskell code actually counted in the code breakdown (this makes me happier than it should).
  • Replaced over-complicated #CircleCI deploy process with a simple shell script.

All in all, I’ve got some new features, and building and deploying is now simpler. I declare today a success!

rhitakorrr
rhitakorrr

Added some basic support for projects to the #hakyll_portfolio_blog tonight. Rigging it up wasn’t too bad even though I did have to dig through a lot of docs to get some cool but largely unnecessary functionality in there. It’s all learning (and #Haskell), though, which is fine by me.

Speaking of learning, I learned, after many wasted hours, that it is either tricky or impossible to get metadata out of the MonadMetadata monad in order to do a simple comparison. I wanted a Bool. All I could get was a MonadMetadata Bool. Or maybe it was a Compiler Bool. I’m not sure. All I know is I absolutely could not figure out how to extract a value from that monad.

I did post in the #hakyll Google Group to ask about it, but it seems Google Groups ate my post. Either it’s awaiting moderation (as a new member) or it’s gone forever. No idea which.

August 2016

rhitakorrr
rhitakorrr

Did some more work on my #hakyll_portfolio_blog tonight. Initially intended to work on actually designing the site, but got caught up prettying up my routes so they would look like /posts/my-blog-post/ instead of /posts/2016-12-08-my-blog-post.html. Between learning a new library and figuring out how to do #regex in #Haskell, it was more challenging than expected. And that’s before I realized I was modifying external URLs as well as my own. Woops!

But all in all, I don’t really mind the extra time spent. It’s nice to be venturing into the world of #Haskell again… especially after the nightmare that was cross-browser #JavaScript (shudders).

rhitakorrr
rhitakorrr

After all of @JorfimusPrime’s talk of blogging, I got it in my head to convert my portfolio website into a portfolio website / blog. It’s seriously due for an update anyway. Spent a good portion of the day looking at Jekyll, a simple Ruby-based static blog generator which #GitHub will build for you automatically on push. But, me being me, I had to look up a #Haskell alternative. And what do you know? I found #Hakyll, which is basically a #Haskell clone of Jekyll with a bunch more configuration options. Neat.

Spoiler alert: #GitHub does not support automatic #Hakyll builds to gh-pages.

So, tonight I dug through a bunch of #Hakyll + #CircleCI build tutorials, spent several hours configuring git submodules, orphan branches, and SSH keys as well as fixing mismatched dependency versions, and finally got the first automatic build and deploy of my #hakyll_portfolio_blog working!

larouxn
larouxn

RSS Part 1: Takeaways from a Trip to Dynamic Mutable Hell and Back w/ @rhitakorrr

  • With Active Record you can use as_json to turn your database records into JSON, wahoo! 😊
  • If you .merge!({key: val}) some of your JSON blobs, the merged ones become Hashes (expectedly)… which I forgot and then had some records with values only accessible via ['key'] and some via [:key].
  • Whilst iterating through an array of objects, if you insert an object into an array you initialized outside the iteration block, you’re actually only inserting a reference to that object. If the inserted object changes later but still during the loop, the one you inserted a while back has now also changed. 😒

I love #Ruby and this may not happen often… but I wish it couldn’t happen in the first place. Shoulda used #Elm. #midnightmurderparty

March 2016

austinmoody
austinmoody

Recently started trying to learn #haskell. Mainly because I want to try something completely different than what I’ve been used to, plus I’ve never really done any functional programming. Started working my way through the Real World Haskell book.

1 year, 1 week ago haskell

1 Heart 1 comment

December 2015

BlueHat
BlueHat

At the moment I’m trying to learn more about #Ruby and #RubyOnRails, start learning #FSharp, working on an app for #vintus, covering a lot of decision mathematics again because maths is hella important and learning about startups. I’m finding myself struggling to split my time effectively between all of them and so I think I’m going to have to cut F# for a while sadly. I really adore functional programming and F# has been incredibly interesting but I’m still at a real beginner stage and I’m still trying to skill up on Rails.

From today forward I’ll be focusing on the app for Vintus and my Ruby on Rails work. Hopefully the app will be released in early/mid January so then I’ll have that off of my plate for a little bit, then I can come back to learning about startups and checking out a bit of F# again.