Embeddable Common Lisp for cross platform code?

I’ve been reading through comment threads learning about other peoples experiences trying to share code between iOS and Android in a cross platform fashion.

It just occured to me that since ECL can compile an image down to a C library, maybe it would work to use it to write cross platform code that was then exposed through the C interface.

I have no idea what the compiled image size would be, so it might not be workable. But maybe at some point I will try to explore the idea a little further.

Standard

Dart Notes 1

Dart Ecosystem – Database Connectivity

I’ve been looking into the Dart ecosystem the past few days as I’ve been getting more into it. One thing that I’ve noticed is that there seems to be a hole in the ecosystem when it comes to SQL database connectivity.

There doesn’t appear to be one well defined package or interface to multiple SQL database backends (ala Perl DBI or the like) – especially if you are interested in sending raw SQL.

There are a number of packages that implement interfaces of some sort to SQLite, and if you are using non-relational databases or Firebase, there seem to be good options, but if you want to write something that might connect to bog standard SQL Server, Oracle, MySQL, or Postgres remotely, there doesn’t seem to be a unified option for that. There are packages for MySQL and Postgres it seems, and there is an old package for ODBC, but it doesn’t look like it’s been updated in 8 years, so I’m not sure how compatible it is at the moment.

This pretty dramatically effects my thoughts of being able to use Dart on the backend with traditional relational databases as a datastore.

Dart Ecosystem – Lex and Yacc

I am having a hard time finding a version of the Lex and Yacc tools in Dart. I have been wanting to go through the book Modern Compiler Implementation in Java, and do the exercises in Dart. But the book mentions using Java versions of the Lex and Yacc tools, and so I’m a little stuck there at the moment.

There are other parsing libraries I’ve found that use combinators and they look pretty cool, and there is also the path of avoiding tooling, and generating the parsers by hand, which some other good books take, so there are other approaches I could take if I am interested in using Dart for exploring interpreters or compilers. But those approaches would not be compatible with that particular book.

Current Thoughts

It appears that at the moment Dart and Flutter are a bit pigeonholed into the Front-End / UI space. I think that Dart has a lot more potential than that, but it needs some help on the package ecosystem front to really be able to address some of the common use cases outside of the UI space.

Standard

Org2Blog: A new method of blogging?

I’ve been trying to figure out what I’m going to do as far as blogging for a long time. My subscription to WordPress.com just renewed which caused me to again begin thinking about options.

So I’ve been looking around and considering ways to be able to have a console / cli oriented blogging workflow.

I considered using wp-cli and something to transform markdown into html. But looking around the Internet I saw Org2Blog and so today I’ve been messing around with it and seeing how well it works.

So far I’m pretty impressed.

I would like to get it to work with MFA which requires me to figure out how to make it and WordPress.com happy with an application specific password. But for the moment I’m pretty happy and org-mode provides the equivalent or a superset of the capabilities of markdown – and I’ve been using org-mode for task management and journaling already so I’m familiar with it. Now I just need to get used to how it ends up translated to HTML.

Standard

Getting started with Flutter

One of my best friends asked what was a good intro to Flutter.

I’m sure there are a lot of good intros, but I’m not familiar enough with the ecosystem to know where everything is yet, so I’m going to do a dump of the things I’ve looked at the past few days to get started.

A good first app tutorial for Flutter is part 1 and part 2. And here is a video walkthrough of the codelab by the person who wrote the original example app.

The learning section on flutter.dev is an incredible resource for information on Flutter.

There is a great codelab on Dart.dev for getting to know Dart, and the overview for Dart is also a great reference when it comes to the details of Dart.

Standard

Trying out Flutter and Dart

I’ve been checking out Flutter – the cross-platform UI toolkit from Google. I’ve been noticing it mentioned over the past year, and since desktop support just stabilized, it looks like it might give me something I’ve wanted for a long time. For most of the time that I’ve been programming, I’ve been interested in options that allow cross-platform development.

Flutter is written in the Dart language also developed by Google.

So for the past few days I’ve been diving pretty deep into Flutter and Dart tutorials.

I’m trying to learn the Dart language. So far it mostly seems like an easier / slightly less verbose Java.

I know that Dart is a pretty niche language, but maybe it’s just my doom / destiny that I will only be drawn to niche languages. It does seem like Dart is pretty close to my sweet spot for what I want in a language at the moment.

One thing I like is that Dart can be compiled to a single file executable.

It looks like when you do that it just bundles a copy of the runtime with it, but I’m used to that from some other languages that I like. It can also be compiled to some kind of package that can be deployed to Android or iOS. In addition, it can be compiled to JavaScript for the web. As a result, Flutter is also deploy-able to all those platforms (iOS, Android, Web, Windows, MacOS, Linux).

I don’t have much more to say right now, but I’m enjoying the thought of working with these more.

Standard

Emacs Typing Tutor

Last night I re-read this Steve Yegge article about learning to type as a programmer. I can touch type, but I don’t usually manage to break 60 WPM. The article made me curious if regular practice could increase my speed any more.

A long time ago I mentioned a hack that would let you use Vim as a sort of typing test.

The original article that post referred to has long vanished into the internet (maybe retrievable by the wayback machine?) and it looks like through some of the migrations of my blog (or changes in versions of Vim through the years) the syntax of that post is no longer producing the behavior that was useful as a typing test.

So I went today looking for something else that could be used as a typing tutor. Since I spend a reasonable amount of time near Emacs these days, I figured that would be a good (and likely) environment to find something. And I did – I found something that I really like. It has essentially the same simplicity of the Vim hack (when it was working) but it offers a little more automation and more variety.

The speed-type package is available on Melpa and it installs in Emacs with basically no configuration via list-packages. It includes samples from Project Gutenberg books, so it also exposes you to new vocabulary – so double win. It can also use sample text you provide if desired.

So far it looks great. I spent a little time (is it wasted, or is it training?) playing with it this morning. I think I’m going to try practicing with it a little each day and see if I can make any progress.

Standard

2021-06-23

Wow, it’s been a few years since my last real attempt at a blog. I’ve just been journaling locally since then.

I’m finally ready to do some blog based writing again. I’m going to have to figure out how I’m going to approach importing or transcribing all of the writing I’ve been doing for the last few years into this blog.

I’ve got to go back through all my Org mode files for the past few years and I also need to collect all my random paper based attempts at writing or journaling and figure out where to go from there.

Standard

2018-04-20

Windows Color command

On Windows (at least Windows 10) you can use the color command at a cmd prompt to change the foreground and background color of the console.

The default color scheme of the cmd console is color 07, but if I want to flip to a black on white I can do:

color F0

Here is the help (found by color /?):

Sets the default console foreground and background colors.

COLOR [attr]

attr Specifies color attribute of console output

Color attributes are specified by TWO hex digits — the first corresponds to the background; the second the foreground. Each digit can be any of the following values:

0 = Black       8 = Gray
1 = Blue        9 = Light Blue
2 = Green       A = Light Green
3 = Aqua        B = Light Aqua
4 = Red         C = Light Red
5 = Purple      D = Light Purple
6 = Yellow      E = Light Yellow
7 = White       F = Bright White

If no argument is given, this command restores the color to what it was when CMD.EXE started. This value either comes from the current console window, the /T command line switch or from the DefaultColor registry value.

The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute the COLOR command with a foreground and background color that are the same.

Example: "COLOR fc" produces light red on bright white

Standard