Thursday, December 31, 2020

BigChainDB Links

 BigChainDB Server:

https://www.bigchaindb.com/developers/guide/tutorial-car-telemetry-app/

https://github.com/bigchaindb/bigchaindb

/home/ubuntu/Downloads/BigChainDBCarTutorial/


Edit: Jan 3rd: (concerning: ~/Downloads/BigChainDBTests):
I didn't I've much luck with
https://github.com/bigchaindb/js-bigchaindb-driver
https://github.com/bigchaindb/js-driver-orm

/home/ubuntu/Downloads/BigChainDBCarTutorial/


const BigchainDB = require('bigchaindb-driver')

const API_PATH = 'https://test.ipdb.io/api/v1/'
const conn = new BigchainDB.Connection(API_PATH)


error, this broke:

import Orm from 'bigchaindb-orm'

"import Orm from 'bigchaindb-orm'
^^^^^^

SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:979:16)
at Module._compile (internal/modules/cjs/loader.js:1027:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
"

https://github.com/bitcoinjs/bip39

error, this broke:


const seed = bip39.mnemonicToSeed('seedPhrase').slice(0,32)

                                               
TypeError: bip39.mnemonicToSeed(...).slice is not a function

    at Object.<anonymous> (/home/ubuntu/Downloads/BigChainDBTests/testtwo.js:8:49) `     at Module._compile (internal/modules/cjs/loader.js:1063:30) 

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

    at Module.load (internal/modules/cjs/loader.js:928:32)

    at Function.Module._load (internal/modules/cjs/loader.js:769:14)

    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)

    at internal/main/run_main_module.js:17:47

found during debugging::

https://javascript.info/task/class-extend-object
https://stackoverflow.com/questions/38987784/how-to-convert-a-hexadecimal-string-to-uint8array-and-back-in-javascript
https://stackoverflow.com/questions/49854811/class-extends-value-object-is-not-a-constructor-or-null
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
https://stackoverflow.com/questions/51304884/error-typeerror-data-slice-is-not-a-function

https://ipdb.io/research/


or the the car tutorial. 




Sunday, December 20, 2020

LoRa Unlicensed Band

 https://makersportal.com/blog/2019/10/5/arduino-lora-network

https://www.digikey.com/en/articles/unlicensed-915-mhz-band-fits-many-applications-and-allows-higher-transmit-power
"FCC regulations for the 915-MHz ISM band, for example, place no restrictions on type of application or duty cycle."


Saturday, December 19, 2020

Follow-Up with Compiler Thoughts for mm-ADTdocs

Original:
http://raptorlicious.blogspot.com/2020/06/i-glanced-at-mm-adt-docs-and-started.html

https://www.youtube.com/channel/UCSX3MR0gnKDxyXAyljWzm0Q
Computer Science 

Assembler and gdb

https://tldp.org/HOWTO/html_single/Assembly-HOWTO/


https://www.gnu.org/software/gdb/


Dr. Martin J.M. Codrington
https://www.youtube.com/channel/UCsVxr0vvJlUaKxRoCmg5FcQ

CQL:
https://www.youtube.com/channel/UCsVxr0vvJlUaKxRoCmg5FcQ

Bartosz Milewski:
https://www.youtube.com/channel/UC8BtBl8PNgd3vWKtm2yJ7aA

Topos:
https://www.youtube.com/channel/UCxUZjZaLPsHPlp8AtkSBZiA

Mathématiques et programmation:
https://www.youtube.com/channel/UC1LQmyz-CJ7RYWVtkmcHr8g

Fun(c)tional Programming Group:
https://www.youtube.com/channel/UCZ9Qv0y5IS-0DsN4ZDTDyqA

Hackers at Cambridge
https://www.youtube.com/channel/UCNY6ekV9z84ZYL4qUDusTFw

Tutorials Point (India) Ltd.
https://www.youtube.com/channel/UCVLbzhxVTiTLiVKeGV7WEBg


Wednesday, December 16, 2020

Working on understanding GNU Make

Start with the files:

a.c a.h b.c b.h c.c c.h d.c

Create the object files by compiling and assembling:

gcc -c a.c   ==> a.o

gcc -c b.c  ==> b.o

gcc -c c.c  ==> c.o

gcc -c d.c  ==> d.o

Link all of the files:

gcc -o output *.o  ==> output

Files:

a.c
#include "a.h"

int add(int a, int b)
{
    return a + b;
}

a.h
int add(int a, int b);

b.c
#include "b.h"

int multiply(int a, int b)
{
    return a * b;
}

b.h
int multiply(int a, int b);

c.c
#include "c.h"

int merge(int a, int b)
{
    return multiply(a,b) / multiply(a,b);
}

c.h
#include "a.h"
#include "b.h"

int merge(int a, int b);

d.c
#include "c.h"
#include <stdio.h>

int main()
{
   int a = 121;
   int b = 5;
   int c = merge(a,b);
   printf("here is the merge %d\n",c);
}

How do I build a makefile that does this???

Makefile:

d : a.o b.o c.o d.o
    cc -o d a.o b.o c.o d.o
a.o : a.c a.h
    cc -c a.c
b.o : b.c b.h
    cc -c b.c
c.o : c.c a.o b.o
    cc -c c.c
d.o : d.c c.o
    cc -c d.c

Commands followed to compile:

make

++++++++++++++++++++++++++++++++++

use make test:

https://stackoverflow.com/questions/4927676/implementing-make-check-or-make-test







Tuesday, December 15, 2020

compiling multiple c files for ardunio

compiling multiple c files....

For Ardunio?
It says to get make to do it.

or I might need to compile all of the files

https://www.cs.utah.edu/~zachary/isp/tutorials/separate/separate.html

Sunday, December 6, 2020

selecting bits selectively from the float

After discovering bit fields for discovering the bits of the ieee754 representation:
https://www.geeksforgeeks.org/program-for-conversion-of-32-bits-single-precision-ieee-754-floating-point-representation/
uses binary right shift operator:
https://www.tutorialspoint.com/cprogramming/c_bitwise_operators.htm

I developed my algorithm:
https://gist.github.com/bshambaugh/fab368ae62da5f326b8876005de710d8 by watching:
https://www.youtube.com/watch?reload=9&v=8afbTaA-gOQ

But Now that I know about bit fields, I see them everywhere:
https://www.tutorialspoint.com/cprogramming/c_bit_fields.htm
https://www.cs.yale.edu/homes/aspnes/pinewiki/C(2f)FloatingPoint.html

Perhaps the computer represents things in IEEE754, and since unions have one location in memory then setting up bit fields in the union exposes the bits selectively from the float

Thursday, November 26, 2020

Compiling CS things to study

 https://www.youtube.com/watch?v=vNHpsC5ng_E&list=PLF206E906175C7E07
(Design Patterns Video Tutorial) edit: https://www.youtube.com/watch?v=NU_1StN5Tkk (short thanks to fccokc)

https://www.youtube.com/playlist?list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev
(Finite State Machine)

https://www.youtube.com/watch?v=RBSGKlAvoiM
https://github.com/williamfiset/data-structures
(Data Structures Easy to Advanced Course - Full Tutorial from a Google Engineer)
{Edit:(1/27/2021): New Data Structures Course: Data Structures - Full Course Using C and C++ : https://www.youtube.com/watch?v=B31LgI4Y4DQ }

https://www.youtube.com/watch?v=09_LlHjoEiY
(Algorithms Course - Graph Theory Tutorial from a Google Engineer)


{edit: other links: (1/27/2021)
The Algorithm Design Manual:

https://mimoza.marmara.edu.tr/~msakalli/cse706_12/SkienaTheAlgorithmDesignManual.pdf ,

https://github.com/williamfiset/algorithms ,

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-design-and-analysis-of-algorithms-spring-2015/index.htm ,


advanced java: https://courses.edx.org/courses/course-v1:MITx+6.005.2x+1T2017/course/ ,

Phil Trelford - Write your own compiler in 24 hours - Bristech Conference 2015
https://www.youtube.com/watch?v=iOEHgBL_GmA&app=desktop ,

Parser and Lexer — How to Create a Compiler part 1/5 — Converting text into an Abstract Syntax Tree https://www.youtube.com/watch?v=eF9qWbuQLuw&t=2492s ,

Theory  of Computation: https://www.youtube.com/watch?v=58N2N7zJGrQ&list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev&index=1 }







Wednesday, November 4, 2020

understanding assembly ... (edit: actually learning about pointers and memory to solve memory issues with a function in C)

this code, which is for the mergeChar function in
/changearray/ifstructures/loopbyFour/example1_2_9f.c

https://github.com/bshambaugh/changearray/blob/master/ifstructures/loopbyFour/mergeCharsFuncation/codingUnit_com/test_final/Copy5useCallocMult4.c

https://www.geeksforgeeks.org/how-to-return-multiple-values-from-a-function-in-c-or-cpp/

Try with function:
http://vertstudios.com/blog/malloc-functions-returning-pointers/

https://overiq.com/c-programming-101/array-of-strings-in-c/

----------------------------

edit:

C Pointer Tutorial
https://www.youtube.com/watch?v=IkyWCOUY8V4
(includes mention of how to pass pointer to function)
----------------------------------------------------------------------------------------

https://www.eskimo.com/~scs/cclass/int/sx9b.html

http://phyweb.physics.nus.edu.sg/~phywjs/CZ1102/lecture20/tsld014.htm

https://stackoverflow.com/questions/1733881/c-correctly-freeing-memory-of-a-multi-dimensional-array

https://joequery.me/notes/double-pointers-c/

--------------


https://www.recurse.com/blog/7-understanding-c-by-learning-assembly   [Understanding C by learning assembly]

http://cs.ecs.baylor.edu/~donahoo/tools/valgrind/messages.html  [Excerpt from Valgrind documentation]

https://valgrind.org/docs/manual/quick-start.html [The Valgrind Quick Start Guide]


Dump of assembler code for function main:
   0x00005555555547f2 <+0>:     push   %rbp
   0x00005555555547f3 <+1>:     mov    %rsp,%rbp
=> 0x00005555555547f6 <+4>:     mov    $0x1,%edi
   0x00005555555547fb <+9>:     callq  0x555555554660 <malloc@plt>
   0x0000555555554800 <+14>:    mov    %rax,0x200821(%rip)        # 0x555555755028 <A>
   0x0000555555554807 <+21>:    mov    $0x1,%edi
   0x000055555555480c <+26>:    callq  0x555555554660 <malloc@plt>
   0x0000555555554811 <+31>:    mov    %rax,0x200800(%rip)        # 0x555555755018 <B>
   0x0000555555554818 <+38>:    mov    0x200809(%rip),%rax        # 0x555555755028 <A>
   0x000055555555481f <+45>:    movb   $0x62,(%rax)
   0x0000555555554822 <+48>:    mov    0x2007ef(%rip),%rax        # 0x555555755018 <B>
   0x0000555555554829 <+55>:    movb   $0x61,(%rax)
   0x000055555555482c <+58>:    mov    0x2007f5(%rip),%rax        # 0x555555755028 <A>
   0x0000555555554833 <+65>:    mov    %rax,%rsi
   0x0000555555554836 <+68>:    lea    0x1c4(%rip),%rdi        # 0x555555554a01
   0x000055555555483d <+75>:    mov    $0x0,%eax
   0x0000555555554842 <+80>:    callq  0x555555554650 <printf@plt>
   0x0000555555554847 <+85>:    mov    0x2007ca(%rip),%rax        # 0x555555755018 <B>
   0x000055555555484e <+92>:    mov    %rax,%rsi
   0x0000555555554851 <+95>:    lea    0x1bd(%rip),%rdi        # 0x555555554a15
   0x0000555555554858 <+102>:   mov    $0x0,%eax
   0x000055555555485d <+107>:   callq  0x555555554650 <printf@plt>
   0x0000555555554862 <+112>:   mov    0x2007bf(%rip),%rax        # 0x555555755028 <A>
   0x0000555555554869 <+119>:   movzbl (%rax),%eax
   0x000055555555486c <+122>:   mov    %al,0x2007ae(%rip)        # 0x555555755020 <words>
   0x0000555555554872 <+128>:   movb   $0x0,0x2007a8(%rip)        # 0x555555755021 <words+1>
   0x0000555555554879 <+135>:   mov    0x200798(%rip),%rax        # 0x555555755018 <B>
   0x0000555555554880 <+142>:   movzbl (%rax),%eax
   0x0000555555554883 <+145>:   mov    %al,0x200799(%rip)        # 0x555555755022
   0x0000555555554889 <+151>:   movb   $0x0,0x200793(%rip)        # 0x555555755023
   0x0000555555554890 <+158>:   lea    0x192(%rip),%rdi        # 0x555555554a29
   0x0000555555554897 <+165>:   callq  0x555555554630 <puts@plt>
   0x000055555555489c <+170>:   lea    0x20077d(%rip),%rsi        # 0x555555755020 <words>
   0x00005555555548a3 <+177>:   lea    0x19d(%rip),%rdi        # 0x555555554a47
   0x00005555555548aa <+184>:   mov    $0x0,%eax
   0x00005555555548af <+189>:   callq  0x555555554650 <printf@plt>
   0x00005555555548b4 <+194>:   lea    0x200767(%rip),%rsi        # 0x555555755022
   0x00005555555548bb <+201>:   lea    0x19e(%rip),%rdi        # 0x555555554a60
   0x00005555555548c2 <+208>:   mov    $0x0,%eax
   0x00005555555548c7 <+213>:   callq  0x555555554650 <printf@plt>
   0x00005555555548cc <+218>:   mov    0x200745(%rip),%rax        # 0x555555755018 <B>
   0x00005555555548d3 <+225>:   movzbl (%rax),%eax
   0x00005555555548d6 <+228>:   movsbl %al,%edx
   0x00005555555548d9 <+231>:   mov    0x200748(%rip),%rax        # 0x555555755028 <A>
   0x00005555555548e0 <+238>:   movzbl (%rax),%eax
   0x00005555555548e3 <+241>:   movsbl %al,%eax
   0x00005555555548e6 <+244>:   mov    %edx,%esi
   0x00005555555548e8 <+246>:   mov    %eax,%edi
   0x00005555555548ea <+248>:   callq  0x55555555478a <mergeChars>
   0x00005555555548ef <+253>:   mov    0x200732(%rip),%rax        # 0x555555755028 <A>
   0x00005555555548f6 <+260>:   mov    %rax,%rdi
   0x00005555555548f9 <+263>:   callq  0x555555554620 <free@plt>
   0x00005555555548fe <+268>:   mov    0x200713(%rip),%rax        # 0x555555755018 <B>
   0x0000555555554905 <+275>:   mov    %rax,%rdi
   0x0000555555554908 <+278>:   callq  0x555555554620 <free@plt>
   0x000055555555490d <+283>:   lea    0x165(%rip),%rdi        # 0x555555554a79
   0x0000555555554914 <+290>:   callq  0x555555554630 <puts@plt>
   0x0000555555554919 <+295>:   lea    0x200700(%rip),%rsi        # 0x555555755020 <words>
   0x0000555555554920 <+302>:   lea    0x120(%rip),%rdi        # 0x555555554a47
   0x0000555555554927 <+309>:   mov    $0x0,%eax
   0x000055555555492c <+314>:   callq  0x555555554650 <printf@plt>
   0x0000555555554931 <+319>:   lea    0x2006ea(%rip),%rsi        # 0x555555755022
   0x0000555555554938 <+326>:   lea    0x121(%rip),%rdi        # 0x555555554a60
   0x000055555555493f <+333>:   mov    $0x0,%eax
   0x0000555555554944 <+338>:   callq  0x555555554650 <printf@plt>
   0x0000555555554949 <+343>:   lea    0x143(%rip),%rdi        # 0x555555554a93
   0x0000555555554950 <+350>:   callq  0x555555554630 <puts@plt>
   0x0000555555554955 <+355>:   mov    $0x0,%eax
   0x000055555555495a <+360>:   pop    %rbp
   0x000055555555495b <+361>:   retq   
End of assembler dump.



 

Tuesday, November 3, 2020

trying to debug code...apparently I cannot printf out from this point... and the memory addresses with assembler do not match valgrind

 https://www.recurse.com/blog/7-understanding-c-by-learning-assembly   [Understanding C by learning assembly]

http://cs.ecs.baylor.edu/~donahoo/tools/valgrind/messages.html  [Excerpt from Valgrind documentation]

https://valgrind.org/docs/manual/quick-start.html [The Valgrind Quick Start Guide]

Dump of assembler code for function main:
   0x00005555555547f2 <+0>:     push   %rbp
   0x00005555555547f3 <+1>:     mov    %rsp,%rbp
=> 0x00005555555547f6 <+4>:     mov    $0x1,%edi
   0x00005555555547fb <+9>:     callq  0x555555554660 <malloc@plt>
   0x0000555555554800 <+14>:    mov    %rax,0x200821(%rip)        # 0x555555755028 <A>
   0x0000555555554807 <+21>:    mov    $0x1,%edi
   0x000055555555480c <+26>:    callq  0x555555554660 <malloc@plt>
   0x0000555555554811 <+31>:    mov    %rax,0x200800(%rip)        # 0x555555755018 <B>
   0x0000555555554818 <+38>:    mov    0x200809(%rip),%rax        # 0x555555755028 <A>
   0x000055555555481f <+45>:    movb   $0x62,(%rax)
   0x0000555555554822 <+48>:    mov    0x2007ef(%rip),%rax        # 0x555555755018 <B>
   0x0000555555554829 <+55>:    movb   $0x61,(%rax)
   0x000055555555482c <+58>:    mov    0x2007f5(%rip),%rax        # 0x555555755028 <A>
   0x0000555555554833 <+65>:    mov    %rax,%rsi
   0x0000555555554836 <+68>:    lea    0x1c4(%rip),%rdi        # 0x555555554a01
   0x000055555555483d <+75>:    mov    $0x0,%eax
   0x0000555555554842 <+80>:    callq  0x555555554650 <printf@plt>
   0x0000555555554847 <+85>:    mov    0x2007ca(%rip),%rax        # 0x555555755018 <B>
   0x000055555555484e <+92>:    mov    %rax,%rsi
   0x0000555555554851 <+95>:    lea    0x1bd(%rip),%rdi        # 0x555555554a15
   0x0000555555554858 <+102>:   mov    $0x0,%eax
   0x000055555555485d <+107>:   callq  0x555555554650 <printf@plt>
   0x0000555555554862 <+112>:   mov    0x2007bf(%rip),%rax        # 0x555555755028 <A>
   0x0000555555554869 <+119>:   movzbl (%rax),%eax
   0x000055555555486c <+122>:   mov    %al,0x2007ae(%rip)        # 0x555555755020 <words>
   0x0000555555554872 <+128>:   movb   $0x0,0x2007a8(%rip)        # 0x555555755021 <words+1>
   0x0000555555554879 <+135>:   mov    0x200798(%rip),%rax        # 0x555555755018 <B>
   0x0000555555554880 <+142>:   movzbl (%rax),%eax
   0x0000555555554883 <+145>:   mov    %al,0x200799(%rip)        # 0x555555755022
   0x0000555555554889 <+151>:   movb   $0x0,0x200793(%rip)        # 0x555555755023
   0x0000555555554890 <+158>:   lea    0x192(%rip),%rdi        # 0x555555554a29
   0x0000555555554897 <+165>:   callq  0x555555554630 <puts@plt>
   0x000055555555489c <+170>:   lea    0x20077d(%rip),%rsi        # 0x555555755020 <words>
   0x00005555555548a3 <+177>:   lea    0x19d(%rip),%rdi        # 0x555555554a47
   0x00005555555548aa <+184>:   mov    $0x0,%eax
   0x00005555555548af <+189>:   callq  0x555555554650 <printf@plt>
   0x00005555555548b4 <+194>:   lea    0x200767(%rip),%rsi        # 0x555555755022
   0x00005555555548bb <+201>:   lea    0x19e(%rip),%rdi        # 0x555555554a60
   0x00005555555548c2 <+208>:   mov    $0x0,%eax
   0x00005555555548c7 <+213>:   callq  0x555555554650 <printf@plt>
   0x00005555555548cc <+218>:   mov    0x200745(%rip),%rax        # 0x555555755018 <B>
   0x00005555555548d3 <+225>:   movzbl (%rax),%eax
   0x00005555555548d6 <+228>:   movsbl %al,%edx
   0x00005555555548d9 <+231>:   mov    0x200748(%rip),%rax        # 0x555555755028 <A>
   0x00005555555548e0 <+238>:   movzbl (%rax),%eax
   0x00005555555548e3 <+241>:   movsbl %al,%eax
   0x00005555555548e6 <+244>:   mov    %edx,%esi
   0x00005555555548e8 <+246>:   mov    %eax,%edi
   0x00005555555548ea <+248>:   callq  0x55555555478a <mergeChars>
   0x00005555555548ef <+253>:   mov    0x200732(%rip),%rax        # 0x555555755028 <A>
   0x00005555555548f6 <+260>:   mov    %rax,%rdi
   0x00005555555548f9 <+263>:   callq  0x555555554620 <free@plt>
   0x00005555555548fe <+268>:   mov    0x200713(%rip),%rax        # 0x555555755018 <B>
   0x0000555555554905 <+275>:   mov    %rax,%rdi
   0x0000555555554908 <+278>:   callq  0x555555554620 <free@plt>
   0x000055555555490d <+283>:   lea    0x165(%rip),%rdi        # 0x555555554a79
   0x0000555555554914 <+290>:   callq  0x555555554630 <puts@plt>
   0x0000555555554919 <+295>:   lea    0x200700(%rip),%rsi        # 0x555555755020 <words>
   0x0000555555554920 <+302>:   lea    0x120(%rip),%rdi        # 0x555555554a47
   0x0000555555554927 <+309>:   mov    $0x0,%eax
   0x000055555555492c <+314>:   callq  0x555555554650 <printf@plt>
   0x0000555555554931 <+319>:   lea    0x2006ea(%rip),%rsi        # 0x555555755022
   0x0000555555554938 <+326>:   lea    0x121(%rip),%rdi        # 0x555555554a60
   0x000055555555493f <+333>:   mov    $0x0,%eax
   0x0000555555554944 <+338>:   callq  0x555555554650 <printf@plt>
   0x0000555555554949 <+343>:   lea    0x143(%rip),%rdi        # 0x555555554a93
   0x0000555555554950 <+350>:   callq  0x555555554630 <puts@plt>
   0x0000555555554955 <+355>:   mov    $0x0,%eax
   0x000055555555495a <+360>:   pop    %rbp
   0x000055555555495b <+361>:   retq   
End of assembler dump. 

--------------------------------------------------------------------------------------------------------------------------


==6155==    by 0x108846: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==  Address 0x522d041 is 0 bytes after a block of size 1 alloc'd
==6155==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x1087FF: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==
--6155-- REDIR: 0x4fcad20 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4c37130 (mempcpy)
A is currently: b
==6155== Invalid read of size 1
==6155==    at 0x4C32D04: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x4E99562: vfprintf (vfprintf.c:1643)
==6155==    by 0x4EA0FA5: printf (printf.c:33)
==6155==    by 0x108861: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==  Address 0x522d091 is 0 bytes after a block of size 1 alloc'd
==6155==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x108810: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==
B is currently: a
before the memory is freed:

here is the words[0] b
here is the words[1] a
Here is something with A 98
*** stack smashing detected ***: <unknown> terminated
==6155==
==6155== Process terminating with default action of signal 6 (SIGABRT)
==6155==    at 0x4E7AF47: raise (raise.c:51)
==6155==    by 0x4E7C8B0: abort (abort.c:79)
==6155==    by 0x4EC5906: __libc_message (libc_fatal.c:181)
==6155==    by 0x4F70E80: __fortify_fail_abort (fortify_fail.c:33)
==6155==    by 0x4F70E41: __stack_chk_fail (stack_chk_fail.c:29)
==6155==    by 0x1087EF: mergeChars (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==    by 0x1088EE: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
--6155-- REDIR: 0x4ed39c0 (libc.so.6:free) redirected to 0x4c30cd0 (free)
==6155==
==6155== HEAP SUMMARY:
==6155==     in use at exit: 2 bytes in 2 blocks
==6155==   total heap usage: 3 allocs, 1 frees, 1,026 bytes allocated
==6155==
==6155== Searching for pointers to 2 not-freed blocks
==6155== Checked 74,008 bytes
==6155==
==6155== 1 bytes in 1 blocks are still reachable in loss record 1 of 2
==6155==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x1087FF: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==
==6155== 1 bytes in 1 blocks are still reachable in loss record 2 of 2
==6155==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x108810: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==
==6155== LEAK SUMMARY:
==6155==    definitely lost: 0 bytes in 0 blocks
==6155==    indirectly lost: 0 bytes in 0 blocks
==6155==      possibly lost: 0 bytes in 0 blocks
==6155==    still reachable: 2 bytes in 2 blocks
==6155==         suppressed: 0 bytes in 0 blocks
==6155==
==6155== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==6155==
==6155== 1 errors in context 1 of 2:
==6155== Invalid read of size 1
==6155==    at 0x4C32D04: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x4E99562: vfprintf (vfprintf.c:1643)
==6155==    by 0x4EA0FA5: printf (printf.c:33)
==6155==    by 0x108861: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==  Address 0x522d091 is 0 bytes after a block of size 1 alloc'd
==6155==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x108810: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==
==6155==
==6155== 1 errors in context 2 of 2:
==6155== Invalid read of size 1
==6155==    at 0x4C32D04: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x4E99562: vfprintf (vfprintf.c:1643)
==6155==    by 0x4EA0FA5: printf (printf.c:33)
==6155==    by 0x108846: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==  Address 0x522d041 is 0 bytes after a block of size 1 alloc'd
==6155==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6155==    by 0x1087FF: main (in /home/ubuntu/Downloads/changearray/ifstructures/loopbyFour/mergeCharsFuncation/tryThree)
==6155==
==6155== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Aborted (core dumped)

Saturday, October 31, 2020

computer links: (oct 2020)

3 years of Computer Science in 8 minutes - Devon Crawford:
https://www.youtube.com/watch?v=ReVeUvwTGdU

Finite State Machines
https://www.youtube.com/watch?v=TpIBUeyOuv8&list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev

Data Structures: Easy to Advanced Course - William Fiset:
https://www.youtube.com/watch?v=RBSGKlAvoiM

edit, add:
https://www.youtube.com/watch?v=09_LlHjoEiY
Algorithms Course - Graph Theory Tutorial from a Google Engineer

BDSBTB 2015: Matthew Fuchs, Map/Reduce as an Example of Programming with Categories
https://www.youtube.com/watch?feature=youtu.be&v=8ejxicsBAIw

CS50 2020 - Lecture 4 - Memory (pre-release)
https://www.youtube.com/watch?v=pcbmiLUzr0w


Edit (study these):
https://www.tutorialspoint.com/data_structures_algorithms/

Edit (Nov 12)

Tutorials Point (India) Ltd. https://www.youtube.com/channel/UCVLbzhxVTiTLiVKeGV7WEBg/ . Fundamentals in a jaw dropping kind of way. I also like Geeksforgeeks from India. (https://www.youtube.com/c/GeeksforGeeksVideos/) (edited)

Maths for Programmers Tutorial - Full Course on Sets and Logic

Database Design Course - Learn how to design and plan a database for beginners

Friday, October 16, 2020

Thursday, October 8, 2020

Catagory Theory Link(s)

https://ncatlab.org/nlab/show/Grothendieck+construction

Tuesday, October 6, 2020

Links about boolean algebra, category theory,

https://ncatlab.org/nlab/show/Boolean+algebra

https://math.stackexchange.com/questions/455899/are-there-dual-logic-gates


https://ncatlab.org/nlab/show/concrete+category

Ben Eater builds a computer:
https://www.youtube.com/channel/UCS0N5baNlQWJCUrhCEo8WlA

(start by building a inverter with 2 transistors) .. you can get a clock signal with a 555 timer...

more ideas:

https://twitter.com/Brent_Shambaugh/status/1313334081615212544?s=20https://twitter.com/Brent_Shambaugh/status/1313334081615212544?s=20

Finite Autonomy Links:

https://arxiv.org/pdf/1909.02893.pdfFinite state machine category theory

https://www.tutorialspoint.com/automata_theory/moore_and_mealy_machines.htm

Making logic gates from transistors
https://www.youtube.com/watch?v=sTu3LwpF6XI

D flip-flop


https://thttps://twitter.com/Brent_Shambaugh/status/1313334081615212544?s=20witter.com/Brent_Shambaugh/status/1313334081615212544?s=20

Thursday, October 1, 2020

Functional Programming... link ... thoughts .... goals

 FP to the Max

Fun(c) 2018.7: John De Goes - FP to the Max

https://www.youtube.com/watch?v=sxudIMiOo68

Functional Programming Link (live coding session):

FP to the Min by John De Goes: Scala in the City Conference


https://www.youtube.com/watch?v=mrHphQT4RpU


Look at this and the Science of functional programming and decide when and for how long you would like to jump on the Discord Patreon to level up your skills.


Brian Beckman: Don't fear the Monad
https://www.youtube.com/watch?v=ZhuHCtR3xq8

John and Brian seem to suggest that Functional Programmers are scared of category theory. Programmers seem to be scared of the semantic web too, so it's fine. Fear is just False Evidence Appearing Real. (pg. 58, The Twelve Universal Laws of Succes, Second Edition Expanded, Herbert Harris). There may be sticking points somewhere, but it will work out somehow if it proves to be useful. :P Who knows.





Friday, September 25, 2020

Organization.

 This site is a mess. Work on chunking.

You do have main things you would like to work on like:

The Blinky Project

https://www.youtube.com/playlist?list=PLbVZNfQhcZ3eQpiBUY_0IaXPmPE5pZoOT
(finish the packaging of the message to stream it live with the cryptochip)
ultimately you are using the P256 curve with this, and having it appear in a DID document. You have Ed25519 as well, and you think it might work natively better in some cases if not for just the extra security comfort.

Satellite Link
You have a couple of links. Do you focus on LoRa, or do you focus on more frequencies? There are more links in this blog.
Like this, but for a satellite ground station instead of a 3D Printer
https://www.youtube.com/watch?v=_K63xFiI3Pk&list=PLbVZNfQhcZ3eG_nbgKbC1KKtMXlIjnEsd&index=12

Data Management
You have been looking heavily at CQL and FQL. You like the predecessor FQL because it appeared to allow for JSON import. You believe that this will help with JWT, JSON-LD, and LD-Signatures and how they can play together some way.(edit 1) To learn how to go forward breaking stuff is necessary in addition to reading. You have a lot of stuff to read, and it is good that you are a great archivist, but by failing you make progress. Do the exercises. Try category theory again and again. Review the basic premises of what makes a category. Make sure you are comfortable with groups, monoids, ring, subgroups, semigroups, magmas....there is a way that they relate. https://en.wikipedia.org/wiki/Category_(mathematics)
This starts getting into gremlin, which you will not only need to understand as a user [(https://www.youtube.com/watch?v=RkMYZcQEXOk) great start ] but also theoretically. https://www.slideshare.net/slidarko/problemsolving-using-graph-traversals-searching-scoring-ranking-and-recommendation , https://arxiv.org/abs/1011.0390 . It is good that you are reading about the theory of computation in the discrete mathematics textbook. This is a good playlist to look at because you are getting lost reading https://www.youtube.com/playlist?list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev&app=desktop . I do not know if reading the chapter before delving into the exercises is a good idea. I know you have tendency to read a lot of material before jumping in.
CQL is for ETL, mmADT is for data processing: custom programming languages/parsers for existing programming languages; various processing methods (distributed near time processing looks interesting); and various storage mechanisms: key-value stores... etcetera. These two will be merging in some way. Cayley graphs are interesting. (study william fisets data structures and graph algorithms...map back to discrete mathematics book, group theory book, abstract algebra book...etc...stay small) ... if you play with CQL or FQL for a few days, this is not sufficient, it might help.

edit1: https://medium.com/mattr-global/jwt-vs-linked-data-proofs-comparing-vc-assertion-formats-a2a4e6671d57

seeAlso: https://www.uschamberfoundation.org/sites/default/files/media-uploads/Applying%20SSI%20Principles%20to%20ILRs%20Report.pdf
(page 18-22) ====>
"JSON Web Signatures , JWT, JSON-LD
Linked Data Proofs (LD Proofs), and JSON Web Tokens (JWTs),

https://w3c-ccg.github.io/lds-jws2020/

https://w3c-ccg.github.io/ld-proofs/
https://tools.ietf.org/html/rfc7519 (JWT)
I also found: https://jwt.io/"
Also look at: https://lists.w3.org/Archives/Public/public-credentials/2020Jun/0100.html


Edit: https://www.kuppingercole.com/blog/bailey/decentralized-identity-could-become-a-reality-but-blockchain-may-not-be-a-part-of-it
like https://github.com/statebox/ ??  (interesting: https://github.com/statebox/cql

"CQL, formerly known as AQL, was developed by Statebox in collaboration with Conexus, who develop the Java version of CQL.")

https://statebox.org/news/2019/efgrant/  (statebox uses ZKP) "ethereum foundation grant"

related subgoals:
https://www.flickr.com/photos/160422661@N07/shares/3t59B7



Thursday, September 24, 2020

Cat Theory Course Links

 https://johncarlosbaez.wordpress.com/2018/03/26/seven-sketches-in-compositionality/

which lists 1-77. https://forum.azimuthproject.org/discussion/2346/lecture-77-chapter-4-the-end-no-the-beginning/p1  ...

life is a journey

blabbering w/ more links:
https://gist.github.com/bshambaugh/27b53b532ee1f6e9bf22de1616ed941c

Every time I become I librarian, I am encouraged to do the exercises. thank you for that.

Edit (book involving coq):

https://softwarefoundations.cis.upenn.edu/

Monday, September 21, 2020

To Do:

 I'm seriously planning on uncommenting the JSON parser in FQL so it appears as a menu option, and hope that it doesn't splode. It is my to do.

Sunday, September 20, 2020

Convert Binary to HexaDecimal Notes

https://www.wikihow.com/Convert-Binary-to-Hexadecimal

https://www.geeksforgeeks.org/convert-binary-number-hexadecimal-number/

Scratch ... which lets you print the hex number:

https://gist.github.com/bshambaugh/49771e74847fedd04257553ef00f7734


https://en.wikipedia.org/wiki/Binary-to-text_encoding

https://www.h-schmidt.net/FloatConverter/IEEE754.html

echo '0,1,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,1,0,0,1,1,0,0,1,1,0,0,1,0,1' | sed 's/,//g

edit compare to:
https://www.geeksforgeeks.org/program-for-conversion-of-32-bits-single-precision-ieee-754-floating-point-representation/

A Tutorial on Data Representation

Integers, Floating-point Numbers, and Characters

https://www3.ntu.edu.sg/home/ehchua/programming/java/DataRepresentation.html

----------



    https://introcs.cs.princeton.edu/java/61data/


        https://stackoverflow.com/questions/1309003/converting-from-byte-to-string

    

            https://teachwithict.weebly.com/binary-representation-of-characters.html

            I don’t know how to interpret a stream of binary that is a mix of integers, floating point numbers and characters.



                https://roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp


                    https://roubaixinteractive.com/PlayGround/Binary_Conversion/The_Characters.asp

 

------------------

https://en.wikipedia.org/wiki/Byte_order_mark


--------------


https://forum.arduino.cc/index.php?topic=172814.0

Friday, September 18, 2020

Free write / musings of why have a distributed economy

 Why do you want to build a distributed economy?
-- Less bureaucracy
Why do you want less bureaucracy?
-- People get in the way.
Will less people get in the way if you build a distributed economy?
-- I will be easier to find people (search). People will disagree, but at least they will be able to find what they want in light of what they know.

You want order in computer systems so you can have disorder in the real world.


=====================

Why do you want to build a distributed economy?
  I want to work with self-organized groups that are optimized based on interest.
Why?
  I had trouble during childhood finding like minded individuals to work with and this continued during my schooling and career.
Why?
  I know the people who want to work with me are out there, but it is not easy to find them.
Why?
  People choose careers based on fields, and often these fields do not match them perfectly. It is like choosing between small-medium-large instead of a custom fit to skills and interests.
Why?
 
Why are you using linked data?
  It allows individuals to express interrelations within their domain of interest and compare this with others in an interoperable way

Edit (5:36 AM .. sept 21st): This distributed economy project is for engineering type projects. I believe that I was originally motivated to start it due to childhood, college, and graduate school wounds inflicted by family.

Edi (9:13 AM ... sept 21st): People come and go as autonomous agents, and can be part of one or more virtual organizations. These organizations are like flash mobs. They come together for a project, and then disband when it is finished. Information is made interoperable so parts and projects can fit together like lego blocks. Value networks are used to model the contributions, so people can be compensated for their work.

Earlier writing:
"
We need a system that encourages learning and creates business and research opportunities through self-organization. The traditional model is failing us. We must go beyond the traditional model and personalize education, business, and research with self-organization, so that individuals can contribute their own ideas and work together toward common goals.
"

Why CQL?
   can I have interoperability enabled by algebra???
   The earth was the center; then the sun; then no need for center.
    -- Having a world-center provides an origin; good for coordinating.
    -- But there isn't just one best coordinate system.
    -- Each coordinate system is a perspective.
   (Read above in terms of algebra and in terms of information)

Why IoT?

Why SSI? Why do you need educational credentials? Shouldn't your work prove you did something? It is not always possible. What? To be productive?
Sometimes someone may need to learn the ropes. Like how to drive a car or a forklift.


Wednesday, September 16, 2020

Looking at assembly links and binary string to int conversion

from gdb:
"Examine memory: x/FMT ADDRESS.
ADDRESS is an expression for the memory address to examine.
FMT is a repeat count followed by a format letter and a size letter.
Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),
  t(binary), f(float), a(address), i(instruction), c(char), s(string)
  and z(hex, zero padded on the left).
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).
The specified number of objects of the specified size are printed
according to the format.  If a negative number is specified, memory is
examined backward from the address.

Defaults for format and size letters are those previously used.
Default count is 1.  Default address is following last thing printed
with this command or "print"."

I thought you might want to take a dip in assembly:
https://www.recurse.com/blog/7-understanding-c-by-learning-assembly

Yes. This is one of the best tutorials ever!
https://www.recurse.com/blog/5-learning-c-with-gdb

https://stackoverflow.com/questions/2343099/convert-binary-format-string-to-int-in-c

https://www.geeksforgeeks.org/convert-string-binary-sequence/

https://forgetcode.com/c/1852-decimal-to-binary-conversion-of-a-string

https://www.chegg.com/homework-help/questions-and-answers/write-program-c-converts-binary-string-decimal-working-q17989700







Sunday, September 13, 2020

Build out a board...??

This is fun looking, but what about having it as a single unit???


KiCAD Tutorial

https://www.youtube.com/playlist?list=PL3by7evD3F51fKkyrUbH-PCdwPCWc9F8a

From Idea to Schematic to PCB - How to do it easily!
https://www.youtube.com/watch?v=35YuILUlfGs


Schematic Design - Landing Model Rockets Ep. 4

https://www.youtube.com/watch?v=23gJY8a8rHw


PCB Layout - Landing Model Rockets Ep. 5

https://www.youtube.com/watch?v=pPqZVBFnCxk

link to program microcontroller: https://www.theonion.com/my-advice-to-anyone-starting-a-business-is-to-remember-1819585065
https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829

Make your goals easier to achieve my chunking them together. (inspired by Tony Robbin's comeback challenge and RPM method)

You can have a vision and main goals for each part, then subgoals to get each of the main goals done. Over time by solving problems and chunking them together you will find that getting your goals done is more manageable. Also spend time visualizing your goals and imagining them completed (e.g. Tony Robbin's priming) so you continue to focus on them. The world may be doing its own thing but it is your job to get your goals done. Focus your resources on your goals completion. Different people will have different things to say about your goals. None of them will be entirely right. Weigh these opinions in light of research you have completed and work you have done. If you feel like your goals are being compromised and are being steered in an entirely different direction either by your actions or actions of others do what you can to turn the rudder. When faced with forks in the road determine the pros and cons. This can be taking some sort of action, whether it is starting a project or investing some money.

Things to look at with DIDs and SSI

https://www.youtube.com/watch?v=gf2g4O3yqCc
DID Resolution - Given a DID how do I retrieve its document? Markus Sabadello


https://www.youtube.com/watch?v=Yq8yFYdCnxU

Introduction to DID Auth for SSI with Markus Sabadello


https://www.youtube.com/watch?v=Uu651GJ5YY0
leads to menu options in that appear in Legacy. One is
"FQL++ Knuth-Bendix". Un-comment the section immediately below and recompile. Try to see if this allows you to get a menu where you can input a JSON 
document. Try JSON and JSON-LD and see how @context is affected.

https://github.com/CategoricalData/FQL/blob/e7c968eaa765be92afafa03a21e203acfa10cf0c/src/main/java/catdata/fpql/XJsonToFQL.java


It looks like I can rebuild FQL with the Eclipse IDE.












Tuesday, September 8, 2020

Trying to return values in C from Array

 #include <stdio.h>

int a, b;

int main() {
   int *p;
   a = 2;
   b = 15;
   p = intToBin(a,b);
   printf("The value of the return value p is: %d\n",p);
}

int * intToBin(int a, int b) {
    while(b > 0) {
        c = b /a;
        d = b % a;
        printf("The expansion of %d is: %d * %d + %d\n",b,c,a,d);      
        b = c;
     }
 return 5;
}

This does not work.

I am trying to pull in what I have written for this:
https://www.youtube.com/watch?v=8afbTaA-gOQ

Perhaps I will check out:
https://overiq.com/c-programming-101/returning-a-pointer-from-a-function-in-c/

trying: https://www.tutorialspoint.com/cprogramming/c_return_arrays_from_function.htm

https://www.geeksforgeeks.org/how-to-return-multiple-values-from-a-function-in-c-or-cpp/

try to returning exponent and array:    ^^^^

The message I am getting from messing with this is, don't mix structs with arrays in them with pointers to structs as return types. It gets one into trouble.

can I find a functor that gets me from jwt to jsonld with cql....tab to start exploration

 Figure out how all of this fits together....

https://www.categoricaldata.net/help/index.html


https://jwt.io/ (JSON Web Tokens)


https://github.com/WebOfTrustInfo/btcr-tx-playground.github.io
(BTCR playground) , JSONLD)

Sunday, September 6, 2020

more satellite with rtl-sdr, wxtoimg, ...., link exploration

removed sdr# and mono because I am going to use GQRX

https://www.scivision.dev/sdr-sharp-ubuntu/   (Scientific Computing | SciVision)  --- reverse this....


5:31 / 30:13
APT Weather Satellite Reception with RTL-SDR, SDR#, WXtoImg, and Orbitron
https://www.youtube.com/watch?v=drliNzdtQZw

figure out how to make this work with jackaudio... on linux

https://gqrx.dk/doc/streaming-audio-over-udp

wxtoimg

stream raw audio over UDP, Record Audio

https://lucasteske.dev/2016/02/recording-noaa-apt-signals-with-gqrx-and-rtl-sdr-on-linux/

try jack audio:

https://jackaudio.org/api/index.html
https://qjackctl.sourceforge.io/qjackctl-index.html#Intro

Decoding NOAA weather satellite with RTL-SDR GQRX and WXtoimg -Tutorial
https://www.youtube.com/watch?v=bCGT6GCRjuM



https://noaa-apt.mbernardi.com.ar/


https://leshamilton.co.uk/wxtoimg.htm


https://www.rtl-sdr.com/new-noaa-apt-image-decoder/

Perhaps build a QFH antenna:

https://www.rtl-sdr.com/rtl-sdr-tutorial-receiving-noaa-weather-satellite-images/



extra:

More info on history of amateur satellites and how to track them. bookmarked time for how to track them.
https://www.youtube.com/watch?v=qgc9LxWfsxY&t=55m17s

https://gqrx.dk/doc/streaming-audio-over-udp


https://www.rtl-sdr.com/a-tutorial-on-decoding-noaa-and-meteor-m2-weather-satellite-images-in-ubuntu/

Edit Sept 23rd, perhaps PulseAudio will help connect WxToImg and gqrx??
https://oz9aec.net/radios/gnu-radio/gqrx-and-pulseaudio

Wednesday, September 2, 2020

The Things Network links

 The Things Network Part One 

https://www.youtube.com/watch?v=pAjknWIxoVA


The Things Network Part Two

Is my perception that Gremlin can query over multiple machines correct?

Brent Shambaugh  7:42 PM
From my understanding Gremlin allows for the querying over a "giant global graph" like structure using property graphs. This means that the data can be distributed amongst machines and little gremlins can run everywhere. (https://web.archive.org/web/20160713021037/http://dig.csail.mit.edu/breadcrumbs/node/215)
Brent Shambaugh  7:51 PM
ahh okay, I'm satisfied: https://docs.janusgraph.org/storage-backend/cassandra/

Trying out IEEE754 to build a 32 byte message that can be cryptographically signed.

 Decimal to IEEE 754 Floating Point Representation -- https://www.youtube.com/watch?v=faTGTgid8Uc ... I am watching this so that I can convert a floating point number to a 32 byte type uint8_t array that can be signed by a private key, and verified using a uint8_t public key. 


http://cstl-csm.semo.edu/xzhang/Class%20Folder/CS280/Workbook_HTML/FLOATING_tut.htm

Big Endian and Little Endian
https://chortle.ccsu.edu/AssemblyTutorial/Chapter-15/ass15_3.html


"Array Element Storage

As you might remember from Day 8, the elements of an array are stored in sequential memory locations with the first element in the lowest address. Subsequent array elements (thos with an index greater than 0) are stored in higher addresses. How much higher depends on the array's data type
(char, int, float, and so forth)" -- pg. 203 , Sam's Teach yourself C in 21 Days, Sixth Edition by Bradley Jones and Peter Aitken

Convert Binary to Decimal
https://www.rapidtables.com/convert/number/binary-to-decimal.html

How to return multiple values from a function in C or C++? 
https://www.geeksforgeeks.org/how-to-return-multiple-values-from-a-function-in-c-or-cpp/

This looks like an end result of what I am trying to create:
Program for conversion of 32 Bits Single Precision IEEE 754 Floating Point Representation

https://www.geeksforgeeks.org/program-for-conversion-of-32-bits-single-precision-ieee-754-floating-point-representation/

goting back:

IEEE 754 Floating Point Representation to its Decimal Equivalent

https://www.youtube.com/watch?v=LXF-wcoeT0o







Wednesday, August 26, 2020

ASR6501 for CubeCell


Link between CubeCell Module (HTCC-AB01) and ASR6501.
https://github.com/HelTecAutomation/ASR650x-Arduino

Specs provided on Amazon:

https://www.amazon.com/Heltec-ASR650x-ASR6501-CubeCell-Development/dp/B0813CYL8D

leads to:

https://www.electronicproducts.com/a-look-at-cortex-m0-and-m0-microcontrollers/
https://www.microchip.com/wwwproducts/en/ATSAML21J18B

I also found ASR6501 in a code repository:



https://github.com/asrlora/alios-asr-lora/blob/master/board/asr6501/board.h

Talking to someone tells me that since the CubeCell implements I2C in hardware then my I2C issues with getting the public key and 32 byte numbers back are in software.

On page 375 of https://www.microchip.com/wwwproducts/en/ATSAML21J18B:
Support of 100kHz and 400kHz, 1MHz and 3.4MHz I2C mode low system clock frequencies


 Wire.setClock(400000);





Monday, August 24, 2020

planning

1) The SparkFun ATECC508A does not work with the Heltec Cubecell but it does work with a Heltec LoRa WiFi ESP32. 

 
With a Heltec CubeCell I get:

inputBuffer: 43,F9,C3,6F,89,64,62,33,78,BD,C0,68,D4,BC,E0,7E,D1,7C,8F,A4,86,F9,AC,C,26,13,CA,3C,8C,30,6D,7B,1C,D3,67,17,B8,AC,5E,4F,EA,8A,D2,3D,C8,D0,78,3C,23,18,EE,4A,D7,A8,D,B6,E0,2,6A,D0,B0,72,A2,4F,64,FF,FF,

(in the script this is reflected by: "Failure to generate This device’s Public Key"

With a Heltec LoRa WiFi ESP32 I get:

inputBuffer: 43,F9,C3,6F,89,64,62,33,78,BD,C0,68,D4,BC,E0,7E,D1,7C,8F,A4,86,F9,AC,C,26,13,CA,3C,8C,30,6D,7B,B6,1C,D3,67,17,B8,AC,5E,4F,EA,8A,D2,3D,C8,D0,78,3C,23,18,EE,4A,D7,A8,D,B6,E0,2,6A,D0,B0,72,A2,4F,D8,64,


This is described more fully in
http://community.heltec.cn/t/debugging-faulty-cubecell-i2c-connection-to-cryptographic-authentication-chip-atecc508a/2300

and

https://gist.github.com/bshambaugh/07fc95c7b129a2614c6bbc2288f124b5


I believe that the Wire.h library provided with the CubeCell times  out giving the last part of the message out of order. This happens with a 64 byte public key and a 32 byte random message. (look up data out of order on I2C connections)

2) Upload the protothreading/multithreading video that you have to the Arduino thread on the YouTube website. (this is useful if you have multiple sensors going to a single ESP32)

3) interoperability of SSI
"There are 3 credential formats that are in harmony with the VC spec, that are not mutually interoperable. Until we solve that problem, cross-ledger SSI will probably not happen."
"it’s going to be easier for Sovrin to support the simple crypto of the other formats, than for the other formats to upgrade their crypto to support Sovrin-style credentials."
https://blockimpact.tech/2019/12/05/%E3%80%90hyperledger-x-tykn%E3%80%91interview-with-daniel-hardman-chief-architect-at-evernym-and-technical-ambassador-at-hyperledger/


edit see:
https://www.w3.org/TR/vc-data-model/
https://w3c.github.io/did-core/

"In practice, this means that what is needed for VC interoperability is JSON processing, along with pre-configured ‘@context’ definitions. Having dynamically resolvable contexts and doing JSON-LD processing is not strictly necessary for an interoperable VC ecosystem. However, these features may add additional semantic data capabilities that are useful for many kinds of implementations."
https://medium.com/mattr-global/jwt-vs-linked-data-proofs-comparing-vc-assertion-formats-a2a4e6671d57

Try this:
CQL channel: https://www.youtube.com/channel/UC4FSvHYsdEnLz6-dpWyzKxQ
CQL Tutorial: https://www.categoricaldata.net/tutorial.html

FQL tool: https://github.com/CategoricalData/FQL (I think it has JSON). The later CQL tool has more theory and???
https://www.youtube.com/watch?v=GizBg4M3bII&t=16m11s (Intro to Functorial Data Migration)
seeAlso: https://www.w3.org/TR/shacl/

Sovrin DID spec: https://sovrin-foundation.github.io/sovrin/spec/did-method-spec-template.html
Thread in w3cCCG: https://lists.w3.org/Archives/Public/public-credentials/2020Aug/0079.html

4) Get the cryptochip to work with a ledger. either sovrin or bigchaindb

"About DID docs with multiple keys (different curves), one of the examples I found was here: https://w3c.github.io/did-core/#example-17-various-public-keys. There is also a key type registry, which we maintain in CCG: https://w3c-ccg.github.io/ld-cryptosuite-registry/  "  -- kimhd

also understand the credentials format a little better

5) Set up an antenna for https://homeport.network/. It may be Andreas Spiess LoRa sensor video that works out the best. Messing around with a Yagi and gpredict and the standard prodcedure for talking to satellites (like on rtl-sdr) will help. see the antenna post, 1 or 2 posts ago. more complicated (https://github.com/Blockstream/satellite) .

6) any other threads you started in CCG.

7) multi-threading if you have cubecell + cubcell + .. = ESP32. protothreading and multithreading video.

for the communcation between the servers with the sensor data:
http://tutorials.jenkov.com/java-concurrency/index.html

8) see also:
https://medium.com/decentralized-identity/a-universal-resolver-for-self-sovereign-identifiers-48e6b4a5cc3c
https://medium.com/decentralized-identity/overview-of-decentralized-identity-standards-f82efd9ab6c7

https://medium.com/decentralized-identity/the-universal-resolver-infrastructure-395281d2b540

https://docs.google.com/presentation/d/1uOM6F2yArFAM42L_O9WUMHlAP_a8hZg8oTn9he8hv7I/htmlpresent


https://medium.com/decentralized-identity/overview-of-decentralized-identity-standards-f82efd9ab6c7

https://medium.com/transmute-techtalk/the-business-case-for-interoperability-a1a2b884297d

focus on 7 levels of why.

This is what you are after. (well you need to redraw it) Anything cryptochip related will be coupled on the I2C bus with the BH1750 sensor. Anything mmADT related will be between the databases.

Misc: this guy is awesome

Lecture 1: Invitation to topos theory

https://www.youtube.com/watch?v=Tz3B21zuMSw

Creating a Compiler - Bisqwit


https://www.youtube.com/watch?v=KwpcOYKfXZc&list=PLzLzYGEbdY5n9ITKUqOuRjXkRU5tMW2Sd

Algebraic Property Graphs

https://www.meetup.com/Category-Theory/events/lcmnvrybclbgb/

mmADT: a multi-model abstract data type and its connections to CT

https://www.meetup.com/Category-Theory/events/vmkkjrybckbkb/
https://gist.github.com/okram/691b0a0e306ce65ac506c9f6bc6f8e9b


https://www.youtube.com/playlist?list=PLm_IBvOSjN4zthQSQ_Xt6gyZJZZAPoQ6v

Tutorial: How to create a digital twin of your car
https://www.bigchaindb.com/developers/guide/tutorial-car-telemetry-app/


What is  monoid??
https://www.euclideanspace.com/maths/discrete/groups/monoid/index.htm

Monoids, semigroups, and friends:
https://blog.ploeh.dk/2017/10/05/monoids-semigroups-and-friends/

Magma
https://en.wikipedia.org/wiki/Magma_(algebra)

Algorithms Course - Graph Theory Tutorial from a Google Engineer
https://www.youtube.com/watch?v=09_LlHjoEiY
https://github.com/williamfiset/Algorithms
Data Structures Easy to Advanced Course - Full Tutorial from a Google Engineer
https://www.youtube.com/watch?v=RBSGKlAvoiM
https://github.com/williamfiset/data-structures