Go to advanced search

by Bakul Shah
Thu Jul 04, 2013 8:56 am
Forum: General discussion
Topic: Setting hostname dymanically
Replies: 21
Views: 8793

Re: Setting hostname dymanically

Not sure what you're trying to do but you shouldn't have to do anything special on individual hosts. Assuming there is a DHCP server on your network, you can associate mac address and host name for each RPi on the server.
by Bakul Shah
Thu Jul 04, 2013 8:47 am
Forum: General discussion
Topic: Computing Pioneer Doug Englebart Has Passed Away
Replies: 10
Views: 1762

Re: Computing Pioneer Doug Englebart Has Passed Away

Here is the whole the mother of all demos . This video feels like an old scifi TV show what with its beeps, buzzes & Engelbart's voice over but this was no StarTrek but shape of things to come! If you pay attention you can recognize start of an enormous number of stuff we take for granted now. Just ...
by Bakul Shah
Wed Jul 03, 2013 9:27 am
Forum: C/C++
Topic: Question on fork()
Replies: 7
Views: 1891

Re: Question on fork()

Lookup Project Genie, a research project at UC Berkeley. fork() was first implemented in the berkeley timesharing system on sds940 during 1964-1967. In fact they called processes forks! Ken Thompson worked on sds940.
by Bakul Shah
Mon Jul 01, 2013 5:18 pm
Forum: General discussion
Topic: How long can I run the RasPi for?
Replies: 21
Views: 4382

Re: How long can I run the RasPi for?

The hero points still go to QNX. Their salesman told us of one machine that had been running non-stop for seven years, and in that time it had had complete upgrades of both the application and the operating system. (Linux has loadable modules in the kernel which can be upgraded and reloaded without...
by Bakul Shah
Sun Jun 30, 2013 8:40 pm
Forum: C/C++
Topic: Max31855 Thermistor - C code to convert bits to decimal
Replies: 4
Views: 1765

Re: Max31855 Thermistor - C code to convert bits to decimal

and in twos complement representation Bakul Shah, I'm not sure I understand how this works? You mean theres no actual system of conversion that makes sense here? How can each bit represent 0.25 degrees, when a second bit indicates a unique value? I know how to print in dec/hex etc, but the conversi...
by Bakul Shah
Sun Jun 30, 2013 5:48 pm
Forum: C/C++
Topic: Max31855 Thermistor - C code to convert bits to decimal
Replies: 4
Views: 1765

Re: Max31855 Thermistor - C code to convert bits to decimal

From the table it seems the temp. readings in units of quarter degrees and in twos complement representation. You have two choices. If you want 0.25 degree precision use floating point: float temp = 0.25 * reading; If you want to use just ints, you will have to lose some resolution. int temp = readi...
by Bakul Shah
Sun Jun 30, 2013 5:23 pm
Forum: C/C++
Topic: Calling system() from daemon
Replies: 4
Views: 1107

Re: Calling system() from daemon

Do you want your server program to run even while you are logged out? If so, use daemon(). A proper daemon that is supposed to always run should do a few more things in addition to calling (or emulating the logic of) daemon(). Read a few daemons' manpages to get an idea. Or may be someone has a webp...
by Bakul Shah
Sun Jun 30, 2013 7:37 am
Forum: General discussion
Topic: Please help what is happening
Replies: 26
Views: 3412

Re: Please help what is happening

OK I am trying to connect to my new raspberri pi through my mac. Basically when I power on the pi the red light comes on and yellow then the green ones flicker then it ends up they are all on. Does that mean it has booted up correctly because I can not seam to find the ip address. the ethernet cabl...
by Bakul Shah
Sun Jun 30, 2013 7:05 am
Forum: Automation, sensing and robotics
Topic: Understanding how RPI gets its time
Replies: 4
Views: 1143

Re: Understanding how RPI gets its time

I want to add a DS1307 real time clock module to RPI so it can set its time at startup when it has no internet connection, then when network time service becomes available, RPI periodically updates DS1307 (say once a day to make up the inaccuracy of DS1307). Is there any simple way to achieve the a...
by Bakul Shah
Fri Jun 28, 2013 12:28 am
Forum: Plan 9
Topic: New plan9 image
Replies: 0
Views: 8403

New plan9 image

Richard has put a new plan9 image in http://plan9.bell-labs.com/sources/contrib/miller/9pi.img.gz . Not much is new but it should work with model-A RPi now + it is updated for 21 bit runes. To keep your sources uptodate, you can use the pull command. To avoid downloading x86 bits (about 235MB), repl...
by Bakul Shah
Wed Jun 26, 2013 10:35 am
Forum: General discussion
Topic: New Threads and Processes
Replies: 5
Views: 1051

Re: New Threads and Processes

Hi, I have tried and tested the three seperate binaries with much joy. Now I want to tie them together. From my research into threads and processes I'm pretty sure I want to launch the two binaries (camera and 3G) as processes and NOT threads. This being due to threads operating in the same address...
by Bakul Shah
Wed Jun 12, 2013 5:47 pm
Forum: Other programming languages
Topic: Dyalog APL available for the Pi
Replies: 20
Views: 7416

Re: Dyalog APL available for the Pi

APL's reduce is a "right fold" (in functional programming terms). That is, f/V == v0 f (v1 f (v2 ...)), right? So then the Nth terms of f\, which is just f/ on the first N vector entries, will be computed differently from the N+1th term. Most of my recent experience with k, which defines f/ to be a ...
by Bakul Shah
Wed Jun 12, 2013 12:36 am
Forum: Other programming languages
Topic: Dyalog APL available for the Pi
Replies: 20
Views: 7416

Re: Dyalog APL available for the Pi

Just kicking tires.... x←⍳10000000 ]cputime x+x * Benchmarking "x+x" * Command Execution Failed: WS FULL ⎕wa 66275016 Clearly 66MB is not enough to add two 10M entry integer vectors. Is there a way to allocate more memory? The following seems to have an O(n^2) behavior. But when + is used instead of...
by Bakul Shah
Tue Jun 11, 2013 8:45 pm
Forum: Other programming languages
Topic: Dyalog APL available for the Pi
Replies: 20
Views: 7416

