#πŸͺ…-progaming

1 messages Β· Page 37 of 1

valid jetty
#

google indexing just sucks

hoary sluice
placid cape
#

naah

#

i need to start working on the voice assistant again husk

#

and now im adding multi language support to the correspondence seminar xddd

hoary sluice
#

its the best, not the cutest

placid cape
#

what repository?

#

send link

hoary sluice
placid cape
#

oh you sent it nvm

hoary sluice
placid cape
#

would be extremely cool

valid jetty
hoary sluice
#

itd just require shell integration

valid jetty
#

you can do that like really easily

hoary sluice
#

just dmca him

placid cape
valid jetty
placid cape
#

why his repo has 28 starts

hoary sluice
valid jetty
#

its exactly what you want and very easy to use

valid jetty
hoary sluice
#

i just started working on the interpreter part

hoary sluice
valid jetty
#

which is why i probably should get it taken down

#

but azalea doesnt even show up

hoary sluice
#

rename urs to sparxmaths and dmca him

valid jetty
#

i dont care enough to rename it to sparxmaths but ill dmca him

#

ugh i have to fill out another one of those stupid forms

placid cape
#

its pretty easy to dmca takedown on github

hoary sluice
placid cape
#

not that hard

#

i already did it

hoary sluice
#

of course you did

valid jetty
#

i did too

placid cape
#

cool

hoary sluice
placid cape
#

so its the same person right?

#

because when you open the links it redirects you

valid jetty
#

c0lide is a different person but theyre working together

placid cape
#

but looks like he transfered the repository or something

#

XDDDDDDDDDD

hoary sluice
#

he is just posing now

valid jetty
#

am i yapping

#

whatever

#

i filed it

#

i dont care anymore

#

i just want this stupid thing to be done

#

there the repo is called sparxmaths now

#

hopefully the chrome search index doesnt push that scam anymore

jade stone
placid cape
#

gn guys

deep mulch
#

gn

hoary sluice
#

gm

dense sand
#

Gm

spark tiger
#

argh why is [u8] in rust not the same as [u8; 4]

#

i kinda get why you can’t convert [u8] to [u8; 4] but i don’t get why you can’t pass [u8] into a [u8; 4] parameter assuming both are 4 bytes

fleet cedar
#

Because &[u8] might not be &[u8; 4]?

valid jetty
#

[u8] doesnt have the Sized trait i assume

#

^

#

the compiler doesnt know how big the slice is at compile time

#

it does know how big [u8; 4] is tho

fleet cedar
valid jetty
#

you can just do this surely

fn other(x: impl Into<[u8; 4]>) {
    dbg!(x.into()[2]);
}

fn main() {
    other([255, 255, 1, 223]);
}
#

or well

#

yeah try into

#
use std::convert::TryInto;

fn other(x: impl AsRef<[u8]>) {
    let array: [u8; 4] = x.as_ref().try_into().unwrap();
    dbg!(array[2]);
}

fn main() {
    other(&[255, 1, 255, 1]);
}
``` something like that
#

although i think the temporary value created is of type &[{integer}; 4]

#

you can do this ```rs
use std::convert::TryInto;

fn other(x: impl AsRef<[u8]>) {
let array: [u8; 4] = x.as_ref().try_into().unwrap();
dbg!(array[2]);
}

fn main() {
let x: &[u8] = &[255, 1, 255, 1];
other(x);
}

dawn ledge
#

try from/into is pretty much the only way to convert slices into arrays

fleet cedar
#

How curious, that the trait for fallible conversion is the way to perform a fallible conversion

dawn ledge
#

:clueless:

valid jetty
#

elle's type system is actually powerful enough to represent phantom types

#

i loveeeeeeeeee

#

i can probably take advantage of this for the file abstraction im planning to make

#

File<Open> vs File<Closed>

fleet cedar
#

Are namespaces types now

valid jetty
#

namespaces have always been types

#

theyre opaque structs

#

structs with no fields and so 0 sized

fleet cedar
#

I guess that kinda makes sense, in a way

valid jetty
#

because i made it so the compiler doesnt let you define just struct Foo {} as thats not really a valid thing

fleet cedar
#

Why

valid jetty
#

in the IR you cant have a struct type with no members

#

namespaces are removed when generating the IR

fleet cedar
#

And why are you letting IR limitations affect your language design

valid jetty
#

but you can do this

use std/libc/mem;

namespace HeapAllocator;
global pub;

fn HeapAllocator::new() {
    return (HeapAllocator *)nil;
}

fn HeapAllocator::alloc(HeapAllocator *self, i32 size) {
    return mem::malloc(size);
}

fn HeapAllocator::realloc(HeapAllocator *self, void *ptr, i32 new_size) {
    return mem::realloc(ptr, new_size);
}

fn HeapAllocator::free(HeapAllocator *self, void *ptr) {
    return mem::free(ptr);
}

fn HeapAllocator::free_self(HeapAllocator *self) {}
``` because T * decays to `l` and doesnt need the inner type
valid jetty
#

but yeah either way you can define these phantom types and the compiler will never generate any IR for them

fleet cedar
#

Still letting implementation details affect your design

valid jetty
#

creating a struct with no fields throws an error, creating a namespace doesnt but removes the struct when generating IR

fleet cedar
valid jetty
#

C++ artificially adds a field???

#

mildly cursed i think

fleet cedar
#

Well dunno if it's literally adding a field, but zero-field structs are one byte large

valid jetty
#

i guess i can do that too

#

the last one is not really sane btw lmao

fleet cedar
#

Why

#

Generating IR according to the code seems sane to me

valid jetty
#

if you write this program

struct Foo;

fn main() {
    let x = Foo {};
}
``` and the struct doesnt exist in the IR it will throw a compilation warning
fleet cedar
#

Write better ir then

valid jetty
#

lmao

hoary sluice
#

what even is a namespace in the first place

valid jetty
#

its original purpose was to make methods without creating a corresponding struct

#

like where you can do

namespace Foo;

