definition of a highlevel language?

A

Avowkind

Andrew, that's very good description, and I totally agree !> if your problem domain is controlling a water works then you may tend


I would go one step beyond that, and state the problem as:
"keep the reservoir full, but not too full"> which in python might turn out to be



And now the solution is less close ;-)
And it becomes even less close,
if we extend your solution somewhat more to a real world implementation,
something like this:

control = True
while control :
if water_level > 10:
pump.start()
if water_level < 5:
pump.stop()

And if you would propose this solution to a control system engineer,
he/she would say: "this solution works very bad" or even "this solution
won't work"
A solution that would work, should incorporate at least a hysteresis and
could look like this:

control = True
State = False
while control :
if State and ( water_level > 10 ) :
pump.start()
State = not ( State )
elif not ( State ) and ( water_level < 5 ) :
pump.stop()
State = not ( State )

and now what's the resemblance to the orginal problem :
"keep the reservoir full, but not too full"
;-)

So an adequate high level language,
should do exactly like a control engineer would do (btw I'm not a
control engineer):
1- asking what do you mean by "full"
2- not asking what's the other level,
but asking what's the intended use: how often and how many water is
added or used,
what are the costs of the pump, etc etc
after which
the control engineer
or
the high level language
can calculate the optimal hysteresis.> of course with the addition of some brackets C++ could be this clear


I agree that some problems are better described in one or the other form,
but it's not the major issue.
e.g. Flowcharts are a perfect high level solution for problems in many
domains.
But flowcharts, just like computer languages, visual design languages
and math,
are only valuable in the hands of domain experts.

What the major issue is,
that makes a computer language or a design environment in general,
really high level,
is the availability of the domain expertise.

Therefor the only high level language I'm aware of is ...
... LabView

Labview offers a lot of domain expertise in almost any domain,
so anyone
with just a little knowledge of the problem domain,
and
with just a little programming experience or math knowledge,
can solve any problem in every domain with Labview.
Possibly I'm exaggerating a bit ;-)

cheers,
Stef

creating a short example to illustrate a point is always dangerous :)

<digression>
I chose the pumping station because many years ago I used to do plant
control programs in Forth. One engineer I worked with had described
the requirements in such terms as you give.
e.g keep the tank not too full or empty, but run the pumps at least 4
hours a day.
I considered writing a declarative rule based language to express
this. but on further conversation I found that the engineers already
had a semi formal procedural notation used for manual instructions
which it was very easy to adapt Forth to parse.

Forth's defining words allowing the creation of new language
constructs always made writing domain specific programs easy.

I mention this as, having been writing C++ for 15 years since those
days. Python is the first new language that I really feel comfortable
with and that carries that same feeling of expressiveness.

</digression>
 
H

Henrique Dante de Almeida

Out of curiosity, do you know how easy it would be to make a Python chip
using FPGAs?  I have little to no hardware knowledge, but it sounds like
a fun project in any case.  Even if it's not likely to have blazing
performance, it'd be cool to load Python bytecode directly into
memory. :)

The python VM is too "high level". :) I think a python CPU would
need to be developed in two layers, one that looks like a typical
processor and another that executes complex instructions
(microcode ?). The low level part takes some weeks (one week or so if
you have the whole architecture figured out) in VHDL. Once I claimed
to have done this in an April Fool's day. It was fun. :-D
 
D

Dan Upton

Out of curiosity, do you know how easy it would be to make a Python chip
using FPGAs? I have little to no hardware knowledge, but it sounds like
a fun project in any case. Even if it's not likely to have blazing
performance, it'd be cool to load Python bytecode directly into
memory. :)

I don't really know, but I would guess that it's hard, or at least
time-consuming. The best example I can give you is "JOP: A Java
Optimized Processor" which was basically an FPGA-based chip that
executed Java bytecode natively. If you're curious, you can read
about it at http://www.jopdesign.com/ . It looks like it was done as
a PhD thesis at the Vienna University of Technology, and unless
Austria has significantly lower PhD requirements... ;)
 
J

Jan Claeys

Op Mon, 26 May 2008 15:49:33 -0400, schreef Dan Upton:
The point about them looking very little like x86/ARM/etc chips is the
important part though--IIRC, part of the failure of Java machines was
lousy support for preexisting code, due to the optimizations for Java
bytecode, and I expect the same would be true of a Python
bytecode-optimized processor.

AFAIK "Java processors" are mostly used as coprocessors next to an ARM
core (or similar), allowing you to run Java applications at a reasonable
speed on otherwise relatively slow mobile phone CPUs and the like.

In theory, it's possible to design a processor that can run some form of
Python-oriented bytecode quite efficiëntly, but I fear that nobody really
wants to invest the money to do so at the moment?
 
O

Ognjen Bezanov

Hello Everyone!

I am building an application using WxWidgets, and its job is to manage
HTML data in a database. Now I need essentially a HTML editor that I can
embed into my program, that will parse the HTML and allow the user to
edit it.

Many of these 'WYSIWYG' HTML editors exist for other languages (e.g.
FCKeditor for php) but I have not found any for python.

If anyone has any ideas, I would much appreciate it! I already had a
look to see if there were any python bindings for NVU and Mozilla
composer, that would allow me to use the editors, but no luck :(

Thanks!

Ognjen.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top