Re: Dyalog APL available for the Pi

Thanks very much, Jason & Dyalog! Further notes: In Terminal preferences->settings->keyboard deselect "Use Option as Metakey". If you use Xquartz, in preferences->Input deselect "Option Keys sent Alt_L and Alt_R". Without this change you won't be able to type option+i for iota etc. ⌘; is a handy sho...
by Bakul Shah
Tue Jun 11, 2013 2:36 am
Forum: Other programming languages
Topic: Dyalog APL available for the Pi
Replies: 20
Views: 7416

Re: Dyalog APL available for the Pi

OK, Problem solved! I did this: cat >> ~/.Xresource <<'EOF' UXTerm*faceFont: APL386 Unicode EOF xrdb -merge ~/.Xresources So everything works locally using uxterm . lxterminal still misbehaves but I don't care about it. xterm is not in the default Raspbian distro so you'd have to sudo apt-get xterm ...
by Bakul Shah
Mon Jun 10, 2013 10:24 pm
Forum: Other programming languages
Topic: Dyalog APL available for the Pi
Replies: 20
Views: 7416

Re: Dyalog APL available for the Pi

[Edit] I connected a display to the RPi and exactly followed the instructions in the dyalog apl for RPi users and selected the right font from the lxterminal's edit->preferences menu etc. but instead of special chars I see a diamond with a ? in it. If I manually start uxterm and cat aplkeys/xterm I...
by Bakul Shah
Sat Jun 08, 2013 9:21 pm
Forum: Other programming languages
Topic: Dyalog APL available for the Pi
Replies: 20
Views: 7416

Re: Dyalog APL available for the Pi

Good to see this! But I haven't had a chance to play with this. I briefly tried logging in from a mac (no display on the RPi) but couldn't figure out how to input APL chars. Using KAPL font with xterm on the mac at least displays APL chars but not with APL385. [Edit] I connected a display to the RPi...
by Bakul Shah
Wed May 29, 2013 10:50 pm
Forum: General discussion
Topic: Help!!!
Replies: 24
Views: 3696

Re: Help!!!

Talk to her and find out why she says you don't need one. Listen to her and try to understand her reasoning (I suspect she has some valid concerns like not doing your homework or chores etc.). Then figure out how to allay her concerns. Explain how having it would benefit you. Get her excited about a...
by Bakul Shah
Sun May 26, 2013 8:27 pm
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 28181

Re: Something the Pi is not good at - calculating Pi

I just found this amazing statement from Alex Yee the current holder of the record for caculating the most digits of pi: 2 cents from the current world record holder for the most digits of Pi: Computing many digits of Pi is a communication-bound task rather than a computation-bound task. So I highl...
by Bakul Shah
Thu May 23, 2013 9:42 pm
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 28181

Re: Something the Pi is not good at - calculating Pi

This trivial: if you have N processors, just split the series in N subseries and compute each one independently and finally add them up and then return the reciprocal. Clearly the deepest terms are the hardest to calculate. The question is how much of the work done in parallel on earlier terms is n...
by Bakul Shah
Thu May 23, 2013 8:46 pm
Forum: General discussion
Topic: Maker Fairey Tales - NOOBS and Pidora and Wayland, Oh My!
Replies: 53
Views: 15427

Re: Maker Fairey Tales - NOOBS and Pidora and Wayland, Oh My

So, what was your problem, Bunky? I too have no idea who Bunky is or what it is in refernce to. Amazing -- for some reason there's no reference to it on Wikipedia. There's an old [USA and maybe elsewhere] comedy routine entitled "What's the matter, Bunky?" where an old codger is trying to console h...
by Bakul Shah
Thu May 23, 2013 8:27 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 28181

Re: Something the Pi is not good at - calculating Pi

Let's consider a simpler formula to see the problem. f(k) = k! and we want sum f(k) for k in [0..n) We can split that into two parallel threads for sum f(k), k in [0..m) and sum f(k), k in [m+1..n) the results of which are to be added. Some time you have to transform the problem. For instance: let ...
by Bakul Shah
Thu May 23, 2013 1:27 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 28181

Re: Something the Pi is not good at - calculating Pi

1) Memory access speed is the bottle neck for this calculation. At least on the Pi. Note: this is just my guess. I am too lazy to do a proper analysis or measure actual memory IO! 2) The terms can be grouped into batches and batches can be calculated in parallel. Putting those two facts together I ...
by Bakul Shah
Thu May 23, 2013 1:02 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 28181

Re: Something the Pi is not good at - calculating Pi

As Jim says, such series computation can be parallelized. Not convinced. Certainly, gmp-chudnovsky.c exploits no parallelism at all. (Ignoring superscalar pipelining determined in hardware.) This trivial: if you have N processors, just split the series in N subseries and compute each one independen...
by Bakul Shah
Wed May 22, 2013 11:36 pm
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 28181

Re: Something the Pi is not good at - calculating Pi

Looking at the ratios of the clock frequencies we see that the ARMs are not doing very well clock for clock against the Intel/AMD. This may be because the memory interface on the Raspi has a much lower bandwidth than what the AMD/Intel 64 bit machines have and this algorithm seems memory bound. Eac...

Go to advanced search