fn Foo::add(i32 a, i32 b) {}
``` etc
#

here the add function is namespaced under Foo

#

but its representation internally is a struct with no fields and size 0 which is removed by the compiler when generating IR

fleet cedar
#

So instead of making zst structs work, you make a completely different kind of item for zsts

valid jetty
#

i didnt like the idea of adding a field so yes

spark tiger
# valid jetty the compiler doesnt know how big the slice is at compile time

it just seems kinda weird that i have to explicitly tell the compiler that an array i create in code has the same size as the one i initialized. i mean:

// this one won’t work
let buf: [u8] = [0xff, 0xff, 0xff, 0xff];
u32::from_le_bytes(buf);

// this one will work
let buf: [u8; 4] = [0xff, 0xff, 0xff, 0xff];
u32::from_le_bytes(buf);```
like shouldn’t it be *obvious* for the compiler that the array of 4 u8’s will have the size of u8*4
fleet cedar
#

It is, unless you explicitly tell it otherwise

#
let buf = [0xff, 0xff, 0xff, 0xff];
u32::from_le_bytes(buf); // works
#

You are explicitly telling the compiler that this is an unsized slice

valid jetty
valid jetty
#

that works because rust infers the type of buf to be [u8; 4] lol

spark tiger
#

also sorry what’s the difference between a sized and and unsized array? i’m not sure what unsized is supposed to mean. like the array is unlimited?

fleet cedar
#

It means the size is not statically known, but only at runtime

spark tiger
#

also i kinda wish types like u32, u16, f32, etc. had a mutual trait (apologies if it’s wrong terms, i don’t know much) which included from_le_bytes and similar methods

fleet cedar
#

Define one

#

Or use num_traits

spark tiger
#

btw is there method overloading

fleet cedar
#

No

spark tiger
#

got it

valid jetty
#

no there isnt thats why you have unwrap and unwrap_or

#

if there was method overloading you could just have unwrap be an overload for whether you pass an argument into it

dawn ledge
#

i mean you can do method overloading

#

but its not really inuitive

#

with a bit of generic magic and Fn impl

#

this allows different number of arguments

#

if you have a constant number of arguments in your overloads then you can use generics and trait bounds

#

i dont have the code rn but i used generics + trait bounds to make a set function that takes either T or a clousure/fn that returns T

spark tiger
#

got it, thank y’all. i think i’m starting to get a better understanding of how things work in rust. it doesn’t seem like a pita to do what i want. rust seems fun

dawn ledge
#

yop rust is great

jade stone
#

i love it when esbuild cant bundle a package for node blobcatcozy

supple whale
#

that's fairly common

#

so far for me only webpack bundles for node correctly

#

and by relation, rspack

jade stone
#

why is everything failing clueless

nimble bone
#

@jade stone @jade stone you

#

finally found a usb drive

#

can finally use my computer

hoary sluice
#

school lan is crazy

ornate quiver
#

wtf thats crazy

viscid grove
#

internet speed is like golf right?
lower number = better

dense sand
jade stone
#

guhhh i love when my makefile doesnt work on windows

#

POWERSHELL IS INSANE

#

WHO WOULD USE WINDOWS

#

ah yes, im piping cd

#

i want all that bullshit

still jolt
#

yeah windows sucks ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

serene elk
#

Powershell is fine honestly

still jolt
#

how is powershell 180 MB

jade stone
#

trying to write this in powershell

jade stone
still jolt
#

just sh -c "find src -name '*.cpp'"

jade stone
#

(i didnt know find was a thing until i wrote this and someone told me)

still jolt
#

