Python and Flaming Thunder

J

J. Clifford Dyer

Get Flaming Thunder for only $19.95! It slices, it dices!


It's a myth that they're only twice as fast. An experienced assembly
language programmer can usually get out at least a factor of 5 by
using tricks such as cache-coherence, carry flag tricks, stack
manipulations, etc.


That's also a myth. For example, if C is easy to maintain, why is
Flaming Thunder the only single-asset 8-by-8 shotgun cross compiler in
the world? There should be lots of single-asset 8-by-8 shotgun cross
compilers written in C, if C is easier to maintain.

Not only is it the world's only "single-asset 8-by-8 shotgun cross
compiler," but according to google, it's also the world's only "shotgun
cross compiler" period. But I guess if you make up your own terminology
you're bound to be unique. :) Do you mind if I ask: what exactly is a
single-asset 8x8 shotgun cross compiler, and what makes that of any
value to me?

Cheers,
Cliff
 
C

castironpi

Not only is it the world's only "single-asset 8-by-8 shotgun cross
compiler," but according to google, it's also the world's only "shotgun
cross compiler" period.  But I guess if you make up your own terminology
you're bound to be unique.  :)  Do you mind if I ask: what exactly is a
single-asset 8x8 shotgun cross compiler, and what makes that of any
value to me?

Cheers,
Cliff- Hide quoted text -

- Show quoted text -

You can examine those criteria by trying to buy a chair. Is Tron good
practice for Opticals? Who wants a memory lane crossing? Is
compiling bad?
 
B

Bruno Desthuilliers

Dave Parker a écrit :
Mostly numerical analysis

Benches, please ? I mean : benches using Python's numpy or similar
packages - that is, what anyone doing numerical intensive computation in
Python would use.
and CGI scripting.

Is there anyone still doing cgi nowadays ???
True. But in Python, you don't see statically-linked pure-syscall CGI

Hopefully. And you don't see much cgi script at all, because we figured
much better ways to do web programming.
For many people, being 5 to 10 times faster at numerical analysis and
CGI scripting is reason enough to pay $19 per year. But maybe for
other people, having slow, inefficient programs and websites is
acceptable.

Go tell this to google, youtube etc...
Perhaps. But if elementary school students can easily understand why
one programming language gives the answer 100 (Flaming Thunder):

Write 10^2.

but can't understand why another programming language gives the answer
8 (Python):

Print 10^2

This doesn't "give" 8 - this raises a syntax error.

Please RTFM :
1/ this is 'print', not 'Print'
2/ '^' is the bitwise XOR operator


ok, so not only do you spam this newsgroup, but you're also a clueless
troll.
 
L

Luis Zarrabeitia

The websites owners might not be unhappy, but lots of customers
complain about slow websites, so if the market is competitive then
eventually the PHP fad will die out.

On my [modest] experience, bandwidth trumps code speed by a large fraction. My
experience is tainted, though, with me living in Cuba and Cuba having almost
no bandwidth available.
For example, Slashdot recently interviewed a successful website in a
competitive market -- online newspapers -- and found that to enhance
customer happiness the New York Times uses hand-coded HTML.

"He was asked how the Web site looks so consistently nice and polished
no matter which browser or resolution is used to access it. His answer
begins: 'It's our preference to use a text editor, like HomeSite,
TextPad or TextMate, to "hand code" everything, rather than to use a
wysiwyg (what you see is what you get) HTML and CSS authoring program,
like Dreamweaver. We just find it yields better and faster results.'"

So, they edit the HTML code by hand. The interview explicitly mentions the
features "consistently nice and polished", not "faster to compute". You can
always throw more hardware when the problem is about speed. The real edge on
your competitive marked should be the "consistently nice and polished", and
neither python, nor [I hope] Flaming Thunder is going to help you with that.
"Faster" wins in a competitive market, so if a programming language
can't deliver "faster", it is a fad that will die out.

I find it more likely that the users are more concerned about how quickly the
latest tidbit reaches your frontpage than with the extra few milisenconds
achieved by switching the programming language or throwing another server in
the cluster.
 
B

bruno.desthuilliers

IIRC the idea was so that managers could write programs in English. It
failed because nobody could write a parser that would handle something
like "The bottom line is that the stakeholder group requires the
situation going forward to be such as to facilitate the variable known
as x to provide the same outcome when stimulated by dereferencing as the
variable known as y".

John, I usually don't agree much with both what you say and how you
say it, but I must admit that this one is, well... just brillant !-)

(IOW: rofl, keyboard, and +1 QOTW)
 
J

J. Cliff Dyer

John, I usually don't agree much with both what you say and how you
say it, but I must admit that this one is, well... just brillant !-)

(IOW: rofl, keyboard, and +1 QOTW)

