473,799 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

a bizarre take on the fibonacci sequence

I would like to present an unusual take on computing the Fibonacci
sequence using Javascript. Please try out the following link in
Firefox (sorry, having problems with other browsers):

http://webstervanrobot.com/

Click the "multi step" link to see it in action.

I am posting this mostly for entertainment value, and to show off some
of the power of Javascript. But I'm also hoping to solicit some
advice for making this work in other browsers.

Enjoy!

Steve
http://webstervanrobot.com/

Sep 16 '08
16 1734
On Sep 17, 5:15 am, "showellshow... @gmail.com" wrote:
<snip>
Has there ever been an attempt to write a Javascript-based
Javascript implementation?
Yes, at least 3. E.G:-

<URL: http://en.wikipedia.org/wiki/Narciss...aScript_engine) >
I'm not sure what the benefit would be...maybe the
ability to debug itself?
A pre-request of writing an ECMAScript engine (assuming the result was
a 100% conforming implementation) in ECMAScript would be an ability to
fully understand the language (all of it, from tokenisation through to
execution). The result could be a useful code manipulation/
verification tool for use in browser environments, but otherwise might
be pretty pointless.

Most of the existing attempts (including Narcissus) 'cheat' and end up
using the underlying language for things like regular expressions
instead of implementing them themselves.
Sep 17 '08 #11
On Sep 17, 3:09*am, Henry <rcornf...@rain drop.co.ukwrote :
[...]
A pre-request of writing an ECMAScript engine (assuming the result was
a 100% conforming implementation) in ECMAScript would be an ability to
fully understand the language (all of it, from tokenisation through to
execution). The result could be a useful code manipulation/
verification tool for use in browser environments, but otherwise might
be pretty pointless.
It seems like the manipulation/verification problem is a good one to
solve. You don't necessarily need self-hosting to achieve it, but
having the lower level tools in Javascript obviously opens the doors
for lots of people to improve it.

Most of the existing attempts (including Narcissus) 'cheat' and end up
using the underlying language for things like regular expressions
instead of implementing them themselves.
Understandable.

Sep 17 '08 #12
Mike Duffy wrote:
Stevo <no@mail.invali dwrote in news:ga******** *****@news.t-online.com:
>sh************@ gmail.com wrote:
>I generally don't click on people's links, far too dangerous.

How do you decide what is safe? Even a reputable site like google is full
of other people's links. Or do you just mean that you do not trust the
people who post here?
Well, essentially the best way is to use tools like the AVG SafeSite
scanner - but that will not track links in emails, so as a general
rule you just don't use them.
Sep 17 '08 #13
On Sep 17, 5:10*pm, The Magpie <use...@pigsins pace.co.ukwrote :
Mike Duffy wrote:
Stevo <n...@mail.inva lidwrote innews:ga****** *******@news.t-online.com:
showellshow...@ gmail.com wrote:
I generally don't click on people's links, far too dangerous.
How do you decide what is safe? Even a reputable site like google is full
of other people's links. Or do you just mean that you do not trust the
people who post here?

Well, essentially the best way is to use tools like the AVG SafeSite
scanner - but that will not track links in emails, so as a general
rule you just don't use them.
How funny the PC guys... jejeje. Get a Mac !

--
Jorge.
Sep 17 '08 #14
On Wed, 17 Sep 2008 09:27:53 -0700, Jorge wrote:
On Sep 17, 5:10*pm, The Magpie <use...@pigsins pace.co.ukwrote :
>Mike Duffy wrote:
Stevo <n...@mail.inva lidwrote
innews:ga****** *******@news.t-online.com:
>showellshow... @gmail.com wrote:
>I generally don't click on people's links, far too dangerous.
How do you decide what is safe? Even a reputable site like google is
full of other people's links. Or do you just mean that you do not
trust the people who post here?

Well, essentially the best way is to use tools like the AVG SafeSite
scanner - but that will not track links in emails, so as a general rule
you just don't use them.

How funny the PC guys... jejeje. Get a Mac !
A Mac is a PC.

--
I told you this was going to happen.

Sep 17 '08 #15
Jorge <jo***@jorgecha morro.comwrites :
How funny the PC guys... jejeje. Get a Mac !
I do have a Mac. People like you make me ashamed to admit it. Grow up,
moron - it's a computer, not a f**king religion.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
Sep 17 '08 #16
On Sep 17, 6:40*pm, Sherm Pendley <spamt...@dot-app.orgwrote:
>
I do have a Mac. People like you make me ashamed to admit it. Grow up,
moron - it's a computer, not a f**king religion.
Heavy worder :
That we can surf freely to any page is a fact not a matter of
religion.

--
Jorge.
Sep 17 '08 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7746
by: Niks | last post by:
Can anybody explain me what is a "Fibonacci search"? even an URL will do. Thanks for reading.
12
2706
by: CII | last post by:
Hi everybody. I've been reading posts a year old about the fibonacci series right on this newsgroup, and while it's not directly games related, I'll share my own notes as well. On another newsgroup there is an ongoing discussion about the famous fibonacci sequences, and a fine program written by a poster got my attention so just for fun I wrote one myself and put it on the web just about two days ago. It can be found on the site ...
14
4947
by: felixnielsen | last post by:
Im actually kinda embarassed to ask this question... @code start #include <iostream> int main() { unsigned long long a = 1; unsigned long long b = 1; for (int i = 0; i < 45; i++) { a += b; std::cout << a/b << std::endl;
0
3302
by: misho | last post by:
Write a C program using the fork() system call that that generates the Fibonacci sequence in the child process. The number of the sequence will be provided in the command line. For example, if 5 is provided, the first five numbers in the Fibonacci sequence will be output by the child process. Because the parent and child processes have their own copies of the data, it will be necessary for the child to output the sequence. Have the parent invoke...
3
11983
by: veeru | last post by:
Hi All, Can anyone tell about how to create a FIBONACCI series in VB.Net and C# Thanks in Advance, Veeru
6
4978
by: Andrew Tatum | last post by:
I'm having some problems with the below equation. I have no problems when it comes to positives. Negatives create the problem.. C 2 1 4 However, this doesn't work:
5
2470
by: coleslaw01 | last post by:
Hello, I am trying to teach myself C++ while babysitting a stable network in Iraq and have put together a program to display the fibonacci sequence. It works with long and long double(output in exponent though) After sequence 47 using long type the program won't display the output properly (I am assuming because of size limit of type) so I switched type to unsigned long and now number 49 outputs as 512559680 when it should be 4807526976 ...
1
6368
by: iugamage | last post by:
Help me to write a C program using the fork() system call that that generates the Fibonacci sequence in the child process. The number of the sequence will be provided in the command line. For example, if 5 is provided, the first five numbers in the Fibonacci sequence will be output by the child process. Because the parent and child processes have their own copies of the data, it will be necessary for the child to output the sequence. Have the...
1
8838
by: altaey | last post by:
Question Details: Write a program to find and print a Fibonacci sequence of numbers. The Fibonacci sequence is defined as follow: Fn = Fn-2 + Fn-1, n >= 0 F0 = 0, F1 = 1, F2 = 1 Your program should prompt the user to enter a limit and indicate whether the last number in the sequence printed is either even or odd.
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10475
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10250
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.