Re: [go-nuts] the Dominance of English in Programming Languages

2019-04-29 Thread John McKown
The solution is simple. Just program in APL. Then _nobody_ can understand
your program and so it is "fair" to all. It is a "write only" language.

https://en.wikipedia.org/wiki/APL_(programming_language)

Game of Life[edit
<https://en.wikipedia.org/w/index.php?title=APL_(programming_language)=edit=22>
]

The following function "life", written in Dyalog APL, takes a boolean
matrix and calculates the new generation according to Conway's Game of Life
<https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life>. It demonstrates
the power of APL to implement a complex algorithm in very little code, but
it is also very hard to follow unless one has advanced knowledge of APL.
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}

-- 
This is clearly another case of too many mad scientists, and not enough
hunchbacks.


Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go license and fitness for purpose

2018-05-15 Thread John McKown
On Tue, May 15, 2018 at 11:17 AM, Matthias B. <m...@winterdrache.de> wrote:

> On Tue, 15 May 2018 06:39:40 -0700 (PDT)
> matthewju...@gmail.com wrote:
>
> > I don’t think I’m suggesting to not disclaim liability. I’m
> > suggesting to claim that I didn’t hide anything to make a use break
> > on purpose. It does add liability, but this is liability that is
> > completely in the author’s control unlike regular bugs or misuse that
>
> That's where you are wrong.
> The author has no control over WHAT OTHER PEOPLE CLAIM he did.
> If he makes a statement that he didn't intentionally put bad things into
> the code and bad things happen, he ends up having to prove that these
> are actually bugs and not intentional. And if the developer is unlucky
> enough to live in the US, this looks like this:
>
> * a jury of 12 laypersons, with NO UNDERSTANDING OF CODE WHATSOEVER
> * a very slick and convincing expert who says that he's reviewed the
>   code and he's 100% certain that this is intentional and not a bug
> * some awkward nerd claiming it's a bug
>
> The 12 laypeople decide who they trust more based on their "soft
> skills".
>
> It's not a coincidence that this whole EULA and total disclaimer BS was
> started by US organizations. The US legal system is pure madness and US
> lawyers are like mosquitoes. If you leave just a tiny bit of skin
> exposed, they'll smell it and will try to land on it to suck your
> blood. Whatever drawbacks you perceive from the current language in
> licenses is way less bad than the alternative.
>

​I completely agree with you. My solution is the same as Shakespeare's in
Henry IV (Part 2) Act 4, scene 2, line 73: "The first thing we do, let's
kill all the lawyers."
ref: http://shakespeare.mit.edu/2henryvi/2henryvi.4.2.html
​
​OTOH, there are a _few_ good lawyers. One who try their best to protect
the ​truly (morally) innocent and promote real justice and mercy. Or am I
remembering something in a fantasy novel? I remember back in the day when
lawyer's didn't advertise because it was unprofessional. Now there are
"tough, smart" lawyers who can take on the "big bad company" that injured
you by their own deliberate negligence, malfeasance, and greed. And, of
course, there are such companies. I would like to go crosstime to the U.S.
equivalent in "Probability Broach" by L. Neil Smith.




>
> MSB
>
> --
> No man is more pitiful than the one who looks to the shadows for warmth.
>
>

-- 
We all have skeletons in our closet.
Mine are so old, they have osteoporosis.

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Go Compiler How Work?!

2017-12-13 Thread John McKown
On Wed, Dec 13, 2017 at 6:53 AM, <erfangnuli...@gmail.com> wrote:

> you are tell then generate a ASM code?! this may be hard And waste of time.
>
> At the top of the conversation, it was said that only the C language could
> write compiler without any tools/another compiler.
> so why now tell ASM?!
>

​Whoever said "only the C language could write ..." was simply _WRONG_.
Period.​ They are probably confused because they only know about the C
language tools, such as "lex" and "bison", which help create C language
programs to make compilers for computer languages.

​this might be of some help to you:
https://en.wikipedia.org/wiki/History_of_compiler_construction
Also: https://en.wikipedia.org/wiki/Bootstrapping_(compilers) which is
about "self hosted" compilers, such as Go, where the compiler is, itself,
written in the language to be compiled.  Like using the English language to
explain the English language.

