Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

non-webshit templating engines/preprocessors

Name: Anonymous 2018-08-23 19:33

so, let's say I have a source code with a lot of large text strings embeded. for licensing-related reasons, I'd like to separate those strings from the source file, but still have them embedded in the compiled output. now, the language I'm using is a bit retarded and assumes that the program code is in one file, and the only way around it that I know of is by making it a library - but it comes with its own pitfalls so I'd rather avoid it.

the natural choice here would be some kind of a template or macro language. the problem with those is that their're are either an unintuitive mess that will bite you in the ass (like m4 or scribble/text) or webshit-oriented crapware which builds DOM, escapes XSS and in general assumes that you want to generate HTML. unfortunately for me, my retarded language is not HTML. because I don't want to work around HTML-specific shit, I'd rather use something that is outout-agnostic.

my desired workflow would be to have a first step of a build process that takes in a bunch of templated source files, fills in the values from corresponding text files and outputs one big piece of shit file that I can compile further.

what would /prague/ do? should I just freeze my anus and use a C preprocessor?

Name: Anonymous 2018-08-23 20:03

grep

Name: Anonymous 2018-08-23 20:14

>>2
your're are trying to be an oldschool *nixer by reccomending grep but your're are just an anus who doesn't know that grep isn't sufficient for this task as it finds without replacing. a true *nixer would say sed or maybe awk.

Name: Anonymous 2018-08-23 20:40

sed
or maybe
awk

Name: Anonymous 2018-08-23 20:49

A true ni*ger would use
sed
or maybe
awk
. A white man would create a preprocessor that parses the source and text files and outputs the preprocessed code.

Name: Anonymous 2018-08-23 21:40

perl

Name: Anonymous 2018-08-23 23:39

>>3
You got me, I actually hate UNIX. I was just shitposting.

Name: Anonymous 2018-08-24 6:33

>>5
T*k.
>>7
your're are an anus

Name: Anonymous 2018-08-24 7:16

I use ERB to generate C code every now and then. It is completely orthogonal to HTML, other than using quasi-xml syntax <% %> as delimiters and including a few functions for escaping HTML in an Util module.

Name: Anonymous 2018-08-24 8:16

>>9
nice, I didn't know why but I got the impression that it's HTML-specific but it seems pretty convenient for other kinds of code

Name: Anonymous 2018-08-24 8:26

template my dubs!

Name: Anonymous 2018-08-24 11:31

Use PyTemplate

Name: Anonymous 2018-08-24 11:31

Use JTemplate

Name: Anonymous 2018-08-24 11:31

Use NTemplate

Name: Anonymous 2018-08-24 12:02

>>12-14
use my anus!

Name: Anonymous 2018-08-24 14:20

PHP is a good templating engine.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List