I recently switched from working in Python to working in Ruby. The behavior of Ruby’s keyword arguments gave me a shock. You have to explicitly decide between positional and keyword arguments for methods in Ruby. With a method with keyword arguments, Ruby won’t interpret your parameters as positional if you don’t supply the parameter name. It will instead throw an argument error.

For example, in Python (examples from Stackoverflow):

def fn(a, b, c = 1):
    return a * b + c

print fn(1, 2)                # returns 3, positional and default.
print fn(1, 2, 3)             # returns 5, positional.
print fn(c = 5, b = 2, a = 2) # returns 9, named.
print fn(b = 2, a = 2)        # returns 5, named and default.
print fn(5, c = 2, b = 1)     # returns 7, positional and named.
print fn(8, b = 0)            # returns 1, positional, named and default.

In Ruby, for method with positional arguments:

def fn(a, b, c = 1)
    a * b + c
end

puts fn(1, 2)                # returns 3
puts fn(1, 2, 3)             # returns 5
puts fn(c: 5, b: 2, a: 2)    # ArgumentError, Wrong Number of Arguments
puts fn(b: 2, a: 2)          # ArgumentError, Wrong Number of Arguments
puts fn(5, c: 2, b: 1)       # ArgumentError, Wrong Number of Arguments
puts fn(8, b: 0)             # ArgumentError, Wrong Number of Arguments

For methods with keyword arguments:

def fn(a:, b:, c: 1)
    a * b + c
end

puts fn(1, 2)                # ArgumentError, Missing keywords
puts fn(1, 2, 3)             # ArgumentError, Missing keywords
puts fn(c: 5, b: 2, a: 2)    # returns 9
puts fn(b: 2, a: 2)          # returns 5
puts fn(5, c: 2, b: 1)       # ArgumentError, Missing keywords
puts fn(8, b: 0)             # ArgumentError, Missing keywords

Here’s a neat article on Ruby 2 arguments from thoughtbot.

Here’s a short FAQ on parameters vs arguments from Python 3.

Juliacon

So I went to Juliacon the past two days.

It was neat to see a lot of presenters use Jupyter notebooks to present. I’ll keep that in mind if I’m presenting at another conference.

There were talks on neat projects like Biojulia where they use Ragel to create parsers for FASTA files. There were also really funny moments like when a genetic algorithm walker spun its foot instead of walking. (I’ll try to find the gif later).

Unfortunately, some of the talks were styled for “academic” conferences, such that they are very technical but don’t provide a lot of context. As someone not in their domain, I had a rough time extracting the importance without getting lost in the minutia.

Overall, Julia seems to be embraced by a diverse scientific community. I’m excited to see what it becomes.

Here’s my approach for how to turn 2D images into 3D models.

There are web apps that will do this for you, but my approach gives you a lot more control and may produce higher quality models.

Also, it only uses free and open source software. :D

Requirements:

Steps:

First we start with an image. I have here the logo of Julia, obtained from Wikipedia.

Julia logo

Open the image in Inkscape

Inkscape

Select the image and navigate to Path > Trace Bitmap

Trace Bitmap

Adjust the Trace Bitmap settings. Trace Bitmap will turn your image into a vector. Update will show what the final output will look like. Hit OK to confirm changes.

settings

Save the newly traced image as an SVG file.

Julia vectorized

Open Blender. Import the SVG using File > Import.

Import

Your SVG will imported as a very small Curve object, so you’ll need to zoom in to see it.

Imported SVG

Navigate to the Curve settings.

Curve

Adjust Extrude to be 0.005 to make the object 3D.

Extrude

Tada! A 3D object!

Julia 3D

Changing the object color to white might help you see it better.

Julia white

With this 3D object, you can save it in a popular 3D format or do more manipulations on it.

This method is pretty straightforward and allows you to adjust a lot of individual parameters, like bitmap tracing.

Hope it helps!