Go to advanced search

by Heater
Tue Apr 23, 2019 6:32 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

I sense a lot of confusion in recent posts to this thread. The fibo(4784969) challenge is not about using GMP or not. Or any other library. Or code from wherever. The challenge is not about whatever a compiler or run time system uses uses under the hood. No, the challenge is about the language. The ...
by Heater
Tue Apr 23, 2019 10:56 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

I just installed Python on my Win 10 machine. To be specific:

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32

It produces the same result as the scheme program.
by Heater
Tue Apr 23, 2019 8:36 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

Now I'm confused again.

In javascript:

Code: Select all

a = 5
b = 12
n = fibo(a) + 42 + fibo(b)
console.log(n)
Will produce the string "542144" if fibo() returns strings. Or the number 191 if fibo() returns numbers.

What does ScriptBasic do?
by Heater
Tue Apr 23, 2019 7:44 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

Ah, I think I see. You mean if I write fibo(12) in the code it's as if I wrote the literal string "144" ?

I guess that means we can't then do arithmetic on million digit numbers though.
by Heater
Tue Apr 23, 2019 7:30 am
Forum: General discussion
Topic: use sleep() or alternate timers in NodeJS
Replies: 1
Views: 45

Re: use sleep() or alternate timers in NodeJS

I'm afraid you cannot simply insert a delay between statements in Javascript like that. Javascript uses an event driven programming model. Basically that means that functions get called when events happen. Those functions should do what they have to do as quickly as possible and then return. That me...
by Heater
Tue Apr 23, 2019 6:23 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic, ScriptBasic not only satisfied the challange,... That's great. I'm sure you have linked us to this somewhere back in this thread already but if you can provide a URL that has the ScriptBasic documentation along with download links together with build/install/run instructions I'll give i...
by Heater
Tue Apr 23, 2019 6:08 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ejolson, From what I can tell, the signal-to-noise ratio in this thread has been consistently high enough that more than 70 thousand have found reading it worth their time. Wow, that's a lot. It was a stroke of genius of DavidS to throw his question into the forum: "Why Avoid BASIC on RPi?" See how ...
by Heater
Tue Apr 23, 2019 5:49 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic, Can we all agree that the C GMP library method is the fastest Fibonacci in this challenge? No. Certainly using GMP from C is the fastest way to compute fibo(4784969) I have seen yet. However this challenge requires not using any libraries unless they are part of the language standard. G...
by Heater
Mon Apr 22, 2019 11:27 pm
Forum: General discussion
Topic: analog output with raspberry pi (not PWM)
Replies: 3
Views: 100

Re: analog output with raspberry pi (not PWM)

e.ninth123, One way to get an analog output is to output PWM and then filter it with inductors and/or capacitors. Oh wait, a motor is an inductor, we don't need the filter. I'm curious, why do you not want to use PWM? It would be a lot simpler and more efficient than adding a DAC and linear power dr...
by Heater
Mon Apr 22, 2019 11:16 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

timrowledge, Given the number of people and projects that have not had any such issues I'm happy to blame you. Really? OK, go ahead. Blame me for the difficulty in running simple Smalltalk programs on headless systems. Blame me for Squeak on Ubuntu and Windows not dealing with stdout correctly. Blam...
by Heater
Mon Apr 22, 2019 10:05 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

Alternatively, one could try a different version of smalltalk: It's sunny here. What's the weather like there? Spring in Helsinki has been sunny and warm. It gets to over 30C, on my balcony. This years chili crop is coming along nicely there. I spent the afternoon in the sun on the terrace of the l...
by Heater
Mon Apr 22, 2019 9:58 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ejolson, About those Fibonacci algorithms... I was thinking about this the other day. When I first ever thought about writing a program to calculate Fibonacci numbers, back in the depths of last century, the first and only thing to come to mind was starting with two ones and then repeatedly adding i...
by Heater
Mon Apr 22, 2019 9:56 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic,
Sorry! I meant load balancing. A much bigger problem in the days of dialup modems.
Ah thanks. That's cleared that up.

