home.social

#preprocessor — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #preprocessor, aggregated by home.social.

  1. If you were writing a #compiler (or, in my case, a #preprocessor) and you had to think of a variable name for a "class" struct, but you can't use the keyword class... what would you call that variable?

    Plot twist: The compiler/preprocessor is written in #ObjectPascal. (So it's actually a record, not a struct. Same difference.)

    I'm currently using the variable name class_item which is a very un-Pascal identifier for many reasons. I'm thinking of using PClass or PsiClass just to get around it.

    #Pascal #FreePascal

  2. REPOST (JAN 2024): My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

    Includes the JPI/Clarion #TopSpeed #compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

    Also, did somebody say Objective-C?

    This is an old blog post from the beginning of the year. If you've been following my journey in recreating #CTRAN, this was written a week before I decided to take the plunge.

    hackaday.io/project/161291-the

    (Yes, I did say in the article that I definitely wouldn't be writing a compiler. I did say that.)

    #RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC #compilers #ObjectOriented

  3. As someone hearted ❤️ a 2015 demo of mine, I decided that since #CSS got better (and hopefully I did too), I should go for a quick 2024 remake.

    Here it is on @codepen
    codepen.io/thebabydino/pen/wKo

    It's mindblowing 🤯 how much I could reduce the (esp. compiled) code - check it out!

    HTML by 73%!
    CSS by 70%!

    I repeat: I shaved off at least 70% from each! ‼️

    #Sass #SCSS #Haml #Pug #preprocessor #cssVariables #HTML #cssGrid #cssLayout #cssMaths #code #coding #frontend #web #dev #webDev #webDevelopment

  4. I wonder if anyone has seriously thought about adding some kind of namespacing to the C preprocessor.

    for example, it would be nice if you could say

    #namespace FOO
    #include "foo.h"
    #endnamespace

    and then all the preprocessor defines from foo.h are brought into your file with names like FOO###BOOL

    #c #preprocessor #cpreprocessor #cpp #wg14

  5. STM32. Процесс компиляции и сборки прошивки

    Многие из начинающих разработчиков софта для микроконтроллеров реализуют свои проекты исключительно в средствах разработки, которые предоставляются производителем. Многое скрыто от пользователя и очень хорошо скрыто, из-за чего некоторые воспринимают эти процессы сродни настоящей магии. Я, в свою очередь, как человек в пытливым умом и природной любознательностью, решил попробовать собрать проект без использования IDE и различного рода автоматизаций. Так родилась идея для этой статьи: не используя ничего, кроме текстового редактора и командной строки, собрать проект мигания светодиодом на отладочной плате STM32F0-Discovery. Поскольку я не до конца понимал, как происходит процесс компиляции и сборки проекта, мне пришлось восполнять пробелы в знаниях. Разобравшись с этим вопросом, я подумал — а почему бы не рассказать другим об этом? Всем кому интересно — добро пожаловать под кат! 🙂

    habr.com/ru/companies/timeweb/

    #timeweb_статьи #STM32 #linux #ubuntu #openocd #stlink #stflash #debug #preprocessor #linker #gnuarm #gnugcc #armnoneeabi

  6. ICYMI: My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

    Includes the JPI/Clarion TopSpeed compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

    Also, did somebody say Objective-C?

    hackaday.io/project/161291-the

    #RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC

  7. @jhx You asked for it, so I'll answer it:

    Imho, C++ design is broken from the very beginning. It wanted to provide #OOP language constructs, still maintaining full #C compatibility (which already failed many years ago, cause the languages took different roads).

    It combines #exceptions (IMHO generally a bad idea) with explicit resource management (an *awful* idea, forcing you to use #RAII which will in turn mandate creation of purely "technical" classes, just to manage resources).

    It wanted #generics, but that's impossible without breaking C compatibility, so it came up with #templates, actually a #preprocessor on steroids.

    Overloading also doesn't fit into the simple C library ABI (where #linker symbols are named just like the function), so it came up with "name mangling" ... which is especially horrific because it is *not* standardized.

    Ah well, I could go on 😂