ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The thread reminded me of my probably favorite joke about programmers.
A programmer's wife tells her husband: "Please go to the grocery store and buy a pack of eggs. And if you see muffins, then two".
The programmer goes to the store and returns with two packs of eggs.
The wife is puzzled and confused. The programmer explains: "I went to the store, checked that muffins were available and, as you specified, bought two packs of eggs rather than one".
The question is, Do any of you folks want to take a shot at making the thing run on LINUX?
NO, of course not, for the obvious reason that it's closed source. I downloaded your archive and no source for the .exe was provided. And I'm talking about the C++ or .NET or whatever source that you actually would have used to generate the first EXE (and which the Linux port would be started from). Making me email you for it won't do; you need make it as easy to download the source as it is to download the executable.
Start the discussion by either putting that on GitHub with an open source license, or assembling a budget and posting a job ad.
NO, of course not, for the obvious reason that it's closed source. I downloaded your archive and no source for the .exe was provided. And I'm talking about the C++ or .NET or whatever source that you actually would have used to generate the first EXE (and which the Linux port would be started from). Making me email you for it won't do; you need make it as easy to download the source as it is to download the executable.
It's not closed source. All of the code is in the download. All of it. But it is a "closed" system in the sense that it's self-contained: it compiles itself, in itself. No C++ or .NET or anything else needed.
History buffs, however, may be interested to know this: Many years ago, using a very early version of Borland's Delphi, we wrote a tiny compiler with a streamlined Pascal-like syntax called AIQ. AIQ included a text editor and was, like this program, self-contained: so we no longer needed Delphi. Then we used AIQ to write our first Plain English compiler, which, again, included a text editor and was, again, self-contained: so we no longer needed AIQ. Since then -- and we're talking years now -- we've programmed only in Plain English.
Returning to our Delphi and AIQ roots at this point, I don't think, would serve much purpose. Anything that needs to be coded (on the Windows side) for the port to LINUX can be written in Plain English. And the programmer doing the conversion will thus gain valuable, first-hand, practical experience with the language.
So the original question remains: Do any of you folks want to take a shot at making the thing run on LINUX?
Last edited by Gerry Rzeppa; 02-17-2013 at 02:04 PM.
Reason: Clarification
...
So the original question remains: Do any of you folks want to take a shot at making the thing run on LINUX?
My original questions remain too.
Is it a syntax sugar ?
Are the types static or dynamic ?
Is the language memory managed ?
How do resolve the problem of human languages ambiguity ?
Are you sure you solve problems or maybe you create them ?
Can refute the fundamental decision made by computer languages developers not to use English ? I.e. do you have a new computer science which much better than the existing computer science resolves problems ?
...
Your claim that input language is plain English is false also because of indentation (from your example) :
Code:
...
To clear the status:
Clear the status' string.
Show everything.
To create the background:
Draw the screen's box with the white color.
Loop.
Pick a spot anywhere in the screen's box.
Pick a color between the lightest gray color and the white color.
Dab the color on the spot.
If a counter is past 80000, break.
If the counter is evenly divisible by 1000, refresh the screen.
Repeat.
Extract the background given the screen's box. \or Create the background from the screen. Or something.
...
- in plain English indentation of such kind is not used, i.e. it's very untypical.
Which leads me to yet another question: what kind of scoping does your language use ? I mean in terms of https://en.wikipedia.org/wiki/Scope_...ter_science%29 ? For example, I outright reject languages without lexical scoping.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
From the looks of the code it's just pseudocode relating to whichever language, Pascal I take it, it was based upon?
It reminds me a little of VB (no offence) in that what at first looks nothing like a curly-bracket language turn out to have more in common with one than you'd think.
I just came across this:
Code:
put the box's height divided by the default font's height times the default font's height into a height.
Does that translate to:
Code:
aheight=(box_height/font_height)*font_height
or
Code:
aheight=box_height/(font_height*font_height)
?
Either way it looks odd and doesn't read as plain, unambiguous English but more like an attempt to describe one of the formulae I typed out in mathematical notation.
From the looks of the code it's just pseudocode relating to whichever language, Pascal I take it, it was based upon?
It reminds me a little of VB (no offence) in that what at first looks nothing like a curly-bracket language turn out to have more in common with one than you'd think.
I just came across this:
Code:
put the box's height divided by the default font's height times the default font's height into a height.
Does that translate to:
Code:
aheight=(box_height/font_height)*font_height
or
Code:
aheight=box_height/(font_height*font_height)
?
Either way it looks odd and doesn't read as plain, unambiguous English but more like an attempt to describe one of the formulae I typed out in mathematical notation.
And don't forget COBOL !
...
Anyway, the more I look into the details, the more preposterous the claims look to me. For example, from the manifest:
Quote:
We believe that the convoluted object-oriented approach ...
, and from the code sample:
Code:
...
A painting is a picture.
...
The print button is a button.
...
- isn't the above what in OO is called class instances ?
Likewise, in
Code:
To quit:
Relinquish control.
The quit button is a button.
...
isn't the above a callback and an instance ? And if yes, why the callback is before the widget ? Is it prescribed by plain English ?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Am I missing something or are the executables missing from the zip package? I just opened it in a Windows VM to see how it runs and I can't find anything but the source and instructions.
Edit: Sorry, I see it now -- Windows 8 kept wanting top unzip the application for some reason.
From the looks of the code it's just pseudocode relating to whichever language, Pascal I take it, it was based upon?
Not pseudocode; real code. What you see is compiled, directly, to machine language.
Quote:
Originally Posted by 273
It reminds me a little of VB (no offence) in that what at first looks nothing like a curly-bracket language turn out to have more in common with one than you'd think.
All programming languages, at bottom, have a great deal in common: types, variables, conditionals, loops, etc. But (we believe) the way things are expressed can make programming either easier or harder. For example, consider these three statements in three different languages (which extract a list of names from a comma-separated-value string):
(1) @field_names = map { s/"//g; $_ } split(/,/, $fields );
(2) string[] split = firstLine.Split(new char[]{','});
(3) Extract a name list from the comma-separated-value string.
We contend that the third is closest to the thought that is in the programmer's mind at the moment when the statement is required. In fact, it's very close to the description of the problem given just above the examples ("extract a list of names from a comma-separated-value string"). Some, I suppose, would call that mere "syntatic sugar." We call it "closer to what I was actually thinking" and "getting pseudo-code and comments for free because our 'pseudo-code' and 'comments' compile."
Quote:
Originally Posted by 273
I just came across this:
Code:
put the box's height divided by the default font's height times the default font's height into a height.
Does that translate to:
Code:
aheight=(box_height/font_height)*font_height
or
Code:
aheight=box_height/(font_height*font_height)
?
Precedence is left-to-right in Plain English. But keep reading please...
Quote:
Originally Posted by 273
Either way it looks odd and doesn't read as plain, unambiguous English but more like an attempt to describe one of the formulae I typed out in mathematical notation.
Indeed. You've selected, as an example, one of those places where a specialized syntax works better than a natural language for expressing something. We wrote this expression (and many others) out "the long way" as an experiment to see how far natural language coding could be pushed. Our conclusion was that in about 12% of a program of this type specialized syntaxes would have made things easier and clearer. But note that that leaves 88% where English was -- and still is -- our language of choice. Besides, it's a trivial matter to insert a small infix-expression parser into our scheme; but it's not so easy to go the other way (ie, to extend a typical "C" compiler to support Plain English code).
As I mentioned before, our vision for the future of programming is more like a typical math book than the natural-language-only experiments you see in our current prototype. Specifically, in our view, a program should be written primarily in a natural language, with "snippets" of specialized syntaxes (and even graphic representations) where appropriate.
Am I missing something or are the executables missing from the zip package? I just opened it in a Windows VM to see how it runs and I can't find anything but the source and instructions.
Edit: Sorry, I see it now -- Windows 8 kept wanting top unzip the application for some reason.
I've never tried the thing on Windows 8 (just XP, Vista, and 7) -- let me know how it works!
Last edited by Gerry Rzeppa; 02-17-2013 at 03:59 PM.
Reason: Correction
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
It seems to work fine, as does the painting example from what I can gather. Well, it works fine it you tell Windows to run it and not unzip it. Windows 8 is a strange beast I'm glad I don't have to use day-to-day (for now at least).
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Sorry, I missed the other reply. Why are you dividing by something then multiplying the result by it again? Written out in maths it becomes obvious that you could do without that whole process and just assign.
...
All programming languages, at bottom, have a great deal in common: types, variables, conditionals, loops, etc. But (we believe) the way things are expressed can make programming either easier or harder. For example, consider these three statements in three different languages (which extract a list of names from a comma-separated-value string):
(1) @field_names = map { s/"//g; $_ } split(/,/, $fields );
(2) string[] split = firstLine.Split(new char[]{','});
(3) Extract a name list from the comma-separated-value string.
We contend that the third is closest to the thought that is in the programmer's mind at the moment when the statement is required. In fact, it's very close to the description of the problem given just above the examples ("extract a list of names from a comma-separated-value string"). Some, I suppose, would call that mere "syntatic sugar." We call it "closer to what I was actually thinking" and "getting pseudo-code and comments for free because our 'pseudo-code' and 'comments' compile."
...
The "We contend that the third is closest to the thought that is in the programmer's mind at the moment when the statement is required" is debatable.
The "comma separated list" typically allows whitespaces around commas, but may not.
The "split(/,/, $fields );" piece of code assumes no whitespaces.
So, if I read "comma separated list", what should I assume ? Are whitespaces around commas allowed or not ?
In plain English "one,two" means the same as "one, two", but in data formats not necessarily the two are the same.
So far that "plain English" language obfuscates things - rather than making them more clear.
Sorry, I missed the other reply. Why are you dividing by something then multiplying the result by it again? Written out in maths it becomes obvious that you could do without that whole process and just assign.
Since it's all integer math, the effect is to round down the box's size to a multiple of the font size (so everything is "on the grid" and we don't end up with partial lines of text on the screen). We could have also said something like:
Round the box's height down to the nearest multiple of the font's height.
Which, no doubt, would have been much clearer. Sorry for the obfuscation. We'll get that fixed in the LINUX version.
It's kind of a fetish with us, making things fit and look nice. You'll note, for example, that in the instructions, not a single sentence ever wraps to the next page...
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by Gerry Rzeppa
Since it's all integer math, the effect is to round down the box's size to a multiple of the font size (so everything is "on the grid" and we don't end up with partial lines of text on the screen). We could have also said something like:
Round the box's height down to the nearest multiple of the font's height.
Which, no doubt, would have been much clearer. Sorry for the obfuscation. We'll get that fixed in the LINUX version.
It's kind of a fetish with us, making things fit and look nice. You'll note, for example, that in the instructions, not a single sentence ever wraps to the next page...
I still don't understand. Are you saying you're basically rounding from floating point to an integer? I don't see how dividing by something then multiplying by it does anything at all? I actually thought it may be an artefact of the way your code is written that you write out in full rather than simplifying formulae.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.