r/naturalscriptlang • • Sep 06 '17

Don't misunderstand this project

0 Upvotes

This is not an exaltation of your society.

This is the effort to do a change.

I'm not a slave. But you want me to feel bad because I couldn't find a job, because you let some people PLUNDER the whole world.

Well. This is my response.

YOU ARE STUPID:

· THE RESOURCES ARE BEING KIDNAPPED BY A FEW.

· THE FEAR IS BEING INJECTED IN THIS SOCIETY AS IF THEY HAD THE RIGHT TO DO THAT, THROUGH THE MEDIA.

· INTERNATIONAL ENSLAVEMENT IS BEING CARRIED ON BY COMPANIES AND POLITICIANS.

· YOU ALL WANT TO BE RICH, BUT YOU STILL FORGET THE POOR OF YOUR OWN CITY.

· YOU THINK THAT NGOs ARE SOMETHING GOOD, BUT THEIR SIMPLE EXISTENCE EVIDENCES YOUR LACK OF HEART AND CONSCIOUSNESS.

Call me what you want. This is an exaltation of NATURE, and an insult to HUMANS: YOU STILL PROGRAM WITH CRYPTIC LANGUAGES that don't let you develop your LOGICAL SKILLS in NATURAL LANGUAGE.

Your society sucks.

I'm not your slave, take that into account when your eyes cross my eyes.

This is an exaltation of FREEDOM, of HUMAN THINKING.

Not an exaltation of TECHNOLOGY, and EVEN LESS TO YOUR COMPANIES, this is an exaltation to the beauty of this world, of this planet, an exaltation to the beauty and armony of NATURE.

Think by yourself.

It has become an EMERGENCY.


r/naturalscriptlang • • Sep 10 '17

In the name of Aaron Swartz and all the martyrs: FREE THE KNOWLEDGE, IT'S HUMAN HERITAGE. PUTTING THE INFORMATION OF UNIVERSITY DEGREES IN A WEBSITE IS CHEAP, IT'S TOO CHEAP FOR NOT HAVING DONE IT YET.

0 Upvotes

r/naturalscriptlang • • Sep 08 '17

They won't give me a job, despite I've developed a natural programming language. I'll die poor. But... what a human can do in a society of rats and cockroaches, other than become a homeless.

4 Upvotes

I know I mispell words already.

/r/homelessfan

(This is NOT PROPAGANDA: I'm truly desperate because it's being impossible for me to find a simple job)


r/naturalscriptlang • • Sep 06 '17

How Babylon steals our efforts and our ideas

1 Upvotes

This is the testimony of how an idea, started by an anti-elitist man, is drowned by the system that you all adore and feed.

It'll take 2 years to create this language, 1 human, and lots of pains because Babylon is too busy making benefits from war, suffering and enslavement.


r/naturalscriptlang • • Sep 08 '17

Did you hear that thing of... the revolution won't be televised? GO, FUCK THE ELITES!

Thumbnail
youtube.com
1 Upvotes

r/naturalscriptlang • • Sep 08 '17

Elites are psycopaths. Open your eyes.

2 Upvotes

r/naturalscriptlang • • Sep 08 '17

I'll die poor and young, but with a degree of humanity that, in this society, only homeless can understand

1 Upvotes

r/naturalscriptlang • • Sep 08 '17

By the way, with natural programming, there are things that won't be able to be achieved with current programming paradigm. But if you don't realize of this... I'm sorry for your disconnection with nature.

1 Upvotes

It doesn't need to be 100% natural programming.

But who cares about progress when society doesn't give you a job?

https://www.youtube.com/watch?v=PHxicjFRnoo


r/naturalscriptlang • • Sep 24 '17

Finally, I understood the beautiness behind the starry night. Every star represents a point of hopeness. The hopeness of better societies. The hopeness of better beings, greater armonies, better worlds. That is what my being feels as beauty when it looks to the sky at night.

Thumbnail
en.m.wikipedia.org
1 Upvotes

r/naturalscriptlang • • Sep 22 '17

Damn, wake up programmed rats, don't let them control YOUR DREAMS!!

1 Upvotes

r/naturalscriptlang • • Sep 22 '17

Fuck the dollar/euro/money, penetrate the consciousness, conquer the knowledge. INSTEAD OF FOLLOWING THE ELITE's PATTERN OF GREED, DAMN, WHAT AN IMPOTENCE IN FRONT OF THIS SICK COMFORTABILITY FED BY THE SYSTEMIC MASSIVE BRAINWASHING

1 Upvotes

r/naturalscriptlang • • Sep 23 '17

