Go to advanced search

by Bakul Shah
Mon Feb 11, 2013 7:30 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 153923

Re: BASIC - more harmful than useful?

Lisp is stack based, and thus slower and slower as you build it up. Actually most programming languages are "stack based". If anything Lisp is far less stack based than C/C++, Pascal, Fortran, Ada, etc. etc. etc because it supports first class functions (basically a function can be used outside of ...
by Bakul Shah
Sat Feb 09, 2013 12:33 am
Forum: Linux Kernel
Topic: Time to compile the kernel
Replies: 16
Views: 7798

Time to compile the kernel

Just curious. How long does it take to compile the RPi linux kernel on an RPi? And to cross compile on a fast Intel/amd 64bit processor? And can you cross-compile a kernel for another platform on the RPi? For comparison, here are some plan9 numbers: rpi; pwd /sys/src/nix/k10 #time to cross compile a...
by Bakul Shah
Fri Feb 08, 2013 11:23 pm
Forum: General discussion
Topic: Is PI a good choice for prototyping a commercial product?
Replies: 11
Views: 3133

Re: Is PI a good choice for prototyping a commercial product

commercial product that employs a re-sold microprocessor board... a big issue is warranty costs and warranty pass-through. No to mention that the RPi may be suboptimal in other ways: power use, form factor, needing to put your electronics on a separate board, limited interface bandwidth in that cas...
by Bakul Shah
Fri Feb 08, 2013 8:30 pm
Forum: Staffroom, classroom and projects
Topic: Assembly - any use in teaching it?
Replies: 138
Views: 35034

Re: Assembly - any use in teaching it?

Alan Perlis once quipped that a Lisp programmer knows the value of everything but the cost of nothing. More or less the same can be true of anyone who only uses high level languages. If you want to find out how much some part of your program costs in terms of space or cpu cycles, it helps to look at...
by Bakul Shah
Thu Feb 07, 2013 7:39 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 153923

Re: BASIC - more harmful than useful?

Ok, guys & girls, how about a programming challenge to settle this once and for all ? [Yeah, right!] Program it in the language of your choice to show off your programming chops! The challenge: Write a program that places the *minimum* number of knights on a chessboard such that a given square eithe...
by Bakul Shah
Thu Feb 07, 2013 5:52 pm
Forum: General discussion
Topic: Power switch now available for Pi
Replies: 48
Views: 38422

Re: Power switch now available for Pi

You plug your original Pi power supply (male micro USB) into the switch. Then use a standard USB->micro-USB from the switch to the Pi's power port. The GPIO pins are only used for communication, not powering the Pi. One lead sends a signal to the Pi and the other lead receives a signal from the Pi....
by Bakul Shah
Wed Feb 06, 2013 10:10 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 153923

Re: BASIC - more harmful than useful?

In practice you can get away not knowing a lot of the theory but the parsing theory is not exactly simple. Check out the "Dragon book" on compilers! I am very familuar with the 'Dragon Book": Principles of Compiler Design . Two things about your statement: 1) The dragon book presents the therory of...
by Bakul Shah
Wed Feb 06, 2013 9:42 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 153923

Re: BASIC - more harmful than useful?

Angels and pinheads. I first wrote an interpreter for BASIC more years ago than I care to remember. It was limited to 26 variables, rather imaginitively called A to Z. I programmed it into a 2708 EPROM (I also had to create the hardware to program the EPROM). Less than 2000 bytes for the interperte...
by Bakul Shah
Wed Feb 06, 2013 9:36 pm
Forum: General discussion
Topic: An interesting little difference in file handling ...
Replies: 7
Views: 1662

Re: An interesting little difference in file handling ...

Each month, I concatenate the 30 or 31 files into a single file. This is done at a Windows Command Window by navigation to the directory on the mapped drive, and typing the following command, for example, for January 2013: type 201301??.txt >> 201301.txt So here is the "interesting little differenc...
by Bakul Shah
Wed Feb 06, 2013 5:53 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 153923

Re: BASIC - more harmful than useful?

Parsing is presented as hard , in fact parsing is extremely simple. In practice you can get away not knowing a lot of the theory but the parsing theory is not exactly simple. Check out the "Dragon book" on compilers! And using a language that will hide everything and teach nothing is nonsence. Have...
by Bakul Shah
Wed Feb 06, 2013 5:01 pm
Forum: Staffroom, classroom and projects
Topic: 'Visualizing Code to Fail Faster' - Inventing on Principle.
Replies: 6
Views: 2099

Re: 'Visualizing Code to Fail Faster' - Inventing on Princip

aTao, do watch Brett Victor's talk! What he is talking about is several levels above "semicolon expected". And it is heads and shoulders above Eclipse.
by Bakul Shah
Wed Feb 06, 2013 4:35 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 153923

Re: BASIC - more harmful than useful?

Start with a simple typed language and a recursive decent parser type compiler I beg to disagree. You want to leave parsing right out of it, and start by working on the syntax tree direct. Something lisp-like, a language that's already expressed in terms of a syntax tree, would be the best place to...
by Bakul Shah
Mon Feb 04, 2013 10:51 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 153923

Re: BASIC - more harmful than useful?

It seems to me that you need the ability to edit source code and issue commands. Those are two modes and two windows, unless you go back to line numbers. You can do "windows" in text mode; standard FORTH has the top two thirds of the screen as an editor window and the bottom as a scrolling command ...
by Bakul Shah
Thu Jan 31, 2013 10:23 pm
Forum: HATs and other add-ons
Topic: Gertboard, RISC OS and BASIC
Replies: 18
Views: 7613

Re: Gertboard, RISC OS and BASIC

Gert van Loo wrote:I recently counted them: I have 6 Pi-related HW projects in parallel which I am responsible for or have to look at on a regular basis.
Tell us more, Gert!
by Bakul Shah
Wed Jan 30, 2013 3:15 am
Forum: Plan 9
Topic: STICKY: Keeping up to date
Replies: 5
Views: 16232

Re: Keeping up to date

But doing a pull, does this update everything (binaries, the kernel, etc.), or just sources, or does it update userspace binaries but just kernel source, or what? Everything that is in /n/sources/plan9/ dir but note that only the 386 bits are built there at present. On the RPi you'll have to rebuil...
by Bakul Shah
Wed Jan 30, 2013 1:26 am
Forum: Plan 9
Topic: STICKY: Keeping up to date
Replies: 5
Views: 16232

Re: Keeping up to date

A plan 9 noob here; will this procedure update all the userspace binaries, etc., just the sources or what? How do I completely update everything? (Incidentally I tried to update the kernel and failed miserably; check the backlogs in #plan9, due to soft/hard FPU mismatches!) Standard plan9 sources n...
by Bakul Shah
Sun Dec 09, 2012 7:12 pm
Forum: Plan 9
Topic: Quid pro quo
Replies: 2
Views: 12349

Re: Quid pro quo

Florent wrote:I'll be happy to help him out and I'm waiting for my eLinux account request to be approved.
I got my acct. Liz will have her quid in a bit but it won't be very pro.
by Bakul Shah
Sat Dec 08, 2012 9:44 pm
Forum: Bare metal, Assembly language
Topic: Bootloader Questions
Replies: 19
Views: 6325

Re: Bootloader Questions

The bootloader obviously isn't intended for persistent programs. It's intended for use during the development phase, so that you won't have to copy your program/kernel to the SD card every time you have an update to evaluate. If you want it persistent, just replace the bootloader with your program ...
by Bakul Shah
Mon Nov 19, 2012 3:56 am
Forum: Off topic discussion
Topic: What's wrong with the OS status quo & how to fix it
Replies: 27
Views: 3896

Re: Other ARM hardware?

Your assuming that the current OS paradigm is broken, which isn't proved, in my mind anyway. For example, no-one has yet given me a good alternative, or at least explained the alternatives in the words of one syllable I need in order to understand 'paradigm shifts'. And until that happens, the curr...
by Bakul Shah
Thu Nov 15, 2012 2:20 am
Forum: Off topic discussion
Topic: What's wrong with the OS status quo & how to fix it
Replies: 27
Views: 3896

Re: Other ARM hardware?

I don't believe anyone has come up with an alternative. The existing file paradigm is pretty limiting, but I have seen nothing that gives the same unity and utility, much less a step change in expressibility or efficiency. Compared to unix the file paradigm has been taken much further in plan9[1]. ...
by Bakul Shah
Sun Nov 04, 2012 6:28 am
Forum: Staffroom, classroom and projects
Topic: APL
Replies: 10
Views: 3625

Re: APL

Kona is an open-source implementation of the K programming language. If you don't know APL, then this is the place to start. K is an ASCII-based APL. To build it on the Raspi: $ git clone https://github.com/kevinlawler/kona.git $ cd kona $ make To use: $ rlwrap ./k # rlwrap for history and command l...
by Bakul Shah
Thu Nov 01, 2012 6:01 pm
Forum: General discussion
Topic: RaspberryPi On/Off Switch Idea
Replies: 81
Views: 54484

Re: RaspberryPi On/Off Switch Idea

There's also a ready made solution: http://www.pololu.com/catalog/product/751 , I'm not sure if it has the "hold for x seconds to do hard off" or not but in most cases you don't want to do a hard-off to avoid SD card corruption. The circuit I referenced earlier does this. You need an output signal ...
by Bakul Shah
Thu Nov 01, 2012 5:06 pm
Forum: General discussion
Topic: RaspberryPi On/Off Switch Idea
Replies: 81
Views: 54484

Re: RaspberryPi On/Off Switch Idea

There's also a ready made solution: http://www.pololu.com/catalog/product/751 , I'm not sure if it has the "hold for x seconds to do hard off" or not but in most cases you don't want to do a hard-off to avoid SD card corruption. The circuit I referenced earlier does this. You need an output signal ...
by Bakul Shah
Fri Oct 26, 2012 6:38 pm
Forum: General discussion
Topic: RaspberryPi On/Off Switch Idea
Replies: 81
Views: 54484

Re: RaspberryPi On/Off Switch Idea

Bakul Shah wrote:Sorry, no circuit diagram.
Forgot to mention. http://cds.linear.com/docs/Datasheet/2954fb.pdf shows some sample applications that may help.
by Bakul Shah
Fri Oct 26, 2012 5:23 pm
Forum: General discussion
Topic: RaspberryPi On/Off Switch Idea
Replies: 81
Views: 54484

Re: RaspberryPi On/Off Switch Idea

Sorry, no circuit diagram.

Go to advanced search