Entries from February 2009 ↓

QuickSynergy 0.9.0 released

Yesterday I released version 0.9.0 of QuickSynergy for Linux. Here are some screenshots:

QuickSynergy 0.9.0 Screenshot

Share mode

QuickSynergy 0.9.0 Use mode

Use mode

QuickSynergy 0.9.0 Settings

Settings

QuickSynergy is a graphical user interface for Synergy developed by me and Otávio Cordeiro, which aims to ease the task of setting up Synergy on Linux and Mac OS X systems, for which there are no official GUIs. Synergy is an application that allows you to share a single mouse and keyboard between two or more computers across a TCP/IP network. It is much like a “software KVM switch“, but without the V in KVM.

Release notes for version 0.9.0:

  • Allow setting client name in Use mode.
  • Configurable path to synergy binaries.
  • New configuration file format (key-value).
  • New Share mode image in main window.
  • Minimum required GTK version now 2.10.
  • Bug fixes.

Fractals in Logo

Today I was reading a blog post about Logo and I decided to play a little with UCBLogo (Berkeley Logo) and try to draw some fractal (more specifically, L-Systems) with it.

Here is a Koch Curve:

Koch Curve

The code:

to M n
  ifelse notequal? :n 0 [
    M :n - 1
    lt 90
    M :n - 1
    rt 90
    M :n - 1
    rt 90
    M :n - 1
    lt 90
    M :n - 1
  ] [
    fd 10
  ]
end

cs
pu
lt 90
fd 150
rt 180
pd
M 3

And here is a Fractal Plant:

Fractal Plant

The code:

make "stackpos []
make "stackhead []

to store
  push "stackpos pos
  push "stackhead heading
end

to restore
  pu
  setpos pop "stackpos
  setheading pop "stackhead
  pd
end

to F n l
  ifelse notequal? :n 0 [
    F :n - 1 :l
    F :n - 1 :l
  ] [
    fd :l
  ]
end

to X n l
  if notequal? :n 0 [
    F :n :l
    lt 25
    store
    store
    X :n - 1 :l
    restore
    rt 25
    X :n - 1 :l
    restore
    rt 25
    F :n :l
    store
    rt 25
    F :n :l
    X :n - 1 :l
    restore
    lt 25
    X :n - 1 :l
  ]
end

setbackground 2
setpencolor 0

cs
pu
bk 50
lt 90
fd 150
rt 90
pd
rt 45
X 5 2

The code could be a lot better, but that’s what I was able to grasp in about 3 hours. The last time I had really used logo was in primary school, when I was 8 or 9-years old.

I don’t know if it’s a problem with my Fractal Plant function code or if it’s a bug in UCBLogo, but sometimes execution froze completely and I had to hit Alt+S to stop it and call the function again until it worked. I also don’t know if that’s a limitation of UCBLogo or if I just haven’t studied it enough, but I couldn’t find out a way to unset a variable or redefine a function.

Anyways, Logo is absolutely fun to play with. As the author of the previously mentioned post said, it is kind of addicting to think of a set of steps and order the turtle to repeat them a few hundreds of times to see what happens. I consider the language itself a bit confusing at first, but I guess I should read more about it before forming any strong opinions on it.