#development

1 messages · Page 174 of 1

faint timber
#

speaking of nginx heres some cool iOS snippets

# apt repo filter
map $http_user_agent $user_agent_map {
        default 0;
        "~APT-HTTP" 1;
        "~Cydia" 2;
        "~Sileo" 3;
}

location / {
        rewrite ^/apt(.*)$ $1 permanent;
        if ($user_agent_map ~ 0) {
                return 403;
        }
}

# ipa remote plist install filter
map $http_user_agent $user_agent_map2 {
        default 0;
        "~com\.apple\.appstored\/.* iOS\/.* model\/iPhone11\,8 hwp\/t8020 build\/.* \(.*; dt:.*\) AMS\/.*" 1;
        "~com\.apple\.appstored\/.* iOS\/.* model\/iPhone14\,2 hwp\/t8110 build\/.* \(.*; dt:.*\) AMS\/.*" 2;
        "~Mozilla\/.* \(iPhone; CPU iPhone OS .* like Mac OS X\) AppleWebKit\/.* \(KHTML\, like Gecko\) Version\/.* Mobile\/.* Safari\/.*" 3;
}

if ($user_agent_map2 ~ 0) {
                return 403;
        }

}

location ~ (app) {
  location ~ (index.html) {
    rewrite ^ "itms-services://?action=download-manifest&url=https://myipasite.com/app/app.plist" permanent;
  }
}
placid kraken
#
fn isEven(Int num) -> Int {
    ret num % 2 == 0;
}

