Quantcast
Channel: Lojic Technologies Blog: Lojic Technologies Blog
Browsing latest articles
Browse All 84 View Live

Nice Fonts for GNU Emacs on Ubuntu Linux

UPDATE 12/24/08: This article is now out of date. I just installed Ubuntu 8.10, and getting Emacs with nice fonts is now much easier:Install the emacs-snapshot-gtk packageEdit ~/.Xresources to have...

View Article


Ubuntu Linux 8.04 – Wake on LAN

Now that I’ve switched to a Macbook Pro with OSX Leopard as my primary desktop, I’ve located my Ubuntu machine in another part of the house to be accessible to my children. Not wanting to walk to the...

View Article


How to Write a Spelling Corrector in Ruby

Update 10/16/2015: Please see the Racket Version also.Peter Norvig wrote a simple spelling corrector in 20 lines of Python 2.5, so I thought I’d see what it looks like in Ruby. Here are some areas I’m...

View Article

Ruby Dynamic Method Invocation Performance

Ruby is a very flexible and expressive language. A recent question posted by a Ruby newbie got me looking through my IRC logs for a discussion about the performance of various dynamic method invocation...

View Article

Use Ruby to parse NMEA sentences from your GPS

I recently obtained a mobile broadband device that has a built in GPS receiver and can emit NMEA sentences. My old Garmin portable GPS can emit NMEA also, but it’s a pain to hookup to the laptop....

View Article


2009 Programming Language Plan

Update 11/23/2020: The ultimate winner for my primary programming language was Racket.BackgroundThe 2008 Programming Language Plan didn’t go as well as I hoped, so I’m regrouping for another go at it....

View Article

Getting Started with Standard ML

One of the two parallel tracks in my 2009 Programming Language Plan begins with the Standard ML programming language, so it’s time to get started.More…

View Article

TriFunc.org

I first became interested in functional programming when I was exposed to Python, Ruby & JavaScript a number of years ago. Since then I’ve looked into Arc, Clojure, Common Lisp, Haskell, Logo, ML...

View Article


Haskell In The Finals

As I explain in 2009 Programming Language Plan, I’ve been in the process of evaluating programming languages to determine their suitability for use in my work. I’ve been proceeding on two fronts –...

View Article


Cracker Barrel Peg Board Puzzle in Haskell

I first wrote a program to solve the Cracker Barrel peg board puzzle (15 holes arranged in a triangle with 14 golf tees) many years ago as youth using the BASIC language. I wish I still had the source...

View Article

Find Longest Substring Palindrome in Haskell

I stumbled upon a programming challenge a company was using for recruitment purposes and thought I’d create a Haskell solution as a learning exercise. The first problem was to find the longest...

View Article

My Top 10 Programming Languages of Interest for 2013-2014

The End of Moore’s LawFor the last few years (since 2009), I’ve been pitching the idea to my peers that language speed & concurrency/parallel capabilities will become more important as CPU clock...

View Article

DSL Embedding in Racket

Here’s a great, two part, video by Matthew Flatt about embedding DSLs in Racket. Being able to hack the language is one of Racket’s/Lisp’s killer features:More…

View Article


How to Write a Spelling Corrector in Racket

In September, 2008, I translated Peter Norvig’s spelling corrector into Ruby. My current favorite language is Racket, so I thought it would be a good exercise to port it to Racket. After some helpful...

View Article

Upgrading to Emacs 24.5

I previously wrote a post about switching from Carbon Emacs to Gnu Emacs. Upgrading is pretty simple now, so I thought I’d record the procedure for installing Emacs from source on OSX for future...

View Article


Programming Language Popularity – Part Ten

I made a number of Google searches of the forms below and summed the results:"implemented in <lang>" "written in <lang>" "developed in <lang>" "programmed in <lang>"More…

View Article

Programming Language Popularity – Part Eleven

I made a number of Google searches of the forms below and summed the results:"implemented in <lang>" "written in <lang>" "developed in <lang>" "programmed in <lang>"More…

View Article


Programming Language Popularity - Part Twelve

I made a number of Google searches of the forms below and summed the results:"implemented in <lang>" "written in <lang>" "developed in <lang>" "programmed in <lang>"More…

View Article

Wordpress -> Frog

After thirteen years with Wordpress, I decided to switch to static site generation for this blog. As a Racket programmer, Frog was a natural choice. This post highlights some of the lessons I learned...

View Article

Programming Language Popularity - Part Thirteen

I occasionally compile some statistics on programming language popularity by running a bunch of Google searches to rank programming languages according to the number of results. I wouldn’t read too...

View Article

Peter Norvig on Gradient Dissent Podcast

Someone on the Julia Slack mentioned this interview with Peter Norvig on the Gradient Dissent podcast.The 4th edition of Peter’s book, “Artificial Intelligence: A Modern Approach” was released earlier...

View Article


Ascending Unique Permutations

Advent of Code 2020Some Racketeers mentioned the Advent of Code 2020, and I thought it would be fun to give it a shot this year. I’ll be discussing my solution to Day 1 Part 2, so if you haven’t...

View Article


Configuring wkhtmltopdf on MacOS and Linux

I’ve been using wkhtmltopdf in Rails projects for years. After upgrading to Rails 6 and Ruby 2.6, PDF creation started failing for me. This post documents what I did to get it to work again.More…

View Article

Computing Pi with Colliding Blocks

A friend sent me the following videos that I found beautiful from a math & physics perspective.More…

