CyberSpy

Rantings from a guy with way too much free time

Julia Intro

2018-11-07 Programming

Juliaet, Wherefore art thou?

As Yoda once said…

> YAPL - yet another programming language. Learn something new, you must.

Why Learn Julia?

Julia was designed from the beginning for high performance. Julia programs compile to efficient native code for multiple platforms via LLVM. As such, it’s an interesting programming language to take a look at as it’s a serious contender for certain classes of programming problems; most notibly, scientific and data-centric analysis.

Continue reading

Ramnode

2018-11-07 Devops Robert Baruch

Drowning in the Digital Ocean

Not all services are created equal - you get what you pay for.

I got tired of paying Digital Ocean for a crappy service so I decided to hunt around for a no-frills service that give me a basic instance worthy of hosting a simple blog. Enter ramnode.

Ramnode

Ramnode is a basic service that quickly affords the addition of new VPS (virtual private servers) at a whopping $3/month per server. At such a cheap price, I’m giddy to add as many as I can think of!!!

Continue reading

Making some Noise - Teensy, TGA-Pro, and MIDI

2018-05-04 Programming Rob Baruch

Making Some Noise (and maybe even Music)!

In this blog post, I’ll share my experiences using the Teensy and TGA-Pro Guitar Audio Shield to process audio - both using an audio processing codec as well as MIDI. I’ve also included the Yamaha UX16 USB-to-MIDI controller to aid in patching my MIDI channels into the inputs of the Guitar Audio shield.

Teensy - Yet antother cheap USB uController board.

At the hear of this project is the Teensy 3.6 USB Microcontroller development board. This sub-$30 board is a feature-rich micro-controller using the Cortex M4, floating-point unit, digital and analog pins, and lots of communication protocols (USB, i2C, SPI, Serial, Ethernet). What makes this little USB-attached board so useful are the accompanying software elements:

Continue reading

OCaml OpenGL - Get into Gear!

2018-03-13 Programming Rob Baruch

OCaml and OpenGL - Getting our Functional Programming into Gear!

In my blog post for this day, I thought I’d take a look at the OCaml OpenGL library, lablgl. If you’re not already familair with openGL, I strongly suggest that you take a look at one of the tutorials available online. One that I found to be very informative; although written in c++, is opengl-tutorial. Nonetheless, in this post, we’ll look at some simple, and not so simple examples written in OCaml. But before we can do that, we need to install the requisite opam dependencies. To install lablgl, simply:

Continue reading

Riding the Camel Deeper into the Desert of Code: Records and Variants

2018-02-11 Programming Rob Baruch

Extending and Encapsulating Data - Records and Variants

Up next on our tour of OCaml are records and variants. If you are familiar with typedef, struct, and union in c/c++, you’ll quickly come to understand how to use records and variants in OCaml. We’ll start off looking at records, how to define them, use them in functions, and automatically generate common functions from our type definitions. There’s more to the eye than what you get in a language like c, so pay close attention as we move through the descriptions below. We’ll break it down one at a time so you’ll have no problems!

Continue reading

Let's Get Funky with the Camel

2018-02-09 Programming Rob Baruch

How many ways can we get Fun(ky)

In any programming paradigm, it’s critical to understand how we write functions - be they traditional imperative , anonymous , recursive, or functional. In this post, I will break down the different types of functions that you can write in OCaml.

Let’s start by examining the imperative function. Here’s a simple function that prints out the phrase Hello World! $n$ times, once on each line, and returns the value $n$ as its result.

Continue reading

OCaml Hello World and more

2018-02-06 Programming Rob Baruch

Well Hello There!

As tradition has it, every new programming language experience must begin with the basic Hello World. Let’s walk the the basics of how to set up our development environment specifically for OCaml and demonstrate how to compile our basic program.

Warming up our Environment

Of course we could just use our vanilla editor to enter our OCaml programs, but a more efficient work environment leverages an extensible editor that is aware of our programming language. Editors like sublime, Atom, and Visual Studio Code are some of the more popular selections. Vim and Emacs are also options, but the new tools tend to support vi/emacs style editing while offering more extensive and expansive features.

Continue reading
Older posts Newer posts