Traveller Store CotI Features New Posts Mark Forums Read Register


Go Back TravellerRPG.com > Citizens of the Imperium > General Traveller Discussions > Software Solutions

Software Solutions Discussions on Traveller related software.

Reply
 
Thread Tools Display Modes
  #1  
Old December 24th, 2018, 01:45 PM
robject's Avatar
robject robject is offline
Marquis
 
Join Date: Mar 2002
Posts: 13,836
Gallery : 9
Visit robject's Blog
robject has disabled reputation
Default Vilani Programming Languages

My ORIGINAL attempt at this (Z*PL): http://www.travellerrpg.com/CotI/Dis...076#post480076


I wondered what a Vilani programming language might look like.

I'd thought about column-specific fields and punch cards, and COBOLesque verbose grammars, but also cool things like quantum bits and inference engines.

I haven't come up with a satisfying, consistent language, yet, but my current effort is to show a mix of strong conservatism, strong type safety, verbosity, but also power.

I think a "more fun" language would have VERY strong ties to columns, but for now I'll stick to a marriage between COBOL and Smalltalk-80. And I'd like to add in some stuff from Quantum INTERCAL just for amusement and shininess. And maybe just a hint of JavaScript. Oh, the horror!

Working example.

Code:
IDENTIFICATION DIVISION.
	PROGRAM-ID. VILANI PROGRAMMING LANGUAGE EXAMPLE

* column 1 carries flags:
*   '*' = comment line
*   '%' = quantum line
*   '.' = end of block (?)
*   '@' = loop indicator (?)
* Smalltalk-80 messaging structure and COBOL verbosity
* structured modules (program title. variables. methods.)
* quantum computing (e.g. sort of multithreaded.)
* PLEASE and MAYBE statement (and even COME FROM) - INTERCAL

FIELD DIVISION.
	LET x BE INT OF LENGTH 3.
	LET w BE STR OF LENGTH 16.
	LET v BE RAT.
	LET u BE NUM OF LENGTH 10.
	LET t BE BIT OF LENGTH 4.

METHOD DIVISION.
	DEFINE METHOD exampleWithNumber
	WITH PARAMETER x
	AS
		LET VARIABLE y BE INT OF LENGTH 5.
		TRUE AND FALSE NOT AND (NIL IS NIL) IF FALSE SELF HALT.
		SELF SIZE PLUS SUPER SIZE -> y.
		DEFINE ARRAY tempArray
			AS 
			$a #a "a" 1 1.0
			ITERATE WITH EACH
				<- EACH CLASS NAME
				<- ' '
			END ITERATE
		END DEFINE ARRAY
	RETURNS 
		x GREATER THAN y
	END DEFINE METHOD

MAIN DIVISION.
	<- "Hello, world!"
__________________
Imperiallines magazine
My Helpful Stuff for Traveller5
IMTU tc+ t5++ 3i(+) au ls+ / OTU 44% an+ dt+ ge- j- jf+ n- pi+ pp+ tr+ tv- uwp+ xb+
Tools Link

Last edited by robject; December 24th, 2018 at 02:04 PM..
Reply With Quote

Welcome!
To see more of this thread, please login or register.
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What Programming Languages do you use? Leitz Software Solutions 173 Today 03:56 PM
Free Programming Language(s)? Vargas Software Solutions 82 November 27th, 2016 07:25 PM
Vilani Programming robject Software Solutions 14 June 6th, 2014 01:55 AM
LBB2 Ship Programming Idears jawillroy Classic Traveller 13 June 6th, 2008 12:36 PM
[Semi-OT] What programming language should I learn? Golan2072 Software Solutions 60 June 9th, 2006 11:17 AM

This website and its contents are copyright ©2010- Far Future Enterprises. All rights reserved. Traveller is a registered trademark of Far Future Enterprises .
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (c) 2010-2013, Far Future Enterprises. All Rights Reserved.