#development

1 messages · Page 203 of 1

granite frigate
#

why is my design so bad

#

the worse part is idk how to improve it

#

honestly why did i even bother trying to make a personal website

orchid fulcrum
hasty ruin
#

(readme changes)

indigo peak
placid kraken
#

[no ci] fixes

#

(real)

indigo peak
granite frigate
wooden yarrow
#

hm you could make a outer if statement of just if ty.is_pointer() and have the other 3 else if statements in there

placid kraken
#

true tbh

gentle grove
granite frigate
#

no I just gotta get better at design

#

i know what i want to put in it but its kinda hard to make something lookk nice

#

asdljkasdlkajsd

orchid fulcrum
#

Can you show it lol

placid kraken
vale wharf
#

have you ever went on a public github repo to take inspiration for code and you see that its obfuscated

native dune
#

No

torn oriole
#

about an eighth of the way through that swift would have said fuck this

placid kraken
#

lmfao so me

#

That is really bad if we want to compile properly because this implies the need to keep track of types. Fortunately, we don't want to compile properly

wooden yarrow
#

who decided it was a good idea to make int 32-bit on 64-bit systems smh

gentle grove
wooden yarrow
#

new arch new ints!

#

mf devs should have used stdint smhmyhead

placid kraken
#

if you want a 64 bit int just use i64 instead of i32

#

smh my head

gentle grove
#

Fr

placid kraken
#

i made format because these new string methods make it really easy to do so

#
use std/io;

fn main() {
    io::println(string::format("hello world meow {} test {}, 1 == 1 is {}", 1, ":3", 1 == 1));
}
#

and i mean really easy to do so

fn string::format(ElleMeta meta, string fmt, ...) -> string {
    variadic args[meta.arity - 1];
    string result = malloc(fmt.len());

    i32 arg = 0;
    bool is_open = false;

    for i32 i = 0; i < fmt.len(); i += 1 {
        if is_open {
            if fmt[i] != '}' {
                io::fprintf(stderr, "Invalid format at position '", string::as_string(i), "'.");
                return "";
            }

            result.extend(to_string(meta.types[arg + 1], args, false));
            arg += 1;
            is_open = false;
            continue;
        }

        if fmt[i] == '{' {
            is_open = true;
            continue;
        }

        result.push(fmt[i]);
    }

    return result;
}
#

i dont need to worry about memory because extend and push reallocate for you

wooden yarrow
#

:3

placid kraken
#

what more is there?

wooden yarrow
placid kraken
#

oh you mean like :? and stuff like that in rust?

#

or do you mean template literals

#

like format("{a}")

wooden yarrow
#

erm

#

both

placid kraken
#

well :? cant really exist because elle has no traits, therefore you cant really "implement" fmt::Display

#

but technically i can do template literals because youre provided with the expr as a string

#

or actually probably not

#

because you still need to pass the variable into the function

#

i would need to make changes in the compiler for that

#

technically

wooden yarrow
placid kraken
#

i can make this part recursive lol

placid kraken
wooden yarrow
#

what if u do c style

placid kraken
#

like %d?

wooden yarrow
#

yeah

placid kraken
#

you have io::printf

#

this is slightly different

#

because it returns a string instead of printing it

#

so i may do that ya

wooden yarrow
#

isn't it supposed to printf

placid kraken
#

no printf does print

wooden yarrow
#

oh

placid kraken
#

im talking about string::format

wooden yarrow
#

ohh

#

yeah

#

just got that

placid kraken
#

lmaoo

#

technically format doesnt need to exist because you can do this

#

however i dont like that so

wooden yarrow
#

I mean if you're going to use strings in other places

#

then you will

placid kraken
#

yeah lol thats the main reason why

#

like for example when i was doing this

#

i wanted to print what the length is

#

but thats a number

#

so i cant use .concat

#

because that accepts strings

wooden yarrow
#

i think

wooden yarrow
#

itoa

placid kraken
#

i have a really good idea

#

i will rename the printf symbol alias to __libc__printf and make printf be a sugared version of both ::format and ::print

#

because printf is just external fn printf(string formatter, ...) @alias("io::printf") -> i32;

wooden yarrow
#

that @alias be looking like gcc extensions in functions

placid kraken
#

lmaooo

#

should printf automatically include a newline at the end

#

i find it annoying that that C one doesnt

granite frigate
#

@orchid fulcrum i couldnt sleep so i bashed my head trying to make it look better

#

honestly its still p ass but idk

#

:

#

ok but ngl display grid is pretty cool

placid kraken
#

thats pretty cool lol

granite frigate
#

i never used it before

placid kraken
#

i have a single piece of advice to give

#

give your elements space to breathe

granite frigate
#

yeah

placid kraken
#

it will look a lot better

granite frigate
#

alright

#

🙏

placid kraken
#

put more space between this

#

and stuff like that

granite frigate
#

gonna add more padding

#

lfg

placid kraken
#

ya

granite frigate
#

this is the idea tho

#

im gonna go do that rn tr

placid kraken
#

pretty kyute :3

#

i think it will look good

granite frigate
#

hopefully

placid kraken
#

🙏

granite frigate
#

🙏

placid kraken
#

i did printf btw @wooden yarrow

fn io::printf(ElleMeta meta, string fmt, ...) {
    variadic args[meta.arity - 1];
    io::println(__internal_fmt(fmt, meta, args));
}
#
use std/io;

fn main() {
    io::printf("hello world meow {} test {}, bool is {}", 1, ":3", 1 == 1);
}
granite frigate
#

lfg

placid kraken
#

now comes the annoying part

#

a lot of the examples use printf

#

so i have to make them use the new format now

#

.

radiant idol
#

like swift

#
func main() {
    io::printf("hello world with bool \{1 == 1}")
}
placid kraken
#

thats what i was discussing earlier

#

doing that wouldnt be possible without changing the behavior in the compiler

#

lol

radiant idol
#

o ok

#

work on flora

placid kraken
#

soon™️

radiant idol
#

such a lie

placid kraken
#

nope

#

i will get bored of elle eventually

granite frigate
#

mfs work on compilers for fun

#

😭

placid kraken
#

:3

#

i did escaping too because format stuff usually has that