View Article

How do differential gears work?

This instructional movie from 1937 explains how a car’s differential gears work (to allow the driving wheels to turn at different speeds when cornering) in very easy to understand way! Modern tutorials...

View Article


Comprehensions in Julia

One of Haskell’s features that I really liked was list comprehensions, so I was very pleased to discover how nice Julia’s comprehensions are!More…

View Article

An intuition for the Fourier Transform

I’ve come across the Fourier Transform a number of times, but I don’t think I ever developed a good intuition for what was going on. The following 3Blue1Brown video does a great job of providing that...

View Article

Let's Encrypt

I recently converted a number of websites over to using Let’s Encrypt for SSL certificates, and the process was much easier than I expected.More…

View Article

Advent of Code 2021

Advent of Code 2021 is about to start on December 1.More…

View Article



Comprehensions in Python

One of Haskell’s features I really liked was list comprehensions. I created a comparison between Haskell and Julia list comprehensions almost exactly a year ago. It appears that Python list...

View Article

Advent of Code 2022

Advent of Code 2022 will start on December 1. This will be my third year, after participating in 2021 and 2020.I hope to have time to code all of the solutions in Racket, my favorite programming...

View Article

Advent of Code 2022 - Day 0 - Preparation

Table of ContentsNow that I have a couple years experience with Advent of Code, I’d like to get a little more organized prior to the contest. I’m hoping to create a blog post for most of the days, and...

View Article

Plotting in a Racket Notebook

I recently started experimenting with the Racket notebook package, IRacket. Notebooks are handy for experimentation and visualization, so I wanted to be able to display a plot. I discovered that...

View Article


Advent of Code 2022 - Day 1: Calorie Counting

Table of ContentsGithubEach day will have some preliminary setup code:123#lang iracket/lang#:requireracket(require"../advent.rkt")(requirethreading)Day 1 - Part 1We’re given the following sample...

View Article

Advent of Code 2022 - Day 2: Rock Paper Scissors

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")Day 2 - Part 1Rock, Paper, ScissorsFor example, suppose you were given the following strategy guide:A Y B X C ZWe’re...

View Article

Advent of Code 2022 - Day 3: Rucksack Reorganization

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt"threading)Day 3 - Part 1Rucksack ReorganizationWe’re given some sample input:vJrwpWtwJgWrhcsFMMfFFhFp...

View Article


Advent of Code 2022 - Day 4: Camp Cleanup

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")Day 4 - Part 1Camp CleanupBefore we get started with today’s puzzle, I have some cleanup of my own to do!1....

View Article


Advent of Code 2022 - Day 5: Supply Stacks

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")Day 5 - Part 1Supply Stacks We’re given the following sample input: [D] [N] [C] [Z] [M] [P] 1 2 3 move 1 from 2 to 1...

View Article

Advent of Code 2022 - Day 6: Tuning Trouble

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")Day 6Tuning TroubleToday’s puzzle has very similar parts! For both parts, our input is a single string, and the task is...

View Article

Upgrading to Emacs 28.2

I upgraded to Emacs 28.2 (MacOS Ventura), and it required a few tweaks, so I’m documenting that here for future reference.More…

View Article

Advent of Code 2023

Advent of Code 2023 is starting on December 1. This will be my fourth year, after participating in 2022, 2021 and 2020.My primary programming language is Racket, so I expect to code most of the...

View Article


Advent of Code 2023 - Day 0 - Preparation

Table of ContentsMy support code is unchanged, as of now, so last year’s blog post still does a good job of explaining it.More…

View Article

Upgrading to Emacs 29.1

It appears upgrading my Anaconda Python distribution killed my Emacs, so I figured I’d try upgrading to the latest version to see if that fixed things. It did :)Since upgrading Emacs to 29.1 no longer...

View Article


Advent of Code 2023 - Day 1: Trebuchet

Table of ContentsGithubDay 1For part 1, we’re given data as follows (Note: in both data examples, intraline spaces are only for emphasis):1 abc 2 pqr 3 stu 8 vwx a 1 b2c3d4e 5 f treb 7 uchet The task...

View Article

Advent of Code 2023 - Day 2: Cube Conundrum

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt"threading)Our data today is as follows:Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green Game 2: 1 blue, 2 green; 3...

View Article


Advent of Code 2023 - Day 3: Gear Ratios

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt"threading)Day 3 involves some two dimensional analysis, so we’ll use complex numbers as a convenient two dimensional...

View Article

Advent of Code 2023 - Day 4: Scratchcards

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")I always enjoy recursive list processing in Racket :) Here’s our input today:Card 1: 41 48 83 86 17 | 83 86 6 31 17 9...

View Article

Advent of Code 2023 - Day 5: Seeds

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")Day 5 involves a typical Advent of Code scenario where Part 1 is easy, and a naive modification to Part 1 to get Part 2...

View Article

Advent of Code 2023 - Day 7: Camel Cards

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")Day 7 involves simulating a card game. Our input looks like:... 8J833 494 6AJT8 318 AA4QQ 125 62KK6 876 7A7QK 241...

View Article


Advent of Code 2023 - Day 8: Haunted Wasteland

Table of ContentsGithub12#lang iracket/lang#:requireracket(require"../advent.rkt")Day 8 involves navigating binary trees, and modular arithmetic, but I’m getting ahead of myself. Here is our test...

View Article

Browsing latest articles
Browse All 84 View Live