#development
1 messages · Page 282 of 1
-# 2 cute 🥰
Ayeee approved at last ❤️
wow my bot got verified so fast thanks @knotty night
my pleasure
so my bot runs half on a website but does anyone know how i can run it for free?
There is no free way to run it
Ah yes because computers, hosting, network and power are totally free, right???
I mean you dont gotta respond like that
It's not an uncommon question
Especially since so many "free" options were shoved down peoples throats
And there is nothing about shared IP address? 
No promotion here, datalix and digital ocean are by far the better vps providers
One is a bit expensive tho
I got to learn programming with these free servers 
google compute engine has an unlimited free tier
they do charge you for excess bandwidth tho
still, my bill is usually a few cents per month
oh really? but they need CC right?
yup
interesting, what i only know is that they give $100 credit, not unlimited free
their system is weird af
but yeah they do give you a "monthly" credit on certain things, effectively rendering them free up to a limit
lmao, i see. thank you for the insight
i mean i got a provider to run the scripts FREE yea but i meana website
So i'm updating users and how i store them, does this schema look good?
i think ima rename flags to permissions
That better not be a plaintext password
Although afaik you changed it a few weeks ago
its not
Good
its a salted and hashed password
But yeah I wouldn’t use flags as the name, rather permissionFlags or permissionBits
Flags is a bit too vague
this is how its stored now
Hopefully not md5 hashed
I use bcrypt
wat, they do charge you for the vm. but if you use cloud run it is mostly free since its usage based and they give like 1 mil requests free per month
do bot reviewers get paid here?
No, but I guess those who are the most active get some kind of compensation
No, it s volunteer work
gotcha
nop they dont
they only charge for bandwidth exceeding 1gb per month
i believe they charge per hour
or did they change
you are talking about compute engine right?
cause i got billed just for having the dedicated vm
even when it was idle
yeah if you use any different settings from the above then it doesnt count as free tier
i have some stuff running in there for 5+ years
occasionally i get billed a few cents lol
Crazy advertising
no its for William who said he would look at my bot it isnt even launched
I would say, I assume you have a transcript system also for the tickets?
But I mean, looking at the system you currently have it seems like a really good build, love the UI. So not much I can add right now.
well its with mongodb right now and there are the messages saved
you can do /setup for a "notification channel"
but i dont know what i can add so people like it more
weirdchamp ads
noo 😢 im asking for feedback
I feel like tickets on discord are better you won't have to open the browser and look for ticket it goes straight to a discord channel where admins get pinged
@quasi lark hi luca please dont advertise here 🙏 (doesn't seem like you intended to but it does come across that way)
5x faster for just using native file copying 🙏
there has to be a better way to do this...
-# ik i added the wrong bsonType i fixed it
better in what way? more efficient?
you could always use bitfields
not efficient wise i mean mentally
well im guessing you have to follow that specific schema format no?
yes
so not really much choice there
i just do this when it creates a new user
do the notification types never overlap? there will never be a notification that can be sent both by push and email?
whats the difference between event reminder and event announcement?
not really
then the format looks fine
and i wondered why user creation wasn't working....
lmao
yeah apparently i thought i coded it but i didnt
rn i just want it to work 😭
pro stack = fetch + node http
extreme stack = undici + uws
i only use express bc it was what i first used for web dev and tbh found it easy to get stuff online
tbh using express these days is fine, because there are plenty of drop-in replacements for express that use uws under the hood
for example hyper-express and ultimate-express
also this project is slowly killing me
wanna work on mine instead? its been killing me for years
I remember doing sketchy ci modifications to remove unused uws binaries
because they were like 90MB 🙏
lmao
tbh im glad i dont host images on my vps
saved soooo much storage
expect this happens....
yea
not much you can do except modify the install script to nuke unused ones
but that could break stuff
do you guys think that Cloudflare R2 will be good enough for a long term use?
rn its all i plan to use for media storage
anything other then that i use Mongo
wasting github runner resources to do musl and gnu at the same time 🔥
also i very much recently learned the importance of github....
one time i saw someone running a discord bot inside github actions
w h a t
you can run a whole desktop with qemu
your account may not exist after doing that though
xD
tim when star new repo(s) 🙏
Same github packages actually supports docker so someone helped me get it working with Dev Space and now i have ready to run containers for both my web and agent with runner builds 🙂
Does anyone know how I can register my slash commands as user installs on discord.py???
who tf are you now
I wont join this stupid bitcoin server
@harsh nova welp
did he got banned or did he delete his message
That's a scam message
So yes it did get deleted lol
could been so "mods" wont see it and ban him
yk
because my client says he is still on this server
I found out how.
i accidently pushed an update that broke our who production server and fixed it by reverting it so that was very helpful
I wont have that issue because the person helped me setup a neat package system.
:latest (Latest version release)
:v1.0.43 (Specific version)
:master (Development version)
ah so i just directly pull from the repo i never really use versions
You forgot to star mine Tim 
Now all i need to do to run multiple agents on servers is a quck command 😄
So much nicer than manually downloading files and compose.
docker run -d \
-p 5555:5555 \
--name devspace-agent \
--pull always \
--privileged \
--restart on-failure:3 \
-v devspace_agent:/app/Data \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /var/lib/docker/volumes/portainer_data/_data/compose:/var/lib/docker/volumes/portainer_data/_data/compose:ro \
-v /var/lib/docker/volumes/portainer_data/_data/custom_templates:/var/lib/docker/volumes/portainer_data/_data/custom_templates:ro \
ghcr.io/fluxpointdev/devspace/agent:master```
Bind to localhost (docker default opens the port to the internet)
Updated config i did the wrong one
also i think i found a better way to handle connection notifications so i dont have to add events for every route
in the actual toast Notification manager i just added the event there 💀
thats what i was asking
basically 5555:5555 says bind 5555 to localhost port 5555
instead of exposing it openly to the internet
I think builderb even explained that
Other way around without the 127.0.0.1: it opens the port to the internet because docker defaults it to that.
@steel scaffold What page on my bot web page did you visit that caused a 404 page?
The entire dashboard is not working in general
Servers are not showing, and nothing is functioning properly
Please use the #support or move to DMs to continue your inquiry
hi im making a bot and i wanted to ask if anyone would wanna test it for feeback
whooops
You recorded your music too kek
i use OBS bc the dumb windows recorder broke for me
and i forget that i record Dekstop Audio
Sounds like some brainrot music too
its not...
add the browser to steam to use its playback feature 
huh?
steam has recording now, u can just add whatever exe to it as non-steam game and it'll be able to use it
oh
🔥
xD 🙏
need more ram
I Can't fully remember would using a url like this: http://localhost:900/v1/users/68390942902cf413c68ed12d/update/profile.bio and calling profile.bio for my field param would that work properly?
url base: /v1/users/:userId/update/:field
It’s not advised to use periods in a url path
It’s allowed yes but it can cause issues if used improperly
Why would you want to do it like that?
A typical patch request is you sending what you’re updating in the body not the url path
it looks for the field and bc bio is under profile you have to do profile.bio
That still doesn't explain why you are doing this in the url
idk but i did just make it so endpoints that update a user require a JWT token to be passed aswell
Something like
PATCH /v1/users/:userId
{
"name": "newname",
"bio": "I'm pretty cool!"
}
And if the endpoint requires a token, could do @me for the userId param if you're allowed to edit other users to refer to the current user
Thats what I was saying
Technically you could also have the @me endpoint call the /users/:userId endpoint if you wanted to save yourself trouble, but idk how that looks like with overhead and what not

my lazy ass would do it
lol
Yep. editing individual fields is gonna just lead to more traffic if the user needs to bulk edit. And if you're gonna have an endpoint to edit everything in one go, basically no one will use the individual field endpoints
less backend traffic is important
yerp
i hate this...
I hate looking at that
?
I can already tell you ignored us despite asking for guidance. If you want to continue doing it the way you are be prepared for a lot of problems down the road
The way you currently do it will get annoying to handle as you scale and get more users
You’ll see an increase in redundant traffic that could be fixed
Why?
You’re getting something working that you’ll "later" change
Whereas you can spend less time just implementing it properly
rip 1 stick 💔
You’re basically wasting time on a path that won’t be walked
bc im in a rush
I don’t understand the thought process behind it
But you do you man
Pushing an inferior product just sounds like a bad idea
When the fix is actually more simple then getting your version working
24 cores, 48 threads
just a little
Bout to say damn
i dont think there was ever any mobo over 8 cpus
48 epycs would be a little overkill
A little?
🤏
What are we Google
google we are what
hey google
hey siri
wsg yall
q jarvis
Hey alexa
Hey bixby
Hey Cortana
Hey IBM Watson Assistant
when you can't make svg responsive, divs it is 
How is that exactly gonna work on mobile though xD
dayum
Shrimple it doesn't
haha dont worry, i've already designed the mobile version
Spent the last 5m wondering why my tailwind styles weren't applying
forgot I needed to add my fuckin app folder to the content array in the config

that must be painful, good that you realized in just 5m xD
my vsc randomly stops showing tailwind intellisense
and then randomly works again for some reason
that happen sometimes to my webstorm, need to invalidate cache or it'll never work again
oh great, sayuri has a disciple
i swear someday i will hire sayuri to make me a website
😮💨 converted my discord bot from Python -> GO
Immediately saw massive performance gains.
Go 💪
you use it?
I've used it on a couple occasions, I really like the language
I hate the error handling
I'd take GO's error handling over any other language except for maybe rust with their result types.
I've never agreed with try/catch
Always felt like a hack
So… C error handling basically
Try catch is a mess but I despise the if err != nil pattern
What would be the alternative?
Besides a result syntax? Which would inevitably still be if !res.ok littered throughout the codebase
Seems like we're on the same page, Waffle – I'm just always curious why folks hate the if err != nil pattern
It feels so archaic
It definitely is haha
That's what makes it so great - simple, boring, verbose, and to the point.
It feels like your code is more about checking for errors than actually handling them. Bubbling them up would be a massive improvement, similar to rust’s ? operator
y'all handle errors 🤨
xD thank you
I've learned to hate exceptions. The only thing worse than being forced to handle errors is exception systems.
I don't absolutely hate the if err != nil pattern but I feel like Rust's error pattern is better.
Im making my first bot that I wanna make public should I make ! commands or slash commands?
Anyone else experiencing slow downloads from https://www.debian.org/
1Gb/s download & somehow the website's download is less than 10Kb/s.
message commands are deprecated and are not a valid reason to receive the message content intent. If that's all your bot needs message content for, don't bother with it. Slash commands do multiple things for you as a dev - type verification of arguments and reducing traffic from what otherwise would be message create events.
The type verification means significantly less processing command names, arguments and their types, message formatting, etc.
At scale, message create events will slow down your thread a lot depending on when you shard and how. Regardless, you should strive towards reducing how much work your thread does processing useless things
how much is "massive"
Hmmm alright thanks, Its a mostly moderation bot butwith a few fun extra commands Im trying to make it like a bot that has mostly everything someone could need a few months in the making hosting it on my home server
i think it needs more scripts right?
No. You should actually combine your scripts and minify them automatically if you can to reduce the amount of requests and data transferred
"c:\Users\removed\AppData\Local\Programs\Python\Python313\Lib\zoneinfo_init_.py" is overriding the stdlib module "datetime"PylancereportShadowedImports @sharp geyser
ive seen sites with 100+ scripts 💀
all scripts
one of your packages overrides the dateline package
or a import from it
doesnt mean its good
Poorly optimized sites
i just had to bring it up lol
believe it or not thats the roblox site 💀
Why do you think its so laggy sometimes?
and shit takes forever to update visually
even after refreshing
Here's my websites current script tag usage
yeah i see it now
also i almost mad a veryyyyyy big mistake
just 1 js file minified and it's great
i was accidently leaking the main API key on each websocket message to all clients 💀
How do you manage that
i forgot to delete the key from the json body
i just did this to fix 💀
huh?
like rn this is all i use websockets for
sse would probably be enough
huh
ws but 1 way
Developing a web application that uses server-sent events is straightforward. You'll need a bit of code on the server to stream events to the front-end, but the client side code works almost identically to websockets in part of handling incoming events. This is a one-way connection, so you can't send events from a client to a server.
if you are using cloudflare this is a better idea
since cloudflare limits active websockets
you could use both, websockets were they're more appliacable sse everywhere else
i was gonna use WebSockets to send live location updates and incident locations
yeah thats good for sse
Like for bug handling?/error catching?
i need to update calls, car locations and more live
unless you update it, for everyone to see
we do
even then, if its not often, you can simply use a seperate http call
it live updates to everyone connected to the screen
many services also simply skip ws/sse entirely and just update data on an interval
also i accidently made black icons on a black backround 💀
http polling is also an option if that wasn't what you were describing
okay let me run an example of what im gonna do
each icon is a call location, as soon as a dispatchers creates a call it would update across all connected clients to our live map and would create an icon and read out the call data
sse
@tacit estuary what are your warnings?
"c:\Users\tails\AppData\Local\Programs\Python\Python313\Lib\random.py" is overriding the stdlib module "random"PylancereportShadowedImports
The entire code works perfectly fine, but the yellow lines are just there.
it's able to run until this https://github.com/Takiyo0/c-resutoran/blob/e7e1e52967191960aecdb5fc5e44065b02562cc9/master/page/master_menu_order.c#L153 and then buffer overflow. but the next code is just printf, so another thread? but how come when i only use this menu
wait
oh
nvm it works


nah, thank you <3
thank you! but it's an assignment so,, yeah. i won't be using it after i submit it

i saw your C code, you've done a pretty great job!

even for my standards haha
i'm sure your lecturer will give you a satisfying score, as your other grades have been looking
I have one C project, it's horrible, but I don't use c so it's okay
thank you so much!! an honor to be praised by c pro

and an honor to be besties with a web pro!
i've been writing C a lot throughout uni
i love it so much
implementing algorithms and data structures in C is so fun
most of it is fun at least
30mb website 🤮
how do they even manage to make it that bad
thats what happens when you have huge teams throwing crap on top of crap without caring about what other teams did and how the stack even works
saving those 7 bytes 🔥🔥
i wouldnt be surprised if they had multiple different systems that do the same thing running at the same time
idk man
like mine is almost 3 MB
but i have high quality images rendering
ye thats not bad
if its images and you absolutely need them in high quality then its fine
i like to compress and optimize mine
its alot of our background images
What do you use
for static images, i make them all 1280x720 (if they are full screen), or close to their real size if they are smaller
and then i run a bunch of optimizers on them
like thats all the images we use and they are higher quality
you can definitely compress those alot
and they are like in the 20 - 30 MB ramge
they are blurred
you could run what's it called
all i do is upload my images to cloudflare R2 Buckets 😭
the one algorithm that generates the like blurry image for preview
blurhash, placeholderimage, etc
Yeah that would work for backgrounds like that where they're already blurry, and keep the resources down
thumb hash is the one i was thinking of
theres also one called "Potato WebP"
lmao
thumbhash seems to be the better one though
why did noone tell me I can do this
[profile.dev.package."*"]
opt-level = 3
[profile.dev]
debug = false
[profile.release]
opt-level = "z"
lto = true
compile deps in release mode and app in debug ??
1s builds that are fast
cheat code
hax
I can finally do a 50mb sha1 in 100ms instead of 500ms in debug mode 🙏
LMAO
You guys know those websites that like offer services for colleges and such
They have a "Find your campus" that it then redirects you to the login page for that campus to authorize yourself and then you are brought back
Is that normal oauth or what? Can you do that without the colleges consent?
What im basically asking is, do you have to partner with the university(s) to be able to have them login directly with their credentials and be brought back or is it just using microsoft/google oauth and targeting a specific organization in the request
if its microsoft, no
you have to get the college to allow the oauth app for the entire organisation
(source: i started making https://teamswrapped.com)
I just figured that out
Have you gone through the process of getting a college to allow it
Who'd you talk to?
head of IT
i had to get permission from them with proof of what it does, how it stores data, where it stores data and an example data export of their user data as proof
i think so
Damn
I mean I dont think its super urgent right now
since I can use personal accounts
but this is something I didn't consider
Stupid of me not to
If you need someone to test, my school allows oauth
I hate everything about HTML Canvas.
why? its awesome
is it possible to make a command like /votes and see how many times you voted for the bot
of course, save a counter for a user in db and increase it everytime a user voted via topgg vote webhook
The interaction between css styles, the dom, and html canvas when you're optimizing for performance makes for ass-backwards code.
Just converting x,y coordinates from the user's plane to a zoomed/rotated/scaled element is asinine because of the way css works
lmao, nice
are you zooming via css or rescaling the actual canvas?
are interacting directly between css coordinates and canvas coordinates?
4 stacked canvas elements, image layer, "static" vector graphics layer, "interactive" vector graphics layer, "user interaction" layer. 3 bottom layers scale and move with css to avoid redrawing image data.
I hate it
svg for the vector graphics layers would be nice
Canvas already does line art and crap using vectors.
I just have to manually set scaling factors for stroke and dimensions (did I mention I hate canvas?)
it doesnt store them as vectors though, it has to draw them as pixels
an svg layer could be manipulated without having to redraw pixels
especially so for an interaction layer that has css effects like hover
yes
@radiant kraken am I going in the right direction? docs https://discord.com/developers/docs/components/using-message-components#sending-a-message-with-a-component

What exactly are you asking
I personally see nothing wrong with how you are currently implementing it
You didn't see the context wait a min
yeah no it all looks rather clean and straight cut
Though I do wonder about the excessive use of String
Null can correct me if im wrong here but String isn't exactly needed here
Thanks, appreciate it, here is the context btw: #general message null helped me a lot on my python library called rustcord which uses rust and wraps it around a python wrapper to use the discord api
I'm also asking since I'm new to rust and this project is to understand it and learn from it
Yeah
From what i picked up of my year of using rust
&str is much more advised here
It isn't an owned type, it is cheap to copy if need be, and there's no memory allocation from what I recall
Also its better for read-only strings since you can't modify it
String -> if you need mutable text
&str -> if you need read-only text
ic, will look into it and modify it using &str, thanks for the advise 
But again I can always be wrong so I still recommend waiting for null before changing anything :p
whoops I'm a bit too hasty
One thing I do remember null always yelling at me for is not using &str more often ahaha
I used String so much
😭
null is currently asleep sadly, cause I am also curious to know if im right 😭

Anywayy, good luck matey and hopefully I wasn't too confusing
you cannot "copy" a &str
you can use a Cow<'a, str>
Well yeah you can't exactly copy a &str in the formal sense
thanks, will work a bit more on it and wait for null then modify it since for now its working smh
well yes but you cant copy it at all 
string slices are not Sized
you cannot do anything with them except share them and read them
same as a normal String struct
Don't worry about &str vs String too much, you won't notice a lick of difference on hardware and premature optimization is bad
Just get it working, get it right, and then make it fast if you need to

yes!
since you can't really store &strs in serde serialize/deserialize structs
i guess you could store Cow<'a, str>s but that would be too much work, just go with Strings
though i suggest you use a String instead of &str for arguments here, since it saves users from reallocating the same String through to_string() if they already have a String
pub fn new(label: String, style: ButtonStyle) -> Self {
Self {
component_type: ComponentType::Button,
label,
style,
custom_id: None,
url: None,
disabled: None,
emoji: None,
}
}
pub fn with_custom_id(mut self, custom_id: String) -> Self {
self.custom_id = Some(custom_id);
self
}
pub fn with_url(mut self, url: String) -> Self {
self.url = Some(url);
self
}
yeah, that works too
&str are still accepted
pub fn new<S: Into<String>>(label: S, style: ButtonStyle) -> Self {
Self {
component_type: ComponentType::Button,
label: label.into(),
style,
custom_id: None,
url: None,
disabled: None,
emoji: None,
}
}
pub fn with_custom_id<S: Into<String>>(mut self, custom_id: S) -> Self {
self.custom_id = Some(custom_id.into());
self
}
pub fn with_url<S: Into<String>>(mut self, url: S) -> Self {
self.url = Some(url.into());
self
}

not necessarily in this case haha
sorry for yelling at ya!
templates 😴
shhh I only have 2 published crates rn
im not doing much libs
I dont usually use Into<String>
i try to keep my rust as barebones as possible so i never get into stuff like templates, traits or stuff like that
only impl so that i can continue with my beloved oop pattern
oop 👎👎👎👎👎
there's nothing really wrong with using too much generics
rip
generics are so cool
a lot of oop is just overengineering but some aspects of it help a lot in clean code
Has anyone every expressed how painful integrating stripe is?
True, thanks for the reviewing 
especially the zero cost abstractions like classes (if you code them correctly)
yeah I do still do some oop patterns in rust
yesyes
missed opportunity to template it as <T, F, Uck>
well you can
what do you know about templates javascript boy
that sounded overly aggressive
enough, ts has them, and also c++
:^)
i remember having to write four generics in one function in rust
in ts i just use any or unions for anything with variable types i think id get sick trying to use templates
i tried making a c++ template for all possible type combinations on a key value store (ie, <int, int>, <string, int>, <int, string>, etc)
it took ages to compile and the binary was almost 100mb
oh or my ts middleware system that had to carry types throughout my entire webserver
💀
it should only derive a template for the type signatures you use though
childs play, try compiling a rust debug binary with no optimizations and debug true
300mb
🔥
ugh hate how drastically rust binaries inflate once you add a dependency
like i'm talking 300kb -> 5mb
is there no tree shaking?
rust's cargo is basically node modules in nodejs
I just set my optimization to z for my github releases
there is
if you use a high enough optimization
to z?
ye
z for dragon ball z
z is basically max perf (except vectorized loops) + minimal size
what about --release?
[profile.dev.package."*"]
opt-level = 3
[profile.dev]
debug = false
[profile.release]
opt-level = "z"
lto = true
np

what's the opt-level for --release then
default 3 i think
oh
lto is like a level 4 but not
The lto setting controls the -C lto flag which controls LLVM's link time optimizations. LTO can produce better optimized code, using whole-program analysis, at the cost of longer linking time.
(5x slower)
Yo ima be so for real
but doesnt matter in a workflow
This is all cool and shiii but did you guys see the new minecraft movie
no
i skipped it when it got released in theaters
but otherwise good
Compiling api v3.6.6 (/root/projects/mcjars/www/backend)
Finished `release` profile [optimized + debuginfo] target(s) in 13.76s
root@remotedev:~/projects/mcjars/www# ls -lh target/release/
total 147M
-rwxr-xr-x 2 root root 147M Jun 4 23:49 api```
tiny
I will now use s everywhere kthx
lmao
me too
didnt know u could have vectorization and size optimization
It is recommended to experiment with different levels to find the right balance for your project. There may be surprising results, such as level 3 being slower than 2, or the "s" and "z" levels not being necessarily smaller. You may also want to reevaluate your settings over time as newer versions of rustc change optimization behavior.
yeah my opt-level 3 binaries are 24M, z are 18M
new workflow -> compile with all different levels, performance test them all, select fastest and/or smallest and publish it
sadly cannot optimize this very far tho
I need the debug symbols for sentry
without them its more like 30M
...
I know of a faster way
x doubt
Math.random() ?
Nah its very simple
Math.random() is much slower
I will tell you in depth right now
what if negative
Simply just don't. If you don't do it theres no need to time it
use another table for negatives
:^)
this one is for unsigned
mhmh
imagine ur lang not having a fast u128 smh
i decided to give it another try at my binary serializer
Imagine having a lang
playing around with it for a bit
what do you think of my archive format? https://github.com/0x7d8/ddup-bak/blob/main/ARCHIVE.md
Ive optimized it very far
smaller than tar.gz and zip
why jsdocs 🙏
Looks about average for a project like it
better than ts
bah
(and still has a file index)
ts will always be better
average Java project:
very cool! i am a huge sucker for custom binaries!

