#Programming & Computers
1 messages · Page 6 of 1
but after using vscode i dont miss running a jvm ide
also have vim mode so its ok
jvm is the best part about java tbh
not so much in the context of ide but ...
sure but its also bloated as fuck and the font rendering sucks on windows
i used to use phpstorm on my macbook when i used to work with php
now i use datagrip as my db explorer and its slow and ugly
always enjoy shitting on microsoft but gotta give credit where its due, theyve done some top tier optimization of electron in vscode
i was unable to get a decent support java running in neovim even after 2h so installing idea was faster not like i am going to use java in my private life
dude i have vastly overestimated my java knowledge, struggling more with java than the assignment 
still one month left till the last exam
idea carrying hard atm
assignment due on monday
well after the exam till the next semester begins ...
so not a lot
kinda sucks but cant rly do anything so its whatever
i may not take the last exam not completely sure yet depends on how much time i have left to prepare after i have finished all the other exam prepareation/assignments
would be the same for me
its the people you are with who do the most for your motivation
the assignment sucks they gave us interviews with the product owner and some documents and now we are supposed to implement that shit
should have gone to vacation with them 
but aespa concert soon
tbh idk when, but soon
maybe they run into the biggest celebrity there is
waffle
i cant by chance in java inherit and implement an interface at the same time can I?
would be surprised if it would be possible
google time
I can java you are more capable than I imagined you to be
i tried to use intellij once for a kotlin project and it's so fucking slow
for now its running fine
i hope i never have to touch java again
with some luck this will be the last time for me also
so I will have to use it again ...
java be like
the horrible thing is i briefly considered a 3 layer inheritance ...
what java does to a man..
yeah case in point i just saw this in the work chat
dude, I have the feeling they dont even know what they are asking for in the assignment asked 2 different people and so far I got 2 different answers
the prof directly isnt available and i got the two different answers from the ones responsible for the exam
i will just use the interpretation that will lead to the easier implementation and hope that will work out
usually when that happens you have to complain to the faculty about it and try to get the marks scaled afterwards
sometimes it works sometimes it doesnt
yh, happens a lot unfortunately but usually you at least get a clear answer on what is right after you ask
they make that practically impossible i would be careful with that
happens sometimes you only see one interpretation even if multiple exists
natural lang things
java streams can go fuck themselves
tailwind solves this
mostly yes
it won't solve the strange interactions with different css properties though
jesus christ
the slowdown is hitting now
We have a new senior dev who started some time ago and he supposedly has 20+ years of experience but has trouble with something as basic as creating ssh keys... and his code is extremely messy
i have to help him constantly
maybe give him some perl to write and he will do better 
I hope your position is at least senior as well then
sounds like a couple people i used to work with
10-15 years exp and im having to rewrite everything they do cause their code sucks
LOL
💀
so true bestie
Love this guy
well then
bun 1.0 comes out today 
I write my last exam in 2 weeks ...
unfortunately for us the exams are always at the end of the semester not the beginning so its always a bulk, having the post exam at the beginning of the semester would be such a blessing
also fine as long as it isnt at the end
beginning would still be best though
do you know how the post exams are created for you university? for us its mostly orientated on the main exam which can make it easier to study for it
what is a post exam?
some courses are only offered during the winter or sommer semester and if you dont write that semester you can take it in the next semester (if you have the requirements) but you cant visit the accompanying course so you have to study on your own
oh interesting
since you dont have the accompanying course they usually recommend to not take post exams at all or wait 1 year
my uni just had fixed semesters
what does that mean? fixed semesters
like the modules can only be in the first semester
and if you dont take it you dont take it
I did before and I probably will in the future, I do think i will postpone less exams the more I am used to university but yh ...
or failed the first one 
i dont think you can voluntarily do that here unless you have an illness or somthing
but you cant fail a third time :pepecelebrate:
not all exams have post exams though sometimes you have to wait one year, also you usually have to get qualification to do the exam during the course if you dont get it you cant write the exam
same for us, you can even cancel it while you are sitting in the lecture hall
have to hold myself back every time from doing it lol
yeah its a good thing thats not an option here
you also study comp sci?
i only convinced myself to study cause the exams were looming over me
i graduated earlier this year
m2 but then it sometimes is too late depending on how much time you have between exams
congrats
not sure if I am capable of the same lol
you can do it
the real question is whether its worth it
cause i did a lot of engineering and networking stuff at uni
yh, thats a good question 
so if i end up doing webdev it was just a massive waste of time
might come with a higher entry salary, but yh else its a waste of time
learn javascript
dont rly like the whole thing with at least bachelor is required for position x, just doesnt seem reasonable even if I make my master my programming skills wont hold up to anyone who just learned on their own (in a reasonable effective manner) for 2 years
university isnt orientated for the practical aspect
and 2 year is probably being optimistic, most people could do it in less ...
no it really isn't
it's just theory you can apply later somehow
but you're still basically starting from square one when you get a job
or square zero i should say
even applying the theory isnt something that you can just do, if I dont learn theory while applying it into practice for the most time I have forgotten it after the exam.
also its hard to apply a lot of rules or theories without the experience behind it for example software engineering design x would be better than design y in aspect m but design y would be better in design n, what do you choose? well idk i dont have the experience to tell you
to be fair knowing the theory and then collecting the experience isnt a bad method, its just that learning the theory while you are also getting the practice in is more effective
this is all very true
you only appreciate the theory when you run into a problem you can solve with it
but then you've probably forgotten about it already

also applying the theory is a separate skill in its own right
thats why I would like to participate in the hacktoberfest this year, lets hope this works out
feel free to make pull requests to miso bot 
I'll have to add it to be eligible for this
python right?
yeah
what features you need
can i make it so that everytime i fish i have a 50% chance of getting a legendary fish but i also have a 50% chance of losing the same amount. if haseul posted something to ig that day the ratio is 51-49. thoughts?

