#development
1 messages · Page 173 of 1
i mean you're not gonna stop people
If you do that then they'll just spam text instead
have fun validating that
(you should not)
require state ID to register
@placid kraken i think this should work
but that means i need to manually skip all the stuff i don’t want to inject into
well yeah
you could clean it up to just a list of bundles to skip
instead of duplicating the method call
rosie8 4real
elons kid
she zef on my ram until im brick
i knew i made a banger
I GOT IT TO COMPILE
op add(Int arg1, Int arg2) {
ret arg1 + arg2;
}
pub op main() {
let res: Int = add(10, 20);
printf("We got %d. Yay!\n", res);
}
data $main.0 = { b "We got %d. Yay!\n", b 0 }
function w $add(w %arg1, w %arg2) {
@start
%r_v =w add %arg1, %arg2
ret %r_v
}
export function w $main() {
@start
%res =w call $add(w 10, w 20)
call $printf(l $main.0, ..., w %res)
ret 0
}
teslaman pinned it, couldn’t have been that good
shut up
it’s capt hate we’re on the same team here
ok so now ALL of this compiles
op modulusWithTwo(Int num) {
ret num % 2;
}
op add(Int num1, Int num2) {
ret num1 + num2;
}
pub op main() {
let addition: Int = add(4, 5);
let remainder: Int = modulusWithTwo(addition);
let summed: Int = add(addition, remainder);
printf("The result is %d\n", summed);
}
data $main.0 = { b "The result is %d\n", b 0 }
function w $modulusWithTwo(w %num) {
@start
%r_v =w rem %num, 2
ret %r_v
}
function w $add(w %num1, w %num2) {
@start
%r_v =w add %num1, %num2
ret %r_v
}
export function w $main() {
@start
%addition =w call $add(w 4, w 5)
%remainder =w call $modulusWithTwo(w %addition)
%summed =w call $add(w %addition, w %remainder)
call $printf(l $main.0, ..., w %summed)
ret 0
}
$ The result is 10
real
this is so fun!!
the way that it holds literal expressions isnt the best but thats just how qbe works
first i define a global vector of globals
pub struct Global {
pub name: String,
pub value: String,
pub public: bool,
}
lazy_static! {
pub static ref GLOBALS: Mutex<Vec<Global>> = Mutex::new(Vec::new());
}
all constants will go into this pool, aswell as literals
and that matches here
Primitive::Constant {
name,
public,
r#type,
value,
} => {
let parsed_value = match value {
ValueKind::String(value) => format!("\"{}\"", value),
ValueKind::Number(value) => format!("{}", value),
ValueKind::Character(value) => format!("\"{}\"", value),
ValueKind::Nil => "0".to_string(),
};
let mut globals = GLOBALS.lock().unwrap();
globals.push(Global {
name: name.to_string(),
value: parsed_value,
public: public.clone(),
});
}
lmao yeah its great
ok yes hello world successful
pub op main() {
puts("Hello world!\n");
}
this is what it compile to ```ts
data $main.0 = { b "Hello world!\n", b 0 }
export function w $main() {
@start
call $puts(l $main.0)
ret 0
}
and this is the assembly that produces
.data
.balign 8
_main.0:
.ascii "Hello world!\n"
.byte 0
/* end data */
.text
.balign 4
.globl _main
_main:
stp x29, x30, [sp, -16]!
mov x29, sp
adrp x0, _main.0@page
add x0, x0, _main.0@pageoff
bl _puts
mov w0, #0
ldp x29, x30, [sp], 16
ret
/* end function main */
no wonder your code bootloops
.
LMAO
This was from over half a year ago…
What were you doing scrolling through 8 month old discord chats?
what status bar theme is that
its a random set from nicebarx
the vpn icon i got from icons8 though
like when would u need all this information
fr lol
:3
looking for the comment where i explained capt how we can go from an arbitrary kernel read to stable krw
Ok ok so it wasn’t just to flame icraze
who
you don't look through 8 month old messages to harass icraze?
No, but maybe I should
Can anyone here teach me how to install theos?
I’ve downloaded it and I double click it but it doesn’t work
run it as administrator
How
I tried that
oh
But I’m running an old version of Ubuntu I think
Hi sparkdev
i think spark knows how to install theos but i could be wrong 
What’s theos?
its uh
that one guy
its an opporting styem
apparently this
theOS
didn’t he make the samsung
Hmm
only os you'd ever need
fioreware
I’m just doing my rare r/jb trolling
go fix snowboard or something smh
i was thinking ab making a checkn1x/odysseyra1n fork where its legit only theos
jkjk
what
release the source
send link to dodgy website where the code is hosted
better not be mediafire
or else
It’s open source if you have access to my MacBook
not really that open now is it
localhost
brb hacking SparkDev's MacBook
Pls no
what does this mean Did sparkdev hack my unc0ver
idk i only know NotSparkDev
Imagine using syslog
me n all my homies write to a .txt file in documents instead of NSLog
what a bozo
How do I make a .tx file
um
My man
ban cameren fr

i approve this message
im going to delete this before icraze sees it
?
touch cameren.uwu
?
who is icraze
@indigo peak ur in trouble now
nuh uh
your honor, nuh uh
fioreware
Bye spark dev
🫡
spark will now proceed to jump into his hidey hole of no contact for 15 years until he comes back on r/jb
shorten the hole of no contact to 2 days by pinging him 36 times
mods this user is encouraging useless pings
icraze message logger
it works in wine
guys do u know shakespear
specifally romeo and Juliet
i need help developing my evidence
chat gpt
YOUR RIGHT
wtf
Yes
Light work
True
jus needed scenes that support my claim
idk dawg i dont do stupid shit like this
best guess is mount ddi with pymobiledevice3 or something
update to sonoma @grave sparrow
Darwin mac-pro.lan 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64 x86_64
DARWIN 23
Captinc secretly loves swift
You are doomed to eternal damnation if you don’t know assembly
we love assembly
we love arm64 assembly*
true assembly enjoyers transcended isa
we love lean manufacturing
:/
guys i know what tweak to make now after a few days on android
universal back gesture
that shit is a godsend wtf
nano users on top
nah
i cant swipe back on youtube to go back
it's down for no reason
i cant swipe back on the cc
I can gift you nexus, if would be kind enough to gift me bloom

horror
qbe ir is so weird
i can’t pass locally scoped variables to functions but i also can’t store strings with % sigil functions i need to store them as data sections
THEN i also can’t denote a return type for ret
so while everything else follows with the type (w, l, d, etc) returning doesn’t have a return type
i also can’t seem to figure out how to get the memory address of a variable so i can get scanf working
so yay .,,,,
oh and not to mention i can’t pass a data section to a % sigil variable and then use that variable in place of a data section
me?
Micro users on top
nvim
Tbh I've been meaning to learn nvim
its ez
Yeah I've been mostly busy with school and didnt have a lot of time
it's not
how tf am i supposed to remember that like ce is to change to the end of the word or r to replace or whatever
Who thought to substitute localisations to l10ns
isn’t it shift + $ for the end and shift + ^ for the start of a line
:idk:
@slender glade
same way you remember where the keys are on a keyboard
muscle@memory
Yes, and 0 for beginning of line past the indentation since ^ sends you to first non-whitespace char
yes
i just realised that add operations in elle can be nested and add operations in qbe must be 2 integers only
so thats fun i guess
vim haters when someone is holding a gun to their head and asking what the most efficient text editor is
what’s the most efficient text editor?
(i’m a vim user)
ew
who actually uses xcode
vim motions != vim
if you’re not using vim motions you’re a shit dev
anyone know if this guy was spitting out of his ass or if this is true
i guess in the grand scheme of things no it does not
use a good os then
real
zed, vscode, nvim
linux and windows > macos (no zefram malware)
you have options
what are you using instead of VScode ?
vscode is good
ohoh
neovim does everything an ide does when setup
for some people they don’t want to have their own edition, me personally i find it amazing being able to configure every aspect of it and tune it to how i want to work
if you’re saying vscode is an ide so is neovim, vscode does shit all without extensions
debugger plug-ins in vim
you have to have plugins to use the vscode debugger too
does vscode have that
yes
Yes if you add a plug-in
thought you were talking about vscode?
ok but nobody normal uses makefiles as a "build system"
yeah
its 2024
cmake usually
apparently ninjas good
but ive never used it so i cant comment
this dude really thinks neither vscode (the most popular text editor with extensions made by microsoft) nor neovim (the most popular cli text editor with extensions) have extensions for git (the largest git website is made by microsoft)
lmao
also
I get why ppl like prebuilt IDEs but i find them bloated and cumbersome, i love the modular style of building your own editor
less work
and using a different ide for each language you use sounds like pain
yeah ig
i used to use jetbrains
my neovim config didn’t take long to build up at all
and its nice u know u get that true power of your ide using half your ram
on the start menu
idk how to put it in words but jetbrains editors feel corporate
and not ideal for an individual
it feels weird to me
idk what u mean
and it being proprietary is a turn off
idrc abt that stuff so
(he is a hipster)
who’s the hipster
joe
i do for dev tools
if i can’t hack it i won’t use it lol
real
⨯ kernelcache type is not MH_FILESET (KEXT-xtraction not supported yet)
ok whats the tried and true kextractor for non fileset 16.x kernels?
Somebody knows wtf is this? I get it on every package I install
Not that I know of
Go look for one
What flex do you have ? From where
looks like removing it solved it idk wtf was the issue
You have sent a link to a package, you can use the buttons below to open it directly in your preferred package manager.
Get the one from poomsmarts repo
Doesn't have one in there
Um well look on GH ?
Dev question. Could a jb app install a/have a Apple Watch app?
Thanks
Do u know for a fact ?
well technically your editor is just being an interface for the cli program thats actually doin g it
its so convenient that it hides important log output behind complicated ui's and forces you to learn an entire new interface to do the same things
Finally USB on Mac VM
Why
@visual meadow how do I get virtual CarPlay for my phone
Bc
eta acceleration
Eta when I get a rx580
get trolled
l
sometimes it starts tweaking
replug the phone
see if it works
idk
probly the VM 😢
t2 was like 2018 i think
didn't work smh
oh well
@visual meadow do i need like dev mode on or somthing ?
it crashed now 
Whats is mean if it’s doing this
nvm
t2 is hardware not software
reading zefram code is more powerful than any drug i could take
(It’s lethal)
z
eam bootloop
..what
also wtf does that mean
basically how my compiler works is that i have a struct for each function in each module, and each statement inside the function needs the function to get a valid label for temporary variables and to add/assign instructions
however, as i cant make each statement the owner of Function as there are multiple, i have to pass a mutable reference
which works fine at the start, however parsing an ast means you have to recursively call the same compilation method again with the children of your current method
and that means you need to pass that mutable reference into the recursive call
however rust only allows one mutable borrow
so i cant do that
troll
wait if it's a tail call shouldn't this work
wait actually @placid kraken i think that should work regardless
sure you aren't passing like &mut var everytime?
i mean im probably doing it wrong but cannot borrow self.function as mutable more than once at a time second mutable borrow occurs here
in the function itself i do
for statement in body.clone().iter_mut() {
StatementExpr::new(statement.clone(), &mut res, return_type.clone())
.compile();
}
owned Function struct
in each StatementExpr the ast node needs to be recursively compiled so
let left_parsed = Self::new(
*left.clone(),
&mut self.function,
Some(self.r#type.clone().unwrap_or(Type::Word)),
)
.compile()
.unwrap();
oh and self also doesnt live long enough lmao
no this is inside a compile function, i get &mut self inside there
new just returns Self and creates a struct
so then shouldn't self.function be enough given it's already passed as a &mut self
(instead of it being &mut self.function)
^
yeah but then self may not live long enough because it has no lifetime while the function ref has a 'a lifetime
if i give self a bound of a 'a lifetime too then ```
cannot borrow *self.function as mutable more than once at a time
second mutable borrow occurs hererustcClick for full compiler diagnostic
statement.rs(46, 21): first mutable borrow occurs here
statement.rs(13, 6): lifetime 'a defined here
statement.rs(44, 35): argument requires that *self.function is borrowed for 'a
what does it say without giving self a lifetime bound
nothing but it won’t last long enough
i mean if the rust compiler doesn't complain then should work 
also i think 'a should prob be less than self when it's passed?
idk i dont know the function signatures
it does complain lmao
it says that self may not live long enough
i’ll probably just Box() it lmao
should solve all of my issues
it’s hard to tell without the whole context
rust detected opinion rejected
i ended up using an immutable reference to a refcell
that way i can borrow_mut() and it works because i can have infinite immutable references so i can pass that refcel ref around
and i still have internal mutability
ok after rebuilding the compiler from the ground i can now compile this far
data $test = { b "Test %d\n", b 0 }
export function l $main() {
@start
%tmp_2 =w copy 1
%tmp_3 =w copy 1
%tmp_4 =w copy %tmp_2
%tmp_5 =w copy %tmp_3
%tmp_6 =w add %tmp_4, %tmp_5
%tmp_1 =w copy %tmp_6
%tmp_7 =w call $printf(l $test, ..., w %tmp_1)
ret 0
}
.data
.balign 8
_test:
.ascii "Test %d\n"
.byte 0
/* end data */
.text
.balign 4
.globl _main
_main:
stp x29, x30, [sp, -16]!
mov x29, sp
mov x0, #16
sub sp, sp, x0
mov x0, #0
add x1, sp, x0
mov w0, #2
str w0, [x1]
adrp x0, _test@page
add x0, x0, _test@pageoff
bl _printf
mov x0, #16
add sp, sp, x0
mov x0, #0
ldp x29, x30, [sp], 16
ret
/* end function main */
horror
lowercase @page and @pageoff look so weird to me lol
thats just what the qbe ir compiles to lmao
ir moment
quebec ir
ok more progress
op add(String a) -> String {
ret a;
}
pub op main() -> Nil {
let a: Int = add("abcd");
printf("Test %s\n", $...$, a);
puts("Hello world!\n");
ret 0;
}
compiles to
function l $add(l %tmp_1) {
@start
%tmp_2 =l copy %tmp_1
ret %tmp_2
}
export function w $main() {
@start
%tmp_5 =l call $add(l $main_4)
%tmp_3 =l copy %tmp_5
%tmp_7 =w call $printf(l $main_6, ..., w %tmp_3)
%tmp_9 =w call $puts(l $main_8)
%tmp_10 =w copy 0
ret %tmp_10
}
data $main_4 = { b "abcd", b 0 }
data $main_6 = { b "Test %s\n", b 0 }
data $main_8 = { b "Hello world!\n", b 0 }
and ```ts
.text
.balign 4
_add:
stp x29, x30, [sp, -16]!
mov x29, sp
ldp x29, x30, [sp], 16
ret
/* end function add */
.text
.balign 4
.globl _main
_main:
stp x29, x30, [sp, -16]!
mov x29, sp
adrp x0, _main_4@page
add x0, x0, _main_4@pageoff
bl _add
mov x1, #16
sub sp, sp, x1
mov x1, #0
add x1, sp, x1
str w0, [x1]
adrp x0, _main_6@page
add x0, x0, _main_6@pageoff
bl _printf
mov x0, #16
add sp, sp, x0
adrp x0, _main_8@page
add x0, x0, _main_8@pageoff
bl _puts
mov w0, #0
ldp x29, x30, [sp], 16
ret
/* end function main */
.data
.balign 8
_main_4:
.ascii "abcd"
.byte 0
/* end data */
.data
.balign 8
_main_6:
.ascii "Test %s\n"
.byte 0
/* end data */
.data
.balign 8
_main_8:
.ascii "Hello world!\n"
.byte 0
/* end data */
so basically, other than structs, aggregate types, loops, pointers, references, conditionals, and static arrays
i can write C!!!!
whats "op"
genius
a function
why not just do func
operation
see if I made the language I would've done String add(String a)
func/op is unnecessary
swift syntax
[UnsafeMutablePointer<UnsafeMutablePointerC?>] add
wow
ok time to read sirikit docs
String add(String a) {
return a;
}
public Int main() {
Int a = add("abcd");
printf("Test %s\n", $...$, a);
puts("Hello world!\n");
return 0;
}
I'd do this
@placid kraken opinions?
this isn’t bad i actually was tempted to do something like this just so i could force the dev to say the return type instead of having to infer it from the return value if they don’t provide one
^
you could even technically do public Int? main()
btw what do i do instead of $…$
what even is that
i made it so $abc$ gets put in the IL as-is without any parsing
so it’ll put the exact characters “…” ignoring all types and scoping
it’s there because printf is a variadic function so you need to declare … as the arg after the formatter or it causes undefined behavior
whar
it’s called an “ExactLiteral” internally
basically the compiler works in a way where it tokenizes all the identifiers, literals, etc and then parses them in a tree, string literals, when compiled, are first placed into a global data section and then are referenced as a long inside of the function. the exact literal works exactly the same as a string except instead of making a long and declaring types for everything, it just places the exact characters you type into the IL without any modification
so why not just this
im confused
printf in QBE is variadic which means it can take infinite arguments
when calling it you must declare where the infinite arguments begin
the 0th argument is the formatted string, then the … to denote the rest are variadic arguments, then all of the arguments
but why do you have to explicitly declare that its variadic
idk that’s just how the intermediate language works
i tried to printf(“something %d”, w 3) without the … to denote that it’s variadic and it printed some random number which makes me assume it’s accessing invalid memory
it would parse that as an identifier
actually it wouldn’t even lex it at all because it’s not alphanumeric or digitized
do you know what the ! actually does lmao
! denotes a macro
oh
rust macro
nope, the parser expects a “(“ to denote a function or nothing to denote an identifier (variable)
it would add an extra step and make it like
we have identifier
L is !
L is (
do_stuff(variadic: true)
L else panic
L is (
do_stuff(variadic: false)
L else parse_identifier()
yeah
do that idk
! in math means factorial which kinda has a similar concept to infinite arguments
maybe im just rambling
Wait so your language compiles to c now?
Does that mean you can make embedded c in it?
it compiles to an intermediate language which has c interop
you can call c functions like printf and scanf from stdio
(it’s missing a few features)
not yet lmao i’m still working on compiling a single module to the IL
Okay
but eventually i think i could get c interop
Can you even compile rust for iOS
?
Yeah someone made a tweak in rust one time
so far i have constants, functions, variables, and operations like add, subtract, equal, greater than or equal to
That's neat ngl
Yeah
i think you could even though it’s not one of the rustc targets
Not actually sure if the tweak was fully rust or if it was objc with a rust daemon
either way currently the compiler is pretty small
given that it does so little that makes sense i guess
it’s about 600 lines
iirc might be a little more but my mac died
it essentially just turns an ast into another ast but this time it implements std::Display
and it has to keep track of scopes and data sections and stuff i guess
this is what i mean
i would have to keep track of variadicy
in this
even god doesnt know what zefram code does anymore
elle(kit)
lol the only reason i called it elle is because the qbe ir intermediate language file type is ssa so i can write elle.ssa and make it elsa
watched too much frozen
ignore the compiler in this btw it’s entirely a prototype and written terribly
new and better one soon!!!
this is annoying
im trying to get this working
op isEven(Int num) -> Int {
ret num % 2 == 0;
}
pub op main() -> Nil {
let res: Int = isEven(5);
printf("Is %d even? %d", $...$, res);
}
function w $isEven(w %tmp_1) {
@start
%tmp_2 =w copy %tmp_1
%tmp_3 =w copy 2
%tmp_4 =w rem %tmp_2, %tmp_3
%tmp_5 =w copy %tmp_4
%tmp_6 =w copy 0
%tmp_7 =w ceqw %tmp_5, %tmp_6
%tmp_8 =w copy %tmp_7
ret %tmp_8
}
export function w $main() {
@start
%tmp_10 =w call $isEven(w 5)
%tmp_9 =w copy %tmp_10
%tmp_12 =w call $printf(l $main_11, ..., w %tmp_9)
ret
}
data $main_11 = { b "Is %d even? %d", b 0 }
and it looks like it should work
ok nvm it works
i just did it wrong lmfao
op isEven(Int num) {
ret num % 2 == 0;
}
pub op main() {
let num: Int = 5;
let res: Int = isEven(num);
printf("Is %d even? %d", $...$, num, res);
}
compiles into this
function w $isEven(w %tmp_1) {
@start
%tmp_2 =w copy %tmp_1
%tmp_3 =w copy 2
%tmp_4 =w rem %tmp_2, %tmp_3
%tmp_5 =w copy %tmp_4
%tmp_6 =w copy 0
%tmp_7 =w ceqw %tmp_5, %tmp_6
%tmp_8 =w copy %tmp_7
ret %tmp_8
}
export function w $main() {
@start
%tmp_9 =w copy 5
%tmp_11 =w call $isEven(w %tmp_9)
%tmp_10 =w copy %tmp_11
%tmp_13 =w call $printf(l $main_12, ..., w %tmp_9, w %tmp_10)
ret
}
data $main_12 = { b "Is %d even? %d", b 0 }
🙄
🙄

umm what the sigma
what the sigma
no
Agreed with rosie
No.
is there a way to detect if roothide is installed without using roothide.h?
check jbRootPath("/Library/MobileSubstrate/DynamicLibraries/Bloom.dylib") for the roothide patch files
this won’t work if the user has no tweaks installed but they’ll always have at least one tweak installed, that being your tweak
which roothide patch files lol
roothide needs to convert tweaks into arm64e which involves dynamic patches
it puts a sidecar file in that folder with the roothide patch inside
i don’t remember probably ask someone who’s using roothide to check that folder and tell you what the files are called
thank you :))
you could alternatively check the source code of the roothide.h header and copy paste the implementation they use for checking if the device is bootstrapped for roothide
thanks. such a chaos with roothide... everytime
lmao yep
Rosie fix enmityygg
oh that isn’t being fixed lmao v3 soon
Iriejejrttjndbdnddl
we’re open sourcing in like a month or less
I am going to lose my mind frfr
not releasing just open sourcing
Aw
..which means you can build yourself and run it early lmfao
it just means we’re not saying “hey it’s done go and download it there are no bugs!!!!”
it also gives time for plugin and theme devs to migrate
w
ok so it seems that operator precedence actually works !!!
pub op main() {
let res: Int = 1 + 2 * 3 + 4 * 5 / 6 % 7;
printf("%d", $...$, res); // 10
}
console.log(1 + 2 * 3 + 4 * 5 / 6 % 7) // 10.334
if it was evaluated from left to right then it would be 3.833334
i still cant figure out how float division works lmfao
ok well i figured out something
im either compiling it wrong or qbe is compiling it wrong
export function w $main() {
@start
%y =d add d_0, d_-1
%z =w call $printf(l $test, ..., d %y)
ret 0
}
data $test = { b "test %f", b 0 }
``` i tried to do this
it fails at the linking stage saying it cannot find the _Lfp0 symbol
the assembly is this
.text
.balign 4
.globl _main
_main:
stp x29, x30, [sp, -16]!
mov x29, sp
mov x0, #16
sub sp, sp, x0
mov x0, #0
add x0, sp, x0
adrp x1, _Lfp0@page
add x1, x1, _Lfp0@pageoff
ldr d0, [x1]
str d0, [x0]
adrp x0, _test@page
add x0, x0, _test@pageoff
bl _printf
mov x0, #16
add sp, sp, x0
mov w0, #0
ldp x29, x30, [sp], 16
ret
/* end function main */
.data
.balign 8
_test:
.ascii "test %f"
.byte 0
/* end data */
/* floating point constants */
.section __TEXT,__literal8,8byte_literals
.p2align 3
Lfp0:
.int 0
.int -1074790400 /* -1.000000 */
the reason it fails is because the _main symbol is trying to access the _Lfp0 symbol however its defined as just Lfp0
if i manually change the section to be named _Lfp0 it compiles and i get my result
strange
the thing is, the developer uploaded the code on a custom git instance so i cant make an issue
ah yes, C
@radiant idol what do you think this writes to stdout
pub op main() {
let num: Int = 0;
let a: Int = 5;
let num: Int = num + 1;
let num: Int = num + 1;
let num: Int = num + 1;
printf("%d", $...$, num);
}
What in the goof is this
close!!!
Should be a compilation error
yeah
lol i couldve made redeclaration throw an error but i made it work
in QBE IR you can redeclare temp variables
It doesnt work though
so if you do this
pub op main() {
let num: Int = 0;
let num: Int = num + 1;
let num: Int = num + 1;
let num: Int = num + 1;
printf("%d", $...$, num);
}
``` it compiles !!!

public void main() {
Int num = 0;
Int a = 5;
Int num = num + 1;
Int num = num + 1;
Int num = num + 1;
printf!("%d", num);
}
this looks better
.
this is the IL code
export function w $main() {
@start
%tmp_1 =w copy 0
%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_6 =w copy 1
%tmp_7 =w add %tmp_5, %tmp_6
%tmp_1 =w copy %tmp_7
%tmp_8 =w copy %tmp_1
%tmp_9 =w copy 1
%tmp_10 =w add %tmp_8, %tmp_9
%tmp_1 =w copy %tmp_10
%tmp_12 =w call $printf(l $main_11, ..., w %tmp_1)
ret
}
data $main_11 = { b "%d", b 0 }
Extremely rare nightwind W
i am REALLY tempted to make types prefix the identifier
im actually gonna do that right now
yes because : Type is just unnecessary
It’s not rust lmao
Stupid typescript shit
I was referring to the code above
fr
this code is horror i agree
fn new_var(&mut self, ty: &Type, name: &str) -> GeneratorResult<Value> {
let existing_var = self.get_var(name);
let tmp = match existing_var {
Ok((_, val)) => {
match val.clone() {
Value::Temporary(name) => {
match self.get_tmp_index(name) {
Some(val) => Value::Temporary(format!("tmp_{}", val)),
None => self.new_temporary()
}
}
_ => self.new_temporary()
}
}
Err(_) => self.new_temporary()
};
let scope = self
.scopes
.last_mut()
.expect("Expected last scope to exist");
scope.insert(name.to_owned(), (ty.to_owned(), tmp.to_owned()));
Ok(tmp)
}
not rust
not the nightwind code
that's not rust
but what would you rather i write it instead? Swift? 
it’s a rust clone 
objc
objc
objc
nowhere close
its literally missing if statements, loops, optional types, aggregate types, arrays, pointers and references
Wtf are you even making
my own language
A compiled one ?
yes
ok there we go lmao
that was actually really easy
i already had all the utility functions and types were already mandatory
pub op main() {
Int num = 0;
Int num = num + 1;
Int num = num + 1;
Int num = num + 1;
Int num = num + 1;
printf("%d\n", $...$, num);
}
``` @radiant idol
better
I still don't like the $...$ but
that can stay I guess
i might also replace op with fn because EVERY SINGLE PERSON IVE SHOWED THIS TO HAS ASKED ME WHAT THE op MEANS
change it to func at least
then it becomes a real rust clone
isnt that how swift defines functions
that wouldnt work here because im parsing primitives
yes but at least it's better than fn
can you not return a primitive?
What is it
whar

