2012-05-17

Less vs. Sass

There’s a post on Hacker News today comparing Less and Sass for CSS preprocessing.

I don’t know enough about either of them to know which one to choose, but I know that I need to learn at least one of them.

More Less

Less plugins that seem useful

Possible Weekend Projects

I’d really like to accomplish one of these this weekend:

  • Cluster enabled http-server for node
  • Lex(Flex) based port of Forth4(awk/js) to C
Standard

2012-05-16

Unfamiliar Languages To Learn

Here are a few languages that I’ve messed around a little with recently. They are all outside the C-derived paradigm, so I don’t really want to focus on them right now. But at some point in the future I’d like to give each of them enough of a shot that I have a reasonable idea of their usefulness and strengths

  • Fortran
  • Prolog
  • Haskell

Concurrency Languages / Frameworks

Here are languages I’m interested in as far as supporting significant concurrency.

  • Node.js (JavaScript server framework)
  • Go
  • Erlang

I’ve been experimenting with Node and am fairly pleased with it so far. At some point I also want to spend more time with Erlang.

I’ve had a fair amount of fondness for JavaScript and Erlang for a number of years, so I think I’d be happy to be using either of them.

I can imagine writing prototypes of web-facing stuff in Node and then where necessary implementing backend stuff in Erlang. There might be other architectures that make sense in combining the two languages.

Go is a languages I haven’t really used yet, but am trying to keep aware of. I’m not entirely sure how I feel about it yet. I like the idea of it, and the ideas expressed in it, but I’m a little wary of focusing on it yet. Go doesn’t have a good story on Windows yet, which isn’t really necessary, but I like languages that are fairly cross-platform. Also, it’s interoperability with other languages is still low. That is, it can call C libraries, but there isn’t really a good way for other languages to call Go code. As a result, for the moment at least I might be more likely to write low level stuff in C with the hope that it could be used in whatever other languages I work with.

Standard

2012-05-15

Essential JavaScript Libraries

Here’s a list of JavaScript libraries that seem to come up really frequently as being useful to real people doing development.

  • JQuery
  • Backbone.js
  • Underscore.js

I need to spend some time looking at these.

Other Interesting JavaScript Libs

A few other libraries I think are interesting, though not necessary.

  • Processing.js
  • Three.js – 3d graphics
Standard

2012-05-13

Fortran

Listening to a compiler course lecture realized I’ve never really given Fortran a shot.

Fortran and Cobol are two old but still used languages that I really don’t know. I would like to take some time to look at both of these some time soon, at least somewhat.

Standard

2012-05-11

Possible Weekend Projects

  • node / ncurses based text editor
  • node cluster enabled http-server
  • node mud server
  • C based Forth implementation using Flex.

Is C++ Worth The Trouble?

I’ve been trying to decide if it makes sense to invest the time to learn C++ relative to the other C based languages I’m focusing on.

If I merely want Objects or collections, maybe it makes more sense to go to Java/C# than C++? But the advantage of C++ is that you get fast template generated collections with pointer semantics. However, maybe collections in Java/C# can simply be treated as arrays, which is not too far off in capabilities.

The coming changes in C++11 are enough that I’m having a hard time considering the extra cognitive load of keeping C++ straight as it diverges more and more from C.

So I guess the question is, can I use a smaller consistent subset of C++ that is useful to me, without hitting the dark corners of C++?

Things that C++ provides that I like:

  • Qt toolkit is a good cross-platform toolkit for GUIs and other system components
  • Templates and STL allow performant code without having to code datastructures myself.

Are those enough to justify moving from C to C++?

I could use Tk instead of Qt from C. It’s possibly not as crisp as Qt, but equally cross-platform and Tcl is full of useful utility functions.

Assembling 32-bit ASM on 64-bit Ubuntu

as --32 <source-file> -o <object-file>
ld -m elf_i386 <object-file> -o <executable>

C++ Tutorials

This might be a little long in the tooth now, but it was a site that I thought did a pretty decent job teaching C++ and basic Windows programming a while back.

Reliable Software

I believe the author has moved onto dealing with the D programming language these days (and some Haskell).

I’m trying to go through the WinAPI tutorial again, but the current Visual C++ 2010 Express isn’t liking some of the code (maybe I’ve got typos, I’m not sure).

It may be simpler for me to see if Charles Petzold’s Programming Windows has an initial test program.

Object Based C++ (C using Classes)

I wonder if it’s worth just using C++ as a C that can manipulate objects. Under that paradigm in general one wouldn’t create many new classes, but would simply use those already provided by the standard library or other 3rd party libraries. All the code created by the programmer would be essentially C style procedural / functionally composed code except that it could utilize the methods of objects and take advantage of the data structures in the STL.

I’m not sure that I would completely avoid defining new classes in this paradigm, but I would save them for the few new datatypes that were actually necessary and couldn’t be emulated using the already available data structures.

Standard

2012-05-10

Node Clustering

This website is served up by an instance of Node.js. Node.js is a webserver with an event oriented architecture that allows it to handle larger numbers of concurrent connections than some other architectures. However, because it is single threaded, each Node process can only use up to 1 cpu core.

So, I’m thinking about trying to modify the http-server package that I forked on github to enable clustering. Clustering allows Node to start multiple processes to handle the same workload. So, instead of having 1 Node process to serve this website, there would be 1 per CPU core and each worker would be responsible for serving out a subset of the incoming requests.