#

its just {{} instead of {}

#

another benefit of this is you can no longer segfault out of nowhere

#

if you use %s and pass an int in c printf it just segfaults

#

lol

#

with {} the compiler infers the value for you

placid kraken
#

i was gonna allow to do {int} and pass a char instead

#

but you can like

#

(i32)c

#

lol

#

this assert passes

#

thats enough programming for tonight

kind herald
#

abc escaped mrow and a car but i32:
:3 a
abc 1 true escaped mrow :3 and a char but i32: 97
result =

#

mrow :3 mrow :3

placid kraken
kind herald
#

I wish I could whip up a cupcake for you! How about I give you a recipe instead so you can bake one yourself? Here’s a simple vanilla cupcake recipe that’s sure to be delicious:
Ingredients:

1 1/2 cups all-purpose flour
1 cup granulated sugar
1/2 cup unsalted butter (room temperature)
2 large eggs
1/2 cup milk
2 tsp vanilla extract
1 1/2 tsp baking powder
1/4 tsp salt
#

The server rules prohibit me from sending the entire thing.

placid kraken
#

good enough thankies

placid kraken
#

this is totally not cursed at all

fn Node::add(Node **head, i32 data) {
    Node *new = malloc(#size(Node *));
    *new = malloc(#size(Node));

    if !new {
        return nil;
    }

    new.data = data;
    new.next = *head;
    *head = new;
}
#

(i swear C has some magic that allocates a Node at the Node * when you malloc with a struct)

#

like you can do

Node *new = malloc(sizeof(Node));
``` in C
#

at least it works ill take it

fn main() {
    Node *head = nil;

    Node::add_node(&head, 10);
    Node::add_node(&head, 23);
    Node::add_node(&head, 2);
    Node::add_node(&head, 42);
    Node::add_node(&head, 39);

    while head {
        io::print(head.data);
        head = head.next;

        if head {
            io::print(" > ");
        }
    }

    io::print('\n');
}
faint timber
#

its an an adrp no ldr references, its passed into a function, autostruct doesn't work 😦

gentle grove
gentle grove
#

Wheres the magic

#

You told it to malloc

#

Why does your code malloc twice

faint timber
robust radish
#

You’re looking for the dylib in the cache that implements that mangle function?

#

libswift_RegexParser

faint timber
#

64(ea)+32(*dword(ea))

#

= 0x329D42586

robust radish
#

that makes more sense. which firmware?

faint timber
faint timber
#

yah but obfuscation isn't really an obsticle

proud geyser
#

anyone pleaseee

grim sparrow
proud geyser
grim sparrow
#

that looks like a compiler issue lol

#

what xcode ver you using?

proud geyser
#

15 something

grim sparrow
#

interesting

proud geyser
#

the error comes up

#

on my device this

#

tho

#

when i delete a trade

grim sparrow
#

I'm gonna go out on a limb and say SwiftData moment

proud geyser
proud geyser
grim sparrow
#

Try sticking

#

@_optimize(none) on the var

#

thats my only suggestion at this point

proud geyser
grim sparrow
#

that attribute has existed for years

proud geyser
#

oh wait it worked lol

#

i mean it complies

#

idk if it still crashes or not

proud geyser
grim sparrow
#

oh well its a more detailed error

proud geyser
#

should i try it without @relationship lol

grim sparrow
#

maybe

#

alternatively try it with xcode16

proud geyser
proud geyser
grim sparrow
#

I'd try it with xcode16 now and if it still happens file a really angry feedback

proud geyser
grim sparrow
#

alongside

#

also

#

top tip

#

never use app store to get xcodes

proud geyser
#

heard its 40% lightweight off appstore

grim sparrow
#

you were lied to 😛

proud geyser
#

my mac dont have no more storage 😅

#

i need new computer fr

grim sparrow
proud geyser
hasty ruin
#

Fuck swift fuck xcode

#

👎

proud geyser
#

whats an ideal mac size to get

#

500 gigs enough?

hasty ruin
#

256 is enough on my laptop

#

just depends what you wanna do

slim bramble
proud geyser
golden horizon
#

is it possible in ida to load framework for disassembling aside my binary ?

proud geyser
olive peak
golden horizon
golden horizon
#

I'm trying to make the airplay receiver feature on macOS windowed and not fullscreen

slender glade
#

they're** sorry

wooden yarrow
golden horizon
wooden yarrow
#

hm wonder if you can use the Load -> Additional binary file to load it then

#

dont think it'll match up with the imports though

#

so YMMV

grim sparrow
golden horizon
golden horizon
#

okay it's possible with the debugger running

placid kraken
#

if i try to do the same example in elle it segfaults

#

i’m confused why C returns a node * not a node

#

i mean it makes sense because if you malloc sizeof int you get back an int * i guess

grim sparrow
#

Yeah

#

because malloc returns a ptr

#

so you've created a chunk of memory the size of the struct

#

and you now hold a pointer to the start of that chunk

placid kraken
#

ok so that’s exactly what i meant

#

Node is 8 + 4 = 12

#

it allocates a chunk of 12 bytes

#

which is what i do to allocate a stack based struct

grim sparrow
placid kraken
#

i’m getting so confused lol

wooden yarrow
placid kraken
#

i dont know

#

but i improved compiling times

#

for a file that had many duplicate imports (ie std/io imports std/string etc) it took

#

now it takes

#

thats like

#

a 30x speed improvement

#

15 / 0.5

#

:3

gentle grove
#

how the fuck did anytbing take 14 secs what

#

im impressed

placid kraken
#

basically the module importing step

#

it was recursively going through every module into its imports

#

however like, std/io imports std/libc/io and std/string imports std/libc/io

#

and stuff like that

#

there were many many duplicate imports

#

which were all being parsed

#

just to be ignored later

#

so now it only imports each thing once

#

and its

#

well

#

the speed improvement is obvious

gentle grove
#

the whole point is to put it somewhere else and get a ppinter to it

placid kraken
#

ok lemme explain why im confused

malloc is the same thing as alloca but for the heap instead of the stack, right?

well, to create a Node on the stack, NOT a Node *, you do alloca(sizeof Node) and you get returned a pointer to the start of the memory chunk you allocated

then you calculate offsets into that chunk and put things there

therefore malloc should work the same way in theory, where you malloc(sizeof Node) and you get returned a pointer to the start of the chunk you allocated

in this chunk you then calculate offsets and put things there, it is NOT a Node * because a Node is itself a pointer to the start of a chunk of memory

so im confused why, when you malloc(sizeof Node), you get a Node * not an arbitrary pointer that is pointing to the start of a chunk dedicated to a Node

#

in IR, you do

export function $main() {
@start
    %node =l alloc8 12 # i have a node allocated on the stack
    %node.data =l add %node, 8 # where 8 is the size of a ptr
    storew 4, %node.data
}
#

you dont get a node pointer you get just an arbitrary pointer to the start of the chunk of memory you allocated

#

taking the assumption that it returns a Node * instead of a Node, you would instead have something like

export function $main() {
@start
    %node.ptr =l alloc8 12 # i have a node allocated on the stack
    %node =l loadl %node.ptr # get just the start of the chunk you allocated
    %node.data =l add %node, 8 # where 8 is the size of a ptr
    storew 4, %node.data
}
wooden yarrow
placid kraken
#

but you dont do that because thats not what the stack allocation returns

#

oh it

#

breaks

#

hang on

#

discord formatting

#

there

wooden yarrow
#

oh

placid kraken
#

when you malloc(#size(Node)) you get back an arbitrary pointer to the start of the memory region allocated

#

you dont get a Node *

#

if you try to say the returned type is a Node * and put things there it segfaults because it just isnt one

wooden yarrow
#

it should work

#

that's how all programs work with malloc

placid kraken
#

nope if you do

Node *new = malloc(#size(Node));
new.data = 4;
``` it segfaults
#

if you do

Node *new = malloc(#size(Node *));
*new = malloc(#size(Node));
new.data = 4;
``` it works
#

this is why im so confused lol

placid kraken
#

elle doesnt have an operator for that it derefs automatically

gentle grove
placid kraken
#

i see Node * as a pointer to an arbitrary pointer to the start of the region you allocated

gentle grove
#

yeah

wooden yarrow
#

??

#

you should have Node **new on the first line

#

instead of just Node* new

gentle grove
#

what do you mean by arbitrary pointer

#

thats what a node* is to me

wooden yarrow
#

if you allocate for a pointer

gentle grove
#

its a pointer with information at compile time to know offsets and sizing

placid kraken
gentle grove
gentle grove
wooden yarrow
#

ok yeah bug in lang

placid kraken
#

idk im super duper confused

gentle grove
#

in c the struct is a value

#

theres no pointer

#

from the language standpoint

placid kraken
#

hmmmm

gentle grove
#

there sbouldnt even be a pointer to the stack i dont think because you dont use pointers for that

#

The compiler just knows where all the addresses are

placid kraken
#

thats

#

strange

gentle grove
#

idk what else you would di

wooden yarrow
gentle grove
#

struct is a value, just like how you wouldnt make any pointer to an int on the stack or somwthing

gentle grove
wooden yarrow
#

since structs on the stack have to be managed by ptr and offsets

#

and can't be directly managed by registers

#

but if struct is small enough then it can be

placid kraken
#

the way i learnt it is you alloc stack memory of the size of the struct, you get a pointer to the start of that chunk, then you calculate an offset into that chunk based on the members in the struct and their type sizes, and then you store and load data at that address

placid kraken
wooden yarrow
gentle grove
placid kraken
#

sugaring

gentle grove
#

you dont expose that in thw language

wooden yarrow
#

you could choose to

#

and make structs in reg vs stack explicit too

placid kraken
#

ok here look

#

look

wooden yarrow
#

but for convenience purposes

#

they dont

gentle grove
#

that would be wrong

placid kraken
#

this c code

typedef struct {
    void *next;
    int data;
} Node;

int main() {
    Node node = {0};
    return 0;
}
#

it compiles into this llvm ir

target triple = "arm64-apple-macosx13.0.0"

%struct.Node = type { i8*, i32 }

define i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Node, align 8
  store i32 0, i32* %1, align 4
  %3 = bitcast %struct.Node* %2 to i8*
  call void @llvm.memset.p0i8.i64(i8* align 8 %3, i8 0, i64 16, i1 false)
  ret i32 0
}

declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
wooden yarrow
#

ok

placid kraken
#

notice the alloca %struct.Node lol

#

it allocates stack memory of the size of the node

wooden yarrow
#

yes

placid kraken
#

and then calculates offsets

#

its still a pointer lol

wooden yarrow
#

making it look as though it's by value

placid kraken
#

yep

#

:3

gentle grove
wooden yarrow
#

which makes sense since stack is faster than accessing heap

gentle grove
#

that was my point

#

Its nothing special to do with struct

wooden yarrow
#

oh yeah obv

#

you could put anything on stack

#

considering it can fit

placid kraken
gentle grove
#

like this isnt an exclusively struct related issue

wooden yarrow
#

it's literally just a chunk of data given to you

placid kraken
#

for a struct it passes the pointer itself

#

it doesnt load

gentle grove
#

in other words its a skill issue

placid kraken
#

because you then load after calculating an offset into a struct lol

gentle grove
placid kraken
#

sure

#
void other(int a) {
    volatile int b = a + 1;
}

int main() {
    int a = 5;
    other(a);
    return 0;
}
target triple = "arm64-apple-macosx13.0.0"

define void @other(i32 %0) {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  store i32 %0, i32* %2, align 4
  %4 = load i32, i32* %2, align 4
  %5 = add nsw i32 %4, 1
  store volatile i32 %5, i32* %3, align 4
  ret void
}

define i32 @main() {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  store i32 0, i32* %1, align 4
  store i32 5, i32* %2, align 4
  %3 = load i32, i32* %2, align 4
  call void @other(i32 %3)
  ret i32 0
}
``` it loads the value and passes it
#
typedef struct {
    void *next;
    int data;
} Node;

void other(Node a) {
    volatile int b = a.data + 1;
}

int main() {
    Node node = {0};
    other(node);
    return 0;
}
target triple = "arm64-apple-macosx13.0.0"

%struct.Node = type { i8*, i32 }

define void @other([2 x i64] %0) {
  %2 = alloca %struct.Node, align 8
  %3 = alloca i32, align 4
  %4 = bitcast %struct.Node* %2 to [2 x i64]*
  store [2 x i64] %0, [2 x i64]* %4, align 8
  %5 = getelementptr inbounds %struct.Node, %struct.Node* %2, i32 0, i32 1
  %6 = load i32, i32* %5, align 8
  %7 = add nsw i32 %6, 1
  store volatile i32 %7, i32* %3, align 4
  ret void
}

define i32 @main() {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Node, align 8
  store i32 0, i32* %1, align 4
  %3 = bitcast %struct.Node* %2 to i8*
  call void @llvm.memset.p0i8.i64(i8* align 8 %3, i8 0, i64 16, i1 false)
  %4 = bitcast %struct.Node* %2 to [2 x i64]*
  %5 = load [2 x i64], [2 x i64]* %4, align 8
  call void @other([2 x i64] %5)
  ret i32 0
}
``` in the case of this it allocates a new struct on the stack im not sure what llvm is doing there
#

maybe thats the "pass by value" sugaring

#

actually yeah thats probably it

#

when you pass a struct by value to another function it doesnt pass the pointer to the start of the struct

#

it copies all the values into an array

#

passes them to the other function

#

constructs a new struct

#

and loads them into that

#

thats

#

an interesting way to do it lmao

placid kraken
#

the IR is right there lol

placid kraken
#
call void @other([2 x i64] %5)
#

it reconstructs a new one and populates it

wooden yarrow
#

oh wait makes sense

#

pass by value so it can't affect

wooden yarrow
#

wtf happens when the struct is huge

#

does it still copy

placid kraken
placid kraken
wooden yarrow
#

make a huge struct

#

yeah

#

which makes sense

#

i think

placid kraken
#

is it like

#

promoting each value in the struct into the largest primitive type in the struct

#

because its promoting the i32 into i64 when passing it to other

#

oh true

wooden yarrow
#

i mean what else would you do then

#

because pass by value structs are also mutable

placid kraken
wooden yarrow
#

wtf happens when a struct is a bitfield

placid kraken
#

and it doesnt modify the value

#

it is cloned in between somehow

wooden yarrow
#

surely look at IR

placid kraken
#

yeah its just passing the pointer

#

i did

wooden yarrow
#

there's no way IR sugars too right

placid kraken
#

perhaps

#
use std/io;

struct Foo {
    i32 a;
};

fn Foo::set_a(Foo self, i32 a) {
    self.a = a;
}

fn Foo::set_a_mut(Foo *self, i32 a) {
    self.a = a;
}

fn main() {
    Foo foo = Foo { a = 10 };

    foo.set_a(2);
    io::printf("1. a is {}", foo.a);

    foo.set_a_mut(2);
    io::printf("2. a is {}", foo.a);
}
``` consider
wooden yarrow
#

r u sure it's passed by reference

placid kraken
#

i changed it slightly to not import std/io as that brings a bunch of extra things into the namespace so

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

struct Foo {
    i32 a;
};

fn Foo::set_a(Foo self, i32 a) {
    self.a = a;
}

fn Foo::set_a_mut(Foo *self, i32 a) {
    self.a = a;
}

fn main() {
    Foo foo = Foo { a = 10 };

    foo.set_a(2);
    printf("1. a is %d\n", foo.a);

    foo.set_a_mut(2);
    printf("2. a is %d\n", foo.a);
}
``` this produces the same result
#

and this

type :ElleMeta = { l, l, w, l }
type :Foo = { w }
data $main.14 = { b "1. a is %d\n", b 0 }
data $main.19 = { b "2. a is %d\n", b 0 }
function w $Foo.set_a(:Foo %self.2, w %a.3) {
@start
    %offset.4 =l add %self.2, 0
    storew %a.3, %offset.4
    ret 0
}
function w $Foo.set_a_mut(l %self.5, w %a.6) {
@start
    %load.7 =l loadl %self.5
    %offset.8 =l add %load.7, 0
    storew %a.6, %offset.8
    ret 0
}
export function w $main() {
@start
    # size of :Foo
    %struct.10 =l alloc8 8
    %offset.11 =l add %struct.10, 0
    storew 10, %offset.11
    %foo.addr.12 =l alloc8 8
    storel %struct.10, %foo.addr.12
    %foo.9 =l loadl %foo.addr.12
    %main.res.13 =w call $Foo.set_a(:Foo %foo.addr.12, w 2)
    %foo.9 =l loadl %foo.addr.12
    %offset.15 =l add %foo.9, 0
    %field.16 =w loadw %offset.15
    %main.res.17 =w call $printf(l $main.14, ..., w %field.16)
    %foo.9 =l loadl %foo.addr.12
    %main.res.18 =w call $Foo.set_a_mut(l %foo.addr.12, w 2)
    %foo.9 =l loadl %foo.addr.12
    %offset.20 =l add %foo.9, 0
    %field.21 =w loadw %offset.20
    %main.res.22 =w call $printf(l $main.19, ..., w %field.21)
    ret 0
}
#

see how in set_a its passing :Foo %foo.9

#

in set_a_mut its passing l %foo.addr.12

#

and in set_a it takes in :Foo %self.2

#

and in set_a_mut it takes in l %self.5 and derefs it to get the :Foo at that address

#

(ignore the extra loadl in main lmao i still need to get rid of those)

#

fyi it allocates 8 bytes for the struct even though it only has a 4 byte value because it aligns to the memory address space when calculating its size

placid kraken
#

for now its only inline IR but i can do inline asm at some point yeah

#

true,,,

#

amd64_sysv, amd64_apple, arm64, arm64_apple, rv64

#

oh

#

not the second part lol

wooden yarrow
#

what the hell why would you do the 2nd one

placid kraken
#

lmfaooo

#

ideally if i let you do inline asm it would be fasm or something

wooden yarrow
#

why does zefram need that

#

what

placid kraken
#

flat assembler

#

very tiny assembly language

#

written in itself

wooden yarrow
#

i need a ELI5

#

zefram shell code is.... x86_64?

#

on an arm64 machine

#

⁉️

#

what the hell

#

why would u not just write arm64 seperately

#

wait is this only to do with rosetta

#

and not for native things

#

ok that makes more sense

placid kraken
#

i actually compile my programs to exe using mingw first and then i use wine to run them, but if you wanna contribute you need to pacman -S mingw-w64-x86_64-toolchain base-devel mingw-w64-x86_64-gtk4 mingw-w64-x86_64-gettext mingw-w64-x86_64-libxml2 mingw-w64-x86_64-librsvg mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gcc mingw-w64-x86_64-libadwaita mingw-w64-x86_64-lua

#

zefram is also a build tool?????????

#

no way

wooden yarrow
#

why would u compile to windows

placid kraken
#

because windows is OBVIOUSLY the best platform

wooden yarrow
#

wait do u main windows

#

and use it to code elle

#

💀

placid kraken
wooden yarrow
#

.

#

i am confused

placid kraken
#

it was sarcasm lmao

#

windows sucks

wooden yarrow
#

what's the part about mingw

#

.

placid kraken
#

idk i saw how fucking long build commands are when building a c codebase for windows that i thought it would be funny to post it

wooden yarrow
#

😭

#

elaborate ass joke

placid kraken
#

😭

placid kraken
#

i just realised this is technically legal code

wooden yarrow
#

wtgf

visual meadow
#

anyone know wtf this crash means

#

its not happening to me im lost

kind herald
#

looks like something crashed

visual meadow
#

no rreally

wooden yarrow
# visual meadow no rreally

crash thread

Thread 4 name:   Dispatch queue: SubscriberUtility
Thread 4 Crashed:
...
3   CommCenter                               0x102f74a7c 0x102f6c000 + 35452
4   CommCenter                               0x1031531f8 0x102f6c000 + 1995256
5   CommCenter                               0x103153e00 0x102f6c000 + 1998336
6   CommCenter                               0x103153368 0x102f6c000 + 1995624
7   libTelephonyUtilDynamic.dylib            0x1a207af40 ctu::RestModuleState::handleNotifyMessage(ctu::llvm::StringRef, xpc::object const&) + 184
8   libTelephonyUtilDynamic.dylib            0x1a207b310 ctu::RestModuleState::handleNotifyMessage(xpc::object const&, xpc::object const&) + 136
9   libTelephonyUtilDynamic.dylib            0x1a207bd88 ctu::rest::RestConnectorDelegate<ctu::RestModuleState>::handleNotifyMessage(xpc::object const&, xpc::object const&) const + 72
10  libTelephonyUtilDynamic.dylib            0x1a207b4a4 bool ctu::rest::RestConnector::visitIfNotifyMessage<std::__1::shared_ptr<ctu::rest::RestConnectorDelegateBase>>(xpc::dict const&, std::__1::shared_ptr<ctu::rest::RestConnectorDelegateBase>) + 184
11  libTelephonyUtilDynamic.dylib            0x1a20cf864 void dispatch::async<void ctu::rest::RestDispatchConnector::execute<ctu::rest::RestDispatchConnector::handleMessage(xpc::dict) const::$_5>(ctu::rest::RestDispatchConnector::handleMessage(xpc::dict) const::$_5&&) const::'lambda'()>(dispatch_queue_s*, std::__1::unique_ptr<ctu::rest::RestDispatchConnector::handleMessage(xpc::dict) const::$_5, std::__1::default_delete<ctu::rest::RestDispatchConnector::handleMessage(xpc::dict) const::$_5>>)::'lambda'(void*)::__invoke(void*) + 64
...
#

what's at 0x102f6c000

#

in CommCenter

visual meadow
#

let me check

#

how would i get the file offset from that btw

#

cause

#

the crash isnt happening to me

faint stag
#

don't ask me why i did this clueless

wooden yarrow
#

i think

#

wait actually

#

no

#

35452 is the offset

#

from the file start

visual meadow
#

ohok

torn oriole
#

hopper user PointAndLaugh

visual meadow
wooden yarrow
#

because that's already exception handle

#

go to a trace above

#

say 1995256

visual meadow
#

by the way if it matters im modifying the binary to arm64

#

from arm64e

wooden yarrow
#

lmao

#

could've just asked

#

smh

visual meadow
#

please send me it

#

if it does more than modify the header at least

#

does it do more

wooden yarrow
visual meadow
#

good enough for me

#

please send in dms

wooden yarrow
#

well not remove, but replace

#

.

visual meadow
#

with nop id assume

wooden yarrow
#

others, no

#

proper replace

#

with right ins

#

n

visual meadow
#

please send in dms

#

i need

wooden yarrow
#

lemme find

sonic totem
wooden yarrow
#

just wait a bit bro

visual meadow
#

ty

wooden yarrow
visual meadow
#

people are complaining

#

because commcenter etc isnt working

#

no cellular

sonic totem
wooden yarrow
faint stag
sonic totem
#

Is the tool OSS btw

#

I actually wanna see the code

wooden yarrow
#
// if by any chance you received this file without my (@plzdonthaxme's) permission, please delete it immediately and report back to me. thank you
// Copyright 2023 plzdonthaxme, All Rights Reserved
#

i sent this to some other people for unrelated reasons

wooden yarrow
#

atleast on macOS if i put this on a arm64e slice it works fine

wooden yarrow
#

smh my head

sonic totem
#

Oh it’s Rust?

#

Nevermind then, I take back my request

kind herald
#

can I keep it

wooden yarrow
#

:3

faint stag
faint stag
#

oh wait nvm

placid kraken
#

is this too fancy

#

i had to make it slower on purpose to see the yellow and red parts lol

gentle grove
gentle grove
#

thats the part im more scared about

#

you could definitely shrink it by just showing "Imported ..." and removing the ones that say "Importing ..."

placid kraken
placid kraken
#

this is like how long it actually took

gentle grove
#

oh

ocean raptor
#

Aemulo has moved to Havoc

torn oriole
ocean raptor
#

What’s up with chariz?

torn oriole
ocean raptor
#

I meant like why did aemulo move?

indigo peak
torn oriole
#

o

ocean raptor
#

Chariz only supports pp?

#

That’s gay

#

||get it? Cause pp?||

pearl sail
#

Shut up stupid cat

placid kraken
#

LMAO

torn oriole
#

Lmfao 😭😭😭

granite frigate
#

Lmak

kind herald
#

Rofl

gentle grove
granite frigate
#

marquee 😭

tepid olive
#

has anyone gotten Lumen working on IDA 9

gentle grove
#

no

#

they didnt delete it

#

its just not accessible on apple devices for some reason??

tepid olive
#

why is it locked behind IDS

gentle grove
#

whats ids

#

is that what it is

tepid olive
gentle grove
#

if i sign in then it just 404's

#

but on non apple devices it works fine even without signing in

torn oriole
#

weird

tepid olive
quaint rain
frank fossil
vale wharf
#

how can i make a flex patch and export it as a dylib?

vale wharf
#

no i hate having to setup the enviorment

#

for tweak development

#

time to pay another. 50 dollars to some developer because i need custom colors on a stupid app lmao

#

you dont even have the app

#

its called aeries my school uses it for grading

#

ive spent 300 dollars in the past week getting tweaks for snapchat tiktok and instagram

#

lmao

#

i cant even figure out how to open flex

#

i got the flex anywhere and it wont even work

#

yup

#

(i got no idea what ur talking about but yeah)

#

is Flexing the ttweak i can use to open flex on any app?

#

shi not working

#

sigh

wooden yarrow
wooden yarrow
placid kraken
#

horror

grim sparrow
#

are they going after people who added ida 9 sdk support now?

wooden yarrow
#

eh prob not

olive peak
#

Why do so many ppl use hopper and not binja on mac?

wooden yarrow
#

some of these people are actual license holders so

wooden yarrow
tribal depot
#

I’m working on my first tweak (trying to make an adblocker for tumblr), if I just force the app to think the user has TumblrAdFree would I be able to OSS it?

#

idk the limits of open sourcing stuff

grim sparrow
#

and maybe just doesnt have the same attention online?

tribal depot
grim sparrow
#

I've had a binja license for 2.5 years now, the only reason I've stopped using it recently is IDA 9

#

:3

tribal depot
#

wait did IDA pro 9 just fully leak

wooden yarrow
#

yeah

tribal depot
#

license and all

grim sparrow
#

yeah

#

kinda

tribal depot
#

wtf

olive peak
grim sparrow
#

the goobers leaked an unlicensed build

wooden yarrow
tribal depot
grim sparrow
#

yeah lol

wooden yarrow
grim sparrow
#

they leaked all of it

tribal depot
#

lesgo

grim sparrow
#

like

tribal depot
#

i’m gonna find a copy

#

any good sources?

grim sparrow
#

all platforms, all decompilers, sdks and extensions

#

Check your local online library

tribal depot
#

yup

#

:3

wooden yarrow
#

but search around

#

ig

tribal depot
#

yeah

#

when did it leak?

olive peak
olive peak
wooden yarrow
#

new

grim sparrow
#

its existed for a long time but still gets updates

#

its version v9.0.0.240807 rn

wooden yarrow
#

god i think i'm going to explode if i have to use a non-mac version of IDA again a few months later

grim sparrow
#

hopefully they continue to leak builds

#

🙏

wooden yarrow
#

hopefully HexRays just goes "fuck it"

olive peak
#

i like binjas ui more though so ill stick to it also i like the scripting api better

wooden yarrow
#

imagine if they offered a price actually competitive to binja

#

that would be so goated

olive peak
grim sparrow
#

for students / personal sure

wooden yarrow
olive peak
grim sparrow
#

god damn

wooden yarrow
#

damn

olive peak
#

they also released their ai thing but its a bit expensive

grim sparrow
#

the base address scan looks so hot

tribal depot
#

btw how does ida pro compare to ghidra?

#

I know it’s the best excluding price but how does it compare in usage?

tribal depot
#

is ida pro meant to only be like 500mb

sonic totem
grim sparrow
tribal depot
wooden yarrow
tribal depot
#

wrote a nixos override for ida pro 9

sonic totem
pearl sail
placid kraken
#

where do things install their stdlib?

#

im installing mine in /usr/local/include/elle/std but idk if thats right

#

paired with /usr/local/bin/ellec

#

and another overengineered menu lol

gentle grove
olive peak
#

Does anyone know how i can check if an address is valid for ios?

native orbit
#

valid in what way? like if its mapped or if you can write to it?

visual meadow
#

if a parent process spawns a child process, and the parent has JIT, will the child inherit jit?

olive peak
orchid fulcrum
#

Maybe by making the parameter (id)

placid kraken
#

nvm i guess /usr/local/include will do for now lol

slender glade
wooden yarrow
#

union or enum

#

prob enum

#

*tagged enums, not exactly sure objc has them but

slender glade
slender glade
wooden yarrow
#

damn

slender glade
#
enum NSOutputWhateverType { 
  NSBlahBlahFileHandle,
  NSBlahBlahPipe,
}

typedef union NSOutputWhatever {
  NSOutputWhateverType type;
  NSFileHandle *handle;
  NSPipe *pipe;
}
#

@wooden yarrow or better yet could've used a protocol lmao

wooden yarrow
#

true..

placid kraken
#
typedef NS_ENUM(NSInteger, MyEnumType) {
    MyEnumTypeCase1,
    MyEnumTypeCase2,
    MyEnumTypeCase3
};

typedef union {
    int intValue;
    float floatValue;
    char *stringValue;
} MyEnumAssociatedValues;

typedef struct {
    MyEnumType type;
    MyEnumAssociatedValues values;
} MyTaggedEnum;
``` maybe
wooden yarrow
#

if the thing doesn't need to hold the value itself the whole MyEnumAssociatedTypes could just be an void* I think tbh

#

and have the programmer check for the enum and cast to correct

#

or sumn

placid kraken
#

yeah true

timid furnace
#

this is a waste of time

wooden yarrow
#

ok but have u considered

#

funny

timid furnace
#

if [abc isKindOfClass:pipe]
NSPipe* pipe = (NSPipe*) abc

#

you already have a good built in way to check

wooden yarrow
#

.

timid furnace
#

wtf you mean "runtime enum variant checking"

#

it is runtime checking the type

#

profit

wooden yarrow
#

I love moving everything to runtime!

timid furnace
#

well its objective c

#

what did you expect

wooden yarrow
#

true...

timid furnace
#

polymorphism exists for a reason

native orbit
#

just cast everything with no checks thumbsUp

wooden yarrow
#

average c developer

#

"hmm yes today I will convert this int into a struct pointer"

placid kraken
#

fdopen((FILE *)(**(int*)*(int**)&foo))

#

perfect

native orbit
#

just do a *(i32 *)a = 100 trol

placid kraken
#

totally surprised

olive peak
orchid fulcrum
#

Just found out about SF Symbols app while doing research about how to make a resume button (the triangle one). Is it something you guys use often

placid kraken
#

yeah lol

#

the issue is that sometimes the sf symbols may not exist for your ios version so you need to make sure you have the right sf symbols app

#

but if youre on latest ios you should have all of them

#

its a C compiler made in very restricted ocaml

native orbit
placid kraken
#
bool is_addr_valid(void *addr) {
    uint8_t data = 0;
    size_t size = 0;
    int kr = vm_read_overwrite(mach_task_self(), (vm_address_t)addr, 1, (vm_address_t)&data, &size);
    return kr != KERN_INVALID_ADDRESS && kr != KERN_MEMORY_FAILURE && kr != KERN_MEMORY_ERROR;
}
#

de morgan's law

#

:3

native orbit
#

not guaranteed results, if you have something that isnt null but might be unmapped its best to just treat it as if it is null

olive peak
#

Sadly i cant do that in my case

native orbit
#

is the value like an arg or something from a hook?

olive peak
#

No but im looping through a big array and sometimes a pointer inside of it isnt valid but still there

native orbit
#

ah, it might work but if the pointers are pointing to heap memory they might have different things allocated to them, so it will return valid

olive peak
#

Thanks though ill try it now

indigo peak
native orbit
olive peak
#

But usually the package just gets lost and doesnt get received anywhere

wooden yarrow
slender glade
#

no but I know that I do a lot of disgusting stuff

wooden yarrow
#

actually can u look up page tables to see mapping

slender glade
#

in code

indigo peak
granite frigate
#

i just realised i have no projects to show on my website 🔥

#

shit

wooden yarrow
#

that's atleast gotta be worth sumn right

granite frigate
#

i don't contribute much

#

eihter

#

so hmm

wooden yarrow
#

oh

#

so what do you do

granite frigate
#

rot in bed

wooden yarrow
#

boyrot 😔

indigo peak
native orbit
orchid fulcrum
granite frigate
#

it's one thing

#

i should code more

indigo peak
#

I have jellyfish reborn, but that’s closed source

#

other than that, I don’t really got anything

sonic totem
#

I have: CTv2

orchid fulcrum
indigo peak
#

write up, reverse engineering, large user base

indigo peak
#

nah id get flamed based off the methods i hook and how everything’s implemented

#

just to put it into perspective: I hook my own class

native orbit
#

bro

indigo peak
#

so instead of just editing my classes method, I hook it

orchid fulcrum
#

💀

indigo peak
#

So the hook is in the scope of the bool

native orbit
#

real

indigo peak
#

and the original implementation isn’t

#

Simple as that ngl

placid kraken
#

😭

sonic totem
#

And user base is for TS not the exploit itself

#

All I did was diff the bug and exploit it

granite frigate
#

you helped with choma that's def a project

sonic totem
#

True true

#

I was hoping Apex would help out

native orbit
#

got tix as well

granite frigate
#

tix is goated

native orbit
#

and that checkm8 thing i forgot the name of

granite frigate
#

achilles

sonic totem
#

TIX is getting a rewrite

sonic totem
native orbit
sonic totem
#

Perhaps hm

orchid fulcrum
#

Here is my "masterpiece" i can't even figure out how to add the 5th row rn 💀

harsh junco
#

Can I bind mount /var/jb to /? frcoal

fading shell
#

You can

#

Will break your ssv seal though and bootloop you

#

(If you mounted / as r/w before)

harsh junco
fading shell
#

Because tweaks can only read from /

#

#bot-commands message

This is what [[Cement]] does btw

visual meadow
#

Hey does anyone know how i would figure out what helper application its exactly complaining about

Failed to fetch metadata for Highlight <m4dT+6tstRXRJqLmbvpd+7CB4SMmaYhVFpba6Yvni0U=>: Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application."```
wooden yarrow
#

a helper application

#

duh

visual meadow
wooden yarrow
#

or log sumn

visual meadow
wooden yarrow
#

where it logs that

#

?

visual meadow
#

default 18:23:01.548994-0400 suggestd PPSocialHighlightStorage: Social highlight: m4dT+6tstRXRJqLmbvpd+7CB4SMmaYhVFpba6Yvni0U= attributions deduplicated to 1 items default 18:23:01.817159-0400 suggestd PPSocialHighlightStorage: Social highlight: m4dT+6tstRXRJqLmbvpd+7CB4SMmaYhVFpba6Yvni0U= attributions deduplicated to 1 items error 18:23:06.116517-0400 MobileSafari Failed to fetch metadata for Highlight <m4dT+6tstRXRJqLmbvpd+7CB4SMmaYhVFpba6Yvni0U=>: Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." default 18:23:06.118896-0400 MobileSafari Received feedback for highlight: m4dT+6tstRXRJqLmbvpd+7CB4SMmaYhVFpba6Yvni0U= with type: 0 from client: 'com.apple.mobilesafari' variant: '' default 18:23:06.144704-0400 suggestd PPSocialHighlightServer: feedbackForHighlight: m4dT+6tstRXRJqLmbvpd+7CB4SMmaYhVFpba6Yvni0U= type: 0 client: 'com.apple.mobilesafari' variant: ''

visual meadow
#

what do i look for

#

in the debugger

#

to solve this predicament

wooden yarrow
visual meadow
#

look in your dms

#

i sent disassembler screenshots of where it is

wooden yarrow
#

oh that

#

uhhh

#

no that won't do

#

need to find inner error

visual meadow
#

like xref

wooden yarrow
visual meadow
#

like

#

like this?

wooden yarrow
#

bro i cant see any strings there

#

💀

#

average hopper experience

indigo peak
wooden yarrow
visual meadow
indigo peak
visual meadow
wooden yarrow
visual meadow
#

it doesnt show up in the psuedo code idk

#

nvm

#

disregard

visual meadow
wooden yarrow
#

where argument now

#

.

visual meadow
#

bro waht

visual meadow
wooden yarrow
#

need to find Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." message origin

#

ig

visual meadow
wooden yarrow
#

but seems to be stored in some objc shit

#

in ram

#

guh

visual meadow
#

do i lldb then

#

what to do

wooden yarrow
#

sure

#

breakpoint there and check with lldb

#

i

#

g

visual meadow
#

lol,

#

im attached tho

#

where exactly would i bp

#

at the error?

wooden yarrow
visual meadow
wooden yarrow
visual meadow
reef trail
#

with lldb

#

?

visual meadow
#

i know nothing aboiut lldb

#

lkol

wooden yarrow
#

the problem is, i dont either

#

ask someone who does ig

visual meadow
#

so now i have no idea how to fix that error

reef trail
visual meadow
# wooden yarrow the problem is, i dont either
+[XPCSniffer] XPC_CSMR {
    "connection_address" = 0x10624d620;
    "connection_name" = "com.apple.proactive.PersonalizationPortrait.SocialHighlight";
    "connection_time" = "Wed Aug 21 19:30:15 2024";
    "process_id" = 6268;
    "process_name" = "?";
    "xpc_message" =     {
        f = 33;
        proxynum = 1;
        replysig = "v20@?0B8@\"NSError\"12";
        root = "62 70 6c 69 73 74 31 37 a0 fa 00 00 00 00 00 00 00 7f 11 35 66 65 65 64 62 61 63 6b 46 6f 72 48 69 67 68 6c 69 67 68 74 3a 74 79 70 65 3a 63 6c 69 65 6e 74 3a 76 61 72 69 61 6e 74 3a 63 6f 6d 70 6c 65 74 69 6f 6e 3a 00 7f 11 18 76 35 36 40 30 3a 38 40 31 36 51 32 34 40 33 32 40 34 30 40 3f 34 38 00 a0 fa 00 00 00 00 00 00 00 6f 11 2c 6d 00 34 00 64 00 54 00 2b 00 36 00 74 00 73 00 74 00 52 00 58 00 52 00 4a 00 71 00 4c 00 6d 00 62 00 76 00 70 00 64 00 2b 00 37 00 43 00 42 00 34 00 53 00 4d 00 6d 00 61 00 59 00 68 00 56 00 46 00 70 00 62 00 61 00 36 00 59 00 76 00 6e 00 69 00 30 00 55 00 3d 00 11 00 6f 11 16 63 00 6f 00 6d 00 2e 00 61 00 70 0<…>```
#

NSError

#

is it public

#

can you send it to me

kind herald
#

Zefram Message Logger

wooden yarrow
kind herald
#

false

visual meadow
wooden yarrow
#

you should be looking at the XPC instead then

#

not that binary

visual meadow
#

what exactly should i be looking for nothing looks useful yet

wooden yarrow
#

xpc

#

surely

visual meadow
#

the root is just hex and the bplist isnt an error

wooden yarrow
#

ok but do you see a com.apple.proactive.PersonalizationPortrait.SocialHighlight xpc binary

visual meadow
#

its suggestd

#

i tried resigning that btw

wooden yarrow
#

maybe

visual meadow
#

i couldnt get it to read 2 directories, but either way, when i used that lookup hook to make it do mobilesafari

#

it still wouldnt work

#
uint64_t new_LSFindBundleWithInfo_NoIOFiltered(id arg1, uint64_t arg2, CFStringRef arg3, Boolean arg4, CFURLRef arg5, UInt64 arg6, NSString *arg7, BOOL (^arg8)(id, uint64_t, const id), NSError **arg9) {
    NSString *prefsUrlString = @"file:///System/Library/VideoCodecs/Applications/Preferences.app/";
    NSString *safariUrlString = @"file:///System/Library/VideoCodecs/Applications/MobileSafari.app/";
    NSString *newUrlStringPrefs = @"file:///Applications/Preferences.app/";
    NSString *newUrlStringSafari = @"file:///Applications/MobileSafari.app/";
    CFURLRef newPrefsUrl = CFURLCreateWithString(kCFAllocatorDefault, (CFStringRef)newUrlStringPrefs, NULL);
    CFURLRef newSafariUrl = CFURLCreateWithString(kCFAllocatorDefault, (CFStringRef)newUrlStringSafari, NULL);

    if (arg5 != NULL) {
        NSString *cfURLString = (__bridge NSString *)CFURLGetString(arg5);
        if ([cfURLString isEqualToString:prefsUrlString]) {
            arg5 = newPrefsUrl;
        } else if ([cfURLString isEqualToString:safariUrlString]) {
            arg5 = newSafariUrl;
        }
    }

    uint64_t ret = orig_LSFindBundleWithInfo_NoIOFiltered(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);

    CFRelease(newPrefsUrl);
    CFRelease(newSafariUrl);
    return ret;
}```
this
#

im going to check what it is on my ipad

#

since i have dopamine on there

#

if dopamine does not get frozen on initializing jailbreak environment and then panics

#

like it seems to do all the time

#

it just crashes safari on my ipad

#

siick

torn oriole
#

mfw
-# (possible pointer authentication failure)
steps in

visual meadow
#

yea

#

and then when ipad random panic steps in while trying to get frida

visual meadow
#

Sandbox: MobileSafari(7087) deny(1) process-info-pidinfo others [suggestd(6268)]

#

please let this be the problem

#

please

#

no its not i give up fuck the thumbnails on the shared with you thing

granite frigate
#

the average development experience

tepid olive
#

! and then a friend let me use theirs before i got my own license

tepid olive
tepid olive
#

also i will need like a $30 fee to get a dev cert

#

to make my life easier

indigo peak
#

👍

tepid olive
#

cracking binja is lame as fuck

indigo peak
tepid olive
indigo peak
#

🥱

tepid olive
#

OTP of $75 >>>

indigo peak
#

i only needed it for one thing