Agreed. Best. Synonym. EVAR.

(I won't give away the fun by saying what it's a synonym for)

Cheers,
Cliff
 
B

bruno.desthuilliers

And to add, I also need to mention that Python doesn't need to be
compiled at all,

No language needs compilation - it's an implementation problem, not a
language problem. Now all the Python's implementations I know do use
compilation (to byte-code).
its py and pyo file is architecture independent.

True, but this is not strictly related to being compiled or not.
 
B

bruno.desthuilliers

The websites owners might not be unhappy, but lots of customers
complain about slow websites, so if the market is competitive then
eventually the PHP fad will die out.
Some of the slower websites I've seen where using Java - which is
supposedly way faster than Python. And even a static (pure HTML) web
site can become more than painfully slow if the server can't handle
the load, as anyone working in the field could tell you. But this is
obviously one more area where you are just totally clueless.
 
B

bruno.desthuilliers

I've never seen this symbol in textbooks. In textbooks, powers are
written using superscript.

I haven't seen any language using '^' as the power operator so far -
but I've seen quite a lot of them using it as the bitwise XOR operator.
 
B

bruno.desthuilliers

Also, in Python how do you assign a symbolic equation to a variable?
Like this?

QuadraticEquation = a*x^2 + b*x + c = 0

quadratic_equation = lambda x, b, c : a*(x**2) + b*x + c == 0

or if x, b and c are supposed to be captured from the current
namespace:

quadratic_equation = lambda : a*(x**2) + b*x + c == 0
Set statements avoid the confusion of multiple equal signs when
manipulating symbolic equations:

using '=' for assignement and '==' for equality test does the same
thing. And it's a very common pattern in programming languages.
 
M

MRAB

I've never seen this symbol in textbooks. In textbooks, powers are
written using superscript.


I haven't seen any language using '^' as the power operator so far -
but I've seen quite a lot of them using it as the bitwise XOR operator.

BASIC and Comal use '^' as the power operator.
 
J

John Salerno

I've read that one of the design goals of Python was to create an easy-
to-use English-like language. That's also one of the design goals of
Flaming Thunder at http://www.flamingthunder.com/ , which has proven
easy enough for even elementary school students, even though it is
designed for scientists, mathematicians and engineers.

What an interesting and weird language! :) But I have a question concerning something like this, from the website:

----------------------------------------------------
Flaming Thunder uses set statements for assignment:

Set x to "concrete".

Flaming Thunder does not abbreviate or cojoin common English words. For example, go and to are separate words:

Read commmand. If command = "quit" then go to end.
-----------------------------------------------------

There doesn't seem to be any consistency here. Why say:

set x to "concrete"

and then say:

if command = "quit"

Why are you using the "set...to..." terminology instead of the "=" for assignments, but then in an if test statement, you *do* use the "="???

Would it be valid to say:

x = "concrete"

or to say:

if command (is) set to "quit"

??????
 
J

John Salerno

I think that many people will find that Flaming Thunder is easier to
use and understand than Python

I respectfully disagree.
Plus, me getting paid to work on Flaming Thunder is far more
motivating than me not getting paid to work on Python.

That's truly disappointing.
This weekend,
Python users will still be debating how to fix awkwardnesses in the
languages (such as FOR loops where you're just counting the loops and
not referencing the loop variable) -- but Flaming Thunder users will
be getting work done using the REPEAT n TIMES constructs that I'll be
implementing.

FT seems like all "awkwardnesses" to me.
 
J

John Salerno

Not far, especially with books disappearing. Our library says that
these days, only 25% of their checkouts are books; the other 75% are
DVDs, CDs, etc.

Sorry, but I must point out a logical flaw in this statement. Assuming your stats are even true, just because books are now only 25% of checkouts rather than, for example, 80%, doesn't necessarily imply that any less books are being checked out (i.e. "disappearing"). It can just as easily mean that *more* of the other things are being checked out while books remain the same.

Example:

Total number of items checked out: 100
Total number of books checked out: 80
Percentage of books checked out: 80%

Total number of items checked out: 320
Total number of books checked out: 80 # same as above
Percentage of books checked out: 25%
 
L

Lie

No language needs compilation - it's an implementation problem, not a
language problem. Now all the Python's implementations I know do use
compilation (to byte-code).

True, but this is not strictly related to being compiled or not.

