Main >

Viraptor's dev-log

Your mind-fluffer hopefully

Gtk# animation

on December 16th, 2007

Information for anyone, who is looking for solution to not-refreshing DrawingArea on google and is finding only questions about it :)

You shouldn’t touch DrawingArea from anything else than original gtk/glib thread. That means doing:

drawingArea.QueueDraw();
// or
drawingArea.GdkWindow.ProcessUpdates(...);
// and others

from System.Threading.Timer callback won’t do any good. Window may start updating in the first case after resizing of the window, and update only while resizing in second case, but that’s probably undefined random behaviour. Proper way to handle refreshing (as far as information from different mailing lists put together suggest) is:

uint animationTimer = GLib.Timeout.Add(
	milisecs,
	new GLib.TimeoutHandler(onAnimationTimer));
...
bool onAnimationTimer() {
  drawingArea.QueueDraw();
  return true;
}

Hope that helps if you were trying to achieve animation.

Mono-1.2.4 in feisty

on May 28th, 2007

Repo at www.viraptor.info/repo has been updated with backport of libgdiplus and mono-1.2.4 from gusty.

Enjoy!

Backports repository

on May 20th, 2007

As suggested before, I’ve created an Ubuntu Feisty backport repository for mono stuff. Monodevelop & deps from Gusty is already available. Line for your sources.list is:

deb http://www.viraptor.info/repo feisty-custombackports contrib

Have fun!
I hope that mono 1.2.4 will hit that repo soon also.

C# shell

on December 21st, 2006

C-sharp shell? Great!

Although my friend, when asked whether he would like to have a shell with bindings to Java, replied “System.out.println(”NO”);”… I was playing around with different shells. Zoidberg (perl), psh (perl), zsh (almost normal), etc.

Power shell would be nice, if it didn’t try to export objects into some strange new shell language constructs (cmdlets). If the thing they wanted to achieve was similarity to shell, then normal stripping of “()” and “,”, that can be deduced from context would be enough… Of course making some namespace default for searching objects (Cssh.Something), would be appropriate. “Var” keyword from C# v.3 can also come handy.
I haven’t tried cssh yet, but I can’t wait to do it! Downloading as I write it.

Just downloaded… It’s probably NOT what you’d like to use - it’s just for files, but a good start anyway.

PowerShell port was already proposed, but author doesn’t respond to emails, so project was probably dropped. Still - it’s nice to see, that some people want to get the same things I do…

As most people shout “Yet another shell and object one? NOOOOOOOOOO!!!!!!!” while reading this, I’ll tell what I want in a real linux object shell and why I’d like it to be there:

  1. foreach(i in Interfaces) if(!i.IsAlias) echo Format(”interface {0}: {1}”, i.Name, i.Ip);
  2. echo Partitions[”/dev/hda”].Capacity
  3. echo new Ping(”10.1.1.29″).GetAverage(5)
  4. prcs = Processes.Get(”terminal-name”)
    foreach(prc in prcs) if(!Processes.Current.IsChildOf(prc)) Kill(prc);
  5. Iptables.Add(”Input”, new Iptables.SourceFilter(”127.0.0.1″), Iptables.ACCEPT)
    (even if that doesn’t seem that nice in this case - think about creating one SourceFilter (or some complex ‘pseudo-query’ object) from other sources (network monitoring?) and using it to create rules in real-time.
  6. Autocomplete objects through Reflection with tab button - easy

You know what processes are there - no need to grep ps. You get numbers you want - no need for awk. You know what was the problem, because of exceptions - no need to browse man for return code listings. You want to run commands - there are no problems with quotes in command / quotes in your command line / quotes in file arguments - there are only Strings.

PS1: I only found original post by google alerts - try it out :)
PS2: There was a c# shell - discontinued unfortunately :( But in case it disappears, I’ve got sources… in case…

Mono-1.2.2.1 is out for Ubuntu

on December 14th, 2006

Mono version 1.2.2.1 is already in source repos for feisty, so it’s time to upgrade it in edgy also.

As usual: get mono .deb packages. This time if you want sqlite*.0-cil, you’ll also need new libsqlite itself. It’s provided along with main packages.

For those suspicious - yes - 1.2.2.1 exists officially, but the main www.mono-project.org page is a bit laggy with updates lately. I told that to mono guys yesterday, so there may be some update in a short time.

Dependencies provided: sqlite (with lemon), libgdiplus, cli-common.
Additional stuff: prj2make-sharp.

I’ve noticed some search hits for ubuntu and mono from google, so I’ll probably keep the tradition of posting new debs ASAP (that means as soon as they’re in feisty and if I’m still stuck with edgy).

Mono-1.2.2 is out for Ubuntu + packages

on December 8th, 2006

Hello again!
Mono-1.2.2 is ready for downloading! Making packages for edgy is as easy as always, but anyway - this time instead of deleting .deb’s, I’ve uploaded them for so called “community”.

Go - get it: mono-1.2.2 deb packages for edgy. It includes newest cli-common, mono and libgdiplus from feisty, so you probably don’t need anything else. Have fun.

Post update: what’s the minimal mono toolchain? Hard question - but I’ll just list dependencies of mono-mcs and mono-gmcs. That’s all you need to create console “Hello world”. Even winforms one in 2.0, as there is mono-gmcs -> libmono-microsoft-build -> libmono-winforms dependency. Just get everything else when needed.
For those developing 1.0/1.1:

  • libmono0
  • libmono1.0-cil
  • libmono-corlib1.0-cil
  • libmono-data-tds1.0-cil
  • libmono-peapi1.0-cil
  • libmono-relaxng1.0-cil
  • libmono-security1.0-cil
  • libmono-sharpzip0.84-cil
  • libmono-system1.0-cil
  • libmono-system-data1.0-cil
  • libmono-system-runtime1.0-cil
  • libmono-system-web1.0-cil
  • mono-common
  • mono-gac
  • mono-jit
  • mono-mcs
  • mono-runtime
  • mono

For those developing 2.0:

  • libmono0
  • libmono2.0-cil
  • libmono-accessibility2.0-cil
  • libmono-corlib1.0-cil
  • libmono-corlib2.0-cil
  • libmono-data-tds2.0-cil
  • libmono-microsoft-build2.0-cil
  • libmono-peapi2.0-cil
  • libmono-security2.0-cil
  • libmono-sharpzip2.84-cil
  • libmono-system2.0-cil
  • libmono-system-data2.0-cil
  • libmono-system-web2.0-cil
  • libmono-winforms2.0-cil
  • mono-common
  • mono-gac
  • mono-gmcs
  • mono-jit
  • mono-runtime
  • mono

And general crowd will probably just want to join both lists together. I’ll create “basic-{1|2}” folder with proper links… one day. Maybe on 1.2.3, maybe when I’m bored.

GtkRegexTest

on December 3rd, 2006

New project has just been launched - “GtkRegexTest“. Name is pretty much self-explanatory. It’s a program for editing and testing regular expressions (RE / regex / regexp / whatever). It’s written in C#, developed on mono, but should also work under MS.NET without any problems.

Read the rest of this entry »

Mono-1.2.1 is out for Ubuntu

on December 3rd, 2006

If you’re using Ubuntu, then mono-1.2.1 is available already. How? Easy as 1-2-3 on edgy (and previous probably too). Add:

deb-src http://se.archive.ubuntu.com/ubuntu/ feisty universe multiverse main restricted

to /etc/apt/sources, run:

apt-get update
apt-get build-dep mono
apt-get source mono –build

And install all the .deb-s that were created. That’s all! Really.