go away spammer

Author Topic: human speakable programming language  (Read 5518 times)

0 Members and 1 Guest are viewing this topic.

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
human speakable programming language
« on: December 31, 2009, 01:17:57 AM »
currently developing a human speakable programming language.
to make programming more accessible to homo-sapiens.

in example a hello world would be:

subject quote hello world end-quote do say to console ya

am interested in what features should be designed for related to robot making,
currently I've thought of,
AI algorithms, such a genetic-evolution and neuro-nets
event driven queues for selectable input.

what features you as a robot enthusiast would like to see in it?

« Last Edit: December 31, 2009, 01:20:38 AM by loki »

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: human speakable programming language
« Reply #1 on: December 31, 2009, 11:33:07 AM »
It seems a bit redundant, as you're just replacing " with the word quote.
As far as robot features goes, if you can compile it for a microcontoller then it'll work for robots.
Save yourself the typing. Just call me Zach.

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: human speakable programming language
« Reply #2 on: December 31, 2009, 01:08:49 PM »
It seems like there have been languages like this and they have never caught on. Not trying to discourage you, just warning you. When you try to make it "human speakable" you'll end up with really long code that is limited to the extent of the human language. Some things in code just can't be easily expressed in "normal" language. But maybe that's just my opinion?  :-\
« Last Edit: December 31, 2009, 01:10:34 PM by Trumpkin »
Robots are awesome!

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: human speakable programming language
« Reply #3 on: December 31, 2009, 02:49:54 PM »
I agree with Trumpkin. The closer you bring machine language to human language, the more overhead you get in return.

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: human speakable programming language
« Reply #4 on: January 01, 2010, 12:11:42 PM »
addressing comment about overhead.

There is a variation of the language for assembly level programming.

which is quite close to machine code.


roughly decompiled a linux hello-world looks like this

32bit num-constant-copy_to_2-it_from hex-num e
32bit num-constant-copy_to_1-it_from hex-num 28
num-constant-copy_to_3-it_from hex-num 1
32bit num-constant-copy_to_0-it_from hex-num 4
interrupt linux_kernel
jump hex-num 3
32bit registerCopy from 3-it to 0-it
32bit num-constant-copy_to_0-it_from hex-num 1
interrupt linux_kernel
Hello, world!

the source for it can be:

suj name text be section ya
suj name start be function ya
suj num hex e obj 2-it do copy ya
suj num hex 28 obj 1-it do copy ya
suj num 1 obj 3-it do copy ya
suj num 4 obj 0-it do copy ya
suj name linux kernel do interrupt ya
to name exit do jump ya

suj name exit be function ya
suj 3-it obj 0-it do 4byte copy ya
suj num 1 obj 0-it do 4byte copy ya
suj name linux kernel do interrupt ya

suj name data be section ya
suj name message obj quote hello world enquo be byte data ya

that's both human-speakable and about as low level as possible.
since it's a human-speakable assembly version.

note suj is subject or input, and obj is object or output (what gets modified).

there can also be a secondary translator that can take code without the explicit suj obj marking,
though they'd have to be in a predefined order to resolve which is which.

address resolution with names for functions will be added in as well.
i'm still doing rapid prototyping for the language.

simplicity and reliability are the main goals.
your input is valued.
« Last Edit: January 01, 2010, 12:55:11 PM by loki »

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: human speakable programming language
« Reply #5 on: January 01, 2010, 03:04:56 PM »
Why do all that typing when you can just use regular assembly and have lines of code be only 4 or 5 characters?
Save yourself the typing. Just call me Zach.

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: human speakable programming language
« Reply #6 on: January 01, 2010, 05:51:48 PM »
Why do all that typing when you can just use regular assembly and have lines of code be only 4 or 5 characters?

a) so it is easy to read and understand what is happening

b) can use a speech to text device for programming.

c) using a vertically integrated language,
whose basic formulation or syntax works from assembly to domain-specific applications.

designing vertically integrated operating system,
that uses just the one language.

Also note that this is just the English translation, can also use Hindi, Chinese or language of your choice.
the intermediate bytecode is an oligosynthetic language,
can learn that if you really want some speed,
and even some insight.
« Last Edit: January 01, 2010, 05:55:30 PM by loki »

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: human speakable programming language
« Reply #7 on: January 01, 2010, 06:08:46 PM »
It would be a lot practical to just use this voice input:

"Display hello world"

the other method basically requires the user to know the language, which defeats the purpose of verbal programming.

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: human speakable programming language
« Reply #8 on: January 01, 2010, 07:17:25 PM »
"suj name text be section ya" doesn't exactly roll off the tongue if you know what I mean, so speech to text wouldn't be much easier than any other similar language.
And as far as being able to tell what's going on, it doesn't really have any structure to it, which can't make up for any amount of english involved.

