Archive

Archive for the ‘Uncategorized’ Category

Hypothetically speaking…

July 19th, 2010 John Van Enk No comments

Hypothetically speaking…

… if you were working on a language which was in many ways similar to (and targets) C but added more expressive types, type inference, and polymorphism, how would you interpret the following line of code?

x = "foo";

The options are:

char x[] = "foo";

or

char * x = "foo";

Thoughts?

Categories: Uncategorized Tags:

Do Yourself a Favor

June 23rd, 2010 John Van Enk 1 comment

Stick this in your .bashrc:

export HISTCONTROL=erasedups
export HISTSIZE=500
export HISTIGNORE=ls:'ls -l':fg

This changes what gets shoved into .bash_history.

  • Erase duplicate entires that have shown up previously.
  • Set the history size to 500
  • Ignore a few specified commands
Categories: Uncategorized Tags:

Thought for Today

January 20th, 2010 John Van Enk No comments

Just one thing:

MERGING IS HARD.

That is all.

Categories: Uncategorized Tags:

More Arduino

January 13th, 2010 John Van Enk 1 comment

I just ordered my own an Arduino Duemilanove! I’ve been borrowing Job’s Arduino up until now (thanks Job). I’ve got some plans for a few more interesting posts using Atom on the Arduino when this thing arrives.

SparkFun Electronics – Arduino USB Board

Categories: Uncategorized Tags:

Moved!

January 6th, 2010 John Van Enk No comments

Hi everyone.

I moved this blog from http://angryhosting.com/ to a VPS hosted with http://linode.com/. I know a bunch of links now target this site, so I’ve done my best to maintain all the old links and files, etc.

If any one notices problems with the old posts (broken links or otherwise), let me know.

Thanks.

Categories: Uncategorized Tags:

HsOpenSSL Update

June 27th, 2009 John Van Enk 1 comment

The maintainer of HsOpenSSL accepted a patch Job Vranish and I put together that moves to a simple build type rather than the configure step. This has the nice side effect that, with the right libraries installed, we can get HsOpenSSL to install happily in windows without the need for Cygwin to build it.

Here’s how:

  1. First, we need to install the OpenSSL binaries and header files. The Windows build of OpenSSL depends on the Visual C++ 2008 Redistributables. Download and install them.
  2. Next we need the Win32 OpenSSL v0.9.8k package. Download and install this.
  3. Open cmd.exe to run a few commands.
  4. Now that OpenSSL is installed, lets perform a cabal update to make sure we have the most recent package.
  5. If you used the default installation options, you can call the following command to install HsOpenSSL:
    cabal install --reinstall HsOpenSSL --extra-include-dirs=C:\OpenSSL\include --extra-lib-dirs=C:\OpenSSL\lib\MinGW

    Note that I included --reinstall just to make sure we don’t terminate prematurely because of an older version.

Everything should be installed now. Lets test it. Save this into a file somewhere:

module Main where
 
import OpenSSL.RSA
 
main :: IO ()
main = do
    key <- generateRSAKey' 2048 65537
 
    print key

And lets build it…

ghc --make test.hs

…and run it…

>test.exe
RSAKeyPair {rsaN = [ZOMG BIG NUMBER], rsaE = 65537, rsaD = [ZOMG ANOTHER ONE], rsaP = [THIS ONE WASN'T AS LARGE], rsaQ = [SAME HERE, BUT STILL PRETTY HUGE] }

If you got some output that wasn’t an error from test.exe, you’ve successfully installed HsOpenSSL in Windows.

Hope this helps someone!

Categories: Uncategorized Tags:

My TODO List

February 22nd, 2009 John Van Enk 1 comment

I’m making this public so that I will be hounded if fail to complete these tasks or find some one to do these for me (hint hint):

  • Write a Haskel FFI interface for libdnet.
  • Write a Haskell FFI inteface for libgcrypt.
  • Finish a GUI for Scurry.
  • Start working on my portaudio FFI interface again.

There, I said it, and now it’s public. Some one hold me to this please!

Categories: Uncategorized Tags: , , ,

Happy… UNIX TIME DATE THINGY DAY!

February 13th, 2009 John Van Enk 1 comment

$ while true; do date +%s; sleep 1; done
1234567883
1234567884
1234567885
1234567886
1234567887
1234567888
1234567889
1234567890

Categories: Uncategorized Tags: ,