Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jul 2020 18:38:37 -0700
From:      Don Wilde <dwilde1@gmail.com>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        Brandon helsley <brandon.helsley@hotmail.com>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Javas, C++ and Ruby
Message-ID:  <243f3d0b-d664-a122-6d74-294df7f346e5@gmail.com>
In-Reply-To: <CAGBxaX=AuFx2fd0vwK0MTvSjvrrMZhNsG1TqecbFrAkqge96CA@mail.gmail.com>
References:  <CY4PR19MB01049FDF137BD70941429DB8F9600@CY4PR19MB0104.namprd19.prod.outlook.com> <5a761348-fb9f-5cf3-e035-7ba42afcb221@gmail.com> <CAGBxaX=QvJqSycQJrq3RmFJ57E=ebSY6sG2BTXpUKBP5jpqw6g@mail.gmail.com> <8fcd60d7-1de1-82dc-d840-2555663ac153@gmail.com> <CAGBxaXn9tq6hbbNdjn_iqSiSr74exO1G-M9=eyP6YHykQ8QctA@mail.gmail.com> <bae2f4df-ec82-5beb-57ae-a07a5460a48a@gmail.com> <CAGBxaX=AuFx2fd0vwK0MTvSjvrrMZhNsG1TqecbFrAkqge96CA@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