It's true, it's implementation problem whether a language is compiled
or not, but what I was emphasizing was that Python's code is
architecture independent at all stages (that is visible to the user
and the programmer), on the other hand, a compiled code is a compiled
code is a compiled code, it cannot be architecture independent without
packing multiple binaries in the same executable (like in Macintosh's
universal binary) or using an emulation (with huge overheads) or at
least using a compatibility layer (which doesn't always work) and all
this is done in the layer that is visible to user and programmer
(programmer having to compile against everything and user having to
download the correct executable) instead of being done in a platform
independent way that interpreted language like Python have.
 
B

bruno.desthuilliers

It's true, it's implementation problem whether a language is compiled
or not, but what I was emphasizing was that Python's code is
architecture independent at all stages (that is visible to the user
and the programmer), on the other hand, a compiled code is a compiled
code is a compiled code,

Ever wondered what all these .pyc files were ?
it cannot be architecture independent without
packing multiple binaries in the same executable (like in Macintosh's
universal binary) or using an emulation (with huge overheads) or at
least using a compatibility layer (which doesn't always work) and all
this is done in the layer that is visible to user and programmer
(programmer having to compile against everything and user having to
download the correct executable) instead of being done in a platform
independent way that interpreted language like Python have.

Python is not interpreted, because being interpreted is a feature of
an implementation, not of a language. And so far, no known Python
implementation is (strictly speaking) interpreted - they all compile
to byte-code. "compiled" doesn't necessarily imply "compiled to
platform native binary code", you know.

Ok, this may look like a bit on the splitting hairs side. But may I
remind you that to run ever a .pyc file, you do need to have the
Python runtime (VM + quite a lot of libs) installed one way (normal
install) or another (packed in something that looks like an ordinary
"executable" - whatever this means for the target platform) ? OTHO,
it's true that a .pyc file is platform-independant - it just requires
the correct versions of quite a lot of platform-dependant binaries.
Wait... Isn't this code some kind of a "visible to the user and
programmer" "compatibilty layer" ?
 
L

Lie

Ever wondered what all these .pyc files were ?


Python is not interpreted, because being interpreted is a feature of
an implementation, not of a language. And so far, no known Python
implementation is (strictly speaking) interpreted - they all compile
to byte-code. "compiled" doesn't necessarily imply "compiled to
platform native binary code", you know.

That's beside the point, the point is about platform independentness
of the .py file. When I call Python is interpreted, I meant that the
CPU doesn't directly interpret python codes (in most Python
implementation).
Ok, this may look like a bit on the splitting hairs side. But may I
remind you that to run ever a .pyc file, you do need to have the
Python runtime (VM + quite a lot of libs) installed one way (normal
install) or another (packed in something that looks like an ordinary
"executable" - whatever this means for the target platform) ? OTHO,
it's true that a .pyc file is platform-independant  - it just requires
the correct versions of quite a lot of platform-dependant binaries.
Wait... Isn't this code some kind of a "visible to the user and
programmer" "compatibilty layer" ?

With the same bit on being on the splitting hair side: It's the same
with msvcrt in C or msvbvm60 in VB, programming language runtime is
invisible to the user, it's visible to the system administrator
(which, in many cases is also the user though). It is, however,
invisible to both the user and the programmers.
 
D

Dave Parker

That's truly disappointing.

I guess I could have stated that better. Flaming Thunder is a labor
of love for me. I've programmed in almost every language since
FORTRAN and Lisp, and Flaming Thunder is the language I've always
wished the others were.

For one example, I've always preferred compiled languages because
they're faster. So Flaming Thunder is compiled.

For another example, I've always preferred languages that are English-
like because it's easier to return to your code after several years
and still know what you were doing (and it's easier for someone else
to maintain your code).

For over 5 years I've been working on Flaming Thunder unpaid and on my
own, getting the back-end up and running. 8-by-8 shotgun cross
compilers written in assembly language, that can fit all of the
libraries for both the 32- and 64-bit versions of FreeBSD, Linux, Mac
OS X and Windows into a single executable file that's less than 180K,
aren't written overnight.

So now that I've released it, it's extremely gratifying that people
think it's cool enough to actually pay $19 for it. That gives me lots
of motivation (and buys enough time) for me to add features to it as
fast as possible.

To whit: you pointed out the awkwardness in Python of having to
declare a for-loop variable when you only wanted to loop a specific
number of times and didn't need the variable. Last week, Flaming
Thunder had the same awkwardness. If you wanted to loop 8 times:

for i from 1 to 8 do <statement>

you still had to use a variable (in this case, i). This week, I've
added two new for-loop variations that fix that awkwardness, and also
allow you to explicitly declare an infinite loop without having to
rely on idiomatic constructs such as while-true. Examples of the two
new variations (for-forever and for-expression-times):

Write "Fa".
For 8 times do write "-la".

For forever do
(
Write "Do you know the definition of insanity? ".
Read response.
).
 
D

Dave Parker

Would it be valid to say:

x = "concrete"

or to say:

if command (is) set to "quit"

??????

I like the idea of:

If command is set to "quit" ...

I've added it to my list of things to think about, and possibly
implement.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top