Heater
Posts: 13853
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 8:23 am

John_Spikowski,
ScriptBasic is written in C. How is expanding it in C a different language?
Because C is a different language to SB. ScriptBasic is a programming language is it not? C is a different one.

ScriptBasic has a syntax and semantics defined somewhere I presume. Even if it's only actually defined properly as being "what the interpreter understands".

C is a programming language. It too has a syntax and semantics, defined by the C standard document.

These are two totally different languages. If I feed SB source into the C compiler it ain't going to work. If I feed C source into the SB interpreter it ain't going to work.

It does not matter that SB is written in C. That is an implementation detail. Any programming language can be implemented in any other programming language. SB could as well be implemented in Swift or assembler.

Large parts of the Rust, Swift and other language compilers are written in C++. They use the LLVM compiler back end. Despite the ease with which we can use C from Rust or Swift we make a distinction between the Rust, Swift and C languages.
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 8:47 am

I don't use static languages. Too restrictive.
If I feed SB source into the C compiler it ain't going to work.
I compile with gcc SciptBasic code all the time to generate small executables. My Tatamix.sb script would produce an executable less than 25KB.

Heater
Posts: 13853
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:15 am

John_Spikowski,
I don't use static languages. Too restrictive.
?

Yes you do. As far as I can tell you have written extensions in C, a static language, for all the challenge solutions.

Usually I might add to get around the restrictions in time and or space of ScriptBasic itself!

Besides, how is that relevant to the current discussion?
I compile with gcc SciptBasic code all the time to generate standalone executables.
?

GCC is not C.

I use LLVM everyday when compiling Rust to generate standalone executables. That does not mean Rust is C++ or vice versa.
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:26 am

You don't use ScriptBasic nor do you know what you're talking about. I'm done explaining the obvious to you.

Smart people learn from everything and everyone. Average people from experiences. Stupid people have all the answers.
Last edited by John_Spikowski on Tue Nov 19, 2019 9:38 am, edited 1 time in total.

Heater
Posts: 13853
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:37 am

John_Spikowski,
You don't use ScriptBasic or do you know what you're talking about.
Oh for goodness sake. Now you are going go all ad hominem.

What I use or know about is not pertinent to the question. Even if I used nothing and knew nothing it would not make the ScriptBasic language = the C language. No more than it would make the world flat or the man on the Apollo moon landing fake.

You now seem to be arguing that ScripBasic is in fact C.

OK, let's go with that. All so called "ScriptBasic" challenge solutions should be regarded as C solutions. And judged accordingly.

I think the difficulty here is I am talking about languages. Their definitions, syntax, semantics. You are talking about implementations as if that was the same thing. They are not. As I said by way of an example, GCC is not C.
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:46 am

As I said by way of an example, GCC is not C.
If you don't like gcc, any other C compiler will do.

Heater
Posts: 13853
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:47 am

Code: Select all

$ cat hello.sb
print "HELLO WORLD"

$ gcc hello.sb
/usr/bin/ld:hello.sb: file format not recognized; treating as linker script
/usr/bin/ld:hello.sb:1: syntax error
collect2: error: ld returned 1 exit status
$ mv hello.sb hello.c
$ gcc hello.c
hello.c:1:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before string constant
 print "HELLO WORLD"
       ^~~~~~~~~~~~~
$
$ gcc hello.c
hello.c:1:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before string constant
 print "HELLO WORLD"
       ^~~~~~~~~~~~~
michael@monster:/mnt/c/Users/michael/tatami_rust$ clang hello.c
hello.c:1:1: error: unknown type name 'print'
print "HELLO WORLD"
^
hello.c:1:7: error: expected identifier or '('
print "HELLO WORLD"
      ^
2 errors generated.
Nope. Does not work :)
Memory in C++ is a leaky abstraction .

Heater
Posts: 13853
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:49 am

But "any other C compiler" is not C either.
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:54 am

Nope. Does not work
Works for me.

Heater
Posts: 13853
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 9:56 am

Yes, but you have a compiler for a different language :)
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 10:05 am

I use gcc to compile everything having to do with ScriptBasic.

Heater
Posts: 13853
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 10:09 am

"Basil Fawlty : It doesn't matter. Look, it doesn't matter. Oh, I can spend the rest of my life having this conversation. Now, please, please, try to understand before one of us dies.

Manuel : I try."


:)
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 10:30 am

Do you dislike any language starting with a S?

ScriptBasic
Swift
Spikowski
...

User avatar
rpdom
Posts: 15564
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 11:10 am

John_Spikowski wrote:
Tue Nov 19, 2019 10:30 am
Do you dislike any language starting with a S?

ScriptBasic
Swift
Spikowski
...
Spanish? :lol:

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24115
Joined: Sat Jul 30, 2011 7:41 pm

Re: Liberation through Computer Literacy

Tue Nov 19, 2019 12:22 pm

Idiots, the lot of you. You just cannot help yourselves.

Have a closed thread and some demerits.

Edit: Have been pointed at this https://www.destroyallsoftware.com/talks/wat which just about sums up the last two pages of sad language wars.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Return to “General programming discussion”