Post AFOUsFDFQemiRXFKd6 by deavmi@gleasonator.com
 (DIR) More posts by deavmi@gleasonator.com
 (DIR) Post #AFOUf8Eu2o2R3Elfpw by deavmi@gleasonator.com
       2022-01-13T10:00:55.377461Z
       
       1 likes, 1 repeats
       
       Yes, screw #Ada I am just gonna teach myself #Pascal
       
 (DIR) Post #AFOUgocZxGlumme3BA by deavmi@gleasonator.com
       2022-01-13T10:01:14.429193Z
       
       0 likes, 0 repeats
       
       The documentation is actually very good
       
 (DIR) Post #AFOUhxqBAApzfWYPjc by deavmi@gleasonator.com
       2022-01-13T10:01:26.859886Z
       
       0 likes, 0 repeats
       
       Please note that the qword and int64 types are not true ordinals, so some Pascal constructswill not work with these two integer typesI am being trolled by the lack of proper 64bit support
       
 (DIR) Post #AFOUsFDFQemiRXFKd6 by deavmi@gleasonator.com
       2022-01-13T10:03:18.059692Z
       
       0 likes, 0 repeats
       
       Works for some stuff though. We will have to see where it doesn't work, let's hope we can use them in for loops.
       
 (DIR) Post #AFOXOIpNiv0IpWUtnM by deavmi@gleasonator.com
       2022-01-13T10:31:30.005970Z
       
       0 likes, 0 repeats
       
       Doing some boolean work with the Boolean type!
       
 (DIR) Post #AFOXPZLJo2teLA2VP6 by deavmi@gleasonator.com
       2022-01-13T10:31:44.372641Z
       
       0 likes, 0 repeats
       
       ( Some expressions )bool := 1=1;writeln(bool);bool := ((1<>2) or (1=2)) and (1=1);writeln(bool);
       
 (DIR) Post #AFOXeEhkovxGfyWl4i by amerika@noagendasocial.com
       2022-01-13T10:34:23Z
       
       1 likes, 1 repeats
       
       @deavmi A saner language than Java, Rust, Ruby, Go, or any of the other recent trends which are basically jobs programs for California IT grads and H-1Bs.
       
 (DIR) Post #AFOYkWYbSUP5jgoEdc by Zelvatica@expired.mentality.rip
       2022-01-13T10:36:21.912779Z
       
       1 likes, 0 repeats
       
       @deavmi whats that pdf reader?
       
 (DIR) Post #AFOYkX0xl35Z9e4sqG by deavmi@gleasonator.com
       2022-01-13T10:46:43.127964Z
       
       0 likes, 0 repeats
       
       @Zelvatica Evince
       
 (DIR) Post #AFOYpAiq4FiRSpoTZo by deavmi@gleasonator.com
       2022-01-13T10:47:34.170465Z
       
       1 likes, 0 repeats
       
       The one nice thing sbout #Go that probably goes overlooked by most people just starting to use it is actually the easy ability to cross-compile with it, so I'd actually remove it from that list. The rest are shite though, agreed.
       
 (DIR) Post #AFOZ2sCzhJIY6DS2wy by amerika@noagendasocial.com
       2022-01-13T10:50:02Z
       
       0 likes, 1 repeats
       
       @deavmi What is this, Buddhist compassion for programming languages? ;)Good point.I think the world would be saner if we wrote everything compiled in Pascal and everything interpreted in Perl.Just build up a massive library of knowledge, like we once did in Latin and now do in English for meatspace wisdom."In theory."
       
 (DIR) Post #AFOcCRqwqEij7KOf68 by pronto@101010.pl
       2022-01-13T11:23:57Z
       
       0 likes, 1 repeats
       
       @deavmi modula2 better language
       
 (DIR) Post #AFOcCSRSeTvYwZTp0i by deavmi@gleasonator.com
       2022-01-13T11:25:21.363095Z
       
       0 likes, 0 repeats
       
       Sources: Trust me bro
       
 (DIR) Post #AFOcaV2scjBty6RkCO by deavmi@gleasonator.com
       2022-01-13T11:29:44.056323Z
       
       0 likes, 0 repeats
       
       I will give it a look. It needs to be well supported on Linux though and if I recall it is or at least there is a compiler for it.
       
 (DIR) Post #AFOqUjOBmQ2o4jYbFA by deavmi@gleasonator.com
       2022-01-13T14:05:33.987105Z
       
       0 likes, 0 repeats
       
       Perl, god I want to puke now.Perhaps scripts should just be written in something like #nelua. As much native as we can get we should strive for.
       
 (DIR) Post #AFOsrSLDWtwflr8B5k by deavmi@gleasonator.com
       2022-01-13T14:32:04.508216Z
       
       2 likes, 0 repeats
       
       Nice ways to control the width of enum members in Pascal, very VERY elegant
       
 (DIR) Post #AFOtbktUsmfadHF4ym by RustyCrab@kiwifarms.cc
       2022-01-13T14:40:27.387905Z
       
       0 likes, 0 repeats
       
       @deavmi what browser and/or pdf reader is that?
       
 (DIR) Post #AFOvniWxhBbOgZX7EO by deavmi@gleasonator.com
       2022-01-13T15:05:01.512759Z
       
       1 likes, 0 repeats
       
       @RustyCrab Evince
       
 (DIR) Post #AFOxyUdxrqC0i34hFY by deavmi@gleasonator.com
       2022-01-13T15:29:22.141785Z
       
       2 likes, 1 repeats
       
       Spending a week teaching myself #Pascal because it's actually a great language with a pretty nice syntax if I can be honest.The type system isn't the best but hey it's a fun language and worth learning. I really have a thing for some of the older languages, there's something about them that just feels more right than those of the modern world.Don't get me wrong, there's a lot to love about #D with it's garbage collection, CRT for dynamic arrays and RTTI for managing OOP and polomorphism, VTABLES and the list can go on, but you can definately churn out good quality code in these older languages too.
       
 (DIR) Post #AFOy0eJis9cbI4dQIq by deavmi@gleasonator.com
       2022-01-13T15:29:46.259576Z
       
       0 likes, 0 repeats
       
       Now learning Characters in 
       
 (DIR) Post #AFOy6qag9XLp5rWO2q by deavmi@gleasonator.com
       2022-01-13T15:30:53.511325Z
       
       0 likes, 0 repeats
       
       Now learning Characters in 
       
 (DIR) Post #AFOy9icGG4NhEJdADw by deavmi@gleasonator.com
       2022-01-13T15:31:24.427900Z
       
       1 likes, 0 repeats
       
       Now learning Characters in Pascal
       
 (DIR) Post #AFOz9fVfuIMrYB5diq by deavmi@gleasonator.com
       2022-01-13T15:42:35.662130Z
       
       1 likes, 0 repeats
       
       Prefix-encoded strings in the Pascal programming language when using the type ShortString.Very fun indeed!I thought you might like this @caskd seeing that you are a proponent of such encoding
       
 (DIR) Post #AFOzNrMCejfiLdQV8K by deavmi@gleasonator.com
       2022-01-13T15:45:10.265266Z
       
       0 likes, 0 repeats
       
       @tristan957 What;s your take on #Pascal mate?
       
 (DIR) Post #AFOzg0LNywTPQshEY4 by amerika@noagendasocial.com
       2022-01-13T15:48:26Z
       
       0 likes, 1 repeats
       
       @deavmi Blasphemy! Perl is a prince among toads.
       
 (DIR) Post #AFP3HgV8VMOal3uq6i by deavmi@gleasonator.com
       2022-01-13T16:28:52.545460Z
       
       0 likes, 0 repeats
       
       I mean perhaps it is better than any shell, and that is possible.
       
 (DIR) Post #AFP3SRInM3qMnwGtyS by tristan957@mastodon.social
       2022-01-13T16:03:28Z
       
       0 likes, 1 repeats
       
       @deavmi You are more exploratory with languages than me. I don't have any since I've never used it.
       
 (DIR) Post #AFP3VGPwHSXXulxZuC by deavmi@gleasonator.com
       2022-01-13T16:31:19.735814Z
       
       0 likes, 0 repeats
       
       What is your list of languages? I'd hope that Micron has a pretty interesting set of engineers working on interesting projects there :))
       
 (DIR) Post #AFP3hIIH87fbD26zWy by colinsmatt11@gleasonator.com
       2022-01-13T16:31:40.675144Z
       
       0 likes, 0 repeats
       
       Perl is the best write-only language.
       
 (DIR) Post #AFP3hIjvTJmuan34d6 by deavmi@gleasonator.com
       2022-01-13T16:33:29.380550Z
       
       0 likes, 0 repeats
       
       As in you write stuff in it but never expect anyone to read it again?That could perhaps be very true
       
 (DIR) Post #AFP5MOsReqcJSEC8LA by tristan957@mastodon.social
       2022-01-13T16:48:52Z
       
       0 likes, 1 repeats
       
       @deavmi I pretty much write C 95% of the day at work.Languages I know are Python, Java, some Rust, C, C++, JavaScript, TypeScript, Go. I know enough Lua for my Neovim config.That pretty much sums it up. Nothing off the beaten path.
       
 (DIR) Post #AFP5MPJO2gASnmneKm by deavmi@gleasonator.com
       2022-01-13T16:52:07.407406Z
       
       0 likes, 0 repeats
       
       Is Rust worth learning? Like it sounds like a nightmare to code in because the compiler wants to yell at you so much tleast from what I have heard people mention about the protections it provides.
       
 (DIR) Post #AFP5Ox3vWrgM3amXAm by deavmi@gleasonator.com
       2022-01-13T16:52:35.847084Z
       
       0 likes, 0 repeats
       
       As for C++, pros and cons?
       
 (DIR) Post #AFP66n9vi5TK5IUhsm by deavmi@gleasonator.com
       2022-01-13T17:00:30.922255Z
       
       0 likes, 0 repeats
       
       AnsiStrings include what is known as a codepage which is technically something of antiquity. It dells the writeln() function which numbers map to which character and will actually translate those to what the VT100 terminal understands which is (thumbsucking) probably just our beloved UTF8 (with 99% of a guess).Antiquity, because these days to switch to Kanji we don’t switch codepages. We encode it all using the UTF8 codepage, but we hardly refer to it as a codepage as it is implied, we have all writing systemds in UTF8, no swithcing between encodings effectively.These strings are heap allocated and reference counted, so for the first part that means there is a length associated with them already on the heap table. The second part means that when the usage of the strings reach zero it will be free()-d.They are null terminated just for C cross-compat but these, as indicated in the documentation, are not used at all.
       
 (DIR) Post #AFPBYiPFTTRXDrnGzI by tristan957@mastodon.social
       2022-01-13T17:20:33Z
       
       1 likes, 0 repeats
       
       @deavmi I thinks it's worth learning definitely. I say this as someone who writes C everyday and has to sit around fixing too many segfaults or memory corruption issues.
       
 (DIR) Post #AFPBcIGkaqYPJnWcYy by deavmi@gleasonator.com
       2022-01-13T18:02:14.403517Z
       
       0 likes, 0 repeats
       
       Maybe I will put it on my list for things to do this year then. It seems to have all the goodies like a package manager etc. So it's defs a winnera already.Could you give me a taste of what a hello world looks like? 😂
       
 (DIR) Post #AFPC7dZ1TCfOL819Ie by tristan957@mastodon.social
       2022-01-13T17:23:24Z
       
       0 likes, 0 repeats
       
       @deavmi if you were going to learn one of Rust or C++, I would just do Rust personally. C++ is nice, but has so much cruft. Standards committee really doesn't do enough. Then you have C++20 not even being fully implemented in any compiler.I think you might enjoy learning Zig though as a nice medium between Rust and C. I know I want to try it out eventually.
       
 (DIR) Post #AFPC7e6hRzba1Zm2nA by deavmi@gleasonator.com
       2022-01-13T18:07:53.897020Z
       
       0 likes, 0 repeats
       
       Perhaps Zig is my best bet.Yeah I asked about C++ knowing full well it's a living piece of trash. You simply don't need all those features. (Generics are ew), it also has streams?!?!?? Like bruh C++ is the one kid in the class that tried to be quircky and different but somehow became popular (in some timeline where hewas befriended), how this happens? I don't know I think it's more to do with C++ being the first to get OOP done as an extension to C, but I don't believe it was ever the best contender at least it could have been designed better (maybe not adding all the shit it has).
       
 (DIR) Post #AFPCFdKeDRslwB6fku by deavmi@gleasonator.com
       2022-01-13T18:09:20.723907Z
       
       0 likes, 0 repeats
       
       @tristan957 Maybe I will try Zig then. It did give me a slight startle when I first saw it's homepage but maybe I should give it a chance sometime this year. My main things I care about really is it having bindings for the core functions we all love and use, a package manager and bonus feature cross-comp built in
       
 (DIR) Post #AFPENt6JfgiP4JT0rY by tristan957@mastodon.social
       2022-01-13T18:31:02Z
       
       0 likes, 0 repeats
       
       @deavmi Generics are good though!
       
 (DIR) Post #AFPENtcDl4EgfGOUam by deavmi@gleasonator.com
       2022-01-13T18:33:14.882981Z
       
       0 likes, 0 repeats
       
       @tristan957 I've only cried twice in my life.Once because I botched a relationship with a girl that could have turned into something fruitful.And this, this made me even more sad
       
 (DIR) Post #AFPGPyXYcQEKQTKe5w by deavmi@gleasonator.com
       2022-01-13T18:56:01.821281Z
       
       0 likes, 0 repeats
       
       Okay, now this is great. String resizing is such a breeze when using the AnsiString type!That is so pleasing, now I can see why Araq (the developer of the NIm language) wrote the initial version of the Nim compiler in Pascal, it’s native and gives you this sort of nice features!
       
 (DIR) Post #AFPvmULR9BYJYcW4w4 by colinsmatt11@gleasonator.com
       2022-01-13T16:57:23.735484Z
       
       0 likes, 0 repeats
       
       Well even if someone tries they won't be able to unless they understand your mindset.PhoenixTrap is one of people I know who are able to master the dark arts of Perl.https://phoenixtrap.com/
       
 (DIR) Post #AFPvmUnRT3xCxTcRaS by amerika@noagendasocial.com
       2022-01-14T02:39:30Z
       
       0 likes, 0 repeats
       
       @colinsmatt11 @deavmi Starting about 20 years ago, Perl programmers recognized this problem and started writing code deliberately with fewer shortcuts for readability, as well as some aesthetics of formatting.You can make any language inscrutable to show off cool syntax tricks, but in my view, the best programmers use appropriate syntax and keep an eye toward readability.If you've ever had to maintain code you wrote ten years ago, you find that this approach has much wisdom!
       
 (DIR) Post #AFQSMjwpoEnQuML4To by tristan957@mastodon.social
       2022-01-14T03:54:36Z
       
       0 likes, 0 repeats
       
       @deavmi when life comes at you hard :'(
       
 (DIR) Post #AFQSPX00PR7tcI9XwO by deavmi@gleasonator.com
       2022-01-14T08:45:07.774842Z
       
       0 likes, 0 repeats
       
       Fr but I COPED, SEETHED and ff02::1%eth0-dAnd I am now a better man.
       
 (DIR) Post #AFRZCWlQrj9Dxb2iJM by deavmi@gleasonator.com
       2022-01-14T21:35:55.569328Z
       
       0 likes, 0 repeats
       
       Beautiful and truly elegant syntax for array declarations in Pascal
       
 (DIR) Post #AFRa4fqTJkqjlMDdjc by deavmi@gleasonator.com
       2022-01-14T21:45:42.504919Z
       
       0 likes, 0 repeats
       
       Behavior similar to DLang when it comes to these AnsiString(s) at least.
       
 (DIR) Post #AFSoLHELgJDOrP9s48 by deavmi@gleasonator.com
       2022-01-15T12:00:16.238358Z
       
       0 likes, 0 repeats
       
       Having great fun with reference counted strings in Pascal and re-allocating some to unique memory-gc'd blocks for security!Great fun!
       
 (DIR) Post #AFTNDxUUAhg60Vx51M by deavmi@gleasonator.com
       2022-01-15T18:31:08.775046Z
       
       1 likes, 0 repeats
       
       Next section is structured types! I really am excited for this section!
       
 (DIR) Post #AFTOUTMJYPcdQrZI8G by deavmi@gleasonator.com
       2022-01-15T18:45:19.850573Z
       
       0 likes, 0 repeats
       
       I must say this is pretty interesting @caskd . It would appear Pascal provided a built-in method to do not just `Packing` which you can configure in most languages (I know you can in DLang) but also taking your `struct` and `BitPack`-ing it, which is nifty when the compiler automates it for you
       
 (DIR) Post #AFX2mNM9BpVtfVSfsO by deavmi@gleasonator.com
       2022-01-17T13:00:53.786961Z
       
       0 likes, 0 repeats
       
       And so the fun with Static Arrays continues today!
       
 (DIR) Post #AFX9POMxxKilpUpea0 by deavmi@gleasonator.com
       2022-01-17T14:15:10.467534Z
       
       0 likes, 0 repeats
       
       Dynamic array support built-into #Pascal!
       
 (DIR) Post #AFXAKl4AF6BkjEOMbo by deavmi@gleasonator.com
       2022-01-17T14:25:33.029262Z
       
       0 likes, 0 repeats
       
       And a little bit more, may I say, whoever wrote the documentation for Free Pascal is a God, this is one of the best reading PDFs ever!
       
 (DIR) Post #AFXGo9XiuueulTcMj2 by deavmi@gleasonator.com
       2022-01-17T15:38:04.778888Z
       
       0 likes, 0 repeats
       
       Nice, more work with ref-counted dynamic arrays
       
 (DIR) Post #AFXIMhbwrIoaE1dGNM by djsumdog@hitchhiker.social
       2022-01-17T15:55:32Z
       
       1 likes, 0 repeats
       
       @deavmi huh. I had a profess teach us about reference counting garbage collection after our University switched from C to Java (2001). Previously he had taught in Pascal (which they switched from years ago to C). I learned the hard way in an interview Java does not use reference counts. It locks and searches from roots (threads). His teaching makes more sense in this context. 🤔@caskd
       
 (DIR) Post #AFXIUOP0A0sqy0F9v6 by deavmi@gleasonator.com
       2022-01-17T15:56:55.953424Z
       
       0 likes, 0 repeats
       
       Wait, it really doesn’t use reference counts? (Java that is)Could you maybe rephrase how it does it or rather what it does?
       
 (DIR) Post #AFXIdjhoKAxde0Ur7g by deavmi@gleasonator.com
       2022-01-17T15:58:37.526076Z
       
       0 likes, 0 repeats
       
       The only thing with Pascal is it is overly elegant, it's hard to sometimes know what it is doing without seeing the implementation. In C you can easily now because of what data you are passing around but here, for all I know shit could be heavily macrotised, which I believe it is for many fucntions that work on a set of types.C isn't that heavily macrotised, then again it doesn't have dynamic arrays built in. But comparing to D, D doesn't really have macros but seperates the static arrays from dynamic ones in terms of functions etc, so it is more clear cut.
       
 (DIR) Post #AFXIuCVN16fbb5Wpyy by deavmi@gleasonator.com
       2022-01-17T16:01:36.119329Z
       
       0 likes, 0 repeats
       
       After having used Java for many years now, I was not even aware of that! I should get back into it, it can be an annoying language at sometimes but definately one I know how to use.I do recall them using some cursed as fuck string encoding though, like internally. It wanted to make me gorge my eyes out, it was like fucking spiced-up UTF16 or something
       
 (DIR) Post #AFXJ5Gl1XwnhyI81ce by djsumdog@djsumdog.com
       2022-01-17T16:03:35.229792Z
       
       1 likes, 1 repeats
       
       @deavmi It's been a long time since I looked it up, but IIRC, Java does a global lock, and a search starting at the entry-point (main) and all the Threads, and marks everything it encounters and GCs the rest. It has ways of determining which objects are long lived (like DB pooling objects for example) and marks them in such a way so they're not searched each time. (There's like .. the Eden space? and some other terms determining objects average age). So with such a system, you avoid memory leaks that occur when two objects reference each other but aren't referenced by a running thread (A has a reference to B and B has a reference to A, like with double-linked-list objects. The main function sets A = null. With reference counts, that would be a leak. When you search from the roots, they'd be unmarked and would get reclaimed).There have been a variety of different garbage collectors added to the JVM more recently. I haven't really kept up.@caskd @djsumdog
       
 (DIR) Post #AFXJJ9w7hgGos2wXxY by deavmi@gleasonator.com
       2022-01-17T16:06:06.402913Z
       
       0 likes, 0 repeats
       
       It gave me _the big sad_ when I wanted to do some byte work. But tbh at the end of the day, I was doing  Java-to-Java shit so sending those horridly encoded bytes over the socket was fine and I a sure it provided conversion funtions to a more saner encoding
       
 (DIR) Post #AFXJvClNdsLydr3mE4 by deavmi@gleasonator.com
       2022-01-17T16:12:59.295317Z
       
       0 likes, 0 repeats
       
       That sounds rather interesting, I should have a look into it later
       
 (DIR) Post #AFXS9zGAvdYejt1WqW by deavmi@gleasonator.com
       2022-01-17T17:45:17.545795Z
       
       0 likes, 0 repeats
       
       Probably stopping here for today :))
       
 (DIR) Post #AFZG16TvtkN7OhNNYm by deavmi@gleasonator.com
       2022-01-18T14:38:38.424545Z
       
       0 likes, 0 repeats
       
       Bitpacking and unpacking arrays in Pascal using pack() and unpack() respectively, the fact this is built-in is pretty cool - cursed-ish but you come to love said features of Pascal overtime
       
 (DIR) Post #AFbm9fPlULP6uCTQW0 by deavmi@gleasonator.com
       2022-01-19T19:48:10.139354Z
       
       0 likes, 0 repeats
       
       Pascal even has Set Types!
       
 (DIR) Post #AFbmEE5KWiDBam5bSC by deavmi@gleasonator.com
       2022-01-19T19:49:00.777165Z
       
       0 likes, 0 repeats
       
       And it worked!
       
 (DIR) Post #AFbmGUA7irEQ2BPPMW by deavmi@gleasonator.com
       2022-01-19T19:49:22.377617Z
       
       0 likes, 0 repeats
       
       And now for some pointers!
       
 (DIR) Post #AFbw7WQevOT602VXkm by deavmi@gleasonator.com
       2022-01-19T21:39:50.567168Z
       
       0 likes, 0 repeats
       
       Now busy with Functions, Procedures and the various ways by which one can pass values in explicitly and implicitly
       
 (DIR) Post #AFbxvUrz618nb4gO8W by deavmi@gleasonator.com
       2022-01-19T22:00:05.079264Z
       
       0 likes, 0 repeats
       
       Aaayyyyy! Delegates just like in #dlang!Basically a Fat function pointer. Data base associated with code ptr. Upon passing in the function the `this` flies with it!
       
 (DIR) Post #AFbxxlizOuj2S0YhBw by deavmi@gleasonator.com
       2022-01-19T22:00:29.860385Z
       
       0 likes, 0 repeats
       
       This (no pun intended) is the actual delegate, what I call a “fat function pointer”
       
 (DIR) Post #AFd0eVpclD1Cg68D1k by deavmi@gleasonator.com
       2022-01-20T10:05:20.364892Z
       
       0 likes, 0 repeats
       
       The FreePascal optimization-grindset:  -O<x>  Optimizations:      -O-        Disable optimizations      -O1        Level 1 optimizations (quick and debugger friendly)      -O2        Level 2 optimizations (-O1 + quick optimizations)      -O3        Level 3 optimizations (-O2 + slow optimizations)      -O4        Level 4 optimizations (-O3 + optimizations which might have unexpected side effects)
       
 (DIR) Post #AFd48R3JOTHwPCUfRY by deavmi@gleasonator.com
       2022-01-20T10:44:21.381717Z
       
       0 likes, 0 repeats
       
       Finally time to get to the section I have been awaiting for the longest time!
       
 (DIR) Post #AFd6VL63u1IoVFpTEm by deavmi@gleasonator.com
       2022-01-20T11:10:54.192916Z
       
       0 likes, 0 repeats
       
       Hit a little roadblock here with the given code example so the best thing I can do is email the creator of FPC!
       
 (DIR) Post #AFdTWMnnLTa71lkBJQ by deavmi@gleasonator.com
       2022-01-20T15:28:48.777365Z
       
       0 likes, 0 repeats
       
       And I got the help I needed! Turns out in Pascal for Objects you need to declare the interface first and then additionally (and here is what got me) define the implementation separately.
       
 (DIR) Post #AFdejOyjfCqT2QHO2C by deavmi@gleasonator.com
       2022-01-20T17:34:24.497686Z
       
       0 likes, 0 repeats
       
       Pascal also supports abstract classes, final classes (which it calls sealed classes), inheritance and static members
       
 (DIR) Post #AFdgTffi1zNC5O0TsO by deavmi@gleasonator.com
       2022-01-20T17:53:59.505906Z
       
       0 likes, 0 repeats
       
       This is how you get the Pascal equivalent of Java’s super
       
 (DIR) Post #AFdh4aaBum2j181tZI by deavmi@gleasonator.com
       2022-01-20T18:00:39.727476Z
       
       0 likes, 0 repeats
       
       **Public Service Announcement** Remeber to set the VTABLE pointer for your function! If you don't implement it is will crash as the address is not valid!
       
 (DIR) Post #AFdh8I3AlCIEhKLm2C by deavmi@gleasonator.com
       2022-01-20T18:01:20.067854Z
       
       0 likes, 0 repeats
       
       Public Service Announcement Remember to set the VTABLE pointer for your function! If you don’t implement it is will crash as the address is not valid!
       
 (DIR) Post #AFdq4eGh6xA62F0srY by deavmi@gleasonator.com
       2022-01-20T19:41:31.132903Z
       
       1 likes, 0 repeats
       
       There are two ways of doing object-orientation in Pascal today we did it using the so called object method, tomorrow we do it using this method shown below - the class method:
       
 (DIR) Post #AFel7UjOikpyiEw8qu by deavmi@gleasonator.com
       2022-01-21T06:20:42.733850Z
       
       0 likes, 0 repeats
       
       I’m now busy with getting used to the Free Pascal standard library and I must say it is very good, the unit Unix and UnixBase is great and basically mirrors glibc!
       
 (DIR) Post #AFfDxboaQUqISP0C5A by deavmi@gleasonator.com
       2022-01-21T11:43:51.757455Z
       
       0 likes, 0 repeats
       
       And file reading! Strictly typed languages like this can be real sticklers for syntax!
       
 (DIR) Post #AFfEA44vAYcLaca8iu by deavmi@gleasonator.com
       2022-01-21T11:46:07.687394Z
       
       0 likes, 0 repeats
       
       Having fun with fpRead()
       
 (DIR) Post #AFfKN5LyL6zH299JvU by deavmi@gleasonator.com
       2022-01-21T12:55:41.813411Z
       
       0 likes, 0 repeats
       
       Moving the file descriptor’s position pointer (cursor) along with a write and then read :))
       
 (DIR) Post #AFfg0xwlOW1YgQDRlw by deavmi@gleasonator.com
       2022-01-21T16:58:13.274536Z
       
       0 likes, 0 repeats
       
       Damn, Free Pascal really maintains a good standard library and compiler. I basically have the libc bindings I need!
       
 (DIR) Post #AFfgfYqlblmiihlhNA by deavmi@gleasonator.com
       2022-01-21T17:05:33.665067Z
       
       0 likes, 0 repeats
       
       Also the documentation doesn’t suck ass!
       
 (DIR) Post #AFfn1PocTkPSnNZHjU by deavmi@gleasonator.com
       2022-01-21T18:16:44.143232Z
       
       0 likes, 0 repeats
       
       Mapping memory in using fpmmap()!
       
 (DIR) Post #AFfn2Zc1XX7DTAEF60 by deavmi@gleasonator.com
       2022-01-21T18:16:57.428191Z
       
       0 likes, 0 repeats
       
       And it works!
       
 (DIR) Post #AFhA1pzZe9oM5Jp2Ia by deavmi@gleasonator.com
       2022-01-22T10:09:14.689219Z
       
       0 likes, 0 repeats
       
       Programming in Pascal can actually be fun, now it's strongly typed but there's a huge load of types so it can be confusing what each is doing but the docs are there and you can make clever guesses too based on them.I had fun using the BaseUnix and Unix units (modules). I was able to map a bunch if memory in using the mmap() system call - as great test of a language is how easy one can do this.#programming #language #pascal #linux #unix
       
 (DIR) Post #AFjPenhxxYULvJXjvs by deavmi@gleasonator.com
       2022-01-23T12:13:45.995918Z
       
       0 likes, 0 repeats
       
       So in Free Pascal when using Delphi-Classes, if you don’t use the override word then it doesn’t switch out vtable pointers for said function and you are left, in this case, with the one in the parent class but which is abstract so that vtable pointer is most likely nilThis is what we see here.
       
 (DIR) Post #AFjPht6iLGm1XNahWa by deavmi@gleasonator.com
       2022-01-23T12:14:20.794970Z
       
       0 likes, 0 repeats
       
       Here we can see it working once we added the `override` keyword
       
 (DIR) Post #AFjQelJKyLdYRVZJwm by deavmi@gleasonator.com
       2022-01-23T12:24:58.662465Z
       
       0 likes, 0 repeats
       
       We can also check  the run-time type information of an object (whether the type given is in the tree of types of descendence of this object).
       
 (DIR) Post #AFjQgAoXdZI7pTpyAC by deavmi@gleasonator.com
       2022-01-23T12:25:14.525141Z
       
       0 likes, 0 repeats
       
       And more examples here...
       
 (DIR) Post #AFwWepXoPZozRVD9Yu by deavmi@gleasonator.com
       2022-01-29T20:03:27.523030Z
       
       0 likes, 0 repeats
       
       Unchecked v.s. checked type casting in Free Pascal
       
 (DIR) Post #AFwYF6H9mXqviHHO1Q by deavmi@gleasonator.com
       2022-01-29T20:21:12.718018Z
       
       0 likes, 0 repeats
       
       Some fields (variables in classes, instance members)
       
 (DIR) Post #AFwYImRfS9jZMtx03k by deavmi@gleasonator.com
       2022-01-29T20:21:53.594205Z
       
       0 likes, 0 repeats
       
       Static class members (shared amongst all objects and available from the class type itself)
       
 (DIR) Post #AFwYML5f6GRhgeM2wS by caskd@freespeechextremist.com
       2022-01-29T20:22:33.403267Z
       
       1 likes, 0 repeats
       
       @deavmi just untag me bro, idcpleromer doesn't fully mute threads so i keep seeing "thread muted
       
 (DIR) Post #AFwYRdAdJ1JXD3CeEC by deavmi@gleasonator.com
       2022-01-29T20:23:29.419693Z
       
       0 likes, 0 repeats
       
       In the next post I will untag you, if that doesn't work then there isn't much I can do.yes I get you don't care, I'm not the one adding the tag in, that was automatic
       
 (DIR) Post #AFwiCeKXi6cY0LKj0S by deavmi@gleasonator.com
       2022-01-29T22:12:49.421186Z
       
       0 likes, 0 repeats
       
       Static initializers and destructors! These let code run on static initialization of classes, which will happen during the unit’s (unit)’s initialization and likewise with the unit’s destruction.
       
 (DIR) Post #AG0M2bkCDP7sIszWYC by deavmi@gleasonator.com
       2022-01-31T16:23:21.668857Z
       
       0 likes, 0 repeats
       
       It would seem that there is no implicit super constructor call in Delphi/Object Pascal mode in Free Pascal, so one must add it themselves if you wish to have that.
       
 (DIR) Post #AGNOpw312tqrrbLYbw by deavmi@gleasonator.com
       2022-02-10T14:05:46.708224Z
       
       0 likes, 0 repeats
       
       Working with properties now along with messages!
       
 (DIR) Post #AGNOpx4TEybr2P2EW8 by deavmi@gleasonator.com
       2022-02-11T19:13:01.586460Z
       
       0 likes, 0 repeats
       
       program interfaces;{$mode DELPHI}{    Interface definition}type    Speakable = interface        procedure speak(text: string);    end;{    Classes implementing the interface    `Speakable`}type    (* You must inherit this interface `TInterfacedObject` *)    Dog = class(TInterfacedObject, Speakable)        procedure speak(text: string);    end;    (* You must inherit this interface `TInterfacedObject` *)    Cat = class(TInterfacedObject, Speakable)        procedure speak(text: string);    end;procedure Dog.speak(text: string);begin    writeln('Woof');end;procedure Cat.speak(text: string);begin    writeln('Meow');end;var thing: Speakable;begin    (* Dog *)    thing := Dog.create();    thing.speak('Hello');    (* Cat *)    thing := Cat.create();    thing.speak('Hello');end.
       
 (DIR) Post #AGNOv4BsCLt2Z9w7ZA by deavmi@gleasonator.com
       2022-02-11T19:13:58.185682Z
       
       0 likes, 0 repeats
       
       INTERFACES!You have to inherit from another class, TInterfacedObject, though to make the compiler work for this.
       
 (DIR) Post #AGNOwQk9pfDqnocgfQ by deavmi@gleasonator.com
       2022-02-11T19:14:12.681011Z
       
       0 likes, 0 repeats
       
       And it works!deavmi@bababooey:~/Documents/Pascal $ fpc -Cr -Sc interfaces.pas && ./interfacesFree Pascal Compiler version 3.2.2 [2021/09/21] for x86_64Copyright (c) 1993-2021 by Florian Klaempfl and othersTarget OS: Linux for x86-64Compiling interfaces.pasLinking interfaces48 lines compiled, 0.1 secWoofMeow