Showing posts with label 28. Show all posts
Showing posts with label 28. Show all posts

Thursday, March 20, 2014

Book Review #28


Learn to Play the Piano and Keyboard
Nick Freeth

Another book by Parragon Publishing, and hard to find author's name. Unfortunately, unlike the sushi book, this one is piano playing. Piano playing is somewhat a rather involved activity. Sure you have some good techniques explained there. Plenty of good pictures, too. But going from simple keyboarding to The Entertainer simply requires more practice than the pages provides. Worse, there's no chord chart at the end of the book the student can refer to. This book is not a tutorial book, or even an introductory one. It's a piano user guide. Here is the white key. Here is the black key, and here is the pedal. And not much after that. Not recommended.

Monday, March 3, 2014

cooking journal #28


Cooking #28 Ice Cream Sandwich



Ha ha. What do you know? Ice cream and bread makes a nice pairing! Don't you just love chocolate mint ice cream on bread?

This brings back memories, as one of my childhood experience. Simple, yet pleasant. Who needs fruit jams when you can have ice cream?

Friday, December 6, 2013

Petit Computer Journal #28

Petit BrainF

Yeah, I was wondering just exactly how hard it is to implement a language that has only 8 operators involved. Not hard at all! Of course, I cheated and used graphic screens for my memory. It'll be probably a bit more complicated if I use straight memory. A bit.

The program cannot fit into one screen, but it's certainly a candidate for less than 100 lines program. It took me a couple hours because I was careless in moving the pointers.

The CYCLE subroutine is there to keep the variables within range, and the FB subroutine is there as a debugger that I use when debugging the program. So, I commented it out in the final version.

Another person, IAmAPersson (what a name!) was working on a version of the compiler as well. Check Petit Wikia for it. Maybe he posted it there by now.

I don't know the policy of this blogspot, but I know my policy and that is family friendly. I don't want to use the full name of the program. Thank you. Next time you designed a programming language, make sure you name it proper!



  1. REM PBF BY HARRY HARDJONO
  2. @INIT
  3. ACLS:CLEAR
  4. GPAGE 0:GCLS
  5. GPAGE 1:GCLS
  6. MS=30000
  7. PTR=0
  8. PC=0
  9. MPC=0
  10. CSR=0

  11. GPAGE1:RESTORE @HELLO
  12. @LOADP
  13. READ A$
  14. IF A$=="" GOTO @RUNP
  15. FOR I=0 TO LEN(A$)-1
  16. GPSET PC%256,PC/256,ASC(MID$(A$,I,1))
  17. PC=PC+1:NEXT
  18. GOTO @LOADP

  19. @RUNP
  20. PC=0:GPAGE 0
  21. @LOOP
  22. GPAGE 0:VAR=GSPOIT(PTR%256,PTR/256)
  23. GPAGE 1:C=GSPOIT(PC%256,PC/256)
  24. 'GOSUB @FB
  25. IF C==62 THEN PTR=PTR+1:GOSUB @CYCLE:GOTO @LOOP2 
  26. IF C==60 THEN PTR=PTR-1:GOSUB @CYCLE:GOTO @LOOP2
  27. IF C==43 THEN VAR=VAR+1:GOSUB @CYCLE
  28. IF C==45 THEN VAR=VAR-1:GOSUB @CYCLE
  29. IF C==46 THEN LOCATE CSR%32,CSR/32:?CHR$(VAR);:CSR=CSR+1:GOTO @LOOP2
  30. IF C==44 THEN GOSUB @GETCHAR 
  31. IF C==91 THEN MPC=1:GOSUB @SR:GOTO @LOOP2
  32. IF C==93 THEN MPC=1:GOSUB @SL:GOTO @LOOP2
  33. IF C==0 GOTO @END 
  34. GPAGE 0:GPSET PTR%256,PTR/256,VAR
  35. @LOOP2
  36. PC=PC+1:GOSUB @CYCLE
  37. GOTO @LOOP

  38. @FB
  39. LOCATE 0,5:?PTR,PC,VAR
  40. LOCATE 0,6:?CHR$(C)
  41. WAIT 6
  42. RETURN

  43. @CYCLE
  44. IF PC<0 THEN PC=PC+49152
  45. IF PTR<0 THEN PTR=PTR+MS
  46. IF VAR<0 THEN VAR=VAR+256
  47. PC=PC%49152
  48. PTR=PTR%MS
  49. VAR=VAR%256
  50. CSR=CSR%768
  51. RETURN

  52. @GETCHAR
  53. A$=INKEY$():IF A$=="" GOTO @GETCHAR
  54. VAR=ASC(A$):WAIT 30
  55. RETURN

  56. @SR
  57. IF VAR!=0 THEN RETURN
  58. PC=PC+1:GOSUB @CYCLE
  59. GPAGE 1:C=GSPOIT(PC%256,PC/256)
  60. IF C==91 THEN MPC=MPC+1
  61. IF C==93 THEN MPC=MPC-1
  62. IF MPC<=0 THEN RETURN
  63. GOTO @SR

  64. @SL
  65. IF VAR==0 THEN RETURN
  66. PC=PC+1:GOSUB @CYCLE
  67. GPAGE 1:C=GSPOIT(PC%256,PC/256)
  68. IF C==91 THEN MPC=MPC-1
  69. IF C==93 THEN MPC=MPC+1
  70. IF MPC<=0 THEN RETURN
  71. GOTO @SL

  72. @END
  73. WAIT 600
  74. END

  75. @PLOP
  76. DATA "-[>-[.-]<]"
  77. DATA ">>++++[.->++++++[.-]<]"
  78. DATA ""

  79. @CAT
  80. DATA ",[.,]"
  81. DATA ""

  82. @HELLO
  83. DATA "+++++ +++++ [>+++++++"
  84. DATA ">+++++ +++++ >+++ >+ <<<<-]"
  85. DATA ">++.>+.+++++++ ..+++.>++.<<"
  86. DATA "+++++ +++++ +++++"
  87. DATA ".>.+++. ------ .----- --- .>+.>."
  88. DATA ""




Wednesday, September 25, 2013

Raspberry Pi Journal #28

Trademark Rule

If you noticed, the Raspberry Pi directory page now sports the disclaimer that Raspberry Pi trademark is owned by the Foundation. It's actually common sense, but just to clarify, this site is not affiliated with the Foundation in any way, and the posts here are my posts. So, any mistakes I made here is my responsibility. What goes on this are strictly my opinion, etc.

The full trademark rule can be found here:
http://www.raspberrypi.org/trademark-rules

I'm at odds here. It's too inconvenient for me to put the disclaimer on every Raspberry Pi posts, and yet, this blog has more with common, everyday, accessible technology than focusing entirely on Raspberry Pi. How else do you think Cooking is included?

In the end, I decided to just apply it to Raspberry Pi specific page, and that is the directory page. I hope that is enough.

Come to think of it, there is a rule that says:

(ii)         use the Raspberry Pi Word Mark as part of the domain name for your website;

And there are actually several web/blog sites that does feature the word "raspberrypi". The obvious one would be

http://www.theraspberrypiguy.com/

who did several excellent video tutorials regarding the device, but no trademark disclaimer anywhere.

Anyway, I hope I make it clear that I'm not affiliated with the Foundation in any way, except as a happy customer.