operation
primitives are different to astnodes
What in the goof
what.
theyre top level and they contain an astnode inside
speak in normal langs
int main() {
int num = 0;
num += 1;
num += 1;
num += 1;
num += 1;
printf("%d\n", num);
return 0;
}
you should make it look like this
What is $..$
it basically means you cant import from modules or make new functions inside of functions
the wha- ok i guess func is fine
smartest orange name👍👍
its an exact literal, it places the characters inside, exactly as theyre written with no types or anything, directly inside of the intermediate language's output
so if i type $blabla$ itll take that and display it exactly how i wrote it inside of the IL code
like this
public class Main {
public static void main(String[] args) {
int num = 0;
num+=1;
num+=1;
num+=1;
num+=1;
System.out.println(num);
}
}```
no type or sigil
Oh ok
i have no clue how to get redeclaration without something to denote its being redeclared lmfao
Yeah that’s java
ill have to lex some new things

This ain’t java
ill figure it out because i do want += which doesnt exist yet
public func main() -> Void {
Int num = 0;
Int a = 5;
Int num = num + 1;
Int num = num + 1;
Int num = num + 1;
printf!("%d", num);
}
it is
lesbian sex?!
@hasty ruin tokenize, lex, whatever
Bro why are u using quotes
i still cant compile floating point numbers because the backend compiles the assembly wrong lmfao
Its 2024
he deleted the message
and i can still type it out by hand
its like a manual snipe
mods message logger :/
I just use my message logger for stuff like that
smh my head
GENIUS ABUSE
Devs can remove reactions bro
Manage messages perms
k n word
so far it looks like ill have to make it
pub icraze main() {}
🔥
better than swift and rust
“ic”
pub joe
ok well its called fn now
i didnt realise just how maintainable this is wtf
i literally can change around things so easily
cmd shift f
“op”
“fn”
yeah unironically
i also renamed the token to Function instead of operation
and general meta stuff like that
func reminds me of swift so imo its even uglier
fn is a abbreviation for fortnite tho
function
too verbose, unironically
I don't even know why this keyword is a thing honestly, having the return type there makes a lot of sense
like we know it's a function already
yeah but the parser doesnt
make it know then ✅
Just use some regex in the parser
also types are capitalized lmfao
pub Int main() {}
``` looks soooo ugly
currently its
pub fn main() -> Int {}
Is this rust again
initialy i made it
expose op main() -> Int {}
but i didnt like those keywords
so it slowly developed into looking like rust lmfao
I expect it to contain a hardcoded error condition if a string contains “icraze”
let c = self.current_char();
if c.is_alphabetic() {
let (kind, value) = self.consume_identifier();
match value.clone() {
ValueKind::String(val) => {
if val == "icraze".to_owned() {
panic!("Do not utter thy words")
}
}
_ => {}
}
return Some(Token {
kind,
value,
location: self.get_location(),
});
}
its not even at compile time its at tokenization time
Is this code ur lang or rust
need to catch such horrible crimes like this early
otherwise they'll develop into worse things
this is rust
Oh we’re not in ONO
Ky