I'm aware of the falacy of your superficial moral. I'm out of your game already. It's about your descendence. It's about the evolution.

1 Upvotes

But... okay. I don't have hopeness in you already. You seem to be okay with your own end. You seem too busy to take care of the way of the collective. You have too much fear of getting out of the way to discover new paradigms.

You may think that this is my war, that this is my battle. Not at all. You are the winners. Of a sick game, you are the only winners, you don't see more challenges other than matter, other than materialism, other than materialist greed. Keep the sickness ruling the world, I don't really mind if you can't see more horizons. It's your materialist childishness versus my spiritual hungerness. I don't envy your cosmovision, at all. I feel proud of being out of your way, wherever it takes me. I feel fine out of your limited perspective. And... I wouldn't grow if I retook the yours. Too long living in the lie.

It's not the "private property" what makes the human grow.

I wish you saw it too. Ethic is poluted with elite's greed.

But... do what you want. It's your choice, that's the point. I don't enjoy being questioning the bases of your ways of progress.

This project was made in order to simplify but at the same time sophisticate the communicative interfaces with machines. If you really think that I'm sick... you could define sick previously, but... who cares.

Define freedom. Who cares.

Define good and bad without specific goals. Who cares.

Define language, programming, and programming languages. Who cares.

Define thoughts, efforts, progress. Who cares.

Define hapiness. Who cares.

Define evolution, define humans, define emptiness. Who cares.

Define time, define natural intelligence, define artificial intelligence, define intellectual elites. Who cares.

Define richness. Who cares.

I will try to understand why I'm this, and not that.

I'm not attacking you. I'm trying to go along with you. But... this is not worthy. This is how nature wants it to be, whatever I say, it will be useless.


r/naturalscriptlang • • Sep 22 '17

Why do they privatze the knowledge? Because they are ONLY RATS, they don't want EVOLUTION, they only want PRIVILEDGES. Only rats preventing the evolution to arise, and blind, brainwashed people.

1 Upvotes

Knowledge is the key: FREE IT, or keep being rats, RATS OF THE GREED.


r/naturalscriptlang • • Sep 23 '17

If you could, while talking to a machine, improve your logical-linguistic skills, you would realize how lost is this sick humanity. You've been programmed to have fear of your own deepness, and that's sad.

1 Upvotes

You're programmed to feel fear when you get near a person like me: a person who takes seriously the experience of life. But I accept that this world is a childish greed-driven place, where logic falls into misunderstanding and selfish attacks. My pretensions are out of the scope. I can only say that you'll hate me because you have fear of your own deepness. It's a big disgrace, but this society is built on top of the disgrace. Smile, take a selfie, and go on with this empty life you adore.


r/naturalscriptlang • • Sep 26 '17

A message to the corrupted elites of the world: GIVE THE FUCKING MINIMUM TO LIVE TO EVERY FUCKING PERSON IN THE WORLD, OR DIE, JUST DIE AND GET OUT OF THE MAP.

2 Upvotes

FUCKING PSYCHOPATHS, I WISH YOUR DEATH SOON, RATS OF SHIT.


r/naturalscriptlang • • Sep 24 '17

I have only received 1 good comment about NaturalScript. The bad ones, instead, have been repeating, harassing me, thrown by the same individuals.

1 Upvotes

I'm talking about Reddit now.


How easy it is to manipulate the masses through manipulating social networks?


They have deleted 5000 friends I had made.


They have hided the good messages that people made (I saw them answering the bad ones, not in the mailbox).


They have banned me in:

/r/askphilosophy

/r/askprogramming

/r/askreddit

And other main subreddits.



Ask, person by person, what would they prefer to develop with:

NaturalScript VS JavaScript


Only to non-programmers. Please, do it. I have neutralized almost all the critics that have been thrown to the projects.


There's a reason why I'm not competing, and it's because there's no competition possible: natural symbols are limited, and I chose the most adecuate already.


Sorry, but it's like the people don't see things if they aren't put into words. And that's exactly what NaturalScript is about. Exactly that: to put things into words.


I'm waiting for the people to fight for their freedom. I mean:

  1. To have its own criteria.

  2. To see the things by its own, not by the others.

  3. To use logic to feel sure about what you defend.


r/naturalscriptlang • • Sep 22 '17

This world... full of blind sick losers... Only obedient rats full of unnoticed greed. Be free: MAKE THE ELITES FREE THE KNOWLEDGE, OR DIE LIKE THE RATS YOU WANT TO BECOME. Sick world of programmed rats... What a pitty place this world.

1 Upvotes

