Could not load FFI Provider: (NotImplementedError) FFI not available
Category: Uncategorized
Groovy equivalent of Nuget : Grape
Here is this documentation for the Groovy equivalent to Nuget.
This is a small sample:
@Grab(group=‘org.springframework’, module=‘spring-orm’, version=‘3.2.5.RELEASE’) import org.springframework.jdbc.core.JdbcTemplate
Grape does not seem to go as far as Nuget’s allowing upgrades, but it does do the configuration in the source code.
Expanding into Groovy
I have spent the last few years working in the .Net ecosystem.
This has generally involved working in C#, PoweShell, Nuget and Chocolatey.
I am now exploring the JVM world.
In order to get the RatPack library installed (which is the Groovy version of Ruby’s Sinatra or the .Net clone Nancy) I have needed to install the JRE, Gradle and Groovy.
Getting Java installed on a corporate dev machine was a little tricky.
The installer was placing files in a folder that I don’t have execute permissions on.
The specific error message that I was getting led to a link that suggested downloading a java based tool to fix. There is a hole in my bucket…
Copying the deployed installer to another location eventually worked.
Several of the Groovy libraries suggest using gvm to install things so I have opted to use posh-gvm:
(new-object Net.WebClient).DownloadString(‘https://raw.githubusercontent.com/flofreud/posh-gvm/master/GetPoshGvm.ps1’) | iex
gvm appears to be the equivalent of chocolatey for the Groovy world.
gradle is the equivalent of msbuild or more specifically Psake.
I now have a list of projects to investigate:
- asciidoctorj – port of the ruby asciidoctor tool to convert structured text to html
- crash – looks like a powershell console equivalent for the jvm
- gaiden – creates html from markdown
- glide – another generation toolkit, could not get demo to work
- gradle – build tool
- grails – web toolkit can’t get to install yet
- griffon – looks like a wpf equivalent for groovy
- groovy – Java based programming language without all the ceremony of java
- groovyserv – speeds up groovy app startup
- jbake – static site generator
- lazybones – a scaffolder for ratpack (t4 scaffolder equivalent)
- springboot – application framework template
- vertx – nonblocking application platform.
Keeping a top 20 in azure table storage
Azure Table Storage is a cheap, fast and easy to use data storage system.
It does have it’s limitations.
All data has two keys partition key and row key which need to be unique in combination.
The best way to guarantee the return of say the latest 20 entries is to use DateTime.MaxTicks – DateTime.Now.Utc (in a 19 digit left padded with zeros format) as the row key.
This means that reading the data you can just fetch the items by partition key with a limit on how many rows to return.
The difficulty will come in keeping the data from filling up the storage account if you never clean up.
I would suggest that when the data is read back if you get the maximum number of items that you queried then perform a second query to return 100 rows older than the oldest row that you have just fetched and delete them in a single async batch. This is the optimum delete size (as 100 is the max batch size for azure table storage).
Groovy and Powershell
I have started looking at the language Groovy.
Groovy starts with java as a base language. It is backwards compatible to Java and compiles to the same jvm instructions.
It takes some different design decisions to it’s parent language. Everything is public by default, supports operator overloading, and has thrown away much of Java’s verbosity.
Oddly enough it looks like a parallel between Powershell and C#.
Now Powershell is not a compiled language, but can run C# inline.
Groovy’s scripting shell is very restricted as to be for simple experimentation only.
Both languages have identical tricks when it comes to closures, parameter, and advanced string handling GStrings in groovy have an almost identical syntax to the Powershell equivalent.
This also means that both languages are good at hosting DSL’s since they both support the fundamental pieces needed to do this (minimal ceremony syntax and closures).
Latest Azure Guest OS
| Family | IsDefault | Version |
|---|---|---|
| 3 | False | WA-GUEST-OS-3.21_201411-01 |
| 3 | False | WA-GUEST-OS-3.22_201412-01 |
| 3 | True | WA-GUEST-OS-3.23_201501-01 |
| 4 | False | WA-GUEST-OS-4.14_201411-01 |
| 4 | False | WA-GUEST-OS-4.15_201412-01 |
| 4 | True | WA-GUEST-OS-4.16_201501-01 |
Here is the latest guest os details.
How to get a greasemonkey/tampermonkey script to run on ajax.
Getting Boot2docker working on windows 7
I have been experimenting with docker on windows.
I started with using chocolatey to install boot2docker.
Currently docker requires ssh on windows (boot2docker ssh)
The advice on the following page got me past the following error:
Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
The problem was the ports being used by virtualbox. I reinstalled and set up the port forwarding and everything now works.
Migrating Azure 2.2 to Azure 2.3 emulator
This is an article on how to migrate the azure emulator from v2.2 to v2.3
Note that the emulator has changed again by the time you get to v2.5.
Given that the emulator is a poor copy of what really happens in azure I would recommend designing you apps to work locally standalone yet use services in the cloud (with abstracted local versions if required).
Latest Azure Guest OS Updates
At last we have the December Update and it is now the 16th January.
| Family
|
Version
|
Is Default
|
|---|---|---|
| 3 | WA-GUEST-OS-3.20_201410-01 | False |
| 3 | WA-GUEST-OS-3.21_201411-01 | False |
| 3 | WA-GUEST-OS-3.22_201412-01 | True |
| 4 | WA-GUEST-OS-4.13_201410-01 | False |
| 4 | WA-GUEST-OS-4.14_201411-01 | False |
| 4 | WA-GUEST-OS-4.15_201412-01 | True |
Please can we have a little more frequency in updates.
This http://msdn.microsoft.com/en-us/library/azure/ee924680.aspx gives some updates.