2012-12-24

Descriptions of Personal Projects

Hawk

This is an attempt to create an Awk like language/environment on top of JavaScript.

Currently it works by taking a program specified with Awk like patterns and translates it to the equivalent normal JavaScript. Currently the translator targets Node.js

Blog Engines

This is mostly a playground for the experiments I’ve tried in writing relatively simple Static Site Generators in various languages.

Forths

I’ve been fascinated with Forth since I learned a rough version of it in high school to program my HP-28S calculator in high school.

Here are a few attempts to implement simple forth style interpreters in various languages.

Apps

Little apps or utilities generally designed to serve some simple or single purpose.

Standard

2012-12-23

Personal Projects:

  • (hawk): An attempt to implement the pattern matching ideas of Awk using JavaScript as the host language.
  • Blog Engines: Site generators in various languages.
  • Forths: Forth interpreters in various languages.
  • Apps/Utilities: Small single purpose programs.

personal side projects i’ve played with:

tcl:

  • my own text editor (source code lost)
  • blog engine (source code lost)
  • tcl to php macros for web generation (source code lost)

javascript:

  • personal ajax library (pre-jquery)
  • forth interpreter in javascript
  • awk in javascript project

awk:

  • awk in javascript project
  • forth interpreter in awk

static site generator in various languages:

  • tcl
  • python
  • ruby
  • perl
  • php
  • go

haskell

i saw an interesting article today about the benefits of haskell.

i often sketch out algorithms in a pseudo-python notation. i’ve felt for a long time that haskell was the obvious complement to python as far as being a similar notation for functional style programs / algorithms, but i couldn’t really address what positive benefits i would gain from it. this article makes me much more interested in studying it at least to the point of being able to use it as a notation, if not for creating actual executable programs.


ramblings

since i’ve got this blog running on wordpress i’ve been trying to do 1000 words a day of writing again. i’m kind of cheating in regard to this post, since it’s already the next day.

yesterday i spent more time adjusting the blog than writing. so i’m going to try to finish yesterday’s 1000 and then do another for today.


i’m stuck typing on my blackberry at the moment. we’re at a restaurant for breakfast and so i’m using my phone rather than my computer to type.

as much as i want to think that i should be able to be as productive writing with my phone as on a real computer, it’s not the case.

it seems obvious as i write this.


i think maybe i’ve found a solution in wordpress for my rambling ruminations.

i think maybe if i write my rambling posts but keep them private or in draft status, then i can use the wordpress copy post function to start a new post based on original, and then just trim it down to what is reasonable.


i’ve been struggling today to get video files off of jayne’s blackberry and onto the mac mini.

i just downloaded the blackberry desktop software. hopefully it will work.

it required a physical usb connection, but once that was taken care of, it did allow the video to be transfered.


thinking about writing on my phone vs using even a small laptop, the phone does allow me to take notes in situations where i just couldn’t realistically use a laptop, such when holding my 2 month old in my arms.


and i’ve failed at the 1000 words for the day, but i’m just going to go ahead and publish.

Standard

2012-12-22

project languages

I think that maybe one of the reason’s I feel like I struggle when trying to think about how to start coding in java or python is that because there isn’t any specific area that they are oriented towards, I have to come up with the idea of what I’m going to do. It’s essentially the problem of writer’s block.

Somehow other languages that have an area that they somehow target are easier for me to deal with, essentially the language itself functions as a sort of writing prompt for me and gives me enough direction in how to think that I can direct my thoughts toward the possibilities of that language.

Languages that are so general purpose that they cause this confusion:

  • java
  • python
  • clojure

Languages whose emphasis gives me direction:

  • perl – text processing, system utilities
  • awk – text processing
  • tcl – gui utilities
  • erlang – distributed computing
  • prolog – graph problems, logic programming
  • javascript (more by it’s limitations than it’s capabilities)

