Which programming languages don't u use,and for which reason

Python: Too-easy (seems like it can do everything anywhere but not necessarily at performance) That's about it :p

I looked at some Hello World examples for C, C#, C++, Rust, Java, and Kotlin a few days ago, and found I liked Java's for being understandable to read up-front (Rust's example felt too-simplified and everything else had an include for stdout with the major parts). I haven't really had to learn any programming language yet, but I'm interested in C++ for performance and Java for everywhere.

Rust sounds like a solution to not doing things right in C++ and hasn't caught my interest. I'm not too sure the value of C or C# vs C++, and don't know of anything using all-C or C#. Python is cool, but I like the idea of Java instead and was initially interested in Java from Android.

As for Java and C++, my favorite game servers run with those! I figure Kotlin is close-enough to pick up alongside Java, and C++ is useful mostly everywhere.
 
Isn't everything that abstracts away from the hardware architecture an illusion? I mean, in the end your whole program structure is made of AND, OR and XOR with an instruction pointer to remember where you're at.

Ultimately there isn't too much difference between it and what we send for, i.e the IRC protocol, requesting data. This uses grammar and could be over-engineered enough to utilise an abstract machine.

The topic title mentioned "programming languages" which, general purpose or not, does tend to exclude SQL or HTML.


I kind of see what you are saying. But in the same way, they are really just configuration files in the same way that .ini or .json are. This is a completely different application domain to programming languages. Thus they are not really a good argument against "just write everything in C".

Postscript is actually quite substantial as a programming language. It is way more than just static markup for example. I don't know what it classes as these days. Its all a grey area.
I made some PS scripts for dynamic printer output. If it's a language depends on your definition, but you can't calculate anything with it and it's not interactive afaik. It's basically a standardized instruction set to control a printer-head with a static sequence of characters. If that's a programming language. any set of operational instructions for a random machine is 1 too...

Not entirely sure about the possibilities. Is it possible to interrupt the print job and insert data? Pretty hacky but maybe it's possible to keep it repeating a moveto combination with no end and push other instructions in it. Then you would theoretically have interactivity.
 
If it's a language depends on your definition, but you can't calculate anything with it and it's not interactive afaik. It's basically a standardized instruction set to control a printer-head with a static sequence of characters.
(sigh)

1 3 { 9 mul } repeat =

will "display" (i.e., print) the value of 9 cubed.
 
Easier to write about the languages I do use than to list the ones I won't touch.
C...because I do "close to hardware" programming on embedded systems
C++...because it's my favorite general purpose programming language and I like the OO paradigm...and it scares the uninitiated
python...because it has bindings to pretty much everything and I can get a RAD prototype up and running quickly
PERL...I like writing I/O processing pipes on the command line
assembler...sometimes ya just gotta poke the bear

Notable lanugages I have no use for:
JAVA...I have no interest in e-commerce or business programming
C#...Microsoft pushes it. Need I say more?
rust...one of many "solutions in search of a problem"

To be fair though. If I have to do something platform independent then I'm not totally opposed to writing it in Java...just not my first choice.
 
but you can't calculate anything with it
Once upon a time you would put your mandelbrot calculations in PS onto your printer, which was a 32Bit RISC without some blooming windows on top of it, making the picture come out faster.
 
I knew this was out there, somewhere (folks are always not believing the PS is Turing complete).

From <https://cseweb.ucsd.edu/classes/sp05/cse130/misc/Postscript_examples/pi.ps.html>

Note the "big*" routines implement a multiple precision math package.
The actual computation is the few lines of code before the "didpaint" invocation (just before the end of the file).
Sure looks like a "program", to me! ;)

Code:
%!PS-Adobe-2.0
%%Title: Calculate Pi in PostScript
%%Creator: Frank Martin Siegert [frank@this.net] - http://www.this.net/
%%Date: 23. November 1996 02:23
% Updated 2. April 1998 23:40
%%BoundingBox: 0 0 592 792
%%DocumentNeededFonts: Courier Courier-Bold
%%EndComments

% Enter your desired number of digits here, min. 20, max. 262136
% Be prepared to wait a long time for anything > 1000

/ndigits 1000 def

% If your printer fails with a timeout error try to uncomment the next line
% this will give you one hour extra time...

% statusdict begin 3600 setjobtimeout end


% Some defines for startup

/i 0 def
/str4 4 string def
/nblock ndigits 4 idiv 2 sub def
/t1 nblock 1 add array def
/t2 nblock 1 add array def
/t3 nblock 1 add array def
/tot nblock 1 add array def
/base 10000 def
/resstr 4 string def

% Define the page sizes and margins

/pagemargin 60 def
/lineheight 12 def
/pageheight 792 lineheight sub pagemargin sub def
/pagewidth 592 pagemargin sub def
pagemargin pageheight moveto
/bigfont {
        /Courier-Bold findfont 36 scalefont setfont
} bind def
/smallfont {
        /Courier findfont 12 scalefont setfont
} bind def

/scratch 16 string def

