Subscribe to Craig Maloney feed
Updated: 47 min 6 sec ago

Day 55/100: Exercism

Tue, 07/25/2017 - 23:17

Played more with the programming problems from Exercism. One of the exercises I did was the Hamming Exercise in Scheme. Its the first iteration and I might try to optimize it based on reviewing some of the other examples but I'm pretty pleased with how Exercism works. Part of that is because I can use my own tools in order to see how things work.

I'm still trying to figure out how to debug Guile code. I'd love to figure out how to step through code in Guile like I can in Python.

Categories: LugNut Blogs

Day 54/100: More learning

Mon, 07/24/2017 - 23:18

Spent part of the day watching videos and courses. Also played a tiny bit with Godot and downloaded some intro videos.

Categories: LugNut Blogs

You should learn Scheme

Mon, 07/24/2017 - 20:13

I recently did a presentation at MUG entitled Scheme, Guile, and Racket: an introduction (slides). One of the questions I got asked is "Why Scheme?". It's a valid question, but I'd like to counter with another question: "Why wouldn't you learn Scheme?".

For me Scheme is a lot like Latin.

Much like Latin Scheme is not in common usage. Look on Stack Overflow Jobs and you'll have a hard time finding any jobs that use Scheme. I know of only one person in our group that has done professional Scheme programming.

Latin is the same way. The majority of living speakers of Latin work for academic or religious institutions. It's rare to hear anyone speaking Latin, and it's rarer still to hear casual conversation spoken in Latin. Scheme is an academic language and was used to teach an introduction to computer science course at MIT. (Side-note: the course now uses Python).

So if Scheme and Latin are equivalent why would any modern person learn either language?

I took two years of Latin in high school, and I can say that one of the reasons I'm grateful for learning Latin is because so many languages borrow from it. Three of the major "romance" languages (Spanish, Italian, and French) are heavily influenced by Latin. I may not know the vocabulary, declensions, or pronunciation of any of these languages but I can get a general sense for how those languages work. When I took Spanish I had an easier time with it because it felt like a stripped-down version of Latin.

Scheme (and Lisp) are foundational languages. They were the melting pot by which ideas were tested and tempered. They also borrowed heavily from Lambda Calculus (becoming a superset of Lambda Calculus in the process). Many of the modern programming techniques we take for granted (map, filter, lambda functions, functional programming, etc.) have their roots in Scheme and Lisp. So in a sense Scheme is a short-cut for learning many of the ideas that build up computer science as a whole. If you've struggled as I have with learning lambda functions in Python and understanding what they mean then learning Scheme may help clarify what's going on.

So yes, Scheme might be akin to learning Latin, but you'll be able to take a look at something like Amazon Lambda and break it down into it's various pieces (lambda functions, no state in-between execution, return a single result). Once you understand the pieces you can better understand the whole (Amazon Lambda is a serve where it will spin up functions that return a result, and then disappear without leaving any state behind). You'll understand the nomenclature of functional programming better (closures, anyone?) and be able to apply it to your conversational languages ("Yes, that was quite an antidisestablishmentarianism thing for him to say, wasn't it?")

If you're looking for a gentle introduction to Scheme I highly recommend the Guile manual section "Hello Scheme". Also recommend Realm of Racket to learn more about the Racket version of Scheme.

"Provehito in altum"

Categories: LugNut Blogs

Day 53/100: Playing with Godot

Sun, 07/23/2017 - 22:52

Today I sat down and watched some Godot tutorials. I managed to get a sprite to move via keyboard control and even got it to face different directions.

I'm not 100% sure how to share Godot code (since it's in an IDE) but when I do I'll share the fruits of my tinkering.

So far I'm impressed. Liking my first forays into Godot programming.

Categories: LugNut Blogs

Day 52/100: Nothing to report

Sat, 07/22/2017 - 22:23

Nothing to report today. Spent most of it reading.

Categories: LugNut Blogs

Day 51/100: Marking time

Fri, 07/21/2017 - 23:14

Not much progress today. Spent most of it at a dealership trying to put my key back together. Fun time.

Categories: LugNut Blogs

Day 50/100: Halfway point

Thu, 07/20/2017 - 22:10

So it looks like I'm at the halfway point of this experiment. Frankly I wish I had more to show for it. True, I've done a few major-ish programs but most of this has been reading and learning, not actual programming.

