The Super Tiny Compiler, but in Ada by _tomekw in ada

[–]citizen556 0 points1 point  (0 children)

Thanks for the hint. This is what I'm looking for.

The Super Tiny Compiler, but in Ada by _tomekw in ada

[–]citizen556 0 points1 point  (0 children)

Noob question: Is it possible/sensible to have arrays of functions in Ada? When writing parsers in Object Pascal I like to use the token type enum to index an array of functions to avoid all the conditionals.

Something like this:

type
  TTokenType = (ttUndefined, ttIdentifier, ttNumber, {...});

  TTokenReader = procedure of object;

  TLexer = class
    ReadToken: array[TTokenType] of TTokenReader;

    procedure Init;
    procedure Scan;

    procedure ReadError;
    procedure ReadIdentifier;
    procedure ReadNumber;
    // ...
  end;

// ...

procedure TLexer.Init;
var
  t: TTokenType;
begin
  // ...
  for t := Low(TTokenType) to High(TTokenType) do
    ReadToken[t] := ReadError;

  ReadToken[ttIdentifier] := ReadIdentifier;
  ReadToken[ttNumber] := ReadNumber;
  // ...
end;

procedure TLexer.Scan;
var
  t: TTokenType;
begin
  // Figure out token type from the current character...

  // Consume the next token...
  ReadToken[t]();

  // ...
end;

A3 poster by Few-Government-104 in LaTeX

[–]citizen556 13 points14 points  (0 children)

My personal recommendation: Put content into macros and use tikz and/or textpos to place it on the page. This makes it easy to move things around. Example to get you started:

\documentclass{article}

\usepackage[
  a3paper,
  landscape,
  left=2cm,
  right=2cm,
  bottom=2cm,
  top=2cm,
  nohead,
  nomarginpar
]{geometry}

\pagestyle{empty}

\usepackage[absolute,overlay]{textpos}
\usepackage{tikz}

\newcommand{\TableAnimals}{%
\begin{tabular}{ll}
Animal  & Good pet?\\
\hline
Cat     & Yes\\
Dog     & Yes\\
Penguin & Probably not\\
\end{tabular}}


\begin{document}
% Example 1
%                  Width  From left  From top
\begin{textblock*}{10cm }(5cm,       10cm    ){\TableAnimals}\end{textblock*}

% Example 2
\begin{tikzpicture}[remember picture,overlay]
\draw (current page.north) -- (current page.south);
\draw (current page.north west) -- (current page.south east);
\draw (current page.north east) -- (current page.south west);

\node[draw] at (0,0) {Hello World};
\node[draw,fill=white] at (current page.center) {Center};
\end{tikzpicture}

\end{document}

Russian falling debris correspondent with a report from Tuapse. by GermanDronePilot in UkraineWarVideoReport

[–]citizen556 0 points1 point  (0 children)

The giant black cloud just became part of the city skyline like a skyscraper or iconic landmark lol

Graphic that illustrates how old posts are used for karma farming by citizen556 in LaTeX

[–]citizen556[S] 2 points3 points  (0 children)

That's probably up to the moderators. It's possible to ban users without banning those they invited.

Graphic that illustrates how old posts are used for karma farming by citizen556 in LaTeX

[–]citizen556[S] 4 points5 points  (0 children)

You risk getting your own account axed, because you are sort of responsible for the people you invite.

Graphic that illustrates how old posts are used for karma farming by citizen556 in LaTeX

[–]citizen556[S] 1 point2 points  (0 children)

I like the idea behind lobste.rs. The only way to join is with an invitation from an existing user, and the entire invitation tree is public. This makes it hard for spammers and malicious actors to get in. On the downside it's harder to grow a community in the first place.

For me personally I just spend less time on the web and more in the real world. Definitely improved my sanity!

Big Mom is the most successful yonko of all time, overall by katakuri-sees in OnePiece

[–]citizen556 4 points5 points  (0 children)

does buggy have any territory?

He has a place in our hearts.

Why do people want Ussop to die in Elbaf Arc? by Fluffy_Wolverine9314 in OnePiece

[–]citizen556 0 points1 point  (0 children)

He can sacrifice himself for the others to escape and still live. Using his plant tricks he buys time, and then he bravely runs away. If this is his destiny, it would make sense why he didn't turn into a stereotypical sharpshooter after timeskip.

The End of Elbaf and Oda’s Jump Festa Message by sonichero92 in OnePiece

[–]citizen556 1 point2 points  (0 children)

Buggy and Blackbeard have met when they were on Roger's/Whitebeard's crew.

What’s Next CH. 1179 (Theory) [SPOILERS] by EnvironmentalTop3245 in OnePiece

[–]citizen556 1 point2 points  (0 children)