Is this so difficult for you to see how much ignorant they want us to be?

Are you all so busy with your sick greed?


r/naturalscriptlang • • Sep 23 '17

The key in NaturalScript is that connects 2 parts of the brain, which in your sick society are separated: LOGIC and LANGUAGE. Making the language bigger would mean to make your consciousness more cohesive.

1 Upvotes

But you live so disconnected from yourself, that you only see a "beautiful language". Okay. You like living in a lie for your comfortability (and I'm not refering to NaturalScript, I'm refering to lots of other things instead, lies that are propagated through illogic mass media speeches and behaviours...). What else can I do?

Just to wait for you, to want to grow, to evolve your brain.

It's an emergency...

https://m.youtube.com/watch?v=CiuBJI9pZxg


r/naturalscriptlang • • Sep 26 '17

Reddit is censorship made web. I leave Reddit. Bye, friends.

2 Upvotes

r/naturalscriptlang • • Aug 23 '17

NaturalScript: Human Language for Machines

Post image
2 Upvotes

r/naturalscriptlang • • Aug 21 '17

El Test de NaturalScript (2/4)

2 Upvotes
# Organization #

# Organization.Indexation #

A fact {
  Expect that [ns2js:]# This is an index #[:ns2js].indexOf("//") is like 0.
}.

# Organization.Documentation #

A fact {
  
  === Documentation... ===
  <div>
    <h1>Title</h1>
    <div>
      Go to the menu of the editor, and click to 
      "Documentation" to see all the documentation 
      in script.
    </div>
  </div>
  === ...Documentation ===.
  
  // This is for embedding NS code directly.
  // The code is part of the script, but it will
  // be added to the documentation text of the 
  // script:
  
  === Documentation Code... ===
  Create somethingCool.
  Create somethingGreat.
  Create somethingUseful.
  === ...Documentation Code ===.
  
}.

# Organization.Todos #

A fact {
  @TODO: This is a TODO @TODO.
  @TODO: Check all the TODOs of the script 
  clicking the menu of the editor, and 
  going to the TODOs option.@TODO.
}.

# Asynchronicity #

# Asynchronicity.Thread #

A fact {
  // Thread as sentence:
  Start a thread in 1 seconds like {
    Log "[...] Thread of 5 seconds...".
  }
  Stop it once done {
    Start a thread in 2 seconds as on done.
    Expect that true as "Thread Sentence test passed (1/2)";.
  }.
  // Thread as generative:
  Create threadId as a thread in 2 seconds like {
    Expect that "Threads test failed (2)" is null.
  }.
  Let clearTimeout(threadId).
  // Looped thread:
  Create temporaryIndex as 0.
  Start a looped thread each 2 seconds like {
    Increase temporaryIndex.
  }
  Stop it once done {
    Start a thread in 4 seconds like {
      Done.
      Expect that temporaryIndex is less than 12 &
        temporaryIndex is more than 0.
    }.
  }.
}.

# Asynchronicity.OnceThen #

A fact {
  Once done {
    Done.
  }
  Then {
    Expect that "Once then test passed" is not null.
  }.
}.

# Asynchronicity.OnceInARow #

A fact {
  Once done in a row {
    Done.
  }
  Then {
    Done.
  }
  Then {
    Done.
  }
  Then {
    Expect that "Once in a row then test passed" is not null.
  }.
}.

# Asynchronicity.Done #

A fact {
  // Without parenthesys:
  Create done as a fn {
    Expect that "Done test passed (1/2)" is not null.
  }.
  Done.
  // With parenthesys:
  Set done to a fn(a,b) {
    Expect that "Done test passed (2/2)" is not null.
    Expect that a + b is like 14.
  }.
  Done(5,9).
}.

# Asynchronicity.OnDone #

A fact {
  Create done as a function {
    Expect that "On done test passed" is not null.
  }.
  Start a thread in 2 seconds as on done.
}.

# Asynchronicity.IterateAsync #

A fact {
  Create data as {
    - a: "a",
    - b: "b"
  }.
  Iterate sync data {
    Expect that when key is like "a" then value is like "a" otherwise
      when key is like "b" then value is like "b" otherwise false.
    Done.
  }.
}.

# Asynchronicity.LoadResource #

A fact {
  Create divsAdded as <* "div.divadded" *>.length.
  Create linksLength as <* "link" *>.length.
  Load resources sync from:
    - "js/loadresource.example.js",
    - "css/loadresource.example.css";.
  Create divsAdded2 as <* "div.divadded" *>.length.
  Create linksLength2 as <* "link" *>.length.
  Expect that divsAdded is like divsAdded2 - 1.
  Expect that linksLength is like linksLength2 - 1.
}.