Not trying to be mean or anything, I'm just giving you what you asked for: Good honest feedback.
Save yourself the typing. Just call me Zach.

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: human speakable programming language
« Reply #9 on: January 01, 2010, 11:55:40 PM »
It would be a lot practical to just use this voice input:

"Display hello world"

the other method basically requires the user to know the language, which defeats the purpose of verbal programming.

you still need to know a language, in particular English.
Yes, learning a language is a prerequisite to using it.

Purpose of having a verbal programming language are several.

can speak fluently in the language,
as with other spoken languages.

Also it becomes more accessible to females.
Which is more than half the populace.

Current programming languages are math based, which is a largely silent symbolic language utilizing spatial manipulation.
Males have superior spatial manipulation abilities due to their brain structure.
Females are better with verbal words.

"suj name text be section ya" doesn't exactly roll off the tongue if you know what I mean,
so speech to text wouldn't be much easier than any other similar language.
well it rolls of as easily as English.

It actually is easier than colloquial English,
as it uses regular verbs and has a standard grammar.

Quote
And as far as being able to tell what's going on,
it doesn't really have any structure to it,
which can't make up for any amount of english involved.
it does have structure.
quite a bit more than ordinary English.

for instance it has case or argument markers.
English has case markers as well, to, for, from, at, of
these are included,
but suj and obj are added, since English doesn't have them.

let's take the example you started with

"suj name text be section"

this brakes down into two phrases

"suj name text" and "be section"

be indicates a verb of a declarative data statement.

suj indicates it's the subject, or main input, can think of it as the first argument.

"name text" is the argument.
name is a type indicating a string that can be resolved to an address
text is the value of the type

Quote
Not trying to be mean or anything, I'm just giving you what you asked for: Good honest feedback.
Sure...

I'm happy to clarify and explain.

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: human speakable programming language
« Reply #10 on: January 02, 2010, 12:47:08 AM »
It is very very very hard for adults to learn a new language. It may be best to simplify things and not create a new spoken language.

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: human speakable programming language
« Reply #11 on: January 02, 2010, 10:21:51 AM »
And if you're going to make a new language, why even base it off of english with all its peculiarities?

Honestly, I don't see myself ever using it. It seems like a good idea untill you get into practice.
Save yourself the typing. Just call me Zach.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: human speakable programming language
« Reply #12 on: January 02, 2010, 08:19:19 PM »
The bottom line i wanted to get across, is this:

If creating an easily understandable language that is still efficient were possible, why has it not been done so already?

The Answer:

It has been attempted, many many times. But none ever met the criteria of "understandable and efficient" to be accepted by the programing society. Many believe languages like C, C++, C# don't even meet that requirement.

If you main goal is simplicity, try going to someone that does not have a analytical mindset at all (basically anyone the BA degree), and see if they understand it.

I wish you luck in your venture, just realize it has been attempted before, and not many have succeeded yet.

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: human speakable programming language
« Reply #13 on: January 02, 2010, 11:57:17 PM »
It is very very very hard for adults to learn a new language.
there are studies to contradict that.
for instance there is a way of learning a language as a child learns it,
by simply listening to it for two years,
and the brain learns.

it may appear "hard" for someone that learns rules of grammar,
but the actual language may approximate those rules,
yet has many distortions,
due to a large amount of colloquialisms,
and exceptions.

regular languages with consistent grammars,
like programming languages,
are relatively easy to learn.

Quote
It may be best to simplify things and not create a new spoken language.

well if you had looked over any of the example code,
you would have noticed it is largely English.

In fact the suj and obj can be removed,
as long as people are aware they are still there implicitly.

English is SVO

so instead of writing suj num 24 obj reg 0 do copy ya
can say

num 24 do copy reg 0 ya

where reg 0 is ax, and the ya represents a spoken period.

in this manner it is as close to the native speaker as possible.

there can be translations for bengali and french,
the intermediary oligosynthetic bytecode representation  is the same.

you don't need to learn the oligosynthetic bytecode language,
that's just for those curious,
and computers to speak to each other quickly.


And if you're going to make a new language, why even base it off of english with all its peculiarities?
like I've mentioned before,
the oligosynthetic langauge is a bytecode,
and isn't very similar to english at all.

here's a sample of the oligosynth hex at current revision
num phoneme            meaning(s)
0      pause                 none,   zen, happy
1      i in ding              not,      negation, aware  
2      o                        and,     desire, lust
3      e                        or,        free,  choice