also, you have a minecraft server status feature?
indeed
I mean if I had something in mind I would have done it myself
or actually
add a chatgpt integration that makes ascii out of any prompt
i used to have >ascii command but it was so spammy
Fishy streak 
looking at misobot made me realize once again how low my practical programming skills are
reality checks are good ig?
💀
same
once I read async my heart stops
oof
i guess adding a fishy_streak in the db and just making it so you set fishy_streak to 0 if you havent made a fishy in the last 24-36 hours would work?

i havent done discord stuff in python
i wanna give it a try
ah fuck but then you would need a fishy streak leaderboard both in the server and globally
and then people would want a streak for each type of fish
but oh right streaks can also be between two people
shit
if its a gift

oh db stuff that I also dont know
hahaha
maybe you can fix a typo or something..
i hate nextjs so fucking much
why does vercel make the simplest of things like persisting data across different server contexts so difficult
in sveltekit its as simple as setting something into the locals property
https://firstissue.dev/language/
none of those look like good first issues for me 
java
UPDATE: This article has started an ongoing conversation with the Godot devs. They care about the issues raised, and would like to improve things. Significant improvements will almost certainly be made, although it’s still early days and it’s unclear what will change and by how much. I am encouraged by the response. I believe Godot’s future coul...
@sick storm do you want fishy streaks to only be between people or yourself too?
im thinking only between people (easier)

just looking into it
a little

never really worked on something that isnt mine
i can push up my idea i have for now
ah i cant
💀
no clue how to work with github
Do i need to open an issue first maybe?
you could try to make a fork to get a copy for yourself to work on separate from the original miso bot
afterwards u can do a pull req after pushing to your fork's main branch and use rebase or merge or something idk (i didnt work with this part specifically)
i think, thats how i did it with group mates for projects
Ever wake up and ask yourself: “Damn, how could I make email security suck even more today”? Tired of your Red Teams phishing emails not landing in your targets inbox?
Do you dislike Boston (the city) and love Satan?
If you answered yes to any of those questions you should come to this talk!
I'll be showing you how to spoof emails from 2 mill...
How do u check for comments on a pull request? My prof said that he made some on the pull req for some feedback but I can't seem to find any in any of the tabs 😭
they should just be there
hmm so he didnt make any then 🙁
yeah its at 0 rn
and no comments on any of the lines in the "files changed" tab either
when youre forced to write changelogs but you dont wanna be too descriptive
play store change logs be like
so true
one of my companies products were in one of these presentations 💀
oopsie
not this on in particular but another one at defcon
💀
just saw this to get an additional condition in rusts if let
if let (Some(a), true) = (b, c == d) {
// do something
}
if I have opened a pull request but I noticed that I fucked my whitespaces (i ran the formatter but there is a newline where compared to the other functions shouldnt be one) should I do another commit then or just let it be? doing a commit with just "newline removed" seems a bit excessive?
if its a pr you/they can just sort that out in the merge
ok so I will let it be, already did a commit just before that with "add comment describing helper function" 💀
thanks death
rebase squash commits and force push
i think they will hate me if I force push 
i mean force push to your own fork/branch
so it will overwrite your old commit with the new fixed one
ok thanks, I will look into git again
this is how we do it at work
i need a full course just on git bc i am an git
when pr is ready it gets squashed into one or two commits that make sense and then rebased to master
so you don't get 20 commits of "fixed bug" after review
thats pretty much what my current pr looks like 
will fix it, thanks join
LOL
it takes a while to understand the rebase commands, they're not exactly intuitive
git as a whole is not exactly intuitive
so far I managed to avoid learning git by deleting the repo and starting again
git: 'as' is not a git command. See 'git --help'.
easier than trying to figure out git ...
😭
pls tell me you are doing that too phan?
guess I am the only git here then
deleting the repo and starting again
u can use this to help
learn git
thanks I will give it another try
this is why ides are great
dont need to learn git
just click on buttons
i did learn git anyway tho
eclipse does not run good on a raspberry pi
you really need to know how to use the commandline git you can't be relying on some ide gui
what if you have to do some git magic through ssh, or on a headless server
happens all the time
ok I fucked up again but I managed to get back to what it was before now with only 3 commits more
all squashed now, thank y'all again
git rebase was a good keyword
👍
I didnt pass a check in the CI/CD pipeline that check however was failed due to code unrelated to mine (and its just a lint anyway) in that case I ignore it, rather than fixing it right?
what do you mean code unrelated to yours
if it was passing beforehand then it cant be unrelated to your changes
different file I havent touched
you dont need to touch the file to break something it depends on
ngl i dont know rust so i have no idea what im looking at
lint suggestion, just different syntax for the same expression
but at my work if the checks were passing before i started my work, then the checks break in my PR even if i didnt touch the related code, its still on me to fix it
since its my PR
ok thanks, then I will just ask
but I didnt want to bother them too much I have already given them enough trouble
if youre a junior then its expected that you'll be asking questions that you might perceive as dumb
assuming your seniors arent assholes anyway
^
is just some random project on github so I didnt want to pester them too much in their free time, but they were all nice so far
extremely so
in that case you just have to feel it out
most oss projects will be super happy to accept PRs but at the same time not all can dedicate time to helping new people
yes I understand that especially so since I am extra work and all of them are much more competent and could probably do the same I did in <5min
well when you put it like that, i guess lol
its just that some oss maintainers can be real assholes about PRs
linus 
cause there isnt really a line between oss project open for community contributions, and project made by someone that happens to be oss
personally all my oss stuff leans on the latter side
but i try to accomodate PRs when they come in once in a blue moon
since the scope of the project is a rust rewrite of the gnu coreutils I think its the first one in this case
thanks kairu
idk how you could break the check if you didnt event touch it
inferred types being imported from elsewhere? idk rust
if I look into the github repo I can see it, so maybe a case of its just a lint and not important and we will do it later?
i suppose i could post this here now it's in a decent state https://github.com/teamreflex/cosmo-web
join can laugh at my horrific react code
i mean that's a lot more impressive than anything i've made with react
the react way of doing things just gives me the shits more often than not
compared to vue or svelte
nextjs RSCs even more so, so many little edge cases just cant be handled properly
I should not apply the lint suggestion btw bc it is fixed in another pr
Yo hol up
Kairu do I need to sign a Terms and Conditions in order to use this website?
uh what do you mean
i added a little warning thing that you have to click continue to dismiss but other than that there isn’t anything else
I didn't notice needing to tick a box at all unlike literally every other website ever so that's why I said that
If there was I didn't see it
idk i didn’t add a cookie consent thing cause I don’t really care
And that's good user experience
its hosted on vercel using edge runtime
so i think technically the code runs in EU
but idk i dont care

