#πͺ -progaming
1 messages Β· Page 102 of 1
h
hatsune miku speedometer
she will spin depending on how fast u go
i also made this when u pop ur totem
im still trying to make improvement
oki
when i mena improvements
we need some heart particles
i need more wacky ideas for aprilhack
hmm
idk i didn't wanna do stuff that's like
somewhat easily doable with a resource pack
unless u mean
oh this is a mod?
oh I didn't see that π
this is great until it isnt
its legit just bootstrap all over again
deriving css from first principles
whatβs next, cascading styles applied via tailwind?
styless components
theres a lib for that
were u just use the html tags without any classes
and they are default styled
bootstrap??
oh right
ITS REAL omfg
this
its not amazing, but its great for people that dont care and want something done quick
the tailwind attacks are crazy on dis1 doe
the arrow is fucking fryin me 
i have used tailwind in the past and i dont like it
its bad and bad
its bad while editing and its bad while debugging
i advocate for writing css by hand
its not even that hard
you should be asking what the fuck is wrong with me to be debugging css
and i actively use tailwind and its by far the least cancer solution for custom UI i've ever used
and ive even built my own css frameworks in the apst
but no its not that im bad at css its that if i have a certain reference material (that uses tw) the classes are all over and its fucking torture to see how they got this one fucking component to work
i believe all css frameworks are cancer
it literally takes nothing to write a few lines of css to get the same shit done lol
tailwind is just faster
oh it takes so fucking much to write css its unfunny
the bloat my css only apps had because i kept redeclaring the same shit
its unfunny
my css alone was almost a megabyte
what are a few lines with css is a couple letters in tailwind
chole when she realizes youre gonna a bigger bundle with the "few letters" in talwind
who gaf
because you have 50 class names and their definition
the more you use tailwind the less it impacts bundle size because you reuse the same shit a lot