4      a                        hold, point,  anchor, commitment, heart-love
5      s                        put, say, express,
6      sh                      get, hear, listen
7      f                         move, gateway, time

that's the first eight, it's also based on the chakra's as described by various ancient and modern mystics.

can be recombined,
for instance the mov function,
is copy, read-write, or 65 sh-s

Quote
Honestly, I don't see myself ever using it.
it's your choice
Quote
It seems like a good idea untill you get into practice.
you haven't had the chance to practice it.

I've only got prototype or proof-of-concept compilers so far.

The bottom line i wanted to get across, is this:

If creating an easily understandable language that is still efficient were possible,
why has it not been done so already?
well it's incremental.
it's been getting easier over time.

we started with 1's and 0's,
grouped as hexadecimal,
moved to acronyms,
then to camelCase,
now to grammatical case.

Quote
The Answer:

It has been attempted,
many many times.
basic, cobol, forth.

hmmm, well that's a crowd. :)

Quote
But none ever met the criteria of "understandable and efficient"
to be accepted by the programing society.
Many believe languages like C, C++, C#
don't even meet that requirement.
well they have lots of math-syntax (+=<

it's sticking hieroglyphs in the middle of phonetic words.

also based on noam chomsky's version of language which is also based on math.
everything needs parenthesis ({[}]) in chomsky lang.

yet it hardly ever crops up in natural human lang.

who said enquo or "end-quote"? people use their fingers in imitation of the " hieroglyph.
typically end-parenthesis are implicit.

Quote
If you main goal is simplicity,
try going to someone that does not have a analytical mindset at all
(basically anyone the BA degree), and see if they understand it.
I asked my girl friend,
BA in psychology,
she gets it.

Quote
I wish you luck in your venture,
thanks :-)
Quote
just realize it has been attempted before,
I do
Quote
and not many have succeeded yet.
some have,
more will.
« Last Edit: January 03, 2010, 12:33:39 AM by loki »

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: human speakable programming language
« Reply #14 on: January 03, 2010, 06:56:00 PM »
I still don't think the benifits outweight the disadvantages of it, but good to know that language development is alive and well.
But who am I to say? I prefer asm to C, so maybe I'm just the odd test case.
Save yourself the typing. Just call me Zach.

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: human speakable programming language
« Reply #15 on: January 03, 2010, 08:44:33 PM »
I still don't think the benifits outweight the disadvantages of it,
but good to know that language development is alive and well.
the only disadvantages I've seen you mention is that there would be more typing than using traditional asm.

though in terms of programming,
typing speed is rarely an issue,
more often readability is more valued.

as is seen the the trend away from acronyms and towards camelCase.

Quote
But who am I to say?
I prefer asm to C,
so maybe I'm just the odd test case.
Hey I do to! :D

Assembly is surprisingly flexible yet simple.
I also like how close it is to machine code.
That's (one) why the initial HSL (human speakable language),
is an assembly version.

It's also easier to make an assembly version than a higher order language.
gotta start somewhere.