% Define bigmath routines - still a bit suboptimal
% (direct ported from the C implementation by Roy Williams)

/bigadd {        % increment result
        /result exch store
        /increment exch store
        0 1 nblock 1 sub {
                nblock exch sub /i exch store
                result i get
                increment i get
                add dup base ge {
                        base sub
                        result exch i exch put
                        result dup i 1 sub get
                        1 add i 1 sub exch put
                } {
                        result exch i exch put
                } ifelse
        } for
} bind def

/bigsub {        % decrement result
        /result exch store
        /decrement exch store
        0 1 nblock 1 sub {
                nblock exch sub /i exch store
                result i get
                decrement i get
                sub dup 0 lt {
                        base add
                        result exch i exch put
                        result dup i 1 sub get
                        1 sub i 1 sub exch put
                } {
                        result exch i exch put
                } ifelse
        } for
} bind def

/bigmult { % factor result
        /carry 0 store
        /result exch store
        /factor exch store
        0 1 nblock {
                nblock exch sub /i exch store
                result i get factor mul
                carry add
                dup /carry exch base idiv store
                base mod
                result exch i exch put
        } for
} bind def      


/bigdiv { % denom result
        /carry 0 store
        /result exch store
        /denom exch store
        0 1 nblock {
                /i exch store
                result i get carry base mul add
                dup denom mod /carry exch store
                denom idiv
                result exch i exch put
        } for
} bind def      

/bigset { % rhs result
        /result exch store
        /rhs exch store
        0 1 nblock {
                result exch 0 put
        } for
        result 0 rhs put
} bind def

/bigzero { % result
        /result exch store 1      
        0 1 nblock {
                result exch get 0 ne { pop 0 exit } if
        } for
} bind def

/bigcopy { % from result
        copy pop
} bind def
      
/bigprint { % result
        /result exch store
        bigfont result 0 get str4 cvs onpage smallfont (.) onpage
        1 1 nblock {
                result exch get str4 cvs resstr 0 (0000) putinterval resstr
                exch dup length 4 exch sub exch putinterval resstr onpage
        } for
} bind def
      
/bigatan { % onestep denom w2 w1 result
        /result2 exch store
        /w1 exch store
        /w2 exch store
        /denom exch store
        /denom2 denom denom mul store
        /onestep exch store
        /k 1 def
        1 result2 bigset
        denom result2 bigdiv
        result2 w1 bigcopy
        {
                onestep 0 ne {
                        denom2 w1 bigdiv
                } {
                        denom w1 bigdiv
                        denom w1 bigdiv
                } ifelse

                w1 w2 bigcopy
                k 2 mul 1 add w2 bigdiv
                k 2 mod 0 ne {
                        w2 result2 bigsub
                } {      
                        w2 result2 bigadd
                } ifelse
                /k k 1 add store
                w2 bigzero 1 eq { exit } if

        } loop
} bind def

% Define output routines

/didpaint false def
/onpage {
        /didpaint true store
        show
        currentpoint exch pagewidth ge {
                pagemargin exch lineheight sub moveto
                currentpoint exch pop pagemargin le {
                        showpage
                         pagemargin pageheight moveto
                        /didpaint false store
                } if
        } { pop } ifelse
} bind def

% Using Machin's formula: pi/4 = 4 arctan(1/5) - arctan(1/239)

1 5 t2 t1 tot bigatan 4 tot bigmult 2 239 t2 t1 t3 bigatan
t3 tot bigsub 4 tot bigmult tot bigprint

didpaint { showpage } if

%%EOF
 
Once upon a time you would put your mandelbrot calculations in PS onto your printer, which was a 32Bit RISC without some blooming windows on top of it, making the picture come out faster.
Never seen it until now. I'm only familiar with serial matrixprinters from the time. But what is it? It doesn't look like program structure. More sort of macro's.
 
But what is it? It doesn't look like program structure. More sort of macro's.
It's a stack-oriented language (sort of like RPN or FORTH, if you are familiar with either of those).

Tokens are pushed onto the stack in the order encountered. For example:
/ndigits 1000 def
pushes the identifier "/ndigits" onto the stack.
Then, the value "1000"
Then the operator "def" -- which consumes the previous two locations on the stack to create a "variable" named "/ndigits" having the value "1000".
Thereafter, the symbol "ndigits" can be used, as needed, and always evaluated to "1000"

As with any language, you need to be aware of the "reserved words" that have specific meanings -- like def, in this example. mul represents multiplication (form the product of the two top stack values and place THAT in their place on the stack) similarly div, add, sub, etc. Some control the marking engine to create the output (graphically). Some maintain a dictionary in the program.
 
Python: Too-easy (seems like it can do everything anywhere but not necessarily at performance) That's about it :p

I looked at some Hello World examples for C, C#, C++, Rust, Java, and Kotlin a few days ago, and found I liked Java's for being understandable to read up-front (Rust's example felt too-simplified and everything else had an include for stdout with the major parts). I haven't really had to learn any programming language yet, but I'm interested in C++ for performance and Java for everywhere.

