#preprocessor — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #preprocessor, aggregated by home.social.
-
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_itemwhich is a very un-Pascal identifier for many reasons. I'm thinking of usingPClassorPsiClassjust to get around it. -
How about a static website generator tool that is decades older than the web itself?
Tom Mason generates his blog with ... the C preprocessor. Genius:
https://wheybags.com/blog/macroblog.html
#static #generator #site #preprocessor #web #website #WebsiteGenerator #Jekyll #Hugo
-
When you've had enough of the #gcc preprocessors shtexpansion to 37000 lines, write your own good enough #preprocessor in #awk, 10 lines!! Is it all inclusive? NO, does it keep the number of lines, to, well, the number of lines and work well enough not to chew through your disk!? Absolutely!
-
Writing some tests...
-
Optimizing Brainfuck interpreter in the C preprocessor
https://github.com/camel-cdr/bfcpp
#HackerNews #Optimizing #Brainfuck #interpreter #in #the #C #preprocessor #HackerNews #Brainfuck #Cpreprocessor #Optimization #Programming
-
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.
(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
-
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?
#RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC
-
@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 😂
-
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"
#endnamespaceand then all the preprocessor defines from foo.h are brought into your file with names like FOO###BOOL
-
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
https://codepen.io/thebabydino/pen/wKoVGNIt'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
-
STM32. Процесс компиляции и сборки прошивки
Многие из начинающих разработчиков софта для микроконтроллеров реализуют свои проекты исключительно в средствах разработки, которые предоставляются производителем. Многое скрыто от пользователя и очень хорошо скрыто, из-за чего некоторые воспринимают эти процессы сродни настоящей магии. Я, в свою очередь, как человек в пытливым умом и природной любознательностью, решил попробовать собрать проект без использования IDE и различного рода автоматизаций. Так родилась идея для этой статьи: не используя ничего, кроме текстового редактора и командной строки, собрать проект мигания светодиодом на отладочной плате STM32F0-Discovery. Поскольку я не до конца понимал, как происходит процесс компиляции и сборки проекта, мне пришлось восполнять пробелы в знаниях. Разобравшись с этим вопросом, я подумал — а почему бы не рассказать другим об этом? Всем кому интересно — добро пожаловать под кат! 🙂
https://habr.com/ru/companies/timeweb/articles/793152/
#timeweb_статьи #STM32 #linux #ubuntu #openocd #stlink #stflash #debug #preprocessor #linker #gnuarm #gnugcc #armnoneeabi
-
I wrote a #ML1 macro to build my #homepage, then to present the macro I wrote a #sed command, now I also include the sed script in this cursed page
-
A blog post I've been meaning to write for nearly 20 years: simple Templating in C.
I talk about how to create a simple C++ style template, but using only C code and C pre-processor macros.
Nothing groundbreaking, but a fun exercise that I found helpful in understanding templates more generally.
-
Python magic codecs: Some really bonkers Python hacking using a preprocessing facility to add syntax
https://github.com/Tsche/magic_codec
#metaprogramming #preprocessor #python #coding #hacks #+ -
finally. #embed https://thephd.dev/finally-embed-in-c23
A story of the process of introducing a new preprocessor directive in ISO C preceded by an explanation of the directive itself.
-
I keep coming back to #ObjectiveC, but I feel that parts of the way an #ObjC #preprocessor (as it was) builds classes is similar to how #ctran worked/works for #Psion OO C.
I wonder if looking at ObjC #compiler internals would help me? Something like this:
https://alwaysprocessing.blog/2023/01/02/objc-class-arch
Or, as I keep saying with this project, is it much simpler than I'm trying to make it?
-
Class-building time for #ctran.
The compiler tutorials I've read don't talk about how to deal with classes and inheritance. I assume that a metaclass has to be built for each class. But should I then store those metaclasses for later use, or do I regenerate them when needed? I assume the former.
Also, my parser doesn't currently check for duplicate classes or methods (inside classes). Should it be in the parser, or should it be part of the thing that builds the output?
-
Ist this still crazy or outright insane? Spoiler, it involves the #C #preprocessor 🤯😏
I had a need to suppress a #warning ... this ominous thing about string literal sizes you get for free when asking your compiler to be -pedantic 🤡
Found a way to define a #macro to do this in a comfortable and defensive way for #clang and #GCC. 🙈
-
I regret Nothing!
If you don’t like it, I’m happy to accept working (!!) pull-requests at: https://gitlab.com/FJW/free-trans-voice-analyzer/
#FuckJavascript #fuckTypescript
#preprocessor #C #typescript #javascript -
Linux Fu: Preprocessing Beyond Code - If you glanced at the title and thought, “I don’t care — I don’t write C code,” th... - https://hackaday.com/2023/12/28/linux-fu-preprocessing-beyond-code/ #hackadaycolumns #preprocessor #linuxhacks #linux #m4
-
I'm trying to research general purpose (macro) preproccesors and C/C++ preproccesor/macro stuff keeps getting in the search results lol.
Don't be surprised if I end up writing my own general purpose preprocessor
-
I wish I had a lower tolerance for just ludicrous amounts of `#ifdef` nonsense in C code.
Pretty sure it would make me write better code if I didn't just patch up piles of shit with more shit. Or maybe I would just never ship anything and be stuck in perpetual rewrites. 🤔
-
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"
#endnamespaceand then all the preprocessor defines from foo.h are brought into your file with names like FOO###BOOL
-
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"
#endnamespaceand then all the preprocessor defines from foo.h are brought into your file with names like FOO###BOOL
-
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"
#endnamespaceand then all the preprocessor defines from foo.h are brought into your file with names like FOO###BOOL
-
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"
#endnamespaceand then all the preprocessor defines from foo.h are brought into your file with names like FOO###BOOL
-
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.
(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
-
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.
(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
-
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.
(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
-
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.
(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
-
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?
#RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC
-
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?
#RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC
-
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?
#RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC
-
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?
#RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC
-
STM32. Процесс компиляции и сборки прошивки
Многие из начинающих разработчиков софта для микроконтроллеров реализуют свои проекты исключительно в средствах разработки, которые предоставляются производителем. Многое скрыто от пользователя и очень хорошо скрыто, из-за чего некоторые воспринимают эти процессы сродни настоящей магии. Я, в свою очередь, как человек в пытливым умом и природной любознательностью, решил попробовать собрать проект без использования IDE и различного рода автоматизаций. Так родилась идея для этой статьи: не используя ничего, кроме текстового редактора и командной строки, собрать проект мигания светодиодом на отладочной плате STM32F0-Discovery. Поскольку я не до конца понимал, как происходит процесс компиляции и сборки проекта, мне пришлось восполнять пробелы в знаниях. Разобравшись с этим вопросом, я подумал — а почему бы не рассказать другим об этом? Всем кому интересно — добро пожаловать под кат! 🙂
https://habr.com/ru/companies/timeweb/articles/793152/
#timeweb_статьи #STM32 #linux #ubuntu #openocd #stlink #stflash #debug #preprocessor #linker #gnuarm #gnugcc #armnoneeabi