also ```powershell
Get-ChildItem src -Name -Recurse -Filter "*.cpp"

jade stone
#

i think google lied to me

still jolt
#

gives you only filenames, without src/ though

jade stone
still jolt
jade stone
#

the only way to remove them is to add a line to the top of your $profile

#

for each alias

#

because they cant be removed permantly

still jolt
#

powershell sucks ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

#

what did you expect

jade stone
#

@still jolt

#
Get-ChildItem -Path . -Filter *.c -Name -Recurse  | grep ^src
still jolt
#

oh god ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

jade stone
#

@still jolt i swear grep came with windows, but i was wrong

#

this is the final version

#
Get-ChildItem -Path . -Filter *.c -Name -Recurse  | Select-String -Raw -NoEmphasis ^src
dense sand
#

our teacher disallows the use of powershell in IT classse

still jolt
#

this would be so much easier to do with just cmd ​​​​​​​

jade stone
still jolt
#

dir /s src | find ".cpp"

#

or something like that

still jolt
dense sand
#

so im forced to use cmd anyways

still jolt
#

dir in powershell is gci

#

sooo

jade stone
#

the one thing powershell does have is good docs

still jolt
#

me when I man

dense sand
#

man i love man

jade stone
#

its one of the few things where you cant compare it to linux

#

its just leagues better

still jolt
#

wdym

dense sand
#

i wouldnt say so

icy loomBOT
still jolt
#

31k characters documenting something as shrimple as grep

dense sand
still jolt
#

at least I don't have to google "powershell <insert command name>"

#

which makes it easier when you're on pty/tty only

dense sand
#

oh wow πŸ’€

#

55 mins of yapping about js shit

still jolt
#

eh t3 and primeagen are annoying ​​​​​​​​​​​​​​​​​​​​​​​

dense sand
#

but actually primeagen does something useful on streams

still jolt
#

t3 I just ignore cause he's annoying, primeagen I click into the description and read the article myself

dense sand
#

like i enjoyed when prime learnt shaders on stream

#

that was pretty interesting

placid cape
#

theo moment

dense sand
#

yea lol

supple whale
#

then reading about it urself instead of watching their slop

dense sand
#

guys i was wondering, do you think its better to do database/any remote queries from wrapping server component or should i just do it inside the useeffect inside of the client component?

#

like this i mean

#

i mean the difference should be basically that one will perform before mount and one will perform during mount, right? but that should be the only difference

royal nymph
#

man exists

jade stone
#

in my experiecne, windows docs have always been better than man pages

#

not saying man pages are bad, just windows docs are better

royal nymph
#

maybe but that doesn't make powershell less dogshit in comparison to linux shells

placid cape
hoary sluice
#

@placid cape

placid cape
jade stone
placid cape
#

ohhh

#

its for the voice assistant

#

i think

hoary sluice
#

@placid cape i think i might learn solana

#

id love a rust job and like 80% of them are solana

hoary sluice
placid cape
placid cape
hoary sluice
jade stone
placid cape
jade stone
#

The next language I will learn will be PowerShell

fallen nebula
spark tiger
#

i personally hate how long the names of most of the functions are

fleet cedar
#

I think the Single-KebabCamelCase is stupid

spark tiger
#

yeah this too

#

takes too much time too type

#

it sucks so much that basically the only two shells that are on windows (cmd & pwsh) are both not good enough for me

frosty obsidian
#

you can technically use git bash or wsl, but yeah outside of cmd and pwsh theres nothing designed specifically for windows

spark tiger
#

will stick with wsl prolly

#

but it always consuming 1.5gb of ram is kinda meh

#

not sure if it's any good

frosty obsidian
#

i use both cmd with clink and git bash with oh my zsh

#

clink lets me use the starship prompt and adds autocomplete

jade stone
#

HUSKKKKK
WHY DOES THE VSCODE POWERSHELL EXTENSION HARDCODE THE BINARY PATH

#

blobcatcozy

      (unstable.vscode.fhsWithPackages (
        pkgs: with pkgs; [
          powershell
        ]
      ))
royal nymph
#

use better distro where this doesn't happen

#

πŸ”₯

jade stone
#

POWERSHELL HORROR
tl;dr no binary pipes

ornate quiver
#

insane

jade stone
#

blobcatcozy

"[$(Get-Content $(Get-ChildItem -Path dist -Filter *.json -Name -Recurse | perl -pE 's/^/dist\//'))]" -replace '.{2}$', ']' > .\compile_commands.json
still jolt
#

what is this powershell horror

jade stone
#

the other generates a compile_commands.json

#

the downloader is the real horror

still jolt
#

I hate how powershell shadows curl with iwr

#

iwr is so SLOW

jade stone
still jolt
#

unless you do full path, curl is an alias to iwr

jade stone
#

I just used powershell and that was real curl

fleet cedar
#

I had to add Remove-Item Alias:\curl to $HOME\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 to get the real curl

jade stone
nimble bone
#

can you do on windblows

dense sand
#

@hoary sluice can you perhaps help me with LaTeX tables?

#

im getting this shit everywhere

hoary sluice
#

@dense sand does thas not work?

dense sand
#

well i fixed that problem

#

i think this is the table issue overall

#

cause im getting this here

hoary sluice
#

well that one is correct

#

but it shooldnt be an issue in the others

dense sand
#

imo its caused by the overful hbox of the table itself

hoary sluice
#

oh its 1 single nable?

#

table

#

i just noticed

#

what if you delete everthing besides the first paragraph

dense sand
#

or like this?

#

it still says overful hbox

royal nymph
dense sand
#

oh wow, for some reason adding tabularx package breaks the bibtex

jade stone
#

Also I just installed rimraf a while ago because Remove-Item didn't work

dense sand
cerulean plover
wooden quail
#

hey, does anyone know on how to put a message in the message box so the user can send it?

royal nymph
placid cape
#

im going skiing next week so i won't be able to work on blom :(

dense sand
royal nymph
#

"to deal with their legacy code"

dense sand
#

The whole channel seems to be a big commedy

ornate quiver
#

estrogen

green gulch
#

Is supabase the best alternative to Firebase currently

supple whale
#

pocketbase exists, and doesnt take 6 work days to set up k8s for, instead ~15 mins

#

but its also proprotionally limited

#

your API is your database structure, you can create custom query endpoints, but not with insane levels of customization, its also sqlite, so doing external operations on the db sucks, you can do auth levels, but its annoying to implement

#

tho personally i almost always go with PB, because of the sheer amt of time it saves, its legit 15 mins to have a working database with an api and auth

green gulch
#

alright ill look into it

#

thanks

jade stone
#

horrid cross-platform makefile

.DEFAULT_GOAL:=all

CSRC=$(shell find src -name '*.c')
COUT=$(patsubst src/%, dist/%, $(CSRC:.c=.o))

CXXSRC=$(shell find src -name '*.cpp')
CXXOUT=$(patsubst src/%, dist/%, $(CXXSRC:.cpp=.o))

export CFLAGS=
export CXXFLAGS=--std=c++2b
FLAGS=-ggdb3 -O0
OUTFILE=dist/libsadan.so
LIBS=
export WINDOWS_SHELL?=pwsh
ifeq ($(OS),Windows_NT)
    powershell_ver=$(shell $(WINDOWS_SHELL) -Command 'if ($$host.version.major -lt 7) { echo "powershell seven is required";exit -1;}')
    ifneq ($(powershell_ver),)
        $(error $(powershell_ver))
    endif
    FLAGS+=-I windowsHeaders -D_WIN32 -D_WIN64
    OUTFILE=dist/libsadan.dll
    CC=clang
    export CC
    CXX=clang++
    export CXX
    LIBS+=-L windowsLibs -llibcef
else
    LIBS+=-lcapstone
endif
export FLAGS
clean:
    rm -r dist || :


all: $(outfiles)
    $(MAKE) $(MAKEFLAGS) -f c.mk
    $(MAKE) $(MAKEFLAGS) -f cpp.mk
    $(CXX) $(FLAGS) $(COUT) $(CXXOUT) -shared -o $(OUTFILE) $(LIBS)
ifeq ($(OS),Windows_NT)
    $(shell $(WINDOWS_SHELL) ./generateCompileCommands.ps1)
endif

spark tiger
#

github is so funny cause

  1. why does it label them with β€œcontributor” even though they have merge perms
  2. why am i as a regular contributor able to disable auto-merge :/
spark tiger
#

yea

ornate quiver
#

makes sense
if there's some changes you still need to make then of course you'd be able to disable auto merge on your own PR

#

same result as marking it draft

hoary sluice
still jolt
# hoary sluice

what is happening here ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

valid jetty
#
namespace Program {
    class Entry {
        public static void Main(string[] args) {
            Console.Write("Enter a string -> ");
            string? res = Console.ReadLine();
 
            Console.WriteLine($"{res} {(IsValid(res) ? "is" : "is not")} valid.");
        }
 
        static bool IsValid(string? value)
        {
            if (value == null || value.Length < 5 || value.Length > 7 || value.ToUpper() != value 
                || value.Distinct().ToArray().Length != value.Length)
            {
                return false;
            }
 
            int sum = value.Select((x) => (int)x).Aggregate((int res, int cur) => res + cur);
            return sum >= 420 && sum <= 600;
        }
    }
}
``` i wrote this code during an exam lmfao
#

insane

dense sand
#

Peak c#

hoary sluice
#

LETS GOO

#

new kb

still jolt
spark tiger
#

@woven mesa @native spruce hi sorry can any of you help me understand the way this twitter mod for ios works? i found about some neofreebird and was trying to understand how it works but got kinda confused. the patch-it-yourself md file says to just drag and drop Patches folder into extracted decompiled IPA file. how, how does it even work. like the only files in the repo i could find are mostly assets or loc strings and this nib file

GitHub

A modified Twitter app, with branding reverts, BHTwitter and other QoL modifications. - actuallyaridan/NeoFreeBird

woven mesa
#

nearly said the cat sound

#

scary

woven mesa
spark tiger
woven mesa
#

they just inject bhtwitter as part of the ipa reassembly

#

yeah nothing crazy

#

just unzip, replace assets, zip

#

then inject tweak and install

spark tiger
#

oh so this mod itself is just cosmetic?

native spruce
#

yeah that github repo is cosmetic stuff

spark tiger
#

i see thank you both !

#

i still wonder how one would find out an ipa code. like @woven mesa taught me how to extract headers but what am i supposed to do with it without knowing what it does :/

native spruce
#

the ipas in releases contains it cosmetically "patched" including having bhtwitter injected

#

the bhtwitter source code isnt in there

#

but u can find it on another repo online

dense sand
#

Charging money for icon library is wild ngl

spark tiger
# native spruce the bhtwitter source code isnt in there

yeah i got this part. i mean in bhtwitter or in any other mod you can find the %hook something pieces in the source codes but how can i be sure what a specific class and method does in the original ipa (like twitter’s ipa in our case) if we only have the headers without any impl

native spruce
native spruce
#

they could also use stuff like FLEX to see what they need to hook

spark tiger
#

FLEX?

native spruce
#

google it

#

flex ios

spark tiger
#

k mb

#

flex looks very powerful thanks

woven mesa
ornate quiver
dense sand
frosty obsidian
#

i don't think its unreasonable to charge for it

dense sand
#

yes, but 50 bucks is kinda overkill ngl

#

given we have something like lucide already

frosty obsidian
#

its 5000 icons

#

as someone that's made icons before its a huge undertaking

#

especially if it needs to be part of a set

dense sand
#

By the way, in react, is there any way to just store index to some element in array instead of storing the object itself?

ornate quiver
#

wha

ivory heath
#

Isn’t react just JS? Why can’t you just do that in a array or am I stupid?

hoary sluice
# dense sand

wrong, a real java project would have

class Authentication
class FailedAuthentication extends Authentication
class SuccessfulAuthentication extends Authentication
class AuthenticationRequest extents Authentication
class AuthenticationBuilder
hoary sluice
#

whats the question

dense sand
#

wait im probably stupid af

#

lmao

#

so i can have defaultValue={currentSlide !== undefined ? presentation.slides[currentSlide].html : ""}
given currentSlide is a number | undefined

#

oh it works

#

nice

#

i dont know why it didnt before

valid jetty
#

i was gonna say to get rid of the !== undefined

dense sand
#

it would fail if 0

valid jetty
#

then i remembered undefined, null, and false all coalesce to 0

#

yeah

#

then i had the idea to make the condition typeof currentSlide === β€œnumber” which i guess is very slightly better than what you have but literally pointless

dense sand
#

yea but i mean i dont think the readability would really improve a lot

valid jetty
#

yeah

dense sand
#

wow use transition is so useful

valid jetty
#

useEstrogen

#

@deep mulch

dense sand
native spruce
#

@woven mesa how does appstorage work

woven mesa
native spruce
#

i read online but it doesnt give me the big picture

woven mesa
#

sometimes useful

#

does not trigger view update across all uses of the property wrapper

native spruce
#

a

woven mesa
#

also hiii

native spruce
#

hiii

native spruce
woven mesa
native spruce
woven mesa
#

or actually

native spruce
#

the property wrapper seems good for updating the ui tho

#

idk

woven mesa
#

is up to you

#

do u wanna use appstoragw directly in your views

#

if yes then go for it

#

just don’t use the key for appstorage many times in your app and also hope that whatever uses it doesn’t update it

#

else they will desync

native spruce
#

they can desync??

woven mesa
#

the other option is using a viewmodel

native spruce
#

what happens then

woven mesa
#

new content overrides old one regardless of current state

#

bc state was outdated to begin with

#

because the property wrapper doesn’t automatically update ui when its changed from elsewhere

#

i can write an alternative to appstorage if you want

native spruce
woven mesa
#

true

native spruce
#

other people probably had this issue

woven mesa
#

true

winged mantle
#

i acidentally deleted several workspaces because alt+delete is used to delete things in jetbrains and alt+delete is also used to delete workspaces in xfce

royal nymph
#

love

winged mantle
#

xfce gang

#

xfce also takes alt+click used to mark unread messages on discord

#

it's for dragging windows

#

also fun xfce fact

#

the themes are encoded as c

valid jetty
#

lmao wtf

winged mantle
#

X PixMap (XPM) is an image file format used by the X Window System, created in 1989 by Daniel Dardailler and Colas Nahaboo working at Bull Research Center at Sophia Antipolis, France, and later enhanced by Arnaud Le Hors.
It is intended primarily for creating icon pixmaps, and supports transparent pixels. Derived from the earlier XBM syntax, it ...

#

@nimble bone you love

nimble bone
#

INSANE

foggy edge
#

yo

#

am i allowed to ask for help with making a plugin here or nah

elder yarrowBOT
foggy edge
#

i can but

#

i cant talk

#

so

nimble bone
#

now you can talk

foggy edge
hoary sluice
#

gm

hoary sluice
placid cape
hoary sluice
pearl stagBOT
# hoary sluice https://mastodon.social/@nixCraft/113844880427845714

It is official now. TikTok faces ban in US by Sunday after Supreme Court rejects appeal https://www.bbc.com/news/live/czj37xe7jljt Under the terms of the law, service provides like Apple and Google will be penalized for supporting TikTok after the law's deadline. In other words, app will gone from the Play or App store and automatically deleted from users phone? It is not clear but Apple and Google have full control over your device for sure to remove TikTok App.

viscid grove
#

whoa tiktok is actually getting banned in us?

hoary sluice
#

well theres nothing they can do to actually ban it but the average person wont have tiktok anymore yea

#

maybe gen alpha isnt fucked after all

#

altho theres still yt shorts and reels

viscid grove
#

or will the website still work, just the app gets deleted

hoary sluice
#

they aint deleting shit from grapheneos

spark tiger
#

nooooo slugpensive

dense sand
#

the world we live in

#

horrible their docker exmaple doesnt even use app router

nimble bone
dense sand
#

what else should i use

#

my teacher is trying to convince me to use laravel

dense sand
dense sand
#

please expplain fr

placid cape
dense sand
#

madness

cerulean plover
dense sand
cerulean plover
dense sand
cerulean plover
#

THERE IS NO LIBRARY

dense sand
#

yea i mean

#

its advertised as framework

#

is the dom the framework

#

i must be completely stupid

cerulean plover
#

it's raw api blobcatcozy

#

if you want to use that you can

#

and that is the point

#

but doing so is actually quite insane

#

i should make my own framework

dense sand
cerulean plover
dense sand
#

lets integrate jsx to java

#

please

#

like inline jsx

cerulean plover
#

we should port ore-ui to java

dense sand
#

not some ass template library

dense sand
#

i guess antlr4 could do it

#

that would be cool as fuck tho

nimble bone
#

so good

cerulean plover
#

surely you made at least some abstraction

nimble bone
#

nop

#

just good old document.querySelector

hoary sluice
#

what the fuck

pallid sierra
# hoary sluice

For real what the fuck is that you just send make no sense bro

#

Sorry if I wait a bit rude

#

Mv

#

Mb*

hoary sluice
#

number of mandarin learners on duo went up 216% and stock went up 10%

pallid sierra
#

So what does that mean

balmy lintel
#

i love talking about stocks in progaming

dense sand
#

can someone here use antlr4?

hoary sluice
#

or something

valid jetty
#

that you supply rules to

dense sand
#

well yes, i dont want to write my own parser for the whole fucking java language

valid jetty
#

do it

dense sand
#

no

#

its too much

hoary sluice
#

why are you making a java parser

dense sand
#

im not making a java parser

valid jetty
#

do it

dense sand
#

the grammar is premade

#
jsxElement
    : '<' jsxFragmentName jsxAttributes? '>' jsxContent? '<' '/' jsxFragmentName '>'
    ;

jsxContent
    : jsxElement+
    | literal
    ;

im simply trying to add jsx to java, but it doesnt work for 2+ elements 😭

#

oh wait i think i found the problem

#

yooo its working lmao 😭

fleet cedar
#

Oh so you need jsx for c++ interop

#

Makes sense

valid jetty
dense sand
#

😭

placid cape
#

Java has normal syntax

#

But understandable

valid jetty
#

@placid cape look at this syntax lol

use std/prelude;

fn count_maximum<T>(T[] nums) {
    let pos = T neg;

    for num in nums {
        if num < 0 { neg += 1; }
        if num > 0 { pos += 1; }
    }

    return math::max(pos, neg);
}

fn main() {
    $dbg(count_maximum([f32; -2, -1, 0, 0, 1]));
}
``` i dont remember if ive showed you this yet
#

ignore the [f32; -2, -1, 0, 0, 1] thats irrelevant

#

but let pos = T neg; is so funny to me

#

maybe ill introduce x := y as a sugar for let x = y

#

tha way you can write pos := T neg;

#

most cursed thing

dense sand
deep mulch
#

@frosty obsidian @ornate quiver you love my homework

valid jetty
#

WHY DO YOU GET FUN HOMEWORK

deep mulch
#

how

#

@valid jetty hiiiii

valid jetty
#

my homework

deep mulch
#

love

#

rosie still a beginner

valid jetty
#

yeah apparently

#

i think i got 100% on my last exam but i havent gotten it back yet

deep mulch
#

i made like a C on my last exam cause professor wants word for word explanation

#

even though i explained the stuff correctly

valid jetty
#

i think i gave the most πŸ€“ answer to "What is a subroutine?"

deep mulch
#

nerddd

valid jetty
#

that exam is also when i wrote this

namespace Program {
    class Entry {
        public static void Main(string[] args) {
            Console.Write("Enter a string -> ");
            string? res = Console.ReadLine();
 
            Console.WriteLine($"{res} {(IsValid(res) ? "is" : "is not")} valid.");
        }
 
        static bool IsValid(string? value) {
            if (value == null || value.Length < 5 || value.Length > 7 || value.ToUpper() != value 
                || value.Distinct().ToArray().Length != value.Length) {
                return false;
            }
 
            int sum = value.Select((x) => (int)x).Aggregate((int res, int cur) => res + cur);
            return sum >= 420 && sum <= 600;
        }
    }
}
``` lol
deep mulch
#

about to write the most beauitufl C++ this professor will ever see

valid jetty
#

can you do my homework

deep mulch
#

i wonder if he wil lsay anything if i use Cmake instead of following the course instructions of visual studio to build

#

nop

valid jetty
# valid jetty my homework

@deep mulch you are a beginner C# programmer taking a computer science class at school. write a program that satisifies the constraints specified by this image

deep mulch
#

i havent wrote C# in soo long

#

C# being literally microsoft java is so funny

valid jetty
#

lmao yeah

deep mulch
#

oh rosie my rosie

#

@valid jetty how do you name your folders

#

do you use spaces

valid jetty
valid jetty
#

aka either project_name or ProjectName

#

insane

deep mulch
#

@valid jetty

valid jetty
#

there are also the isolated incidents when i use kebab case but we dont talk about that

deep mulch
#

insanity

placid cape
placid cape
valid jetty
#

uhhhh

#

hyrom

#

ok idea

frosty obsidian
valid jetty
#

actually nvm

valid jetty
#

in walrus operator you cant give the lhs a type that the rhs infers from right

#

it works like let

placid cape
#

make the most cursed code

#

With reflections and other shit

deep mulch
#

wing is like a little baby

frosty obsidian
#

most of that minute would be getting the build system warmed up

deep mulch
#

@frosty obsidian will do C

valid jetty
#

is this a thing i should do

hoary sluice
# valid jetty my homework

uhmm what if the employee earns 0.1 dollars today and 0.2 dollars tomorrow??? were gonna pay him 3.0000000000000004 dollars

frosty obsidian
#

i probably should learn C or Rust at some point

deep mulch
#

C

#

at least

#

@valid jetty hiiii

valid jetty
#

so that you dont do i32 x := 1

valid jetty
#

when you can just do i32 x = 1

placid cape
#

that's good

valid jetty
#

ok cool

hoary sluice
#

in vhdl := is signal / port declaration

#

initialization*

deep mulch
#

wing has so much to learn

frosty obsidian
#

zeets homework is make a quantum computer and rosies is write a class

valid jetty
#

what is this language 😭

deep mulch
#

debug

valid jetty
frosty obsidian
#

penis operator

#

go reference

valid jetty
deep mulch
#

:

ornate quiver
#

@valid jetty you should rename it to penis operator

frosty obsidian
frosty obsidian
#

i would make it a warning

deep mulch
valid jetty
frosty obsidian
#

i was also thinking about that exact message

#

lol

nimble bone
#

wing operator

hoary sluice
# valid jetty my homework

i have never written c# before:

class Employee {
  String FirstName = "";
  String LastName = "";
  Double Salary = 0.0;

  Employee(String _FirstName, String _LastName, Double _Salary) {
    FirstName = _FirstName;
    LastName = _LastName;
    Salary = _Salary;
  }

  String getFirstname() {
    return FirstName;
  }

  String getLastname() {
    return LastName;
  }

  String getMonthlySalary() {
    return Salary;
  }
}

class Main {
  void Main() {
    Employee a = new Employee("a", "a", 1.0); // (hes poor)
    Employee b = new Employee("b", "b", 99999999999999999.9); // (hes the ceo)
    Console.WriteLine(a);
    Console.WriteLine(a);
    a.Salary *= 1.1;
    b.Salary *= 1.1;
    Console.WriteLine(a);
    Console.WriteLine(a);
  }
}
frosty obsidian
nimble bone
#

only frog is wing

frosty obsidian
#

a language could technically have a frog operator

valid jetty
#

woa its like magic

#

it knows the variable name

nimble bone
hoary sluice
#

why is this not allowed

nimble bone
#

i think they can have emojis

valid jetty
#

i will declare wing explicitly

frosty obsidian
#

you can do that in kotlin too

nimble bone
#

copied from apple…

frosty obsidian
#

just with backticks

hoary sluice
deep mulch
#

husk

frosty obsidian
#

i do that for tests too

#

i make them actual sentences

hoary sluice
#

i dont write tests πŸ˜„

valid jetty
#

holy shit wait that means for i := 0; i < 10; i += 1 YAY

deep mulch
#

// ensure the chart endpoint returns an error if the employee id doesn't exist
@Test
fun testChartEndpoint() {
}
hoary sluice
#

last time i wrote a test was in august where my pm forced me to

deep mulch
#

your prime minister?

hoary sluice
#

if you run it yuo wont see the comment

valid jetty
hoary sluice
#

project manager

deep mulch
#

i hold wing near and dear to me

pearl stagBOT
hoary sluice
valid jetty
#

you cant explicitly declare it with spaces because the IR doesnt like it but you can do this

hoary sluice
#

test are objectively evil

frosty obsidian
#

thats pretty standard practice for tests

valid jetty
#

i have an idea

hoary sluice
#

running an actual test suite probably costs more that hiring an indian from fiverr

deep mulch
#

wing is an indian from fiverr

valid jetty
#

what if i get rid of the external keyword and assume its external if you put ; instead of the body of the function

#

@hoary sluice @placid cape opinions

deep mulch
#

no

hoary sluice
#

what is external

deep mulch
#

more confusing

valid jetty
#

it basically lets you use the function subject to its interface without ever checking if the function ever has a body (ie if it doesnt itll throw a linking error, it lets you link with objects and libs)

valid jetty
deep mulch
#

@valid jetty you will allow importing headers

valid jetty
#

C headers?

deep mulch
#

automatic c interop generation

valid jetty
#

elle already does that tho

#

oh

deep mulch
#

how

deep mulch
valid jetty
#

most stdlib things are just headers

use std/libc/mem;
global pub;

// used to force stack allocated pointers to be pushed to the stack
// and not be optimized into registers so that the GC can detect
// them as a root when scanning the stack for valid roots
external fn __internal_gc_noop(void *x);

namespace GCAllocator; // entirely opaque

external fn GCAllocator::new() -> GCAllocator *;
external fn GCAllocator::mark(GCAllocator *self);
external fn GCAllocator::sweep(GCAllocator *self);
external fn GCAllocator::collect(GCAllocator *self);
external fn GCAllocator::alloc(GCAllocator *self, i32 size) -> void *;
external fn GCAllocator::realloc(GCAllocator *self, void *ptr, i32 new_size) -> void *;
external fn GCAllocator::free_self(GCAllocator *self);
deep mulch
#

@valid jetty elle

valid jetty
#

the impl is in a runtime static lib linked with the file

deep mulch
#

wtf

#

why is my code using tab indent

valid jetty
#

just not with generic functions

deep mulch
#

the rosie rot

valid jetty
#

like i could do this

// eat.le
use std/io;

pub fn eat(string food) {
    $printf("Ate {} !!", food);
}

$ ellec eat.le -c -nostd generates eat.o

// main.le
use std/prelude;
external fn eat(string food) @alias("eat food");

fn main() {
    `eat food`("strawberry");
}

$ ellec main.le eat.o

#

and ofc you could put the external decl in another file

deep mulch
#

Elle JVM

#

do

valid jetty
#

tuple init is actually just a lie lol

#
fn Tuple::new<T, U>(T x, U y) {
    let tuple = #alloc(Tuple<T, U>);

    tuple.x = x;
    tuple.y = y;

    return tuple;
}

external fn Tuple::new<T, U>(T x, U y) @alias("$") -> (T, U);
#

so you can do $(x, y) in your code instead of Tuple::new(x, y) like in kotlin

valid jetty
#

garbage collection is as deranged as ill go

frosty obsidian
#

kotlin just has a to infix function

#

its the preferred way to make a pair

valid jetty
#

yeah i know but still silly

frosty obsidian
#

i mean its useful for creating maps

valid jetty
#

oh i see

#

maybe i should steal that

frosty obsidian
#
val map = mapOf(
    "John" to 21,
    "Mary" to 24
)
valid jetty
#

this is how you do it in elle

#

wow this does not look like a low level language anymore

frosty obsidian
#

that is interesting syntax

valid jetty
#

it works like this

// first_key, first_value are to infer T and U
fn HashMap::with_entries<T, U>(ElleMeta meta, T first_key, U first_value, ...args) -> HashMap<T, U> * {
    let map = HashMap::with_capacity(4);
    map[first_key] = first_value;

    // subtract the first_key and first_value;
    for let i = 0; i < meta.arity - 2; i += 2 {
        T key = args.yield(T);
        U value = args.yield(U);

        map[key] = value;
    }

    return map;
}
#

if you want to make an empty HashMap you can just use HashMap::new

#

its safe to assume if youre using with_entries youll want at least 1 entry inside

#

so you can use that to infer T and U

frosty obsidian
#

kotlin lets you use mapOf without any arguments but you need to specify the types

#

it just makes an empty map under the hood

valid jetty
#

thats where you would use HashMap::new yea, elle has no function overloading tho

frosty obsidian
#
val map = mapOf<String, Int>()
#

you probably wouldn't realistically do that since mapOf returns a read-only map

valid jetty
frosty obsidian
#

we can also just do HashMap()

valid jetty
#

shrug

frosty obsidian
#

its just not whats usually done

deep mulch
#

@frosty obsidian hi

#

wing hates me

frosty obsidian
#

hi

valid jetty
#

the inference capibilities of this is pretty fun i think

fn HashMap::new<T, U>() -> HashMap<T, U> * {
    return HashMap::with_capacity(4);
}
#

for the record with_capacity also accepts T and U

deep mulch
frosty obsidian
#

is it

deep mulch
#

idk

frosty obsidian
#

is minky on chinese social media

deep mulch
#

yes

valid jetty
#

xiaohongshu

deep mulch
#

@frosty obsidian

frosty obsidian
#

ugly pfp

deep mulch
#

you love

frosty obsidian
#

babys first graphic design

deep mulch
#

wing is like a little baby

hoary sluice
#

it was good as a java replacement

#

now theyre taking it too far

fleet cedar
#

Anything with kotlin native or whatever is just nonsense

hoary sluice
#

kotlin should only be used for spring boot in mid size non it company frontends

#

and aoc

deep mulch
fleet cedar
#

It should be used in any situation where you're forced to write for jvm and never if you do not have that restriction

#

I.e. android or mc

deep mulch
#

nop

valid jetty
fleet cedar
#

Usually .fill would only replace already populated entries, why does this one set len=cap

winged mantle
#

and inline xml too why not

winged mantle
#

ellex

deep mulch
#

Elle will be a makeup language

#

markup

valid jetty
#

idk i just did what i assumed a fill method would do

fn Array::fill<T>(T[] self, T element) {
    self.size = self.capacity;
    for i := 0; i < self.capacity; i += 1 {
        self[i] = element;
    }

    return self;
}
hoary sluice
#

you can use rust for that

#

or qt

#

anything else is evil

valid jetty
#

idk

hoary sluice
#

qt is so well made it outshines the fact that it uses c++

fleet cedar
#

Oh

#

Js is weird

frosty obsidian
winged mantle
ivory heath
#

all of plasma is made with QT and both are made by the same people OFC its good sodalove

winged mantle
#

qt is made by the qt company

#

not kde ev

frosty obsidian
#

theres a reason only games use the ndk

winged mantle
#

but it is open source

frosty obsidian
#

and a few libraries

hoary sluice
winged mantle
#

i remember some jank

hoary sluice
winged mantle
#

if you change the icon pack so you can have custom icons it can sometimes cause dark icons on black for builtin icons

hoary sluice
#

qt creator could use some work

#

they have shit vim integration

frosty obsidian
#

which google doesn't want you to use anymore

frosty obsidian
#

google wants you to use compose

#

or flutter

winged mantle
#

i guess the correct thing to do would be to replace every single standard icon

frosty obsidian
#

but they push compose more

winged mantle
#

but then it would make the folders in the file picker different

hoary sluice
#

i was doing that when the compose migration was happening

#

everything was falling apart

frosty obsidian
#

I've never experienced the issues you seem to be describing

nimble bone
#

jokes on you i use xml views

#

google shivers at this

hoary sluice
#

basically i wrote a drone controller in the old android without jetpack compose, then i updated android studio and it wanted everything with jetpack compose and everything just broke and i couldnt fix it so i rewrote it in godot

frosty obsidian
#

yeah no idea what you're talking about

#

i haven't seen any forced migration

hoary sluice
#

we need to use apache cordova

frosty obsidian
#

they just moved the compose project templates to the top

hoary sluice
#

it probably wasnt forced but everything suddenly wanted jetpack compose and i had no idea what that was

frosty obsidian
#

im thinking that maybe you just updated android studio but not agp

#

that incompatibility can be annoying

hoary sluice
#

idk what agp is and i dont remember exactly what i did

#

also ik i had major issues with permissions

frosty obsidian
#

agp is android gradle plugin

hoary sluice
#

and that i never want to write mobile apps

#

email leaked

frosty obsidian
#

i don't usually deal with special permissions often though

valid jetty
frosty obsidian
#

im assuming it was bluetooth permission being weird for you

hoary sluice
#

why not protonmail

deep mulch
#

@frosty obsidian

valid jetty
#

idk

hoary sluice
#

ended up using wifi

deep mulch
#

I've been using proton mail but the free plan kinda sucks though

frosty obsidian
#

yeah bluetooth stuff can be annoying

hoary sluice
#

well not wifi but http lol

deep mulch
#

@frosty obsidian

#

your walls are full of asbestos

frosty obsidian
#

yop

#

asked the builders to use asbestos so that i can sue them later

dense sand
cerulean plover
dense sand
#

breeding reactor

hoary sluice
#

who tf came up with this

#

you can only ctrl s to save while in insert mode

#

in qt creator

dense sand
#

<esc>:w brother

hoary sluice
#

thats slower

#

@valid jetty how do u do read full commit

valid jetty
#

do git commit instead of git commit -m

#

the lines under the first line go into the "full commit" part

#

my most recent commit looks like this

hoary sluice
#

ok ty

deep mulch
placid cape
#

πŸ’€

dawn ledge
#

the real penis operator is eigth equal d

hoary sluice
ornate quiver
#

yop

valid jetty
#

it would be really funny but elle is not a toy language its something i wanna actually put on my CV or whatever

#

and having a penis operator in the language isnt the best look when i wanna use the project to potentially help me get hired

#

what is the point

#

0 inequality operator when i if err {}

placid cape
#

JavaScript

valid jetty
#

in elle you can if x

dawn ledge
valid jetty
#

you can do that in rust tho

#

but i meant go style

#
err, val = do_thing()
if err {}
dawn ledge
deep mulch
#

@valid jetty hiii

hoary sluice
#

or u mean if err {}?

hoary sluice
#

if they add this i might use go

ivory heath
#

use it always

#

it forces you to have error handling

#

zig makes error handling easier but it also makes it easier to forget or defer

#

so you pass a error 20 functions up the stack with no idea where it came from

lusty rock
#

Hell yeah

#

Don't ask me why there is too much semicolons at the end of the line

#

Just because I can

ornate quiver
#

husk formatting

valid jetty
#

war crimes

spark tiger
runic sundial
ivory heath
#

what does that mean

runic sundial
#

A linked list

ivory heath
#

is it a linked list linked to a link list

runic sundial
#

Where each node knows of the next and previous element

ivory heath
#

oh yeah?

#

its easy to implement in go

runic sundial
#

And java

#

And c

ivory heath
#

so whats your point my favorite schizo

runic sundial
#

But how about doing it in Rust without boxing

ivory heath
#

literally impossible

runic sundial
#

Yeah but it's also useless

#

I just like pointing it out

ivory heath
#

ive legit never used a linked list before

#

who uses them

runic sundial
#

Educational

#

I have been working on a Minecraft mod using Zig recently

#

It's feature complete as of today

ivory heath
#

sodasad ive been learning vapoursynth

runic sundial
#

The tool I have allows for profiling Minecraft using Tracy

#

Multiple threads alongside timestamp queries on the gpu

#

Precision limited by the worst thing imaginable

#

The system clock

#

But it's like, within a few tens of nanos

#

So it's ok

#

When will computers ship with better clocks?

ivory heath
#

things dont happen on a clock cycle anymore

runic sundial
#

Anyway the next thing I need to do is to figure out how to scream at the AMD GPU driver to tell me what the hardware counters say at at least 1MHz sample rate

ivory heath
#

oh look this line started execution 3 cycles ago

runic sundial
#

Ok

#

I do not care about their pipelines

#

I want the time and I want it now

ivory heath
#

sodapeek damn okay

runic sundial
#

In picos

#

Zig has u96 values

#

We can use them

ivory heath
#

why not u128

#

if youre gonna use BIG numbers anyways?

runic sundial
#

Yes

#

But it's funnier this way

#

The cpu needs to suffer

#

Not the GPU tho

dusty flax
#

.

ornate quiver
runic sundial
#

Swag factor

#

It just has like

#

u1 through to like what? u1024 or more?

ornate quiver
#

u1 is kinda funny
bool moment

runic sundial
#

Yop

#

This stuff is rly nice for bit packing

#

But you also get a fair bit of arithmetic safety, where you like

#

Can assign a u31 to an i32

#

But not the other way around

#

Without explicit casting

ornate quiver
#

im not a fan of casting tbh
like in rust i don't really know what -1i32 as u32 does
it would so much better if there wete something like extension functions that explicitly defined behavior

runic sundial
#

Well yeah

#

You can

hoary sluice
#

@.zooter.

#

gm

dawn ledge
valid jetty
#

why

spark tiger
valid jetty
#

converting to u32 means all bits set in non twos complement

#

which means all bits set in general so you get the max value

spark tiger
#

ah

#

thank u

valid jetty
#

the β€œas” operator does transmuting on integer to integer basically most of the time

ornate quiver
valid jetty
#

soo yes

#

converting 3 billion u32 to i32 would give you some negative number i assume because it means the sign bit is set

valid jetty
#

i just realised elle supports unicode substrings

#

so therefore with that info i want to make my mini language in elle called いけご and make the syntax purely japanese

#

and that means i can use γ€Œγ‚γ‚γ‚γ€for quotes and it’ll be fun

#

i may also introduce wchar as a type which is a code point

#

maybe

valid jetty
#

@ornate quiver LMAOO

#

this is gonna be so fun

valid jetty
#

ichigo

hoary sluice
ornate quiver
#

oh god

#

unicode names

valid jetty
#

it’s just the readme

hoary sluice
valid jetty
dense sand