Forum comments in chronological order

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Jun 2009

The TTY demystified

Anonymous
Tue 2-Jun-2009 19:27
very good article!

Craft

Anonymous
Wed 3-Jun-2009 05:04
Awesome.
Just awesome.
I don't have any other words.
Anonymous
Sat 6-Jun-2009 19:08
Wow!
I am really impressed!
Need to learn some assembler, i think....

A case against syntax highlighting

Anonymous
Sat 6-Jun-2009 22:23
I don't blame you for hating the colors that you've shown here. They're a hideous rainbow of confusion.

Maybe you wouldn't be arguing against syntax highlighting if you'd just try a simpler color scheme. An advanced editor like Visual Studio will actually help you understand what you're looking at...for instance take this random piece of code:

x = Thinger.Convert(y);

Is Thinger a class with a static Convert function? Or is it a property member of the class that this code lives in? With Visual Studio you will know because if it's a class it'll be Aqua colored and if it's a property that returns a class object, it'll just be black (by the default color scheme).

Well, with a name like Linus on a guy from Sweden, I wouldn't be surprised if you are a *nix guy who hasn't used Visual Studio much though.

Uahh, sorry but as a serious programmer you *should* not rely on syntax highlighting to distinguish between a static function and a property. You always have to know what you are using or calling otherwise you're doomed to produce errors sooner or later. Also any serious programming language should avoid such misunderstandings as much as possible thus making highlighting mostly obsolete.

For identation I think it is a complete other story. I think identation serves more the purpose of paragraphs, making longer texts better readable as long as identation do not reach ridiculous levels.

Craft

Enleth
Mon 8-Jun-2009 20:53
Hello,

first, I must say that I'm really in awe, and that reading the craft source code was possibly the most educational AVR experience I've ever had.

However, I've got a problem with getting my own copy to work - basically, the video is there, perfectly stable and all correct, but there's no sound. I've already octuple-checked (is that even a word?) all the connections, resistor values, polarity of the capacitor and so on, and still I've got no clue as to why wouldn't it work. There's a silent "knock" in the speakers when the microcontroller kicks in after reset, some interference from the video signal can be heard (the sound fluctuates with the "waves" in the opening screen and changes completely witch each screen), but absolutely no signs of music - and, most importantly, the "analyzer" screen (the one with a 3D cube and Manderbolt) indeed shows the vertical stripes completely motionless (save for the moment when they slide off to make more space for the cube).

I'm using a new ATmega88, with the fuses programmed correctly (well, the video wouldn't be there otherwise), and the circuit was built on a breadboard.

Any hints?
Anonymous
Tue 9-Jun-2009 21:43

Enleth wrote:

Hello,

first, I must say that I'm really in awe, and that reading the craft source code was possibly the most educational AVR experience I've ever had.

However, I've got a problem with getting my own copy to work - basically, the video is there, perfectly stable and all correct, but there's no sound. I've already octuple-checked (is that even a word?) all the connections, resistor values, polarity of the capacitor and so on, and still I've got no clue as to why wouldn't it work. There's a silent "knock" in the speakers when the microcontroller kicks in after reset, some interference from the video signal can be heard (the sound fluctuates with the "waves" in the opening screen and changes completely witch each screen), but absolutely no signs of music - and, most importantly, the "analyzer" screen (the one with a 3D cube and Manderbolt) indeed shows the vertical stripes completely motionless (save for the moment when they slide off to make more space for the cube).

I'm using a new ATmega88, with the fuses programmed correctly (well, the video wouldn't be there otherwise), and the circuit was built on a breadboard.

Any hints?

Hi

I have also rebuilt craft, and it works perfectly for me. I think you forgot to program the eeprom from eeprom.raw. I tried uploading flash.hex only, and i got the same behaviour you described.

Try downloading both flash.hex and eeprom.raw to the avr, and it should work. I'm using AVRDude from the command line, and i noticed i have to upload both files at the same time. If you are using AVRISP mkii with avrdude, try something like

<code>
avrdude -c avrispmkII -P usb -p m88 -e -U flash:w:test.hex -U eeprom:w:eeprom.raw
</code>

I'm not sure the command above is 100% correct, but i think it works.

Good luck!

The chimney claw project

Anonymous
Thu 11-Jun-2009 12:46
Next time you can put a cheap video camera (spy cam type) in the center of the claw, so you can see how to operate to gram the largest amount of rubbish :D

of course, power and video signal cable, would be linked to you main control cable ;)

Cheers,

Federico Allegretti (allegfede@gmail.com)