I don't want to discourage you, but it seems to me that you need to get
some basic compiler concepts down. For me, it was (and still is) a struggle.

-- 
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Best way to explicit say sominthing which covers the Go programming languge is not related with Go or Go community

2017-12-12 Thread John McKown
On Tue, Dec 12, 2017 at 8:12 AM, Norbert Fuhs <norbert.fuhs@gmail.com>
wrote:

> Hi,
>
> I'm writing guide which will cover using the Raspberry Pi with Go with
> several small programing projects.
>
> I would like to know if there is a good way I can make very clear that
> this guide is not releated to Google or the Go creators / community etc in
> general.
>
> Is there any text I can make this clear before I release something and I
> get sued?
>

​Well, if you're really worried about being sued, I'd suggest consulting a
lawyer with appropriate legal expertise (I.e. don't hire a "fix your
tickets!" lawyer).

I have read some disclaimers which basically say something along the lines
of:

This document and its contents are entirely the product o​f .
The information herein is not endorsed or supported by anyone else,
including but not limited to Google, the Go community, .  The
author disavows any responsibility for any actions taken by any person,
company, or other entity based on information contained in this document.

​Again. I am NOT a lawyer. The above is NOT legal advice.​ I do NOT claim
that the above has any legal standing in any jurisdiction.

If you want, you might do a search on "legal disclaimer" to get more ideas.



>
> Best,
>
> Norbert
>
>
-- 
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Broken Link in Go Assembly Guide

2017-08-07 Thread John McKown
On Sun, Aug 6, 2017 at 11:59 PM, Ben Reed <benvr...@gmail.com> wrote:

> Hi... I was looking at the Go Assembly Guide ( http://itty.be/5rhhz ),
> and I keep trying to refer to Plan 9 Assembly.  I'm unfamiliar with this,
> and so I keep trying to go to 9p.io.  The link is broken though. Does
> anyone know where I can get an overview of this assembler?
>

​Google search showed up:

https://9p.io/sys/doc/asm.html (which I did get to just fine)
https://golang.org/doc/asm (also got to with no problems)
https://golang.org/doc/asm (appears to have the same content as previous
hit)
​

-- 
If you look around the poker table & don't see an obvious sucker, it's you.

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-31 Thread John McKown
On Mon, Jul 31, 2017 at 12:12 PM, Ian Lance Taylor <i...@golang.org> wrote:

> ​
>
>
>
> I think it's time to let this thread go back to sleep again.  I think
> that every possible point of view has already been expressed.
>

​I agree. Not that anyone is impressed by that. [grin]


>
> The language is not going to change.  It is what it is.
>

​An excellent approach to all languages. ​If someone doesn't like "go",
then use a different language. Or be like some people and invent your own
to address the perceived problems with all the other languages in existence.



>
> Ian
>
> ​​



-- 
Veni, Vidi, VISA: I came, I saw, I did a little shopping.

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Semicolons in Go

2017-04-20 Thread John McKown
On Thu, Apr 20, 2017 at 12:20 PM, Michael Jones <michael.jo...@gmail.com>
wrote:

>
> On Thu, Apr 20, 2017 at 8:27 AM, <john.deig...@gmail.com> wrote:
>
>> If I can't format my programs the way I want, and I much prefer putting
>> operators at the beginning of continuation lines for reasons mentioned on
>> this page, and "Perl Best Practices", I simply won't use the language - at
>> least not without implementing a pre-processor. Automatic semicolon
>> inserting is the worst thing about JavaScript. Please make it optional in
>> some way.
>
>
> The die has been cast. It usually takes two weeks for personal preference
> here to be forgotten. Hope you give it a good chance, as you'll have many
> positive benefits.
>
>
​I understand that it is oft-time better to approach a new language on its
own merits. Just like with a "human" language. You'll never learn language
ABC if you keep thinking in language DEF. I.e. think in DEF then translate
to ABC. You'll always end up doing something wrong because each language
has a different "mind set" or "world view".

Having said the above, this "auto insertion" of a semi-colon is a bother to
me too. Mainly because I like to write C code something like:

a = b
 + c ​
 + d
 * e
 ;

So that I can easily insert or remove a single line. This may well be due
to my advanced age (64!) and the fact that my original language was FORTRAN
which was punched onto 80 column card stock. The above did waste cards, but
made program changes very easy. In today's world of "full screen" editors
which can reformat and even refactor code upon demand, it is a relic of a
bygone era.



-- 
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] getfileattributesex the system cannot find the file specified