Standard

2012-05-09

Online Learning

I have recently been exploring various structured online learning resources. I think I may have taken on more than I can reasonably accomplish. The following are the list of topics/courses that I am currently trying to deal with…

Online Classes from Coursera

  • Machine Learning
  • Introduction to Logic
  • Automata
  • Compilers
  • Computer Vision

Language Learning from memrise

  • Japanese Alphabets (Hiragana and Katakana)
  • Japanese Kanji

Code Year from CodeAcademy

  • JavaScript Fundamentals

Graduate School

I’ve been considering for the past day or so looking at Masters programs. I’ve been looking at the Master’s degree in Mathematics from TWU and thinking that it looks like I might be able to get something out of it.

They have a concentration on statistical math and computing that seems interesting to me, and which I think would broaden my horizons.


Prolog

I listened to the first lecture of the Intro to Logic class and it immediately reminded me of Prolog. I’ve never really learned Prolog, so I went ahead and downloaded the gprolog and swi-prolog interpreters and played around with the first section of Learn Prolog Now.

So far, Prolog is obviously connected to logic, I don’t yet know how I would use it for anything useful, but I may keep playing with it, especially if I continue through the course.


Conceptual Models For Understanding

I have been thinking today about mental models that seem helpful in understanding the world. So far the models that I’m aware of having been helpful to me are:

  • Calculus – acceleration and rates of change
  • Supply and Demand curves in Economics
Standard

2012-05-07

Forth4JavaScript

I have ported my Forth implementation from Awk to JavaScript.

It was a fairly easy port, which gives me hope that my desired project to write a version of Awk (or an Awk like language) in JavaScript which extends Awk with some of the higher-order concepts in JavaScript may not be out of the realm of possibility.


Assembly Language Books

GAS Syntax

Intel Syntax

  • Assembly Language Step-By-Step (NASM)

I really like this one. It has one of the best explanations of different numerical bases that I’ve seen. However, it uses NASM as the assembler and I’m concentrating on GAS syntax for the moment.


Compilers

My goal with learning Assembly is to be able to go through Jack Crenshaw’s Let’s Build a Compiler series porting the code samples to use x86 assembly.

Reformatted PDF of tutorial here.

Jack Crenshaw writes his compiler using Pascal and 68000 assembly. It doesn’t look like it will be to difficult to use Gnu Assembler (GAS) syntax in place of the 68000 assembly instructions.

Also, Free Pascal seems to compile his Pascal programs without requiring changes.


Curly Brace Languages Reconsidered

Realized today that Scala might qualify as a curly brace language, which would bring the list of possible curly brace languages to …

  • C
  • C++
  • Java
  • C#
  • Awk
  • PHP
  • JavaScript
  • Go
  • Scala
  • Perl

That seems like an overly long list of languages to concentrate on, especially since there are a number of languages on the list that have non-trivial semantic divergences from C.

So, I’m thinking again about restricting myself to what I’m calling C-derived syntax languages, which would be possibly the following list:

  • C
  • C++
  • Awk
  • PHP
  • JavaScript

and possibly

  • Java
  • C#

That seems like a more manageable list. There are less real oddities to work around in the differences in those languages, whereas the earlier list had enough languages with real semantic differences that it would be hard to learn them all and keep them straight in the time remaining in this year.


Major Differences in C, C++, Java, and C

The primary places that the syntax of these languages differ from C or each other is in their handling of the following:

  • Objects
  • Generics / Templates
  • Lambda Expressions (anonymous functions / objects)
  • Inner Functions / Classes
Standard

2012-05-05

Node Tutorials

here


Denton Orchestera

Last night was the first concert of hopefully many of a new Denton professional orchestra.


read.js vs readline

I need to look up these two modules and see what the differences are and which is most reasonable to use for capturing stdin or a file line by line.

Standard

2012-05-04

Curly Brace Languages

A couple of days ago I said that I was only concentrating on C derived languages this year. I’m thinking about restating that as "Curly Brace" languages.

If that’s the criteria, the probably the following languages fit:

  • C
  • C++
  • Java
  • C#
  • Awk
  • Perl
  • PHP
  • JavaScript
  • Go

This seems like a fairly decent set of languages to have a grasp on. There’s a range of programming idioms possible in these, and most concepts in Computer Science show up in at least one of these languages.

Go and Perl are the most fringe as far as how closely their syntax tracks with the other languages on the list. Perl has some unexpected gotchas that have bitten me in the past, and Go seems a little mind-bending in terms of it’s coroutine support.


Languages For Next Year

At some point this year will end (Dec, 31, 2012 to be exact) and I will have finished my year of curly braces.

At that point I’m not sure what to concentrate on for the next year.

Here are a few possibilities that seem interesting:

  • Erlang – I have a deep fondness for this language, but have not really given it enough attention. It would be cool to go through Learn You Some Erlang.
  • Scheme and Forth – Both of these languages exemplify structures that show up in compiler substrates. I wouldn’t mind knowing how to implement either of them in detail.
  • Begin/End blocks languages (Algo derived?). I could find a number of languages in this catagory.
    • Ruby
    • Pascal
    • Lua

PouchDB

here – Interesting, a portable reimplementation of the CouchDB api, written as a layer over IndexedDB.


Stuff To Look At Someday

  • WebMachine – Erlange webserver
Standard