#development

1 messages · Page 187 of 1

manic forum
#

But rootless right?

visual meadow
#

Yes

reef trail
manic forum
#

Can you try it right now? If so I'll send a build

visual meadow
#

Yes

manic forum
#

It's incomplete but very much functional

manic forum
placid kraken
#

someone should make an oneko tweak

manic forum
visual meadow
placid kraken
#

does anyone here know the ins and outs of C

#

like heavy internal knowledge

#

i want to know how C stores the size of stack memory allocations in its compiler and how it expands the sizeof macro so accurately

faint timber
#

Don’t fucking play telephone with me again yung drink aceattorneyobject

placid kraken
#

and how you can pass practically anything to sizeof and itll return a valid size, as expected

faint timber
#

You made me fix a problem you had all the power to fix yourself

placid kraken
#

because if you allocate, for example, a buffer of size 16 with ints, itll allocate stack memory of 16 * 4 = 64 bytes

#

thats fine, but if you pass that buffer to another function, how do you maintain the size of the buffer even if youre just passing a pointer

#
int main() {
  int buf[16];
  other(buf);
}

void other(int *buf) {
  printf("%d\n", sizeof(buf)); // how does it know the size of buf here?????????
}
#

thats the "definition" of a fat pointer of course

#

but i want to know how C actually passes metadata like the size along with an argument to another variable

#

how i do it is to store the size as a long in the first 8 bytes of a buffer allocation on the stack and then always offset lookups and store operations by 8 bytes to account for the size long

#

but thats definitely not how C does it because it does not comply with the ABI when you, for example, pass a string literal to a C interop function

#

which now completely breaks because it isnt expecting a random gibberish 8 bytes at the start of the string

#

which is expected but i see no other way to effectively communicate this size

#

perhaps with a null byte???

vivid dew
#

well, you see, it doesn't

#

that program will print the size of a pointer

placid kraken
#

yeah i just tried this now but NOW im ever more confused

#

because i remember having an example where i accurately got the size in another function

native orbit
#

if it was a null terminated array then you can just count it that way and multiple by the object size (int)

placid kraken
#

yes but wouldnt you still need to iterate the array until you encounter a null byte

#

i dont think i want a size lookup operation to be O(n)

native orbit
#

yes

vivid dew
#

sizeof is purely compile time

placid kraken
#

but i literally had this problem for so long where i thought that C passes a fat pointer to other functions containing metadata

#

its reassuring that sizeof just returns the size of the type that the expression inside contains

#

because then i can just compile the expression inside and return the size of the type lmao

#

pointer to a value that also contains other metadata along with it

#

for example, slices in rust are fat pointers

#

thats how its defined in elle actually lmao

#

not quite a struct but a sort of typedef

vivid dew
placid kraken
#

yes

manic forum
#

C isn't really known for its great memory safety features

placid kraken
#

i dont know what the fuck happened when i tried this earlier

native orbit
#

its legit just a struct lol

vivid dew
#

actually c has a fully managed runtime

placid kraken
manic forum
#

what's that supposed to mean

#

multiplayer minesweeper?

native orbit
#

undefined behavior 🔥

placid kraken
#

you can literally have vtables and polymorphism in C

manic forum
placid kraken
#

lmao yes but its fun to reimplement C++ features in plain C

manic forum
#

i can't remember if that was the first time or the second time

cloud yacht
#

If you send it my way, I can test later today after work

manic forum
placid kraken
#

ok wait so then what do i do

buffers (static arrays included) defined in the current function return their real size
anything else is just compiled and the size of their type expression is returned?

#

is that how it works in C?

#

because if you write this

int other(char *buf) {
  printf("%d\n", sizeof(buf));
}