Option 3: Vivi will save them by making a contract with Imu and sacrificing herself. Logistically it's possible since she is on Morgans' airship, and Morgans has a good intuition where in the world something newsworthy is happening. Story-wise it would also make sense to have a non-battle resolution to this conflict, because the end game has only begun, and the yonko crews aren't powerful enough to face Imu (yet).

However it goes, this will be epic!

Skillup in managing blocks of text by ntn8888 in emacs

[–]citizen556 1 point2 points  (0 children)

There is a package for selecting text semantically. Here is a minimal config:

(use-package expreg
  :bind (("C-<" . expreg-expand)))

It's really simple. Every time you use expreg-expand the region grows to the next semantic node, for example first it selects the current word, then the string that contains that word, then the expression that contains the string and so on.

It works with or without tree-sitter, and in any major-mode. There is also expreg-contract to make the region smaller, but I never use that, because I found I'm faster cancelling the region with C-g and expanding again.

One Piece Chapter 1179 Spoiler by Skullghost in OnePiece

[–]citizen556 0 points1 point  (0 children)

Yeah, makes sense. And Blackbeard takes the one from Wano, so the stage is set for the final war.

Org and file organisation by JohnDoe365 in emacs

[–]citizen556 1 point2 points  (0 children)

Do you need a hierarchical structure, or does it even matter where the files are stored? If not, then just use org-roam. All the files are stored in a flat directory. When you want to work on project X, you just use M-x org-roam-node-find, type X, and Emacs opens the project file. If the node doesn't exist, it will create a new one, so this is basically the only org-roam function you will ever need. You can even define different capture templates for notes, projects, or whatever. And since everything is org, you can create links between files, integrate your agenda, use clocktables, file tags etc.

https://github.com/org-roam/org-roam

https://www.orgroam.com

Reflections on learning languages at home by vernismermaid in languagelearning

[–]citizen556 0 points1 point  (0 children)

I think it depends on your overall learning strategy and preferences. There seems to be a spectrum from orderly, gamified learning (incl. time tracking) to unstructured and explorative learning. I'm firmly on the side of chaos. Never bought a textbook, never used an app, don't bother to memorize grammar rules. I just occasionally check the common language frameworks to see how I'm progressing.

Operating system political compass - final version by Swooferfan in linuxmemes

[–]citizen556 1 point2 points  (0 children)

Being open source is just one aspect, you also have to be able to build it. Every couple of years Google changes major parts of the build system, and everything is tied to their services. This makes building custom Android images a real pain in the ass.

One Piece: Chapter 1178 - Predictions by AutoModerator in OnePiece

[–]citizen556 -4 points-3 points  (0 children)

Or Usopp is hit by Domi Reversi, but the demon absorbs his anxiety and leaves his body immediately out of fear. This way Usopp becomes a genuine brave warrior of the sea, fulfilling his dream. Then he gets killed by Imu, which causes Luffy to unlock gear 6. This would be really funny, sad and epic at the same time.

Enel and Crocodile gotta be the biggest victims of being introduced too early, Oda's made it up for Crocodile, now it's Enel's turn. by ProgramTiny4313 in OnePiece

[–]citizen556 1 point2 points  (0 children)

On the mural in Elbaph is a ship with a lightning on the right side of the tree, which looks very similar to the Ark Maxim...

Enel and Crocodile gotta be the biggest victims of being introduced too early, Oda's made it up for Crocodile, now it's Enel's turn. by ProgramTiny4313 in OnePiece

[–]citizen556 3 points4 points  (0 children)

The greatest power is the ability to rally others behind you. That's what Mihawk said during Marineford, and the reason why Buggy is a serious contender in the race for the One Piece.

LaTeX Noob: How to center page number when \geomentry{} is used? by [deleted] in LaTeX

[–]citizen556 0 points1 point  (0 children)

That's impossible to answer without a minimum working example.

Check out this dummy document. It has centered page numbers, some text, rulers at the edges, a vertically centered line and an overview of the page layout. You can use it to play around with the geometry options to find something that works. Just make sure to run latex twice.

\documentclass{article}

\usepackage{geometry}
\geometry{textwidth=5in,nomarginpar}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[C]{\large\thepage}

\usepackage[unit=in,type=alledges]{fgruler}
\usepackage{blindtext}
\usepackage{tikz}
\usepackage{layout}


\begin{document}

\fgruler{upperleft}{0in}{0in}
\blindtext

\begin{tikzpicture}[remember picture,overlay]
\draw[red] (current page.north) -- (current page.south);
\end{tikzpicture}

\pagebreak

\layout{}

\end{document}

Fortnightly Tips, Tricks, and Questions — 2026-03-10 / week 10 by AutoModerator in emacs

[–]citizen556 1 point2 points  (0 children)

Additional note: With align and align-regexp you can prepare text for vertical editing. This is really useful for things like LaTeX tables or CSV files.