I'm still keeping with it, but I'm disappointed with the progress so far. Hoping to change that in the next 50 days.

Categories: LugNut Blogs

Day 49/100: Playing with ideas

Wed, 07/19/2017 - 23:07

Spent most of the day playing around with some ideas that I've had percolating in my head. Nothing major but part of it was playing with a game idea that I've had for a while now and seeing if I could make it work. Part of that was modeling the data in a SQLite database. But I also got a little side-tracked in looking at Guile's Fibers support and concurrency in general.

Categories: LugNut Blogs

Day 48/100: Reading and working with CSS

Tue, 07/18/2017 - 20:00

Spent the day playing working fighting in mortal hand-to-hand combat with CSS on a Wordpress site. Finally gave up after things weren't working the way I thought they should and didn't want to get too far into the weeds to get what I wanted.

Funnily enough I got mostly there by removing some of the old styling in a table, but that's another story for another time.

Categories: LugNut Blogs

Day 47/100: JavaScript Allonge

Mon, 07/17/2017 - 23:28

Did a little reading of the excellent JavaScript Allonge today. Today was taken up with working on fixing bugs for a website and releasing the next Open Metalcast Episode. Hoping to get some more quality programming time tomorrow.

Categories: LugNut Blogs

Day 46/100: Playing with CodeWars some more

Sun, 07/16/2017 - 22:52

Played around with CodeWars and some of the problems on there. Here's one of the solutions I came up with for a question to determine an outlier in the array (eg: one of the elements would be either odd or even).

function findOutlier(integers){ let odd = integers.filter(function(n) {return (n%2) !== 0;}); let even = integers.filter(function(n) {return (n%2) === 0;}); if (odd.length < even.length) { return odd[0]; } else { return even[0]; } }
Categories: LugNut Blogs

Day 45/100: Everything but

Sat, 07/15/2017 - 00:45

Unfortunately today was taken up with everything but programming. Did a little reading but nothing of consequence. Again. Argh!

Categories: LugNut Blogs

Day 44/100: Reading is fundamental

Fri, 07/14/2017 - 21:48

Spent more time reading than programming. Am still trying to figure out what the next project will be.

Categories: LugNut Blogs

Day 43/100: Playing a little bit with Godot

Thu, 07/13/2017 - 22:55

Played a little bit with the Godot Engine today, but still getting my feet wet with it. Nothing really to show for it right now. More tomorrow and this weekend.

Categories: LugNut Blogs

Day 42/100: Figuring out what's next

Wed, 07/12/2017 - 21:13

Today I was playing around with Guile 2.2 and thinking about a new project with Godot Engine. I need to look at some of the tutorials for Godot to get my bearings.

Categories: LugNut Blogs

Day 41/100: Tonight: The Presentation

Tue, 07/11/2017 - 13:38

Tonight I shall finally present the Scheme presentation that I've been working on. (And there was much rejoicing). This afternoon I worked more on cleaning up the slides. Hopefully it'll be recorded so you can see the end result.

Categories: LugNut Blogs

Day 40/100: Some more slides

Mon, 07/10/2017 - 22:37

Still more slides for the presentation. Also downloaded some tutorials from GDQuest for the Godot Engine to see how that works.

Categories: LugNut Blogs

Day 39/100: More slidea dn lambda calculus

Sun, 07/09/2017 - 22:42

Putting more spit and polish on my slides for the MUG Meeting (July 11th is when the presentation is). Did some reading on Lambda Calculus just so I can speak somewhat intelligently about it and how it relates to Scheme.

Categories: LugNut Blogs

Day 38/100: eqv? in guile

Sat, 07/08/2017 - 22:58

Was working more on my slides when I ran into something a little curious with the implementation of guile.

(eqv? "5" "5")

Apparently in certain versions of guile this returns #f (2.0.9). However in later versions (2.0.13) this returns #t. It also returns #t in Racket. I'm not 100% sure what's going on (I think it has something to do with how strings are handled in the earlier versions, and how they do comparisons) but it was interesting to me to see that even in later implementations of the same Scheme interpreter there was disagreement over how certain bits were handled.

I'll likely hand-wave this as part of the presentation, but it was interesting nonetheless.

Categories: LugNut Blogs

Day 37/100: Nothing to report

Fri, 07/07/2017 - 22:57

Worked a little more on my slides, but didn't get to any programming of note.

Categories: LugNut Blogs