On 7/13/20 5:46 PM, Aryeh Friedman wrote:
>
>
> On Mon, Jul 13, 2020 at 8:05 PM Don Wilde <dwilde1@gmail.com 
> <mailto:dwilde1@gmail.com>> wrote:
>
>
>     On 7/13/20 3:39 PM, Aryeh Friedman wrote:
>>
>>
>>     On Mon, Jul 13, 2020 at 6:16 PM Don Wilde <dwilde1@gmail.com
>>     <mailto:dwilde1@gmail.com>> wrote:
>>
>>
>>         On 7/13/20 2:49 PM, Aryeh Friedman wrote:
>>>
>>>
>>>         On Mon, Jul 13, 2020 at 12:46 PM Don Wilde
>>>         <dwilde1@gmail.com <mailto:dwilde1@gmail.com>> wrote:
>>>
>>>
>>>             On 7/13/20 5:59 AM, Brandon helsley wrote:
>>>
>>         <flame bait> Personally, I like the LLVM-based CLANG and
>>         Crystal. Most of the installation time comes from the various
>>         versions of LLVM being requested by the HLL. IMHO, the LLVM
>>         is a much more flexible and accessible virtual execution
>>         engine than Oracle's Java and JVM. </flame bait>
>>
>>
>>     C/C++ most certainly are not beginner friendly languages and the
>>     OP is someone who has never done programming before.
>>
>>
>>     -- 
>>     Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>
>     Doesn't make him a bad guy, Aryeh. Given that Brandon is already
>     doing his best to learn _and_ to contribute to the Project he
>     doesn't deserve such crabby comments, although I expected such
>     when I bracketed my opinion with <flame bait></flame bait>.
>
>
> What I misreading I never said he (or you) were "bad guys".
Understood. Your comments were very succinct and *I* took that as rude. 
My apologies.
>
>     IMHO, while Java syntax is deceptively simple, your comments to
>     date prove that _using_ the language in the real world is not
>     trivial. I made the mistake a few months back of attempting to
>     compile the entire JDK8 code base on a rock-stable Ubuntu 18
>     system and it was a nightmare. The successive approximations you
>     have gone through to get a working IDE and JVM deployment
>     environment for Java show that it is a challenge, even for an
>     experienced coder as you obviously are.
>
>
> Again *WRONG* I got Java to work as advertised right out the box with 
> nothing more than portmaster -d java/openjdk8 (that is all I have ever 
> needed to do on FreeBSD since the first time I ever used it on FreeBSD 
> back in 2004).   My "difficulty" with IDE's is not a "difficulty" only 
> a general very strong dislike of IDE's in *ANY* language (and I have 
> had the same issues with them in all languages for example Eclipse 
> when dealing with C/C++ drags around huge libraries that are not a 
> part of the STL or StdLib [or even Boost] and are a hell and half to 
> compile outside of Eclipse).
Now, THAT makes a lot of sense, Aryeh. I have yet to even *attempt* to 
compile Eclipse from source on freeBSD. I, too, am heading towards 
simply adding source highlighting to EMACS and using it for everything. 
Unfortunately, in a lot of specialized work we do like data science, one 
needs a lot of specialized libraries. Perl with CPAN started this trend, 
but Python's taken that over the top, especially with the proliferation 
of scientific and DS tools.
>
> And Java is one the most natural languages I have used there are no 
> bizzare exceptions such as there are in JavaShit (oops JavaScript), 
> C/C++, etc.   If a keyword/construct works in place/platform A a given 
> way then it is guaranteed to work on place/platform B (even if on 
> radically different devices and/or OS's for example if I stay away 
> from Android only libraries then anything I write in FreeBSD will work 
> there without modification or recompiling and it will also work on 
> Window$, MacOSX, etc.).
>
> As to code complexity Java has *MUCH* simpler code then C/C++ or 
> almost any other non-scripting language (almost all of which are not 
> as general purpose as they claim) I want to just give a example that 
> should prove my point.   In 1993-1995 I helped write one the first 
> streaming media (video) servers in C/C++ took a team of 5 and 100+ 
> KLoC.  I wrote a similar video capturing program in Java in June 
> because my SO was not able to find any suitable screen 
> capture-->streamable video software that would work on all the 
> platforms we needed to work on (she teaches computer science at the 
> local university which has decided to call 100% virtual next 
> semester).   The Java version was less than 200 lines of code (ok I 
> cheated a little and left the stitching together of screen snapshots 
> to graphics/ffmpeg) that has a better frame rate (30 FPS vs. 10 FPS) 
> and audio then we ever achieved in the C/C++ version above (credit 
> Moore's Law mostly here).   Note the Java version used nothing but the 
> standard Java library that comes with OpenJDK8.   Another case is I 
> just wrote some code for the EMR to interface directly with a remote 
> MySQL instance (first time we have used an external DB) and was able 
> to have it automatically generate the needed SQL statements and such 
> based on the structure of the data at run time in less than 100 lines 
> of code, last time I did that C/C++ it was over 1000 lines of code and 
> it was not able to handle dynamic structures at runtime while the Java 
> version can (again the Java version used nothing but the standard Java 
> library and a J/OBC driver [devel/mysql-connector-java]).
I'll certainly agree with your statement whole-heartedly: "As to code 
complexity Java has *MUCH* simpler code then C/C++ or almost any other 
non-scripting language," although I would argue that Java IS a scripting 
language since the JVM _is_ the interpreter. Disagreement on 
terminology, because with LLVM, so are CLANG and Crystal.
>
>
>     AFA CLANG and Crystal, C++ is what colleges teach newbie coders in
>     CS. Business apps coders headed for IT and (shudder) the IT web
>     stack get Java. Admittedly, they don't go very deep (in either of
>     those cases) but the user base is out there.  C++ is also what a
>     lot of FreeBSD itself is written in these days, so knowing at
>     least something about it is A Very Good Thing(tm).
>
>
> Actually Java has been the language of instruction at most schools 
> (grad/undergrad CS [not IT]) for almost 20 years now: 
> https://www.bestcomputerscienceschools.net/what-languages-will-i-learn-in-a-computer-science-program/ 
> ... Says most schools use Java with a smaller number using C/C++ and 
> then even smaller numbers using misc. languages. Almost every CS (not 
> computer engineering) paper I have read in the last 15 years uses Java 
> as the reference language when dealing with general CS topics 
> (specific topics like OS's of course are in other languages like C/C++).

Okay, my attention hasn't been on colleges, so I'll accept that. I do 
agree that Java is a much better first language choice than C or C++.

>
> I agree C/C++ is definitely worth learning just not as a *FIRST* 
> language (much more worth it then JavaShit).
Ohh, gawd, yes. I'm fighting that sh!t-storm now as I've been asked to 
do a web-resident demo of my library. the right choice of jQuery 
wrappers helps, but it's still a royal PITA.
>
>
>     Crystal is based on Ruby, the most elegant language I have ever
>     used, and I started with assembler on 8-bit micro controllers in
>     the 80s. That's MPHO, but I've been coding for the Ruby
>     interpreter since 2004. Crystal has a wonderful combination of
>     both dynamic and static typing. It's a language with incredible
>     depth but elegant simplicity, and it's extremely well documented
>     from top to bottom.
>
>
> Quick note dynamic typing in *EVERY* language I have seen it is just 
> asking for it!
That's why I like Crystal. It lets you play fast and loose, but it 
insists that eventually ALL variables *must* have a known and 
*completely* defined union of possible types. It takes a while to 
compile, but that's because it's checking every possible case of every 
decision tree, not just the high-level syntax. It refuses to let you 
leave any dangling variables, period. I completely agree that dynamic 
typing is fraught with peril for *any* production environment.
>
> I have used Ruby and really liked some aspects of it like mix-ins but 
> soon discovered that Java had them also in the much more elegant form 
> interface(s) (keyword) and "smart" enums [as far I know no other 
> language allows you to use enums this way] that allow you to have 
> reflective like behavior without the bottomless pit of reflection.
Sounds like we agree on more than we disagree, Aryeh. Sorry I got defensive!

I'll look up these "smart" enums, and see if I can replicate them in 
Crystal. :D

-- 
Don Wilde
****************************************************
* What is the Internet of Things but a system      *
* of systems including humans?                     *
****************************************************




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?243f3d0b-d664-a122-6d74-294df7f346e5>