Friday, March 27, 2015

blocked

http://www.reddit.com/r/ProgrammingLanguages/comments/309db8/blocks_syntax/
I've been programming for the last five years, and I came across (definitely not learnt) a bunch a languages... So, in your opinion, which syntax (for blocks) it the best ? And why ? (b'cause without explanations, any advice is pointless...)
Here's the syntaxes I'm aware of :
do .... end

{curly braces}

    indentation (like Python)

Okay, first off there is no "best." The "style" of your block is a style and a preference. There is a quote about preferences that I can't find right now.

At the expense of readability, but for ease of creating a parser and lisp macros that generate lisp code, there is lisp and all of those wonderful parentheses which, of course, brings up the question of which brackets? )<{[()]}>(

Since you are going to indent anyways, the brackets become redundant. Of course, indentation brings up the question of tab vs. spaces?

"do ... end" is stylish, almost a beautiful prose in some coders' eyes, because the block can even be a short one-liner. But, this brings up the question of which keywords to use? Which "language" to use? English? Indentation and brackets are more "international" like math.

So, another way is using various editors that parse the code for you and put the code into the style that you prefer which, of course, brings up the question of which editor to use? Beautiful how emacs, or your preferred editor, matches the parentheses for you, but maybe not. Why do I need a special editor just to read my own code?

Using an editor that "parses" the code for you, brings up yet another question: Why not create a language that parses away some or all of the redundant begin and end block punctuation and/or keywords? ie. if x < 3 print less than three else print greater than or equal to three

Ooh, that just brings up a quagmire of questions...

Saturday, February 21, 2015

Show Codes is on

HTML is the language of the web.

HyperText Markup Language and before it there was and still is SGML: Standard Generalized Markup Language.  "Standard Generalized" is the key.  One of the basic things we've been doing with text is formatting it, but having a standard and generalized way to do this sounds like a panacea, a picnic.  A program, a problem just waiting to get messed up.  Bold, italics, underline:  I can see the little icons above this textbox in blogger.  A bold B, an italicized I, and an underlined U that I am formatting with the Apple key and the corresponding letter:  command-B, command-I, and command-U, or control-B, control-I, and control-U on Linux and Windows.  So easy these formatting "commands" that we've taken for granted for decades.

At some point along the way, the w3c tried to standardize HTML with a version number.  And, then the standard changed with the next version number.  And, I noticed that the w3c site and some of the standard looked suspiciously like Microsoft Word.  And, there were and maybe still are some Microsoft people on the standards committee.  The standard evangelized that we should be using for bold and for italics.  Also, suspicious a
tag was added which seems very very very similar to section in the original version of Microsoft Word.  Other strange oddities were added, it seemed that you could save a word document as HTML, so a mangled metal obstructive atrocity of keywords were added to a melange of tags.  All the weirdness was in place to accommodate Microsoft Word.

Taking it even further, a new language was created to attempt to make all the weirdness easier to deal with:  Cascading StyleSheets.  With this and proper document headings done in yet another markup language called XML:  eXtended Markup Language, one  could now display little badges of various versions that your web site might be compliant with.  Drink that cool-aid.  Drink all of that Kool-Aid until you see everything in sugary rainbows and you don't mind plunking down thousands of dollars a year for someone else's idea of what API you should be using.  Rather than <b>b</b> for bold, use named attributes:  <spunky id="6B29FC40-CA47-1067-B31D-00DD010662DA" class="my strongly-formatted thingy">bold</spunky>, and in another file, maybe in a different place on the internet, have a css file that describes what "spunky : my strongly-formatted thingy" should format as, maybe flaming rounded outlined bordered 4-bit per channel color.  Wait a minute!

I just want to make the text bold.  I shouldn't have to look this up in the spec., craft a css document, get the correct document headers in place, check and badge it with a validator, and wrap everything in strange tags and attributes.  Let's cut to the chase:  it's basic HTML:  <b>bold</b>, <i>italics</i>, and <u>underline</u>.  Simple.

Monday, November 12, 2012

CONneD

What if you could create one of the first great computer languages with just six "elementary" functions?  Sounds easy doesn't it?  The predicate function ATOM is fairly easy to implement.  The predicate function EQ is perhaps equally as easy.  The CAR and CDR functions are similar enough that once you've built one the other is just the same but opposite.  And, the CONS function can be simple to put together.  But, when you get to the sixth "elementary" function COND you may start to realize that the jig is up.  The following is the "simple" form for COND...

(COND

    (condition1   result1 )

    (condition2   result2 )

    . . .

    (T    resultN ))


That seems fairly straight forward, except that it's not.  In fact some of the other elementary functions may assume some not so straight forward back-end details like garbage collection, stacks, and other "implementation" details that one shouldn't worry too much about.  Except when you go to implement them.  And, all of a sudden things grow extra legs.

That COND function has a lot to it that might not jump out immediately.  Each condition is an expression that can be EVALuated.  In theory COND can have an infinite number of condition-result blocks.  If each condition returns False, then COND really starts to look a lot like a procedural program as opposed to the functional nirvana that "functional" languages tout.  In implementing COND, one could use tail call recursion which brings yet another possibly ugly detail to the fore.  COND like an if-else if-else block gone wild is really the engine that drives the language, any language, maybe any program.

Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.


I've heard that every language and program eventually becomes a Lisp, but if you meditate on COND, you may realize why.  It may be more that every language and program uses some form of COND which provides mechanism for the edge cases for every program.  So, it's not so much that every program becomes Lisp, but more likely that programs can become overly complicated and start to grow extra legs.

Somehow, I feel like I am being conned.

Saturday, April 14, 2012

Hello

Hello............................. opens up to new attitudes and relationships

mi: HELLO -- get, open

Let's try it out in some other languages and programs and see what happens...

machete:src mmphosis$ hello
-bash: hello: command not found
machete:src mmphosis$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> hello
Traceback (most recent call last):
File "", line 1, in
NameError: name 'hello' is not defined
>>> ^D
machete:src mmphosis$ ruby
hello
-:1: undefined local variable or method `hello' for main:Object (NameError)
machete:src mmphosis$ perl
hello
machete:src mmphosis$ php
hello
hello
machete:src mmphosis$ cat
hello
hello


In Lisp, I guess the closest word is QUOTE, but in machete it works more like PHP where everything is quoted and the code is embedded. I call this AUTOQUOTE. Instead of emitting something arcane like "command not found" machete prints the text that was read. It also makes it easy to create a hello world program because you simply type hello world and you're done.

You might also think about Hello as a loader that implicitly loads. Or, hello is the boot, the boot loader, the startup, the greeting, init, or AutoExec.bat. It opens, gets, and outputs the contents unfiltered. It could be named all kinds of greeting words: hello, hi, bonjour, greetings, etc... it doesn't have a specific command because like most things in machete: it's implied.

Thursday, March 24, 2011

language for what reason


language for what reason
because language communicates
because describes why
person shows who
noun shows what
location describes where
instance tells when
duration says how long
event describes when and what
method describes how
madness runs inherently
because words have meaning
poetry flows deep

Saturday, July 10, 2010

onions

We're going to try not to include any onions ...
things that are "undefined"
things that may be "invalid"
things that are confusing
things that are inconsistent
things that are awkward
things that are annoying
things that are loud
things that are ugly
things that don't work
things that just don't look right, whatever that means
things that do look right, but don't work or don't work as expected
and these brackets, yeah I know you call them parentheses, they are still bugging the hell out of me!
even the word parentheses is difficult to type
things that are over-engineered, hmmm, I'm saying this. That says something.

Thursday, January 28, 2010

Sunday, March 22, 2009

Hello, Wordl

Wordle: machete-langIs this next little language an esoteric language? No, but I keep coming back to metacircular hacks.

Tuesday, February 10, 2009

When in doubt, take a leap.

from the TED Talk:
Linux (or BSD :) would...
Linux (or BSD :) ) would...

Edward Guess's username is the guessed account.

Friday, December 19, 2008

Chisel

Concurrency isn’t a “nice layer over pthreads” - the most important thing is isolation - anything that mucks up isolation is a mistake.
Joe Armstrong


god said so

Monday, September 29, 2008

Machete Promoted!

Machete receives top rating! The machete language has been rated five stars as the best programming language ever! Machete really is the next big little language. Mark Stock, famous language designer and hacker extraordinaire will soon be bringing out a new book about machete the hacking language that is sweeping the programming world. Slated to go on tour after the book's release, Mark had just this to say: "It's been a real whirlwind. Adopters everywhere are screaming with delight about this new found programming language."




with apologies to Edsger W. Dijkstra

Thursday, July 3, 2008

Mark Stock's Road to Lisp -- Not


I, Mark Stock, do solemnly offer these my responses to The Road to Lisp Survey:

When did you first try Lisp seriously, and which Lisp family member was it?

I did not try Lisp seriously. I couldn't get any available family members to compile or run.


Many of us had multiple run-ins with Lisp before it "stuck". The "stick" date is of most interest, but you can share earlier encounters if you like.

What led you to try Lisp?

Someone once said that I should try Lisp. But, trying is lying. As Yoda says: "Do, or do not. There is no 'try.'"

What other languages have you been using most?

C, Basic, assembler, HyperTalk, machete

How far have you gotten in your study of Lisp?
I know this is hard to quantify. Just wing it.

I am still blocked by the sight of all of those brackets. Emacs makes me go totally numb.

What do you think of Lisp so far?

I like the meta-circular thing. I've always thought about code and data in the same bucket despite any rules to the contrary.




Please delete all but one of these cross-referencing tags: *(Switch Date not yet)

Thursday, May 29, 2008

rant: the HTML rant tag



No! I am not ranting. I swear. Me? Rant? No way! Wait a minute. I am ranting.


I am not sure that the HTML rant tag has anything to do with machete. Or, maybe the HTML rant tag will be the only product of the machete language. Anyhoo, while cruising the web for steampunk and of course whiling those time-consuming right turns, got Gigablasting neuromancer and bumped into the Sarcasm mark, as in <sarcasm>Oh really?</sarcasm>, which has lead me back to the HTML Rant tag.

<rant>Aaaaaaagh! It's already defined in urbandictionary.com. Oh well. There is nothing new to define. Which means there is only one way to go forward: go backwards. Get out the machete and start hacking out keywords.</rant>

In the words, or at least the sig, of Michael J. Mahon:
"The wastebasket is our most important design tool--and it's seriously underused."

Friday, May 9, 2008

Why be modular? Carving out a niche


Yes, we can carve the chair out of a block of wood. Our tool of choice is machete, so naturally carving might be a way of using this tool. But, machete is not actually about using the tool, machete is about intuition. The machete usually only comes out when there is so much real foliage blocking us from where we get to where we need to go.

Are we carving a chair? Why are we constructing a chair? Is constructing a chair a good of example of what we need to construct? Do we need to construct anything at all? Perhaps, we have everything that we need already. Perhaps, we need less. Perhaps, we have way too much just like when there is too much foliage and it's blocking us. Perhaps, it is time to use machete and hack out some code.

Tuesday, March 18, 2008

Let's get out of our comfortable armchairs

{q [
Paris drives the monster truck atop flattened cars.  Beautiful happiness may be a perfectionist doing it wrong.

Monday, August 13, 2007

the keeper of all prayers

an excerpt from: The Cosmic Christ New Prayers and Prophecies from Mother Mary by Tambor Solana
ARCHANGEL URIEL: This is Archangel Uriel. I am the keeper of all prayers. All prayers are recorded by the angels. And I am the overseer of every prayer. You imagine that it sounds like a great responsibility — to be responsible for every prayer of all beings, not only in this world, but in other worlds. But we have our version of computers too.

No prayer goes unheard. Know this. That is all. Archangel Uriel.

Sunday, April 1, 2007

unary

an excerpt from E. T. 101 The Cosmic Instruction Manual For Planetary Evolution by Mission Control and Zoev Jho

The Cosmic Computer Jocks

Some mission members are in our special computer division. These members are experts in the art of inter-dimensional interfacing. They are this mission's Cosmic Computer Jocks, and they have the capacity to act as the very linkage between the dimensions.
     This division specializes in the translation of third-dimensional binary computer language into a fifth-dimensional unary linguistic system. Although any computer expert on this planet will tell you that such a translation is not possible, what they actually mean to say is that they could not do it. That is why they are not being asked to. We have sent in our own specialists instead.
     Another aspect of this division's task is to bring new software to this plane with programs that no one here has dreamed possible. These programs are fifth-dimensionally designed and apply to every aspect of the transmutational process. Not only can they unscramble existing confusing and dysfunctional programs, but they can also realign them with our database which will automatically reprogram them back into light.
     Our computer team is here to disseminate our new software throughout the planetary sphere in preparation for the final dimensional link-up. Their very bodies are the silicon chips of our computer matrix, and their presence is the keyboard of our system. They are state-of-the-art hardware and are completely immune to any computer virus as well as very user-friendly.

Thursday, March 8, 2007

7 words

In the briefest of terms, these are the words and their basic meanings:
No..................... sets limits, defines boundaries and develops clarity
Hello............................. opens up to new attitudes and relationships
Thank You.............................. expresses the feeling of appreciation
Goodbye............................. closes and completes what needs to end
Please................................................... asserts clearly defined goals
Sorry........................... is said to help repair the damage we've done
Yes......................... indicates acceptance, tolerance and willingness
http://www.7words.co.uk/

Thursday, March 1, 2007

love

I am removing the picture of the machete from this original posting.
http://www.folkcuba.com/stores/bot_images/dj29_OgunMachete480.jpg
(Mark 2008may29)
customer service 2 1ove