my language doesnt even have if statments yet lmfao
nevermind structs and enums and match statements and tuples
what other things should i have other than += and -= @radiant idol
/= *= %=
*=

!= already exists as a conditional
//
ah true
already exists for comments
and ++ and -- i guess
yeah i was planning to
Something similar then 
you just scared away every swift user
divide by 1 trolley~3
good
Division that drops the remainder
** for muliply by one
isnt that already the norm
oh this is a c style lang so just div with ints and itll automatically drop the remainder
** should be exponentiation
C 🙏
i havent done exponentiation yet horror
num * num is fine for now
i should probably also add bsl and bsr binops
public func main() -> Void {
Int someInt = 2 ** 4;
printf!("%d", someInt); // 16
}
is this what you want the lang to look like lmao
yes
because that might aswell be swift
i do NOT want to write another swift
also Void isnt real, it's Nil
pub fn get_type(&mut self, r#type: String) -> Option<Type> {
match r#type.as_str() {
"Byte" => Some(Type::Byte),
"Halfword" => Some(Type::Halfword),
"Word" => Some(Type::Word),
"String" => Some(Type::Long),
"Int" => Some(Type::Word),
"Long" => Some(Type::Long),
"Single" => Some(Type::Single),
"Double" => Some(Type::Double),
"Nil" => None,
_ => Some(Type::Word),
}
}
why not Void
What’s the !
because idk its always been nil
looks goofy
variadic
he wants it to replace the $...$
need objc interop
nah += is fine
idk what operator dumping is lmao
operator dumping is when you just use like every single special character to do something
like in swift ? is optional(i think)
oh
! Is something
@placid kraken have you done order of operations
yes
🔥
.
any other tokens i should lex?
icraze
this is a true 2024 statement
Icrazy
Nightwind
Are increments postincrement or preincrement
wha
Nice copying iCraze's joke
you mean ++num and num++
Yea
All he does is copy
num++
Ever heard of prysm?
but i can make it work with ++num if you really want it to
i think C lets you do that lmao
increment then return or return then increment
oh, i guess ill do return then increment?
num++ will expand to num = num + 1
just like num += 5 will expand to num = num + 5
I fixed spinlock panics
@placid kraken https://stackoverflow.com/a/20647525
oh its this
anyone who stores the result of a += or ++ into another variable is insane anyway
Nexus was first
Was it really ?
aim released first but I had posted about nexus already
because some of us don’t rush releases 
What the fuck
And some of us don’t memory leak

