Skip to main content

2 posts tagged with "acpul"

View All Tags

· 4 min read
Victor Kozub

Today was a great day, and I conducted an experiment to test how ideal the chosen ACPUL naming system is. The results surprised me because I thought there was room for improvement, but it seems it's already perfect.

I asked ChatGPT to give me the best naming options. The highest score was achieved by nodePropZOrderS(u0, sn0, -1);, which was quite expected based on this metric.

Request 10 names with dots

write 10 alternatives with short names of function node.prop.z.order.s(u0, sn0, -1);

Here are 10 alternatives with short names for the function node.prop.z.order.s(u0, sn0, -1);:

  1. n.p.z.o.s(u0, sn0, -1);
  2. nd.pr.z.o.s(u0, sn0, -1);
  3. npz.os(u0, sn0, -1);
  4. nprop.zos(u0, sn0, -1);
  5. node.pz.os(u0, sn0, -1);
  6. n.pzo.s(u0, sn0, -1);
  7. nd.pz.o.s(u0, sn0, -1);
  8. np.zorder.s(u0, sn0, -1);
  9. node.z.os(u0, sn0, -1);
  10. np.z.o.s(u0, sn0, -1);

Request 10 names without dots

merge and camelCase or _ also etc

Here are 10 alternatives with merged and camelCase or snake_case names for the function node.prop.z.order.s(u0, sn0, -1);:

  1. nodePropZOrderS(u0, sn0, -1);
  2. nPropZOrderS(u0, sn0, -1);
  3. npzOrderS(u0, sn0, -1);
  4. nodePZOrderS(u0, sn0, -1);
  5. npZOrderS(u0, sn0, -1);
  6. node_prop_z_order_s(u0, sn0, -1);
  7. n_prop_z_order_s(u0, sn0, -1);
  8. npz_order_s(u0, sn0, -1);
  9. node_pz_order_s(u0, sn0, -1);
  10. np_z_order_s(u0, sn0, -1);

Generate score

made score for length, reading, style for each variant and which score is better

Let's evaluate each variant based on three criteria: length, readability, and style. We'll assign a score from 1 to 5 for each criterion, where 5 is the best.

Criteria

  1. Length: Shorter is better.
  2. Readability: Easier to read and understand.
  3. Style: Consistency and clarity in naming.

Scoring

  • Length: 5 (very short), 4, 3 (moderate), 2, 1 (very long)
  • Readability: 5 (very readable), 4, 3 (moderate), 2, 1 (difficult to read)
  • Style: 5 (very stylish), 4, 3 (moderate), 2, 1 (poor style)

Variants and Scores

  1. nodePropZOrderS(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 5
    • Total: 12
  2. nPropZOrderS(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 4
    • Total: 11
  3. npzOrderS(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 3
    • Total: 10
  4. nodePZOrderS(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 4
    • Total: 11
  5. npZOrderS(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 4
    • Total: 11
  6. node_prop_z_order_s(u0, sn0, -1);

    • Length: 2
    • Readability: 5
    • Style: 3
    • Total: 10
  7. n_prop_z_order_s(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 3
    • Total: 10
  8. npz_order_s(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 2
    • Total: 9
  9. node_pz_order_s(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 3
    • Total: 10
  10. np_z_order_s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10

Best Score

The variant nodePropZOrderS(u0, sn0, -1); scored the highest with a total of 12 points, making it the best choice based on length, readability, and style.

for previous variant also (with dots)

Sure, let's also evaluate the previous variants with dots using the same criteria: length, readability, and style.

Variants and Scores

  1. n.p.z.o.s(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 2
    • Total: 9
  2. nd.pr.z.o.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9
  3. npz.os(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 2
    • Total: 9
  4. nprop.zos(u0, sn0, -1);

    • Length: 3
    • Readability: 3
    • Style: 3
    • Total: 9
  5. node.pz.os(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10
  6. n.pzo.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9
  7. nd.pz.o.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9
  8. np.zorder.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10
  9. node.z.os(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10
  10. np.z.o.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9

Best Score

The variants node.pz.os(u0, sn0, -1);, np.zorder.s(u0, sn0, -1);, and node.z.os(u0, sn0, -1); scored the highest with a total of 10 points each. These are the best choices based on length, readability, and style.

· 2 min read
Victor Kozub

In 2012, I developed the ideal architecture for the the best ever compiler of programming ACPUL consisting of layers and transformers. The main idea is the transparency of the compiled code's passage from start to finish for advanced refactoring, debugging, profiling, monitoring and optimizations with real-time time travel debugger (like Tommorow Corporation).

The code goes through multiple transformation stages and was also developed sequentially from 1 to 8 stages. These stages are what I will write about in the following articles:

This is all that is needed for the Matrix.

Parser

The ACPUL parser is created using EBNF of The Compiler Generator Coco/R by Dr. Hanspeter Mössenböck. Coco/R is a simple programming language, which is great in programming since it has the capability to compile itself. The output consists of independent C++ POSIX files: Parser.h/c, Scanner.h/c. Amazing! 😄

Just a few rules of ACPUL EBNF and you get the whole world.

The Best Language Architecture

The structure of the ACPUL compiler.

  1. Block, Expression, Object, ObjectMap, Processor
  2. CodeBlock, CodeInstruction, Compiler
  3. Executor, ExecutionBlock, CodeBuilder, Core, FormulaInstance, Interpreters, BuildFile, CoreTest
  4. Dumper, CoreData, ErrorNumbers, Error, AParser, AScanner, AErrors
  5. Utils, DumpHelper
  6. CoreInfo, InfoDelegate, InfoDelegateLog, Profile
  7. Debuggers, DataMatrix, ObjectGroup, DataMatrixOperation, DataMatrixFrame
  8. ObjectLocation, LiveComment, LiveLogging, InfoDelegateLiveLog, InfoDelegateLiviLoggingConnection

1. Block, Expression, Object, ObjectMap, Processor

The base of ACPUL programming language.

2. CodeBlock, CodeInstruction, Compiler

3. Executor, ExecutionBlock, CodeBuilder, Core, FormulaInstance, Interpreters, BuildFile, CoreTest

4. Dumper, CoreData, ErrorNumbers, Error, AParser, AScanner, AErrors

5. Utils, DumpHelper

6. CoreInfo, InfoDelegate, InfoDelegateLog, Profile

7. Debuggers, DataMatrix, ObjectGroup, DataMatrixOperation, DataMatrixFrame

8. ObjectLocation, LiveComment, LiveLogging, InfoDelegateLiveLog, InfoDelegateLiviLoggingConnection