damn you fast
have to wait until tomorrow before i can start on upcoming/ongoing state
but yea coming along
Today we're talking about how to design your projects in Rust without using inheritance.
Thanks very much to today's sponsor Quadratic.
Head to https://quadratichq.com/ to try it out!
❤️ If you would like to support what I do, I have set up a patreon here: https://www.patreon.com/noboilerplate - Thank you!
📄 All my videos are built in compile...
btw if someone wants to learn rust I found https://rust-unofficial.github.io/too-many-lists/index.html to be more useful to me so far rather than the official rust book (assuming you already know how to program), that being said I am not that far in the book yet so its just a first impression
Learning Rust With Entirely Too Many Linked Lists
that how i learn rust, its pretty good
the rust book is still worth reading
its like the dragon book
only read it if you actually need to read it, not just cause people say to
yeah so far I have the impression it focuses more on the memory management part which I prefer, I am sure the rust book also teaches that but likely at a later point and I dont want to work myself through the control flow chapter and so first ...
and the memory management part is what makes rust unique in my impression
i was pretty familiar with c/cpp though so it was probably more easy to understand
youre still new to cpp right
should be fine as long as youve done algorithms and data structures
I think you are confusing me with leroy I have a C background, although its been long since I actually programmed
ah ok
and I never got too far so I am trying to get back into it
so saying i have a C background is kinda weird but r/technicalllythetruth ig
i dont understand mobile app development
i know for a fact that the cosmo ios app uses react native
because ive gotten a js engine crash before
yet the android app doesnt, it seems to just use java/kotlin
kotlin apps are so much faster
just look at discord, the old discord app was great but ever since they moved the android app to react native it's laggy as hell
is that an android problem?
i just find it strange that you'd use RN for ios but not android
the whole point of RN is crossplatform
i dont know if it's androd problem or react problem but it's just bad
can't say ive had perf issues with discord on my phone, or any other RN apps like meta's
but then again i have a 14 promax so id hope it can run some js
the x86 binaries dont work in the android studio simulator either so i cant use frida to figure out wtf its hashing for gravity vote calldata
oh well
found the rust feature I was looking for AsRef makes struct composition so much less painful, i love this lang
i wonder just how many web dev orbits there are.............
at least two of us
lol
developing a site :D
having to design it first 
i may be a front-end dev but god i cannot pin down a design for the life of me
thats why I wont try anything beyond cli 
also my skill level is too low for now
tailwind solves everything
not really you still have to design the visuals to apply the tailwind classes you need for it
tailwind is the way
is it possible to --amend a pull request?
idk
dont do that
you can see the changes for every patch tho in gerrit
i usually only amend WIP stuff
thats how i got instructed at work, to not clutter the git history when making changes for like whitespace/spelling errors on comment etc
im not sure if thats a thing in gerrit
we do that in github tho
squash and merge
damn that looks like ass
but i agree with you, squash and merge for pr
i kinda want to try linear but i think its paid
either way githubs tools have come a long way
using gitlab is a nightmare in comparison
microsoft platform (github)
microsoft ide (vscode)
microsoft lang (typescript)

didnt they change their pricing or something
i think thats why they swithced
or its not free to use commercially anymore or something imnot sure
gitlab or hub
gitlab
not sure tbh, we were using a self hosted version
its project planning tools are abysmal in comparison to github so we swapped earlier in the year
I squashed it btw there was no code review yet, so I dont think a lot of context is lost
i hate restarting my pc after not doing so for two weeks
theres always another app thats decided to update and change its design
thanks chrome
mfw dracula user
The ultimate type-level trickery
i dont want to get ratioed by the ceo of vercel so im just gonna whine here
https://fxtwitter.com/rauchg/status/1718793573519487169
yet in my 1 month old nextjs project vs. my 2 year old work vite project...
love to see it
bonus points for blocking ctrl v so i have to manually type it out from my pwd manager
it happens a lot surprisingly
Every bank site asked me for at least one special character
- government sites
I hate to hold shift to key in my password because of that
or else they won't allow me to sign up
more often than not its older systems like banks that are like this
I hate special characters in my password
I already have 2FA why I need to also add a character that I have to hold shift?
you shouldnt be manually typing in passwords anyway
Well fair
But since muscle memory is a thing
I'd just speed log in to site with my many combinations of words I memorized in my head
My fingers do the logging in, not my brain
ngl i have yet to find a site that doesnt accept these
should I take compilers or computer graphics for next semester? im pretty even on both buti cant decide
not really in a specialty area either
graphics sounds more interesting
compiler sounds more interesting
if the interest in both is the same and the ECTS is the same also take what is easier for you
also check if theyre prerequesits for anything else you want to do later
nah theyre all senior lvl electives for my degree
i have about 3 semesters left of all senior lvl courses so theyre the last ones i need to take
theyre both on same day, but compilers gives me a big 6 hour gap from my prev class on the same day while graphics only has a 1.5 hour break
it very much is
thankfully thats all provided for us I dont have to do more than writing make
controversial. but c++ is stupid
macros and metaprogramming? delusions thought up by crazy people
probably why rust is getting popular