great job!
le byte data lmao, i read that literally, only later i understood it to be little endian
public static <
T extends Comparable<? super T> & Serializable,
K extends Map<? extends List<? super T>, ? super Set<? super T>>,
V extends Function<? super K, ? extends Collection<? super T>>
> Optional<? extends Entry<
? extends List<? super T>,
? extends Map.Entry<
? super K,
? extends V
>
>>```
Im not sure if any other archive format actually does "directories" like I do
🤮
mine are literal directories with entries
zips are just entry arrays, no directories with content
I dont even know what it does
What's your typescript beef
What is that
why does it exist
Guys
Have I ever said how much I hate stripe
cause I really hate stripe
sir I was forced to write this
I was held at gunpoint
like my fucking god why do they make shit so complex with 250+ webhook events
i don't store docs for my custom binaries lmao, so i just look at my old code and try to decipher it from that
well someone wanted a doc so they could make their own js implementation
sometimes i get confused at my old code
(never happened)

i dont like the whole compiler step and the code not being directly executable without compilation
I mean
i like being able to copy paste the source and run it as is
or just node 23+
not if i copy paste into a browser
or whatever
i often copy paste my code into dev tools for testing
L
become multiplatform assembly dev
im making all my shit run in bun/deno/browsers
Pretty sure its a thing already tbh
yeah
Yes
I was trusting aaron's message
I just want the |> proposal
i am indifferent with it
tbh I could care less
people's muscle memories could get used to writing |>
what do you use now
C#
what is the purpose of storing the file's linux ownership?
ew
to restore it like it was before
i use typescript elixir or go
i've never tried elixir
but the syntax is confusing
It also flows nicer with readability
no
looks pretty cool tho
I use rust
BASED
What is |>
Yeah now you do
but then its pretty much linux only right?
but before you hopped on the rust bandwagon you used js / ts
C# is a much nicer language
nah, on windows its just 0,0 always
php is where I get that money
sir
// Status quo
return _reduce(xf(typeof fn === 'function' ? _xwrap(fn) : fn), acc, list);
// With pipes
return fn
|> (typeof % === 'function' ? _xwrap(%) : %)
|> xf(%)
|> _reduce(%, acc, list);
oh fairs
99% of applications are on linux
YOu earn money on php?
example from the proposal
Oh right
Fair enough
cant fault a guy for chasing the bag
I do it too
just in a much slower and annoying way
what the actual fuck
so its a pipe?
looks pretty cool! i feel like python would've benefited a lot from this, instead of js/ts
I was thinking of picking python back up for data analyst jobs
since in python you need to do things like len(' '.join(list(filter())))
but I also cant be asked
I want it for syntax sugar, and readability
Honestly just >> or << :))
like WHY CAN'T YOU JUST CHAIN METHOD CALLS
it's so annoying when you're writing in a repl
Wanna know what else is annoying
That I know later on ima have to rewrite the api endpoints in nextjs to C#
but I cant be asked
:))
😭
I rewrote my prod nodejs app from ts to rust in 1 week 🔥
Honestly may just not
Sorry but I don't feel like making a website in rust
wasm no ty
doesn't matter as long as you get the 🚀
exactly
yea
I dont know how some people genuinely think rust for websites is a good idea
me when i'm making a website in C
It's not
like ok buddy let me load my 8MB wasm rq
nodejs is perfectly fine for it
keep the jsx syntax
god damnit I was thinking of rust and wrote rust
I find it funny people are trying to say nextjs is dead and that no one should use it anymore
nextjs is literally everywhere
Right
like name a full-stack dev that doesn't have nextjs in their stack
I saw 3 reddit posts about nextjs dying and how start or solid is a better option
LMAO
sudo duh /j
virtually no difference
what's vectorization?
💀
ooooo pog
lemme try applying it to my project
since it heavily exports lots of binaries 💀
like i'm talking
???????????????????????????????????????????????????????????????????????????????????????????????????
not even a mb in sight
realistically you can nuke the gnu binaries
musl can be used on gnu
just slightly bigger
(they include all deps)
wait what 😭
what's that in the bottom 
(unless you force rust to)
One of those is a jar file
(and musl works on older Ubuntu properly)
and the other is for some obsucre linux distro
(if you build gnu on Ubuntu 22, you need Ubuntu 22+ to run)
But eh
Just don't bother
😭

BLAZINGLY FAST 🚀
Just initial build a bit slower
if i build a project under those settings, does every dependency also get compiled under those settings as well?
yes
Yes
You can override that tho
troll failed, knowledge success
Either per dependency or for all
how
😭
i wanna decrease my binary size
but without making it slower
ohhhh does [profile.dev.package."*"] apply to every dependency?
Yes

When building in debug mode
It is
me
😭
me 🙂 blazor epic 
😭😭
btw what is the purpose of having the index at the end of the file?
So that I can write file data while I'm building an index
It allows me to never need to seek
So I can stream the raw archive into an http body for example
does that make it hard to do anything about it without downloading the entire file?
Correct
idk if thats a tradeoff i would pursue
Well, zip is not much different
yeah ik, thats why i asked
And tar is out of the picture Anyway
many formats do it
i find it strange, but i guess they were invented in an age where seeking actually mattered
aka hdd age
xD
Mmm
Well I still seek, but only when reading
I seek to end, then seek to offset
Then seek for each file read
yeah but with modern ssd's seeking is pretty much a non-factor
Ye
Realistically I still use tar if I need to stream files over http
Since it allows me to instantly decompress incoming files
Instead of waiting for an index
My format is mainly meant to be stored locally
Currently it's used to store chunk ids of where to find file data
how much of a difference does it make to append to a large file vs prepend to it?
ye i can see why writing the index at the end is better for performance
since you cant know how big the index is gonna be beforehand
Yea
Current format is sometimes faster at listing files than the actual ls command
wasnt there a format that had multiple indexes along the stream? so the stream could be checkpointed
🤷
its faster than both TextEncoder and Buffer.write up to a certain number of chars
Up to?
about 16-32 depending on environment
on chrome for some reason its still faster than TextEncoder at 500+ chars
Hmm
but might be some weird optimization
I've grown to hate dynamic language params so much
I wasn't able to tell that target was a mutable array
target is Uint8Array
xD
textencoder and buffer.write pretty much scale logarithmicaly
naive js functions scale more linearly
from 2 to 1024 chars
It is a good idea because then you don't have to fart around with something as awful as javascript.
Gets a decent performance bump when compiling to wasm too.
wasm is slow af
*was
its only worth it if you're working on big data
Also wasm is slow when you compile some languages into it because then you have to load the GC into wasm as well as your application.
wasm/napi/ffi all have a significant initialization cost as well as data transfer cost, they are only worth it for either data bigger than a certain amount, or cpu-bound functions heavier than a certain cpu-time cost
all of which is pretty much on a case-by-case basis and also depending on the system/environment
wasm is good for image/video editing on the web, thats for sure
but good luck using wasm to process small websocket messages
Im sending a nuke to stripe's headquarters
okay so apparently lto = true makes things WAY faster but adds 100kb to the binary size
is it worth it? what do you guys think
yes
Im so out of touch with js
I dont know how to handle promises outside of using async/await
but I can't use async/await here

lmao
where are you trying to use them?
you can always promise.then(result => ...)
uhh... do they even support async?
they do not, but you can still call async functions in them
you just can't use await
so you can do
export default function Page() {
async function Something(){}
}
you just can't do await Something later on
unless you can somehow make an async function environment
since the top level function can't be async
cant you do ```js
export default async function Page() {}
or this ```js
export default function Page() {
return new Promise(async (resolve, reject) => {
})
}
or does the Page function have to return something synchronously
no you can't do the first one
Nextjs client components cannot be async
only server components
and they also can't return a async element
They have plans to allow it sometime in the future afaik
Is it just one function you need to await