One of the things that I’ve been considering as I continue to evaluate languages is that while the various "messy" languages I’ve mentioned previously, tend to have areas of application where they excel, and that is useful to me in guiding my initial thinking, I worry about whether they are extensible enough to handle the areas outside their areas of advantage. that is, at some point any substantial application will grow past the sweet spot of a languages. at that point, will they still be a better match than the "general purpose" languages that don’t give the initial boost?

blogging

I’ve been thinking about the blog stuff today. It’s been interesting to watch my own reactions to the reactions on i use ugly languages post. I don’t really like the way that I’ve been reacting emotionally. It’s helped me to think about what makes good writing, but it also makes me somewhat depressed because the way that I normally write is not actually conducive to useful reading for people.

Part of it is that I’ve been trying to "journal" and that for me that means writing large amounts of fairly unstructured text. what I really need to do is take those thoughts that I come up from that exercise and then rewrite them into a structured presentation. Basically there is a difference between an online journal and a blog. My writing is mostly an online journal rather than a useful structured presentation. I’ll need to work on that if I want it to be useful to anyone else.

I’m considering making the journal entries private or draft status so they aren’t public. And then the hope is that I can use the information or thoughts that I put in the journal entries to write more useful posts that are actually helpful to people.

There’s almost no way for someone to look at my journal entries and actually glean useful information quickly since they generally lack identifying headers or any other guideposts to the content.

prolog

I’ve been messing around with the blog a fair amount today, so I haven’t made much progress on prolog. I did read some of the book seven languages in seven weeks. I read about 1 day’s worth of the chapter on prolog, and skilled the other 2 days, and then skimmed the chapters on erlang, clojure, and haskell.

I’ve been considering whether the idea of using prolog to implement a type inferencing system. It seems like it would be a pretty decent match. I’m not sure if the parsing necessarily has to be done in prolog, but the symbol recording and resolution seem like they’d be made for its logical inferencing capabilities.

tcl

I’ve mentioned that I feel afraid of trying to do large scale programming with Tcl. but I’m wondering what I could do if I just tried to push it as hard as I could, I wonder what could be achieved using Tcl. Now that Tcl 8.6 has been released, it might be a good time to push Tcl to see what it can do with the new features. The new OO system and tail-call support seem interesting.

Perhaps because Tcl 8.6 was just released a few days ago, I’ve been considering it a lot and wondering how much I could accomplish using it.

I don’t know if it’s a good idea to really hold onto its gui capabilities as a reason to prefer it. The computing landscape is changing so drastically that expecting a cross-platform gui toolkit to be viable, seems like an increasing stretch. Really, given mobile development, the only real cross-platform, cross-device solution, appears to be html/javascript based solutions.

So, the question I find myself asking is, if you take gui out of the equation, what makes Tcl still a compelling language. If i can answer that, I would have a lot more confidence in my analysis of whether or not to use it for projects.

To me, it still feels like tcl brings a lot to the table. In any pc based environment, its command shell like scripting capabilities still seem like a big win. It packages a remarkable amount of capability into a pretty small executable footprint, especially with tclkits and starpacks.

If I knew how to get it to interface easily with c++ code (not just using a c interface) I think I would find it quite compelling. The options I’m aware of are critcl, boost::tcl and boost:tk (i think), and swig. i don’t know about the relative stability levels of those solutions. I think there was also at one point an ffi interface. I don’t know the current status of that.

Especially in the realm of embedded scripting, Tcl has been challenged successfully by Lua, but I think Tcl still remains as a viable candidate, especially where extra functionality is needed in the scripting layer beyond what the Lua core provides.

I think Tcl can be pressed into filling the same application areas that Python or Perl do. I’m not sure it wouldn’t be a struggle in some cases, but it could do it. In addition, it does actually have some advantages over other scripting languages. It is probably the easiest scripting engine to deploy given the tclkit architecture. And given that it can be used in the same application areas as Python and Perl, plus effectively in the embedded arena, it might actually have the widest applicability if one wanted to just focus on one scripting language.

