lang5 Blog

A general blog about lang5 by and for it's users.
RSS feed
Published by ulmann on 2011-12-22
The British APL Association recently published a paper about lang5 in the current issue of VECTOR: http://archive.vector.org.uk/art10500710(external link)

(The review process took a while - in the meantime the language was renamed from "5" to "lang5", so don't be confused by the paper's title. :-) )
Published by ulmann on 2011-11-24
Some day it had to happen - the lang5 implementation of "99 bottles of beer" (without any sophisticated handling for plural/singular or the very last verse):

99 bottles of beer
: verse(*)
  " bottles of beer on the wall, " over
  " bottles of beer.\nTake one down and pass it around, " over 1 -
  " bottles of beer on the wall.\n\n" 6 compress "" join .

99 99 iota - verse

Published by bach on 2011-10-29
Here are the slides for the lang5 talk from last Thursday. Have fun:

Published by bach on 2011-10-26
Tomorrow Bernd Ulmann will give a presentation about the actual lang5 progress at the
OpenVMS Technical Update Days in Bad Homburg, Germany

The slides will be published the following days.

Have fun with lang5,
Oliver Bach
Published by ulmann on 2011-10-20
A new release of lang5 is available for download.

There are two new comparison operators, namely === and eql (these act similar to == and eq but do not consider "", undef and 0 as being equal).

In addition to that CTRL-C is now correctly handled. If running in interactive mode, pressing CTRL-C will abort the currently running lang5-program and return to the lang5-prompt again.

Have fun with the new release and happy lang5-programming! :-)
Published by ulmann on 2011-09-11
A new lang5-distribution kit is available. The interpreter it contains supports the new functions 'scatter, 'index and 'spread (which are necessary for the Ulam-Spiral example i.e.). Happy lang5-programming. :-)
Published by ulmann on 2011-09-08
The examples collection now contains a true brain teaser - a small lang5-program that generates a Ulam-spiral. :-) Can you figure out how it works?
: ulam_spiral
  : seq
    : zip(*,*) 2 compress " " join ;
    : subsubseq swap 2 2 compress reshape ;
    : subseq
      0 pick     [0 1]  subsubseq 1 pick     [1 0]  subsubseq 
      2 pick 1 + [0 -1] subsubseq 3 pick 1 + [-1 0] subsubseq 
      5 roll drop append append append

    dup 2 reshape 1 compress
    over iota 2 * 1 + "subseq append" 3 pick reshape zip execute
    over 2 * [0 1] subsubseq append '+ spread

  : print_line(*)
    : rpl(*) dup not if drop "" then ;
    rpl "\t" join . "\n" .

  seq swap 2 * 1 + 2 ** iota 1 + dup prime swap and swap scatter
  'print_line apply drop

4 ulam_spiral

The output of this program looks like this (the tricky part of the program is the generation of the number spiral - please note the use of the and in the second last line of the main function to select only prime numbers in the array):
73						79		
	43				47			
71				23				
	41		7					
		19			2	11		53
			5		3		29	
67		17				13		
	37						31	
				61		59

Published by ulmann on 2011-09-05
Did you know that there is a control file for syntax highlighting lang5 source code in vi?

All you have to do is to add the following lines to your .vimrc file in your home directory:
syntax on
au BufRead,BufNewFile *.5 set filetype=5
au! Syntax 5 source ~/lang5/trunk/lang5.vim

This assumes that your lang5 installation can be found in ~/lang5/trunk. If the location on your machine is different, all you have to do is to adapt the path to the file lang5.vim above.
Published by bach on 2011-08-30
In addition to our name change there is a new distribution kit available for download(external link) with extended documentation and some minor fixes

Have fun with lang5

- Oliver
Published by bach on 2011-08-29
Last week was quiet busy regarding lang5, formerly known as 5.

First of all we picked a new name: lang5
After two doodle polls ( 1st(external link) and 2nd(external link)) we decided to change 5 into lang5 for the following reasons:
  • top rank in search engines
  • uniqueness (in search engines)
  • no name collisions with consulting companies and the like

In parallel we ported the whole website to TikiWiki(external link) - a CMS solution.
Therefore we created this blog to keep you up to date about lang5.

Additionally we created two forums for you:

To register on the web page you need a passcode (to avoid Spam registrations), please contact Oliver

Have fun with lang5.


"Science is about what is; engineering is about what can be."
- Neil Armstrong: Self-Proclaimed 'Nerdy Engineer'

Contact-Information: http://www.decfreak.de/Contact(external link)
Page: 1/2