Archive for March, 2008
Creating a Binary File Using a Ruby DSL
So I used ruby to convert a simple hex string into a binary file in Converting hex to Binary in 4 Languages. Today I was trying to create a mixed ascii/binary file at work and created a little Domain Specific Language that has good possibilities.
NOTE: There is an expanded version of this script here: A Better Binary File Generator DSL in Ruby
Read more
Why C Switch Statements Should go the way of the GOTO
The venerable C switch statement keeps showing up in other languages presumably because the people who write new languages are familiar with C and don’t really think about it.
Read more
PI Day!
This isn’t strictly computer engineering, but at least it is math. Today, 3/14, is PI Day!. Enjoy.
No commentsEmbedding Rhino Part I: Parsing Command Line Arguments in JavaScript
Rhino is a JavaScript/ECMAscript implementation in Java. Using the new java1.6 scripting API you can now easily embed JavaScript into your Java applications. I thought I’d try writing yet another implementation of the net_tool application using Rhino. Originally this was going to be a single article, but it turns out to be a two-fer.
Read more
Converting hex to Binary in Java Too
So apparently the hex to binary in 4 languages portion of this web page is what gets the most google hits and who am I to argue? So without further ado, hex to binary in Java as well…
No comments