Template Literals vs Heredoc: String Battle ROYALE!

JavaScript's template literals vs PHP's heredoc - which formatting is prettier? WTF!

#javascript #php #jsvsphp #templateliterals #heredoc #stringinterpolation #multilinestrings #viralcoding #es6 #syntaxcomparison #stringformatting #mindblown

https://www.youtube.com/watch?v=Q7Uw-2gmJaI

Template Literals vs Heredoc: String Battle ROYALE! #jsvsphp

YouTube

Anyone who works with Rails has heard of and used the runner command (https://guides.rubyonrails.org/command_line.html#bin-rails-runner) with a single-line code argument that executes in the application context.
While working on my application the other day, I needed to list all tables with their row counts.
The code for listing the number of table rows on a single line looks rather ugly and unmaintainable.

#Ruby #Rails #SQL #runner #bash #heredoc

If a public foss repo offers a foss setup.sh command line script which, step by step, performs the installation / usage steps the repo readme lists for use at the command line to set up/use the code, what trust measures would you insist upon before downloading and before running the setup.sh script at your local command line? Is there a better way of offering an helpful automated but trustworthy #Heredoc than a scary .sh ?

#ShellProgramming #git #security #codeberg #shellscript #bourneshell

https://en.wikipedia.org/wiki/Here_document
Am I the only one who reads #heredoc not as "Here Doc", but instead phonetically similar to heretic?
Here document - Wikipedia

Republished "Multistrings: a simple syntax for heredoc-style strings" (2023)

https://xtao.org/blog/multistrings.html

#syntax #heredoc #multistrings #simple #idea #programming

Multistrings: a simple syntax for heredoc-style strings

How to use heredoc as a text editor

Comunque usare un text editor vero è più pratico.

#cat #heredoc

https://opensource.com/article/20/12/heredoc

How to use heredoc as a text editor

There’s a somewhat obscure feature in Linux and Unix shells that allows you to open a sort of do-while loop for the 

Opensource.com

this variant implementation is also whitespace-aware and trims text outside of heredocs -- useful for implementing data formats on top of it

#jevko #minimal #syntax #heredoc

[Opinion] Escaping escaping · Issue #2 · jevko/specifications

This might be too late in the game, but I lament yet another generic serialization format with old-school escaping. Escaping is not ergonomic, and it is not necessary. There are several real-world ...

GitHub
Bash Heredoc Tutorial For Beginners - OSTechNix

HereDoc, acronym for Here Document, is an input Redirection method to pass multiple inputs to a program or command in Bash.

How to assign a heredoc value to a variable in Bash?

I have this multi-line string (quotes included): abc'asdf" $(dont-execute-this) foo"bar"'' How would I assign it to a variable using a heredoc in Bash? I need to preserve newlines. I don't want...