pub fn main() {
    Int num = 8;
    Int res = isEven(num);
    res += 1;
    res *= 6;
    printf!("The result is %d", res);
    // Expect the above to print:
    // "The result is 12"
}
``` @radiant idol
placid kraken
#

uh oh

#
DeclareStatement {
    name: "b",
    type: "Int",
    value: DeclareStatement {
        name: "a",
        type: "Nil",
        value: ArithmeticOperation {
            left: LiteralStatement {
                kind: Identifier,
                value: String(
                    "a",
                ),
            },
            right: LiteralStatement {
                kind: IntegerLiteral,
                value: Number(
                    1,
                ),
            },
            operator: Add,
        },
    },
}
#

Int b = Nil a = a + 1

#

lmfao

harsh junco
#

What are notable differences between Apple Clang and original clang?

reef trail
faint timber
#

arm64e abi is closed source!

reef trail
#

that’s the main problem yeah

proud geyser
#

question is how does one decode hs256 signed jwt token in swift

reef trail
proud geyser
reef trail
proud geyser
#

doesnt mention it anywhere on docs..?

reef trail
#

it does in the source code

placid kraken
#

@radiant idol

proud geyser
proud geyser
radiant idol
placid kraken
#

apple

#

what else do you need to know

radiant idol
#

???

placid kraken
#

idk i found it cute and thought i’d send it to you 😭

radiant idol
#

I just woke up

#

That’s why I’m super confused

placid kraken
#

oh lmaoo

#

fair enough

reef trail
vivid dew
#

jwts are not real

ashen birch
#

You All Suck My Code Better .

placid kraken
young meteor
#

they actually made zefram

#

capt is a skid

slim bramble
placid kraken
#

@slender glade

slender glade
#

also that question looks like some "the final exam is just one question" bs lol

#

where do u even start

placid kraken
placid kraken
#

this is what the person did

#

)horror)

#

i have no clue how i would do it either

slender glade
#

that is INSANE

placid kraken
#

YEAH

#

LMAOO

slender glade
#

i feel like throwing up fuck you rosie

placid kraken
#

sowee

slender glade
#

start worrying NOW.

placid kraken
#

are u in my walls?? 🥺

slender glade
#

No because I'd have to make a mathmetical equation to find you in the first place

placid kraken
#

lmaoo true

slender glade
placid kraken
#

my full phone number is hidden in the digits of PI go and find it

slender glade
#

idek if shock is the right word

slender glade
#

0!=1 proof is easily the most fun thing i've ever written

placid kraken
#

i like my proof of 0.99999… = 1

slender glade
#

🥹

#

proofs make me happy

placid kraken
#

it’s not approximately 1 or almost 1 it is EXACTLY 1

#

which is why it’s fun

slender glade
#

the set explanation is most fun

placid kraken
#

true

slender glade
#

what's bigger than 0.9 in 0.999....

#

0.99

#

and what's bigger than 0.99 in 0.999...

#

etc

#

till u get to the supremum of 1

placid kraken
#

there’s also that one proof that says “you can’t fit any number between 0.9999… and 1 so therefore they must be identical”

slender glade
#

huuu

#

I have not heard of that proof before

#

do you have a link to an image or technical explanation?

placid kraken
#

yeah it’s on wikipedia iirc

slender glade
#

FUCK

#

wrong

#

I meant the peak emoji

placid kraken
#

In mathematics, 0.999... (also written as 0.9, 0..9 or 0.(9)) is a notation for the repeating decimal consisting of an unending sequence of 9s after the decimal point. This repeating decimal is a numeral that represents the smallest number no less than every number in the sequence

    (
    0.9
    ,
    0.99
...
slender glade
#

lemme see

slim bramble
#

Anyone knows how many instructions there are in aarch64 ?

slender glade
#

a lot

placid kraken
#

but then the question becomes @slender glade

slender glade
#

becomes me

placid kraken
#

0.4999999…

#

do you round up or down

slender glade
#

UP

#

WHY WOULD YOU ROUND THAT DOWN

#

@placid kraken I wonder if computers have a special case for 0 factorial

placid kraken
#

because even though it’s exactly 0.5 it looks like less

slender glade
#

ie if (input == 0) return 1;

slim bramble
slender glade
#

i mean it does look less

#

but so does 0.999...

placid kraken
#

true

slender glade
#

I also wonder how computers handle 0.999...

#

wait

#

im dumb

#

there is a bit limit

placid kraken
#

python gives me one

slender glade
#

my bad

placid kraken
#

for 0!

slender glade
#

mhm but like

#

logically

#

there's gotta be an if condition or smth because

#

the natural formula for factorial w 0 would give u 0

placid kraken
slender glade
#

true..

placid kraken
#

because they round the last decimal place when it reaches the bit limit

slender glade
#

I'm so out of it lmao this is such basic stuff

#

this is what 24/7 bio studying does to a mf

placid kraken
#

and the last decimal place would always be a 9

slender glade
placid kraken
#

and the 9 would bubble up the decimal places until it reaches 0 and makes it 1

slender glade
#

like, .99 prices

placid kraken
slender glade
placid kraken
#

ah yes

#

please give me -5 oranges

#

give me 0.99999…. of them

slender glade
#

LMAO

placid kraken
#

give me PI of them

slender glade
#

omg i wonder like

#

if u set the price of a product on some e commerce site to pi

#

and then buy it

#

wtf happens

placid kraken
#

explosion

#

servers will crash

placid kraken
slender glade
#

that cannot. be real

placid kraken
#

it’s the best fix i’ve ever seen

slender glade
#

my type of fix honestly

#

half joking

placid kraken
#

horror

slender glade
#

DONT tell me u wouldnt write a fix like that either

slender glade
#

30% of how the entitlements system works

#

and it's kinda funny to think in that way

placid kraken
placid kraken
visual meadow
#

what the fuck do you mean bro

#

most useful resource gone

#

i just tried on cellular and it doesnt work either its broken

placid kraken
#

this is genuinely becoming so complicated

#

the parser and compiler are becoming longer and longer by the minute

#

the parser section ONLY FOR PARSING STATEMENTS is already 530 lines

#

because i need to handle literals, function calls, declarations, returning, declarative-likes (*= and +=), incrementing (both ++num and num++ work now)

#

and more

#

and there STILL arent any if statements yet

#

but

#
pub fn main() {
    Int a = 1;
    Int b = a++;
    printf!("a: %d, b: %d\n", a, b);
    // a: 2, b: 1
}
pub fn main() {
    Int a = 1;
    Int b = ++a;
    printf!("a: %d, b: %d\n", a, b);
    // a: 2, b: 2
}
#

we have incrementing !!!!!!!!!!!

#

the difference in the IL code is quite small lol

#

with num++

export function w $main() {
@start
    %tmp_1 =w copy 1
    %tmp_2 =w copy %tmp_1
    %tmp_3 =w copy %tmp_1
    %tmp_4 =w copy 1
    %tmp_5 =w add %tmp_3, %tmp_4
    %tmp_1 =w copy %tmp_5
    %tmp_7 =w call $printf(l $main_6, ..., w %tmp_1, w %tmp_2)
    ret
}
data $main_6 = { b "a: %d, b: %d\n", b 0 }

with ++num

export function w $main() {
@start
    %tmp_1 =w copy 1
    %tmp_2 =w copy %tmp_1
    %tmp_3 =w copy 1
    %tmp_4 =w add %tmp_2, %tmp_3
    %tmp_1 =w copy %tmp_4
    %tmp_5 =w copy %tmp_1
    %tmp_7 =w call $printf(l $main_6, ..., w %tmp_1, w %tmp_5)
    ret
}
data $main_6 = { b "a: %d, b: %d\n", b 0 }
sonic totem
sonic totem
#

Your UDID is banned

#

I’m kidding, doesn’t work for me either

placid kraken
#

craziest terminal ever

#

now i have to somehow figure out how im gonna pass a memory address to scanf lmfao

#

NO FUCKING WAY IT WORKS

#

ABKDKWABD

placid kraken
#
fn input(String message) -> String {
    String out = "";
    puts(message);
    scanf!("%s", out);

    ret out;
}

pub fn main() {
    String test = input("input pls? :pleading:\n");
    printf!("\ndid you say %s? that's so true bestie\n", test);
}
#

this works with no extra modifications to the language lmfao

#

it just works

radiant idol
#

wait

placid kraken
#

yes

#

out is a pointer

radiant idol
#

YOU DID MY ! PROPOSAL??

placid kraken
#

oh

#

yeah lmao

radiant idol
#

lets go

placid kraken
#

im not doing func tho

radiant idol
#

smh

#

fine

placid kraken
#

i started getting annoyed having to type out $...$ every time lmfao

radiant idol
#

isnt scanf insecure tho

hasty ruin
#

censorship.

placid kraken
#

btw the $...$ or ! syntax is actually mandatory lmaoo

placid kraken
#

if i use gets i actually get a warning by macos

radiant idol
#

L

placid kraken
#

i would use fgets but i cant make file pointers yet / i dont know how via the intermediate language

radiant idol
#

make if statements

placid kraken
#

soon

#

this is what i was doing today

#

b = ++a -> a is 2, b is 2
b = a++ -> a is 2, b is 1

radiant idol
#

what happens if you put a binary generated by the compiler into a disassembler

placid kraken
#

actually i think ill make borrow checker first then ill do if statements

placid kraken
#

we can just look at that directly

radiant idol
#

no I mean

#

would you be able to do pseudocode

#

I assume not

placid kraken
#

idk probably not

#

oh

#

no syntax highlighting

#

thats the asm for this

fn input(String message) -> String {
    String out = "";
    puts(message);
    scanf!("%s", out);

    ret out;
}

pub fn main() {
    String test = input("input pls? :pleading:\n");
    printf!("\ndid you say %s? that's so true bestie\n", test);
}
radiant idol
#

neat

placid kraken
#

i mean i suppose binary ninja generates this high level IL

#

but i dont think this is what you mean

#

its also missing some parts?

radiant idol
#

i meant ida

placid kraken
#

ah

placid kraken
#

look at the url lmao

torn cloud
#

uh

#

that’s weird

granite frigate
#

oh i know this

torn cloud
#

NSA are part of the tiktok rizz party I guess

radiant idol
#

bro

hasty ruin
#

Uploading files in a GitHub issue puts in there

cloud yacht
#

Reminds me I was messing with some websites public api, and they blocked the curl user agent. So I just told it to use my browsers user agent

cloud yacht
timid briar
#

One null please

sonic totem
gentle grove
acoustic imp
#

somone made a like blob saver script it was easy, anyone rember it?

#

like on device blob saver

lusty jacinth
faint lionBOT
#
shshd

SHSH blob saving daemon
After installing, this package will automatically save your blobs to 1Conan's TSSSaver. The link to your specific blobs can be retrieved by manually running `/usr/sbin/shshd`...

Author

Hayden Seay

Version

1.1.1

Price

Free

Repo
Bundle ID

shshd

acoustic imp
#

no i said the ondevice blobs

hollow oar
#

Dump onboard blob?

acoustic imp
hollow oar
#

Sshrd?

acoustic imp
hollow oar
acoustic imp
#

no not that

hollow oar
torn cloud
#

🤮

acoustic imp
sonic totem
placid kraken
gentle grove
#

i can't remember

#

something with a set length so you dont risk buffer overflow

torn cloud
kind herald
#

troll installer 17 poc by project zero bug jailbreak

placid kraken
#

i already tried using fgets but i’m not sure how to open a file pointer with it in the IL lmao

gentle grove
#

does it not work to use stdin like normal

#

like from stdio.h

placid kraken
#

oh uhhhhhhhhhhhh

#

about that

gentle grove
#

what lang are you using

#

i am not up to date on the context

placid kraken
#

my own

gentle grove
#

oh that's an issue

faint timber
#

fopen?

placid kraken
#

it has a compiler backend with c bindings

#

but

#
fn input(String message) {
    String out = "";
    puts(message);
    scanf!("%s", out);

    ret out;
}

pub fn main() {
    String test = input("input pls? :pleading:\n");
    printf!("\ndid you say %s? that's so true bestie\n", test);
}
placid kraken
gentle grove
#

implement a way to do real c ffi so you can access the stdin symbol

#

and then like a real standard library, wrap it in a safe interface for the rest of the language to use

placid kraken
#

im pretty sure it has real c ffi im just not sure how to access the symbol

gentle grove
#

its just a symbol in the header isnt it

placid kraken
#

from the intermediate language

faint timber
gentle grove
#

or i guess something has to be executed for it to be poopulated

#

idk how it works on this level

faint timber
placid kraken
placid kraken
#

otherwise scanf wouldnt work

native orbit
#

cant u just call read() with fd 0

gentle grove
#

does libc populate the stdin

#

and youre not executing the code in libc?

#

is that how this works normally

faint timber
#

I thought it wasn’t inherently going to be 0, 1, 2?

gentle grove
#

time to clone musl

#

i will not be reading glibc

placid kraken
#

the assembly generated is just bl _printf so when assembled with clang i assume it runs libc

gentle grove
#
#include "stdio_impl.h"

#undef stdin

static unsigned char buf[BUFSIZ+UNGET];
hidden FILE __stdin_FILE = {
    .buf = buf+UNGET,
    .buf_size = sizeof buf-UNGET,
    .fd = 0,
    .flags = F_PERM | F_NOWR,
    .read = __stdio_read,
    .seek = __stdio_seek,
    .close = __stdio_close,
    .lock = -1,
};
FILE *const stdin = &__stdin_FILE;
FILE *volatile __stdin_used = &__stdin_FILE;

src/stdio/stdin.c

placid kraken
#

just i seem to only have the methods in stdio.h and not everything else

placid kraken
#

lmfao

gentle grove
#

well you dont need to if you can call the methods to deal with it

#

since its an opaque type

placid kraken
#

ah true

gentle grove
#

also you should probably implmeent actual C ffi at this point

placid kraken
#

yeah i probably will

#

seemingly

#

(i dont know how)

gentle grove
#

what is qbe

placid kraken
#

its a compiler backend like llvm ir

#

but the intermediate language is a little simpler

placid kraken
# placid kraken ```rs fn input(String message) { String out = ""; puts(message); sca...

for example this code is turned into this intermediate language code

function l $input(l %message_1) {
@start
    %out_2 =l copy $input_3
    %tmp_4 =w call $puts(l %message_1)
    %tmp_6 =w call $scanf(l $input_5, ..., l %out_2)
    %r_v6_7 =l copy %out_2
    ret %r_v6_7
}
export function w $main() {
@start
    %tmp_10 =l call $input(l $main_9)
    %test_8 =l copy %tmp_10
    %tmp_12 =w call $printf(l $main_11, ..., l %test_8)
    ret
}
data $input_3 = { b "", b 0 }
data $input_5 = { b "%s", b 0 }
data $main_9 = { b "input pls? :pleading:\n", b 0 }
data $main_11 = { b "\ndid you say %s? that's so true bestie\n", b 0 }
acoustic imp
#

@radiant idol, (sense i had to deal with MRU stuff for jade) what like the best way to know when media is paused/playing ?

hasty ruin
acoustic imp
#

if

#

need to know whne chnaged and i can plod jus use MRU api thing

#

nvm

tired meteor
#

its an bin file

acoustic imp
#

figured it out

radiant idol
acoustic imp
#

[SBMediaController isPlaying] 💪

hasty ruin
#

careful with that

#

some parts of SBMediaController break if you respring by killing sb

acoustic imp
#

?

#

wdym? like it just stops working?

hasty ruin
#

some stuff returns nil

#

ik the active now playing app does that

#

so i had to use MRMediaRemoteGetNowPlayingApplicationPID in rune

#

which doesnt have that issue

acoustic imp
#

well i mean im only gona be using it when the LS player is on screen so do i still need to worry?

hasty ruin
#

i mean

#

try it

hasty ruin
acoustic imp
#

@hasty ruin vexedtomato

hasty ruin
#

now sbreload

#

does it work

acoustic imp
#

Well yea it will bc that kills everything

#

And when u start playing music again it like will refresh

hasty ruin
#
MRMediaRemoteGetNowPlayingInfo(dispatch_get_main_queue(), ^(CFDictionaryRef information) {
    if (CFDictionaryContainsKey(information, CFSTR("kMRMediaRemoteNowPlayingInfoPlaybackRate"))) {
        float playbackRate = 0;
        CFNumberRef playbackRateRef = CFDictionaryGetValue(information, CFSTR("kMRMediaRemoteNowPlayingInfoPlaybackRate"));
        CFNumberGetValue(playbackRateRef, kCFNumberFloatType, &playbackRate);
        bool isPaused = (playbackRate == 0);
        // ...
    }
});
#

ok try that

#

may be overcomplicated but if it works... thishowitis

acoustic imp
#

Hol on I was jus playing around on my phone one sec

#

makes sense il try

hasty ruin
#
void MRMediaRemoteGetNowPlayingInfo(dispatch_queue_t queue, MRMediaRemoteGetNowPlayingInfoCompletion completion);```
radiant idol
#

everything is overcomplicated

hasty ruin
#

true

acoustic imp
#

oops didn't see that one

#

its just retuns a bool right ?

hasty ruin
#

oh theres a decicated thing for it

#

cool

acoustic imp
#

idk how to use it tho ur thing didnt work either

hasty ruin
#

whats the issue

acoustic imp
#

well hteres this thing to

#

but idk which to use

#

i tried the second and just like replaced what needed to be in what u sent but that didnt work

#
       MRMediaRemoteGetNowPlayingApplicationIsPlaying(
        dispatch_get_main_queue(), ^(Boolean isPlaying) {
            //if (isPlaying != nil) {
                return isPlaying;
            //}
    });```
#
        MRMediaRemoteGetNowPlayingApplicationIsPlaying(
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tesla3092/tweaks/16p-DRM-2/16player/src/MediaRemote.h:132:10: note: candidate function not viable: no known conversion from 'Boolean (^)(Boolean)' to '__strong MRMediaRemoteGetNowPlayingApplicationIsPlayingCompletion' (aka 'void (^__strong)(Boolean)') for 2nd argument
    void MRMediaRemoteGetNowPlayingApplicationIsPlaying(dispatch_queue_t queue, MRMediaRemoteGetNowPlayingApplicationIsPlayingCompletion completion);
         ^
1 error generated.```
#

ik im dumb but like idk

#

@hasty ruin

#

?

timid furnace
#

no known conversion from 'Boolean (^)(Boolean)' to '__strong MRMediaRemoteGetNowPlayingApplicationIsPlayingCompletion' (aka 'void (^__strong)(Boolean)') for 2nd argument

acoustic imp
#

idk what that means

timid furnace
#

expected: void (^__strong)(Boolean)
given: Boolean (^)(Boolean)

#

notice a difference

acoustic imp
#

yes

#

but what does __strong mean ?

timid furnace
#

__strong is for ARC

#

it is irrelevant

acoustic imp
#

k

timid furnace
#

what's the other difference

acoustic imp
#

voic and bolen

timid furnace
#

there you go

acoustic imp
#

ohh i get it

#

thats anoying

faint timber
#

Fucking block syntax!

acoustic imp
#
-(BOOL)isMediaPlaying{
    BOOL isPlayingMedia; 
    MRMediaRemoteGetNowPlayingApplicationIsPlaying(
        dispatch_get_main_queue(), ^(Boolean isPlaying) {
            isPlayingMedia = (isPlaying == true) ? YES : NO;
    });
    return isPlayingMedia;
}``` is this acceptable ?
#

oh wait it doesnt work

timid furnace
#

uh

#

you probably need to block

acoustic imp
#

i do

hasty ruin
#

not sure i've ever seen (isPlaying == true) ? YES : NO

acoustic imp
#

doesnt work 😭

timid furnace
#

i meant block as in blocking execution

#

but ok

torn oriole
granite frigate
frail cedar
#

so far it has zero issues 👍

#

i couldnt build libsandy because it couldnt find xpc but one lipo thin libSandy from my iphone to arm64 only and only compile for arm64 (because thats the only devices i have) later... success!

alpine sundial
#

Sorry if this is the wrong place to ask, but is there a wokring flex loader for iOS 15 rootless? Using Dopamine JB and can't even find any at all.

sonic totem
faint stag
faint stag
#

use poomsmart's one

alpine sundial
sonic totem
#

Find some kernel bug -> buy an exploit for a few thousand -> submit to Apple for 50k+

faint stag
timid furnace
granite frigate
#

alfie governer

slim bramble
#

😭

slim bramble
sonic totem
torn oriole
#

I wouldn’t have coded at alltroll

#

Peardb dragging me back into it kicking and screaming

torn oriole
#

You’re right SwiftUI doesn’t count

sonic totem
#

So it’s written with SwiftUI?

torn oriole
#

Much of it

placid kraken
wooden yarrow
granite frigate
#

react:

#

i'm so done

gentle grove
wooden yarrow
#

javascript

#

trol

granite frigate
#

idk

#

im probably doing it wrong

#

but it works so whatever

placid kraken
# granite frigate react:

please ```ts
package: {
price: Object.values(props.priceDetails).map(value => ({
enabled: !!value
price: value?.toString()
}))
}

tawdry trench
#

ive tried most things on google but they dont work

serene hawk
hexed knot
#

i feel like thats smth different

tawdry trench
#

pretty sure theyre paired

#

idk how to even install it

serene hawk
#

idk tbh just threw up google rq lol

tawdry trench
#

it assumes you have ruby

#

my bad

tawdry trench
#

it just says packfile not found

faint stag
tawdry trench
#

uhhh

#

roblox

warped sky
tawdry trench
#

no

#

the ios app

slender glade
#

USE A SEMAPHORE OMG

ashen birch
placid kraken
#

had to confirm that it == true

#

but that wasn’t enough either

#

so had to return true if its true and false if it’s false

#

just to really make sure it’s true you know

slender glade
placid kraken
frail cedar
placid kraken
frail cedar
#

i'm adding this to one of my tweaks where it checks a bool

placid kraken
#

i don’t actually know if the & 1 will return 0 lmao

#

oh it should be 1

#

because 1 & 1 == 1

slim bramble
slim bramble
gilded laurel
#

you need to use object.entries and sort by key

placid kraken
#

oh true true

placid kraken
torn cloud
slender glade
placid kraken
slender glade
#

nevermind i dont wanna know

tawdry trench
#

mommy

brazen timber
#

get help

hasty ruin
#

what he said

tawdry trench
#

later

hasty ruin
#

now

torn cloud
#

very mean

hasty ruin
#

what was it

torn cloud
hasty ruin
native dune
#

.

hasty ruin
#

@shut stag please check logs for nsfw

torn cloud
#

i'm leaving this server

#

icraze is too much of a snitch

hasty ruin
torn cloud
#

i am for good

hasty ruin
#

bro what 😭

torn cloud
#

doesn't show that for me

hasty ruin
torn cloud
#

it just shows a question mark

#

anyway

#

i'm out of here for now

native dune
#

?

hasty ruin
#

bro went from for good to for now

faint stag
#

or race condition

#

who knows

acoustic imp
sonic totem
#

In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple threads and avoid critical section problems in a concurrent system such as a multitasking operating system.

placid kraken
#

semaphore is a synonym for traffic light

#

i think

#

its kinda like a mutex in rust

#

where you can .lock()

#

it sucks that i dont know any QBE wizards because that means i need to ask on a mailing list on sourcehut about it lmfao

#

(this is what im asking about if anyone has any idea what i can do)

#

which runs fine. As %out_2 is a pointer, passing it to scanf works. However, I would like to use fgets instead, as scanf doesn’t particularly handle strings with whitespace very well. The issue is that I’m not sure how to access the stdin file pointer from stdio.h, and as Elle cannot currently create opaque types I’m stuck on how to manually implement an stdin file pointer to pass to fgets without segfaulting.

frail cedar
#

It's the term for signal flags

#

Semaphore is the protocol to communicate via flag position n stuff

#

Before radios you could wave flags at long distances

#

They were used to communicate position info n stuff like that in battles

#

Apple's using the terminology to track start/stop stuff

hexed knot
#

They basically mean the same thing

frail cedar
#

Yea but it was originally for flag communication

hexed knot
#

Idgaf

placid kraken
#

yeah its also a thing in romanian

placid kraken
#

how the fuck do you use the in-reply-to header in an email

cloud yacht
vivid dew
#

it's true

#

i stole a new ios feature

placid kraken
#

i figured out how to get a file pointer to stdin thanks to the dev of qbe making me realise that i completely forgot fdopen exists

#
export function w $main() {
@start
    %out_2 =l copy $input_3
    %stdin =l call $fdopen(w 0, l $stdin_mode)
    %result =l call $fgets(l %out_2, w 2, l %stdin)
    %tmp_12 =w call $printf(l $main_11, ..., l %out_2)
    ret
}
data $stdin_mode = { b "r", b 0 }
data $input_3 = { b 2 }
data $main_11 = { b "\ndid you say %s? that's so true bestie\n", b 0 }
primal perch
#

thank you for your useful contribution to #development captain incorporated

placid kraken
#

yes the docs exist but i kept thinking to try and find how the backend exports the stdin symbol

#

as it turns out on windows its

extern FILE _iob[];
#define stdin  (&_iob[0])

on linux its

extern FILE *stdin;     /* Standard input stream.  */
#define stdin stdin

and on macos its

extern FILE *__stdinp;
#define    stdin    __stdinp
#

yes but you cant just reference the stdin global from the intermediate language

#

well its fine because fdopen(0) just returns a fp to stdin on whatever platform youre on anyway

#

i just need to mint it to use that stdin symbol whenever the code tries to access it, almost like faking a global i suppose

#

you love

#

i still dont wanna migrate to llvm ir it looks too complicated

placid kraken
#

dont you love llvm ir hello world

@.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"

declare i32 @puts(i8* nocapture) nounwind

define i32 @main() { ; i32()*
    ; Convert [13 x i8]* to i8  *...
    %cast210 = getelementptr [13 x i8],[13 x i8]* @.str, i64 0, i64 0

    ; Call puts function to write out the string to stdout.
    call i32 @puts(i8* %cast210)
    ret i32 0
}

!0 = !{i32 42, null, !"string"}
!foo = !{!0}
primal perch
#

yea

placid kraken
#
data $text = { b "hello world", b 0 }

export function w $main() {
@start
    %r =w call $puts(l $text)
    ret
}
``` this is it in qbe ir
primal perch
brazen timber
#

LLVM RAAAH

placid kraken
#

qbe ir just compiles to assembly lmao

#

then you can assemble with whatever

placid kraken
#

i use clang

acoustic imp
#

is there a like place to get SDKs that have the private framework headers

#

not just a .tbd file ?

acoustic imp
gentle grove
torn oriole
primal perch
#

troll

torn oriole
#

troll.local

hasty ruin
#

it’s called being anti r

#

objc is easy

hasty ruin
acoustic imp
#

any idea why my tweak just like doesn't load if im importing/using a private framework specially MediaControls

lethal kayak
#

objective c gotta be one of the worst languages in terms of syntax

primal perch
#

in terms of accessibility yeah probably

acoustic imp
acoustic imp
gentle grove
torn oriole
#

it is

lethal kayak
#

rust syntax is definitely better than objc

#

from a readability standpoint

gentle grove
#

its more utilitarian than ugly

#

people hate on rust syntax not realizing you have to still learn just as much new ssyntax for something like python vs c

torn oriole
#

not after that fuck up in #general you dont 😭

hasty ruin
#

But python’s syntax can be understood by just looking at it

torn oriole
native orbit
gentle grove
#

you have to obtain the syntax knowledge

hasty ruin
gentle grove
#

if you dont know python syntaxc then staring at it does nothing

#

maybe its a little more intuitive but still

torn oriole
#

this is false, i learned python

torn oriole
gentle grove
#

if youre going for not knowing syntax then the point is void

primal perch
#

C++ syntax better than rust

gentle grove
#

also if you dont know the syntax then you probably have no idea how to use the language

hasty ruin
primal perch
#

no i will not elaborate

#

yes i will leave

gentle grove
#

if you learn how to use the language you simultaneously learn syntax

hasty ruin
#

I tried it
it was ass
i no longer want to try it

primal perch
#

based

#

chad opinion

#

i tried rust

#

i didnt like it

#

i hate rust

kind herald
#

I've never tried Rust. I hate rust

gentle grove
#

i tried c++ and hated it so ill make sure to tell everyone that c++ is bad

torn oriole
#

hold on

#

new emote coming

native orbit
#

if the lang doesnt start with C and end with C, idc for it

kind herald
#

crack?

#

oh

primal perch
gentle grove
hasty ruin
gentle grove
#

CHURCH SLAVONIC

hasty ruin
kind herald
#

CnexusC

gentle grove
#

swift, kotlin, and rust are literally the same language

torn oriole
kind herald
#

:banrust:

hasty ruin
#

okr

#

ust user

queen ruin
#

Ban Swift Censorship and Hate

primal perch
torn oriole
#

jumbo that immediately

#

i am adding it here

primal perch
#

based

native orbit
primal perch
#

good

hasty ruin
#

I’d jumbo okr but my slash commands don’t work on mobile

primal perch
#

Your interaction contained a filtered word. Aborting!

#

:/

faint lionBOT
hasty ruin
#

okr not the full name

primal perch
#

:okr:

gentle grove
#

okr is the fulo name for me'

#

from the gorn servre

#

oh no

kind herald
hasty ruin
#

:okf:

gentle grove
#

forok some reservoer

#

from some server i ave no idea

#

idek what that server is

faint lionBOT
torn oriole
hasty ruin
#

It’s time for a new keyboard bruh

#

😭😭

gentle grove
#

im to=ypoing wuth my knucjkes'

kind herald
#

brother need the large letter keyboard

gentle grove
#

=we have one of those

torn oriole
#

Boba keyboard

gentle grove
#

im not h=joking

faint lionBOT
#
boba14

vroom vroom?

gentle grove
#

this si from like 10 years ago

gentle grove
torn oriole
torn oriole
gentle grove
#

who unreacted

native orbit
torn oriole
gentle grove
#

die

torn oriole
#

because self reacting in screenshots cringe

gentle grove
hasty ruin
#

Mullvad has new UK servers supershocked

primal perch
#

oi bruv

native dune
#

HURRY UP

kind herald
hasty ruin
#

Ew nvm they’re in Scotland

primal perch
hasty ruin
torn oriole
#

muhllivhad hazsh nuew yeuu kayy shervers supershocked

kind herald
#

send rune 1.5 deb

native orbit
primal perch
#

muhllivhad hazsh nuew yeuu kayy shervers supershocked

torn oriole
#

muhllivhad hazsh nuew yeuu kayy shervers supershocked

#

muhllivhad hazsh nuew yeuu kayy shervers supershocked

#

muhllivhad hazsh nuew yeuu kayy shervers supershocked

hasty ruin
native dune
primal perch
#

kind herald
native orbit
torn oriole
#

need that with the banrust

native orbit
#

send png

native orbit
primal perch
#

based

torn oriole
#

i wonder

native dune
#

rust mid

#

i used rust for 1 project then i didnt like it anymore

primal perch
#

yeah

native dune
#

👍

primal perch
#

its ok

torn oriole
kind herald
#

rust mid
I've never used it. Then I didn't like it anymore

native orbit
native dune
#

fr

kind herald
gentle grove
primal perch
native dune
kind herald
#

spam :/ Mods castrate this guy

torn oriole
primal perch
#

based

native dune
#

.fm

worldly sundialBOT
native dune
#

who changed my nickname

native orbit
torn oriole
#

immediately programming gir to automatically react to boba messages with banrustgif

native dune
#

i thought this was general

primal perch
#

RTX 4080 SUPER

torn oriole
#

RTX 4080

SUPER

primal perch
#

SUPER

elder scaffold
elder scaffold
#

unfortunately it doesn't seem to exist yet

#

😭

kind herald
hasty ruin
timid furnace
#

is there a way to spoof location on macos

#

i want to screenshot apple maps for a design thing but i need to change my location

cloud yacht
tepid olive
#

will Apple allow special entitlements to emulators in the AppStore since jit is still not allowed

opal ridge
#

no unless you make a web browser with window.WebLoadMachO()

#

something ridiculous like that

#

so: no

opal ridge
#

or

#

there's a "com.apple.developer.cs.allow-jit" in 17.4

opal ridge
# opal ridge or

if apple really does not review content of apps on alternative app marketplace as promised:

opal ridge
#

but I feel that they are not going to strictly adhere to that

opal ridge
opal ridge
cloud yacht
#

also you like can't use it on iPad and have to be in the EU iirc

torn oriole
#

You have to have pretty decent capital in the first place to be permitted to host a third party store

#

So we’re basically back at square one

cloud yacht
#

yeah that too

torn oriole
#

Not to mention you have to pay to access altstores in particular

#

More than likely gonna see paid af stores any day now

#

Again, back to square one

cloud yacht
#

yeah we're not going to get anything like fdroid

torn oriole
#

Until we get free reign of a good chunk of entitlements the sideloading isn’t real imo

cloud yacht
#

yeah

torn oriole
#

Hope the EU beats they ass over the third party stores

cloud yacht
#

realistically, apple should let us make apps for free, but if we want to use apple api's that cost them money to operate, then we pay

primal perch
#

yeah

#

and i hope the eu blasts them with fines

placid kraken
#

uhhh guys look basically

#

when i reference a global i get a pointer to it right

#

how do i get the size of that object

#

like does anyone know in assembly how to get the size of a data section

placid kraken
#

the only times where that hasn’t happened was when i tried to borrow a mutable ref from a ref cell for internal mutability twice in the same macro

#

which throws a runtime error

gentle grove
#

like they should communicate the size along wiht the pointer to you

#

or have a struct, or methods to deal with it if its like an opaque type

placid kraken
gentle grove
#

what are you trying to get the size of

placid kraken
#

essentially just a section of 100 bytes or however many the user passes in

gentle grove
#

like the size of stdin?

placid kraken
#

uhhh no, fgets basically allows you to pass the max size of the input until it stops to prevent a buffer overflow

#

i want to make that max size the size of the buffer

gentle grove
#

i mean if youre statically allocating the array then you just put that same number in manually into the fgets call

placid kraken
#

i mean i guess so

#

i know sizeof is a runtime function

gentle grove
#

is it

placid kraken
#

yeah

gentle grove
#

google says sizeof is compile-time

#

oh unelss its a variable length array which is varargs or whatever i believe

placid kraken
#

sizeof is compile time for static arrays ofc

gentle grove
#

oh no

#

i havent ever used VLA before

#

i dont think i knew this existed

placid kraken
#

lmfao

gentle grove
#

i mean however youre declaring the size of the buffer, you just pass that same thing into fgets

placid kraken
#

fair enough i guess

gentle grove
#

if you dont know how big your buffer is then you have bigger structural problems

vivid dew
#

vlas aren't real

gentle grove
#

i agree

placid kraken
#

ok so i implemented buffers

#
fn input(String message) -> Long {
    out[64];
    Long stdin = fdopen(0, "r");

    puts(message);
    fgets(out, 64, stdin);

    ret out;
}

pub fn main() {
    String res = input("input pls? :pleading:\n");
    printf!("did you say %s? that's so true bestie\n", res);
}
#

now if i dont fill the whole buffer it adds the newline into the input which is annoying and i dont know how to get rid of it

#

like the string has a newline

#

obviously it should be trimmed but no stdlib yet lol

#

oh c does this too

#

ok

#

well in c you can just replace the last character with a null byte

#

thats not really an option here

#

at least it compiles

function l $input(l %message_1) {
@start
    %out_3 =l copy $out_2
    %tmp_6 =l call $fdopen(w 0, l $input_5)
    %stdin_4 =l copy %tmp_6
    %tmp_7 =w call $puts(l %message_1)
    %tmp_8 =w call $fgets(l %out_3, w 64, l %stdin_4)
    %r_v8_9 =l copy %out_3
    ret %r_v8_9
}

export function w $main() {
@start
    %tmp_12 =l call $input(l $main_11)
    %res_10 =l copy %tmp_12
    %tmp_14 =w call $printf(l $main_13, ..., l %res_10)
    ret
}

data $out_2 = { b 64 }
data $input_5 = { b "r", b 0 }
data $main_11 = { b "input pls? :pleading:\n", b 0 }
data $main_13 = { b "did you say %s? that's so true bestie\n", b 0 }
wooden yarrow
#

😭

placid kraken
#

lol idk

#

it wasnt intended to look like C

#

here we are i guess

hasty ruin
#

That’s what happens when you ask C devs for their input

torn oriole
#

C mfs in chat pensiveyea

slim bramble
placid kraken
#

couldnt i technically do this to store strings

%A0 =l alloc4 8      # stack allocate an array A of 2 words
%A1 =l add %A0, 4
storew 43,  %A0      # A[0] <- 43
storew 255, %A1      # A[1] <- 255
%v1 =w loadw  %A0    # %v1 <- A[0] as word
%v2 =w loadsb %A1    # %v2 <- A[1] as signed byte
%v3 =w add %v1, %v2  # %v3 is 42 here
#

instead of putting them as data sections

#

this is how C does it too ofc

placid kraken
#

maybe im just picky with the second one lol

pure acorn
#

Is it possible to make tweaks from a jailbroken iPad?

slim bramble
placid kraken
#

possible and viable are two different words

pure acorn
#

Well luckily I’m a masochist /j

#

Is there any guide y’all can link me to or should I just look it up?

placid kraken
#

you could manually bit flip the memory on your ram and that would make it “possible”

#

lmfao

placid kraken
placid kraken
blazing warren
#

Walter n 🤣🤣🤣

hasty ruin
#

🤨

blazing warren
#

Well here in Mexico the N is used for someone who was imprisoned and has not yet been proven guilty. example Carlos "N"

young meteor
#

iCraze N

hasty ruin
#

?

gentle grove
# placid kraken thats not really an option here

well typically when you'd expect an "unlimited" input, so you read into the buffer in a loop and go through the text and copy it to a larger heap allocated buffer for the entire input until you get to the end, which you'd know because you'd find the new line

placid kraken
#

yeah i guess that makes sense

#

i’m honestly kinda tempted to just stack allocate every variable

#

that way strings can be arrays of chars

gentle grove
#

you'll still have to go through and find the new line and replace it in this case, you can skip steps since you don't care about getting more than the size of the buffer

placid kraken
#
%A0 =l alloc4 8      # stack allocate an array A of 2 words
%A1 =l add %A0, 4
storew 43,  %A0      # A[0] <- 43
storew 255, %A1      # A[1] <- 255
%v1 =w loadw  %A0    # %v1 <- A[0] as word
%v2 =w loadsb %A1    # %v2 <- A[1] as signed byte
%v3 =w add %v1, %v2  # %v3 is 42 here
#

in this case its still a static array as you need to define the size i think

gentle grove
#

since the input might be smaller than the buffer

#

unless there's some other way I don't know of

placid kraken
#

unless you mean something else

gentle grove
#

but if input is smaller than buffer then newline isn't at the end of array

placid kraken
#

oh i suppose that’s true

#

why does fgets even have that behavior

gentle grove
#

What do you mean

#

What else would it do

placid kraken
#

to store a new line instead of a null byte as the last character

gentle grove
#

It's because that's what the input is

#

you pressed enter

placid kraken
#

oh that makes sense actually yeah

#

i wonder why normal gets doesn’t do that

gentle grove
#

gets is designed to look for newline or end of file, that's when it ends

placid kraken
#

i seeee

#

but then i suppose doesn’t fgets do that too then

gentle grove
#

yeah

#

well it does

#

but it doesn't delete the newline I guess

placid kraken
#

yeah idk why

gentle grove
#

I think it's because gets is specifically targeted to stdin so they assume you want to get rid of newline given that

#

since that's what you'd presumably use it for

placid kraken
#

oh also with scanf, can you read infinite characters instead of breaking at a space or is there no way to do that with c format specifiers

gentle grove
#

doesn't it do that by default

#

THATS how it sounds to me

placid kraken
#

because if you do like

buf[64];
scanf(“%s”, &buf);
``` and you input `abc cba` then buf only gets `abc`
gentle grove
#

Idk then

#

maybe you're supposed to do a loop

placid kraken
#

String of characters. This will read subsequent characters until a whitespace is found (whitespace characters are considered to be blank, newline and tab).

native orbit
placid kraken
#

i know it’s unsafe on its own but you can pass that

#

width
This specifies the maximum number of characters to be read in the current reading operation

#

arg index 2 aka arg 3

placid kraken
#

can i just put [%20] or something

native orbit
placid kraken
#

yeah

native orbit
# placid kraken yeah

this should explain it maybe

// will read 63 bytes, breaking on space
char buf_space[64];
scanf("%63[^ ]", buf_space);

// will read 9 bytes, breaking on newline
char buf_newline[10];
scanf("%9[^\n]", buf);

// will read 23 bytes, breaking on tab
char buf_tab[24];
scanf("%23[^\t]", buf);
placid kraken
#

OH I SEE

#

SO when you do \n it breaks on only new line

#

and no longer tab or space?

placid kraken
#

if you can read a specific amount of bytes

native orbit
placid kraken
#

yeah that makes sense

placid kraken
#

from what i read that makes it safe imo

#

you’re setting a width of up to the size of the buffer - 1 to account for a null byte

#

so there shouldn’t be a buffer overflow possible

#

did i not read far enough..?

grand tide
#

if i’m making a tweak that changes something in discord do i want to make the mobile substrate bundle filter (the thing the tweak hooks into) not com.apple.springboard?

reef trail
#

yes

grand tide
#

also if i make a tweak and a repo do i get dev role and also how do i get it to show up with bot on canister

reef trail
#

make a pr to the canister repo

#

and yes to the dev role

grand tide
reef trail
#

com.hammerandchisel.discord

placid kraken
#

yeah, discord’s bundle id

reef trail
grand tide
#

oh ok

#

anyone know a good text editor for coding on mobile?

#

don’t have access to a pc or mac rn so doing it on mobile

#

it’s a simple tweak so it’s fine

reef trail
grand tide
#

alr i’ll use that

placid kraken
#

LMAO I GOT DESTROYED

#
> The reason why is that `fgets` automatically writes a \n to the end of a 
> string if the full length of the buffer specified is not fulfilled.

That's not quite right. It reads characters from stdin up to and
including a newline, then adds a null byte. If the line is longer
than will fit in the buffer, it reads as much as it can then adds
a null byte.
#
> In C you could just do
> 
>      size_t length = strlen(out);
>      if (length > 0 && out[length - 1] == '\n') {
>     out[length - 1] = '\0';
>      }
> 
> however of course that's not an option here because you can't directly 
> index into data sections like this. C uses the method I seem to find no 
> method of avoiding, aka stack allocating an array of bytes instead.

This isn't true. C will stack-allocate the array if you declare it
on the stack (i.e. inside a function without 'static' or 'extern').

If you declare it as at top-level, or inside a function with 'static'
or 'extern', the array will go into .data.

If you are curious how C maps to QBE, you could take a look at the
output generated by cproc.
grand tide
#

should i delete everything in tweak.x and put my code there?

queen ruin
grand tide
#

why not?

queen ruin
grand tide
#

what will?

queen ruin
#

It might depending the complexity of the tweak, but not necessarily

grand tide
#

ok

queen ruin
grand tide
#

who decided it anyways? aaron?

queen ruin
#

Mods

#

It was a mod vote

grand tide
#

ok

queen ruin
#

For me, they approved my dev role based on the stuff I’ve done relatively easily

grand tide
queen ruin
#

The hard part was my past

grand tide
#

ok

queen ruin
placid kraken
#

i got my dev role because i have a lot of various projects lmao

#

idk if i deserve it but whatever

reef trail
# queen ruin No

as long as the tweak isnt something stupid like changing every text to smth it would?

placid kraken
#

im not a vendetta dev

hasty ruin
queen ruin
queen ruin
placid kraken
#

i’m an enmity/unbound dev

queen ruin
#

It wasn’t a piece of cake is what I’m saying

placid kraken
queen ruin
radiant idol
#

make a tweak because you want to, not because of a role

queen ruin
reef trail
grand tide
#

i’m not making it for the role

#

just for fun

radiant idol
#

gotcha

#

well good luck

grand tide
#

i wanna learn some of this stuff you guys always do

reef trail
#

any questions my dms are open :)

grand tide
#

also using your guide nightwind thx

queen ruin