Rust sounds like a solution to not doing things right in C++ and hasn't caught my interest. I'm not too sure the value of C or C# vs C++, and don't know of anything using all-C or C#. Python is cool, but I like the idea of Java instead and was initially interested in Java from Android.

As for Java and C++, my favorite game servers run with those! I figure Kotlin is close-enough to pick up alongside Java, and C++ is useful mostly everywhere.
Give F# and Scala a try with "Hello World"
 
I looked at some Hello World examples for C, C#, C++, Rust, Java, and Kotlin a few days ago, and found I liked Java's for being understandable to read up-front (Rust's example felt too-simplified and everything else had an include for stdout with the major parts).
The capabilities of the language correlate inversely with the "terseness" of trivial programs. E.g., in Dartmouth BASIC:
10 PRINT "Hello, World"
20 END

OTOH, in Limbo:
implement Hello;​
include "sys.m";​
sys: Sys;​
include "draw.m";​
Hello: module​
{​
init: fn(ctxt: ref Draw->Context, argv: list of string);​
};​
init(ctxt: ref Draw->Context, argv: list of string)​
{​
sys = load Sys Sys->PATH;​
sys->print("Hello World\n");​
}​

Note that the framework for the Limbo implementation allows/supports arguments to the program (init() being the "main" program).
It also supports the notion of "modules" -- which allow functions and data to be packaged in a particular context -- like "Hello" has an "init()" member, sys (which is a pointer to the Sys module after it has been loaded into memory) has a "print()" method as well as a constant called "PATH" (which holds the pathname to the sys.m module on the disk). The "draw" module contains mechanisms to scribble on the screen.

The point being, there is lots of seemingly superfluous "code", here... but, it is necessary to support the modular structure of the language -- unlike BASIC where you get everything for free (but NOTHING more!)
 
  • all proposed replacements for C++ (including Rust);
  • Python, because it is logical that with the development of Mojo it will replace Python. This is good for FreeBSD because FreeBSD, Mojo and C++ all use the same toolchain, namely LLVM, written in C++. Hopefully parts written in Python will be replaced by Mojo or treated as legacy/deprecated. By the way, I assume that in the future dependence on GCC will also be considered a problem.
 
I looked at some Hello World examples for C, C#, C++, Rust, Java, and Kotlin a few days ago, and found I liked Java's for being understandable to read up-front (Rust's example felt too-simplified and everything else had an include for stdout with the major parts).

Let's start with a little demonstration:
Bash:
$ echo 'main(){puts("Hello, World");}' | cc -xc -w -o /tmp/hello - && /tmp/hello && rm /tmp/hello
Hello, World

Your notion of "major parts" is wrong. Of course you'll use some function to output your text, in any language. You won't write that function yourself. In my demo above, it's puts(3), just for the fun of not using printf(3). So, the "major part" is, if you want, the implementation of that function. Or, in Java, the implementation of Stream.println. Both are part of the language's standard functions that are always linked to your program.

C just requires (since C99) that every function called is declared by giving a "prototype" (just name, arguments and types) of that function. That's all you'll find in stdio.h, NOT the implementations. As you see in the demo, it still works without (just issuing warnings, which I disabled with -w). There are good reasons this is forbidden since C99, so don't do it in real code, but you see there are no "major parts" included.
 
Smalltalk & Ada died ...
Ada is still used -- esp in the US defense industry. There are many advocates but it is such a "big" language that most folks just opt for something else -- "to get the job done".
 
What I don't use is assembly on x86 and derivates. As it was written in the holy book of system design* "the x86 arch is difficult to explain and impossible to love", and that still holds true. The architecture, the syntax, the limitations - this is such a Charly Foxtrott it beggars belief.
SPARC assembly is kinda strange (but still fun), MIPS has obscurities also (the two topmost address bits, for example), m68k assembler feels like writing BASIC, ARM makes sense, PPC hints at the actions taken for an instruction... But x86?

*: Hennessy & Patterson - please buy the paper version if you can.
 
As it was written in the holy book of system design* "the x86 arch is difficult to explain and impossible to love", and that still holds true.
I really liked the J11. And, the 16032 was delightfully orthogonal (but the processor had way too many errata to be practical).
 
I started learning Rust and enjoyed it, but I realized it has limited support for architectures and operating systems as host systems (tier 1). Rustup doesn’t support Android aarch64, so cross compilation is PITA (I use an ARM Android laptop to code during train rides). Go, on the other hand, easily cross-compiles from anything to any target, like it's nothing. I gave up on Rust, though I admire its ownership and borrowing system—it’s a great programming model, I didn't like it's toolchain that's built around by the Rust community. Rustc is awesome though. Rust code is beautifully chaotic, but Go handles 90% of what Rust can do, and the remaining 10%, I use C. Memory safety is not a major selling point for me since I mainly create simple command-line tools that's easy to debug. I see C as a portable assembly language that does exactly what you tell it to, and I’m happy with that. Rust doesn’t seem to fit my use cases, and while I think C++ is utter garbage (like Windows), it works, and works well enough.
 
Back
Top