Go to advanced search

by Bakul Shah
Tue Mar 19, 2013 8:47 pm
Forum: Networking and servers
Topic: WiFi, Ethernet and routing
Replies: 4
Views: 1595

Re: WiFi, Ethernet and routing

You don't need any IGP as you have a single internal network (the ADSL router "routes" your external traffic but acts as a bridge for internal traffic). What does ifconfig on the PC and Pi reveal? They should have the same net and netmask. There are a number of possibilities. You can run tcpdump on ...
by Bakul Shah
Tue Mar 19, 2013 6:02 pm
Forum: Networking and servers
Topic: WiFi, Ethernet and routing
Replies: 4
Views: 1595

Re: WiFi, Ethernet and routing

Is your "router" a real router (passes packets between different subnets) or a bridge (passes packets between hosts on the same subnet)? ARP only works on the same subnet. Show us your net topology. Something like skys+-box[a]-------- RPi[c]~~~~wifi~~~~[d]"router"[e]--------[f]desktop PC Your router...
by Bakul Shah
Tue Mar 12, 2013 7:18 am
Forum: General discussion
Topic: Accessing GPIO which is fastest?
Replies: 5
Views: 1418

Re: Accessing GPIO which is fastest?

I should think SPI + DMA would be the fastest + the ARM needs far fewer interrupts. Even if you don't use DMA, SPI has a 16 word fifo which means it will need attention much less frequently (compared to a parallel ADC on the GPIO). Both leave you enough time to do other things (may be even do spectr...
by Bakul Shah
Sat Feb 16, 2013 6:32 pm
Forum: Staffroom, classroom and projects
Topic: Assembly - any use in teaching it?
Replies: 138
Views: 29694

Re: Assembly - any use in teaching it?

We use large FPGA devices when developing the next generation GPU chips. The whole GPU is testing in FPGA (the boxes are really quite large ie they have wheels, as we need somewhat more than 200k gates) prior to tapeout so we know they 'work' before spending $750k on masks etc. The last time I was ...
by Bakul Shah
Wed Feb 13, 2013 6:09 pm
Forum: Linux Kernel
Topic: Time to compile the kernel
Replies: 16
Views: 6908

Re: Time to compile the kernel

Thanks. Compiling the default raspian kernel on the RPi takes over 10 hours.
by Bakul Shah
Tue Feb 12, 2013 11:49 pm
Forum: Staffroom, classroom and projects
Topic: Assembly - any use in teaching it?
Replies: 138
Views: 29694

Re: Assembly - any use in teaching it?

My point was that the programmer must not assume that when they write code that they believe can be converted to efficient assembler code, that the compiler will compile to that code. But more importantly, it is not necessary to write obscure code in order to ensure that the compiled code is effici...
by Bakul Shah
Tue Feb 12, 2013 11:34 pm
Forum: Staffroom, classroom and projects
Topic: Assembly - any use in teaching it?
Replies: 138
Views: 29694

Re: Assembly - any use in teaching it?

For that reason "*p++ = *p++ + y" can't be converted to "*p++ += y". In C, at least, it can. You have two assignments to p with no intervening sequence point there, so the behaviour is undefined, and the compiler can emit whatever it likes. Good catch! But there is such a thing as quality of implem...
by Bakul Shah
Tue Feb 12, 2013 6:30 pm
Forum: Staffroom, classroom and projects
Topic: Assembly - any use in teaching it?
Replies: 138
Views: 29694

Re: Assembly - any use in teaching it?

... I've seen a compiler take "x += y" and calculate the address of x twice, and it was a complex array access so non-trivial. OK, when I switched on optimisation it got it right, but it would have worked just as well with "x = x + y". Yikes! That's a compiler error. What if the calculation of x ha...
by Bakul Shah
Tue Feb 12, 2013 6:11 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 131521

Re: BASIC - more harmful than useful?

Or are you saying that . is a low level operator? I believe that CAR, CDR, CONS are the lowest level operators, and that . is in fact a function of the input parser and output formatter. Indeed. The low level memory allocator in a pure lisp (i.e. one without additional low level data types like arr...
by Bakul Shah
Mon Feb 11, 2013 7:30 pm
Forum: Staffroom, classroom and projects
Topic: BASIC - more harmful than useful?
Replies: 899
Views: 131521

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: 6908

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: 2658

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: 29694

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: 131521

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: 36625

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: 131521

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: 131521

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: 1478

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: 131521

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: 1871

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: 131521

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: 131521

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: 7018

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: 10938

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: 10938

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...

Go to advanced search