int main() {
  int buf[10];
  other(buf);
  
  printf("%d\n", sizeof(buf));
  return 0;
}
``` you get 8 and 40
manic forum
#

on a 32-bit system the second one will be 4

placid kraken
#

i have this fucked up analogy that for some reason it returned 40 for char * aswell and i was so confused

hasty ruin
#

Banned for minesweeper

#

1984

placid kraken
#

yes except i thought doing int buf[10] would bring a variable in scope called buf that is a pointer to an array of size 40

manic forum
placid kraken
#

how does C even do global variables

native orbit
#

or wherever you want it if you force it

placid kraken
#

because you cant define globals in the IR right

#

is it just a big vla

native orbit
#

c or asm, take it or leave it

placid kraken
#

in elle globals are literally just functions that are automatically called when theyre referenced

#

which makes them inherently constant because you cant redeclare functions

#

its less a global and more a global getter

manic forum
#

@placid kraken in C what you see is what you get, there are no autogenerated getters or fat pointers or anything like that

placid kraken
#

holy fucking shit

#

I FIGURED OUT WHY

#

IM ACTUALLY

#

ok so take this code right

#

i wrote it in a hurry to see if C returned the size correctly in another function

#

i just so happened to make the buffer size 2, so in my head the array size is 8 bytes

#

it prints 8 to the console

placid kraken
#

so i thought that it did that correctly

#

but it instead just prints the size of a long

#

so 8 bytes

#

instead of the size of an array

#

which in this case is ALSO 8 bytes

#

on my 64 bit system that is 8 bytes

manic forum
placid kraken
manic forum
#

now you know

faint timber
#

I know the ins and outs of c

placid kraken
#

i mean i guess i can say same (not really)

#

inline IR when

#

(C compiles to 15 different IRs)

native orbit
#

wen eta uint128 support

placid kraken
#

elle is clearly better than C because it has inline IR

native orbit
#

for their lang

#

found out the creator of llvm and clang also made swift yesterday :/

placid kraken
#

real!!!

manic forum
#

there was an article where someone made hello world with the main function defined as int[] main = { 0x..., ... } but I couldn't find it

native orbit
#

force it into text

manic forum
reef trail
fiery dragon
#

I have an iPad 7 that is jailbroken

cloud yacht
placid kraken
#

ok guys

#

with this source code

external fn printf(char *formatter, ...);

fn other_function(int *buf) {
    printf("2. %d, %d\n", #size(buf), #arrlen(buf));
}

pub fn main() {
    int buf[100];
    buf[0] = 123;

    printf("1. %d, %d\n", #size(buf), #arrlen(buf));
    other_function(buf);
    return 0;
}
#

is this the expected result?

#

i dont do any weird stuff by putting the size at the start of the buffer so its C ABI compliant now

#

i just store the size of it along with its type in a hashmap with a key of a temporary enum variant

#

then the compiled statement just looks up the temporary in the hashmap and sees if it has a size defined in there

#

if it does then it returns that otherwise it just returns the size of a pointer

manic forum
#

@placid kraken I don't know Rust but why is #arrlen(buf) 50?

#

Shouldn't it be 100

placid kraken
manic forum
#

Oh

placid kraken
#

but yes it should be 100 lol

#

let me see where i went wrong

#

ah i see

#

wait hmm

manic forum
#

And in other_function() arr_len should cause some kind of error

#

Because the length isn't known and cannot be known

tepid olive
placid kraken
#

yeah i was right

placid kraken
tepid olive
#

llvm or qbe?

placid kraken
#

qbe

manic forum
placid kraken
#

because #arrlen(buf) is identical to #size(buf) / #size(buf_ty)

#

they use the same underlying compilation step

#

it probably should return an error i can set that up now

#

i can just assert here

#

or actually it should be length not size

placid kraken
#
external fn printf(char *formatter, ...);

fn other(int *buf) {
    printf("(other) %d\n", #size(buf));
}

pub fn main() {
    int buf[100];
    buf[0] = 123;

    printf("(main) %d, %d\n", #size(buf), #arrlen(buf));
    other(buf);
    return 0;
}
#

better

#

and now if you try to use arrlen on a thing that isnt defined in the current function it will also crash

placid kraken
#

"test suite"

#

its literally just running all of the examples except the donuts

slim bramble
#

Is there a way to know the owner of a folder outside of the sandbox on stock iOS via an app or smth ?

slim bramble
#

Yes that’s the thing I want to do

#

I mean I could have figured the code out myself, but thanks anyways

radiant idol
#

he sends it for people like me who dont know code 👍

placid kraken
#

should defer call its deferrers on a continue expr

#

if youre continuing to the next iteration in a while loop for example

#

it calls it when you return, or call break or when the loop goes out of scope

#

but does continue take it out of scope

indigo peak
#

as long as the file youre trying to access doesn't need any special entitlements to access (i.e. from another apps bundle) this will work

radiant idol
#

it is what it is

radiant idol
#

:/

indigo peak
#

wouldn't you need something along the lines of
com.apple.private.security.container-manager or com.apple.private.MobileContainerManager.allowed

placid kraken
#

thats the way i thought of it

slim bramble
#

Tbf I only need to check the owner of a folder inside of /var/mobile/Library so containers will not be an issue

#

(And if possible something inside of /var/mobile/Containers/Shared/AppGroup)

#

I will thanks

#

Else if I’m smart enough I can pull out big gun

placid kraken
#

somehow defer already works for control flow

#

im very surprised

#

because this is a parser level operation not a compiler level operation

#

its not as if its just placing free right before a jmp call

slim bramble
#

@grave sparrow Well, answer is, apple don't allow it :(

lilac hornet
#

Hi,
Did anyone manage to build trollinstallerX?
(I know I can sideload it, I'm just testing the build and looking through the code!)
On build I get

error: redefinition of module 'XPC' cause of this file

The base file where it's defined is in ios 17.5 sdk
/iPhoneOS.sdk/usr/include/xpc.modulemap

Thanks

PS: If there's another "loader" for trollstore or dopamine I can build myself I'm interested

solar lagoon
#

use xcode 15.3 or something

lilac hornet
solar lagoon
#

i think it adds the xpc module

#

anything 15.3+ will work

lilac hornet
#

I have Xcode 15.4

solar lagoon
#

huh weird

#

i don’t know then

radiant idol
#

oh you're back?

#

nice

lilac hornet
#

Ok great, I just had to rename the module in its definition in this file facepalm
module XPC2 [system] [extern_c] {

Of course I find the solution right after asking ^^

timid briar
#

weren't there like dev videos recently released by apple that go into the basics of development? i cant find it but i remember seeing it

#

i remember seeing a video thumbnail with two people on it
world's worst description but that's all i remember lol

sonic totem
#

If you do want to build it now, drop me a DM and I’ll show you how to

sonic totem
placid kraken
#

i made Option<T> but in typescript

type Option<T> = { 
    __internal__: {
        value: T | null,
        some: boolean
    }
    unwrap(): T,
    unwrap_or(value: T): T,
    expect(message: string): T,
    is_some(): boolean,
    is_none(): boolean
}

const None = {
    __internal__: {
        value: null,
        some: false
    },

    unwrap() {
        if (this.__internal__.value === null) {
            throw new Error("Attempted to unwrap on a None variant.");
        }

        return this.__internal__.value;
    },

    unwrap_or<T>(value: T) {
        return this.__internal__.value ?? value;
    },

    expect(message) {
        if (this.__internal__.value === null) {
            throw new Error(message);
        }

        return this.__internal__.value;
    },

    is_some() {
        return this.__internal__.some;
    },

    is_none() {
        return !this.is_some();
    }
} satisfies Option<null>

function Some<T>(value: T): Option<T> {
    return Object.assign({ ...None }, { __internal__: { some: true, value } });
}

function match<T, U>(option: Option<T>, val: { Some: ((val: T) => U), None: (() => U) }) {
    if (option.is_some()) {
        return val.Some(option.unwrap());
    }

    return val.None();
}
#

the semantics are almost exactly the same

// TypeScript is smart enough to infer that this function returns Option<string>
function getSomething(input: number) {
    if (input === 3) {
        return None;
    }

    return Some("meow");
}

function main() {
    const a = getSomething(1).unwrap(); // `a` is now "string" not Option<string>
    const b = getSomething(3);

    console.log(a);

    match(b, {
        Some(val) {
            // `val` is "string" not Option<string>
            console.log(`We have ${val}!`);
        },
        None() {
            console.log("We have no value :C");
        }
    })
}

main()
lilac hornet
solar lagoon
radiant idol
#

👍

granite frigate
#

hellooooo

slim bramble
#

hellooooo

blazing warren
#

hellooooo

placid kraken
#

hellooooo

gentle grove
#

What have you done

wooden yarrow
#

kinda based tho

#

i like Rust's Option<T>

gentle grove
#

null is pretty neat

placid kraken
#

have we not learned that null is the worst thing to ever exist in a programming language

gentle grove
#

no because you are wrong

#

a well designed null is better

granite frigate
gentle grove
#

imagine needing a breaking change to RELAX your requirements (going from option back to an assured type)

#

rust moment

placid kraken
#

oh yeah actually

#

i was gonna ask but i forgot

#

is there a more efficient way to do this

external fn printf(string formatter, ...);

fn concat(int size, ...) {
    variadic args[size * #size(string)];
    defer free(args);

    string *strings = malloc(size * #size(string));
    defer free(strings);
    long length = 0;

    // Collect the strings and the final string length
    for int i = 0; i < size; i++ {
        strings[i] = args yield string;
        length += strlen(strings[i]);
    }

    string result = malloc((length + 1) * #size(char));
    int index = 0;

    // Construct the final string
    for int i = 0; i < size; i++ {
        string current = strings[i];

        for int j = 0; j < strlen(current); j++ {
            result[index] = current[j];
            index++;
        }
    }

    // Include null terminator
    result[index] = '\0';
    return result;
}

pub fn main() {
    string res = concat.(
        "‎ ‎╱|、\n",
        "(˚ˎ 。7\n",
        "|、˜〵\n",
        "じしˍ,)ノ\n"
    );

    printf("%s", res);
    return 0;
}

essentially:

  • collect the strings in an array and sum their lengths to get the size of the final string
  • malloc that size + 1 (for null byte) and presume it as a char pointer
  • go through each string and add each char to the final string
  • add the null byte
  • return the pointer to the char array
#

there has gotta be a better way than to loop through every string

#

current solution works though :3

#

for the record i do not want to use strcat because im pretty sure that basically just does the same thing lmao

#

i know that C has the weird thing where you can do "str1" "str2" and it automatically combines them but thats such weird behavior lmao

gentle grove
#

python does that I think

manic forum
gentle grove
#

that's all just compile time constructs though

manic forum
#

Like

     const char *str = "This is a very long line of text that will easily exceed "
        "80 columns.";
#

It's also useful for macros

manic forum
#

that seems very inefficient

#

and you aren't freeing it either

#

so there is a memory leak

placid kraken
#

because elle currently only allows for creating stack allocated buffers with literals only

#

i did forget to free the memory for that though lmao

placid kraken
#

so i can make it stack allocated quite easily if i change the compiler to allow parsing expressions that arent literals in the []

placid kraken
manic forum
#
#define Notification(name) "com.example.myapp/" name "Notification"

Notification("Test") // "com.example.myapp/TestNotification"
placid kraken
#

ah i see

manic forum
#

It's a common feature and I doubt it'd be too hard to implement so why not have it?

manic forum
gentle grove
#

in rust you can use a different type of quote which removes that extra whitespace in front up until the same level as the first line

manic forum
#

That sounds unnecessary

gentle grove
#

it makes the code less ugly because you don't have to throw a long many line string to the 0 line of indentation

#

and don't have to repeat the open and close quotes every line

placid kraken
#

its emitting

and x1, x1, #1048575, lsl #12
#

which fails because this isnt valid grammar

#

you have to left shift x1 before you and

#

this compiles

lsl x1, x1, #12
and x1, x1, #1048575
``` and runs fine
#

