tempCodeRunnerFile Solution

Decided to do a little work in go. All of a sudden I’m getting errors in vscodium referencing this tempCodeRunnerFile.go file, like I did in Pascal earlier. Trying to run a program I have run before. I assume it may be because it’s in a folder with many other go programs. Which may not be kosher but hasn’t been a problem in the past. I don’t have the problem if I run from a folder with one go source file. And go itself runs it (go run program) within the directory just fine.

Ok I updated vscodium from codium_1.80.2.23209_amd64 to codium_1.85.1.23348_amd64…didn’t help!

Also updated go to current go version go1.21.5 linux/amd64 …didn’t help

If I open a single file within the folder it runs fine in vscodium.

Solution

The problem, has to do with the Code Runner extension. You have to tweak some settings.

Basically you have to change a user setting to true. In my case I had to add it.

{
    "code-runner.ignoreSelection": true
}

tempCodeRunnerFile.pp?

I was looking at some old Pascal programs, and tried to run a program I named put1.pp within VS Code (vscodium). But I got some error referencing tempCodeRunnerFile.pp (which vscodium apparently created). The program compiled/ran fine using fpc on the command line. I realized the Pascal source started with Program Record1; changed it to Program put1; Then it ran fine in vscodium.

Zoom a useful OBS addition

It’s a desktop feature…not a OBS feature. But I should probably use it more when making videos.

In Accessability choose enable Zoom. Then using the mouse wheel while pressing ALT allows zoom.

So for example when showing the autosize property in Lazarus. Instead of just showing the default left image…you can zoom and show the right image.

Kdenlive transitions

Transitions between scenes can make a video look less amateurish. I could have said more professional, but I don’t like to use that word for anything describing my artistic abilities. In most of my recent videos, I didn’t use any. I probably used 10 different transitions a few years ago in a video I did about my daughter. But I don’t remember much. Anywho, this applies to version 23.08.4.

Kdenlive chages so much that many older YouTube videos are not very useful.

Also all the YouTube videos I saw, used a method that IMHO, over-complicated the procedure. It was only for a transition where one video bleeds into another video. It involved placing the clip or scene (you want to transition to), above and slightly to the left of the previous scene. My first thought was what if you have 20 more clips you want to transition to. Do you keep inserting video tracks above the previous track? Then I thought about it and realized that after the transition, you could cut it and move the rest of the clip back down. But I didn’t see any video that addressed this. Maybe it was obvious to others.

The easiest transition…fade in/fade out. Move your mouse pointer to the upper corners of a clip and drag the red circles below away from the edge.

Some more advanced transitions. Note the red rectangles. Select Slide or Wipe from the Compositions tab below and drag down to a clip. It took me forever to realize that these were in Compositions…I thought they were in the Effects tab. As you can see below, Wipe has been dragged to the 2nd clip. Then you can make various changes/selections from the Effect/Composition Stack tab in the bottom right portion of the screen.

Fixed another quirky Lazarus problem

I had a File I/O form stub, that would open without showing the source or the form. If you clicked View>Source Editor, it would bring up an empty panel (no source). Also “View>Toggle Form/Unit View”, was greyed out. But if you ran it, apparently without a source file or a form, it would run as expected…showing the form. So it knew it was there.

If I clicked on the .lfm file, while Lazarus was open in this project, the source would pop up within Lazarus, but the view would still not be there. If I now clicked on a form control (such as label) the form would pop up.

At this point all the panels I expected were displaying. Except some controls were not displaying when you ran it. So I stretched out the form till everything displayed. And saved All. Now when I open the project everything is as I expect.

Lazarus error solved!

I posted my “Error: Illegal parameter: CpPENTIUM2” to the forum and would go back to the page and no response. I just assumed when I returned to the page, after a new browser start, it would be refreshed…like YouTube. Finally I refreshed and saw a response telling me to delete ~/.lazarus, and that worked. No telling how long that’s been around. I googled “pentium2”, and saw it was discontinued 20 years ago.

BTW. I found <TargetProcessor Value=”pentium2″/> in projectoptions.xml in the ~/.lazarus directory. So why didn’t my grep -r -n “PENTIUM” . find it? I could have probably fixed it myself long ago.

Back to my grep gripe. I googled and was told I needed to use the -i option for a case insensative search. Forget google, grep –help, itself says that…

OK…

bill@bill-MS-7B79:~/.lazarus-old$ grep -r -n "pentium2"
projectoptions.xml:67:  (found it)
bill@bill-MS-7B79:~/.lazarus-old$ grep -i -r -n “PENTIUM2” .
bill@bill-MS-7B79:~/.lazarus-old$  (so where is it?)