C++ is a monster we created, sure it can destroy anything when it comes to performance, but anything includes itself and whoever wrote the code as well
macros and metaprogramming are the outcome of the obsession with performance, it makes snese when you need it. There's even worse things like code gen for C++ but we don't talk about that
rust is no better when it comes to niche constructs that just look something out of a horror movie
rust syntax is one of the ugliest to me
idk obj-c to comare to it, but given it's from Apple
have no hopes
I like to write in Go
it feels good
swift looks good so i give apple credit there
but objc yeah no never again
i tried to get into go but it feels weird
probably just didnt give it enough time, especially coming from ts/js
if you use python or js for something and hate the fact that performance is dogwater or that you need to deploy a container with deps, Go is the way
if i need better performance i run it with bun first
idm docker at this point either
i get to build a static binary that includes entire dependency tree, and cross compiles to even MIPS and PowerPC
I heard about bun but doubt it's anywhere close to what Go or stically typed languages can do
nah probably not but when you're moving from node
on anything it actually boosts perf in, itll usually land you in the "good enough" zone
i see
rust tries to be expressive at all cost which leads to less expressiveness over the same amount as characters compared to other languages. which results in greater safety overall so I think its a reasonable decision
but the syntax is still in the C family so most people are familiar with it.
do you mean runtime performance or programmer performance?
have yet to come across a rust construct which I think is unjustified, but tbh I didnt spend a lot of time in rust yet and
Box<dyn Trait>
for example did take some time getting used to
you mean rust is expressive thus it's less expressive?
mostly don't really get spamming ' (not that expressive imo, could've just made it explicit or something)
rust tries to maximize expressiveness as a total not as a relative expressiveness/number_of_chars
two different goals for different purposes, but you should always choose one of the two
go from what I have seen heavily leans into the relative
both, but mostly I've seen is extensively used for (and personally used for) optimized code where I don't want to depend on compiler optimizations. Also for multiplatform code etc but that's seriously annoying
have yet to really use macros, besides the #define style which arent that powerful
i've seen some code with bunch of macros with #[something::something] reminds me of java and python magic things
oh yeah those are awesome
you can do a lot with #define stuff. look at glibc. It's also one of the worst ways macro ruin readability
ik, but if you do anything more than simple stuff it just ends up horrible
thats the real black magic shit
it's not black magic, it's just hard to trace
you have conditional includes and API stubs when you support multiple underlaying paltform drivers as one calls it
those are annotations arent they
you are telling me thats not the same?
php took the rust syntax for those
you have a macro defined in 10 different files, your final compiled code may use one of them depending on your target paltform
attributes they are pretty awesome, and widely used for example
#[derive(Serialize, Deserialize, Debug)]
struct Point {
x: i32,
y: i32,
}
and now you can serialize, deserialize your struct into json
it's a good thing but there's no easy way to know which of 10 macros it used
yeah when php 8 came out i made some atrributes for registering routes within the laravel container
instead of defining routes in routes.php
was really nice
how and who and what is derive ?
that looks like macros on steroids
derive is a macro yes
i have yet to look into the rust macro system havent gotten that far, but also for example Debug is just convenient it implements a non pretty printed toString function for you
still trying to find the one macro which linus torvalds responded to
I still dont understand that one 
i just have hard time understanding these magic decorators, just hard to trace where and what are they implemented
its always a tradeoff between dx and maintainability
php traits suffer from the same thing
https://yarchive.net/comp/linux/empty_statement_macro.html this one? i googled and this showed up
dont have that impression tbh, but I have also seen it before in haskell
what do you use haskell for?
and they just allow me to write a lot less annoying repetitive code, which should be the primary goal of macros
nothing I just learned it to better understand functional
ah nice
wrote a small parser with it and nothing more
nice
i heard it's fast and robust
people use it for data sciencys stuff
also Clojure and Scala
havent heard about clojure in that context yet
also I will have to learn it for uni eventually
yeah i was gonna say you might like elixir if you did haskell
i took a short look at elixir, bc my friend was learning elixir at the time but never rly learned it
its really good for fault tolerant stuff and scaling
doesnt matter anyway, I have to get more programming practice and not learn another lang
we are doing some interesting stuff at the uni atm which I would love to understand more and do smth with it in practice but I dont have the time
at least some of the assignments are still practical orientated and interesting
(only one course but whatever)
ada replacement?
the only thing ik about ada is that my software engineering prof loves it
doesnt discord use it already?
probably, twitch does/used to
your prof is old and traumatized and probably work(ed) for mainframe finance or defense
high scalablility is one of its selling points
more like lock free stuff
and it also builds on erlang vm so it can have a bit of a jump start?
its built on top of erlang yeah
no they have their own firm and are often contracted for self driving car stuff
which is also the reason we had to do the boring stuff connected to the financial aspect of software development
like?
cost estimation, risk assessment, how to pick customers, and also a bit of general knowledge of contracts
the first two were relevant for the exam, the rest was just thrown into the lectures as anecdotes
yeah i had to do an anti money laundering course a few weeks ago since i work for a fintech
gives you some how to at the same time 
that sounds interesting
a lot of it, at least what i had to do, was very much common sense stuff
but still had to do the course so the company has their ass covered
they had a lot of industry knowledge, so ig that made it kinda interesting
i was so confused when you started talking about elixir in the guitar context for the first time
i used to use irccloud when they first started and its all built in erlang
tried learning it and it was a huge no for me
i'll most likely ask chatgpt to convert my C++ to elixir and hope it doesn't blow up in customer's face
yeah good luck with that
I want a crossover between zig rust and kotlin where we take the best from each and have a language that feels good to use in every aspect, zig comptime (con: feels verbose), rust ownership and borrowing (con: macros), and kotlin simplicity (con: gc)
carbon looks cool, but skeptical
i don't think thats the case when it comes to programming
really its just some programming languages do some things really well but absolutely suck at something really important, and it would be nice to have a language that feels good at nearly everything without having a "thing" that sucks to use
the problem with that is that people all have different opinions on what feels good
you ask people what they want before cars and they say faster horses
people didn't know that borrow checking in rust might be a good thing
ive heard a lot of good things about zig but i havent really looked into it
mostly just from the bun team
what do you have against macros? 
without macros I wouldnt use rust
also heard some interesting things about zig but the library support is even worse than in rust
iirc it has c interop
not sure if thats good enough to make me happy
comptime is just 1 keyword and doesn't require you to learn anything extra
you can do the same thing but you have to learn less
ok comptime does look interesting
not sure if it is as powerful as macros though and it rly depends on the macro system you are talking about
if you take a look at lisp macros then it will fall short for sure by the nature of it being executed at well comptime
Nathan Craddock's website
and lisp macros are of a completely different nature
as you might know lisp code looks like this
(do ((i 0 (1+ i)))
((>= i 10))
(print i))
its all lists which is also, unsurprisingly, a data structure (thats called homoiconicity) what lisp macros allows you is to build code at runtime and that works quite well because all you have to do is to manipulate lists.
https://gigamonkeys.com/book/ is a nice introduction to lisp imo
so lisp macros are used at both compile and runtime?
only runtime iirc
they are universally known as horrible since they are powerful enough as that you end up with multiple dsl across a project which ends in poor readability
but comparisons are difficult anyway lisp macros and comptime have different goals set
as long as I never have to touch java or php im good
real
and cpp 
another one for the ai buzzword
windows terminal works enough for me 
no future courses explicitly requires it I might be able to avoid it in the future
thats one you dont hear often 
got me fucked up if you think I'm going to use a terminal that is not even open source and talks to a proprietary cloud server
and you have to.. log in??
didnt even look at it that far, i was just suprised that the "ai" has even reached the shell
@native berry you
but it just uses my ubuntu instance 
github has something like that as part of copilot x too
interesting
you can just smell it from a mile away when you see words like "waitlist" or "pricing"
noted
Describe the solution you'd like? A discussion on the goals of Warp with relation to licensing. Additional context I'd like to kick off the conversation by saying I'm not opposed to non...
I appreciate benefits like Getting eaten by a big company that copies and steamrolls the original project
2 years ago
theyre definitely considering it trust me bro
@arctic lava did you only use zig so far or also rust? would like to know about your experience of the differences
especially in terms of safety
i like rust safety, not a big fan of the syntax, zig is simpler but somewhat more verbose, but less safe, more control, (still better than C)
thanks
const file = Bun.file("./day1/text.txt");
const result = (await file.text())
.split("\n")
.map((line) => line.match(/[0-9]/g))
.map((nums) => (nums ? nums[0] + nums[nums.length - 1] : "0"))
.reduce((acc, curr) => acc + parseInt(curr), 0);
well that was fast
i was doing a typescript version here https://typehero.dev/aot-2023
cause i gotta get more advanced with the type system
i suck beyond basic generics
stuck on day two atm, I want to use a parser combinator to parse the input but I cant get closures to work in rust
day 1 in rust
||
const TRANSLATION: [(&str, &str); 9] = [
("one", "1"),
("two", "2"),
("three", "3"),
("four", "4"),
("five", "5"),
("six", "6"),
("seven", "7"),
("eight", "8"),
("nine", "9"),
];
fn first(input: &str) -> usize {
input.split_whitespace().fold(0, |acc, line| {
let numbers: Vec<_> = line.chars().filter(|c| c.is_ascii_digit()).collect();
let mut number = numbers.first().unwrap().to_string();
number.push(*numbers.last().unwrap());
acc + number.parse::<usize>().unwrap()
})
}
fn second(mut input: &str, translations: &[(&str, &str); 9]) -> usize {
let mut renamed = String::new();
'outer: while !input.is_empty() {
for (key, value) in translations {
if input.starts_with(key) {
renamed.push_str(value);
input = &input[1..];
continue 'outer;
}
}
renamed.push_str(&input[0..1]);
input = &input[1..];
}
first(&renamed)
}
||
i want to learn rust though, my goal isnt to get the solution as quickly as possible
yeah i get it, i used aoc 2020 to learn kotlin like that
i never went for leaderboards since its released at like 5 am for me
same in the university discord people start posting solutions at 6am i aint doing this
i am still at parsing the input
/[0-9]{1,2} (green|red|blue)/g
the only include I want to use is fs i want to do the rest myself
forcing myself to learn
yeah in rust it is as far as ik
||
function extract(game: string[][], extractColor: "red" | "green" | "blue") {
return game
.filter(([_, color]) => color === extractColor)
.map(([number]) => parseInt(number))
.reduce((acc, num) => (acc += num), 0);
}
const result = (await file.text())
.split("\n")
.map((line) => line.match(/[0-9]{1,2} (green|red|blue)/g))
.map((lines) => (lines !== null ? lines.map((line) => line.split(" ")) : []))
.map((game, i) => {
return {
gameId: i + 1,
red: extract(game, "red"),
green: extract(game, "green"),
blue: extract(game, "blue"),
};
})
.filter((game) => game.red < 12 && game.green < 13 && game.blue < 14)
.reduce((acc, game) => (acc += game.gameId), 0);
||
not sure whats wrong here but it is
do you sum all the colors of a game up?
then you want something else you dont want the sum but the max of the color for each game for the fiter, if I understand day 2 part 1 correctly
youre meant to get the games/rows that have less than 12 red, 13 green and 14 blue
so getting the sum of each color in each row then checking if that sum is less than or equal to the expected
should accomplish what it asks?
the elf is taking cubes out but the cubes dont have to be pairwise distinct
oh you're right
||
const file = Bun.file("./day2/input.txt");
function extract(game: string[][], extractColor: "red" | "green" | "blue") {
const counts = game
.filter(([_, color]) => color === extractColor)
.map(([number, _]) => parseInt(number));
return Math.max(...counts);
}
const result = (await file.text())
.split("\n")
.map((line) => line.match(/[0-9]{1,2} (green|red|blue)/g))
.map((lines) => (lines !== null ? lines.map((line) => line.split(" ")) : []))
.map((game, i) => {
return {
gameId: i + 1,
red: extract(game, "red"),
green: extract(game, "green"),
blue: extract(game, "blue"),
};
})
.filter((game) => game.red <= 12 && game.green <= 13 && game.blue <= 14)
.reduce((acc, game) => (acc += game.gameId), 0);
||
there we go
fn str<'a, 'b>(string: &'b str) -> impl Fn(State<'a>) -> Option<(Token, State<'a>)> + 'b
get away from me lifetimes I lied when I said I understand you
apostrophe syntax is hideous wtf
wdym thing of beauty 
that's why you just make functions that use string not &str
i dislike lifetimes
i like them, they are necessary for strong static analyzing
but annoying af for sure
i think it might be interesting to see what syntax the next borrow checked language might use
yeah the syntax isnt too good
day 2 python
||```py
def part1(input_file):
total = 0
limits = {"red": 12, "green": 13, "blue": 14}
for i, line in enumerate(read_input(input_file), start=1):
if False not in map(
lambda m: int(m[0]) <= limits[m[1]],
re.findall(r"(\d*) (blue|red|green)", line),
):
total += i
return total
def part2(input_file):
total = 0
for line in read_input(input_file):
power = 1
matches = re.findall(r"(\d*) (red|green|blue)", line)
for color in ["red", "green", "blue"]:
power *= max([int(m[0]) for m in filter(lambda m: m[1] == color, matches)])
total += power
return total
Did you know gRPC server stubs in C++ by default catches all exceptions and doesn't even log them 
at least not by default
had vector out of bound exception auto caught by the gRPC server stubs and I was like huh it doesn't crash but doesn't work either...
exceptions are fun, aren't they!
silent exceptions should be illegal
yeah you have to expand to the sides to find the full number
i've become accustomed to discriminated unions
but at work i have to use fp-ts which is an Either/Option lib
kind of the same but not
day 4 ||```py
def part1(input: str):
points = 0
for line in input.split("\n"):
winners, numbers = [set(x.split()) for x in line.split(":", 1)[1].split("|", 1)]
if matches := numbers.intersection(winners):
points += 2 ** (len(matches) - 1)
return points
def part2(input: str):
lines = input.split("\n")
cards = [1] * len(lines)
for i, line in enumerate(lines):
winners, numbers = [set(x.split()) for x in line.split(":", 1)[1].split("|", 1)]
for n in range(len(numbers.intersection(winners))):
cards[i + n + 1] += cards[i]
return sum(cards)
did everyone else already give up
at least give me time until my classes are over 
i gave up with day3 but havent looked at 4 yet
2019 was the most fun one
(thats on my school email)
for those of you who truly hate yourselves, you can find extra hard inputs if you search for "4chan bigboi"
though they often end up just being memory checks
i've yet to finish a whole year
one day i will go back to finish them
but i've usually given up around day 15
day 4 is way easier than 3 wtf
||
const file = Bun.file("./day4/input.txt");
const result = (await file.text())
.split("\n")
.map((line) => line.split(":"))
.map(([_, line]) => line.split("|"))
.map((line) => line.map((item) => item.trim().match(/\d+/g)?.map(Number)))
.map(([winning, current]) => current!.filter((i) => winning!.includes(i)))
.map((game) => (game.length > 0 ? 2 ** (game.length - 1) : 0))
.reduce((acc, curr) => acc + curr, 0);
console.log(result);
||
you sure like maps
advent of string parsing
i dont think js has good string parsing utils like python does
js applied to amazon software engineering intern role, wish me luck 
good luck
good luck
Anyone ever replace a GPU fan
i need to read the typescript docs more cause this took me like 30 min to figure out
type FindSanta<T extends string[]> = {
[K in keyof T]: T[K] extends '🎅🏼' ? K extends `${infer N extends number}` ? N : never : never
}[number]
i think its sketchy to replace the gpu fan because they're all special to the gpu or something
what in the extends T haskell ahh type code is that 💀🙏
generics
most sane typescript type
the only strange one is the string literal infer
cause thats how you convert a string to a number at type level
I do not like it
this is worse
thats the only challenge i had to cheat on so far
i didnt even know you could do recursive types

Not a single fan but the whole cooler yes

mines just making a grinding-ish sound
nothings hitting it and i blasted it with air so idk
its only a year old though idk
Is it possible to take the plastic part of the gpu apart, leaving the cooler and ziptying 120mm fans on? Kinda janky, but personally I can't stand small gpu fans going 3000 rpm
the plastic part is usually for directing air through the heatsink
zipties would work for quick temp spikes, but under a sustained load it would be less effective
I don't think it matters much if you get the fans close enough, the difference in the amount of volume 120mm fans move air vs the 80mm or so gpu fans is immense
This is my current 1080 Ti for reference, the fans make it a bit chonkier
if it works it works
obv my thing is just in theory
i guess you could solder the wires too if you really wanted to
Also upping my ram to 64 gb, sadly gotta part ways with my tridenz as I don't see a point paying double at this point for faster ddr4 anymore, I spent two weeks adjusting the memory timings on those with excel sheet open on my laptop to track whenever it would crash at what settings, just to get ~10% more out of my pc
Possibly, but I would say it's better to just have them on regular 4 pin pwm fan header because then you can adjust all the fans from one place and don't need a special program for just gpu fans. Also not sure how it would work going from 80mm 3000rpm fans to 120mm 1500rpm ones for example
i took it apart and tried to clean out whatever i could but ultimately i just ordered a replacement
and also realized i need to buy a new screwdriver set because fuck whoever designed this
Didn't even know replacement fans were a thing for gpu's, all I know is my janky solutions
Yeah it was only 22 bucks, looks simple unscrew replace screw
The only issue is getting the plate on and off the heatsink because the design is so god awful
Have to play twister with a metal screwdriver
a dedicated pry tool made of plastic is recommended
but if not that. Alternatives are any type of wedge
haha
The kit that I'm buying today should have it
If it's in stock
The thing that hurt me the most was I couldn't find a magnetic screwdriver and the one I did eventually find was super weak because it's probably older than me
But I know we have electronic repair kits herez it's like 77pc bunch of bits and magnetizers etc
oi that's neat
nice nice
c is so much better than java imo
what are some good free learning resources you have taken advantage of in the past?
God gives his strongest soldiers the hardest battles (learning C++)
hard battles make for strong soldiers 💪
finally found a use case for portals in frontend (react etc) and i feel like a god
i hate react i hate react i hate react
real
react
re-react
the rendering model is just so fucking stupid
im just putting memo() and useCallback() everywhere
is it like intercals please 
feels like you're designing your components wrong if you have to do that everywhere
probably
im not used to the entire component tree rerendering just cause one piece of state changed at the top
what do you usually use
vue
i also had to use a package that hooks into nextjs' router to perform shallow routing when updating url params
previously i was having the entire page rerendering because the RSC would update
well it does update the whole tree but it has a different lifecycle
vue's setup function is akin to the main body of a react function
that setup function only runs once and never again
whereas in react, your whole component runs every render
these are the main things im trying to fix rn
first one is cause i have the state for the list of locked items high up in the tree and inserted down to each item via context
second is much the same in that the filter state is high up and just passed down
yeah a useEffect with empty deps array is equivalent to vue onMounted
first should be fixed by just passing in an isLocked prop to each item so it remains stable across renders, but i overengineered the component so that it can take different children depending on the context of it being used
second would probably be fixed by simplifying the component tree
don't overengineer components
honestly the worst part is that everything feels fine on my pc and my phone
ok i discovered this syntax
// container.tsx
<Parent>
{({ prop }) => <Child entity={entity} />}
</Parent>
// parent.tsx
function Parent({ children }: { children: (props: ChildType) => ReactElement }) {
return listOfEntities.map(entity => cloneElement(children({ entity })), { key: entity.id });
}
somewhat fixes some of the context issues i was running into
slightly offtopic, but the illustrations in the book are slightly amusing
today i learned that ipv6 can cause issues with two docker containers networked together on the same machine
wtf postgres
how does it cause issues?
not actually sure, was just getting this error
password authentication failed for user "postgres"
Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"
remade my instance without ipv6 enabled and now it doesn't happen
that user only gets used by the other container, i have another read-only user thats used for external connections, which is where i thought the bad connection was coming from
ok lol its definitely not ipv6, its just a port scanning bot of some kind
password authentication failed for user "myuser"
i should probably just change off the default postgres port
you have the db port open for the wholw internet? yeah you will get so many bots trying to log in
as you do with ssh as well
yeah
i'd never seen it before, it was probably because on this new server i was using a common subdomain
Notes:
- I want to thank viewer Lance for pointing out that NeXTSTEP derives from Mach, the CMU variant of BSD. I will mention this in the forthcoming Unix Wars video too, so please forgive me there.
- I have made an error with regards to Berkeley EECS. Soda Hall is only the CS building. The EE building is Cory. I done goofed. I apologize.
L...
Don’t know much about computing but I like learning about lore
Like the drama that takes place behind the scenes
Like the whole Unix War
ex later became vim a text editor some people like 
no cult activities here for sure
idgi
ibm is the bad guy here not oracle
hashicorp did something similar with terraform last year iirc
^
#threatintel
someone just leaked a bunch of internal Chinese government documents on GitHub
https://t.co/BO8N64A7kF
because its just too good https://github.com/pkgxdev/pantry/issues/5358
Sorry if this has been reported elsewhere already, or if this is explained in docs somewhere, but I don't understand the contents you have in https://pkgx.dev/pkgs/. Lets take a few popular pro...
tfw your database provider rug pulls the free tier and the lowest paid tier is $40 a month
wtf
actually insane
i dont even need anything more than free tier, i just wanna use the deploy requests/schema branching. no one else has anything like that
i guess relying on free services to stay free is a bad idea
especially given the current market
for sure
i'm more than happy to pay for planetscale, just not $40 when my usage fits in the current free tier
neon seems to be the postgres equivalent but their free tier only has 20 hours of usage, so i'd need to be on a $19 p/m plan
so i'm currently torn between just spinning up a mysql container on an existing server or using sqlite on turso for free
wouldn't need to worry about rug pulls if you host your own db
self hosting means dealing with migrations 😔
got access to the arc for windows beta today
very strange getting used to different tab behavior
but the vertical tabs is quite nice
yeah just read about that, insane
2 years in the making gotta be state sponsored
all my stuff runs ubuntu 20 so its on 5.2.5
github also seems to have locked both accounts and all the repos so it doesnt seem possible rn to understand the full timeline
this dystopia is a lot more boring than I had imagined
i have also yet to read about a solution for it. checking every single package is not doable timewise and the only other solution would be web of trust?
was gonna say namespacing but then llms would start hallucinating namespaced packages
easy, just dont use AI
verified namespaces? so that you can at least a subset of packages are verified but then its a problem again of a managing authority
someone is going too. using AI as a dev seems to be absolutely rampant on reddit
but yes i agree with you especially for new and or developing devs such as me it doesnt make any sense it would be shooting myself in the foot
does anyone know by chance an example database for mariadb or mysql which is good to practice sql on?
thank you 
lets see if i can pack that into a docker image together with mysql
then i can learn docker while saying i am doing something for university 
you may need a second container to connect to the server and execute the dump
i have no idea if mysqld has an arg to run a script on server start
ok, this already seems more complex than i have hoped for 
praised be the simplicity of sqlite 
The mysql docker container can run scripts on startup if you mount them as volume to docker-entrypoint-initdb.d
thanks 
ok, someone already did create a docker container with all the db out of the past 5 years of exams
once again invested energy into nothing 
importing javascript utils in python
so cursed
cursed
what’s the nvidia driver like in linux? apparently oled displays have perfect text rendering in linux and overwatch works on proton so im somewhat considering a dualboot
▶VOTE for my NEXT PROJECT: https://www.patreon.com/posts/march-2024-poll-101363953
▶dotnet9x on GitHub: https://github.com/itsmattkc/dotnet9x
▶FOLLOW on Twitter: https://twitter.com/itsmattkc
▶FOLLOW on Twitch: https://twitch.tv/mattkclive
▶FOLLOW on Instagram: https://instagram.com/itsmattkc
▶SUPPORT on Patreon: https://patreon.com/mattkc
▶GU...
expected: porting shenanigans
what i got: murder mystery
say i have a text file with 5 million lines
whats the fastest way to remove say, lines 5000 through to 1,500,000

vim 
wc
I only know this because I was a masochist in compsci class
When everyone used Notepad++
I used vim
trimmed my db down to just the last 4 months of data and its still 400mb lol
if you open a 5 million line file even vim is going to choke for a minute before it loads
In the vim UI or wt?
what is wt
Windows Terminal
That's the run code
I usually just run vim in the wt window anyway
idk i dont use windows but when I open a db dump of miso bot in vim in the terminal it takes a minute
Think that's on the machine itself
you are a real one irfan
respect++
shorter
perl -ne 'print if $. < 5000' input > output
loooooooool
if true, not even a chatgpt wrapper
keeping this here for future ref
Can someone explain what that Raspberry Pi is? I checked Youtube and no clarification was made
Like I already had to know
So it's just a portable pc?
no not really
its a small ARM based pc thats good for electronics, like an arduino but runs a full linux OS
the whole idea is that it was essentially credit card sized
Yeah that's what grabbed my attention but never understood the purpose bc the lingo was for those already in the know
Okay, I know what some of those are so i can kinda piece them together
cheap, low power, tiny PCs really
some of the marketing pushed it for programming education
oh gotcha gotcha
never used go before but a statically typed lang that compiles to go looks pretty damn cool https://github.com/borgo-lang/borgo
isnt go also statically typed? the algebraic data types do look nice though, iirc go didnt have proper enums and also didnt look for case exhaustion
i vaguely remember something about it not having proper types because everything is inferred
and you need to make your own structs or whatever
not too sure
go has been on my todo list to get around to looking into for ages but i do genuinely like typescript so i dont have much issue just running bun in a container for anything i need
recently C++ got on my todo list because of university. i am already absorbed in self pity 
there's interfaces, which are structs under the covers which implements the interface but that's for polymorphism. doesn't make it any less statically typed, it's a language feature you can skip if you want strict type bindings
yeah i looked into it a bit more and borgo is more about getting rust's option type into go
Go is great if you want to,
- write non trivial code quickly
- write code with a bunch of 3rd party libraries and not want to manage its deployment, everything in Go compiles (except cgo stuff) to static binary with no dependency at runtime
- don't care too much about the garbage collector doing its things
- some implicit behaviors that feels very quirky like Google
Go is very easy and fast to write but it's not theoretically the best language or even close
it just does things good enough
rust takes much longer to write and to write and especially with multi threading but once it's written it works mostly safe and without the overhead
I say mostly because there's ways you can have segfaults in safe rust
i just find rust syntax absolutely revolting so i refuse to even attempt to learn it
not like i need something that high performance rn anyway
lol yeah fair, same tbh
learning curve for rust is way worse than C++ but again C++ is its own beast with undefined behaviors
I needed to write some TS for UI stuff, just ended up give it to someone who knew TS
it looked horrifying
ts generally only gets bad when you get into type gymnastics
90% of the time that only starts when you're either writing libraries or write generic frontend components
and some frameworks make the ts frontend experience worse than others
windows 11 is riddled with webviews yeah
ok i wasnt ready for how much bigger 1440p is over 1080p
definitely need to get an arm as this stand is huge and making the monitor like 10cm too close
diagonal inch difference between your old vs. new monitor?
ah I see what you mean
yeah on individual icons or text it can be a huge change
a few of my colleagues at work got the LG 28MQ780 or 28MQ750 (stand difference only) which is like a 16:18 monitor, and they really seem to like it for a second monitor especially for coding.
might consider it myself since I have to type up, edit and proofread a lot of documents per day, it looks like this
yeah I’ve seen some hype for 3:2 displays for programming
ye it doesn't seem so but it's much more detailed innit? It's why I've been going back and forth over getting a 1440p monitor
slightly higher ppi is nice yeah, its just the extra resolution thats throwing me off
and i suppose at 100% scaling text is /slightly/ smaller which i have to adjust to, had to increase me IDE font size from 14pt to 16pt so its not uncomfortably small
but all in all, worth
has anyone built zed for windows?
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. - zed-industries/zed
is this thing actually good
i see mac users love it
that's not exactly a good sign