2017-03-21 Thread John McKown
On Tue, Mar 21, 2017 at 12:40 PM, Gesse Barros <gessebar...@gmail.com>
wrote:

>
> Hello people. Beginner in this language. Can you help me solve this error?
> Happens when compiling my first project
>
>
​Does this sound like your problem?
https://groups.google.com/forum/#!topic/golang-nuts/8Tz76XQ02qs
I'm not a Windows person. ​



-- 
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Expression evaluation with side effects

2017-03-21 Thread John McKown
On Sun, Mar 19, 2017 at 6:20 PM, Steven Hartland <ste...@multiplay.co.uk>
wrote:

> Think the following section should explain the strange behaviour you're
> seeing:
> https://golang.org/ref/spec#Order_of_evaluation
>
> On 19/03/2017 22:59, Jan Mercl wrote:
>
> While trying to resolve a failing (C) test case[0] I encountered a (Go)
> behavior I do not understand. This code[1]
>
> package main
>
> import (
> "fmt"
> )
>
> var (
> x  = [1]int{2}
> x2 = [1]int{2}
> )
>
> func foo() int {
> x[0] |= 128
> return 1
> }
>
> func foo2() int {
> x2[0] |= 128
> return 1
> }
>
> func main() {
> x[0] |= foo()
> fmt.Println(x[0])
> v := x2[0] | foo2()
> fmt.Println(v)
> }
>
> outputs:
>
> 3
> 131
>
> It seems to me that the two numbers should be the same. (?)
>
> ​Logically yes, but due the implementation, along with "side effects"
(undocumented?), it does. The "x[0]|=foo()" moves x[0] to a temporary area.
It then invokes foo(). It then does the logical or from the "temporary
area" (previous value of x[0]) with the return value from foo(), getting 3.

v:= x2[0] | foo2() does compiles (on x86_64 at least) to : call foo2();
fetch the value of x2[0]; logically or it with the result from foo2();​
store the result back into x2[0].

WHY does it generate the code this way? I have only the vaguest idea. I'm
not a compiler writer. And I can't seem to find the documentation on
exactly how "|=" works. I'm also not an Intel x86_64 assembler programmer,
but I can get a general understanding of what is going on.

>
> Thanks in advance to anyone enlightening me.
>
>   [0]: https://github.com/gcc-mirror/gcc/blob/
> 4107202e2b8f814f4c63a61b043cfb36a3798de3/gcc/testsuite/gcc.
> c-torture/execute/pr58943.c
>   [1]: https://play.golang.org/p/fGibPFuejQ
>
> --
>
> -j
>
>
-- 
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread John McKown
On Mon, Mar 13, 2017 at 3:36 PM, Jan Mercl <0xj...@gmail.com> wrote:

>
> On Mon, Mar 13, 2017 at 9:13 PM nicolas riesch <nicolas.rie...@gmail.com>
> wrote:
>
> > But it would help me to have your first impression or opinion on this
> project.
>
> Sounds very very interesting, but... Here are the first impressions:
>
> - I can see no LICENSE or similar file in the root directory. I consider
> it unsafe to look at other's code w/o knowing the license terms.
>

​OUCH! No LICENSE means "no look" in my book.​



>
> - Installation documentation seems to be silent about $ go
> {get,build,install}, but it does mention installing some binaries. I
> consider it unsafe to use binary programs of non trusted origin.
>
> --
>
> -j
>
>


-- 
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] why "iota"?

2016-11-09 Thread John McKown
On Wed, Nov 9, 2016 at 12:04 AM, <liyu1...@gmail.com> wrote:

> I don`t know how to speak 'iota' too,I have to say "i---o---t---a" when I
> talk with somebody.
>
>
​Being a crude Texan, I pronounce it like "eye ough ta"​

​(which is also how I pronounce "i ought to" because, well, I'm a Texan!
[grin]). BTW, it's also the 9th letter in the Greek alphabet.​
​ref: https://www.youtube.com/watch?v=0T1sUNyqWPo which is not how I
pronounce it, but more like Marvin says.​


-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.