Son of a mother…I figured it out…

bill@bill-MS-7B79:~/.lazarus-old$ grep -i -r -n “PENTIUM2” .
bill@bill-MS-7B79:~/.lazarus-old$ grep -i -r -n "PENTIUM2" .
./projectoptions.xml:67:      <TargetProcessor Value="pentium2"/>
bill@bill-MS-7B79:~/.lazarus-old$

It’s the stupid double quotes (as can be seen above). If I don’t paste them in a WordPress code block…Wordpress changes the double quotes. So the 1st one above doesn’t work…and doesn’t give an error.

BTW. It’s not obvious where to post bugs. There’s the home page, and the forums (which is where I got my answer), sourceforge, and also their gitlab page.

Pascal/Lazarus when did I 1st use?

Free Pascal (1993) – My 1st use 2001

I assume 1st available 1993 (the Copyright at the bottom of the Free Pascal web page says 1993-2023)

Lazarus (2001) – My 1st use 2005 (before version 1)

Trying to construct a timeline out of curiosity. In looking back at old Pascal program dates. It appears that I first started playing with Free Pascal was in 2001. I saw a program with a comment in the beginning of…

{
	Pascal program.
	By: Bill
	On: April 9, 2001
	
}

Here are comments at the beginning of my Lazarus Judo scoreboard program…

// Judo Scoreboard
// By: Bill
// On: 9/26/05   

I wrote a much simpler multiplication quiz program which I would assume I wrote before the Judo scoreboard program. But I didn’t put comments in it. However I do have a zip backup of it but the dates are in 2006.

Lazarus resize label control

I wanted to write a simple Hello, World! GUI program. So I put a label on the form. And I tried to resize it by dragging the handles on the control. But it didn’t work. After some trial and error I found that you need to uncheck the Autosize True property on the left. I don’t remember having to do that in prior versions or MS-Visual Basic. If I’m not allowed to resize the control, then I feel there shouldn’t be resize handles on it!

Why do I always have trouble with grep?

I’ve been using Linux since the mid 1990s. I’m comfortable on the command line However when it comes to grep, I use it…it works. I document it. Later I use it again…it doesn’t work.

For example I documented:

[ON [9/22/2018] THE FOLLOWING WORKS!!!!]
grep “using” -n /home/bill/MyStuff/Python3/*.py < This seems to work best [gives me line/line # and is recursive!]

So today I tried:

grep “pentium2” -n /home/bill/*.* to search ALL my files, and it returned immediately meaning it didn’t recurse

I know it makes sense to use a “-r” flag but I wouldn’t have documented it that way if it didn’t work
Also that’s not the only example I documented with a date.

I also documented this grep -i -r -n –include *.txt “string” > grep.log which worked at one time

Today it seems like this works:

grep -i -r -n "PENTIUM" .

which makes sense. The last dot “.” means recurse starting from here. The -i ignores case. The -n displays the line number. But probably won’t work in the future.

Actually the above command didn’t work (at first) when I copied it to verify it works. Because I didn’t initially copy it into a WordPress code block, and WordPress changed the double quotes.

Oh and if you want to search for “mimesis” in the Python directory don’t search for “*mimesis*”, unless you use the ‘-E’ switch.

Somehow it won’t work in the future. Then I’ll google it and see multiple examples with switches and slashes and magic dust.

Lazarus Video

Might be interesting making a video showing Lazarus. If I geared it towards Visual Basic users it might get more views.

Lazarus…a better alternative to Visual Basic. Uses the compiled Free Pascal (Turbo Pascal compatible) language. Create stand alone GUI programs.

The latest Free Pascal is said to support its own Object Pascal dialect. Which I personally don’t use.

So my path was learning Free Pascal first (I wasn’t aware of Lazarus, at the time). Then a few years later learning Lazarus

Main points…
Official description…Lazarus is a Delphi compatible cross-platform IDE for Rapid Application Development

You may remember Delphi from Borland. Delphi still exits…Borland does not. I was very interested in Delphi when it came out. Creating stand alone GUI programs, seemed much superior to Visual Basic. However I was unwilling to pay the high price for it.

So basically…
You drag controls onto a form just like Visual Basic to make your GUI app.
These controls respond to events, that you can control to using Free Pascal
Compiled Free Pascal, is like Turbo Pascal, and is more powerful than Visual Basic.
Combined with SQLite, you can build MS-Access like databases. But SQLite is a more powerful database than MS-Access. You can also use real multi user SQL databases, such as MySQL and PostgreSQL.