thats the entire point behind classes
im not trying to be an asshole here
but
have you considered, writing better css/getting good?
The entire point behind classes is decoupling style from structure
Whether it succeeds is up to debate
trust me i'm plenty good at css
i can write good css alright but tailwind is quite literally just faster & easier to prototype π
yeah i trust you 
yes i get your point about speed
but as someone whos reading the bundles i hate it
its kinda funny when you think about this
because every new framework now uses scoped css
which fucks with the bundle size a LOT
:global() my beloved β€οΈ
and then you get into the issue that scoped css tries to solve in the first place
and then you realise those couple letters in tailwind are actually much better for your bundle size & speed
i would like to talk more on this but i dont really wanna spawn a potential argument that benefits none
scoped css in astro hasnt bothered me much
i just reuse my components wisely
why isn't tailwind implemented in the build process
..? it is
although im in the 2~3k lines ranger as opposed to unknown's 20k
does it transpile to css 
yeah no one would use tw if it wasnt build
yes
thats like
the whole point
it is css
of tailwind
lol
yep, 100%
so it doesn't declare every single possibility in a css file
it searches for what you use
you put the tailwind classes in your html, tailwind goes over your html, picks out the classes, generates the appropriate css and then you put that into your app
which is 5gb
thats what set tailwind out from stuff like bootstrap
it only includes what you use (or whatever you use that it could detect)
and thats what allows you to have custom things like custom padding you just do p-[1000] 1000px you cant do that in stuff like bootstrap
i recently stumbled upon unocss or something that was literally tailwind but you had to define the rules on your own
i was giving an example
rini you dont do much frontend do you
when i do frontend i just write css
when i do frontend i https://github.com/chloecinders/homepage-static/blob/main/index.html
anyway i get the argument about tw being faster to prototype/work with but i also think it contributes to code debt and, for the deranged few like me, makes it harder to read element styles
yeah sucks to be me
i do
arent you one of the "weird" "ones" that dont use vscode
i do "use" vscode along side nvim
neovim user
i hope you can recover β€οΈ
knew it...
i prefer using qt to html
can we ban kode
get the one extension that automatically hides tailwind styles its less visual noise
qt can run the web
java can run the web too
qtwebview
the one time i used qt i got 15 segfaults in a row, a bluescreen and then my pc ddos'd someone as part of the botnet and sent a signal down the wire causing my nearest power station to blow up
this is where your own argument of "get better at css" would be applied, but i agree, tailwind classes need some sort of sorting or smth, because reading them can sometimes be difficult, from experience i just use the chromium devtools for inspecting them and it works fucking great, also the tailwind extension for vscode carries insanely hard
i almost took this as a serious message
see, the same applies to tailwind, you just reuse components nicely and its for the most part not a problem
fwiw there is a prettier plugin (i believe?) for sorting tw classes
its not a flawless solution, but it beats everything else i tried so far
that's a skill issue
prettier is a fucking anti-pattern and every1 who uses it should be hanged
just use eslint like a human being
LMAOOOOO
since when can eslint format my code
you still need a code formatter π just set your prettier up to actually look good
forever
i use biome but im stuck with prettier for a while because biome doesnt support astro yet
and i have never had luck with getting my eslint configs working
ik skill issue, i cba
stylelint is just for css
don't you want an all in one packlage
that does everything equally badly
what was it then
honestly auto code formatting is overrated just do it yourself
js and its 500000000000 different tooling
eslint style rules were deprecated
eslint doesnt format nearly as much as prettier, the autofix is far from perfect, the things it does are good sure but for deeper code formatting you need prettier
lord forbid im in the zone and spit out randomly formatted code (that works)
instead i gotta think of styling every minute
cargo fmt my beloved
prettier sucks tho https://dprint.dev/ is a lot better
A pluggable and configurable code formatting platform written in Rust.
i almost always type code formatted anyway
i type my code minified and let the formatter expand it
written in rust !!! rust wins again
this is very negative advice btw, you should not be thinking of styling manually
it hinders development
i am of the opinion that when youre writing code you shouldnt have to be conscious of such irrelevant things
styling is very important what are you talking about π
you don't have to be conscious about code style to just write formatted code
i use a code formatter normally
sometimes they're not great though and manual formatting works well enough for me
yeah learning curve is steep, once u get it working tho its great
styling is just very automatable & so you can make it so you dont really have to think about
eslint for everything
even if i'm using a formatter i stillw rite things correctly to begin with normally
import a single config and all of ur everything is formatted and linted
yeah if youre using something like python or yaml
even then thats just indents
not stuff like line length and spacing between expressions
eslint-parser-rust
styling isnt important for ur program to run but its very important for keeping your program maintainable
i like doing alignment of things
CHLOE
nobody wants to work on a shitty codebase
i love doing //formatter:off
I AM NOT SAYING ITS NOT IMPORTANT
i am saying you dont want to be constantly worrying about manually formatting your code
i don't worry about it though
my eslint runs as my test system
i do it automatically
pnpm add @winged mantle
@winged mantle fmt
like when you type an if do you do if(thing){doThing();}
even cargo fmt looks ugly sometimes... wtf is this...
also yea
its because rust is ugly
formatters are essential for working in a team though
ur ugly
I lowkey think that using Qt is easier than using web tech
im pretty and cute
proof?
tbh i don't like rust formatting that much overall
i wont defend you here
kissable, as at least 5 people say
) = stream.peek()
{
looks ugly as fuck
it splits things like discord users
hi btw
i was working
on a project
in rust
imaginary internet friends who dont know u dont count
Better to write that as if let Some(t) = stream.peek() && t.kind == ... imo
this was written in a time of pre-let-chaining
Fair
yeah so what i was saying is essentially doing this is good when youre in the zone
you shouldnt be thinking of whether you added a space before/after your ( or not, leave if to the formatter and just write code, let your thoughts flow
i don't think about it
i always write if statements nicely formatted without much thought
we have a natural formatter here
a fine specimen of natural selection
how cute
i do format my code but thats when im not thinking much
when im locked in idgaf
clang format is a pain to configure how i like
i'll legit write all my code on a single line and press ctrl+s to auto format
i autoformat on save :DDD
i type ,f
and autosave on lost focus or idle
i was being slightly silly when i said formatters are overrated
i cant stop using vim because i keep typing :w ,f
they do have a legitimate purpose but i think it's also relialistic to achieve nice formatting on a personal project without using a formatter
vimcord when
same way it's easy to keep variable names consistent even without special tooling
@haughty socket work on vimcord
11 | let willExplode = 1
^ Invalid variable name. "explode" is not on word list
11 | let willExplode = 1
^^^^^^^^^^^ Invalid variable name. "explode" is not on word list
no i do it too
its just that im a bit of a silly cat most/some times
i was lazy and typed on a phone
i trust im my ability of always fucking up no matter what π
so fun fact at my old workplace before we were allowed to use ai i installed an ai extension and then my supervisor came over one day and was coding on my computer to show me something and it auto suggested comments and he then went like "oh damn look webstorm is so smart it can write comments for you now"
when i write rust and go i still put parens in if statements
actually i don't think i did it much in go
this is such a jsrot i've gotten it sucks
maybe because i actaully learnt go properly
with rust i just dived into rust projects

i find js nicer without semicolons but ive been programmed to use them
and i cant change my style now
i just like how semicolons look that why i use them
on languages without semicolons i dont do it tho
a problem i have with no parens is it confuses me in cases like this
if thing && (other_thing || thing) {
}
idk how
stop having complicated if conditions then smh
one day that very semicolon will save your ass
becase
const a = foo
(xyz as blah or some expression).bar
is not 2 different statements but a call expression without the semicolon
do you extract everything
i love complex expressions
let isFoo = other_thing | thing;
if thing && isFoo {
// do something
}
comes with the included benefit of being 1000x more readable and looks nicer
rewrite expression so it doesn't need parens
its not every day that you get this pattern occurring in your code but when you do it is annoying
i should really stop doing frontend given i hate it so much
i honestly never remember evaluation order i just add parens to make it clearer
auto other_things = [other_thing, other_other_thing] { return other_thing || other_other_thing; }
if thing && other_things() {
}
ah see this is why i have a rule for ; before hanging ()
so ;(stuff as uwu).test
can you remove the return and then ; to make it more like rust
i cant read it otherwise
#define CALL ()
if thing && other_things CALL
no parens
i also lint my gql code
you can just use the c preprocessor in rust btw no one will stop you
so you cant even commit stuff that doesnt pass gql schema
i will stop you
i will drive to your house
and beat you up
and lord forbid the api you use changes the schema as youre trying to add smth random
everything stops until the code is schema compliant again XD
i love eslint
/run
public class Main {
public static void main(String[] args) {
fmt.Println("Hello world");
for (int i = 0; i < 10; ++i) {
fmt.Printf("i = %d\n", i);
}
}
static class fmt{public static void Println(String s){System.out.println(s);}public static void Printf(String s, Object... o) {System.out.printf(s, o);}}
}
Here is your java(15.0.2) output @winged mantle
Hello world
i = 0
i = 1
i = 2
i = 3
i = 4
i = 5
i = 6
i = 7
i = 8
i = 9
horror
Seems pretty normal
Seems pretty normal
go dev talking about ugly code ππππππ€£π€£π€£π€£π€£π€£π€£π€£π€£π€£π€£
my favourite thing about rust is that this doesn't compile ```rs
fn move(self, dx: isize, dy: isize) {
self.x += dx;
self.y += dy;
}
if err != nil {
return err
}
move is a keyword?
yes
rust should replace usize with python's int
memory renting
yea i think it would be pretty difficult to mutate self when its not declared as mutable
this will run out of memory instead of overflowing
i = 2
while True:
i **= i
wait
ok but the problem is the function name
small small int, small int, int, big int, and big big int
r#move
long short int
If you'd read the IAQ (Infrequently Asked Questions) list, you'd know that auto is useful primarily to define or declare a vehicle:
auto my_car;
A vehicle that's consistently parked outdoors:
extern auto my_car;
like the metal pipe noise
how do you make that noise
klang
r#move π
This isn't real
vim keymap
@native spruce kinda nice webview thing i wrote (since i dont have new webkit apis on macos 26)
i see android is not the only place where interacting with webviews is fucking cancer XD
god webviews make me boil with hatered
its nuts
it got to the point where i just threw money at the problem and hired external devs to do webview wrapping on android for me
"i dont care how, get it done"
I have to use webview for solving dumb captchas in a native desktop client unfortunately
that not that bad
i have a webview
which does window.open(url)
like you know, normal open website?
right?
wrong, most cancer thing to get done ever
GOD forbid your webview based app wants to do oauth via JS
just use device flow
but why... the JS code is perfectly functional in browser
like why are webviews so neutered
so you want insets?
oh, just use css's env(safe-area-inset-top)
HAH, you fucking wish that worked in webviews
works in all browsers tho!

here you go, 300 lines of garbage java code, just to inject insanely laggy js so you can have css variables for insets
whhy webviews, whyyyy
welp at least you can read that data on android, god forbid you want to know how big the keyboard is in an iOS webview, hahahahah good joke!
well text fields on iOS are webviews too 
welp at least on iOS you wont brick your OS on a text input when u click left, which both navigates to the left, and moves the text cursor to the left, depending on which is done, your OS will hold down left infinitely for some reason, in EVERY app, all across the entire system
and the only way to fix it is a hard reset, because yes, you cant bring up the power screen, because you're holding left!
and these tauri mfw go "yeah just use webviews, they are so gooood"
man, whenever i see that i consider if the manslaugher im about to comit is worth the 20 years in prison

TRUE
i have to use webviews in my github client just for markdown
@frosty obsidian Gloom non web view markdown renderer
gfm includes inline html
thats what a webview is
Is there no better way to render html
am i having skill issue or this glob:
"!(templates)/*.{js,jsx,ts,tsx,json,css,md,vue,yaml,yml}": [
"pnpm run format",
"pnpm run lint:fix --"
]
doesnt do what i want? I need to apply the fix for anything besides files in the templates/ directory - note that it doesnt have to be in the root dir
other than the thing whos entire job is to render html? no
I've tried other markdown renderers but none of them match
And donβt want to include a whole ass web view dep for it
oh webview isn't a dependency on android
But 
Desktop compose 
the desktop webview compose thing i know about is cef
CEF 
jcef specifically
i think games should ship with 200x frame gen (off by default, no way to turn off)
and run at 1 fps
to save the planet
a cate
interesting programming related gifs
nop
@frosty obsidian can I licence zooter under the WPL-3
depends on the html then
github's markdown is rather sandboxed so you dont really need a webview
but if you have arbitrary html webview is the way to go
# MEOW!
<script>
console.log("pwned:3");
</script>
it finally happened, i finally wrote JS which was so laggy it froze the main thread for 1 hour
i love n^3 complexity
const filtered = Object.fromEntries(Object.entries(episodesRes?.episodes ?? {}).filter(([_, ep]) => !episodeList.some(e => {
if (ep.anidbEid != null && e.anidbEid === ep.anidbEid) return true
if (ep.airdate != null && new Date(ep.airdate) < new Date(e.airdate ?? Date.now())) return true
return false
})))
LMAO
ah yes
How do u get those stats in devtools
It has so many features that I keep forgetting about them π
@hoary sluice i wrote a shunting yard in elle
this is a valid program now
ι’ζ°γγγͺγ³γζ΄ζ°οΌζ΄ζ°γxοΌγ
γγͺγ³γοΌγ%d\nγγxοΌγ
γ
ι’ζ°γγ‘γ€γ³οΌοΌγ
ζ΄ζ°γx οΌγ1οΌ2οΌ3γΌ4γ
γγͺγ³γζ΄ζ°οΌxοΌ3γΌ4γ»3οΌ
7οΌγ
γ
well its not quite fully done yet because i need to implement parenthesis
we call them bots now
plain = is prohibited?
nop
i will try to backport plain syntax later, some things work some donβt
for example you can only use the fullwidth parenthesis, comma, etc
but you can use the half width operators, plain variable names, etc
itβs just a case of adding the ascii ones to the lexer
i do want keywords to be jp only tho
i may have forgotten what shunting yard is
an algorithm for operator precedence parsing
you convert infix notation into postfix so you can evaluate it as RPN into a correct astnode
shunting yard is the process of transforming infix into postfix
probably icypeas
hmmm
idk the alternative is pratt parsing which is a recursive descent thing
but i wrote shunting yard because it uses a stack and queue and i get more marks on the project for using abstract data structures
i just have to swap out those arrays for an implementation of a stack and deque that i havenβt written yet
what does icypeas use
i use pratt for icypeas but not sure if thats only for expressions or only for statements
i forgot
ah
you can check
pratt parser is a match statement right?
uhh wdym
pratt parsing is where you call the parsing function for highest precedence first and then lower ones inside etc
ok thats what i do for statements
line 288
idk how to put it in url
thats expression parser
ok
yeah i think this is pratt
statement is pratt
expression not sure
its in order of precedence
i think it is technically pratt
but not with functions
linus slowly going over to the rust side because of annoying as fuck c devs is really really funny
sorry i didnt order a yappacino
then shut up & let the grown ups discuss
ok
crazy
Is C and Rust war gonna continue forever
until linus abandons c
C won't be abandoned ever
i guess so but i think its pretty clear that actual smart people see the benefit of both and use them together
is there a better way to do this
[indent="0"] {
box-shadow: inset -1px 0 #bd93f9
}
[indent="1"] {
box-shadow: inset -1px 0 #1897ff
}
[indent="2"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="3"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="4"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="5"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="5"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="6"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="7"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="8"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="9"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="10"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="11"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="12"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="13"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="14"] {
box-shadow: inset -1px 0 #8be9fd
}
[indent="15"] {
box-shadow: inset -1px 0 #8be9fd
}```
Just use a selector like [indent] to specify default values
And then use more specific selectors to override individual styles
oh that is actually way easier than what I'm doing haha thank you
what if I wanted a gradient from #bd93f9 to #8be9fd as the indent increased? would I have to do all 15 manually then or is there some other way to do that?
I only have css too, no js or stuff
I'll check that out thx
this
so you take that, extract the indent value via attr(indent)
and color blend it
between 2 base values
so just a lot of calc() color-mix() hsl() etc
when did attr start working out of ::before/::after and stop being only data-*
@young flicker
fancy
a few months ago
ooooh you understand view transitions
teach me
you have any resources or anything for view transitions people made?
iirc astro has some
thats kinemaster.
YES!
no i simply want standard view transitions that are used in native apps
like android view transitions etc
shrug
shit that's already established and adopted widely
yeah i dont get view transitions
it works, but it works when it shouldnt
and doesnt work when it should
i dont understand it rly
but then, i dont even have a view transition targetting page
BUT IT STILL WORKS AND FADES?
i asume because it targets EVERY element on the page
and then this, just never is able to target any selector at all?
wanted to do this, but it just doesnt work LOL?
there's a lot of potential for cool shit here, but i just dont get it
it has fallbacks for selectors it should never trigger and shit
idfk
xDDD
for entire views they are bad
but keep in mind u can use this for individual components
like a button or smth
some of these are hillarious tho
but too slow
yeah its slow to show it
u can ofc speed it up
but yeah, view animations have INSANE potential
my phone shows no transitions in those pages
just implementing them is cancer
because its unintuitive and poorly documented and explained
FIREFOX USER SPOTTED
LAUGH AT THIS MAN
I shall not discriminate based on browser choice
I started rewriting my site so I can have an easier time writing blogs without worrying about the codebase being horrible
got around 5 things I wanna write because I find them interesting
you should
should just start publicly shaming people
why about browsers tho π
they all suck in their own unique way <3
mmm eat shit if you gonna do that with firefox
how bout that
<3
thats the cool thing
i wont do it in firefox
because it doesnt work!
@hoary sluice i wrote a bnf for ichigo and its so funny
i have this tool that lets me basically walk through a bnf and generate an example grammar out of it
like this
theres no limit though
lmfaooooo
if you just get lucky you can generate some insane statements
this is a horrible feature
i do not think so
it may seem like a nice way to write less but its fucking horrible when you're the one reading/code reviewing it
if you dont know what .direction(::Horizontal) does thats on you i think
what is Horizontal? where does it come from? what type it is?
??
its a fucking enum
no shit
youd of course still have to use it
i could tell because you had a better example Direction::Horizontal
π
agree honestly
the same way you have to use traits to access their methods
zig code is unreadable for this reason
but if there is only one enum that can go into the argument than i shouldnt need to type out the enums name
.{ .Foo, 1, }
true, thats possible in python
is foo part of an enum
this sucks it makes your code less readable for no gain
it should at least be used for enums only because . for member access is very ambiguous while :: isnt
imo it makes it more readable, but I guess its just me being used to the API's available to me
why is typing the enum name that hard lol
your lsp should be able to autocomplete if youβre really so lazy you donβt wanna type the full name
the .benefit(Benefit::) is(Is::) that(That::) i(I::) do(Do::) not(Not::) want(Want::) to(To::) repeat(Repeat::) myself(Myself::) a(A::) million(Million::) times(Times::)
what a beauty
rust analyzer likes to autocomplete the entire path instead of use sometimes
foo(::Bar, ::Baz, ::Qux)
now what enums are those values from
you have to check the function signature
are they the same enum?
are they different ones? do they serve different meanings?
I think they can be good if they're labeled properly
where have you ever seen a function take in 3 separate enums
sure its possible in that one shitty codebase from 9 years ago but like
probably none
be real
just β¨ jdk things
are you able to just type :: to see the available options
i have a function in elle that takes in a token kind and token value, of which a variant is Operator for both, and theyβre both enums
no
if i call it as foo(::Operator, ::Operator) isnβt the meaning just ambiguous asf
hmmm not sure if thats good then if you cant see something you would want
I think if a language does this there should be something that makes it easy to know what you can use in that scenario, otherwise it could be unreadable and unmaintable
if you are you should just use whatever::Enum::*;
^
uses are scoped anyway
the problem with that is that it pollutes the scope & enums would conflict
::* is extremely different from ::Something
idk but either way zig code is unreadable for me because they fucking love to do this
closest scope takes precedence im pretty sure
implicit struct and enum initializers everywhere and i have no idea what anythingβs type is
jai has this problem too but not as bad
i can imagine implicit struct initializers being horror but i dont see much of a problem with enums
swift code is very readable to me
like you can
fn parse(parser: Thingy) {
use Token::*;
// ...
}
i am glad we see eye to eye
π i guess but i dislike using use within the scope it just kinda looks ugly to me
core.pushEvent(.{ .window_open = .{ .window_id = window_id } }); can you tell me what the type of anything is here
or here
switch (core.state) {
.running => {},
.exiting => {
core.state = .deinitializing;
core_mod.run(core.on_exit.?);
core_mod.call(.deinit);
},
.deinitializing => {},
.exited => @panic("application not running"),
}
no and it sucks
I mean obv you're not going to know the type, in xcode just alt click
makes no difference to me
makes a difference if youβre reviewing someoneβs code though
if you need an IDE to understand the code, it's not good code
suddenly you need to dig for the header of the function youβre calling or the struct
if youβre just doing core.state = .deinitialized good luck finding what enum thatβs talking about without lsp support
π€·
EXACTLY MY POINT
hehe
You are the one force pushing into main
i made these exact points a long time ago
that just isnβt the point
the point is that itβs not readable without lsp support
I was trying to make a joke sorry
i think this feature is awesome when you're writing it but not great when someone has to read it
kotlin has the same problem if you abuse its features too much
yeah kotlin code is unreadable
it's super fun to write kotlin and spam .run, .apply, etc
but then when someone else tries reading that same code it's pain
i tried to understand eagelyβs aoc solutions and failed miserably because wtf am i reading
eagely is not the average kotlin user
you can't read it because hes a professional competitive programmer
not a normal programmer
i actually dont like it when im reading some java code on github for reference and its nested in java/main/fooo/bar/baz or whatever
but i mean i beat him and yet i canβt read his code
you will love the code I write, I use it everywhere
itβs pretty funny
Okay different idea Rust analyzer should use 1% of its 90% cpu and ram usage (used to build my project on every keystroke) for making this possible then
well u kinda have to
eagely has like his own standard library just for competitions
my code is VERY readable
u dont have to but everything is made with it in mind
My code readability depends on my mood
and once you start adding different namespaces it's needed
the organization makes a lot of sense when you get into it
look so readable
from collections import deque
import sys
DIRS = [(-1, 0), (1, 0), (0, -1), (0, 1)]
P1, P2 = 2, 20
def parse(c):
grid = [list(line) for line in c.strip().split('\n')]
start = end = None
ws = set()
for y in range(len(grid)):
for x in range(len(grid[0])):
if grid[y][x] == 'S':
start = (y, x)
grid[y][x] = '.'
elif grid[y][x] == 'E':
end = (y, x)
grid[y][x] = '.'
elif grid[y][x] == '#':
ws.add((y, x))
return grid, start, end, ws
def dists(grid, sy, sx, ws):
rows, cols = len(grid), len(grid[0])
queue = deque([(0, sy, sx)])
v = set()
ds = {}
while queue:
d, y, x = queue.popleft()
if (y, x) in v:
continue
v.add((y, x))
ds[(y, x)] = d
for dx, dy in DIRS:
ny, nx = (y + dx, x + dy)
if 0 <= ny < rows and 0 <= nx < cols and (ny, nx) not in ws and (ny, nx) not in v:
queue.append((d + 1, ny, nx))
return ds
this isn't really java specific
java might use reverse domains but github will cut through the dirs in one click
ofc u would say this
itβs not hard to write readable code
def get_ss(grid, sdists, edists, ws, btime):
rows, cols = len(grid), len(grid[0])
s1 = s2 = 0
for sy in range(rows):
for sx in range(cols):
if (sy, sx) in ws or (sy, sx) not in sdists:
continue
queue = deque([(sy, sx, 0)])
v = set()
while queue:
y, x, steps = queue.popleft()
if steps > P2:
continue
if (y, x) not in ws and (y, x) in edists:
total = sdists[(sy, sx)] + steps + edists[(y, x)]
if total < btime:
s = btime - total
if s >= 100:
if steps <= P1:
s1 += 1
if steps <= P2:
s2 += 1
for dy, dx in DIRS:
ny, nx = y + dy, x + dx
if 0 <= ny < rows and 0 <= nx < cols and (ny, nx) not in v:
v.add((ny, nx))
queue.append((ny, nx, steps + 1))
return s1, s2
usually takes 2 for me
java only really really adds like a couple folders before you get to anything meaningful
super easy to click through
as i said, i dont hate it, i slightly dislike it
i prefer the C# folder structure over the java one
could see it being annoying still depending on what you're navigating the structure with
go does everything best
don't tell anyone I told you this but instead of having app/com/example/balls/ you can just do app/com.example.balls/
any type of weird forced folder structure π
that doesn't make any difference in github ui
i prefer
src
L foo
L a.le
L b.le
L main.le
Makefile
``` pls you donβt need more itβs just bloat
the java folder structure makes more sense once you start getting a proper project
also how could that work π
its perfect
but im different depending on language tho..
wtf thats actually good
why don't file browsers do the same thing of combining dirs
@royal nymph after you originally made a few critiques on extension functions i started moving some to like an .ext package as an indicator
good question
like if src only contains main you click on src/main
in code editors they usually do
uhhh
maybe with plugins idk
because you may want to go to an intermediate directory to put more files into it
bc not everything is designed around programmers
just click on the src part of the text
isn't that how vscode handles it
ye
soo good
no iirc vscode treats the whole path as one single entity and files go into the final dir
maybe itβs a zed thing then hmm
keep in mind those file browsers are designed around common users
i remember being annoyed by that
nop
they need to be user friendly and more general purpose
it makes sense only for coding and ides do have that like others said
no not true, you can select a specific folder
each segment can be right clciked on
personally i dislike that feature in vscode tho
wdym do you never browse projects in a file browser
its good for readability but I find it a bit annoying to use
sometimes I put the file in the wrong folder
i would love
create directory a
create directory b in directory a
want to create another directory in directory a but it does this weird grouping and it becomes awkward
yeah
YES
i do this all the fucking time π
I've been annoyed by that before
all you do is right click on a and press create new folder
when is ven going back to nvim
never...
average user would not figure that out
not all file managers are for average users
steal my config im pretty sure i used yours and been modifying it lol
the ones you listed are
ive dealt with people who freak out at the idea of dealing with file managers so idk about that
taking what i say seriously...
could just put it behind some settings
dolphin does have some pretty advanced features
what r ur thoughts on nested files
good...
hybrid node on fs which is both file and folder
That was very annoying
was or is
I couldn't figure out where is lock file until i noticed that file is a "directory"
imagine if you wrote a whole app in gradle
wdym
it gets rid of the useless bloatware in my file viewer
where the whole app is in the build scripts

i mean gradle can just use kotlin
using groovy
so its not impossible
jetbrains ides do this
never seen that before
groups files that belong together
nested files as an actual filesystem feature π
you have it disabled, gross..
as an IDE feature π
so much fluff
how do i enable
i like it tbh
why would you ever look at the lock file
if it's an IDE feature it 's confuysing because i will think i am using a filesystem which supports nested files
malware
i haven't seen that in webstorm
when is vencordinstaller being reworked
is it a setting or something?
you should really rewrite vencordinstaller in https://wxwidgets.org/
vencord installer in swiftcrossui
vencord installer in cef when
wait i should try making
liquid glass for vencordinstaller
i love ai
i disabled
vencord installer in java swing
maybe you aren't stupid enough
you must install java for vencord to work
okay but wxwidgets is the goat
oh you need an ai license lmao
so bad
wait it's free
guh
this is like SwiftUI but C++ and wx
I wanna try wxwidgets more but c++ package management is genuinely disgusting
much cleaner
hop on meson wraps
what does editorconfig have to do with gitignore
i like how jb ides just let you create custom layouts and stuff
I tried using vcpkgs (actually goated) but one day I couldnt even build the project anymore so that is down in the dirt
the android plugin only shows gradle modules for instance
cuts out a lot of the junk
Qt Creator separates .hpp and .cpp files but doesn't maintain the directory structure so that is ass
it also centralizes all the configs
wait til you hear about cocoapods
would say gradle but compared to some languages we have it pretty good
one thing I found annoying is that vscode doesn't create another header file along with the cpp file i created
might just be me
xcode is spoiling me
xcode sounds so good i wish it was real
include/*.h
src/*.{c,cpp}
do u seperate ur headers in another dir
or is it just me..
i don't
from what I've seen most projects keep them together
probably easier to switch between the files that way
I tried using a include folder but it was so annoying to manage both of those
idk how projects do it
include is supposed to be for public headers
something that you would distribute
otherwise having them on the same directory is common practice
the question is why are you staring at the file tree instead of writing code
start using a fuzzy finder
https://github.com/SFML/SFML/ for example does both things
i cant type for the life of me
why wouldnt I be staring at a tree that I would need to always look at and organize when coding
C++ modules please become real
cpp programmers will continue to ask for their language to become bearable forever and they will never be heard
the more useless files the more overwhelmed I am to the things I wouldnt need to look at
there are only 2 types of languages
ones that people complain about, and ones that people dont use
π£οΈ π£οΈ π£οΈ π£οΈ π₯ π₯ π₯ π₯
ngl he cooked with that quote
omg i honestly forgot about this
Roie
roise
awful
they are already real, but only in MSVC afaik
also TIL this feature comes for free in elle
"hello {}".format(TypeInfo::type_of<string>().wrapping()).format("world");
``` would be formatted as `hello "world"`
double format call looks kinda silly
but the .wrapping call returns a new fmt string depending on what the type is
then the second format call formats with that new format string
so it becomes "hello \"{}\"".format("world");
why would you do that unless it's a library
many c projects have a separate includes dir
ya
for what
what
no but i understand how it works
i hacked together a few features i needed in it lmao
i went into the focus mode for physics and further maths that i said i was gonna do
all my activity now is stuff i work on in my break days
and my school project thing
anyway elle 70 stars !!!! n
OH that reminds me :333
i got 81% on my last physics test which was on thermal physics and simple harmonic motion
my physics grades went from 20% to 80%
itβs crazy that my grades are actually good when i do even a tiny bit of studying
because throughout the last year i did almost no revision for any content
nicee
its literally july what focus mode
im so glad im done with school
im gonna do a bachelor in informatics at a remote uni and just stack all subjects that i already know into the first semester
iβm behind
iβm planning to spend the whole summer studying
for exams next summer??
yes
i have mocks in september i need to bring my predicted grades up so i can apply for uni
idk what kind of exams you guys have but i started studying 2 weeks before my maths/hardware
good enough
i need a B even to go to japan but iβm aiming for an A
who told you you need a b
the uni application website
what uni
thats barely even in japan lol
are u gonna study in japanese
or in english
informatics?
english
my current goal is to go to edinburgh though
for which i need A*AA
i get a year abroad there so i can just go to japan during that course
wtf is A*AA
grade requirements
britain try to use a normal grading system challenge
A* in computer science, A in maths A in physics
is A* just A+
yes
i donβt but i can easily get that if i show iβm working at an A* level on my ichigo project thing
iβve held almost 100% on every programming test in the last year
yes but i can get loans for edinburgh and i canβt for kyushu
yuo had 100% on every test but dont have a A*??
and i have an A in maths already
how much is edinburgh
no because i fucked up the end of year exam WHICH WAS THEORY ONLY BTW
lol
scam
the entire course
per year would be america levels of scam
lmao
there was stuff in there like βdefine baud rateβ and i went in completely blind
how tf am i supposed to know what baud rate is
well i know now but i didnβt then
literally just data transfer rate no?
i have a B in cs atm
no itβs the number of signal changes per second 
9600 baud is faster than 4800 baud
i initially wanted to go to a uni of applied sciences, which is more like school with a fixed time table and they let you skip 2 semesters if you went to a technical high school
paid 250 euro deposit that i cant refund anymore
and they gave us this really horrible boolean algebra question that everyone did horribly on
i was one of the few people to get 3/4 on that question
how can you fail a boolean algebra question
interesting
what did u get wrong
you donβt understand
hold on
their application website requires leading 0 for birthday
you do the question then
hold on
lemme remember whats +and whats *
- means 1 + x = 1
- means 1*0 = 0 i think
so its not w and x and z or w and z or x and y and not z or not w and x and y and 1
- is OR, * is AND
yes thats what i said
yea ok
the 1 can be omitted
the answer
you can drop the not w at the start because its repeated in another and expression at the end
i donβt think you can, youβre supposed to factorize and then apply absorption rules and stuff
this is my answer



