LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-06-2017, 08:29 PM   #16
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36

I'm working on more documentation as we speak. Perhaps if I get done with that in a reasonable amount of time, I could post all of it.
 
Old 04-06-2017, 11:37 PM   #17
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
P.S. - That was good feedback that sundialsvcs had. I just wanted to see if anybody else has any opinions by giving more information about it. But that is the best answer on this thread so far, and might be the answer that applies. Like I said, just seeing if anyone agrees/disagrees or has any more thoughts. That is why I'm attempting to give more information.
 
Old 04-07-2017, 06:53 AM   #18
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
My opinions are that if it is not assembly language, it is high level, and that this is not yet a language because it really is a combination of concepts using the C language, assembly language, and RPN logic.

The example in post #6 is nothing more than the C language conditional operator, written differently.
 
Old 04-07-2017, 08:13 AM   #19
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Well, the nomenclature can become a bit of a gray area. For instance, is a language "a language" only when it's designed to be used by people? Or is it a partially-algorithmic expression of something else – such as a printed page?

To my way of thinking, the term is very colloquial. It means what you mean it to mean in a particular understanding, so long as your listener understands what you intend.

I don't think that there is an Occam's Razor that can be held up to any programming language nor its syntax which will make such a subjective judgment regarding it.
 
Old 04-07-2017, 04:08 PM   #20
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
Thanks for feedback guys. This is what this thread was designed for! I will take all feedback into consideration.
 
Old 04-07-2017, 04:14 PM   #21
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by des_a View Post
Thanks for feedback guys. This is what this thread was designed for! I will take all feedback into consideration.
I think what would be helpful when you post threads about your project would be if you were to state clearly in the first post that you are working on this project and that you are eliciting feedback on certain subjects. Please re-read your original post, which while it does ask a question, it starts off with a combination of sentence or thought fragments, and therefore leads to confusion as to what you're asking or discussing, as well as why. Granted the experienced persons on LQ have seen your posts before, however I'm thinking you should not make that assumption that everyone is thinking along the exact lines you are.

It is also not very clear in that post that you're doing this personal project of developing a language.
Quote:
Originally Posted by des_a View Post
I've been considering something a lot. Is my language that I've been working on, PNFHA, really a high-level language, or is it more like a mid-level language upon which a true high-level language should be built? I can give examples, if needed. But what I find, is that the best practice so far when coding in it, is to think a bit about both what is happening in your code, and what's going on a the level below it (PNFASM).
You might want to consider a signature which cites links to the guides and documentation you have thus far.
 
2 members found this post helpful.
Old 04-07-2017, 11:56 PM   #22
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I'll try to learn to be more clear. It's tough...


Quote:
You might want to consider a signature which cites links to the guides and documentation you have thus far.
I do not have my documentation for my languages online at this point. They are text files. However, after this update if I'm not finished here first, I could put them here for people.

What I could do, is put links to all the threads for this project.
 
Old 04-08-2017, 12:13 AM   #24
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I could at least provide these as a signature...
 
Old 04-08-2017, 12:14 AM   #25
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
As you can see, I'm at least getting better at working with the languages I'm using to create these languages.
 
Old 04-08-2017, 11:24 PM   #26
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I just fixed some bugs now. But the weirdness, is still there, although it no longer crashes when it's not supposed to. Here's a better example of the weirdness:

Given this:
Code:
var a = 5;


load %accumulator variable a;
++;
atoc;
load aload 5;
switch;


==; ?
{
 print "a = ";
 println a;
}
:
println "Other value.";
;


if (a == 5)
{
 print "a = ";
 println a;
}
else
 println "Other value.";


end 0;
It produces this:
Code:
Other value.
a = 5
You'd think it would produce this if you didn't know what you were doing:
Code:
Other value.
Other value.
But it doesn't.

The code generated by the compiler is this:
Code:
VERSION TVOID 0V


ALOAD TNUMBER 5
VSTORE TVOID 0V
VLOAD TNUMBER 0
INC TVOID 0V
ATOC TVOID 0V
ALOAD TNUMBER 5
SWITCH TVOID 0V
EQU TVOID 0V
CGOTOL TSTRING "top_iftrue_1"
GOTOL TSTRING "top_iffalse_1"
LBL TSTRING "top_iftrue_1"
PRINT TSTRING "a = "
PRINTLN TNUMBER 5
GOTOL TSTRING "top_end_1"
LBL TSTRING "top_iffalse_1"
PRINTLN TSTRING "Other value."
GOTOL TSTRING "top_end_1"
LBL TSTRING "top_end_1"
; Begin if :1
ALOAD TBOOLEAN true
CGOTOL TSTRING "iftrue_1"
GOTOL TSTRING "iffalse_or_end_1"


; Begin if code :1
LBL TSTRING "iftrue_1"
PRINT TSTRING "a = "
PRINTLN TNUMBER 5
; End if code :1
GOTOL TSTRING "end_1"


; Begin iffalse_or_end :1
LBL TSTRING "iffalse_or_end_1"
PRINTLN TSTRING "Other value."
; End if or else code :1
GOTOL TSTRING "end_1"


LBL TSTRING "end_1"
; End if :1
QUIT TVOID 0


END TVOID 0V
Basically, when you ask for "a == [number]", you are asking for a compile time value of a. When you do "==", you are asking for the runtime value of the accumulator. Whether %accumulator == %calc or not. The statements after the variable assignment load the value of a into the accumulator, increment it's value, and then make sure that a is in %accumulator, and %calc = 5. Without that, %accumulator and %calc would probably contain the initial values of 0, or %accumulator might by that point have been set to "true". Note that anything uninintialized in my languages (this set of languages), is initialized to 0. It's not completely random.
 
Old 04-08-2017, 11:25 PM   #27
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I'm still documenting this, and made the changes to make documentation work.
 
Old 04-08-2017, 11:28 PM   #28
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
Note that the ?: operator has to be used instead of if, because if takes an expression, and ?: takes stmt's. ==, is a stmt, not an expression. All expressions are stmt's too though. But there would need to be major rewrites if I allowed if to take a stmt. I kind of like it this way, even though there are some gotcha's for the novice programmer to watch out for.
 
Old 04-14-2017, 09:08 PM   #29
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I won't be done with the documentation for awhile, so I guess that's for another thread...
 
Old 04-14-2017, 09:09 PM   #30
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I guess there are no more opinions from the information I've given. Thanks for what you gave. Thanks! I'll consider them.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for full-time mid & senior level Systems Administrator(s) in Santa Monica, CA BrianK LQ Job Marketplace [Archive] 0 12-08-2008 07:33 PM
emacs in run level 3 then switch to X (level 7) then back to level 3 dsoliver Slackware 3 09-01-2006 03:31 AM
Junior to Mid-Level Systems Administrator Position kordump LQ Job Marketplace [Archive] 0 08-10-2006 08:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration