#🪅-progaming
1 messages · Page 95 of 1
Java's Optional is completely worthless
but what if a function which returns Optional returns null
eh nobody would ever do that

i mean... there's no way anybody would accidentally write return null instead of return Optional.empty()
java Optional is crap
there's a reason no one uses it
java should just add null to the type system and it would be good
kotlin fixes this
i remember seeing a competent looking project using guice and optional and i felt like such a noob seeing that
i don't think i really like annotation magic
or any kind of magic
unless it's obvious
like
@Event
public void onBadThingHappen(BadThing thing) {
// oh no
}
❤️
i feel like a GoPro
if err != nil
i feel like my code is very spacey
when in doubt i always put a blank line in between things lol
I always ask chatgpt
don't start
was that dariacore that you just listened to
Yeah
hell yea 🔥🔥🔥
Car crash
oh fromtheheart too??? baseddd
finally someone like me!
yes
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
i love insane appstore rules
people don’t listen to the private api thing anyway (just like me, my apps have many)
Hey can anyone help me with this
I installed vencord the way to get plugins
and now it just told me im using an unsupported version
and will be banned from reciving help
Can anyone help me?
If you installed a devbuild of vencord that’s on you, it’s for power users who can actually fix problems on their own
power users 🔥 🦾
I followed the instructions how did i end up with a devbuild????
What instructions
On vencord docs it just told me what to do and what i needed
It wasnt that hard to understand
Yes those are the instructions for a devbuild
The official install has an install on vencord.dev/the GitHub page it does not need instructions
Because devbuild is an unofficially supported way
You are installing third party plugins which can mess with vencord or your computer
If you have problems with vencord it may be caused by those plugins
So we don’t give support for that
We cannot account for those
You are on your own
okay then there is no problem because i was just worried for that warning
And exactly that’s why we don’t give support either, you have no idea what you are doing and it’s not meant for you and it’s more trouble than it’s worth explaining everything to you
To be honest i didnt read that it was a devbuild i was just installing it so that was on me but i know what im doing.
Right
😒
i like the way i try to make my code cleaner and it ends up somehow having 200 extra lines?
??
where did they come from?
every time i make my code cleaner it has more lines

true java developer
maybe my project needs an entity component system
perfection
cleaner code = written by ai
clean code is a lie
okay this sounds stupid but how do i add a domain to this stupid list
webpack my beloved
try rspack
supposedly its a drop in replacement thats giga faster
but its insane just how goood webpack is, and how many cases it handles for you
like take dynamic imports, vite stll just doesnt do good dynamic imports
and webpack can guesstimate exactly what files u wanted imported and shit just works

if you do import(`./data/${name}.json`)
webpack will just externalize all json files in the data folder
yes a 3rd party plugin
indeed
not necessarily but i feel worried if most times i try to clean up i end up with more code
i did manage to reduce quite a lot of LOC by making some things simpler
@woven mesa lol it can reopen itself now
how do u do that
whcih part
@AppStorage("com.apple.SwiftUI.IgnoreSolariumLinkedOnCheck")
private var _ignoreSolariumLinkedOnCheck: Bool = false```
no way you can do that
just did
i added a guthib/donate link to the website for feather
i mean #🌺-regulars message
i don't know how to put a apple app continuous corner mask in the icon..
omg preview app
i thought they only added it to ipados26 as they only said that during the ipados part in wwdc25
why does it show that i had installed it if im first time seeing this lol
i think i could change the colorscheme for the website for feather that im making
idk
ok i think the website is pretty much complete now
i've changed the favicon
C
I C
@solemn ravine ok uhh let me know if you want the source code or if you want some adjustments then i'll make them
since its complete
I'm trying to get all the participants of a voice channel I'm connected to. I tried looking into ChannelStore but it doesn't seem to have that information... ? Any ideas?
oh that's it: Vencord.Webpack.findStore("ChannelRTCStore").getParticipants(channelId)
ive probably found the worst swift code of all time
was gonna be mean but decided not to
High seas is back!
https://summer.hackclub.com/
im too old
I know my codes bad sorry
fellas, just theoretically speaking, would it be possible (and would it ban accounts because it's too many API requests) to write a userplugin that, when I click on a user that i'm friends with in a server, checks all other users if the user is in each user's mutual friends, therefore telling me who in the server has this user friended? because this information is available, but there is no way to retrieve it unless i'm manually going through every user
maybe to stop api spam the plugin only works if the server has less than 1000 people? idk
Yey
automatic license grant
happens for all stock apps
not that it matters its a stub appstore listing that calls the restore method on system app proxies
deleting a system app doesnt delete it because its a framework thats a part of ios and the app itself is a stub to load and execute the framework’s entrypoint
hence downloading system apps on the appstore just tells ios to bring back the stub
ohh!
🏳️⚧️ microsoft
fake ☹️
it real is
i want to make an os kernel with just one c source file
Ok
HOW CAN VITE NOT DO JSON IMPORTS
HOW DOES IT FAIL AT SOMETHING SO BASIC
FUCK YOUUUUU
webpack fucking solved this a decade agooooo
god i hate vite
const viteFixedImportWeTrullyHateViteWithAPassionForNotSupportingBasicFeatures = async <T>(path: string) => {
// previously: return import('doc999tor-fast-geoip/data/locations.json', { with: { type: 'json' } })
const res = await fetch(`/geoip/${path}.json`)
return await res.json() as T
}
this is cool
I wish I knew about it earlier
Could anyone here help me write a github workflow to find all Dockerfiles and build them in a matrix
Like i have no clue how to do this
I got something, but it doesnt work
wth is a discord workflow
find all dockerfiles? is this random and not something specific?
I need to find all dockerfiles in my project, build them and public to ghcr
I want to automate builds
I can send you what i have but give me like 15 mins im in bus
name: Deploy Docker Images to GitHub Container Registry
on:
push:
branches:
- main
- ci/deploy-ghcr # Testing branch for deployment
jobs:
define-matrix:
runs-on: ubuntu-latest
outputs:
image_names: ${{ steps.set-matrix.outputs.image_names }}
steps:
- name: Find Dockerfiles and set matrix
id: set-matrix
run: echo "image_names=($(find . -name 'Dockerfile'))" >> "$GITHUB_OUTPUT"
build-and-push:
runs-on: ubuntu-latest
needs: define-matrix
strategy:
matrix:
dockerfile: ${{ fromJson(needs.define-matrix.outputs.image_names) }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
IMAGE_NAME=$(basename "$(dirname "${{ matrix.dockerfile }}")")
IMAGE="ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest"
docker build -f "${{ matrix.dockerfile }}" -t "$IMAGE" .
docker push "$IMAGE"
ehh but i have no clue how this actually wokrs
that rewrites the file to js
which then makes it impossible to exclude from caching
also I'm importing from a dependency, not my own data
@woven mesa HOW DO I MAKE HOMESCREEN LOOKING COLLECTIONVIEW WITH PAGING
idk what that means,,
@woven mesa crying it looks so bad and I cant scroll or drag
its just a normal collectionview
When your on a boat, and your bored, anime is a good option

Or swimming
Depends
Ohh

@woven mesa you have no clue how much more tweaking I need to do for it to be perfect

it sucks rn
@solemn ravine i added korn to the website for feather

actually i think i should change the font to nunito and use fira code for code
looks uhh kinda better now
can’t u just like make a shell file and launch it inside gh actions
Yes but then it wont run in parallel
Anyways i fixed it already
nice
this looks like a Minecraft mod website
like lithium or phosphor
oh
why is the logo a square 😭
@solemn ravine i don't think this would work
it's just gnu make
most systems use gmake as make so they'll be the same, but some systems use other makes
it's like how there are different standards for /bin/sh
on most distros it's just bash, but some other distros may use dash or other shells for it
make was originally made ages ago at Bell Labs
over the years people made different mostly compatible implementations but with their own extensions, like GNU make added conditionals
like pmake/bsd make, gnu make, dmake
there's also nmake, Microsoftslop
veemake
you usually use sh if your script is "posix compliant" aka will run on any good shell
but if you use bash specific features you explicitly use bash instead
it's very similar with make, if you use make you should make sure your Makefile is compliant will all implementations. if you use gnu specific features, it's better to explicitly use gmake (or pmake if you're using bsd features)
vee going on a nerd yap

I'd like to interject for a moment - what you are refering to as make is in fact gmake, or as i have recently taken to calling it GNU/Make.
on mac at least gmake usually just means a more updated make, because the one mac comes with (make) is older than most people here
yes it would
even though inherently they’re the ‘same thing’
whyyyy 😭
No such file or directory
make is sadly located in a protected area
also funnily enough gnumake exists
which is just a copy of make in the same protected area
most of the system is under a secure volume so you can’t modify it or mount it without explicitly turning off security features in recovery mode
and a lot of the tools it comes with is from like 2006 
I guess it doesn’t need updated stuff but it kinda sucks, at least there’s options to get newer stuff
i don't really know how to put apple's app mask thingy on it
could make it rounded tho
you know it’s so old when the make it comes with doesn’t support multithreading
INSANE
okay maybe this won’t work the directory name is wrong
you mean sip right
me when i want to pnpm install --frozen-lockfile and it doesn't let me download because i didnt run pnpm config set strict-ssl false and i waste 20 minutes of my life:
@royal nymph your dumb bot breaks with new pnpm
gotta add a couple lines in workspace…
oh nevermind
onlyBuiltDependencies:
- better-sqlite3
- canvas
- esbuild
+ packages:
+ - .
yeah i was being stupit
shrimply dont use new pnpm 
can’t help it
I found this after like 20 minutes of digging on github
weird arbitrary changes smh
i love typescript
es2026
available since 2022
what did they mean by this
like it's not even in typescript yet
cursed typescript my beloved
export function TAssert<T extends {}>(value?: T): asserts value is T {
}
how to make sure that my makefile is compatible with all of them?
tell claude to make sure it's compatible
use xmake
i dont want to take out an bfg to shoot flys
what are general rules?

unironically nix may be a good solution to that
only other good use case
@royal nymph make nix fork called Vix and uses a sane language
how does ts-expect-error even work in types
if typescript runs into an error, how can it evalualate the type
wouldnt that just default to any and be worthless
then you should type it that way
by using ts-expect-error you're obfuscating the reality
people could think that that branch is typed
if a branch is impossible to reach, then never should be used
that's one of the intended uses of never
i think we will have to disagree on this 
LMAO
its funny because it's so obviously caused by vibe coding
rename folder in git, only change caps
git for windows doesn't recognize any change because windows doesn't recognize case in filenames
CI fails because path not found
I LOVE WINDOWS I LOVE WINDOWS

||might be a config issue, but if it is, the defaults should be better||
i think thats just a skill issue
i dont think its a config issue]
i have a lint rule for this exact problem
thats smart actually
git mv is your friend
git mv --force Balls.java balls.java
or just rename twice and git add inbetween the renames
Balls.java -> jhisdasjidjijdias.java -> balls.java

just spent ages googling to realise my problem was caused by not saving a file
i used to complain about intellij automatically saving files
but there are so many issues i've had from forgetting to save them
😭
i think i just like the satisfaction of pressing ctrl+s
not really, that should be something that git detects
i was searching for a postgres library called pgx
and i accidentally clicked the wrong thing
how tf would it detect it
it's the same file
hop off windows if you don't want case insensitive files
wdym... surely there's api to see the name of a file
idk why everyone is saying that windows considers it the same file
that is the default behavior, but you can make it case-sensitive
I feel like making windows case sensitive is just asking for trouble
https://learn.microsoft.com/en-us/windows/win32/api/FileAPI/nf-fileapi-createfilea#parameters
Access will occur according to POSIX rules. This includes allowing multiple files with names, differing only in case, for file systems that support that naming. Use care when using this option, because files created with this flag may not be accessible by applications that are written for MS-DOS or 16-bit Windows.
much like how making Linux case insensitive would also be asking for trouble
yes, however using it to detect if a folder has been renamed in a case only way is a valid use case for this
you can create a case sensitive drive but making your C:/ case sensitive would be insane
you aren't touching any files
no
just make a separate case sensitive partition for your coding folder 
drive letters are hard case-insensitive
or hop off windows
wdym though?
if you rename the case of a filename that is observable
i'd love to, but linux doesnt support my laptop yet
networking drivers still borked
just use lan 
on top of tons of others that i don't know about yet
laptop
lan
I used to have WiFi problems on Linux cause this stupid WiFi USB adapter I bought is an unstable piece of garbage on Linux so I just switched to using LAN

they don't officially support Linux so there's only unofficial drivers
there is an experimental one in the kernel but it was really bad, I found a third party driver made by some Chinese catgirl on github and that one was better but still unstable

the kernel one had really slow speeds
the catgirl one had full speed but it would regularely just crash for whatever reason
hopefully qualcomm will get their shit together and we'll get working wifi drivers
it was some tplink / realtek slop
I mean it's my own fault for buying an adapter that doesn't even officially support Linux
I just bought the amazon bestseller cause I was lazy 
you should've used the polish drivers
🇵🇱
MDN INSANE
WHO DESIGNED THIS SHIT
need to know the currently focused element
focusin event
shit, safari only
reality
my dad's laptop's wifi chip (ubuntu) is shit so he hooks up his phone and enables usb hotspot 
I mean this is a pretty serious issue lol
Hi
how would you do in nodejs
to force process exit after 19s
but not necessarily 19s if every other task finishes before that
if I just do a timeout it'll wait 19s for that timeout >:(
been trying dumb things with async_hooks to check if the current timeout is the only pending task but couldn't figure it out
you'll have to track your tasks with something like promises
then you can do
import { setTimeout as setTimeoutP } from "timers/promises";
await Promise.race([tasksFinished(), setTimeoutP(19000)]);
o
vee knows all javascript
OBJC TAG
devine focused element for your use case
do your service/app/software supports filenames with newlines?
focus-visible, hover ?
dont you need to unref that timeout?
i never used the promises timeout so im actually not sure xD
huh
since when
i remember i always had an util for timeout which was
export function setTimeout(...args) {
const res = setTimeout(...args)
res.unref?.()
return res
}
is this classic settimeout
no you still have to
but i mean I was assuming they'd just process.exit() as soon as the first finished
ah i read that code as "yeah there's nothing else to run so nodejs auto exits"
https://x.com/e_opore/status/1934993263867400600
Bash
Oh My Zsh
it’s that guy who tweeted this if you’ve seen it
wifi
I'm more concerned about omz for objc
well yea that too lmao
actix is not a framework
you assemble components like askama for templating alongside it
actix is fairly popular but everyone using tokio is on axum anyway
i sent this fucking picture to another server and everyone went like “yeah that’s accurate” then when i pointed out at internet or wifi they were like “so what? they obviously meant ethernet or wifi”
can’t believe they’re consuming ai slop 😭
java
asp.net
bro must have forgor to prepend "Microsoft" before java
look at all of his replies
dude knows three sentences
Thanks for your feedback
i have all of these
do you have internet or wifi
if that i5 ends with F then your cooked

why
because F means that the processor has no integrated graphics and needs a graphics card
and the tweet says NIL
which means none
oh in that case yeah
yeah
luaism
also for some reason it says you must have vscode
we say either null or NULL
i do
npm is husk

ADVANCED JAVASCRIPT
LET
CONST
VARIABLES
sorry beginners NO VARIABLES FOR YOU
we have ways to work without variables
function pi() { return 3.14 }
console.log(2 * pi() * 4)
Sorry but functions in js are first class objects and also very technically variables
Object.defineProperty(globalThis, 'pi', {
get: () => 3.14,
set: () => {}
});
console.log(2 * pi * 4);
i dont think Object.defineProperty is a variable
so is console
Yeah
i dont see any variables 🤔 🤔 🤔 🤔
js is sooo insane
use pnpm or refactor your storage drive
yes
jsfuck is so funny
/run ```js
""["constructor"]"constructor"()
Here is your js(18.15.0) output @royal nymph
hiii
that apparently breaks deno repl
this is essentially how jsfuck works
/run
1..constructor.constructor`console.log("hi")`
Your js(18.15.0) code ran without output @glacial mirage
Here is your js(18.15.0) output @glacial mirage
hi
brackets are for nerds
no clue how tho
""["constructor"]"constructor"()
not "["constructor"]"constructor"()
using only those few characters, you can get empty string ([]+[]), true (!![]), false (![]), numbers (+false=0, +true = 1, just use addition to get higher numbers) undefined [][0] and NaN (1 + undefined)
we can turn those things into strings to get a bunch of letters, like to get t you do (true+"")[0]
with these letters, we can get new things like []["flat"] which we can turn into a string to get way more letters
and so on, eventually you can get all ascii characters this way (and you can use String.fromCharCode to get any character your heart desires)
then you can just do []["constructor"]["constructor"] to get the function constructor which allows you to create a function from a string (aka eval)
it's so funny
GUHHHH
why does window.onmouseout fire on svgs
you mean doesn't?
no
it shouldn't fire for svgs doe?
iirc they aren't part of the dom
and a lot of shit doesn't work on them
it's funky
i mean svgs directly used with an svg tag, not via an image
yep!
might be because svg isnt an html element
yep! which is why i was confused by ur msh xd
how to instlal the bot?
so silly
this makes absolutely no sense whatsoever
javascrip
it does make sense
its just stupid
+2 = 2
Boolean(2) / Boolean(-2) = true
!Boolean(2) / Boolean(-2) = !true
!true = false
!-2+2
!-2 gets evaluated first and !-2 is false
false + 2
false = 0
0 + 2 = 2
thats how booleans work
it does
only the last one doesnt
the last one is just because if js doesn't know how to add two different types together it just turns everything into a string
everything in a computer is literally just 1s and 0s any data type boils down to 1s and 0s in a specific format
numbers are just binary
words are just bytes mapped to specific characters
booleans are just bits with 0 being false and 1 being true
just 1s and 0s
of course a little more complicated than that but yeah
is there a vencord doc app? I looked at this one
https://docs.vencord.dev/plugins/
but it looks like its incomplete
this one's the most logical lol bools are just ints
jesus electron transparency is problematic
what about this one
undefined always converts to NaN so incrementing 1 to NaN also just equals NaN
it feels weird that ++ gives you the converted previous value but ig it makes sense
you would've thought that the expression myVar and myVar++ would yield the same result but that's not the case
which ig shows that it's really just syntax sugar for (++myVar)-1
guys I just tried Vibe Coding and I think we are not ready for what's coming...
i hate shadslop so much
even worse than bootstrap
imho it doesnt get better than that
i think what you mean is you hate people that use shadcn without customizing it at all and leaving everything default
which i can agree on
what is shadcn
looks pretty useless
its good but people are too lazy to actually style or change the components so all sites using them look the same
how do instantly announce your level of qualifications to the world
@hoary sluice i won some stuff and 400€ with the voice assistant
MUNI
u alr finished it??
i feel like in a real app you should not use go's built in http server
no
you should use net/http
i mean you can't even easily customise the method not allowed response
yea i'm using it for learning as i understand it's good to learn the standard lib
but you have to use stuff like http.StripPrefix 
in a real app you should build your own webserver in rust which forwards info to go which then acts as an html pre-processor
i also had to create a wrapper to allow returning an error
this is such a useful app
yea but i'll also work on it during holidays and then theres another competition in september with this kind of stuff
wtf is c!
what kinda naming is that
wtf v0 is now really good?
as much as i hate ai, this is.... decent
its not amazing, but its decent
took 22 versions, a lot of manual editing, but its a great tool when u know what u want but suck at design
a lot of it is still bad, the code is awful, the icons are bad, the paddings are bad, but that's all correctable
so kinda w
it has the most taste out of all the tools I’ve tried, and it’s the best generally
yeah its... stupid as shit
it just uses premade components which are good as a base
but that alone puts it leagues ahead of everything else
Yeah that’s a huge advantage
i told it to use svelte instead of react shadcn, and holy was it dogshit XD
I thought it was locked into next/react
"no"
you can tell it to use other frameworks
but it doesnt do a good job
keep it react and port it yourself
xD
it doesn’t seem good for anything serious
i mean
the moment you start doing custom shit, all AI fails
but it did a decent enough job
like its defo a good tool, it defo saved me a fuckload of time and effort, and its defo better than what i would designed, but its not perfect, im sure my designer friends which i often ask for help would have beat it
I just wish you could disable this
the temp storage part?
yea
i just want to parse one file limited to 50kib and error if there are any more
this doesn't really achieve exactly waht i want
it feels odd to pass in the limit twice
unused values being errors feels annoying because it makes me check every time i declare a variable
i prefer them as warnings simply due to the colour coding in ides
what happened to hastebin lol
wow i guess generic pastebin might be handy after all (i was just making it for learning)

i vibecode all my frontend 🙏
frontend deserves to be vibecoded 🙏
when i see messy code i assume it's python
turns out this was go code
i think i feel quite bad about python mainly because it's often beginner code
github gist is all you need
corporate takeover moment
pastebin has always been shit
that's why we use gist or hastebin

maybe there's a hastebin alternative that isn't dead idk
GUYS THERE IS NO WAY
I got fired today. I'm not sure why, I personally don't think there is a reason, or that it's important.
When I joined twitter, I joined because of the engineers I met in SF. They seemed happy. They were having fun. Engineers at play. Engineers that were enabled. It was good!
I was gonna check powercord.dev/haste but it was bought by some slovakian online pharmacy
LOVE
@placid cape
@royal nymph open to work
Finally
128.2k posts
kilo abbreviated wrong
common twitter L
Loool
there’s no way he’s employed, right?
one of the replies is from some betting site wagering on this guy getting a new job soon

weird world
I feel like this is just which one do you expect more of
well with high loads there’s gonna be a lot of both
Linked list.
yeah probably idk
If you're unsure, focus on making it easy to swap the data structure for another one.
at the moment collection happens very often which prevents clogging, and the threshold for collection doubles if > 75% of objects stay alive after collection
yep i wrote it like that from the start
Yeah. Nothing wrong with it then
Is this the slow part of your system?
And do you have other parts that need more attention?
It's more of like, if you can just do it later
well at one point the threshold was 32 * 1024 * 1024 bytes, which, when that got full and collection was triggered, took a full 5 seconds to complete because it was looping through hundreds of thousands of objects as it’s a conservative gc
right now the min threshold is 32 * 1024 which takes only a few ms to collect
this part was high attention for a while because beforehand i used a hashmap to store pointers but as i pointed out in my original message that didn’t have interior pointer support
so considering i switched data structure anyway i thought i might aswell ask which one is the best to switch to
Linked list makes the most sense from the perspective of being easy to get right
The best one would be a hybrid. And require profiling and tons of measuring to polish it to perfection
if you did something as simple as
fn main() {
x := #alloc(i32);
y := x + 1;
x = nil;
}
``` the gc would never find the allocation and would think it’s unreachable
yeah probably
that’s exactly why i switched to that first yeah
Yeah, so a valid way of going about it
i did do a little profiling with this linked list approach and it doesn’t seem to have a very big effect on performance
as the dips aren’t synced with cleanups (when the object count goes from 32k to 200) the dips are just random system throttling stuff and unrelated
at a capped 240fps the collections have 0 effect on performance
i did also test with the gc disabled (leaking everything) and the performance was about the same
How are you measuring perf?
well this is a raylib game that does a bunch of allocations for stuff like iterators to display on the screen so i feel like it’s a better real-world use than just allocating a bunch of things and timing cleanup time
This is rust right? So there's gonna be good bindings for tracy and you can have some more scientific flamegraphs.
For your GC bits
nopee it’s my own compiler
Ok
Nah, I'm more saying using a low overhead profiling framework
Tracy can give you double digit nano precision
Worked on this a while back, modern MC has tracy built-in but I wanted it on 1.7.10
zig 💔🥀
i see
And also FalsePattern is the one who made the ZigBrains JetBrains plugin so good test case
Ziggy
memcpy (memory allocator)
https://x.com/OSdev_/status/1936417734252003593
I love ai accounts
veeee 😭
i thought i was the only one seeing these ai slopcoder accounts
someone was saying they're reimplementing tsc in rust and i couldn't believe it
Copy qword by qword dang
Or abuse AVX/SSE instructions
fiber looks better than go stdlib
servemux behaves so weirdly
i've had problems where you need trailing / otherwise it returns 404
the main issue is servemux but the responsewriter isn't as nice to use as hono or express
That's the replies they want.
That's how they get traction
They got you, they want smart people to reply in the comments
So they get traction

i decided to check post comments
void *memcpy(void *dest, const void *src, size_t n) {
unsigned char *d = dest;
const unsigned char *s = src;
for (; n; n--) *d++ = *s++;
return dest;
}
quite silly
inline void* memcpy(void* target, const void* source, const size_t size)
{
for (size_t i = 0; i < size; i++)
((char*)target)[i] = ((char*)source)[i];
return target;
}
@runic sundial why is there no inheritance in
how tf do i like do anything
skill issue
am i supposed to like make a big ass switch statement or
what are you trying to do
i was just bored and decided to make a chip8 emulator in zig as a way to both learn zig and emudev. so i just thought maybe i could like make a separate struct or whatever for each opcode so i can just implement their logic inside their pub fn execution() and then just call it for any generic opcode like
idk it seems cleaner
Duck types.
Or vtables
Or composition
But for opcodes?
fucking husked 
idk it seemed like a good idea
For opcodes a huge switch statement is almost always the way.
Regardless of language
argh alright
Is it clean? No. Is it readable? Yes.
it just looks ugly so i thought maybe i could come up with a better idea
compiler will probably generate a jumptable for you
Where the opcode is the index into an array of functions
But if you insist on inheritance?
Look into how duck typing works
i guess i'll just do it the regular way cause what you're saying sounds kinda scary ngl
And what comptime can do
It's closer to C than C++
You can have inheritance, but you need to do it by hand.
are there no interfaces
Duck types get you close
afaik no
duck typing in compiled languages sounds scary
Yes, the insides of Allocator are a good example
Was on the tip of my tongue, thank you for pulling it up
would be cool if go maps supported . syntax
myMap := map[string]uint64{
"ducc": 1024751454751309996,
}
fmt.Println(myMap.ducc) // 1024751454751309996
Horror
is vtables the c/c++ name of interfaces?
it is the way how they are implemented
interfaces are classes with pure virtual functions (virtual void thing() = 0;)
(idk)
idk on papare interfaces and vtables sound the same
and are used the same way i think
i don't think the concept of interfaces exists in c++
you just conventionally would probably call something with only pure virtual functions an interface
it's also the way virtual functions are implemented in general, not just pure virtual functions
i mean they are liteterally "virtual tables"
vtables are arrays of function pointers
they allow polymorphism to exist via dynamic dispatch
then when you call a virtual function, it gets looked up in the vtable to determine which function to call
it is not related to interfaces almost at all
oh T_T
Thats not happening lol
myMap.42 would be weird
only rust allows that syntax and its for tuples
i think you mean based
$ prefix would allow using variable instead
func getValue[K comparable, V any](m map[K]V, k K) V {
return m.$k
}
that just seems like a bunch of syntax hacks when the universal x[y] syntax already exists and handles all of the cases you could ever want with operator overloading
thats the same amount of characters
m#k
better syntax 😊
m[k] literally works in all cases
you want array indexing? put a number in there
you want map access? put the key in there
you want a variable in it? put the variable in it
?? obviously the idea is to add a character to unicode for this
no extra syntax for different cases it just handles all of it at once
you'll love crystal
yea the biggest benefit is that is clearly separates everything especially when you use variables
that too yeah
aswell as, its been in use for decades, every programmer ever will recognize the syntax
true...
bar = 2
foo[bar]
foo.bar(?)
$k.m
youll love elle
life was so good while i forgot rust existed
i forgot how to do hello world in rust because i couldn't remember what you import for the print function
..nothing?
then i remembered it's built in
lmao
cant you do this in c
you can yeah
what is going on here
i stole it from c
Rust doesn't have a print function
oh uh
It has a print macro
dont worry about it :3
oki
It's a language for goofy people by goofier people
erm axhually it expands to a print function.....
isn't it just a function with an ! in the name
to make it seem more exciting
god said "let there be bidirectional memory access" and suddenly ```rs
i32 x[42];
(41[x] = 39)[x] = 41;
$assert(x[x[x[41[x]][x]][x][x]] == 39, nil);
explode!(@winged mantle)
husk
let mut stdout = std::io::stdout().lock();
stdout.write_all(b"Hello, World!");
wait couldn't you add a todo! function in kotlin to make it more rust like
😭
print? "hello world"
50/50 chance of printing
PRINT "hello world" outputs HELLO WORLD
all your fancy complex languages with tons of syntactic sugar and everything cant compare to php
face the wrath of my die;...
perl -e die
why does this have no error
who made this language
i love implicit parens
no the funny thing is exit by itself gets ran as the "language construct" while exit() gets ran as a regular function and can also just be overwritten
right of course
being serious for a second I think something I've liked about go is the code aestetic
it feels pretty compared to a lot of other langauges
:=
why is there a penis opperator
its not the penis operator its the walrus operator
i mean the assignment operator
no wait
the short variable decleration
this is like kotlin i fear..
are u gonna add emoji variable name support
yea i swear it's prettier than seeing let everywhere
technically you can :3
/run
<?php
$🥺 = "Hello, World!";
echo $🥺;
Here is your php(8.2.3) output @lavish frigate
Hello, World!```
lmao
rust users writing let all day while go users write the much prettier if err != nil { return err }
GOOD
i guess assigning to x[41] returns only the offset to index 42?
i32 x[42] means the size of the buffer is 42
but indexing is 0-based
actually it's usually
if err != nil {
return errors.New("some helpful thing: %w", err)
}
so 41 is the last one

real golang users dont check for errors
horrible
so corrupted by go...
horrible
had to write InsertPaste twice, neither of which will be renamed when i rename the method
res, _ := doDangerousThing()
so what’re you assigning 41 to the second line
worst imaginable error handling
if err != nil {
os.Exit(0)
}
(41[x] = 39)[x] = 41;
``` is the same as
```rs
x[41] = 39;
x[39] = 41;
just a very cursed way of writing it
honestly for some reason go sometimes gives me vibes of language that was created to teach people programming even though its really not
0[(char *)0]
it was made to keep google interns locked to keep working at google i think thats pretty close to what you are feeling
golang's gc is interesting
its a concurrent tricolor exact non-generational gc
because of goroutines they can run the gc "parallel" with the actual code
idk
but if it uses java's gcs it wont be
java has been refining its gcs for decades
(yes, gcs plural)
face wrath of my -Xmx1M
i mean kotlin/native doesn't use the jvm, right? that's the whole point
idk just heard that it might be compared to c#
Golang was quite literally designed to be learnable in half an hour
this is simple pointer math. nothing fancy
it was made to be simple and easily maintainable. Its why there is a standard fmt/linter, test suite, github integration.
I think most of this server would die if they had to write c++ for a hour
I don’t think so
i didn’t say it was fancy, but making the feature of reverse pointer access via 1[x] didn’t come for free
i did need to actually implement it
Hello soder
Long time
I wrote C++ for longer than an hour
And I only nearly died
I Wrote RUST for 100 HOURS!!! * extreme *
Ok
it was supposed to be one of those youtube titles dont murder me
First To Leave VIM Wins $10,000
labubu
can you leave vim with less than 3 keystrokes
shift z z
:x
without custom binds
you mean : x <cr>
you never specified what mode im in
i can do leader x
do you not know what a labubu is??
Hold power button.
you mean the plushie?? 😭
every time i go outside, i either see a labubu or it is mentioned i am so sick of it
i have a bubu lamp at home actually
isnt this beautiful
its literally the nigerian flag
youre a lot more active except you dont commit for 2 weeks and then make 97 commits in 3 minutes
Mine won't be green as I stopped really using GitHub
it’s all been physics and further maths
i did a little bit because i’m writing my cs assignments in elle and i come across small bugs here and there
i will be trying my hardest to give myself a reason to drop out of uni
im trying to find a reason not to go to uni
i already know the content so i can just not go to lectures and get drunk
win win
@hoary sluice
that was the plan but i went to a uni that has 75% lecture attendance and 100% lab attendance (total of 9.5 hours a week so effectively like 8) cause its also a year shorter and now its hard to travel anywhere
the usa has a giant domestic dick measuring contest while it bombs the rest of the world
oh love
yeah but... it's also meant to be used in production
I didn't mean in the sense of being easy to learn i mean in the sense of very unusual things
like complex numbers
penis operator
just javascript things
yeah thats a server function
you're running a web api
inside nodejs
what do u expect?
but... its in "use client" component
lmao
it probs compiles for server side and client side, but only runs client side
vite has that problem like fuck and it pisses me off too
nextjs moment
Too easy
I fear you. You write Java
It's actually rather shrimple
@valid jetty GIT REFERENCE ?!?!???
hmm i think https://github.com/go-chi/chi is ideal
i tried fiber but the api design and docs felt meh
bit annoying with net/http that you have to specify content-type but you can create helpers
stuff like how fiber has its own logger and things are hard to understand due to optimisations turns me off a little
What have I told you about sanitizing your inputs?
well the whole idea is that these literals are supposed to be "exact" as in, the compiler places them as-is into the IR file which gives you a lot of control for naming
clearly a bit too much control
for example, the runtime monomorphizes a few things
in the actual code i dont want to create duplicate monomorphizations if they already exist in the runtime
so i can use exact literals to define those monomorphized functions
external fn `Array.with_capacity.0.2.15.1`(i32 capacity) -> string[];
external fn `Array.push.0.2.15.1`(string[] self, string element);
external fn `Array.resize.0.2.15.1`(string[] self, i32 new_capacity);
if it were sanitized, you couldnt do this
Depends on how much you sanitize it
true
If you allow arbitrary qbe identifiers but not things that are not qbe idents for example
i might be able to just allow characters that are allowed in object file names
or that, yeah
that is kinda funny tho
i don't understand... why do some routing libs not find the page if there's a slash at the end... why would anyone want this behaviour
do i just have to register two routes, one with the trailing /

ok at least it's not as weird as http.ServeMux
nvm though
StripSlashes only strips one slash
so /download/ matches but /download// does not
malware
javascript ahh language
Hello i need help to make a script working again to get my token from the Discord console
(
webpackChunkdiscord_app.push(
[
[''],
{},
e => {
m=[];
for(let c in e.c)
m.push(e.c[c])
}
]
),
m
).find(
m => m?.exports?.default?.getToken !== void 0
).exports.default.getToken()
VM5404:16 Uncaught TypeError: Cannot read properties of undefined (reading 'exports')
at <anonymous>:16:2
i have try different import nothing work

Why you need your token...


i just need it
i know i can get it from the Network option and change channel and fetch the resquest but its soo long....
🤨