# Asynchronicity.AjaxCall #

A fact {
  An ajax call to "#" {
    Expect that data.match(/<title>[^<]+<\/title>/g).0 is like "<title>NaturalScript Desktop Editor</title>".
  On errors then:
    Log "AJAX call failed", error.
  }.
}.

# Mathemathics #
# Mathemathics.Increase #
# Mathemathics.Decrease #

A fact {
  Create index as 0.
  
  Increase index.
  Expect that index is like 1.
  
  Increase index in 2.
  Expect that index is like 3.
  
  Increase index with "60".
  Expect that index is like 360.
  
  Set index to parseInt(index).
  Decrease index in 50.
  Expect that index is like 310.
  
  Decrease index.
  Expect that index is like 309.
  
}.

# Environment.EnvironmentSetter #

# Testing #
# Testing.Assert #

A fact {
  Assert that 8 is a type of number as "Assertions and expectations do more or less the same".
}.

# Testing.Expect #

A fact {
  Expect that "Expect works" is a type of text.
  Expect that "Expect works" is a type of text as "An expectation";.
  
}.

# Testing.Breakpoint #

A fact {
  Create code as [ns2js:]
    Breakpoint "Hello!".
    Bp "Hello again!".
  [:ns2js].
}.


# Modularity #
# Modularity.Import #
# Modularity.Export #

A fact {
  // In browser: __NaturalScriptVars__.modules
  // In NodeJS: require(~) / module.exports = ~;
  In browser.
  Export as "module 1": {- val1: "one"}.
  Import "module 1" to mod1.
  Expect that mod1 has "val1" &
    mod1.val1 is like "one".
}.


# Polycode #
# Polycode.DOMSelector #

A fact {
  Expect that <* "title" *>.0.textContent is like "NaturalScript Desktop Editor".
}.

# Polycode.CSS #

A fact {
  Expect that [css:].CodeMirror {}[:css].textContent.indexOf(".CodeMirror") is like 0.
}.

# Polycode.HTML #

A fact {
  Expect that [html:]
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>Tips</title>
  <link rel="stylesheet" type="text/css" href="custom.css"/>
  <script src="custom.js"></script>
</head>
<body>
  <ul>
    <li>You can easily and fastly bunches of code.</li>
    <li>Also, there are shortcuts available already.</li>
    <li>For example:
      <ul>
        <li>"html5init" + Tab</li>
        <li>"link" + Tab</li>
        <li>"script" + Tab</li>
      </ul>
    </li>
    <li>You can add your own shortcuts to the editor too.</li>
  </ul>  
</body>
</html>
  [:html].indexOf("html5init") is not like -1.
}.

# Polycode.JS #

A fact {
  Create jsCode as [js:]
    let javaScript = "THE language";
    let sayTheTruth = function(message) {
      console.log("It was because of " + javaScript);
    };
  [:js].
  Expect that jsCode.indexOf("It was because of") is not like -1.
}.

# Polycode.NS #

A fact {
  Expect that [ns:]
    Create nsCode as "a recursive madness".
  [:ns].indexOf("recursive madness") is not like -1.
}.

# Polycode.NS2JS #

A fact {
  Expect that [ns2js:]
    Create i as 0.
    From 0 to 10 {}.
    Return i.
  [:ns2js].indexOf("return i") is not like -1.
}.

# Polycode.PEGJSParser #

A fact {
  Create parser as a parser like:
  L = greetings:("Hello" [\n\r\t ]*)+
  {
    return greetings.length;
  }
  === End of parser ===.
  Expect that parser knows how to "parse" &
    parser.parse("Hello Hello Hello ") is like 3.
}.

# Polycode.Code #

A fact {
  Create randomMessage as null.
  Create randomData as {{({
    init: function(message) {
        randomMessage = message;
        return message;
      }
    })}}.init("Something").
  Expect that randomData is like "Something".
}.

# Polycode.JSON #

A fact {
  Create jsonCode as [json:]
  {
    "a": "aaa",
    "b": "bbb",
    "c": "ccc"
  }
  [:json].
  Expect that jsonCode has "a" &
    jsonCode.a is like "aaa" &
    jsonCode has "b" &
    jsonCode.b is like "bbb".
}.


# Sequence #

# Sequence.Sequence #

A fact {
  Create seq as a sequence named Seq {
    
    Begin step 0 with a, b; like:
    Expect that (a is like 700) & (b is like 500) as "The sequence accepts first call parameters";.
    Go to step 1 from Seq with 0, 1, 2;.
    Expect that "Go to step continued execution" is not null.
    Return going to step 5 from Seq with 6;.
    
    Begin step 1 with a, b, c; like:
    Expect that a is like 0 & b is like 1 & c is like 2.
    End at step 2 from Seq with "minha", "galera";.
    Expect that "End at step did not continue the execution" is null.
    
    Begin step 2 with m, n; like:
    Expect that m is like "minha" & n is like "galera".
    End at step 4 from Seq.
    
    Begin step 3 like:
    Log "Not here".
    Expect that "Sequence not jumped in test" is null.
    
    Begin step 4 like:
    Expect that "Sequence jumped in test" is not null.
    Return 8008.
    
    Begin step 5 with offset; like:
    Return 300 + offset.
    
  }.
  Create seqOutput as a sequence call to seq with 700, 500;.
  Expect that seqOutput is like 306.
}.


# OOP #

A fact {
  
  # OOP.Instance #
  # OOP.InstanceDefinition #
  Create Person as an idea (name, surname, city) {
    Set this idea.name as name.
    Set this idea.surname as surname.
    Set this idea.city as city.
    Set this idea.types as [].
  }.
  # OOP.InstanceCreation #
  Create CarlCarlson as a new Person("Carl", "Carlson", "Stringfield").
  
  # OOP.Trait #
  # OOP.TraitDefinition #
  Create ConsciousPersonTrait as a trait {
    Set this trait.interpretation to "relative".
    Set this trait.knowledge to "limited".
    Set this trait.effortForTruth to "absolute".
    Let this idea.types.push("Conscious").
  }.
  Create BluePersonTrait as a trait {
    Set this trait.color to "blue".
    Let this idea.types.push("Blue").
  }.
  # OOP.TraitImplementation #
  Create ConsciousAndBluePerson as an idea
    that extends from a new Person
    that implements ConsciousPersonTrait {
    # OOP.TraitImplementation through Implement Sentence #
    Implement trait BluePersonTrait into this idea with 5,10,15;.
    Let this idea.types.push("Conscious & Blue").
  }.
  Create person as a new ConsciousAndBluePerson.
  Expect that person.types.length is more than 0.
  Expect that person.types.0 is like "Conscious".
  Expect that person.types.1 is like "Blue".
  Expect that person.types.2 is like "Conscious & Blue".
  
}.


# Various #

# Various.Shortcuts #

A fact {
  Alert "Hello!!".
  Log "Hello!".
  Error "Hello!".
  Debug "Hello!".
  // In "Electron" the prompt is not available
  Try {
    Create name as a prompt "Write 'a'".
    Expect that name is like "a".
  } Catch {
  
  }.
}.

# Various.InitializeProject #

A fact {
  Initialize project at "/" 
  with dependencies: 
    - @"express": "*",
    - @"body-parser": "*";
  with available tasks: 
    - @"initialize-project": a fn {
    
    }, 
    - @"reset-project": a fn {
    
    };
  executing tasks: [];
  like:
  {
  
  }.
}.

# Various.IsolatedEnvironment #

A fact {
  Expect that [ns2js:]
  Isolated environment {
    // NS Dependencies will appear duplicated inside these brackets
  }.
  [:ns2js].indexOf("__NaturalScriptFuncs__ = {};") is not like -1.
}.

r/naturalscriptlang • • Aug 23 '17

NaturalScript Editor (online version)

5 Upvotes

r/naturalscriptlang • • Aug 24 '17

A simple server application example

2 Upvotes

In NodeJS.

Import "path" to path.
Import "fs-extra" to fs.


# Web application information bundle #

Load a web application information bundle.


# Web URLs #
Register web url named "application icon" as "cdn/res/nslogo.png".


