Stories
Slash Boxes
Comments

SoylentNews is people

Journal by turgid

Which LISP should I learn? Years ago I read about Scheme and wrote some hello world level code. I learned about lambda functions and currying. I also looked at racket. A few years ago, much of my day job involved the JVM and I was getting sick of Java so I got a book on Clojure, which is a very nice language, but I never wrote any.

A few days ago I downloaded and built the latest version of DrRacket.

Should I go straight to Haskell? Or what about other functional languages? Is Erlang worth a look?

I need something stimulating to distract my brain from the mundane nature of everyday life, and mediocre programming languages.

 

Reply to: Re:Mandelbrot explorer

    (Score: 2) by DannyB on Thursday December 02 2021, @03:22PM

    by DannyB (5839) Subscriber Badge on Thursday December 02 2021, @03:22PM (#1201517)

    I've mentioned this on SN before.

    Back in ancient times long past, there were these things called "flip phones" or "candy bar phones". (Paleontologists label this as the "pre smart phone era")

    https://soylentnews.org/comments.pl?cid=1134316&sid=42871 [soylentnews.org]

    I remember J2ME. (Java "lite" on all of the billions of mobile phones in the pre smartphone daze.)

    It didn't have any floating point. I was building my own "asteroids" clone. (And did successfully build it. Gave it to a few friends. Once that accomplishment achieved, I moved on.)

    I needed trig functions. I wanted to draw the ship and rocks as sprites sub classed from a common super class. Each line vector figure (ship or rock) had a series of points relative to a "center" point. It was the center point of the sprite that moved on each frame update. In my game, the rocks rotated, unlike original asteroids. These points around the center point were expressed in polar (r-theta) form. Just draw a line from the first point to the last, and then back to the first, thus drawing a closed figure. (Ship or rock)

    I need to convert from polar form to x-y coords, and then offset to the x-y center of the sprite before drawing on screen.

    But J2ME only had long integers and no trig functions (or log, power, etc)

    There was some library that had the name "bear" in it. This used a 64-bit long, dividing it into 32-bit mantissa and fraction. Trig functions did a few taylor series terms, and that was more than good enough.

    Wow, those were ye olden daze. And it was after the year 2000. Wow, I'm getting old.

    Be sure to see some replies after that posting.

    See also:
    https://soylentnews.org/comments.pl?noupdate=1&sid=40718&page=1&cid=1080994#commentwrap [soylentnews.org]
    about drawing vector graphics on a scope, which in subsequent replies brings up the J2ME asteroids game again. It also shows a way to write a Factorial function without iteration. And how to do Trig functions when you have only integers but no floating point.

Post Comment

Edit Comment You are not logged in. You can log in now using the convenient form below, or Create an Account, or post as Anonymous Coward.

Public Terminal

Anonymous Coward [ Create an Account ]

Use the Preview Button! Check those URLs!


Logged-in users aren't forced to preview their comments. Create an Account!

Allowed HTML
<b|i|p|br|a|ol|ul|li|dl|dt|dd|em|strong|tt|blockquote|div|ecode|quote|sup|sub|abbr|sarc|sarcasm|user|spoiler|del>

URLs
<URL:http://example.com/> will auto-link a URL

Important Stuff

  • Please try to keep posts on topic.
  • Try to reply to other people's comments instead of starting new threads.
  • Read other people's messages before posting your own to avoid simply duplicating what has already been said.
  • Use a clear subject that describes what your message is about.
  • Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)
  • If you want replies to your comments sent to you, consider logging in or creating an account.

If you are having a problem with accounts or comment posting, please yell for help.