It has areas where the syntax gets annoying, and the list commands have been an anachronism that unfortunately probably cannot be molded into the newer paradigm represented by the dict command without breaking compatibility. However, with some discipline, it is probably capable of dealing with whatever you want to throw at it.

I may have to give it a chance again.

Standard

2012-12-21

Project / Business Idea

Simple website mirroring / caching

static-cache cache.static.com

We run wget recursively (or something like it) on a website and serve the static html files.

Manage dns redirection.

Allow enough editing for changing links to point to the correct place.

"Gihub fork for websites" (Not really, but kind of fun)


i use ugly languages

here is a list of languages that i’ve found myself considering for upcoming projects:

  • perl
  • php
  • c++
  • shell
  • erlang
  • prolog
  • tcl

i’ve always thought that i was interested in elegance, but i find for the stuff that i’m thinking about that it’s easier to get started with something without concern for elegance and then grow it organically from there.

i find that the languages that let me "get started" with the least amount of mental effort are the ones that have a focus on getting things done quickly but aren’t ones that any one thinks of as beautiful or elegant.

as a result, i don’t know that any project that i do will end up as "good" code. i’m a little terrified of that. but is it better for me to get started and end up with messy code, or to not start because i want things to be correct or good?

i recognize that for many this would be a false dilemma, that is, that they can think and work in a more elegant language without trouble. and i feel like i want to be able to work in a language that looks and feels cleaner. but when it comes to getting things started, i find that the tricks that these languages allow give me a boost somehow toward starting initial creation whereas prettier or more "correct" languages cause me to feel blocked.

maybe that’s because i feel like i have to be more structured to use the "better" languages, whereas these other languages will let me just pour out code that does something, and then work around and try to clean it up after i’ve got something out there.

update:

here is a comment i posted on hacker news to clarify some thoughts:

here are the alternatives that i have seen posited as being cleaner / more correct for the ones mentioned:

perl -> python
php -> ruby
c++ -> java or go
erlang -> haskell
tcl -> python or scheme
prolog -> lisp
shell -> ?

these aren't so much my designations, as what i've seen in various references on the internet over the years.

confer for citations of peoples elegance / cleanness opinions:

tcl war usenet posts
perl vs python wars
c++ - paul graham's article on what languages solve,
rob pikes reasons for creating go.
erlang - damian katz "what sucks about erlang"
prolog - see above (re prolog syntax in erlang)
tcl - eric raymond's comments on tcl and perl vs python
shell - no citation, but i think defensible

in almost every case i would face the mental blockage mentioned if i were
to try to use the language to the right, compared to the one on the left side.

hacker news

i just submitted my first self post to hacker news. it’s been an interesting day watching the response. the comments caused me to realize a lot more about what makes an engaging and defensible post. i will need to include a lot more detail and anticipate reactions to have enough detail to not annoy people.

i got more views today on my blog than i probably have ever combined. i think if i could write one good article a week, i would be happy with that. i have a lot of work to do to come up with decent presentation. today’s post was sort of just a quick thought that i wrote and then thought, hey that might be interesting. however, it would have been helpful if i had filled it out significantly.

so far this has been a pretty decent experience at internet wide peer review.

it was probably a perfect link bait title, if i had had enough substance to go with it, it would probably have sparked a better discussion. as a topic it probably was a troll, although i didn’t realize it at the time. i basically got lots of people upset calling languages ugly, even though i stated that those were the ones i was thinking of using.

i will try to make my next submission a bit more worthy. hopefully i’ll still have some cred after this one. i’d like to get more of my stuff up on github. i really would like to actually be producing cool stuff. now that i’ve gotten people to look at my blog, i’d really like to have some projects worthy of being looked at.


projects website

i’d like to make a project website. i’ve been trying to decide whether to use wordpress or drupal for a general project site. i’m kind of leaning toward drupal just because i’d like to have a chance to get to know it, and i trust it a little more for a personally hosted site than i do wordpress. however, i’m pretty sure that i could convince wordpress to work the way i want it to also.


project languages