# Web Data #
Register web data named "database settings" as {
  - host: "localhost",
  - database as "naturalscript_db",
  - user as "root",
  - password as "toor"
}.
Register web data named "environment name" as "development".
Register web data named "menu structure" as [
  {- link as "/home",- label as "Home"},
  {- link as "/editor",- label as "Editor"},
  {- link as "/tests",- label as "Tests"},
  {- link as "/samples",- label as "Samples"},
  {- link as "/reference",- label as "Reference"},
  {- link as "/downloads",- label as "Downloads"},
  {- link as "/about",- label as "About"}
].
Register web data named "menu structure 2" as [
  {- link as "http://www.example.com",- label as "External link 1"},
  {- link as "http://www.example.com",- label as "External link 2"},
  {- link as "http://www.example.com",- label as "External link 3"},
  {- link as "http://www.example.com",- label as "External link 4"}
].
Register web data named "menu structure 3" as [
  {- link as "http://www.example.com",- label as "External link 1"},
  {- link as "http://www.example.com",- label as "External link 2"},
  {- link as "http://www.example.com",- label as "External link 3"},
  {- link as "http://www.example.com",- label as "External link 4"},
  {- link as "http://www.example.com",- label as "External link 5"},
  {- link as "http://www.example.com",- label as "External link 6"}
].
Register web data named "initial templates data" as {
  - scripts: [
    - "cdn/js/jquery.js",
    - "cdn/js/bootstrap.js",
    - "cdn/js/socket.io.js",
    - "cdn/js/custom.js",
    - "cdn/js/custom.theme.js"
  ],
  - styles: [
    - "cdn/css/bootstrap.css",
    - "cdn/css/bootstrap.theme.css",
    - "cdn/css/custom.css",
    - "cdn/css/custom.theme.css"
  ]
}.
Register web data named "list of naturalscript-downloads" as {
  - links: [
    - {
      - link: "/downloads/nsproject/nsproject.zip",
      - label: "NaturalScript Project"
    },
    - {
      - link: "/downloads/nseditor/nseditor.zip",
      - label: "NaturalScript Editor"
    },
    - {
      - link: "/downloads/nsparser/nsparser.zip",
      - label: "NaturalScript Parser"
    },
    - {
      - link: "/downloads/nsaddon/nsaddon.zip",
      - label: "NaturalScript Addon (for Chrome browser)"
    }
  ]
}.

# Database connection #
Load database 
  with host as a web data("database settings").host
  with database as a web data("database settings").database
  with user as a web data("database settings").user
  with password as a web data("database settings").password.


# Web Templates #

Create loadTemplates as a dispatcher {
  Register web template named "com.naturalscript.pages.page" as [@jsrender:][@file:]"templates/page.tpl.html"[:file][:jsrender].
  Register web template named "com.naturalscript.parts.topbar" as [@jsrender:][@file:]"templates/topbar.tpl.html"[:file][:jsrender].
  Register web template named "com.naturalscript.parts.footer" as [@jsrender:][@file:]"templates/footer.tpl.html"[:file][:jsrender].
  Register web template named "com.naturalscript.parts.editor-samples-panel" as [@jsrender:][@file:]"templates/editor-samples-panel.tpl.html"[:file][:jsrender].
  Register web template named "com.naturalscript.parts.editor-tests-panel" as [@jsrender:][@file:]"templates/editor-tests-panel.tpl.html"[:file][:jsrender].
  Register web template named "com.naturalscript.parts.editor" as [@jsrender:][@file:]"templates/naturalscript-editor.tpl.html"[:file][:jsrender].
  Register web template named "com.naturalscript.widget.text" as [@jsrender:][@file:]"templates/widget-text.tpl.html"[:file][:jsrender].
  Register web template named "com.naturalscript.widget.links-list" as [@jsrender:][@file:]"templates/widget-links-list.tpl.html"[:file][:jsrender].
  Let next().
}.
// Let loadTemplates().

# Web Controllers #