im gonna have to do some magic sed in the makefile to convert expressions that do that

wooden yarrow
#

smh couldn't C atleast have used the + like other languages

placid kraken
#

use <>

wooden yarrow
#

what

placid kraken
#

some languages like visual basic use <> for string concat

#

like "str1" <> "str2"

#

actually i think vb uses it for !=

#

but i know some language uses <> for concat

cloud yacht
#

Lua uses ..

placid kraken
#

wait what

#

OMG DISCORD

#

sorry

#

i accidentally 1984d your message because discord desktop is so fucking slow

cloud yacht
#

Litterally 1984

placid kraken
#

what did you even say lmao

cloud yacht
#

I said I liked having concat and addition as separate operators but it always threw me off when switching languages

placid kraken
#

oh

#

yeah i agree

#

at least theres some operator

#

(cough cough C)

#

i think i will use <> for concat in elle

cloud yacht
#

That seems hard to type

placid kraken
#

its not you just shift + , and shift + .

placid kraken
#

least insane "fix"

# Fix codegen issue when taking size for a buffer as an argument
$(TMP_PATH)/out.tmp3.s: $(TMP_PATH)/out.tmp2.s
    sed -E 's/and\t(.*), #(.*), lsl (.*)/lsl\t\1, \3\n\tand\t\1, #\2/g' $< > $@
#

it works tho

cloud yacht
#

Why not look at the source code for the transpiler or whatever and modify it?

placid kraken
#

idk lol

#

its a pretty small thing

#

i dont wanna have to read C code for a whole transpiler to assembly

#

stack allocated tho

external fn printf(string formatter, ...);