(off topic thread #4)

Anonymous
Thu 11-Jun-2009 23:48
vette shit weetjewel houwe zo! dooeiii

Craft

Enleth
Fri 12-Jun-2009 16:58
I think you forgot to program the eeprom from eeprom.raw. I tried uploading flash.hex only, and i got the same behaviour you described.

You got it right there - thanks. As always, the problem is both in the most obvious and the most obscure place at the same time.

Now, it works perfectly.

The TTY demystified

Anonymous
Mon 15-Jun-2009 16:10
Holy Smokes dude, those were the days!

Riff
www.absolute-anonymity.us.tc
Anonymous
Mon 15-Jun-2009 19:59
I rarely comment on Blogs as I usually feel my input would not be necessary, but I must say this has been one of the best written and descriptive documents I have had the pleasure of learning from
Anonymous
Mon 15-Jun-2009 22:41
ZZZZZZZZZZZZZZZZZZZZZZZZZZ to long, jesus christ write up a summery for us lazy people
Anonymous
Tue 16-Jun-2009 00:22
I've been looking for an article like this for a very long time... thanks very much for putting this together!
Anonymous
Tue 16-Jun-2009 02:38
Great summary, and very useful. Thanks!
Anonymous
Tue 16-Jun-2009 06:57
Just freaking great!

script to make commands like less (more) adapt to changed screen size.
It even tries to exit from the command leaving the cursor on the "correct" place.
The kludge should work well with anything, that ought to be updated because of
a change in terminal window size.

CAVEATS
It's written for Unix under Mac OsX, doesn't really know if tput are implemented under Linux.

Well here we go. I'm sorry for the loss of tabs, it should have been indented.
I have used this for a year and a half and it really works.

#! /bin/bash
export LESS=" -I -r -f -J -S -g -M -x 4"
# -I ignore case when searching
# -r "raw" do not preparate ctrl-chars,
# -f force open special files (may be binary) BEWARE OF ANSISEQUENCES.
# -J show status column
# -S chop long lines.
# -g highlight on last hit in the search.
# -M Most Verbose status column...
# -x 4 tabspacing = 4
# -------------------------------------- the kludge starts here.................
ORIGLINES=$LINES

ESC=`printf "\e"`
ScreenRedraw_off=`echo -n "$ESC""[8m"`
ScreenRedraw_on=`echo -n "$ESC""[0m"`

function OkayScreen()
{
export PS1="" # Turns off the prompt to avoid cluttering..
echo -n ${ScreenRedraw_off}
CURLINES=`bash -i < ~/bin/kludge.bash `
# ^^^^^^^^^^^ NB! the path where kludge.bash should be placed.
if [ $CURLINES -gt $ORIGLINES ] ; then
TO_SKIP="$(expr "$CURLINES" '-' "$ORIGLINES")"
if [ $TO_SKIP -lt 3 ] ; then
TO_SKIP="$(expr "$TO_SKIP" '-' '2')"
else
TO_SKIP="$(expr "$TO_SKIP" '-' '1')"
fi
tput cuu 1 #cursor up one line
echo -n ${ScreenRedraw_on}
echo -n "\$" #restores prompt
echo -n ${ScreenRedraw_off}
tput cud $TO_SKIP
echo -n ${ScreenRedraw_on}
echo # activate cli correct position.
else
tput cuu 2
echo ${ScreenRedraw_on}
fi
}
trap OkayScreen SIGWINCH
# if [ -t 0 ] ; then # /* this enables syntax highlighting */
# $VIMRUNTIME/macros/less.sh $@ /* After tinkering with vim */
# else
/usr/bin/less $@
# fi
trap '' SIGWINCH
# cp ./tmp/.vimrc~
Anonymous
Tue 16-Jun-2009 07:05
Just freaking great!

Forgot the innerpart, which makes it all work ....
This is a second script called kludge.bash which I have in my ~/bin folder.
Needs to execute this to get the changed winsize in a new process since at
least bash 2.05a didn't update the LINE variable in active process in the terminal window.



#! /bin/bash
# ### SYS Finds the number of lines in a window after window rechange - less... !#
# kludge.scr - to be placed in the ~/bin folder is the inner workings of the bash script named less
PS1=""
shopt -s checkwinsize
echo $LINES
Anonymous
Tue 16-Jun-2009 23:58
Thanks for the great article!

I'd recommend adding some info about the *wide* spread myth of parent's death triggering SIGHUPs for all its children.

Recall that the related behavior only applies to session leaders, and is triggered in any of the two following cases:

#1:
IF session leader exiting
..IF it has ctty
....send SIGHUP to foreground PG
..ELSE
....send SIGHUP to foreground PG at last time it had ctty

#2:
IF session leader detaching (TIOCNOTTY)
..send SIGHUP to foreground PG

--JuanJo
Anonymous
Wed 17-Jun-2009 10:42
Actually, to be more precise:
#1:
IF session leader exiting
..IF it has ctty
....send SIGHUP to foreground PG
..ELSE
....send SIGHUP,SIGCONT to foreground PG at last time it had ctty

#2:
IF session leader detaching (TIOCNOTTY)
..send SIGHUP,SIGCONT to foreground PG


See: http://google.com/codesearch/p?hl=en&sa=N&cd=2&ct=rc#p4tPAkVsQ_c/linux-2.2.26/drivers/char/tty_io.c&l=537"

--JuanJo AKA jjo
lft
Linus Åkesson
Sun 21-Jun-2009 12:58
A reader pointed out that VT (in VT-100) stands for "video terminal", not "virtual terminal". This has been fixed.

Turbulence

Anonymous
Sun 21-Jun-2009 13:12
There is a german project building a retro-style computer with three propeller chips. It´s called the HIVE-Project.
http://hive-project.de/

You can watch a demo on youtube:
http://www.youtube.com/watch?v=n_-kjd8uOjM

About me

Anonymous
Fri 26-Jun-2009 21:33
ql)))