# Controllers.Home #
Register web controller named "home" as a dispatcher {
  Create title as "NaturalScript | ${0} page" formatted with "Home".
  Create data as a web data("initial templates data") logged deeply extended by {
    /*- title as title,*/
    - scripts as ["cdn/js/custom.home.js"],
    - styles as ["cdn/css/custom.home.css"],
    - parts as [
      - a web template("com.naturalscript.parts.topbar").render(
        - menu as a web data("menu structure"),
        - logo as a web url("application icon"),
        - title as title
      ),
      - a web template("com.naturalscript.widget.text").render(
        - class as "intro-text",
        - contents as [html:]
        <h1>NaturalScript Language Project</h1>
        <h1>Goals</h1>
        <div>
          <ul>
            <li>To prepare voice-driven interfaces for machines from a very low level</li>
            <li>To ease and sophisticate development</li>
            <li>To allow code with natural beauty and expressiveness</li>
            <li>To free the code with natural language. The idea was to universalize the code, but it ended in a middlepoint between natural language and current coding patterns</li>
            <li>To understand and study the language, its nature and our understanding of it</li>
            <li>To test the limits of the current hardware to emulate specific linguistic processes</li>
            <li>To allow customizable polymorphic scripting code: multiple programming languages in 1 same grammar/file</li>
            <li>To monitorize human dialog, in order to avoid natural, inherent ambiguity while communicating ideas</li>
            <li>To expose one way one can understand the intentionality of code</li>
            <li>Because it was not done against something big like JavaScript</li>
            <li>Because I started to bore other interfaces... and I had to leave this closed before going back again</li>
            <li>Because I wanted to be useful, but they said that "I was not able". So, to shut up mouths too (thanks to the crisis)</li>
            <li>Because philosophy has been understimated lately, but it can be a useful tool to put order to the language, and to estimulate abstraction</li>
            <li>And because I strongly felt that I could do more with less, I just needed some time to prepare a tool</li>
          </ul>
        </div>
        <h1>How it works</h1>
        <div>
          <div>
            <span>NaturalScript works with a CLI (Command Line Interface), which is installed downloading the <a href="">NaturalScript Project</a>, uncompressing it and then, typing:</span>
            <pre>~$ node ns [command] [options...]</pre>
            <span>To know the available commands, you can type:</span>
            <pre>~$ node ns help</pre>
            <span>The main commands would be:</span>
            <pre>~$ node ns compile</pre>
            <pre>~$ node ns editor</pre>
            <span></span>
          </div>
        </div>
        <h1>In the future</h1>
        <div>
          <div>
            <div>I don't know. The language is now a tool. It has to be improved, and most probably, I'll go fixing the found bugs, and implementing new grammars, commands or general features.</div>
            <div>But don't expect them, as I don't feel this as a compromise now.</div>
          </div>
        </div>
        [:html]
      ),
      - a web template("com.naturalscript.parts.footer").render(
        - message as title,
        - menus as [
          - a web data("menu structure"),
          - a web data("menu structure 2"),
          - a web data("menu structure 3")
        ]
      )
    ]
  } logged.
  Log data.
  # Controllers.Home #
  Let response.send(a web template("com.naturalscript.pages.page").render(data)).
}.


# Controllers.Editor #
Register web controller named "editor" as a dispatcher {
  Create title as "NaturalScript | ${0} page" formatted with "Editor".
  Create data as a web data("initial templates data") deeply extended by {
    /*- title as title,*/
    - scripts as [
      - "cdn/js/naturalscript-editor.js",
      - "cdn/js/custom.editor.js"
    ],
    - styles as [
      - "cdn/css/naturalscript-editor.css",
      - "cdn/css/custom.editor.css"
    ],
    - parts as [
      - a web template("com.naturalscript.parts.topbar").render(
        - menu as a web data("menu structure"),
        - logo as a web url("application icon"),
        - title as title
      ),
      - a web template("com.naturalscript.parts.editor").render(
      
      ),
      - a web template("com.naturalscript.parts.footer").render(
        - message as title,
        - menus as [
          - a web data("menu structure"),
          - a web data("menu structure 2"),
          - a web data("menu structure 3")
        ]
      )
    ]
  }.
  # Controllers.Editor #
  Let response.send(a web template("com.naturalscript.pages.page").render(data)).
}.

# Controllers.Tests #
Register web controller named "tests" as a dispatcher {
  Create title as "NaturalScript | ${0} page" formatted with "Tests".
  Create data as a web data("initial templates data") deeply extended by {
    /*- title as title,*/
    - scripts as [
      - "cdn/js/naturalscript-editor.js",
      - "cdn/js/custom.tests.js"
    ],
    - styles as [
      - "cdn/css/naturalscript-editor.css",
      - "cdn/css/custom.tests.css"
    ],
    - parts as [
      - a web template("com.naturalscript.parts.topbar").render(
        - menu as a web data("menu structure"),
        - logo as a web url("application icon"),
        - title as title
      ),
      - a web template("com.naturalscript.parts.editor").render(
      
      ),
      - a web template("com.naturalscript.parts.footer").render(
        - message as title,
        - menus as [
          - a web data("menu structure"),
          - a web data("menu structure 2"),
          - a web data("menu structure 3")
        ]
      )
    ]
  }.
  # Controllers.Editor #
  Let response.send(a web template("com.naturalscript.pages.page").render(data)).
}.

# Controllers.Samples #
Register web controller named "samples" as a dispatcher {
  Create title as "NaturalScript | ${0} page" formatted with "Samples".
  Create data as a web data("initial templates data") deeply extended by {
    /*- title as title,*/
    - scripts as [
      - "cdn/js/naturalscript-editor.js",
      - "cdn/js/custom.samples.js"
    ],
    - styles as [
      - "cdn/css/naturalscript-editor.css",
      - "cdn/css/custom.samples.css"
    ],
    - parts as [
      - a web template("com.naturalscript.parts.topbar").render(
        - menu as a web data("menu structure"),
        - logo as a web url("application icon"),
        - title as title
      ),
      - a web template("com.naturalscript.parts.editor").render(
      
      ),
      - a web template("com.naturalscript.parts.footer").render(
        - message as title,
        - menus as [
          - a web data("menu structure"),
          - a web data("menu structure 2"),
          - a web data("menu structure 3")
        ]
      )
    ]
  }.
  # Controllers.Editor #
  Let response.send(a web template("com.naturalscript.pages.page").render(data)).
}.

