Puppy Programming School
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Puppy Programming School
Puppy Hacker School
starts its first program of studies
http://puppylinux.org/wikka/PuppySchoolProgramming
Because Puppys are the friskiest breed of mongrels in this dimension
you can expect the students to be setting the pace . . .
Help
What have I started?
1. This year Puppy will be ARM'd and dangerous as we become Raspberry Pi enabled
2. The first language used on http://puppylinux.org/wikka/PARM
PARM will probably be bash script, leading to Bacon when we get a compiler with the Devx
3. Your ability to write tutorials with the language of your choice, is a good way of developing for the new generation
. . . must be time for a little rant . . . I remember the day I created a BASIC tutorial in Pascal for my students. Most adult students were only interested in using Word (A DOS program in ye olde days) and other applications but one guy got it. Programming is not for everyone but everyone can do a few basics . . .
Please share your knowledge
starts its first program of studies
http://puppylinux.org/wikka/PuppySchoolProgramming
Because Puppys are the friskiest breed of mongrels in this dimension
you can expect the students to be setting the pace . . .
Help
What have I started?
1. This year Puppy will be ARM'd and dangerous as we become Raspberry Pi enabled
2. The first language used on http://puppylinux.org/wikka/PARM
PARM will probably be bash script, leading to Bacon when we get a compiler with the Devx
3. Your ability to write tutorials with the language of your choice, is a good way of developing for the new generation
. . . must be time for a little rant . . . I remember the day I created a BASIC tutorial in Pascal for my students. Most adult students were only interested in using Word (A DOS program in ye olde days) and other applications but one guy got it. Programming is not for everyone but everyone can do a few basics . . .
Please share your knowledge
Last edited by Lobster on Fri 09 Mar 2012, 13:19, edited 1 time in total.
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
Hi Lobster!
Your Hackers' School is great. I notice that you have put a link to my Python blog - thanks for that!
I am interested in learning a bit more BASH scripting. I have been dipping into "The Shellcoders Handbook" and "Hacking: The Art of Exploitation". I got rather out of my depth with the second of these! Very interesting though!
mark
Your Hackers' School is great. I notice that you have put a link to my Python blog - thanks for that!
I am interested in learning a bit more BASH scripting. I have been dipping into "The Shellcoders Handbook" and "Hacking: The Art of Exploitation". I got rather out of my depth with the second of these! Very interesting though!
mark
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
This GUI front end should be both useful and easy to understand and modify:
http://www.murga-linux.com/puppy/viewto ... 850#185153
http://www.murga-linux.com/puppy/viewto ... 850#185153
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Gosh have not programmed in python for a couple of years
Something simple to start with . . .
A python example of two arrays and the random function
to create fruity insults - kids should instantly find this very useful
Must be supervised
Marks given for gentler insults which are more hilarious and disarming
Something simple to start with . . .
A python example of two arrays and the random function
to create fruity insults - kids should instantly find this very useful
Must be supervised
Marks given for gentler insults which are more hilarious and disarming
Code: Select all
## Random fruit response
# Lobster March 3 2012
import random
verb = ['erratic', 'unbelievable', 'unfortunate', 'inconsequential']
fruit = ['raspberry', 'pomegranite', 'banana', 'grape', 'loganberry']
print "You are an" , random.choice (verb) , random.choice (fruit)
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
Nice one!
I led a class of Y9 (about 13-14 year olds) through a simple "You suck and I rule" infinite loop program last week!
My latest blog post is a "hack your homework" offering. I've been learning about math.pow() and "repr().rjust()"!
Grid Multiplication
I think I did this the hard way - if anyone can think of a more elegant solution, please let me know!
You can see the RPi logo just peeping around my screen-shot!
[/url]
I led a class of Y9 (about 13-14 year olds) through a simple "You suck and I rule" infinite loop program last week!
My latest blog post is a "hack your homework" offering. I've been learning about math.pow() and "repr().rjust()"!
Grid Multiplication
I think I did this the hard way - if anyone can think of a more elegant solution, please let me know!
You can see the RPi logo just peeping around my screen-shot!
[/url]
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Puppy Programming School
Hi, could not resist the temptation to i18n
First Script
Save it as lob
------------------
edit
back from asking my translator whether lob is anything other than lobster´s first 3 letters: yes it is
First Script
Save it as lob
------------------
edit
back from asking my translator whether lob is anything other than lobster´s first 3 letters: yes it is
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
I'm reading (and trying to learn from) Schildt's "Java: The Complete Reference". I've got a bit lost in the section on bitwise operators.
Can anyone explain "two's complement" to me. I don't see how swapping all the bits and adding one would make the computer see it as a negative number. Also, what is the "high-order bit"?
I have a feeling I won't necessarily need to know all this, but still ...
Can anyone explain "two's complement" to me. I don't see how swapping all the bits and adding one would make the computer see it as a negative number. Also, what is the "high-order bit"?
I have a feeling I won't necessarily need to know all this, but still ...
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
Hi antiloquax.
My English isn't so sophisticated, but examples should explain everything:
[BIN = DEC]
00000000 = 0
00000001 = 1
00000010 = 2
00000011 = 3
...
01111111 = 127
but:
10000000 = -128
10000001 = -127
10000010 = -126
10000011 = -125
...
11111111 = -1
Simply, the HOB (High Order Bit) or MSB (Most Significant Bit) may indicate if the number is positive or negative.
Two's complement example:
00101101 = 45
Now let's XOR all bits:
11010010 = -46
And add 1:
11010011 = -45
HTH
Greetings!
My English isn't so sophisticated, but examples should explain everything:
[BIN = DEC]
00000000 = 0
00000001 = 1
00000010 = 2
00000011 = 3
...
01111111 = 127
but:
10000000 = -128
10000001 = -127
10000010 = -126
10000011 = -125
...
11111111 = -1
Simply, the HOB (High Order Bit) or MSB (Most Significant Bit) may indicate if the number is positive or negative.
Two's complement example:
00101101 = 45
Now let's XOR all bits:
11010010 = -46
And add 1:
11010011 = -45
HTH
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
Thanks for the reply SFR - what you wrote certainly fits in with what I have read about this - but I still don't see how
I'm clearly missing something very obvious - I'll try to work it out later.
Let's say we have the binary number 7 - "00000111"
So we do "two's complement" and that gives us: "11111001".
So the left-most bit means -128, and then we add 64, 32, 16, 8 and 1 to get -7.
I get that. But how does the computer know that we don't mean 249?
antiloquax
Isn't "11111111" 255?11111111 = -1
I'm clearly missing something very obvious - I'll try to work it out later.
Let's say we have the binary number 7 - "00000111"
So we do "two's complement" and that gives us: "11111001".
So the left-most bit means -128, and then we add 64, 32, 16, 8 and 1 to get -7.
I get that. But how does the computer know that we don't mean 249?
antiloquax
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
Computer doesn't know thatantiloquax wrote:I get that. But how does the computer know that we don't mean 249?
For CPU 11111001 may mean 249 as well as -7.
The beautiful thing is that when we add another 1, we'll get:
249 + 1 = 250
-7 + 1 = -6
11111010 = 250 = -6
so whatever you do, the result is always correct regardless if it's interpreted as positive or negative value.
The programmer decides how to interpret and display the result.
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
- minesadorada
- Posts: 68
- Joined: Sun 11 Sep 2011, 19:10
Lazarus
I'm having fun with Lazarus/FPC
I just wrote a general-purpose pascal object to handle calculating EGA handicap adjustments, EGA playing handicaps and new Exact EGA handicaps. It plugs into any simple Lazarus GUI app.
This is making my life a lot easier as the (temporary) handicap secretary of my local society.
I'm going to subclass it next to accept open-source golfML XML course definitions as an import. Then a golfML editor....
With Lazarus/FPC, I just recompile the same code for Linux 32, Windows 32 and Windows 64-bit versions, and it all works 100%
I just wrote a general-purpose pascal object to handle calculating EGA handicap adjustments, EGA playing handicaps and new Exact EGA handicaps. It plugs into any simple Lazarus GUI app.
This is making my life a lot easier as the (temporary) handicap secretary of my local society.
I'm going to subclass it next to accept open-source golfML XML course definitions as an import. Then a golfML editor....
With Lazarus/FPC, I just recompile the same code for Linux 32, Windows 32 and Windows 64-bit versions, and it all works 100%
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
I thought I'd post up links to a couple of .pets that might be of interest to programmers.
These are all available at ftp://raspberrypy.co/Pets/
User: a3804781
P'word: puppi1
Valgrind 3.7.0 - this is a memory checker that is recommended by Zed Shaw in his book "Learn C the Hard Way".
MIT Scheme 9.1.1 - An implementation of the dialect of LISP.
CLISP 2.49 - Common Lisp
MDK 1.2.6 - The MIXAL Development Kit
Lua 5.2.0
Ruby 1.9.3
These are all available at ftp://raspberrypy.co/Pets/
User: a3804781
P'word: puppi1
Valgrind 3.7.0 - this is a memory checker that is recommended by Zed Shaw in his book "Learn C the Hard Way".
MIT Scheme 9.1.1 - An implementation of the dialect of LISP.
CLISP 2.49 - Common Lisp
MDK 1.2.6 - The MIXAL Development Kit
Lua 5.2.0
Ruby 1.9.3
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
I've been doing a little reading up on different Scheme implementations. Some of the popular ones (eg Clojure) actually run in a Java VM. Personally, I find that slows down the whole thing (I divide my time between a reasonably fast desktop, a Raspberry Pi and a very old laptop!).
GNU Guile, on the other hand, seems to be written in C. I am putting together a .pet for this as we speak. It takes quite a long time to compile and needs libffi and libunistring.
mark
GNU Guile, on the other hand, seems to be written in C. I am putting together a .pet for this as we speak. It takes quite a long time to compile and needs libffi and libunistring.
mark
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
If anyone fancies having a go, I have made some .pets for guile, libffi and libunistring.
They are at: raspberrypy.co.
User: a3804781
P'word: puppi1
mark
They are at: raspberrypy.co.
User: a3804781
P'word: puppi1
mark
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
There are now 5 tutorial videos on YouTube.
This link takes you to the most recent.
This link takes you to the most recent.
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
Cool!
I want to watch the video and learn something!
And then...
...the most recent video of the puppy programming school teaches you (teaches me)...
...NOTHING!
It is removed...
I want to watch the video and learn something!
And then...
...the most recent video of the puppy programming school teaches you (teaches me)...
...NOTHING!
It is removed...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
Sorry - I didn't know about the 15 minute limit.RSH wrote:Cool!
I want to watch the video and learn something!
And then...
It will be online later!
In the meantime my previous videos are available. here.
EDIT
Tutorial Video Five is now available!
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.