Those of us in ONO yeah
I had nexus mostly done by the start of December
Those in NON too 
Then aim dropped so I took a little break
nexus was 95% done by the new year but I got burnt out and took a 3 month break
then released 🔥
why tf you got American date format
No Orange Names

this is horror
Some of us don't leak (keys in) memory

I don’t leak them
Some guy likes to crack ifykyk
Won’t say his name tho
:: languages 
Nightwind
ok wait
is exponentiation higher than multiplication in terms of operator precedence
yes it is
oh god horror
qbe ir doesnt have a built in exponentiation instruction
i cant even just use a for loop to hardcode the number of multiplications
because the way it works is that the rhs of the operator can be another AstNode
if it was hardcoded to be an integer then that kinda sucks
because it means you cant call functions in place
that return an integer
Filling a complaint rn
ok @radiant idol what do you expect this to print
pub fn main() {
Int num = 0;
num++;
num++;
num += 5;
printf("%d\n", $...$, num);
}
I expect 12
well surprisingly enough it worked first try
Your shit confusing
i get the operation after an identifier
let res = match operation.kind {
TokenKind::AddOne => Some(AstNode::DeclareStatement {
name: name.clone(),
r#type: "Nil".to_owned(),
value: Box::new(AstNode::ArithmeticOperation {
left: Box::new(AstNode::LiteralStatement {
kind: TokenKind::Identifier,
value: ValueKind::String(name.clone()),
}),
right: Box::new(AstNode::LiteralStatement {
kind: TokenKind::IntegerLiteral,
value: ValueKind::Number(1),
}),
operator: TokenKind::Add,
}),
}),
TokenKind::SubtractOne => Some(AstNode::DeclareStatement {
name: name.clone(),
r#type: "Nil".to_owned(),
value: Box::new(AstNode::ArithmeticOperation {
left: Box::new(AstNode::LiteralStatement {
kind: TokenKind::Identifier,
value: ValueKind::String(name.clone()),
}),
right: Box::new(AstNode::LiteralStatement {
kind: TokenKind::IntegerLiteral,
value: ValueKind::Number(1),
}),
operator: TokenKind::Subtract,
}),
}),
_ => None,
};
if res.is_some() {
self.expect_token(TokenKind::Semicolon);
return res.unwrap();
}
``` then i check if its AddOne or SubtractOne
if it is then i generate a new declare statement with no type (its inferred later)
then i either add or subtract the literal number "1"
and i expect a semicolon
if it isnt one of those 2 operators then
i parse until a semicolon
let mut value = vec![];
while self.current_token().kind != TokenKind::Semicolon && !self.is_eof() {
value.push(self.current_token());
self.advance();
}
self.expect_token(TokenKind::Semicolon);
let mapping = match operation.kind {
TokenKind::AddEqual => TokenKind::Add,
TokenKind::SubtractEqual => TokenKind::Subtract,
TokenKind::MultiplyEqual => TokenKind::Multiply,
TokenKind::DivideEqual => TokenKind::Divide,
TokenKind::ModulusEqual => TokenKind::Modulus,
other => panic!("Invalid identifier operation {:?}", other),
};
AstNode::DeclareStatement {
name: name.clone(),
r#type: "Nil".to_owned(),
value: Box::new(AstNode::ArithmeticOperation {
left: Box::new(AstNode::LiteralStatement {
kind: TokenKind::Identifier,
value: ValueKind::String(name),
}),
right: Box::new(Statement::new(value, 0).parse().0),
operator: mapping,
}),
}
``` then i map the operator with Equal to the right normal operator
Will your compiler be open source ?
then i declare the variable with the right being recursively parsed
already is
hang on i need to push this first
🔥
if you try
pub fn main() {
a++;
printf("%d\n", $...$, a);
}
``` it fails with `qbe:main.ssa:22: ssa temporary %tmp_11 is used undefined in @start`
if you try
pub fn main() {
Int a = 10;
a++;
printf("%d\n", $...$, a);
}
``` you get `11`
✨
ok there
do you handle prefix operators? i.e. ++a
fuck i forgot to remove this LMAO
currently those arent handled at all
the primary parser works like this
fn parse_primary(&mut self) -> AstNode {
match self.current_token().kind {
TokenKind::IntegerLiteral
| TokenKind::StringLiteral
| TokenKind::CharLiteral
| TokenKind::ExactLiteral => self.parse_literal(),
TokenKind::Identifier => {
if self.is_eof() {
self.parse_literal()
} else {
let next = self.tokens[self.position + 1].clone();
if next.kind == TokenKind::LeftParenthesis {
self.parse_function()
} else if next.kind.is_declarative() {
self.parse_declarative_like()
} else if next.kind.is_arithmetic() {
self.parse_arithmetic()
} else {
panic!(
"[{:?}] Expected left parenthesis or arithmetic, got {:?}",
self.current_token().location.display(),
self.current_token().kind
);
}
}
}
_ => panic!(
"[{:?}] Expected expression, got {:?}",
self.current_token().location.display(),
self.current_token().kind
),
}
}
it only parses ++ or += if it sees an identifier first
.
i could make it match for ++ and then expect an identifier right after
anyway ++ and += arent really their own operator
they just expand like
num++;
into
Nil num = num + 1; // the real type is inferred at compile time
and
num *= 10;
into
Nil num = num * 10;
its sort of like a macro
you could write Nil num = num + 1; and it would have the same effect as num++
why the fuck is it blue
arc boosts but i just like how it looks
i figured out how to call rust code in brainfuck
What
run it on real hardware now
@placid kraken is flora rootless only?
i'm trying to get it but it just says unavailable
I believe so?
//
// TokenStorage.swift
// PlayGround
//
// Created by Jaspreet Malak on 4/11/24.
//
import Foundation
class TokenStorage {
private let userDefaults: UserDefaults
init(userDefaults: UserDefaults = .standard) {
self.userDefaults = userDefaults
}
func saveToken(token: String) {
userDefaults.set(token, forKey: "accessToken")
}
func getToken() -> String? {
userDefaults.string(forKey: "accessToken")
}
func clearToken() {
userDefaults.removeObject(forKey: "accessToken")
}
}
``` how does one remove keys for a device on xcode for testing
i wanna clear tokens from xcode if its possible rather than just running clearToken() inside the app
can i run a blank install of an app everytime i run it..?
big F if true
Isn’t there [[Kaleidoscope]]?
Never mind.
I don’t think so only because it says iOS 14+ in the description
it doesn't show up for me at all
isn't the deb on the github
i didn’t upload rootful because i have no way to test it
you’re welcome to build it for rootful and test it yourself but it might have issues
legendary




