Pro Tip: Learn an old programming language. #Ada, #Erlang, #Pascal; #Forth or #Lisp if you’re hardcore. All of these have modern tooling. Don’t tie yourself solely to modern platform politics.
Almost all the code generation is table driven. Inc and Dec are one of the exceptions that require code. In this case it's a loop to generate the INC or DEC instructions.
Only thing left to do is to generate add or subtract if the offset is too large. For now I'm stabbing at doing this for offset greater than four. Optimising here is much more complex than it might seem. For example you can INC any register whereas ADD requires A.
#Quiche#compiler is now alive! (At least Conway's variant of alive). The initial version was slow - about four seconds per generation. It was multiplying coordinates for each cell read and write.
The second variant uses offsets into each liner buffer, and only redraws changed cells. It's now running at three to four generations per second.
Faleceu dia primeiro Nikolaus #Wirth, criador, entre outras linguagens, de #Pascal, uma das linguagens que eu gostei de usar por muitos anos, primeiro como adolescente autodidata vc (nem lembro direto o que eu fazia) e depois numa versão embutida em um software de CAD (eu criava plug-ins e "objetos paramétricos").
Si vous vous ennuyez durant ce jour de congés et avez envie de discuter un peu autour d'un peu de code en #Pascal je vous propose deux streams sur #Twitch.
A weird thing about being 50 is that there are programming languages that I've used regularly for longer than some of the software developers I work with have been alive. I first wrote BASIC code in the 1980s. The first time I wrote an expression evaluator--a fairly standard programming puzzle or homework--was in 1990. I wrote it in Pascal for an undergraduate homework assignment. I first wrote perl in the early 1990s, when it was still perl 4.036 (5.38.2 now). I first wrote java in 1995-ish, when it was still java 1.0 (1.21 now). I first wrote scala, which I still use for most things today, in 2013-ish, when it was still scala 2.8 (3.4.0 now). At various times I've been "fluent" in 8086 assembly, BASIC, C, Pascal, perl, python, java, scala; and passable in LISP/Scheme, Prolog, old school Mathematica, (early days) Objective C, matlab/octave, and R. I've written a few lines of Fortran and more than a few lines of COBOL that I ran in a production system once. I could probably write a bit of Haskell if pressed but for some reason I really dislike its syntax so I've never been enthusiastic about learning it well. I've experimented with Clean, Flix, Curry, Unison, Factor, and Joy and learned bits and pieces of each of those. I'm trying to decide whether I should try learning Idris, Agda, and/or Lean. I'm pretty sure I'm forgetting a few languages. Bit of 6502 assembly long ago. Bit of Unix/Linux shell scripting languages (old enough to have lived and breathed tcsh before switching to bash; I use fish now mostly).
When I say passable: in graduate school I wrote a Prolog interpreter in java (including parsing source code or REPL input), within which I could run the classic examples like append or (very simple) symbolic differentiation/integration. As an undergraduate I wrote a Mathematica program to solve the word recognition problem for context-free formal languages. But I'd need some study time to be able to write these languages again.
I don't know what the hell prompted me to reminisce about programming languages. I hope it doesn't come off as a humblebrag but rather like old guy spinning yarns. I think I've been through so many because I'm never quite happy with any one of them and because I've had a varied career that started when I was pretty young.
I guess I'm also half hoping to find people on here who have similar interests so I'm going to riddle this post with hashtags:
Some compiler routines such as sizeof() need to be able to handle a type name as a parameter, for example sizeof(Integer).
I've added a type called TypeDef to handle this. When the parser hits an identifier which is a type name but not a typecast it returns a value of type TypeDef.
VSI has #pascal for OpenVMS x86_64! :D Which makes me happy because Pascal was my second "real" language. The first was BASIC, but my actual "first" language was HyperCard :)
"Since Jobs did not understand Raskin’s color scheme [important for using the chart easily], he had an artist alter the work [...]. Jobs then ordered Raskin’s name removed as the creator of the work and placed the artist’s name in its place."
#pascal#modula2#oberon#lilith Niklaus Wirth passed away on 1st Jan 2024? I learned a lot by reading his books and by using Pascal & Modula 2 on the UCSD virtual machine on the Apple ][.
I keep seeing great languages plagued by the lack of documentation (or a pretty one, rather).
Biggest offender to me: #freepascal#pascal. With such a great compiler I am pissed off at the lack of organized documentation, it feels like an amateurish job. A lot of units are barely explained if at all (e.g. I double triple dare you to do OpenGL or X11 apps based on the wiki alone). It even lacks a good tutorial (which is why I give people https://castle-engine.io/modern_pascal as a resource)… FP’s wiki makes Tcler’s wiki look pristine. I’ve had the same symptom with Gambas and a lot of Lisp dialects. It’s even better when it’s a language on GitHub (or implementation/dialect a lot of times) with no useful info. Some other languages have documentation, but it either is or looks outdated which I believe is an impediment to adoption.
After I’ll be done with uni this September, I’ll try my best to do a proper and modern Pascal tutorial (and maybe do the same with a couple of other languages). I believe there’s an audience, especially in my country.
Ooo. Company just called I applied for.
Them: We'd like to get you into a round of interviews!
Me: GREAT! How many interviews?
Them: There are six
Me: Oh, Three interviews are my max.
Them: frustrated You don't get to decide that.
Me: Oh, but I DO. click
Back to #pascal programming :) Fight back #tech bros! Fight back.
I posted a review of the book "Recursion via Pascal" by Jeffrey S. Rohl (1984), an overlooked little gem I recently discovered. It's one of the few books entirely devoted to recursion which, as a Lisper, gets me interested.