Skip to content

Instantly share code, notes, and snippets.

View pavly-gerges's full-sized avatar
🤖
Electrostat Lab.

Pavly Gerges (pavl_g) pavly-gerges

🤖
Electrostat Lab.
View GitHub Profile
@pavly-gerges
pavly-gerges / error.log
Created June 6, 2024 20:00
Error due to `n-tuple` duplicates when putting an object definition in headers and including the headers in multiple compilation units, resulting in `n-tuple` duplicate definitions during the linking procedure.
[100%] Linking C executable hello_comm.c-a.elf
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic-core//build/x86/libelectrostatic-a.a(init_protocol.c.o):(.bss+0x70): multiple definition of `serial'; CMakeFiles/hello_comm.c-a.elf.dir/src/hello_comm.c.o:(.bss+0x70): first defined here
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic-core//build/x86/libelectrostatic-a.a(init_protocol.c.o):(.bss+0x54): multiple definition of `parallel'; CMakeFiles/hello_comm.c-a.elf.dir/src/hello_comm.c.o:(.bss+0x54): first defined here
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic-core//build/x86/libelectrostatic-a.a(init_protocol.c.o):(.bss+0x0): multiple definition of `usbfs'; CMakeFiles/hello_comm.c-a.elf.dir/src/hello_comm.c.o:(.bss+0x0): first defined here
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/E
@pavly-gerges
pavly-gerges / linking-error.log
Created June 9, 2024 21:28
Logs when linking failed at the compile-time
electrostat-lab@electrostat-workstation:~/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework$ ./helper-scripts/ci-cd/test-e4j.sh
> Task :electrostatic4j-examples:run FAILED
Jun 09, 2024 1:26:00 AM electrostatic4j.util.loader.NativeImageLoader loadLibrary
INFO: Created extraction directory!
Jun 09, 2024 1:26:01 AM com.avrsandbox.snaploader.NativeBinaryLoader cleanExtractBinary
INFO: Extracted successfully to /home/electrostat-lab/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/electrostatic4j-examples/libs/bin/libelectrostatic4j.so
Jun 09, 2024 1:26:01 AM com.avrsandbox.snaploader.NativeBinaryLoader loadBinary
INFO: Successfully loaded library: /home/electrostat-lab/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/electrostatic4j-examples/libs/bin/libelectrostatic4j.so
/opt/electrostatic-sandbox/jdk-20.0.2/bin/java: symbol lookup error: /home/electrostat-lab/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/elec
@pavly-gerges
pavly-gerges / PROPOSITIONAL_SYMBOLS_LATEX_OBSIDIAN.md
Created July 19, 2024 01:31 — forked from zudsniper/PROPOSITIONAL_SYMBOLS_LATEX_OBSIDIAN.md
📋 Propositional Logic symbols & their LaTeX formulas specifically for Obsidian flavor Markdown

Certainly! Obsidian is a popular note-taking application that supports Markdown with LaTeX integration for mathematical notation. When using LaTeX in Obsidian's Markdown flavor, you typically enclose the LaTeX code within double dollar signs $$...$$ for block math and single dollar signs $...$ for inline math.

Here's an exhaustive list of the symbols for propositional logic and their formulas specifically formatted for Obsidian flavor Markdown:

  1. Conjunction (AND)

    • Symbol: ∧
    • Obsidian Markdown: $\land$ or $\wedge$
  2. Disjunction (OR)

  • Symbol: ∨
@pavly-gerges
pavly-gerges / hello_contiguous_buffer.c
Last active August 19, 2024 15:28
This is an early-access demonstrative example for the `contiguous_buffer.c` library and the List ADT from Arithmos.
#include <electrostatic/util/errno/errno.h>
#include <alloca.h>
#include <stdio.h>
#include <stdlib.h>
#include <electrostatic/algorithm/arithmos/adt/list.h>
void iterator(list *buffer, list_element *element) {
uint64_t index = 0;
buffer->function_table->indexof(buffer, element, &index);
printf("Index at %llud = %d\n", index, *((int*) element->data));
@pavly-gerges
pavly-gerges / switching_xor.c
Created August 22, 2024 02:58
A function that operates on a list of propositions and returns a predicate of their XORing operation using the primitive AND and OR.
#include <electrostatic/algorithm/arithmos/algebra/switching.h>
#include <stdlib.h>
uint8_t switching_xor(SWITCHING_TYPE **inputs, SWITCHING_TYPE *output){
if (inputs == NULL || output == NULL) {
return 1;
}
for (int i = 0; inputs[i] != NULL; i++) {
SWITCHING_TYPE prop0 = *output;
SWITCHING_TYPE prop1 = *(inputs[i]);
@pavly-gerges
pavly-gerges / diagrams.md
Created August 22, 2024 04:12 — forked from blackcater/diagrams.md
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

flowchart LR

A[] 
B[]
flowchart LR
digraph G { rankdir = LR; a -> b }
In file included from /media/pavl-x86-machine/pavl-g/Projects/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/serial4j/serial4j-native/src/lib/jni/com_serial4j_core_terminal_NativeTerminalDevice.cpp:40:
/media/pavl-x86-machine/pavl-g/Projects/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/serial4j/serial4j-native/dependencies/include/electrostatic/util/errno/errno.h:14:16: error: expected identifier before ‘(’ token
14 | typedef struct errno(errno);
| ^~~~~
/media/pavl-x86-machine/pavl-g/Projects/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/serial4j/serial4j-native/dependencies/include/electrostatic/util/errno/errno.h:14:16: error: typedef ‘__errno_location’ is initialized (use ‘decltype’ instead)
14 | typedef struct errno(errno);
| ^~~~~
/media/pavl-x86-machine/pavl-g/Projects/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/serial4j/serial4j-native/dependencies/include/e
@pavly-gerges
pavly-gerges / switching-mux.md
Last active September 13, 2024 10:27
Elementary linear algebriac formula for MUX operations.

Preface:

This document is devoted to derive the filter gates applied on the select lines of a multiplexer before entering the main AND circuit to produce the proper truth table. The document starts first by introducing the preliminaries using a miniaturized model, the 4-to-1 Multiplexer Model, the prototypical model of a MUX circuitry.

English:

For a 4-to-1 Multiplexer case. Let, $γ$ and $φ$ be symbols designating the select lines of the multiplexer And, $i$ be the symbols designating the input lines to the multiplexer, and $q$ designate the single output line from the MUX.

Lemma.01:

$$