i feel like i really want to become expert in one language, to the point that i have something to offer as far as good code or useful projects. i’d actually probably prefer to have useful projects or utilities to just good code. i’m okay with code that is messy but useful.

i’m not sure what the best language to use for creating useful projects is. probably good scripts would be useful projects. some kind of gui tool that did something useful would be cool. i could use tcl for useful gui scripts. otherwise, for sysadmin stuff perl is probably the best bet, although if i wanted to concentrate, tcl could do both.

maybe there’s something where python would be the right language, certainly if i were wanting to deal with ai or data mining type stuff, python has a lot of momentum right now, but i don’t see how those would be easy to turn into tools really.

perl has about the best text processing, tcl is simple and extensible. tcl is also way easier to deploy than any other scripting language. i wonder if i could do the kind of tools i would want in c++ if i just used it as kind of a script style language rather than going all structured. if i just let myself use stl stuff and did things as quick and dirty as i could, i wonder how much i could accomplish and how much code it would end up being. i still think that perl or tcl would probably end up being a lot less code, but c++ would make it easier to produce binaries that could just be downloaded.

i could use go as another compiled language, but i’m not sure i know it well enough to make it useful yet. i wonder how java would work for creating utilities. i’ve written before that i think a lot could be done just using perl and java. i think most application areas and tools could be done pretty successfully with one or the other of those. they wouldn’t work i suppose for intense graphics or hardware interaction, but for any kind of application programming or data processing, or scripting, i think those would cover a lot.

python and c++ also would make a good pair. usually when i mention python and c++ i immediately think of adding haskell, but i wonder if prolog could be substituted. maybe once i get done wih prolog, i’ll have enough experience thinking in terms of lists and stuff that haskell will be more approachable.

neither python nor c++ has very good text processing abilities, so i always end up feeling a little constrained when i think of concentrating on c++ and python and the languages of choice. however, i feel also feel limited by other languages in other ways, maybe by fear of complexity.

i wonder if i concentrated on perl and java if that would be sufficient in my life to do the kinds of projects that i want. i could run clojure on top of the jvm to leverage java libraries. between perl and java there is no application problem that couldn’t be solved. however, i’d feel like i needed to be oriented toward enterprise, and i don’t really want to have that as my emphasis.

so scripting languages are where i feel most comfortable, in that arena the options are perl, ruby, python, tcl, php, javascript, lua. of those, i feel most competent at javascript, perl, php, and tcl. i also like lua, but i basically have no experience in it.

i wish i actually knew enough c++ to do real stuff with it. but i don’t know reasonably how to get that experience without expending a lot of time, and i don’t know that i’m willing to put forth that kind of effort.

is there a valid case for perl, java, tcl, and php? is there too much duplication there? java seems to be trying to become c# with its extra complexity, but doing a bad job of it.


thinking and language constraints

today, talking with a friend about how our brains (his and mine) work non-linearly might actually explain why i feel constrained by more structured languages. i basically think in graphs, and it’s easier to get everything out in graph form first and then collect things into linear form after the fact.

so the fact that python is essentially in outline form, means that mentally it is crosswise to the way that my brain initially works. i wonder if there are languages that would more closely match the way my brain works.

i’m not sure if the less structured seeming languages actually are less structured, but for some reason they feel less constraining.

reasons i feel constrained:

  • needing to install heavy environments to start
  • language oriented structure
  • worry about not being able to handle increasing complexity

those last two are basically opposite sides of the same coin, and i don’t know a way to not end up with one or the other. maybe clojure has the flexibility and capability to handle complexity to meet both of those. i’m not sure why i don’t feel like tcl can handle programming in the large. maybe it is that i don’t think i can handle programming in the large using tcl, not that a more competent programmer couldn’t.

Standard

2012-12-20

title: Languages | Esoteric

  • Erlang
  • Haskell
  • Common Lisp
  • Scheme
  • Forth
  • Factor
  • Ocaml
  • F#
  • SML

Languages | Mind Bending

  • Erlang
  • Scheme
  • Forth
  • Awk
  • Smalltalk
  • Tcl
  • Prolog