fn concat(int size, ...) {
    variadic args[size * #size(string)];
    defer free(args);

    string strings[size];
    int sizes[size];
    long length = 0;

    // Collect the strings and the final string length
    for int i = 0; i < size; i++ {
        strings[i] = args yield string;
        sizes[i] = strlen(strings[i]);
        length += sizes[i];
    }

    string result = malloc((length + 1) * #size(char));
    int index = 0;

    // Construct the final string
    for int i = 0; i < size; i++ {
        string current = strings[i];

        for int j = 0; j < sizes[i]; j++ {
            result[index] = current[j];
            index++;
        }
    }

    // Include null terminator
    result[index] = '\0';
    return result;
}

pub fn main() {
    string res = concat.(
        "‎ ‎╱|、\n",
        "(˚ˎ 。7\n",
        "|、˜〵\n",
        "じしˍ,)ノ\n"
    );

    printf("%s", res);
    return 0;
}
#

now back to my original question

#

is there a way to prevent needing to loop so much

#

maybe i can cache the lengths so it doesnt need to loop through the string for strlen twice

#

ok a little bit better

placid kraken
#

how does C calculate the memory address of a block scoped variable? when you do this for example

int other(int *something) {
    printf("%d\n", 0[something]);
}

int main() {
    int a = 5;
    other(&a);
    return 0;
}
#

i know it creates a stack frame

#

then variables are placed on it with an offset from the memory address of the start of the stack frame

#

but my question is more.. how do you calculate that offset

#

logically i tried to see if main + 4 worked where main is a function ptr and 4 is the size of an int

#

but that doesnt work, as expected ofc because i was pretty sure that wouldnt work

#

im assuming due to alignment issues or something maybe

placid kraken
#

for some reason the offset is 11

#

ok after doing some more analysis i figured out that it pads the current function pointer to the nearest multiple of 8 and then allocates the size of the type from that address

#

for example, the address of main is 4198761 which is not a multiple of 8, however if you do 11-4 its 7. 4198761 + 7 = 4198768 which is a multiple of 8

#

however confusingly if i declare another block scoped variable, the address offset of that is +18 instead of +15 which is what i would expected

#

because that doesnt make sense in any matter

#

as it does not cause a multiple of 4 or 8

#

oh wait it seems like i did this completely wrong

#

yeah the function code resides in a different section to the stack

gentle grove
#

that would make a lot of sense

#

because the code is in .data or whatever isnti t

placid kraken
#

no .text

gentle grove
#

close enough

#

.data is the data right

#

that makes more sense

placid kraken
#

.data is for literals like ascii constants and floating point values

#

yes

#

but i still have no idea how to get the address of any stack allocated variables lmao

gentle grove
#

oh globals

placid kraken
#

QBE doesnt provide any sort of instruction for that

gentle grove
gentle grove
#

when you make a pointer

placid kraken
gentle grove
#

idk anything much about ELF or assembly

placid kraken
#

but ill keep looking

gentle grove
#

on a scale of 1 to 11 how bad is reading clang code to try and figure out how it does stuff like that

placid kraken
#

where 11 is the worst and 1 is the best? maybe 7 but i dont really like reading assembly

gentle grove
placid kraken
#

no qbe generates straight asm

#

clang is only my assembler for it

gentle grove
#

oh i assumed you were using llvm because i didnt know what qbe was

placid kraken
#

oh

#

in llvm everything is a memory operation so that you can get around having to write SSA form (which basically has a bunch of restrictions like variables only being assignable once)

#

so getting the address of a variable becomes pretty easy iirc

gentle grove
#

what is ssa form

placid kraken
gentle grove
#

that sounds pretty neat

placid kraken
#

yeah it is

waxen prawn
#

do i learn visual stuido

gentle grove
waxen prawn
#

like ig

#

windows apps eould be cool

#

i cant type i need to enable my autocorrect

placid kraken
#

visual studio (.*) products are soooo slow

#

but i guess in w*ndows you have no choice

gentle grove
#

winodes

gentle grove
cloud yacht
#

Build a Linux app and run in it wsl

torn oriole
#

Run away as fast as you can

waxen prawn
#

:troll

#

I wanna try vs cuz like

placid kraken
#

write your program in binary like a real developer

waxen prawn
#

making interfaces and stuff seems so easy

#

and enjoyable

gentle grove
waxen prawn
#

010101001010

gentle grove
#

utf-8 is binary with meaning

#

ELF is binary with meaning

waxen prawn
#

I say we write it directly to hdd

placid kraken
torn oriole
#

Mach-O my beloved

placid kraken
#

is that better

waxen prawn
gentle grove
waxen prawn
#

want to try vs since its easy to develop with

gentle grove
#

writing elf by hand is hard

#

i dont remember how to do it

placid kraken
#

just do it lol

waxen prawn
#

everything is fucking broken

#

audio is broken

torn oriole
placid kraken
#

hydrate do u know

waxen prawn
#

desktop envs are broken

waxen prawn
torn oriole
waxen prawn
#

I want a fully working computer first tbh

placid kraken
#

oh ok lol

waxen prawn
#

this dingus archlinux with hyprass is not working

#

like my man is dying

#

it needs a format

placid kraken
#

and visual basic is just c# but for “inexperienced” devs

waxen prawn
#

uhh

#

do I do like

#

int, float, char in int main(){}

#

I dont think so

torn oriole
waxen prawn
#

cuz isnt int main() a function

gentle grove
#

c# is like fake java

placid kraken
gentle grove
#

cop

placid kraken
#

my autocorrect is gonna make me explode

gentle grove
waxen prawn
#

so I don’t do variables in function

torn oriole
#

I outofmemory’d the school exam machine during my compsci exam yesterday

placid kraken
#

should i automatically force the main function to be exported in elle even if the user doesn’t declare it as public

gentle grove
#

the parameters

#

idk what youre asking

torn oriole
placid kraken
#

because currently if you dont export the main function it kinda just won’t run anything and will fail at the assembling step lmao

waxen prawn
#

I honestly have no idea what im doing either

#

one sec

waxen prawn
#

lemme look at the w3 guide again

#

brb

tawdry trench
#

might have to learn c over summer ngl

torn oriole
#

Low and behold I lost like 10 minutes on my exam

placid kraken
#

that’s fine though surely

#

i finish all of my exams over 40 mins early for CS

tawdry trench
#

wtf

placid kraken
#

given the papers are like 1h 30m

#

gives me enough time to add extra detail to my answers lmao

#

like comments explaining why i wrote it in a specific way

placid kraken
#

this is me

gentle grove
#

deer

placid kraken
#

it’s always been like this though lmao i swear they always give us wayy too much time for those exams

#

cs paper 1 this year was only 12 pages i finished it with an hour left

waxen prawn
#

shit i hab exams

torn oriole
#

Got a 59% but a pass is a pass thishowitis

placid kraken
#

i only got a 7 for paper 1 in my mocks lmao

#

that’s about 60% iirc

sonic totem
placid kraken
#

the ones this year?

#

they were pretty easy lmao

#

the only thing i forgot was the ipv6 format i accidentally wrote the format for mac address instead

warped sparrow
#

Your super smart 😭

placid kraken
#

no i just find CS easy

#

i got a 5 in english lit lmao

gentle grove
placid kraken
#

i’m gonna continue flora and v3 development soon tho !!!!!

#

now that i’m finally done

#

i have soooo much stuff in my notes accumulated over the last few months

sonic totem
#

Got an A, 10% over the boundary, so my predicted is still an A

#

When everyone else who got an A got A* predicted

placid kraken
placid kraken
#

an A is still an A

sonic totem
#

Yeah but they hate me fr

#

Mfs said they’re gonna predict me a C in further maths

#

I said no

placid kraken
#

lmao does a lower prediction lower your chances for uni at a conditional offer

sonic totem
#

Having a ‘chat’ tomorrow

sonic totem
#

Which i can’t have

placid kraken
#

wait

sonic totem
#

Ideally I can get Astar Astar A

placid kraken
#

are you taking fm as a single a level?

#

not as an extension to maths?

sonic totem
placid kraken
#

because some unis and workplaces don’t recognise it as a full a level they consider it “half” of one

sonic totem
#

Like it’s all in the same class

#

But it’s a separate a level

placid kraken
#

we’re forced to take a level further maths as an extension to a level maths here 😔😔😔

#

which means i would be technically taking 4 a levels

#

maths, fm, cs, and physics

sonic totem
#

I did start with four

#

But dropped them

placid kraken
#

ah

#

i might drop a level physics because well it’s physics

#

might stick around for the astrophysics topics tho

sonic totem
#

I’m swapping an a level tomorrow

#

My exams are next April

placid kraken
#

didn’t even know you could do that so late into a course

sonic totem
#

You can’t trol

placid kraken
#

they told us if you wanna switch you would have to redo it as an extra year

sonic totem
#

I’m just doing it anyway

placid kraken
#

lmao insane

sonic totem
#

Nah

#

I have 8 months to do A level CS

#

It’s so over

placid kraken
#

i would’ve thought a level cs would be like the easiest a level for a person who has the developer role in the rjb server

sonic totem
#

Nah it isn’t too bad but it’s a lot to do in that time

#

With maths and further maths on the side

placid kraken
#

ah i suppose that’s fair

#

by the way how hard is fm

sonic totem
#

Hard

#

Very hard

#

Over half of my class dropped it today

placid kraken
#

i looked at the a level maths spec and it looked like a paper i can already do so i’m hoping a level fm is more of a challenge

placid kraken
sonic totem
#

It was y12 exam results day tbf

#

A lot of people took it this year and realised they don’t actually need it

placid kraken
#

do you need it if you wanna major in higher pure maths at uni

sonic totem
#

Probably

#

They would expect it

#

I don’t plan to though

#

So amen

placid kraken
#

cant wait

#

oh actually alfie while you’re here

placid kraken
#

do you maybe have any idea

sonic totem
#

I have no idea, sorry

placid kraken
#

okie ty anyway

placid kraken
#

instead of just declaring them as temporaries

#

that will require some heavy compiler restructuring so i dont think ill do that right now

#

yea but i want the memory address of stack allocated variables

#
int a = 5;
&a // literally doesnt exist
placid kraken
#

what the fuck

#

why is font book using 300mb of ram

#

what 😭

#

isnt that a little excessive github

gentle grove
cloud yacht
cloud yacht
gentle grove
#

like the email previewer

placid kraken
#

i literally use plaintext

#

always

cloud yacht
#

It's litteraly a Firefox fork

gentle grove
#

but the entire ui is gtk is it not

placid kraken
#

being gtk doesnt make it safe from memory leaks

cloud yacht
#

I mean their main ui is native I think but it is still a browser

gentle grove
cloud yacht
#

But email previews are for sure browser windows

gentle grove
#

yeah that is obviously

placid kraken
#

ive had it open for multiple days straight so if memory was leaked it had enough time to accumulate

cloud yacht
#

Even with plain text

gentle grove
#

leaking memory in any program is weak

cloud yacht
#

Hold on let me find a screenshot I took the other day

gentle grove
#

idk why memory leaks are such a common thing

#

i guess people dontk now how to write code

placid kraken
#

i blame nightwind

cloud yacht
placid kraken
#

horror

gentle grove
#

in like 2018 i had a screenshot of logitech gaming software using 54 GiB of ram

cloud yacht
# cloud yacht

I did have like 100 tabs open and I have 32GB of ram so it's not like I needed it

placid kraken
#

i have screenshots of lunar client instances of minecraft using 120gb of ram even though it was "capped" at 4.1gb

gentle grove
#

when you set Xms it sets the max ram usage of the JVM

#

so thats why it can use more than what you set, if it's using native libraries that leak stuff

placid kraken
#

lol yeah but still

cloud yacht
#

Make a Java program that launches itself with a special flag and also increases the Memory set to itself

placid kraken
#

120gb is unreasonable

#

after like 10 mins of playing

cloud yacht
#

Tbh 120gb of memory is crazy to just have

placid kraken
#

no what

#

i didnt have 128gb of ram most of it was virtual

cloud yacht
#

Oh

gentle grove
#

swap is still memory trol

placid kraken
#

trueee

cloud yacht
#

I once had a laptop where it's disk was so slow, that it actually would have benefited by using a usb flash drive for swap

placid kraken
#

I FUCKING DID IT

#
int a = 5;
int *b = &a;
printf("%d\n", b[0]);
radiant idol
#

it’s just like* C

#

yayyy

placid kraken
#

when you create a stack allocated variable it now allocates memory of the size of the variable you want to create, then stores the value at that address, then it loads the value at that address and returns it

crisp frost
placid kraken
#

however the name of the address compared to the variable name is predictable

#

so to get the address i just did this :3

crisp frost
#

sometimes i just fucking hate apple

placid kraken
#

this is why all of my devices are android 🙏

#

wait youre captinc

#

holy shit

crisp frost
#

captgoba

#

shepinc

placid kraken
#

i thought i would need a huge rewrite of the compiler to allow for that

weary heath
#

is there any way to get xcode 16 without a developer account

#

do direct dl links require auth

wooden yarrow
#

to the stack?

#

or to the heap

placid kraken
#

stack

slender glade
weary heath
#

rip

placid kraken
#

boobs

clear iron
#

oh

slender glade
#

I was just given some pure christian training by @grim sparrow thanks so much amy i appreciate ur effort in making me a more holy servant to god

grim sparrow
#

LMFAO HAHAHA

solar lagoon
slender glade
wooden yarrow
#

pure 697652394158456852 training

placid kraken
#

i almost forgot

#

i need to write a program that returns whether the stack grows upwards or downwards for the current architecture

#

i can do that now because i can get the address of stack allocated variables

grim sparrow
#

lol

placid kraken
#

do you guys know what the allocation limit is on the stack before you stack overflow

#

or is that dependent on arch and stuff

#

i see

#
fn direction() {
    int a = 1;
    int b = 1;
    return &a > &b;
}
``` this is all you need right
it’ll return true if it grows downwards and false if the stack grows upwards
#

i could also do

fn direction() {
    int a = 1;
    int b = 1;
    return &a - &b;
}

if it’s positive the stack grows downwards, if it’s negative the stack grows upwards

#

interesting i’ve never heard of that lol

#

not really

#

the address is just a number

#

oh true actually i forgot about that

#

well in the case of elle it allocates on the stack

#

i remember seeing a lll video about this a few months ago

#

maybe i should rewatch that

#

oh also i fixed an issue earlier with the declaration of stack allocated thingies

#

when declaring before, it loaded instantly and then returned that value and then never loaded again from that address

#

so if you tried to put a new value at that address the original value wouldn’t change because it was already dereferenced when first allocated

#

so now when you reference an identifier it sees if it has an address (ie it’s stack allocated) and if it does then it re-loads the value at that address

placid kraken
#

Which way does the stack grow? What even IS a stack? In this video I'll talk about an interview question that still haunts me to this day.

🏫 COURSES 🏫 Learn to code in C at https://lowlevel.academy
📰 NEWSLETTER 📰 Sign up for our newsletter at https://mailchi.mp/lowlevel/the-low-down

🛒 GREAT BOOKS FOR THE LOWEST LEVEL🛒
Blue Fox: Arm Assembly I...

▶ Play video
#

wait i think hes about to do it, im gonna guess that youre gonna take the address from 2 variables each in different functions instead of taking them from the same function

#

oh interesting hes using recursion???

#

ok well thats basically the same thing

#

this is what i meant

int a() {
    int x;
    return &x;
}

int b() {
    int x;
    return &x;
}

int direction() {
    int *A = a();
    int *B = b();
    
    return A > B;
}

int main() {
    printf("The stack is going %s\n", direction() ? "up" : "down");
    return 0;
}
placid kraken
#

I'm in foo rwar xd

#

teehee I'm in main

frail cedar
#

@timid furnace please help me im dying against launchctl

#

permissions are right as far as i know

slender glade
grim sparrow
#

lmao

slender glade
#

you TRAINED your models on those people's works

#

wtf do u mean they shouldn't have been there in the first place

grim sparrow
#

isnt that the same bitch who squirmed when the interviewer asked why they used marvel films for training

frail cedar
#

use it

#

it just goes to Application not responding

#

CLI says this

#

and then it just

#

never continues

placid kraken
#

deref exists now

external fn printf(string formatter, ...);

fn other(int *a, string *str) {
    printf("(fn other)\n\ta = %d\n\tstr = %s\n", *a, *str);
    *a = 542;
}

fn main() {
    int a = 39;
    string str = "Hello world!";

    other(&a, &str);
    printf("(fn main)\n\ta = %d\n", a);
}
#

almost C

#

just need typedefs and structs

ocean raptor
#

I’m back

#

Finally got unbanned

ocean raptor
#

Odd question for yall…

#

I have this script

#!/bin/sh
a=1
b="`command I control output of`"

if [ $a -le $b ] ; then
    echo example
fi

Is it possible to get a command injection going here?
It’s using busybox ash

cloud yacht
#

If you control the output of cmdicontroloutputoff, maybe

ocean raptor
#

As you can assume from by the name

cloud yacht
#

I'm not that familiar with bash but can't you just like add a ; afger and then whatever command

ocean raptor
#

I can definitely make the if condition fail, but I can’t seem to get it to let me execute a new command

cloud yacht
#

With some basic testing, doesn't appear to be possible

#

I'm also assuming you just control the command's output and can't just run code as it

ocean raptor
#

Correct

cloud yacht
#

Sounds like they try to prevent this kind of thing

proud geyser
#

how does one disable these

2024-06-21 22:07:19.579119-0700 PlayGround[24005:4577244] [availability] Can't find or decode reasons
2024-06-21 22:07:19.993184-0700 PlayGround[24005:4577244] [availability] Can't find or decode reasons
WebSocket Data Size: 29523 bytes```
 ios 18 errors in console
#

in xcode

frail cedar
wind ravine
#

what framework draws the lock screen clock?

cloud yacht
#

It's part of springboard

#

In timejump I hook SBFLockScreenDateView

wind ravine
#

im not finding it there

#

for ios 16+ right?

placid kraken
#

probably changes on ios 15-16-17-18

#

because the clock had a big revamp on ios16

wind ravine
#

its there on ios 15 but not ios 16+

cloud yacht
#

I think someone said my tweak works on iOS 16

#

But I don't own an iOS 16 jailbroken device

#

It also works on iOS 7

placid kraken
#

yeah then i would assume it does not work on ios 16 because the structure of the clock would have had to completely change

#

when they introduced different fonts and widgets and whatnot

cloud yacht
#

Oh I think the iOS 16 test device was an iPad which didn't change

placid kraken
#

oh

radiant idol
cloud yacht
#

Hey it's the class I was using

#

But now there's other stuff

wind ravine
#

COVERSHEET KIT

#

THATS IT

#

where are the userdefaults stored for that

radiant idol
#

¯_(ツ)_/¯

cloud yacht
#

Isn't there a new internal app for customizing the Lock Screen?

sonic totem
#

Wdym

#

PosterBoard?

slender glade
#

much like that the Photos one

#

PhotosUIServices or smth

sonic totem
#

Oh yeah

cloud yacht
#

Would it be responsible for the user defaults?

slender glade
#

Erm

#

no idea

#

u gotta just IDA it

sonic totem
#

@slender glade no actually

#

There doesn't seem to be a UI service

slender glade
#

oh?

#

what's PosterBoard.app then?

sonic totem
#

com.apple.PosterBoard, "1.0", "PosterBoard" also

#

It has its own bundle ID whatever

#

No related service on my device

slender glade
#

that could just be the framework's

sonic totem
#

No because I remember finding a way to launch PosterBoard.app itself

#

and it would just be the lock screen

slender glade
#

oh I see

#

so it's like Spotlight.app then

#

i'm super lazy so if someone could run strings on PosterBoard.app i'd appreciate it

#

I also do not have a jb device and i really do not wanna download an iPSW

sonic totem
#

hold

slender glade
slender glade
sonic totem
sonic totem
slender glade
#

^^

#

yeah absolutely not a remote VC or service

sonic totem
#

yea

slender glade
#

the only mention of a service is PBFPosterExtensionDataStoreXPCServiceGlue, and there r none of UIRemoteViewController

#

wow but that's kinda surprising

#

wait

#

so how does the Wallpaper section of settings work now?

#

oh it could just be calling the actual framework

#

im stupid lol

radiant idol
#

_OBJC_METACLASS_$__TtCs12_SwiftObject

#

sigh

slender glade
#

i have no idea how u find that disappointing at all

radiant idol
#

unhookable garbage

sonic totem
slender glade
radiant idol
#

the Swift runtime SUCKS

sonic totem
granite frigate
#

idk how yall still like developing for jb

#

💀

sonic totem
#

I will leave at some point lol

slender glade
sonic totem
#

When I'm done making public stuff

#

And probably just do iOS research privately

slender glade
kind herald
sonic totem
#

hopefully make a living from it

slender glade
#

maybe i'll maybe like, a tweak or 2

granite frigate
radiant idol
slender glade
slender glade
granite frigate
#

oh right

slender glade
granite frigate
#

wtd

#

wtf

granite frigate
radiant idol
granite frigate
#

what

slender glade
radiant idol
#

go

granite frigate
#

oh

radiant idol
#

to

granite frigate
#

ye ah

slender glade
#

i don't want to

granite frigate
#

fr

sonic totem
radiant idol
#

ok then dont

sonic totem
#

You'll make it ez too

granite frigate
#

im gonna start bricking my phones trying to figure out the 0day

sonic totem
#

What 0day

granite frigate
#

yeah what 0day

slender glade
slender glade
granite frigate
#

u2 will make it easy

#

🙏

wooden yarrow
sonic totem
#

How do I have five iPhones within 20cm of me

#

Not even planted either

wise spruce
sonic totem
#

They just be on my desk

granite frigate
#

i have 10 stored in a drawer

sonic totem
#

This is my life now

sonic totem
granite frigate
#

i might sell off all my phones

#

idk why I have like a gajillion

#

and 3 laptops

#

and 1 imac

slender glade
granite frigate
#

nah

#

😭

slender glade
#

3 laptops 1 imacs and more phones dawg

#

im getting a new phone soon inshallah

#

my new one is like

#

3/4 of the screen is black

granite frigate
#

i wanted to get into cameras and my dad just had a canon lying around

#

it's 15 years old but still

#

wtf

slender glade
#

and the other part of the screen duplicates itself but it tilts the y axis by like -20

granite frigate
#

iphone 8

slender glade
#

no it's the iphone 11 lol

granite frigate
#

oh

slender glade
#

my sister decided to make it unusable

granite frigate
#

my condolences 🙏

slender glade
crisp frost
#

We love Antoine’s iPhone 8

granite frigate
#

fr

native orbit
#

3ds goes hard af fr

slender glade
#

im legit never selling it just bc of that

crisp frost
crisp frost
slender glade
#

i felt so awful when that happened

#

if it didn't we'd have most probably actually delivered smth too

#

baseband fw got ruined

slender glade
hasty ruin
slender glade
#

you got no job

crisp frost
#

Man I still need to stay up 5 more hours

#

Till it’s 1 am

#

Will I pull this off

slender glade
#

mineek how r u still going with jb stuff

crisp frost
slender glade
#

did u not get burned out like the rest of us

sonic totem
#

@granite frigate @slender glade on my desk right now:

  • iPhone 3GS
  • iPhone 4
  • iPhone 5
  • iPhone 5S
  • iPhone 6 (x2)
  • iPhone SE (1st gen)
  • iPhone 7
  • iPhone 7 Plus
  • iPhone 8
  • iPhone X
  • iPhone 11 (x2)
  • iPhone SE (2nd gen)
  • iPhone 13
  • iPhone 14 Pro
granite frigate
#

chat should I put in more time on iOS or just focus on other areas

i def enjoy doing the whole jb/*OS development thing but it's so niche i don't think i'll get paid easily from it

sonic totem
#

My life is sad

granite frigate
crisp frost
slender glade
granite frigate
#

how big is your desk to have 10 phones lying around

#

wtf

slender glade
shrewd smelt
#

i forgot i had delete message perms here

shrewd smelt
#

if any white names want an icraze message deleted ping me i'll do it for free

slender glade
sonic totem
sonic totem
slender glade
sonic totem
#

Broken screens

slender glade
#

lol i transformed into general iOS dev from jb dev @granite frigate and that def gets money

slender glade
native orbit
#

i have like 80 iphones just chillin ontop of a mini fridge by my desk lol

granite frigate
#

man

crisp frost
granite frigate
#

how do you have 2 broken phones lying around @sonic totem

#

sell them wtf

sonic totem
granite frigate
#

just get rid of rubbish

slender glade
native orbit
slender glade
sonic totem
#

You're*

crisp frost
native orbit
#

band for band? nah ipad for ipad 💯

radiant idol
hasty ruin
sonic totem
slender glade
radiant idol
hasty ruin
#

I am not

sonic totem
#

(Almost) always recoverable

slender glade
granite frigate
crisp frost
#

@sonic totem will I be able to stay up 5 more hours

radiant idol
slender glade
slender glade
#

right

crisp frost
#

Ok Alfie :/

sonic totem
#

1 year ago today I was awake 27h

crisp frost
granite frigate
#

mf got shot at randomly

radiant idol
#

do you not know the lore

granite frigate
#

I do

radiant idol
sonic totem
slender glade
#

random stray

slender glade
sonic totem
#

But now I have my iP13 and the SE 2

#

SE 2 i got a few weeks ago

#

oh I also have five(?) iPads

sonic totem
#

Actually no

#

my iphone X is the victim phone

hasty ruin
crisp frost
#

Why does TestFlight’s UI look awfully “standard”

hasty ruin
#

He showed me

slender glade
#

"victim phone" is an incredible synonym to "test phone"

sonic totem
#

it CARRIED TrollStore 2 development

crisp frost
#

Idk how to explain

sonic totem
slender glade
#

the word is native

crisp frost
#

yeah that

sonic totem
slender glade
sonic totem
#

🙏

#

Time to restore the SE 2 and hope activation lock is gone

crisp frost
sonic totem
#

@Moderatorrs

#

Because it shouldn't actually have iCloud lock

#

I think I removed it because I had the passcode

#

But not the Apple ID password

slender glade
#

do u guys think jailbreaking an iPhone feels like stripping a woman of her clothes

slender glade
#

filter off

sonic totem
#

It's not stolen it belongs to a family member

#

and guiding them to removign activation lock via phone call was NOT happening

granite frigate
#

just like how the clothes are off

radiant idol
crisp frost
slender glade
cloud yacht
#

I had an iPad that thought it was activation locked but wasn't one time

slender glade
cloud yacht
#

Well

#

It was still useable

#

But asked for the Apple ID password

slender glade
cloud yacht
#

But the Apple ID was deleted

sonic totem
crisp frost
granite frigate
cloud yacht
#

What do you think killing a process with exit code 9 feels like?

sonic totem
slender glade
granite frigate
slender glade
#

what i though

#

WHAT

cloud yacht
granite frigate
#

WHAT

radiant idol
#

WAS NOT ME

slender glade
#

DUDE WTF

sonic totem
slender glade
#

FREAK

radiant idol
#

@torn oriole PROVE IT

cloud yacht
#

Mods can you ban nightwind

#

Just for fun

slender glade
#

we need proof

#

@torn oriole

radiant idol
#

IT WAS NOT ME

slender glade
#

idgaf we're checking who

crisp frost
#

Poor hydrate

native orbit
#

tf happened

slender glade
#

A CERTAIN SOMETHING HAPPENED

native orbit
crisp frost
#

Who deleted that

cloud yacht
#

It wasn't me because the mods don't trust me with that kind of power

crisp frost
#

That was not me

native orbit
#

check the logs troll

slender glade
#

the funny part was it staying up for like 10 secs and i was typing "just what i thought" then it got deleted

sonic totem
#

Why does my grandfather average 20h of screen time per day

radiant idol
#

say "Poor nightwind" if you were the one who deleted antoine's message

slender glade
#

don't nobody have a crush on you

native orbit
slender glade
#

i tapped out of phone addiction

cloud yacht
#

Mine is turned off

native orbit
#

im like 1-2 hours screen on but like 8 hours screenoff from music

cloud yacht
#

But it wouldn't even be accurate cause I often leave the screen on to play videos to listen to

crisp frost
cloud yacht
#

Oh it tracks music

slender glade
#

@granite frigate if u think about it, untethered jb is like unprotected sex and tethered sex is like protected sex

cloud yacht
#

Then mine would be on like all day

kind herald
#

I love ipod

radiant idol
slender glade
cloud yacht
#

True but I don't want to take my iPod to work or else I'd probably wreck it

granite frigate
crisp frost
granite frigate
#

😭

radiant idol
#

every one of your messages elicits trauma

granite frigate
radiant idol
#

to everybody.

granite frigate
#

half in

#

unprotected

slender glade
crisp frost
slender glade
cloud yacht
#

Delete this message

thorn hound
#

Delete this server if icraze

kind herald
#

hell yeah I win

#

WHAT

granite frigate
sonic totem
#

I have failed to guess my grandfather's iCloud password

kind herald
#

icraze slander

slender glade
kind herald
#

!t icloudbypass

#

:/

cloud yacht
#

Delete the below message if icraze is drunk