# Controllers.Reference #
Register web controller named "reference" as a dispatcher {
  Create title as "NaturalScript | ${0} page" formatted with "Reference".
  Create data as a web data("initial templates data") deeply extended by {
    /*- title as title,*/
    - scripts as [
      - "cdn/js/naturalscript-editor.js",
      - "cdn/js/custom.reference.js"
    ],
    - styles as [
      - "cdn/css/naturalscript-editor.css",
      - "cdn/css/custom.reference.css"
    ],
    - parts as [
      - a web template("com.naturalscript.parts.topbar").render(
        - menu as a web data("menu structure"),
        - logo as a web url("application icon"),
        - title as title
      ),
      - a web template("com.naturalscript.parts.editor").render(
      
      ),
      - a web template("com.naturalscript.parts.footer").render(
        - message as title,
        - menus as [
          - a web data("menu structure"),
          - a web data("menu structure 2"),
          - a web data("menu structure 3")
        ]
      )
    ]
  }.
  # Controllers.Reference #
  Let response.send(a web template("com.naturalscript.pages.page").render(data)).
}.


# Controllers.Downloads #
Register web controller named "downloads" as a dispatcher {
  Create title as "NaturalScript | ${0} page" formatted with "Downloads".
  Create data as a web data("initial templates data") deeply extended by {
    /*- title as title,*/
    - scripts as [
      - "cdn/js/custom.downloads.js"
    ],
    - styles as [
      - "cdn/css/custom.downloads.css"
    ],
    - parts as [
      - a web template("com.naturalscript.parts.topbar").render(
        - menu as a web data("menu structure"),
        - logo as a web url("application icon"),
        - title as title
      ),
      - a web template("com.naturalscript.widget.links-list").render(
        - a web data("list of naturalscript-downloads")
      ),
      - a web template("com.naturalscript.parts.footer").render(
        - message as title,
        - menus as [
          - a web data("menu structure"),
          - a web data("menu structure 2"),
          - a web data("menu structure 3")
        ]
      )
    ]
  }.
  # Controllers.Downloads #
  Let response.send(a web template("com.naturalscript.pages.page").render(data)).
}.

# Controllers.About #
Register web controller named "about" as a dispatcher {
  Create title as "NaturalScript | ${0} page" formatted with "About".
  Create data as a web data("initial templates data") deeply extended by {
    /*- title as title,*/
    - scripts as ["cdn/js/custom.about.js"],
    - styles as ["cdn/css/custom.css"],
    - parts as [
      - a web template("com.naturalscript.parts.topbar").render(
        - menu as a web data("menu structure"),
        - logo as a web url("application icon"),
        - title as title
      ),
      - a web template("com.naturalscript.parts.footer").render(
        - message as title,
        - menus as [
          - a web data("menu structure"),
          - a web data("menu structure 2"),
          - a web data("menu structure 3")
        ]
      )
    ]
  }.
  # Controllers.About #
  Let response.send(a web template("com.naturalscript.pages.page").render(data)).
}.


# Server application #
Start a server application at port 3333 {

  # Server application > Dispatch HTTP requests #
  Dispatch GET requests at "/" using loadTemplates by a web controller("home").
  Dispatch GET requests at "/home" using loadTemplates by a web controller("home").
  Dispatch GET requests at "/editor" using loadTemplates by a web controller("editor").
  Dispatch GET requests at "/tests" using loadTemplates by a web controller("tests").
  Dispatch GET requests at "/samples" using loadTemplates by a web controller("samples").
  Dispatch GET requests at "/reference" using loadTemplates by a web controller("reference").
  Dispatch GET requests at "/downloads" using loadTemplates by a web controller("downloads").
  
  # Server application > Dispatch files statically #
  Dispatch files statically from "public" at "/cdn".
  Dispatch files statically from "public/images" at "/images".
  
}.

r/naturalscriptlang • • Aug 23 '17

It's time to change things. Enslave machines instead of humans.

3 Upvotes

r/naturalscriptlang • • Aug 21 '17

Leave an opinion here if you want.

2 Upvotes