I think you will find load balancing is a bigger problem today. Any popular web site can be overloaded without load balancing in place.
by Heater
Mon Apr 22, 2019 9:19 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic, Apache provides that functionality along with load leveling and security. I'm confused. When you say "load leveling" do you mean what is commonly called "load balancing"? Load balancing is all about distributing incoming requests to multiple servers on different machines so as to spread...
by Heater
Mon Apr 22, 2019 4:02 pm
Forum: Off topic discussion
Topic: is the pi worth it?
Replies: 21
Views: 448

Re: is the pi worth it?

larf,

That's the spirit.

Many beginners get started with Python.

It's probably best to spend some time looking into all the projects for the Pi people have documented around the net. Check out the raspberrypi.org blog and MagPi magazine. See what there is and what interests you.
by Heater
Mon Apr 22, 2019 3:44 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic, Node would be better suited as an embedable server side engine solution. Embedded into what exactly? Plenty of applications use an embedded Javascript, even if it is not actually a node.js/v8 engine. Pretending it's a web sever with 'wouldn't it be cool if' design is a train wreak in th...
by Heater
Mon Apr 22, 2019 2:56 pm
Forum: General discussion
Topic: Help! deciding how to setup the hardware vs software
Replies: 2
Views: 99

Re: Help! deciding how to setup the hardware vs software

navyseai, A moments reflection might tell you that is very likely that so few people have tried loading you a Pi as you describe that you are unlikely to get sensible advice about it. Another moments reflection might tell you that no matter what software you install on a machine whether it works wel...
by Heater
Mon Apr 22, 2019 2:20 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

hippy, Sorry, the fibo(4784969) challenge repository is here: https://github.com/ZiCog/fibo_4784969 Python has been there since the beginning. In the wrong directory as it happens! I did a little clean up of the repository. We now have: ALGOL60 BASIC bc c c++ Haskell java javascript prolog python re...
by Heater
Mon Apr 22, 2019 11:20 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

Following the Smalltalk trauma I'm going to try and put it out of my mind by going out on a bender for a week. For the record I have added the following language entries to the fibo_4784969 repository on github: Smalltalk Racket(Scheme) REXX Prolog Java bc I'll try and find time to add some credits ...
by Heater
Mon Apr 22, 2019 10:53 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic, You may have multiple c++ V8 JavaScript processes running.... Indeed you can. On occasion I do. ...but they all need to be serviced by the worker process that created them. No they don't. Typically node.js programs running as background services are started by systemd or SysV Init or wh...
by Heater
Mon Apr 22, 2019 10:09 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic, That's brilliant, what an apt cartoon. In many programs one has to spin many plates at the same time. HTTP requests to a web server, database connections, other conversations going on over network and serial connections, file I/O, interaction with other devices connected via I2C, SPI, G...
by Heater
Mon Apr 22, 2019 9:19 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

I think it's more like a Javascript programmer wondering why the DOM API is not available out of the box with node.js. Or why JS in the browser has almost none node.js built in APIs. In general getting any given JS to run in the browser and in node is non-trivial.
by Heater
Mon Apr 22, 2019 9:00 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

ScriptBasic, Ah, I did not realize I had written any Lisp! I'm vaguely aware that the Racket I used implements something derived from Scheme, which in turn is some kind of Lisp variant. It's not clear to me how much they differ or whether that code is usable on a Scheme or Lisp implementation. I gue...
by Heater
Mon Apr 22, 2019 8:43 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

Heater labs ran into significant challenges when attempting calculate Fibonacci numbers with a large number of digits or do anything useful in general with Smalltalk. Putting aside the bizarreness of the language itself it turns out to be very hard to actually use it once you have a program develope...
by Heater
Mon Apr 22, 2019 8:08 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 1965
Views: 73877

Re: Why Avoid BASIC on RPi?

jahboater, Your name will be remembered alongside Babbage, Lovelace, Dikstra, Knuth ... Why thank you. As it happens my name is already immortalized alongside the great computer science visionaries and Turing Award winners John Hennesy and David Patterson, not to mention the RISC V creator Krste Asa...

Go to advanced search