"Simple" Languages in FreeBSD

Russell L. Carter rcarter at pinyon.org
Fri Jul 1 20:46:46 UTC 2016


Hooray, a bike shed for a rainy day.

Enough theory.  Here's all you need:

http://programming-motherfucker.com/become.html

Pick one, start at the beginning, work your way through.  (You can
read those three books online for free, if you need to.  And use the
linux advice, it's basically the same as FreeBSD.)

Profit.

I have learned perl to expert level 3 times in 20 years.
(there's a clue in there about how much I like perl)

I spent 10 years writing all my scripts in ruby.

I made quite a bit of money writing c, c++ and fortran.

I can write bash expertly too.  But any reasonably sophisticated bash
program ends up looking as transparent as a medium level perl
program. I.e., inscrutable.

I taught myself go, and it's very cool, for a kid's language.  I wrote
a "configure" type front end to cmake in bash, perl, and go as an
exercise, and the go version is by far the most transparent, while
needing 25% less code.  But the size of the binaries, egads.  OTOH,
given the whole container religion is being built with it, you can
probably get a job easy.  While the buzz lasts.  The docs are very
high quality.

Nowadays I just write in c++14.  Everything.  It is bliss.  But I've
been c++ templating since 1991.  Having witnessed the insane variety
of f*cked up c++ projects though, I can't recommend it to a beginner.

Cheers,
Russell

On 07/01/16 12:29, Garance A Drosehn wrote:
> On 1 Jul 2016, at 14:22, Allen wrote:
>>
>> Before I respond too much, I wanted to say thanks to everyone that took
>> the time to reply, again, thank you. Any input is appreciated.
>>
>> OK, the reason I'm thinking now is a better time, quite simply, I'm 33
>> years old now, and I've wanted to learn Coding in some way for a very
>> long time, and before recently, I really Honestly think that a part of
>> the reason I never learned, is that all through school, I always did
>> terrible in Math.
>
> I've programmed in many languages over the years.  I think any one of
> Perl, Python or Ruby would be fine.  The main issue would be your
> introduction to whatever language you pick.
>
> In the case of Ruby, this book might be of interest:
>
>    https://pragprog.com/book/ltp2/learn-to-program
>
> I'm sure there are similarly good introduction books which are based
> on the other two languages.  I work more with Ruby (and Crystal) than
> the other two, so I tend to know more about Ruby-related options.
>
> Another nice thing is to get used to typing in short code snippets
> to figure out some detail in the language.  In the case of ruby,
> you'd use the unix command 'irb' (for "interactive Ruby"), and then
> you can just type in a few lines of ruby to see what the language
> does with them.  With python you can do almost the same thing by simply
> typing 'python' without any input files, and then typing in commands.
> (and I expect there are better options that than).  AFAIK, perl does
> not come with one of these interactive coding tools, but certainly
> they're easy enough to come across, such as this one:
>
> http://www.sukria.net/perlconsole.html
>
> The generic term for these convenient interactive interfaces is a
> "REPL", which stays for "Read-Execute-Print-Loop".  They can be
> very helpful when learning a new language.
>
> Personally I'm also interested in the new language of Swift, but
> Swift is still evolving pretty rapidly, so it's probably not a good
> language to jump into right now.  (or at least, not if you're learning
> to program on FreeBSD.  Swift and Swift "playgrounds" would be much
> more interesting if you were learning to program on macOS!).
>
> Others have mentioned 'sh' and 'bash', and certainly I do a lot with
> both of those.  If you do want to write scripts in these shells, you
> might get some benefit out of:
>
> https://www.shellcheck.net
>
> This is not a full-fledged REPL, because it doesn't execute any of
> your shell code.  But it does analyze the code to look for comment
> causes of errors.  You can also install the shellcheck command on
> your own computer if you don't want to go to the web site.
>
> It looks like there are web-based REPL's for several languages available
> at:
>
> https://repl.it/languages
>
> but I just came across that while googling right now, and have never
> used any of the REPL's which are there.
>


More information about the freebsd-questions mailing list