thanks for the support :-)
I appreciate it.
« Last Edit: January 03, 2010, 08:48:26 PM by loki »

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: human speakable programming language
« Reply #16 on: January 03, 2010, 08:50:21 PM »
Typing speed rarely an issue!? LOL
The faster you can type, the faster you can get your ideas converted to action. The more you have to type, the more time is needed between thought and execution.
I like asm because there's a finiteness to it, it's just all about order and structure.
Save yourself the typing. Just call me Zach.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: human speakable programming language
« Reply #17 on: January 04, 2010, 02:28:44 PM »
IMHO, the most difficult part in programming is not learning a language (it's syntax), It's designing the algorithm, i.e. find a way to compute the solution to for your problem.
Modern scripting languages like python or ruby already simplifies most of the stuff you don't want to be dealing with (memory allocation, data structures...). Their syntax is simple
enough to be learned in a few hours.

You're addressing the wrong issue with your speakable programming language.

Chelmi.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: human speakable programming language
« Reply #18 on: January 04, 2010, 03:46:06 PM »
I agree with chelmi.  It took me a day to learn

Void main
{
Do(stuff);
return;
}


But I am still learning techniques in c (like structs and other complex data forms) after years of hobby programming.

So until a "human speakable" language can read this :

"Collect data from 3 sensors and send to serial"

You are not going to get 'non-geeks' to use it.

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: human speakable programming language
« Reply #19 on: January 20, 2010, 06:23:31 PM »
I agree with chelmi.  It took me a day to learn

Void main
{
Do(stuff);
return;
}


But I am still learning techniques in c (like structs and other complex data forms) after years of hobby programming.

So until a "human speakable" language can read this :

"Collect data from 3 sensors and send to serial"
ya do collect bo data from com sensor 3 to com serial

would be the HSPL or Huspol version.

Quote
You are not going to get 'non-geeks' to use it.

see,
it's really quite simple.

ya su we be able to use bo name huspol
for communicate to we you

ya do have bo a nice day
ya su we be happy
ya su me be say bo wu yay

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: human speakable programming language
« Reply #20 on: January 20, 2010, 07:12:09 PM »
What if you mess up? What if you want to restructure your program? move things around?

Also, normal people want to sound normal. Saying "ya su me be say bo wu yay" is very alien. Something like "Do this and then do that" would be more accepted (more similar to original language)

Offline lokiTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: human speakable programming language
« Reply #21 on: January 20, 2010, 07:54:18 PM »
What if you mess up? What if you want to restructure your program? move things around?

Also, normal people want to sound normal. Saying "ya su me be say bo wu yay" is very alien. Something like "Do this and then do that" would be more accepted (more similar to original language)

da be thank bo you

da su lang huspol be define by regular-grammar

de su normal be relate bo not sad from nor mal
so bo  lang huspol be normal like happy

ya su we be happy

da su lang english be miss bo words for subject and object and sentence connectors
da su lang huspol be contain bo the words

da su lowki be author

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: human speakable programming language
« Reply #22 on: January 20, 2010, 08:22:34 PM »
Quote
da be thank bo you

da su lang huspol be define by regular-grammar

de su normal be relate bo not sad from nor mal
so bo  lang huspol be normal like happy

ya su we be happy

da su lang english be miss bo words for subject and object and sentence connectors
da su lang huspol be contain bo the words

da su lowki be author
Huh? I'm sorry but that is horribly confusing.
« Last Edit: January 20, 2010, 08:23:57 PM by Trumpkin »
Robots are awesome!

Offline nottoooily

  • Full Member
  • ***
  • Posts: 91
  • Helpful? 3
Re: human speakable programming language
« Reply #23 on: January 21, 2010, 08:16:33 AM »
Haha I can't stop laughing when I try to say these things!

What application do you actually expect it might be of use in? Talking to the computer, sure. But is it really more efficient or easier to learn than just saying it like you'd type it: "ex equals one plus one semicolon" ?

Is this a postgrad project?

I know there's a lot of nay-sayers here, but if I was going to go to this much effort I'd want to make the computer understand a subset of a real language. Maybe you'd be saying "add one and one and put the result in x". Well that's clearly not your goal, but what is the goal?



suj name text be section ya
suj name start be function ya
suj num hex e obj 2-it do copy ya
suj num hex 28 obj 1-it do copy ya

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: human speakable programming language
« Reply #24 on: January 21, 2010, 04:49:22 PM »

ya do collect bo data from com sensor 3 to com serial


Really? so how did your language know what kind of sensor it's referring too? Infrared? Ultrasonic? And it knew all on it's own to set up a hardware timer, generate a pulse, then count the timer clicks till a pulse was received? Or was it an Sharp IR, and it set up the A2D bus correctly, and measured the output and converted a non-linear relationship to distance? How did it know what pins were connected  to the sensor? How did it know which Uart to use? Or what baud rate to use it at? What if the sensor was on a I2C bus? How would the language know to set that up?

Again, if your goal is to create a 'easily understandable' language for non-geeks, then it will also have to do the thinking for them. If they were knowledge enough to answer all my questions in my last paragraph about sensors, then chances are they already know a little C++.

 So who exactly is your target audience?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: human speakable programming language
« Reply #25 on: January 21, 2010, 08:57:41 PM »
Hi,

da be thank bo you

da su lang huspol be define by regular-grammar

de su normal be relate bo not sad from nor mal
so bo  lang huspol be normal like happy

ya su we be happy

da su lang english be miss bo words for subject and object and sentence connectors
da su lang huspol be contain bo the words

da su lowki be author


Gee, If you ad a few cords of music (3 at most), I'm sure it would be a hit among acid heads (or perhaps devil worshippers - sing it backwards with feeling and it might be understandable) ;D

Apart from that, I really don't think you'll get a less complicated language like that and I have been programming since the mid-seventies and seen much better languages go out of fashion.

I know it's hard to give up on a heart child, but in my honest opinion, I will advise you to rethink the idea and put all that effort into something usefull, like a compiler (or even an interpreter) to translate real language (as spoken) into machine code instead of arguing for something that only your girlfriend cheer for (she will cheer anyway, cause you are her "man").

Making a compiler is dead easy - making a usefull compiler takes a bit more work.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here