Languages | Practical

  • C
  • C++
  • Python
  • Ruby
  • Perl
  • PHP
  • Java
  • C#
  • VB

Languages | Practical Esoteric

  • Clojure
  • Scala
  • F#
  • Lua
  • Tcl
  • D
  • Go

Tools | List

Describe what these do:

  • GPG

  • Emacs Nav – mode for emacs navigation

  • Figlet

  • Htop – top with graphical (console) display of resource utilization

  • Cmatrix – matrix style screensaver (for the console?)

  • mc / vifm – Norton Commander style file browsers

  • tmux/screen/dvtm – terminal multiplexing


Lua | Interesting Packages

  • Ltcltk
  • Metalua
  • IUP
  • Penlight
  • Lua/apr
  • Wxlua

Syllabus | Computers

books

  • The Unix Programing Environment
  • RUTE: Rute User Tutorial Exposition
  • Linux Cookbook
  • Wicked Cool Shell Scripts

languages

  • Perl
  • Java
  • C
  • Javascript
  • HTML/CSS
  • Sql

editors

  • Ed
  • Vi
  • Eclipse

Regular Expressions

Concurrency


Lua | Ideas

Book – Using Lua

Book – Learn Lua the Hard Way

Lua Blog – Moonlight Sonata

Lua window manager


Syllabus | Life Skills

Things to teach

  • History
  • Government
  • Math
  • Science

Practical Life Skills

  • Cooking
  • Laundry
  • Hygiene

Trades

  • Carpentry
  • Pool cleaning
  • Mechanic
  • Plumbing
  • Electrician
  • Photography

Literacy

  • computers
  • reading
  • greek (biblical)
  • math
  • musical
  • staff notation
  • listening
  • chords
  • tablature

Literacy for languages of interest

Useful languages

  • Spanish
  • Japanese
  • Chinese
  • Russian
  • Arabic

Research languages

  • Greek
  • Hebrew
  • Latin
  • French
  • German

Mechanical literacy

  • cars
  • electronics
  • electricity
  • carpentry?
  • plumbing

Tools for reasoning

  • Computers
  • Logic
  • Digital Logic
  • Decision making
  • Analysis
  • weighting factors
  • pro / con analysis
  • analyzing sources of emotions

scheme study

scheme books:

  • simply scheme
  • little schemer
  • seasoned schemer
  • reasoned schemer
  • structure and interpretation of computer programs (sicp)
  • essentials of programming languages
  • lisp in small pieces

wordpress import notes

first i used the wordpress posterous importer to import old posts from my older posterous blog. then to import from my blog based on static flat files, first i used markdown to convert markdown text files to html, and then i used blogpost.py to post html files to wordpress blog as posts. blogpost.py worked well with no issues.

markdown plus blogpost.py gives a reasonable way to write using markdown and be able to get it into wordpress for publishing.

given that there are a number of other convenient methods to get posts into wordpress that don’t specifically support markdown, i don’t know how much i’ll really be using it, but it’s nice to know it’s an option.


wordpress for note taking

i’m starting to think about using wordpress as my note collection system.

you can post by email. there are mobile client apps, and there is the "press this" bookmarklet. there is even the command line blogpost.py client. so from pretty much any environment there is a way to get info into wordpress.

since you can keep posts in draft status or private, where they are not published, it can serve as an information repository regardless of how polished it is. then, once it is actually ready for other people to see, it can be published. or, if it is only relevant to yourself, it can stay in draft or private status.


prolog interpreter implementation languages

possible languages to use for implementing a prolog interpreter:

  • c++
  • forth
  • lisp
  • java

after i wrote this list, i’ve also seen scala and c mentioned as the implementation languages of some interpreters that already exist.


tools i’m happy using

tools that mostly don’t frustrate me:

  • innosetup
  • tcl/tk
  • javascript / html / css
  • go
  • c
  • php
  • c++

logo language study

logo books (by brian harvey) online:

  1. symbolic computing
  2. advanced techniques
  3. beyond programming
Standard

2012-12-19

first real post on wordpress

this is my first real post on wordpress.com

i’m messing around right now to see how much work it would be to get something close to my old site’s color scheme,without having to go all the way to using the "custom css" package.

Standard

2012-12-18

playing with microemacs

i’ve been playing with the jasspa microemacs editor the past day or so. i think if there weren’t a few things that vim did better in a cross-platform way (mainly printing – especially on windows), i’d be intrigued enough to try switching to it. i have used (gnu) emacs a fair amount in the past, but since i deal with alot of computer instances and virtualbox vms (mostly windows rather than unix), trying to get emacs set up on new boxes fairly often is a pain.

this has caused me to again try to wrangle vim into being a good editor for text creation instead of just text editing. i think that setting whichwrap to allow the arrowkeys to cross lines might be enough to prevent the cognitive dissonance of me having to hit a separate key when i just want to go to a previous line.

playing with vim

i’ve been making modifications to my .vimrc file today to experiment with stuff.

some of the things that i’ve added that i like are:

  • set selectmode+=mouse
  • set ww+=<,>,[,] – makes arrow keys go back and forth across end of lines.

one thing i’m still trying to decide if i like is:

startinsert – starts you in insert mode but doesn’t make systemic changes like "set insertmode" does

startinsert in vim

basically this command simply starts you in insert mode instead of normal mode.

i’m trying to figure out if i like it better. it’s really a question of whether you are optimizing for editing, or text creation. i’m pretty sure that for editing tasks, it’s easier to simply start where you can use the navigation keys off the bat.

however, i’ve been trying to see what i can do to adjust vim so that it feel more like an editor i’d actually want to use for writing text in. specifically unstructured prose i suppose, since i think it already works well for structured text like programming.

i think that it may make sense to use startinsert if i can train my hands not to expect to immediately navigate using hjkl the moment that the file opens.

vim indent file

here is the command to fix the formatting of a whole file:

g=gg

or possibly(?):

gg=g
Standard

2012-12-17

considering wordpress

i’ve been considering moving to using wordpress as my blog platform.

there are some things i would like to do as far as the website functionality that i just don’t see myself adding to my static site generator.

i want

  • a section for permanent essays.
  • links to my other blog attempts
  • rss / atom feed would be nice.
  • comment system
  • links to project download area(s)
  • posting via email would be nice.
  • data export capability.

wordpress alternatives

i’ve been looking at the alternatives to wordpress.com today. in the realm of hosted blogging platforms there are the following:

  • blogspot (blogger)
  • posterous
  • tumblr
  • wordpress.com

as far as self hosted possibilities:

  • drupal
  • jekyll / octopress
  • wordpress
  • stacyapp

probably self-hosted wordpress gives me the most options as far as the capabilities i want, but i don’t want to deal with the hassle of running my own wordpress install right now.

i’m trying to figure out if wordpress.com is a reasonable place to start with the idea of moving to self hosted wordpress when i want to, or whether the limitations of the wordpress.com platform will make me more frustrated than i want to deal with.

Standard

2012-12-10

python again?

i’ve been talking to a friend about using python instead of ruby for web dev / general development.

i know python a lot better than i know ruby. i’ll just have to deal with the frustration i’ve had over the python 2 vs 3 split.

i’m thinking about rewriting the utilities i’ve got running in ruby / sinatra in python using either bottle or cherrypy. i think they’d be a fairly straight translation from sinatra to bottle, but i’m actually more familiar with cherrypy since i’ve written stuff using it a few times in the past.

r language?

i’m also considering trying to learn r.

currently i’m wondering if knowing r and prolog would let me investigate both logical and statistical methods of ai / machine learning.

other utilities that seem worth developing a capability in are graphviz and gnuplot.

bottle on cherrypy

i think what i will probably do for the sinatra to python translations is translate them to the bottle framework and then run that on the cherrypy wsgi server.

Standard