#🪅-progaming
1 messages · Page 89 of 1
r u gonna make traits
eventually yeah
these are the things i want to do after i finally push iterators to remote
you still didnt push iterators???
i need to write tests and docs`
why should alignment not be packed
lol
i dont think i even have that many files
nono, theres no alignment at all
@valid jetty
its as if you did #[repr(packed)] on a struct in rust but its every struct
i have 32
😭
@valid jetty hiii
why is that bad
267 files
its not bad its just not C abi compliant
how
hiii
how much is in src
79 in src
i have 19
82 rust files in total
(build.rs in root, 1 file in the zed extension, 1 file in the proc macro)
its gonna go up if you ever make a compiler
idk
my rust files will approach 100 when i refactor the parser
"here at lovely, we value good error messages" - kiahjh
the stmt parser alone is 4.1kloc
LMAO
ok thats crazy mines like 20
thats almost triple my total loc
😭
horror
so tiny
the imports alone are huge lmao
#![allow(clippy::cognitive_complexity, clippy::single_match)]
use std::cell::RefCell;
use std::iter::FromIterator;
use std::rc::Rc;
use super::enums::{
Address, Argument, ArrayLength, ArrayLiteral, AstNode, BinaryOperation, BitwiseNot, Buffer,
Conversion, Declare, Environment, FieldAccess, FunctionCall, IfStatement, Lambda, Literal,
LogicalNot, MemoryOperation, Primitive, Return, SetAllocator, Size, StructLiteral, Ternary,
VariadicArgument, VariadicStart,
};
use super::parser::{create_generic_struct, EnumPool, StructPool};
use crate::compiler::qbe::r#type::Type;
use crate::lexer::enums::{Attribute, MutRc};
use crate::misc::constants::ITER_CONSTANT;
use crate::parser::enums::{BlockStatement, TupleDeclare, WhileLoopStatement};
use crate::{
elle_error, enum_hover, expect_eot, get_type, is_type, set_end, INTERNAL_ITERATOR_FORMAT,
INTERNAL_VALUE_FORMAT,
};
use crate::{
lexer::enums::{Location, Token, TokenKind, ValueKind},
misc::colors::*,
not_valid_struct_or_type, token_to_node, GENERIC_END, GENERIC_IDENTIFIER,
};
#[derive(Clone, Copy)]
pub struct Shared<'a> {
pub struct_pool: &'a RefCell<StructPool>,
pub enum_pool: &'a RefCell<EnumPool>,
#[allow(unused)]
pub tree: &'a RefCell<Vec<Primitive>>,
pub generics: &'a Vec<String>,
pub known_generics: &'a Vec<Type>,
pub addr_only: bool,
pub tmp_counter: &'a RefCell<u64>,
}
pub struct Statement<'a> {
tokens: Vec<Token>,
position: usize,
body: &'a RefCell<Vec<AstNode>>,
shared: &'a Shared<'a>,
consumed_addr: bool,
}
i definitely need to move to seperate files soon
my statement parser is 141 loc without macros or helper functions
256 with
and im pretty sure elle does not have 29 times more statements that icy
no, but a statement could be more complicated to parse
you can look at the use super::enums for all the statements
some are more complicated to parse than others
it is due for a refactor but theres also quite a lot to parse
your avg stmt takes 5x as many loc to parse than mine
why are ifs statements
because its not expression-based
as in, you cant omit the semicolon to return it
i could make a seperate keyword to break out of the if stmt but its just simpler like this
parsing foreach alone takes 150 lines
but tbf thats mostly sugar unrolling
no other editor arbitrarily prefixes or suffixes plugins with the name of the editor
tho this is probably from the separation between vim and nvim
how????
and why is location mutable
to set the end range
oh
oh i read that as 500 lines
the logic also allows for tuple destructuring straight in the foreach
idk how
oh lol
150 sounds reasonable
this is relatively ugly but idk a better way to do it
rosie have i told u alr that the job im starting now suddently wants to force windows
im gonna have to buy a new laptop soon
i was planning on putting my current nix conf on the work laptop and using it at home too
the point of them forcing windows is not that windows is better
they want to supervise everything youdo
which automatically eliminates dualboot as an option
if eat!(TokenKind::Comma)
they cant lock down the bios on your own personal machine
do you really think the 2025 supervision software cant detect dualboot
i mean it can detect dualboot
its cause their bank clients want supervised systems
its not my personal machine
oh
they give u a thinkpad
i was gonna use that at home too
but not if it has windows
so i have to buy a new one
cause mine is old and nvidia and has a NINE WATT battery
it was originally 45W but its on 20% health and might explode any moment
lmaooo
macro_rules! eat {
($self:expr, $kind:path) => {
if self.current_token().kind == $kind {
self.advance();
true
}
else {
false
}
}
}
smth like this
i have smth similar
macro_rules! current_and_consume (im not very creative with names) {
($self:expr) => {
let $res = self.current_token();
self.advance();
$res
}
}
these are what i have
macro_rules! try_consume_any {
($self:expr, $($kind:expr),+) => {{
false $(|| {
if $self.current_is($kind) {
$self.advance();
true
} else {
false
}
})+
}};
}
macro_rules! consume {
($self:expr, $kind:path, $loc:expr) => {
if !$self.current_is($kind) {
return err!(
ErrorKind::ExpectedExpression,
$loc,
format!("Expected {:?}, found {:?}", $kind, $self.current())
);
}
$self.advance();
};
}
i mean yeah obviously it would be a good idea to make this kind of macro
macros 🔥
i dont really have this kind of simplification anywhere in the parser
maybe this is why its so long
this isnt real this would fail
macro_rules! current_and_consume (im not very creative with names) {
($self:expr) => {{
let res = $self.current_token();
$self.advance();
res
}}
}
seems that way
yes
torrenting site?
with what framework?
yeah cuz thats really good
its electron
so just insert ur preferred HTML UI framework here
i rendered this with HTML and CSS
saved it as an image
then used it as a background and animated it
Oh yeah how did you get stuff on the aur? I dont wanna read a whole 3 page legal document to put something on the aur.
i never did
It suspiciously looks similar to Roblox's login page lol
Ban.
it's easy as fuck
make account
make app
git clone
git add .
git commit -m "add virus"
git push
and read docs to see what files to add
yeah but apparently theres requirements or some shit
and theyve attached 3 whole pages to read on it
and I dont wanna
@hoary sluice https://www.youtube.com/shorts/I2wOC787u8A
Watch the stream here:
https://piratesoftware.live
Join the community here:
https://discord.gg/piratesoftware
#Shorts #Twitch #PirateSoftware
😭
lc.gem describe the process of creating an aur package in less than 2000 characters
Creating an Arch User Repository (AUR) package involves a few key steps:
-
Gathering Information: Identify the software you want to package, its source code URL, dependencies, and how to build and install it.
-
Creating a
PKGBUILD: This is the core of an AUR package. It's a bash script that tellsmakepkghow to compile the software and create an installable.pkg.tar.zstfile. Key sections include:pkgname: Name of the package.pkgver: Version of the package.pkgrel: Release number of the package (for updates to thePKGBUILDitself).url: Upstream URL of the software.arch: Supported architectures (e.g.,('any'),('x86_64')).license: Software license.depends: Runtime dependencies.makedepends: Build-time dependencies.source: URLs to download source code and patches.sha256sums: Checksums for source files to ensure integrity.build(): Commands to compile the software.package(): Commands to install compiled files into the package directory ($pkgdir).
-
Testing the
PKGBUILD: Runmakepkg -sricin the directory containing thePKGBUILD.-s: Installs missing dependencies.-r: Removes unused dependencies after building.-i: Installs the newly created package.-c: Cleans up the build directory.
This step verifies the package builds correctly and installs all necessary files.
-
Uploading to the AUR:
- Create an account on the AUR website if you don't have one.
- Create a Git repository for your package (e.g.,
git init, addPKGBUILD,.SRCINFO). - Use
makepkg --printsrcinfo > .SRCINFOto generate the.SRCINFOfile, which the AUR uses to parse package metadata. - Commit your
PKGBUILDand.SRCINFOto the Git repository. - Follow the AUR submission guidelines to push your Git repository to the AUR's Git service.
After submission, the package becomes available on the AUR for others to install using AUR helpers like yay or paru. Maintaining the package involves updating the PKGBUILD for new software versions and pushing changes to the AUR.
submisisson guidelines????
who gaf about submission guidelines i put malware onto the aur every day and people install it without them catching on
well thanks for reassuring me ig
has it got animations too or is it just the ui?
is it sane to allow contravariant arity
use std/prelude;
fn foo(fn(i32, i32) -> i32 cb) {
return cb(39, 42);
}
fn main() {
$dbg(foo(fn(x) x * 2));
}
@hoary sluice @deep mulch
the function foo accepts a function with 2 parameters, but since fn(i32) is a subtype of fn(i32, i32), it can implicitly cast (or well, the question is, should it?)
you could write fn(x, y) x + y for the lambda, but since fn(x) x * 2 is a subtype of the former, should you be allowed to implicitly cast it to the required type? the C abi allows omitting extra arguments; they will be safely discarded
its specifically useful for something like Array::map
because you can have [1, 2, 3].map(fn(x) x * 2) or [1, 2, 3].map(fn(x, i) x + i) or [1, 2, 3].map(fn(x, i, self) ...) with no overloading
well i mean in modern elle you have [1, 2, 3].iter().enumerate() but yeah
elle will be blazingly fast
this is so clean!
double_perchance!
SLEEP
how am i supposed to find out whats making it take so long to compile 😭
ive done this before but usually its obvious
here it just splits a bunch
maybe i could shave off some time here
i dont think im gonna find any perf bottlenecks in this area 😭
even though its like 15% of the total runtime
you cant even read the text
i meant on discord
wha
zoom and then send
welll
oh no
depends where i zoom
blame flamegraph for that
@valid jetty
you cant apply dark reader to a local svg
of course its yappanese too 😭
well yeah its inherited from my system
you are addicted i think
"This page is protected by your browser"
i thought firefox did dark mode svgs
or something
im on arc
no dont husk, fuck firefox
it eats up double the memory of chrome and is consistently slower to use
people say "oh use firefox" its not any better
all browsers suck
the only benefit for firefox is that browser pages open and close faster, but the content on browser pages is ALWAYS slower than chrome
even on something like youtube sometimes it stutters at 1080p
hardware accel issue
i have 16gb of ram on an m1 chip, my hardware is not the problem
so true
gecko is so bad
it’s got Temporal though!
firefox is only good because its not chrome lol
zen browser soooo good
but nowadays firefox is unmaintained and just as bad if not worse than chrome
rosie so insane
swithc to zen
i meant unmaintained as in "no new optimizations/features"
zen better 🙏
commits being done does not mean theyre making any real progress
isnt zen firefox based lol
Zen is still missing quite a bit compared to arc
yes but more maintained
they like just made hevc hardware decoding and some other stuff into stable
a few weeks ago
how
cross window tab syncing
idk but i have used firefox and floorp for weeks straight
i tried to like them
but i switched back to chrome and its just faster lol
i can’t use anything except arc, it’s got me so locked down
i dont really care about the arc features other than the vertical tabs, but i have that on floorp and i can easily add it to firefox
idk if theres any difference i can tell
if there is its insignifcant on my hardware
i wish the browser company didnt abandon arc to focus on their ai slop browser
i think the gecko perf difference is larger on a mac
yeah i think so too
wasnt arc already an ai browser
it performs fine on my fedora x86_64 machine
no
it has a few ai features but dia is like fully ai-powered
Chromium used to be hella slow on macos like 10 years ago but it’s improved a lot
yea
yeah
honestly i hope the ladybird project works out and the browser is a faster alternative to everything else
kinda like zed replacing vscode but for browsers
It might be comparable in 10 years
A competent browser seems like one of those impossible projects to me
yeahhh i love when the browser has so many standards its impossible to be compliant lmao
Spec grows too fast
thats a little bit of an understatement lol
how
why does it take a whole second to build ichigo
@deep mulch this is the compilation tree
figure out whats taking so long
I tried figuring out the build process for ungoogled chromium and my mac ended up running out of space lol
256gb ssd?
morphization
512
fix
correctness over performance
monomorphization needs all of those 3 passes
does it cache at all
i keep 30gb around just to mess around with chromium
it cant use previous results because they become meaningless
sounds terrifying
you should add arrows
for the line prefix
i cant tell the flow
no arrows
wha
theres no directionality
theres no direction its just things importing other nested things
the root file imports std/allocators/arbitrary which imports std/runtime/allocators/__internal__
etc
╭< Importing module 'std/allocators/arbitrary'
┆ ╭< Importing module 'std/runtime/allocators/__internal__'
┆ ╰> Imported 'std/runtime/allocators/__internal__' in 341.209µs
╰> Imported 'std/allocators/arbitrary' in 629.125µs
do it for me i will say yay oine time
why not do it like lazy
does it run in parallel @valid jetty
this is a textual output
if you never run anything it can never be slow
no ofc not
single threaded compilation
fix
that would require a whole restructuring of the project
do
@deep mulch i did this today
is there thread safe elle yet
guh?
all elle is technically thread safe considering there are no top level statics
time to implement async programming and mutexes
idk you can already do that if you just use libpthread
rosie will remove stdlib and force elle users to use external libraries
wow just like rust fr
キャラクターたちがコンシューマゲームをプレイしている様子をお届けします!
『Minecraft』 × 25時、ナイトコードで。
イラスト:葉山えいし https://x.com/ha_tak
公式サイト:https://pjsekai.sega.jp
公式X:https://x.com/pj_sekai
(C) SEGA
(C) Colorful Palette Inc.
(C) Crypton Future...
one of these days we will ban wing wong
overthrow wing
@frosty obsidian in how many hours is it the new day for you
John Meyer and Vincent •°|∆•°|∆•°|∆•°|∆•°|∆•° were playing
24 minutes
@frosty obsidian play
zoot will get it in 6/6
yes
wrong channel
crazy official image lol
OMG
i love it
idk what kanade is doing but you go girl
the tools look so wrong
Pablo
got it in 3
wait this is actually so peak
i got you a present 🥺
what is it
that was easy
im stuck @frosty obsidian
||polar||
i cant think of a single word that would fit
yop
think magnets
think of other vowels
got it
mb also hai wing ltns
cant tell you
no
@hoary sluice
do i C or do i go on the 9front
@woven mesa I still have the metal shader
I thought I lost it
though I lost a lot of the code for extracting colors and such
virus
their skins..
THEY DID ALL OF THEM SO DIRTY
do {} creates a new lexical scope
the condition is not in that scope
i’m assuming thats C++, the RAII would clean up things at the end of the scope, so anything after the scope ends is unusable because it could potentially be freed
lexicat
yea you should be using
for (;;) {
const auto cur = (FILE_NOTIFY_INFORMATION*)(data + offset);
auto reason = reasonFromAction(cur->Action);
// ...
if (!cur->NextEntryOffset) {
break;
}
}
instead
ah, that makes some sense
Yeah, I know that part, but it would still be valid after
I ended up just lifting it up out of the scope
helloworld:(print)
@hoary sluice THEY FINALLY BROUGHT SPLIT TERMINAL PANES INTO ZED
YOU HAVE NO IDEA HOW MUCH I WAS MISSING THIS FEATURE FROM VSCODE
FINALLY
this is not a feature from vscode
this is a feature from literally everywhere else
guh?
i wonder how feasible a zed kotlin lsp would be given we now got this in development https://github.com/Kotlin/kotlin-lsp
its very feasible
put import *; at the top of every file to win
insane
i just
akjdbwakjdbjwkabda
the ONE time having a palindrome name is bad
$assert("elle".iter().rev().collect().join("") == "elle");
😭
ababa
whats wrong
i want it to be different in this case because i’m testing the rev adapter
if the output from rev is the same as the input you can’t tell if it actually did anything
bi
@valid jetty hiiii
why did i decide that using my school email for my commits was a good idea
this is cool but you cant actually do this for all cases unfortunately
because if you clone on a Filter struct, sure its copied correctly but the inner Box<Env> is not cloned (there isnt really a deep clone functionality built in unlike rust's Clone trait)
this is the best you can realistically have
time to git filter-repo --replace-email artemiy.smirnov@htlstp.at=artemiy.smirnov@proton.me on all my repos 😭 
my son will get a proton email address and a lifetime subscription to proton unlimited
and a github account with that email
when hes born
infinite contribution graph glitch: just keep rebasing and force pushing over and over again and github will remember your old commits
at least for like a day probably
@hoary sluice nop
no they will always remember your old commits
commits that were overriden become standalone, like a 1-time fork
you can visit their link at any time in the future
oh yeah they do
this is 12 commits
cause i probably undid a commit twice
and then force pushed a rebase
wait no
theres 4 commits on apr 27th
and theyre tripled cause i force pushed twice
nah this doesnt apply to the activity overview idt
cause otherwise i would've had a bunch of duplicate contributions
cause i undo commits often
that changes the hash and creates one of those single commit forks
so im guessing these force pushes are gonna go away too
a requirement for commits is for them to be part of a repo
orphaned commits dont count to contribution graph
wdym
if you git commit --amend and then git rebase and git push, that counts to your contributions iirc
no
$assert(["a", "b"].iter().enumerate().single().zip(Iterator::iota(100)).collect() == [$($<u64, string>(0, "a"), 100), $($<u64, string>(1, "b"), 101)]);
``` what a test 😭
I amend or soft reset like half of all commits I make and I have not seen one that is duplicated on my contribution graph
test it right now
commit something and then amend it and git push --force
see if the number of commits for May goes up by 2
Amend or soft reset interchangeably because there's a button in Zed that resets and sometimes I amend it cuz it's cleaner
u do that
lmao why not just use cli
I checked like almost all of may and I have not seen one that is not exactly tripled and it's tripled temporarily because of my two Force pushes
I pushed two email changed filter repos to icps so the commits are temporarily tripled
And doubled for some other repos but none are an outlier
LOVE
makes it easier to spam the api till you get a response 
retry(callApi, {delay: 0})
oh wait
the default is already 0 😭
insane!
they should multithread this for easier api-spamming
Does js even have multithreading
workers
yes
most native APIs are multithreaded
a good rule of thumb, if you're doing await someglobalfunction() its multi-threaded
for example await fetch() await crypto.something() await fileSystemFilehandle.write(data)
that's all async
and multi-threaded
implementing multi-threading yourself is pretty much the same as in Java tbf
you spawn a thread, use mutexes and locks
aka: its fucking cancer
we dont have Go style multi-threading tho
where ur syntax automagically becomes multithreaded and async
@hoary sluice @deep mulch what other things do i need to test
what im currently testing
there are many libs which can however make any function threaded, not to be confused with multi-threaded, it just means the function's work is offloaded to another single thread
however threading is simply just:
especially if you dont thread absolutely everything
if you only thread a few calls, then you're not really gaining much
can you continue in a loop
yes
internally foreach loops are sugar for while loops
holy shit! portal 2 reference!
^^^
rosinga so smart
i still have to write tests for higher order functions and this new module i introduced recently
namespace TypeInfo;
global pub;
fn TypeInfo::type_of_val<T>(ElleMeta meta, T _) {
return meta.types[0];
}
fn TypeInfo::type_of<T>() {
res := TypeInfo::type_of_val<T *>(nil);
return res.slice(0, res.len() - 1);
}
fn TypeInfo::size<T>() {
return #size(T);
}
fn TypeInfo::is_pointer<T>() {
return TypeInfo::type_of<T>().ends_with("*");
}
looks scary
the usecase is this
you can now technically print iterators
fn Iterator::__fmt__<T, Env, TEnded>(Iterator<T, Env, TEnded> self, i32 nesting) {
return "<Iterator({}) at {}>".format(
TypeInfo::type_of<T>(),
string::as_string(#cast(void *, self))
);
}
TEnded
?remind 14h max minfind any all position sum product
Alright @valid jetty, in 14 hours: max minfind any all position sum product
💡 Did you know you can set your timezone with "?timezone set"?
yo if i edit something on either side of a symlink does it change on both sides?
trying to replicate game saves using symlinks
symlinks are basically just directory that go "if you try to access me, actually access this other directory instead! use my path tho!" so they are basically a portal
meaning if you change something in the symlink you are actually changing it at the original location and the symlink will always reflect the changes
making a new app @woven mesa
i love when something is slow but nothing in particular is slow its just a culmination of many parts which arent that slow by themselves but end up being slow in the end
like yes clearly generate_function is quite slow
but it branches off into 8 parts which all branch off into their little parts
i think the only way to get performance gains here is to use lifetimes and prevent cloning where possible
i saw an article Performance optimization is hard because it's fundamentally a brute-force task a while back, seems pretty awful ngl
good luck with that
also holy hell monomorphization takes a while there
@young flicker my new powers are immense, I love doing things im not supposed to do on ios 18.5
(listing installed apps)
test
manul
Your group is on a 1 day streak! 🔥 Here are yesterday's results:
👑 5/6: @deep mulch @gray heron
it lists ios apps
youve installed
already open sourced..
(and archived because it was just something for fun)
oh
oh sick someone actually made on-device jit enabler
let me jit you bb
Esign
yus
@valid jetty, <t:1748471774:R>: max minfind any all position sum product
this is the iterator unit test file being compiled, which means there are about 150 function calls which need to be separately monomorphized, so it makes sense it takes a while
this is the fundamental problem with static dispatch
i need to monomorphize Iterator::map for Iterator<i32, i32, DoubleEnded> but i also need to monomorphize it for Iterator<i32, Range<i32>, SingleEnded> and Iterator<string, Map<i32, i32, DoubleEnded>, DoubleEnded> etc, and this holds true for all 15 adapters or however many there are
when there are so many function calls with different types that need monomorphization the compilation time quickly creeps up
it takes 6 seconds to compile on low power mode on my laptop and 3.2 without LPM
i could bring it down to about 2s (on LPM) by preventing clones where possible but bringing it lower than that would require restructuring the core monomorphization system and/or the compiler itself
also this is a really good article thank you !!
Hate to be that guy, but could someone look at my pr? https://github.com/Vendicated/Vencord/pull/3430
not sure if im a fan of the text variables implementation
prob my github but theres like 3 lines of space for some reason
Probably just forgot to format it
I couldnt get native notifications to work on macos, could possibly be due to signing issues?
i've been trying to find a better alternative, which wouldnt require external software
Open to suggestions
I could try implementing a selection which uses the select element instead
is this cursed c++?
for c++? not really, in general? yes
nit, but parenthesis is spelled wrong in multiple places
Why not just pass &std::filesystem::path?
I swear I tried that
Let me try again
[](auto&&... should never be valid syntax in any language
also why is it comic sans
sadan hussein is crazy
spending about an hour to get an rpc for it to not even work
it found the song i was listening to but its not appearing in my rpc :(
so i guess pypresence is working instead of discordrpc but doesnt have support for the "listening" type
its pr time!
You may as well just use headless sessions or social sdk if you dont want to deal with rpc
For social sdk?
yeah?
what exactly do you want
i can see you're in the lanyard discord server? why not just use that
i js want a status for what im listening to like spotify ._.
what?
Ah
I doubt there is any, however I have a reimplementation of it in python
like this?
yes except "listening" (which is on the rpc module) and the cover art (which is on the windows api)
does lanyard not support listening
what's stopping you from just making raw gateway requests
the point of lanyard is to yoink data from your rpc and expose it on their api
i thought it worked differently
yoinked rpc data from a server you're in via a bot and exposes it via api
no?
yes
so what stops it also displaying listening data?
that's how i said it worked minus being in the server
that's the point of the application
observe
i think codesoft wants to make their own generic music rpc
guhhhh
anything that goes to the windows media api basically
doesn't that provide
song name
and art
and stuff
what's stopping you from passing in listening
something something https://discord.com/developers/docs/events/gateway-events#activity-object-activity-types
The presence module doesn’t support it
which presence module
pypresence
types.py: Line 12
LISTENING = 2
from pypresence import Presence, ActivityType
import time
client_id = '717091213148160041' # Fake ID, put your real one here
RPC = Presence(client_id) # Initialize the client class
RPC.connect() # Start the handshake loop
RPC.update(
activity_type = ActivityType.LISTENING, # Set the activity to listening
details=input("Your favorite song: "),
state=input("The artist who made it: "),
end=int(input("The length of the song (in seconds): ")) + time.time(),
# At time of writing this, timestamps don't show for listening statuses!
# ...so this field is pointless lol
) # Get the user's favorite song!
while True: # The presence will stay on as long as the program is running
time.sleep(15) # Can only update rich presence every 15 seconds
that doesn't seem to work
and i am on latest
probably was updated but example hasnt
like, the listening status
is presence a RPC
presence = pypresence.Presence(client_id_str)
i don't know what that means
Pypresence uses ipc
install the package as a git dependency
that makes a lot of sense
then it should work
or can i just git clone and pip install .
sure
what does it ipc with
With discord desktop?...
That was old way to make Rich Presence
wwoah what?
how?
i tried this and it fucking sucked
to get mediasession info
this shit sucked
from winsdk.windows.media.control import GlobalSystemMediaTransportControlsSessionManager as MediaManager
from winsdk.windows.media import MediaPlaybackType
from winsdk.windows.storage.streams import DataReader
manager = await MediaManager.request_async()
current_session = manager.get_current_session()
info = await current_session.try_get_media_properties_async()
# Only proceed if music is playing
if current_session.get_playback_info().playback_type != MediaPlaybackType.MUSIC:
return None
title = info.title
artist = info.artist
album = info.album_title
if info.thumbnail:
try:
stream_ref = info.thumbnail
iraswct = await stream_ref.open_read_async() # IRandomAccessStreamWithContentType
if iraswct and iraswct.size > 0:
image_data_size = int(iraswct.size)
image_data = bytearray(image_data_size)
reader = DataReader(iraswct) # iraswct implements IInputStream
await reader.load_async(image_data_size)
reader.read_bytes(image_data) # Fills the bytearray
content_type = iraswct.content_type.lower()
extension = ".jpg" # Default extension
if "png" in content_type:
extension = ".png"
elif "jpeg" in content_type or "jpg" in content_type:
extension = ".jpg"
elif "bmp" in content_type:
extension = ".bmp"
elif "gif" in content_type:
extension = ".gif"
# Create a temporary file to store the album art
# Note: These files are not automatically cleaned up.
# You might want to implement a cleanup strategy.
fd, temp_file_path = tempfile.mkstemp(suffix=extension, prefix="albumart_", dir=tempfile.gettempdir())
os.close(fd) # Close the file descriptor, we'll open with 'wb'
with open(temp_file_path, "wb") as f:
f.write(image_data)
album_art_path = temp_file_path
# print(f"Album art saved to: {album_art_path}") # Optional: for debugging
# Close the stream and reader if they have close methods (good practice)
if reader:
reader.close() # Detach stream
if iraswct:
iraswct.close()
wtf python has a lib for that
Python has library for everything
oh there's one for nodejs too
neat
might make it into a rich pressence thing
best font 
now to finish thumbnail support
i have to upload them to a file host ._.
isnt this great
I DID IT
Camellia ‼️ ‼️ ‼️
Camellia ‼️ ‼️ ‼️
Also is there a way to have it instead of Listening to app name you could have Listening to song name
I wanted to do this, and it seems to be only restricted to apps
aka the oauth2 shit
that premid does
if u figure it out hmu, but from what i've seen its not possible via the normal rich pressence
there is a name param which i'm trying to figure out
yeah it seems to be ignored
i do see you have something working
that's premid
oh whats that
.
@hoary sluice ITS FINALLY OVER
38 commits all at once
fuck i forgot about those core iter methods
????
rosie is the type of person to make an entire page of commits at once
yea
Rosie does more in a day than I do in a month
i have 57 commits total since december
i have... 434
you also dont waste ur time
@valid jetty when will Elle support android NDK
bro 😭 make clean | sh what is this guy on
double my loc just in additions
thats crazy
touch some grass
who is paying you to make elle
I swear I was already using that in node 22
almost like node 22 is very recent node
sdk.social_layer expands to that scope dw
just enable social sdk for your application and you'll be able to request that scope
sir im not using oauth
im using rich pressence
i meant to reply to oauth2 message sorry
isn't it lts
ye
from 2024
weird
maybe the types just looked like i could but i never actually tested
nop
i was disappointed it didn't work on generators
nvm you can types just bad
@royal nymph it's just safari that's late to the party
😭
i dont rly get how that's different from [...iterable].map
wasnt [...] close to costless in v8?
having them on async iterators would be peak
way cleaner
and also chains things properly
could potentially be way more performant
yeah it has no limit tho
thats kinda problematic
drop is based
its legit like seek
but.. why can't you use
.take()!!!!!
who keeps there browser on an old version these days
OMFG
pretty sure it works with firefox esr
ah
nop
vencord cares about their firefox esr users

@hoary sluice OMG
I CAN DO TYPE ERASURE
IN ITERATOR ENV
IT ELIMINATES THAT GENERIC ALTOGETHER AND THE NEXT FUNCTION IS JUST AS SIMPLE
insane..
that completely fixes my “identifier too long” error in qbe
i just store a void* in the iterator instead of Box<Env> and then cast to the right type in the next fn
so simple
there's legit almost 0 difference between them
they both act on yield
i mean polyfills for this have existed for years
so it doesnt rly matter
but still quite brainless
i love polyfill bloat
golang is a strange language
such weird syntax
and just annoying concepts to get used to when coming over from C
writing a lexer is so annoying, glad this part is finally over
have never hated off by one errors more before
this code is so bad, lots of monkey patching that shouldn't exist if i had done it properly
Nope, it's written in rust
writing a lexer in js sounds awful
Just a simple web tool for me to check correctness
ok AnyEnded is a bit of an improvement though still soo cursed
whether the iterator can be iterated from the back
im doing this at the type level through phantom generics
instead of throwing a runtime error
sounds confusing
can it just be hidden away in the compiler side
thats very magicky
do
nope
look
that field is used for this
compile time errors when you do an operation that expects a double ended iterator on a single ended iterator
why husk
no because then you dont know whether its double ended or not at compile time
idk what double ended means
you can get elements from the back
all iterators can yield from the front but not all can yield from the back
for example a Range iterator can yield from both sides
meanwhile an infinite iterator has no end so you cant yield from the back
why does that need another type though
making a seperate class means i would have to duplicate every single method from normal iterators to the class

add inheritance

dont have to duplicate code with composition either
unfortunately i dont have a trait system yet
rosie crazy
wow simply doing type erasure made it compile a whole second faster
Yeah you basically did a lazy loading ( I'm not sure if it's the exact term ), that's pretty neat. Also what is the language you are using ? I don't recognize at all, I though it was Go but.... Go uses walrus operator for assignation if I recall correctly
what else should i do with my media rpc
there is normally a progressbar
the other iterations
yep
they can do playing, streaming, listening, watching
Wow, first time seeing Swift, the syntax looks like a mix of lua and Java / Kotlin to me, this is quite funny. This is indeed good if the OS handle that for you, but I guess you can add some kind of cache or persistence after them being loaded ?
i got the progressbar working (click on my profile to see the rpc)
and i even have this cool config menu with a preview
nevermind its broken
how is it different on all three??
lel
wdym formats
that's the source that gets fed into winsdk
and the other two are what the winsdk data gets fed into
they get the same data...
actually that looks normal
400 liner
- more
I mean this is just how I do it
you can make it simpler by just making a new constant with a uiaction array then using that constant for the children
also I suggest for performance sake don't request such a high res image
are you sure
I'm having issues with orion 🦀
yeah I found it I can just use xcode to make tweaks
with proper code completion
orion has docs for it
well the only issue is that you need to specify objc headers
girl its swift
what do you expect
they can't do much else lol
the class name doesn't really matter here LabelHook could just be anything
I think
theres not much you need
in reality
wtf is that
potentially
@deep mulch finally documented
what about it
why doesnt oslog show up in console..
okay I figured it out
thats so stupid
can you document functions in code yet
no lol
dooo
why would you make it worse 😭
because i wanted to overload it
@valid jetty does rust have an easy way to get the value from a Result<T, E> given that T == E
why would T == E
result string, error string
rosie moment
fn get_any<T>(res: Result<T, T>) -> T {
match res {
Ok(val) => val,
Err(val) => val,
}
}
Heartbeat.swift: Lines 12-15
// MARK: - Class
// ـ♡ﮩ٨ـ heartbeat ♪₊˚
class HeartbeatManager {
static let shared = HeartbeatManager()

i havent touched windows since march last year ❤️
i love winapi i love winapi 
windows 10 
wait since when does c++ have discriminated unions
love
(i say since when like it doesnt tell me
)
good lexer implementation!
what is that part even doing 😭
basically checks if the current string is a valid special token, and if the next character is INVALID for an identifier(meaning the current string is an identifier), it pushes an identifier.
Also the checks push the recognized token and do everything else
horror
that's crazy
@young flicker uses windows copilot
malware
i keep hitting the copilot button when i mean to click left arrow
and when i do use it, oftentimes it spits out latex, which is just rendered as plain text
hop off
love
is the one on the left a better interface than the one on the right?
I like the tags style
comma sep tags looks so weird 😭
your laptop your conditions blah blah
if someone asked to borrow my laptop I wouldn't bother installing windows on it for them

i'll got with colored i guess
nerd
@young flicker
kill this user @royal nymph
unleash the fury of one thousand suns
@young flicker
can I install my preferred os on it
no..
you will adapt
@royal nymph @royal nymph sleep
im writing swift
well these messages were pretty fun to write
not very original, I know
Can't think of anything better tho
I think you should add hexadecimal floating numbers
limits.le: Lines 67-81
fn f64::max() -> f64 {
return *#cast(f64 *, &0b111111111101111111111111111111111111111111111111111111111111111);
}
fn f64::min() -> f64 {
return *#cast(f64 *, &0b1111111111101111111111111111111111111111111111111111111111111111);
}
fn f32::max() -> f32 {
return *#cast(f32 *, &0b1111111011111111111111111111111);
}
fn f32::min() -> f32 {
return *#cast(f32 *, &0b11111111011111111111111111111111);
}
this but with hex
do the totally better version of manually inserting the ansi styles into the string
type.rs: Lines 918-933
if lhs.arguments.len() > rhs.arguments.len() {
if let Some(location) = location {
elle_error!(location
.borrow()
.with_extra_info("This callback takes too many arguments")
.error(format!("Too many arguments were expected in this callback.\nThe function expects {GREEN}{}{RESET}, but this callback takes {RED}{}{RESET}.",
rhs.arguments.len(),
lhs.arguments.len(),
RESET = get_RESET!(),
GREEN = get_GREEN!(),
RED = get_RED!(),
)))
} else {
return false;
}
}
and get_GREEN!() just returns \x1b[32m or an empty string depending on whether you disabled colors (or have NO_COLOR=1 in your env)
yeah i noticed that you did that and i think thats just insane



