Re: Which Delphi Version To Buy
- From: "m. Th." <a@xxxxx>
- Date: Sat, 17 May 2008 10:10:45 +0300
Barry Kelly (CodeGear) wrote:
m. Th. wrote:You have the source, you know :-) Our job is to give you ideas, to make you aware about our needs.
Barry Kelly (CodeGear) wrote:
[snip]
* Software implementation delivers a tremendous amount of flexibility.Given the fact that Delphi compiler is quick and small, do you see feasible having a runtime compiler/parser enabling what you describe above?
Some examples: runtime metaprogramming (e.g. runtime code generation,
eval);
It's possible, but not really feasible starting from dcc32. I doubt it
would be worth the effort; reimplementation of various parts would be
more robust, maintainable, etc.
-- Barry
<Warning: draft ahead>
Speaking about this, it would be a very nice feature if we'll have something like a TPascalParser (the existing TParser is a little bit too low level for daily use imho), TKibitzParser & TCode classes, much more similar with a TStoredProcedure mechanism. Eg:
TCode = class(TComponent)
//basic functionality
property Source: TStringList;
function Compile: integer; //ErrorCode = 0 -> success
property Compiled: boolean;
procedure Run;
//InOuts
//perhaps the bellow ones to allow to have persistent instances
//like TField ones (see TDataSet for details)
property InArguments: TArgumentList;
property OutArguments: TArgumentList;
//multi-core stuff
property RunMode: TRunMode; //(rmSync, rmAsync)
property Priority: TThreadPriority; //obvious meaning
... //much more interesting stuff which I don't figure now
end;
....about 'various parts' and your previous talk about VM, imho perhaps is a better approach to 'mimic' the real machines (RM) not in their behavior (because then the VM will be useless, isn't?) but in their organization. Ie. to have multiple, specialized, VM for different tasks like we have different RM (read: GPU, north/south-bridges, sound/Lan controllers etc.) for different tasks.
Our goal, imho, is to make the things more natural, more closer to the way in which the human brain is working. For example the basic data types (string, ordinal, fpoint) processing in Delphi is (imho) sensibly superior to .NET's one exactly because is closer to the iron. OTOH, Delphi is lacking high level natural abstractions. For ex. futures as a natural way to go parallel:
myResult:= Fn1(x) + future high priority Fn2(y);
or async calls (in a hypothetical graphic file manager):
procedure TMainForm.btnChangeDirClick(Sender);
begin
//':' stands for if hMakeThumbs<>nil then stop the thread
hMakeThumbs:Stop; //perhaps you can implement this also?
lFiles:=BuildFileList(cMyDirectory);
nCrtFile:=0;
hLoadFile:=asynchronous high priority LoadFile(lFiles[nCrtFile]);
hMakeThumbs:=asynchronous low priority MakeThumbnails(cMyDirectory);
end;
....imho, there is a need to specify priority in the parallel programming as well as the percentage from total number of cores on which a certain task will be run (this is a very interesting thing especially when the number of cores will grow).
Well, for parallel programming I, for one, certainly feel the need of a VM (in the way in which you defined it) simply because the actual CPU architecture is far (imho) from the way in which humans deal with the reality which is parallel. Look at the game theory. The vast majority of the games you have to deal with /different/ characters doing /different/ actions (tasks) in parallel, responding each one to the stimuli which comes from the environment. Imho, that's why the Actor model (http://en.wikipedia.org/wiki/Actor_model) fits so well in parallel programming. Also, it seems that as a reaction to thread programming, we go now to parallel libraries, thing which is beneficial imho, but we tend to forget two properties from thread programming model which maps to the human way of thinking. Priority and worker(s) (read: CPU affinity). Imho, we should be able to say 'Do this faster, do this slower/when you have time' or 'Leave a worker (ie. core) for UI, 25% from "workers" for burst, small actions which need to be executed real-time, and the other ones use for the daily work. But perhaps I'm wrong. But now I remember your blog post about games... :-) (Yes, we *do* read your blogs, keep them coming)
hth,
m. Th.
.
- Follow-Ups:
- Re: Which Delphi Version To Buy
- From: Barry Kelly (CodeGear)
- Re: Which Delphi Version To Buy
- References:
- Re: Which Delphi Version To Buy
- From: Marco van de Voort
- Re: Which Delphi Version To Buy
- From: Craig Stuntz [TeamB]
- Re: Which Delphi Version To Buy
- From: Marco van de Voort
- Re: Which Delphi Version To Buy
- From: Brion L. Webster
- Re: Which Delphi Version To Buy
- From: Cesar Romero
- Re: Which Delphi Version To Buy
- From: Tom Corey
- Re: Which Delphi Version To Buy
- From: Cesar Romero
- Re: Which Delphi Version To Buy
- From: Tom Corey
- Re: Which Delphi Version To Buy
- From: Cesar Romero
- Re: Which Delphi Version To Buy
- From: Anders Isaksson
- Re: Which Delphi Version To Buy
- From: Barry Kelly (CodeGear)
- Re: Which Delphi Version To Buy
- From: m. Th.
- Re: Which Delphi Version To Buy
- From: Barry Kelly (CodeGear)
- Re: Which Delphi Version To Buy
- Prev by Date: Re: What's the future hold for the 'Together' features in the IDE?
- Next by Date: Re: Delphi Product Revamp
- Previous by thread: Re: Which Delphi Version To Buy
- Next by thread: Re: Which Delphi Version To Buy
- Index(es):
Relevant Pages
|