#development
1 messages · Page 14 of 1
it is five AM, I have had 1 hour of sleep in the last 25-ish hours
Chirst
not super sure, but it goes over the basic concepts of REST, and NodeJS + Express, if you know SQL, you can use SQLite, otherwise, may I suggest W3 Schools
I see, thanks
important thing to note, SQLite has emphasis on the Lite part of the name, it isnt as fully featured as some other SQL databases out there, and has limited data types. If you can make it work for your use case, then by all means use it, but dont be afraid to try out new things, such as PostgreSQL, or MySQL and MariaDB, or (ill regret mentioning it, but oh well) MongoDB, which is a NoSQL database (meaning you dont write SQL to query and modify data)
and most importantly, remember, it is not pronounced "sequel" "S Q L" or anything else, it is pronounced "squeal"
and most importantly, remember, it is not pronounced "sequel" "S Q L" or anything else, it is pronounced "squeal"
blasphemy
(lmao i've always alternated between S Q L and sequel depending on which SQL it is)
MySequel, Sequellite, Postgre SQL, MS SQL, NoSqueal
yup
First issue, no clue how to access the localhosted db thing from the video, I did a slightly changed version to make it immediately work for the future but I screwed something up
Ayy, with the help of github copilot, I got it working!
Thanks for the help Altrius, appreciate it
no please
Yes!
Also is there a way to make it so that an SQLite database just fills the gap with IDs, so if there's a range of IDs from 1-42 and I delete ID 24, but then I write a new entry, it gets the ID of 24 and the next one gets an ID of 43?
not unless you keep track of which IDs are in use yourself somehow (which is highly inefficient)
Fair enough, I'll just use the DBManager for it then
In that case, any way of having multiple people work on some project at the same time?
And in terms of sorting them, how would I make it so that it all is sorted and inserted based on the numbers in a given column?
SQLite is an embedded database which means it is literally just a file opened by the process using it
There is no out of the box way to have two processes use SQLite at the same time
If you need concurrent access between processes you need to either use something like Postgres or make some interface yourself so that all database accesses go through the one process
One of my projects using SQL just defines a ‘/root/sql’ endpoint where I can type SQL in an HTML form and get a response
It doesn’t have the type system niceties but I only use that for administrative work so it’s fine
Doesn't have to explicitly be two at once, but just two connections to it at separate times, it's a small group so overlap likely will never happen
as long as the filesystem supports file locks then it should be fine
Technically this is incorrect
https://sqlite.org/hctree/doc/hctree/doc/hctree/index.html I mean the same file
This is a fork of the project right?
By out of the box I should have clarified the upstream stock configuration
They label things weird with their own vcs, by conventional standards it's not a fork
Anyways yeah concurrent sqlite coming soon tm
Awesome
for an web app, I wouldn't use sqlite
use the postegres or one of the full databases
Any major advantage?
Idk do whatever works honestly. I doubt you will operate with enough scale and complexity for that to matter
Yeah it's just a project for easily adding in recommendations and removing them, nothing much
Use what works until it doesn’t work and change at that point
for school projects that are submit then forget
sqllite is fine,, but if you're working for a client, or the project says make it realistic (field standard) use a full database
This is a sideproject, but I'm wondering what it does better and if it's worth moving to Postgres
If youre trying to learn a webframework, go for sqllite,
if youre tring to learn sql, go for the real thing
efficiency and effective studying is only learning one thing
Part of what I'm doing is just learning databases and eventually I want to make it an actually useful database and use it to add/remove recommendations easier
you would still learn sql with sqllite though
unless your webframework doesn't have a driver/adpater for sqllite, then it's still up to you
Idk what that is tbh
are you learning web dev from scratch ? like is this your first side project
Yea, but not my first. I've been learning for like 2.5 months by this point
I code in HTML and CSS and just get Github copilot to make all my Javascript
i'd recommend
progamming languageg then learn framework then learn sql
if you still need copilot to make your js, then you shouldn't learn making a full database
you need to learn javascript first
What's a framework? Something like Bootstrap/Tailwind?
I'm not used to this terminology
I mean it works for now and it does what it should do, I don't quite see the issue
in that case, go with sqllite. you'll learn the meaning of framework when you use it
theoretical definition is not very useful in development IMHO
what language are you using btw
For what?
for your cat
I am very not used to this terminology it seems, what's that?
tell me everything you've used so far, then ill tell you what to learn next
HTML and CSS for the actual site, JS made by copilot purely for some functionality like dark mode and light mode, and now NodeJS for connecting the database, also made with copilot and a helpful tutorial
web development is overwhelming to learn now because we made so many tools to make it easier but at the cost of beginners needing to learn so many things
i'd suggest you learn Javascript first.
Search up interactive frontend projects.
like create your own homepage, everything about you, with animations and such
just spent 2 hours debugging an issue only to find out it was because I accidently added 2 extra quotes in a place they shouldnt be
would this be a valid reason to @ the mods?
kinda curious cause it differs server to server
What
bad planning ? oop prolly :p , i wonder what the software does with new-combined families , families where the grandparens adopted the grandchildrend because of an illness or death of the mother and or father, children of mothers who dont know their father, because the assertions wnt make mucch sense for these, or just add a caution : cannot guarantee optimal functioning for famillies in the appalachian 😄 , or like Muay thai training camps where some kids take the name of the camp, but only sometimes the camp adopts them (for orphans) , my fater is a familly bussiness ,or an institute/corporation. 😄
it's a family tree.... someone being dead doesn't magically stop them being their parents on the tree
if its a child verry often for legal reasons one of the parents parnets have to adopt them, making them both parents and grand parents... if that isnt a problem in the tree i dont see the actuall problem because you can just make the father the real father of the daughter and set the grandchildren as adopted for the father and real kids for the mother
if adoption isnt handled by the tree, and only allows for real parents, i feel for the partents who adopted a kid from a 3rd wolrd country ,... family tree: no kids
Bad idea to forward port 80 on my network to my main computer?
Depends what you're running on it
If you're running a website it's probably fine as long as you don't pull a sourcehut
Just need to test if a server works but I need to hook it up to an http server, just gonna host it on my own
Have you heard of SSH port forwarding?
It is GOATed
not familiar
A lot of my infra stuff for personal projects is connected that way
You can tunnel any remote port on a server to a local port on your machine
so port 80 on google.com can be accessed via any local port on your computer
So long as you connect to google.com via SSH
Other way around, I need the external server to be able to send me http messages
You can use SSH reverse port forwarding for that too
One of the machines just needs to have SSH accessible from the other
And you need to be able to connect to it from the other
i cant ssh into the external server it's some random company service thing
Yea you’d have to open a port at that point
Or at least that’s the easiest approach
Right right
now im trying to figure out how tf to get a WSL2 server to be open to the internet, apparently its not automatic
nginx might be able to just redirect that for me im not sure
Technically you can proxy this through a third server but that’s pretty advanced
wsl 2 apparentlyu sh netsh interface portproxy add v4tov4 listenport=<yourPortToForward> listenaddress=0.0.0.0 connectport=<yourPortToConnectToInWSL> connectaddress=(wsl hostname -I)
Can we share things we make here?
Was it user error
Uhh I didn’t solve it and just worked around it
It could be correct and some funky C++ thing
dunno if this also works for c++ but to enable weird gcc quirks in c you can :
#define _GNU_SOURCE
Ye
This wasnt anything standard library
I was doing funky things with types ans the parser couldnt determine whether something was a template or a type
So I needed to add some “template” and “typename” keywords in some places
Anyways it mostly works now
why would you put 1'000'000rem as border radius anyway?
Make it a pill shape at any size, I could go with 200 or something but big number funny
and also inefficient, since the maths till has to be done
So it's still better to keep it low?
it saves precious bytes when transferring the site to the client, so its always better to keep it low
Fair enough
No one can truly comprehend the mind of a webdev
Neither can I
Anyone know why after reloading, serviceWorkerRegistration.pushManager.getSubscription() returns null before subscribe is called, even though subscribe was called before reloading the page?
nvm. the issue was that i was trying to access the registration before it was, well, registered
OK GUYS HEAR ME OUT
first off, i am not drunk, high or under any other influence
but what about an android app, that is a really basic audio player
BUT
it adds an exaggerated doppler effect to the audio, relative to how fast the phone moves
sounds like the type of stuff android apps used to be before it became services n stuff
like fake cracked screen apps, t-pain autotune voice changers, the one where you swing the phone like a baseball bat with a timing, etc
Sounds like a GPS battery guzzler
Yeah probably
Hey guys, I'm a UK based Comp Sci student. I graduate in July so starting to apply for graduate positions. How do you guys deal with coding interviews? I can code but I'll get flustered on the spot.
the best way to do it is simply just to practice, if im being perfectly honest with you
I say this as im sitting here writing code for an interview exam
not a specific language problem more of a procedure to use kind of problem:
i have an event i need to duplicate 1 time , i can usse a blocking or a non blocking way to detect the event , (the blocking way would require me to duplicate every event once and the required one 2 times) nonblocking way would just need to look for the 1 event and resend it. problem is that that 1 event can come multiple times and it needs to be duplicated each time. and the restriction im working with is that the duplicated event also has to pass trough the detectors and i have no way of knowing if its an original event or a duplicated one so : ```
<-------[line]-----[-|detector|-]---+---<[input]
----<[virt input]
how would i can i solve this. every thing ive tried so far either runs into a permanent block, an infinite loop , ex:
if `b` is the event we need to dup , for `<-ac--aba-ad-<` , the result should be `<-ac--abba-ad-<` and for this input :`<-aca--bbab-bad-<` it shoud be `<-aca--bbbbabb-bbad-<`, at this point i stopped even caring about things like globals , performace of the code , writing stuff to disk, or even what code to write it in, i started in C , but switched to python because its easier and less time consuming to prototype a possible solution. but i cant seem to find a solution (and somehow i feel like ive solved this problem before a long time ago)
Interesting. What is this for exactly? Maybe there is a better approach.
Talk through the problem. Explain what you’re thinking, and how you’re going to solve the problem.
They aren’t looking for perfect off the cuff syntax skills, they’re looking to figure out if you know how to solve problems.
To practice interview-flavored programming questions, this is nice https://www.techinterviewhandbook.org/grind75
Grind 75 is a better version of Blind 75 which goes beyond 75 questions. You can customize the available time you have, difficulty, topics, etc. The possibilities are endless.
Do your best to not only be confident, but to express confidence. They wouldn't be interviewing you if they weren't interested in you. It's hard to solve problems when you're nervous so just try to take it easy
this is good, but i like this better
https://neetcode.io/practice
A better way to prepare for coding interviews.
I like that the problems are sorted by type at your link
there's a roadmap as well but i prefer the practice tab
^ the two best things you can be here are competent and charismatic
At the end of the day, you're trying to sell yourself
Also, there's a good chance you're not going to get the first job you interview for. Submit a lot of applications at different companies. Pay attention to the types of questions they ask you and if you don't have a great answer, just try to come up with something and be ready for that question next time
Searching for jobs is terrible but keep at it and you'll find something great!
its more about it being a game rather than if ur able to solve the problems in a technical. if u dont gel with ur interviewer, ur out
the combo is to prepare for the technical problems and learning how to gel with any interviewer. then in the interview, only focus on gelling with ur interviewer rather than the problem. solving it should come naturally if u prepared. on the other hand, if u havent, if the interviewer likes u and how u approach the problem, u pass. even if u dont solve it
in other words, gelling with the interviewer > number of problems u solve on ur own
Anyone here who knows python feel up for helping me with some basic code?
hm, currently working on a project involving being able to authenticate (oauth) into arbitrary fediverse instances, and performing serverside requests afterwards
the relevant part of the code is something like
const clientId = await res.json(); // Registered serverside once and then stored for future requests
const redirect = encodeURIComponent(window.location.href + "/cb");
const scope = encodeURIComponent("write:account");
const oauthRes = await fetch(
`${fedi}/oauth/authorize?response_type=code&client_id=${clientId.clientId}&redirect_uri=${redirect}&scope=${scope}&force_login=true`
);
when authenticating to a single specific website (a more common usecase), then the server would just receive the redirect and request the token with the auth code, but in this case the server doesn't inherently know what fediverse instance a request is for, it has to receive that, how could i send that data with the redirect_uri (or similar)?
If you post your problem directly you're more likely to get an answer than asking if someone can help you:)
Append it? lol
although that would be RFC-compliant, it seems like at least some implementations don't allow adding your own query parameters to the redirect_uri (i.e. by hardcoding ?code= in the redirect, rather than checking for existing parameters and using & if so)
Have you considered abusing the shit out of the state param
:)
good point!
Just a thanks to those who replied. I was at work and forgot I posted the question! Applying to Nissan and BAE Systems both based in my region of the UK.
Oh sick, good luck!
rage moment: if i ever hear someone call Safari a good browser, i will commit violence.
reason: right now i am trying to figure out why the HTML in developer tools do not match the shown content. For real, right now i got a situation where i have a button with label A (set dynamically via Angular), when i look at developer tools, i see <button>A</button>, but on actual device i see button with label B. 😡
after spending day(s) on it, finally got it. It is some very stupid optimalization on the side of Safari/WKWebView. would have to dig deeper, but final result is that button with transform:translate3d(0,0,0) doesn't rerender it's own label if changed dynamically via Angular. Totally makes sense 🤷♂️
The dynamic dom, unfortunately, isn’t restricted to Safari or WebKit. While the confusing bits aren’t always the same, the dom you see in the developer tools and the dom you see when plodding through the JavaScript (or whatever) not being the same is always the result. 😩
i meant it was literally bad rendering - if one scrolled the button off screen and scrolled back, it had a correct label. if you changed the background color of the DIV behind it, it rendered the correct label. It is simply a buggy optimalization of rendering from Apple when using translate3d.
If it’s not reported already, perhaps you could report it. 
i would rather not have to deal with Safari ever 😄 (but that sadly won't happen)
Safari is good for everything except WebKit
But at the same time WebKit is good because we don't want to give chrome more damn market share
at rate Apple butchers every web tech they touch, i slowly wouldn't mind if that happened
i got a feeling Apple works by the "checkmark" system. Yes, we added the feature. Does it work ? Did we implement only 10% of feature set ? That's fine, ship it
Idk I think they did a fine job with swiftui/uikit
that is not web tech
i mean the amount of pain their webcrypto implementation brought me... ewww
what issues did you have?
i haven’t had to use it but i’m just curious
various unimplemented features. You can generate some keys, but can't export it. So you got the API, but you are limited by what actually is implemented on HW level, because clearly Apple refused to implement any crypto in software, so whatever is missing in HW is missing in webcrypto too
even worse if something for some reason requires some obsolete cryptographic method. Of course you can fix some features with shims, but even those were abandoned by now
so in the end, if one wants to have actually working crypto in browsers, they have to use https://github.com/brix/crypto-js (or -es version of it)
Does the spec define the missing attributes as optional and requires a check before using it?
Yea for all my stuff I lea into Rust + WASM heavily so I’m guessing something like cryptography has some rust-native implementation i can utilize
Haven’t needed that yet
haha, you reminded me of https://sql.js.org/ 🙂
sql.js is an SQL library for javascript containing a version of SQLite compiled for the web.
really the only limitation is what you can serialize into something you can store (most likely in local storage, so few MB limit)
Yea i won’t hit those any time soon
I have heard of SQLite in the browser like this. Seems cool but nothing I’m developing has complicated-enough client-side logic to take advantage of this
ahh microsoft teams isn’t working
also google gave me a challenge, i have a decade old dev account where i never published anything, they said they will close it if i won't publish anything in 60 days... time for a "develop some app and publish it in 60 days". I got an idea what to do, decided to learn flutter at same time and do the app in that 😛
Guys I am facing a problem and now I am lost.
So I am an intern 3 months in a Fintech startup
Now my first task was to modify an existing Api flow to add a filter to it that makes sure that requests that returns a certain response code are not to be hit again since it's ran by a cron job every hour and saving that info to db to compare against next time we call that 3rd party service. Now the 3rd party service in question has a sandbox env that doesn't not work and I cannot test the API flow with the response from there AT ALL. Now i have communicated this problem multiple times to my senior but its always gets put aside. Its been 3 months that issue is still with me 🥲. I don't have the time to make my own mock service for testing as I am how do I proceed here
I’m getting errors and I’m not sure why…
This is what it should look like and here’s the tutorial
async sanity check since i'm still not that used to it:
if i have code somewhat like
async fn inner() {
// Other stuff above
tokio::time::sleep(Duration::from_millis(n)).await;
}
async fn outer() {
loop {
// Other stuff above
inner().await;
}
}
the sleep won't actually prevent the loop from proceeding, will it?
and moving the sleep to the loop itself would do that, right?
Yes it will sleep in the loop because you are awaiting it
ah, right
so i came across this website and i saw that it changes pages on scroll wheel. How do i do this and/or what's the keyword for this?
https://duetnightabyss.herogame.com/en/#/home
3D Combat & Fantasy Adventure RPG - Duet Night Abyss - Until The Dawn
its not actually changing pages. Anything after the # is not sent to the server, so its just a hash
probably just some js to change the hash when the correct element is scrolled to. Idk how snapping the scrolling works, but there is probably already info out there about that
looks like there is a css property you can use to snap scrolling: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Scroll_Snap/Basic_concepts
I could really use some help right now. I'm relatively new to programming, but I'd love to learn more. I'm trying to do my first project with an API, but I cant seem to get the basics running even.
I found a Unifi API for python and I'm trying to write a script that checks for access points that are offline and cycles the poe power on the switchport it used to be
I'm trying with this API I found:
https://github.com/nickovs/unificontrol
but having never workes with an API or classes, I'm not sure how to get it to work, to even start working on the skript itself
I'd appreciate any help I can get
Take this pseudocode-ish thing
var logger // assume this already exists and is available globally
func main() {
address := "12345 main st"
filePath, err := saveAddressToFile(address)
logger.Infof("Saved address to path: %s", filePath)
}
func saveAddressToFile(address) {
filePath := /* do magic to save file etc etc */
logger.Infof("Successfuly saved %s to auto generated path %s", address, filePath)
return filePath
}
When you actually run this, it'd do something like this
Successfuly saved 12345 main st to auto generated path /home/abc123.txt
Saved address to path: /home/abc123.txt
Kinda stupid because it told you the exact same thing twice in a row. Is that generally accepted? Or would you remove one of them?
That hasn’t been updated for 3 years, it probably doesn’t work anymore
You could use a different log level for each of them
damn what was the trick again to find locations in a binary where it goes from a 0 to a 1, it was either : left or rightshift the number then xor with the original and smth... or leftshift then xor with original and smth but i forgot ... 😦
so it was shift right, then xor , will give you 1 where a 0->1 or 1->0 in the original from there just do a running sum of the current index %2 🙂
it made with GSAP
Oh wow ive never heard of gsap. Looks very interesting. Thanks a lot!
there is browser addon called Wappalyzer. It can show you which libraries website you visit uses. It's not always work but I guess it works in 99% wqebsites
i am using it pretty often when i want to check how website was built
Ooh. Have to write that down. Thanks so much.
I wanna try to do something similar to the one I sent earlier
doing a flutter app, still can't decide if it is good or bad 😄 . I mean dart & base flutter seems to be OK, but ecosystem is rather... bad. If you step outside of the basic constraints, you hit just as many dead libraries as there are dead/no longer developed cordova plugins.
I find flutter really nice. But the community is still relatively small making things pretty barebones and required a really good understanding of the language/framework
i mean it's not horrible, in about 2 hours i made a minimalistic app which queries a JSON file every 5 seconds, parses it into a tree data structure and presents it as ListView with ExpansionTiles for every level in like ~220 lines of code ?
pretty sure i broke every good practice tho 😄
Not sure if this is the right place, but anybody familiar with Google Docs/Sheets?
Is there a "Find and Replace" but for Color?
I wish there was, but I don't know of it. Best thing I can think of is using something like apps script to iterate the cells and replace the backgrounds (and subsequently flush the sheet), but this would be a pain to program
Figured it might not be possible, but hoping it is. Once I'm done and can do my Google or YouTube research. It's only 800+ PokéMon Two Types Each and Two Egg Group Types 😮💨
or you know, do it right and use styles from get go 😛
Less of a typing it all up and more of copy and pasting then, reformatting and tidying up. It was originally a Word Doc.
Designing a website for the 2nd time, any thoughts?
sorta looks out of proportion, but alright
This meme is the forking bomb
uhhh can somebody explain? it's supposed to be a boolean
if i make it (int)(point13==point14) it outputs booleans as integers just fine
oh i just gotta put the statement in parentheses but i don't understand why it doesn't work without them? really weird
how big or small can my private key be if im using hs256?
idk what When signing with RSA algorithms the minimum modulus length is 2048 means. how many characters is a modulus length of 2048 of a string encoded in utf-8?
utf-8 is 8 bits per character so 2048/8 is 256 characters?
less, because you also got RSA headers. RSA/assymetric encryption is ideally used to exchange a symmetric key which then both sides use
ok. im only using 16 characters and dont have allowInsecureKeySizes enabled and im getting no errors so ig its fine lol
how long should it be? or recommended
how much information is wasted bellow they key size depends on which type of RSA padding you use
so for example RSA-OAEP with 2048 bit key means 256 bytes total, minus 42 bytes for OAEP padding => 214 bytes of total data
hmm ok. so i gatta look into it more. got it
having said that, your best bet is not to use RSA if you can use something newer
but RSA is the most common option, so you might be forced to use it
like if you are talking with a web client which is limited by web crypto, then you might be happy to even have RSA-OAEP as an option 😄
hey does anyone know verilog that I can ask a quick question from?
thanks man! ok so im doing smth super basic
check if the two inputs are equal then literally put 1 in output else 0
I tested each of them separately and both works as intended. But chaining them will have problems. It keeps the result of the last comparison
but whats weird is that the output properly updates for every other test
Is there some provided test infra with Verilog?
like it should be 0 and then 1 but we stay at 0. If i test the equal case first i'll have 1 and 1 instead of 1 and 0
The test infrastructure I’ve had to use was mostly custom stuff
i dont think so its building an ALU from scratch pretty much
Yea Id have to see a lot more to be helpful
problem is that it doesn't properly update the output. Here's the code for this part: 4'd15 : ALU_Out = (A_in == B_in);
do u want me to send the whole waveform to your dms? i doubt that would help much
I’m a bit busy at the moment but I can take a look later maybe
understandable tho bc this is a weird issue for no reason thats obv
either way I appreciate your help man! thanks a lot idk why its only for the equality and the rest of them properly put the updated results in ALU_Out
What’s the difference between the equality and ‘assign’ operator again?
You might need to use “assign” to force it to be consistent
assign is for concurrent statements if im not mistaken
the always block runs sequentially
I tried forcing it to 0 at the beginning of the always block before the switch case statements
no difference. The only thing I have outside with assign is a zero flag
Hmm
all it does is it constantly checks output of ALU_Out to see if its 0 or not
but we wouldn't want that behavior from output would we
bc then it'd force it to 0 for any result of any operation
like, im using the exact same thing as the rest of the program and the rest works as intended and properly updates output by doing it like this
idk why it doesn't reset tho for equality
oh wait NO SHOT it would be this
this is my test bench
i think ik what happened. My always block is listening for changes in SELECT input
but all im doing in between these is im only changing the input but select is the same
so from previous test to the next test the select input is not changing so its probably not triggering the always block
is that supposed to be how verilog works? im new to verilog or any sort of hdl
yep that was it
I had to change always (ALU_Out) toalways (*)
yea that makes sense. things like always_comb blocks trigger based on any changes to the input values, so if the input changes with no change in the value then presumably it wouldn’t trigger it
Hey does anyone know what to do if I wanted to move my GitHub Desktop folder. Because I don't know if I can just like straight up move the folder without it fucking up some paths or something. Currently my GitHub Desktop folder is on my onedrive synced documents folder, but that could potentially screw up some stuff with version control syncing. So I wanna move it to my local drive.
Also, like, I was trying to download the file from onedrive as a zip and then unzipping it but it says it would literally take more than a day to do which is insane
"Currently my GitHub Desktop folder is on my onedrive..." shudders, then vomits
What kind of a masochist are you?
My entire html coding folder is backed up to onedrive so I can code on my laptop and desktop and have edits be mostly synced
That's justifiable, but mixing VCS with CONSUMER cloud services should be a capital offense.
@wild delta I would honestly just make sure everything is synced with github and re-install the desktop client locally, then you can clone the repos after that.
At least that's how id go about it
Bro 😢 I'm new to this ok 😭😭😭 WHATEVER I don't need your help an asshole website insulted me for the same thing and gave me the answer so I'm just doing that fuck you guys 😭😭😭
look at this bro 😭😭😭
Well see I'm coding HTML too but like why wouldn't you just use github for that?
Because I have yet to figure that out and I keep it local only till I am actually ready to have my very badly written code be public
Well you can have it be a private repo
Dude you're okay 😂 I just shudder at the thought because we were all in a place where we made mistakes like that, that just make you cringe.
I get the just figure out locally, tho i can recommend to start using github desktop to get a bit familiar with the idea of git, and then make your repo private.
Fair point
nah but highkey I need to thank onedrive for saving my life the other day cuz I was trying to use a thirdparty software to move files on my computer faster and it just like deleted a shit ton of stuff and thankfully I was able to restore my compture to a save a few days earlier and then just use onedrive for the other stuff that didn't get restored
What he said
I've recently moved from github desktop to just git cli and i feel like knowing how the concept of a repo works made it easier to learn git cli
VCS can be daunting but for ANYONE writing any kind of code its as important as air
also cli is just cooler
you can take the lamest application, make it cli and the satisfaction meter goes 📈 📈
Haha
Working around non-tech people, doing some basic git operation and impress people

bonus points if it is written in Rust, Golang, or Zig
cant forget that part
points for bragging rights, you get bonus bonus points if you manage to slap "blazingy fast" or "fearlessly concurrent" in there somewhere
"terrifyingly fast, hopefully concurrent"
"That's a cool program whats the time complexity" - "My code is not constrained by your mortal concept of time"
thats my current project, I have to manage child processes and maintain async concurrency across multiple threads at the same time
^ meant to reply to D'otter
i may have been sick for the concurrency lesson in my uni class :c still afraid to this day
lmfao, I had to figure out the best way to do bi-directional cross-thread communication for a project recently, that fried my brain for a few days
the fun one was running into an issue with memory borrowing and lifetimes in Rust that the borrow checker didnt pick up on, and it causing a hard lock of my app without me knowing why for, uhh, several painful hours
Hey guys so I'm tryna make a website rn, and my html file changes aren't showing up in chrome or anything. The doc is saved and stuff
I can see the changes when I edit them in inspector but not if I do it through VS
nvm I was referring to an id with a period instead of a # in my css folder 🤦♂️
Anyone have any good book reccomendations for CSS for beginners? I have an idea for a web-based project but I only know back end languages.
The projects backend will be using the Django framework, so if anyone who knows better than I do thinks that CSS isnt the right combo with Django pls let me know
This seems good https://web.dev/learn/css
django is pretty good, I've used it in the pass
I would also just reccomend using a framework like tailwind, makes life easier
look at the order in which operators are evaluated (see operator precedence)
I would recommend starting with basic CSS and getting even a rudimentary understanding of it and THEN checking out a framework, it'll help more long term
And the best thing to do is to just try and try repeatadly, fail hundreds of times and by that point you'll probably have memorized a lot of the properties
today i did a ✨ *thing *✨
Why did this remind me of this video?
https://youtu.be/tLdRBsuvVKc
If you're tasked with deleting a database, make sure you delete the right one.
Sources:
https://about.gitlab.com/blog/2017/02/10/postmortem-of-database-outage-of-january-31/
https://about.gitlab.com/blog/2017/02/01/gitlab-dot-com-database-incident/
Notes:
1:05 - The middle bullet point about the account that had 47,000 IPs was never mentioned ...
Because it's a good video
I just tunnelvisioned on adding math into my CSS and forgot I can just -100% lmao
if overengineering was a code
I wonder how many lines I can stretch that simple piece of code to in only css
you reminded me of the last week horror overoptimalization from Apple, where using translate3d(0,0,0) caused button not to change text when the HTML changed, cause optimalization
yeah fair, I meant more for like a project
Btw any reason to specify -webkit, -moz, -ms for styles when I can just do the style alone?
Legacy & propriatary reasons.
Thing is, if a browser implements some CSS feature that isn't part of the standard, they always have to put their browser prefix in front to make it clear to developers that it isn't part of the standard. Often times these things do end up in the standard at a later date, and that's when the browser prefix is dropped. Tho this is not always the case, and the implementation that the browser developer had prior to the standard might differ from the actual standard, so as to not break any existing pages once a feature goes into the standard, they came up with this prefix thing.
Tho on that note, not always did browser developers abide by the prefix rule (some prorpriatary IE CSS tags don't have a -ms prefix as annoying as it is)
The tl;dr is, if you only care about evergreen browsers then you can skip the browser prefixed versions as long as there's a standard CSS parameter for a specific feature. If you do want to support older browsers, putting in the browser-prefixed versions as well is very much advised
though there is something to be said for furthering the demise of them by having a "let them die" attitude towards legacy browsers such as IE
Realistically all you need supporting are Evergreen browsers, but even there you'll still encounter prefixes, mainly for draft specifications that were implemented early by browsers (although Chromium and Safari seem to really hate marking these), for stuff that is actually propriatary because it never made it into a spec or propriatary stuff that became so commonly used they made it into the spec with their propriatary browser prefix (looking at you -webkit-line-clamp <.<)
Is that true that Pablo Escobar created JavaScript?
There's only a few edge cases where you have to use engine-specific css features or experimental features. Compatability is very high, and if you really need, you could maybe use a polyfill library, but that probably isn't worth it, since you can use something like bootstrap css
Where can I find someone that can create a custom Linux GTK theme? I have a folder full of references and object images, but the CSS is daunting for me.
I think gnome-look.org has a chat system, could probably see how that works there
I've never used it, might just be a browser IRC client or something
I can do python, barely java.
I wanna start learning android development and i can either continue learning java or start learning kotlin which should i do?
I’d probably go into Kotlin
Just start with whatever you need to work in android - it doesn't really ever make much sense to say "I want to learn X, should I learn Y first"
Not that you wont get value from learning Y, it's just not what you want to learn if you want to work in X
many languages support Android, it's just that Kotlin and Java are the two most well documented ones
They could make an android app using Rust if they wanted, but it's irrelevant because the docs suck compared to Kotlin and Java
decided to pick up kotlin
put it back down
Yea it seems cool. Id imagine most people here don’t have a physics background
What precision floating point does this need? It looks like they use some novel/new solver engine so hopefully that increases numerical stability with lower precision
i recently saw a mindboggling one with also water but in the form of snow and the conversion beteween, since they behave completely different to one another , and also verry different from the ice it is formed of , snow sticks ice doesnt eg , i think it was the followup on this video or verry related in every case but cant seem to find it atm :https://www.youtube.com/watch?v=JSNE_PIG1UQ
❤️ Check out Lambda here and sign up for their GPU Cloud: https://lambdalabs.com/papers
📝 The paper "An Implicit Compressible SPH Solver for Snow Simulation" is available here:
https://cg.informatik.uni-freiburg.de/publications/2020_SIGGRAPH_snow.pdf
❤️ Watch these videos in early access on our Patreon page or join us here on YouTube:
- https...
Is there an easy way of changing the URL of a page to something else? For example, if I have
[domain]/HTML/Gallery.html
Can I make it just be
[domain]/Gallery.html
(context - op's message was removed)
This is not an appropriate place to ask questions like this. Especially when that sentence could be interpreted as violating discord Terms of Service
Additionally in the UK your message could be considered to be in violation of the computer misuse act, which could land you with prison time, a fine, and a lifetime ban from owning anything with a processor in it.
🤓🤓🤓
As the server host? Just move gallery.html up a level in the directory structure.
Or do you mean something else
maze generation is crazy sometimes
using 58GB of ram on a single python process
8% on my Ryzen 9 5900x
Am I missing something
I kinda forgot to remove the .html at the end of the "ideal" url example, I guess the primary point is how to remove that .html at the end, like how sites don't actually have a .html at the end, they just have the URL
And yeah as the host, trying to find out a way to make the .html end not be there
Deleted message
Okay thank god
I genuinely got scared and thought me trying to remove .html at the end of my URL was illegal
Nah lol, added context now
Thanks
Well i've won the memory race but at what cost? (runtime go die)
at least memory is probably consistent
On some simpler problems runtime is too variable and random to get accurate scores
generally thats something you would need to do in your web server's config
@vapid wigeon indeed, but one way to half the work required is : for a maze with 1 solution, treat it not as a single maze but as the two halfs the maze is made up of , since they wont interact with eachother, if you would like them to it just divides the maze into more pieces that each cannot interact:) should reduce the states in memory by quite allot and thus also the required memory
also you can use Scalene to figure out where the memory hoggs are located
Anyone know any company hiring full-stack dev remote? its tax free for foreign income in my country.
Highly suggest not asking random people in a discord channel for full time employment
Im bored and trying to see anything comes up. Even scams are puzzle that needs solving
so, probably really basic python question but I have this program
Rate = float(input('Payrate'))
def computepay(Hours):
if Hours <= 40:
print(Hours * Rate)
elif Hours > 40:
Overtime = (Hours - 40)
print((Overtime * Rate * 1.5) + (Hours * Rate))
print(computepay(Hours))```
it works as expected if i put in that I worked 45 hours at 10$/hr it gives me $525, but for some reason it also returns none right after, where is that none coming from
You're printing the return value of computepay
Which is none since it does not return anything
any book recommendationsfor learning c++?
when you call a function you get whatever value it return's, if you dont have a return anywhere in the function, its just gonna be "None". instead just return the final value so anyone using the computepay function can use that value however they want
also, putting Rate as an argument for the function too (as in def computepay(hours, rate)) would be more manageable for reusing that function but in the current code its not a problem
I have a previous edition of this. It's more of a reference than a learning book honestly.
I set up media queries to handle orientation of portrait and lanscape to make my site usable on mobile and desktop, but now neither one loads, despite the code being loaded, what's happening here?
guy i am stuck trying to automate my aws session
so here is what I do rn I ran this cmd
aws sts get-session-token --serial-number arn:aws:iam::<arnNum:mfa/<user>> --token-code <time based code from authenticator> --profile permanent
which gives me a json res as follows:
creds: {
AccessKey: "Somekey",
Secretkey: "sometoken",
SessionToken: "sestoken",
expirationdate: date,
}```
then I run the following cmd
`aws configure set aws_access_key_id "AK" && aws configure set aws_secret_access_key "SK" && aws configure set region 'ap-region' && aws configure set aws_session_token "ST"`
i want to write a script (.bat file preffered) where I give my time based token as argumnet to the cmd such at
configSession.bat <timebasedToken>
and and it sets my aws sessione
Nevermind, I completely forgot to set a class for the image lmao
Anyone around that could help me out with fixing a bat script I have? Not really sure what I’m doing and I’m trying to make it so when it opens the app I’m having it open it opens it minimized
Sounds easy enough! What's the program and do you need the .bat to run "silently" as well?
I found it through a creator by the name of Nutty, and it's to restart the Stream Deck software since if you've used it and use the plugins you know sometimes they stop talking and need an app restart.
taskkill /F /im "StreamDeck.exe"
start "" "C:\Program Files\Elgato\StreamDeck\StreamDeck.exe"
And what does silently do?
I open the Bat file with the Stream Deck which then closes the Stream Deck software and restarts it, but at the moment it opens the software over active windows, which as you can imagine is quite annoying when you're busy doing things but need it to work xD @vernal veldt
Sorry just stuck with some work at the moment duder but I'm sure we can get this to work, let me test and come back to you!
You’re all good, get back to me when you can
i need C assistance for something probably really stupid simple
i wanna make something that reads a file to a string
and then writes a different string to that file overwriting previous text
i'll just use something easier than C instead
probably a good idea
you should use Rust
i will not
it was something better done in just a shell script
and i don't like rust anyway

The crab will come for you some day
The crab can't get close to me

Why do batch scripts have to be so complicated xD I wish programming was easier
shell scripts are easy asf luckily
i tried to do something in C that should absolutely have just been a shell script
couldn't figure it out
tried to do shell script
worked in a couple minutes and i never wrote a script before
Would you possibly be able to help me with mine? I just need to be able to minimize an app on launch with a batch script
I'd have no idea I've only ever written one .sh
My knowledge is very limited
Uh, aren’t batch scripts different than bash scripts? One being Windows and the other Linux?
yes
I am new to coding. I am in my first IT semester. So far i only have experience in Java, Python and Lua in terms of General Languages, and Racket, Prolog and a bit of CSS.
I am considering writing a program that takes a link from a well known music streaming platform, and returns me the links for the other platforms i have enabled for the song the link directs to. Ideally give the option to choose another song if the first is not fitting.
I have never worked with any type of API nor have i ever created any sort of mentionable Independent program, whether with gui or console (past some really basic scripts)
How and with what should i start and where should i look for guidance?
I am open to learning new languages if theres a good reason to
Yes
Just trying to point out that you two are talking about different types of scripts. Cause a batch file is .bat and a bash file is .sh.
I know
Yeah, I tried to figure out how to get the .bat to do what I wanted but don’t know enough about them to look up proper terms to do what I need 😅
wich one of the two get your preference ?
I'm trying to solve the longest palindromic substring problem on leetcode and this is my solution
class Solution:
def longestPalindrome(self, s: str) -> str:
length = len(s)
if length == 1:
return s
for i in range(length, 0, -1):
j = 0
while (j+i) <= length:
if (self.isPalindrome(s[j:j+i])):
return s[j:j+i]
j += 1
def isPalindrome(self, subsec: str) -> str:
left, right = 0, len(subsec)-1
while left < right:
if subsec[left] == subsec[right]:
left += 1
right -=1
else:
return False
return True
solution = Solution()
print(solution.longestPalindrome("babad"))
it's, really slow
how do i improve it from On^3 to On^2
here's how I did this one:
class Solution {
public:
int longestPalindrome(string s)
{
unordered_map<char, int> umap;
for (int i = 0; i < s.length(); i++)
{
umap[s[i]]++;
}
int max_length = 0;
bool added_single = false;
for (auto x : umap)
{
if (!(x.second % 2))
{
max_length += x.second;
}
else if (!added_single)
{
max_length += x.second;
added_single = true;
}
else
{
max_length += x.second - 1;
}
}
return max_length;
}
};
Using a hash table
This solution is O(n)
Hmm but maybe this isn't the same problem? Can you share a link?
ahh gotcha
yeah, I used dynamic programming for this one
my solution for this one was sloppy but I'd look at the solutions other people have submitted
I saw the other solutions, it's a popular solution on youtube
But i wanted to see if i can find my own efficient algorithm
But well as they say don't reinvent the wheel
I've been lurking here a while, is anyone here doing PHP at all? Are there my people here? (and no, Laravel does not count, don't @ me!!! )
I'm a symfony focused dev myself and been one for almost 20 years no, living on the cutting edge, always
simple question : how many solutions are there to that problem? and would you build and automate a whole assembly line for that amount and tear down again after each run for that amount or would just build the thing once and be done with it ... my point being : stop writing classes for stuff that is not a class , nor has to be one , however a string could be a class of variables so if you really want it to be oop ( 🤮 ) here is one thing you can do ```py
class str(str):
def ispalindrome(s):
return bool(super().str()==super().str()[::-1])
a=str('badab')
print(a.ispalindrome())
The class thing is just leetcode's thing lol
then drop the longest palindrfome to be just a function or even just a bunch of statements without a function... (calling functions has to store the current state somewhere load the variables and clean state execute the function, store the rult of that fuction, request memory on the heap for that, (the return of a function can only be a single register and so forth, but thats the least of your problems using python.. for loops are really slow in pyton so if you dont have to use them the better
super().__str__()==super().__str__()[::-1]
``` that part cust compares the string with the reverse of that string so if the string is `'bla'` `'bla'[::-1]` wil be `'alb'` and since for pallindromes the regular and revers should be the same str()==str()[::-1] should be enough to detect that without a for loop
the class thing overides the buildin string class in python and adds a method called ispalindrome to that class so after initializing a string using that it works just as another stirng but with that method added to it , super calls the method on the parent class
int read(int f, void *b, int c); int write(int f, void *b, int c); int clock(); // 1
const int c[8] = { 0x007, 0x038, 0x1C0, 0x049, 0x092, 0x124, 0x111, 0x054 }; // 2
int w(int x, int y) { int n; int i=0; // 3
for(;i<8;i++) if((n=x&c[i]^c[i]) && !(n&n-1) && !(n&y)) { // 4
i=0; while(n>>=1) i++; return i; } return 16; } // 5
int main(int argc, char* argv[]) { int r=0; int b=0; // 6
if(argc^2) return -1; argc = *argv[1]&1; // 7
while(0x1ff^(r|b)) if(!(++argc%2)) { // 8
do while(1) { write(1,"[1-9]? ",7); read(0,argv[1],2); // 9
if(*argv[1]>='1' && *argv[1]<='9' && !(argv[1][1]^'\n')) break; // 10
while(*argv[1]^'\n' && argv[1][1]^'\n') read(0,argv[1],1); // 11
} while(!((r|b|1<<*argv[1]-'1')^(r|b))); r = r|1<<*argv[1]-'1'; // 12
for(int i=0;i<8;i++) if(!((r&c[i])^c[i])) return 0; // 13
} else { if(w(b,r)^0x10) return 1; // 14
if((*argv[1]=w(r,b))&0x10) do *argv[1]=clock()%9; // 15
while(!((r|b|1<<*argv[1])^(r|b))); // 16
b=b|1<<*argv[1]; *argv[1]=*argv[1]+'1'; // 17
write(1,"[1-9]! ",7); write(1,argv[1],1); write(1,"\n",1); // 18
} return -1; } // 19
only the finest "rng" used
old but stilll verry much worth it and valuable https://www.youtube.com/watch?v=o9pEzgHorH0
Jack Diederich
Classes are great but they are also overused. This talk will describe examples of class overuse taken from real world code and refactor the unnecessary classes, exceptions, and modules out of them.
holy mother of 🫢
i was having a silly time
i lost my annotated version though
i should rewrite it without stdlib someday
hehe , also multiple statements on a single line after an if clause with a return halfway in the code , id rater shoot myself then debug that inside a project
same
it was mostly an exercise in how silly i could make it
it was written normally then fucked up manually
can someone help me with downloading stable diffusion on amd+win, im stuck in a situation here
no one can
wut
im getting real damn close to just using my old pc for it
Leetcode wants you to put functions in a class
It gives you class Solution by default
now that is one hell of a bad practice especially to teach young starting develppers
How hard would it be to create a unix timestamp generator assuming I know HTML and CSS and have access to Github Copilot? Kinda fed up with the fact that every site that does this also needs AM/PM times and I hate having to mentally convert all those times from the 24hr system so I wanna make my own one with 24hr format
Nvm lmao apparently Github copilot is a god and I just got it to work with no effort on my part, time to style it ig
You can't use HTML CSS alone
though in python it's as simple as using datetime library, datetime.now()
Oh yea no the code was the part I was wondering most about, but seems like Github Copilot handled it perfectly for me, I'll put off learning javascript for a bit more
Is there a way to use a media query to check for mobile? My typography is great on desktop, but on mobile it breaks and is way too big because of the smaller screen
hey, I was learning html and I don't understand the use of <title> even after reading documents on it
The title is essentially what the website name is called
wait I miss typed it I mean
<a = "/" title = "blah-blah"> my first link </a>
I cant seem to unerstand what it's usage I tried it
but it just throw me to the location of my file saved
it doesn't even hyperlink me to my next page it throws me to file location
I read it online it says
Seems like it's used for accessibility
What @solemn solar said - It is a global attribute that is used by assistive technologies. I believe with the alias tag <a> it is used when you hover over a link to display text.
yes you're riight I got it I was about to mention
thanks @solemn solar
Hey can some here help me out with a spring framework issue i am facing?
https://linustechtips.com/topic/1559863-problem-with-autowired-in-java/
Here is the details
I am having a bit of a problem with @autowiring in java spring framework and i tried to write a small logic. classa having some member variables and a display function (along with a run function if i want to run it as a thread) and the respective set and get methods for the member variables.It wo...
in the case you referenced (anchor tags with the title attribute), it is used for both screen readers, and in some browsers there is a little box that pops up if you hover the link that shows either the href or the title field
ya'll need RNGesus
switched to linux yesterday and im trying to download amd drivers but when i have to type in my password it wont let me type
shi wrong channel
Yeah linux
How do you usually find open-source projects for python?
i have a really old dell pc like this and i wanna make a "1 bay drive nas" out of it. I heard that some people are using thumb drives to run os like unraid. But in my case, i just wanna run debian (without DE) with smb and nfs file sharing services.
btw this cost like 40 usd approximately, gonna use this as a backup server that will only be turned on occasionally
guy i am stuck trying to automate my aws session
so here is what I do rn I ran this cmd
aws sts get-session-token --serial-number arn:aws:iam::<arnNum:mfa/<user>> --token-code <time based code from authenticator> --profile permanent
which gives me a json res as follows:
creds: {
AccessKey: "Somekey",
Secretkey: "sometoken",
SessionToken: "sestoken",
expirationdate: date,
}```
then I run the following cmd
`aws configure set aws_access_key_id "AK" && aws configure set aws_secret_access_key "SK" && aws configure set region 'ap-region' && aws configure set aws_session_token "ST"`
i want to write a script (.bat file preffered) where I give my time based token as argumnet to the cmd such at
configSession.bat <timebasedToken>
and and it sets my aws session
https://pypi.org , https://github.com/search?q=language%3APython https://aur.archlinux.org/packages?O=0&K=python , or search pipy from commandline :https://pypi.org/project/pypi-command-line/
i usually end up writing python because i cant find an actual project that does what i want , leaving me to create the damn thing myself ... currently (amongst other stuff) on a linux app that is similar to spacesniffer, but also allows saving filetrees for later browsing even without the actual data (just the meta), and also working on a HID(any combination, including midicontrollers,and ir remotes and itself) logger, recordder replayer and editor without limitations on what can be used to trigger hotkeys in terms of combo's and or sequences across all hids, but for the actual hardware limits ... ||currently stuck on this one a little , skill-issue cant find a workable approach to store mousemovement data that is both fast to access is not lossy , and most of all doesnt exponentionally increase filesizes if you use faster polling or higher dpi rate, bezier curves but that would require knowing the future or changing the past something im not willing to do ||
Anyone tried jlcpcb before? The easyEDA integration is really really nice.
Thanks!
Any recommendations on where I could find some for JS?
well if you're using python, best way to store a shit load of sequential data would probably be a pickle instead of something like csv
Achieve ×66 speedup read time, ×25 write time, and ×0.39 filesize on your daily I/O operations.
it wont solve your exponential filesize growth problem but if you want fast to access these are the options with python projects
quick question how would you share variables between some concurrently running python scripts? they are doing their own thing running as a daemon.
the most convenient solution I found so far was memcached
it really depends on what your project requires and admittedly I'm not the most experienced in doing that, but just for the purpose of giving you another thread to pull and hopefully it helps you figure out what works best for you: people like to create a socket and send pickle'd objects over it (when you pickle an object it becomes a bytestream which conveniently works really well for sending data through sockets/networks and such)
best example of this I could find: https://stackoverflow.com/questions/47391774/send-and-receive-objects-through-sockets-in-python
well what I need is just to share a few numbers, like temperatures etc, like <1kb data in total. But it's important that any script be able to modify that variable, not just read it.
so far pymemcache works great, but i wonder about the security implications of it
If you really wanted to deep dive, you could probably take a look into memory mapped files (which I believe is similar to Linux sockets though please don't quote me), but that seems possibly overkill for this
yeah i know about pickle but that wont work since while one process is logging to the file another one might be reading from it ... this is what it currently looks like (note the linenumbers and thats only 10 seconds)
so, this is a game i have been working on: https://youtu.be/M4TEGYisuLA 3D world building game, map is generated at runtime based on a map seed... water, mountain and trees are driven by a simplex noise map as a height map. the individual rocks that are dotted around, are resource markers where mines will be able to be placed... aiming at being a casual town building game where you gather resources to build more, to support your growing town. been building on and off, here and there for a few months, but spent less than 10-12 hours total so far
Kinda impressive for about 10 hours
I'm looking to find a free panel for my website (can't afford cpanel). Is there one that supports cpanel imports? Current host uses them, but I'm likely to move to a better host for same price (unmanaged vps, but I have a friend who has experience managing vps)
Don’t. Use a messaging system instead
You can have shared memory if one is a child of the other
But that sounds non-trivial in python
Yea either use a messaging system or a file-on-disk
Memory mapped files are normal memory allocations except they are not “anonymous” because they map to a file
Regardless any approach in this direction is filled with gotchas so fix your architecture to not need to do this
also pickle is fucked if you need interoperability outside of Python
whats wrong with memcached? It is literally designed for this use case. To share key/value pairs.
lets say i have 3 independent python scripts running, communicating via modbus/snmp/bacnet updating their respective variables so the device can function as a bacnet/modbus/snmp gateway
Idk anything about memcache, I was just answering the first question. Shared data and mutability leads to added complexity, messaging is hard to fuck up. Just depends on your use case, if that’s working for you then why are you looking for an alternative
because this was the first thing I found and it works, but I expected it to not be the "best"/ideal solution. Or some security concerns about it. Basically well it works, but anyone has a better idea? kind of deal
Gotcha, ya only if you need it to be more robust or have control/visibility over who’s mutating the data, or if you are going to have multiple consumers. Sounds like none of that matters though.
Yeah embedded system, SBC, locked down, in a closet somewhere
hehe i used to use it to pass circumvent the block for passing down an env if your script needed to restart itself with sudo (its not allowed to pass the env under normal circumstances) but using picle you couldd dump the whole state of the program+env to disk using pickle and afterwards just reload it from that file 🙂 , otherwise doing stuff with btrfs and btrfs-tools becomes a real ffin pain
Hi guys
Any thoughts to second react project? looking for improvements , any suggestions or help are welcome https://luigihard.github.io/EcoFunding/
Web site created using create-react-app
if you knew this was the ui of a keylogger (something like screenkey but in console ) would you understand the ui here want means what eg or should i redesign?
helloworld
I think so
this is as straighforward as it gets
I've decided to build an indie game, I have previous programming experience and have decided on game engine and programming language, but I've never actually made a full game. Anyone have advice for someone starting out on this?
pick an engine, learn the basics
I wish I could be much more useful than Rugg here, but im afraid they're pretty much bang on. Take a look around the channels of various indie devs and see what you can learn from them, I know a lot of folk who love the content of Pirate Software who is an ex Blizzard dev and has a lot of useful knowledge on this stuff.
Really though, once you pick your language you're limited to what engines you can use, so make sure to choose something fairly well documented and widely adopted, that way if you run into issues whilst learning the basics, you can search around for answers and stand a pretty good chance of running into it.
or pick an api and learn the basics (gl, vulkan,dx,...) and learn the basics of that,
depends on what the goal of the endavour is :
1: you wanna make a game to see what you can come up with and learn the process , the game could be anything
-> pick the learn an api option
2: you have a awesome idea for a game in your head and you are looking to finally put it to the test and make it:
-> pick Ruggs option: pick an engine.
|| Ps for whatever non-existing experience i have with game engines , i dabbled into contributing to Unreal Tournament 4 development (was fully made by the community but for the engine and tooling what ofc used unreal engine) but there is verry little real programming left once you have picked an engine , offcource there certainly is some but most of the time your connecting nodes and changing parameters on them . designing environments and then mconfiguring that design ... but your no longer doing the math stuff for interpolating movement using a spring damping function so landing after a jump looks realistic and you dont wanna create keyframes for the whole movement ||
reply to this and srry for the ping rugg
I didnt realize he said he already picked a game engine actually
So in that case the answer is just learn the basics. Im not rly that good at game development either but I want to get back into it actually.
ahh but where you said there is "very little real programming left once you have picked an engine" isn't really true for me, as since I am going for something more simple (think Stardew Valley) I am just going to use Pygame and Pygame Zero
perhaps I should have specified that, as while pygame is considered a game engine, its not what people usually think of
would you be interested in hearing what the game I plan on making is?
Ive never used pygame but as I understand it, it's more of a rendering and window management engine rather than a full game engine. Although obviously the definition is kinda arbitrary. So you definitely have a lot of coding to do.
What the project idea?
sorry , my bad , i should have said " verry little programming if you dont want to , even no programming , since UE's blueprint script thingy is not programming. but i do still kind of stand by my point. and pygame and other engines like that usually are the pick of someone that wants to learn about game programming (but is a little scared , and with good reason maybe, of c++) , the other option i gave was that if you had an idea for a game that should be brought to market asap ! because it was a hole in the market. (or for what ever reason , that one thinks it should be made) python is a weird choice for programming a game in since python aside from being easy more or less is not really great in anything that is needed for a game, its slow , its big, its mostly distributed as source and allot of its libs are GPL (so that means if you use and made modifications to it to suite your game , your also shipping your source code (or your not including the engine with the gamebinary and have users install them in to the game manually. ... so if you had a clear goal of what you wanted picking python would guarantee you had to start over in an better language (for those points) at some point for te game to be viable to bring to market. python can be compiled and relatively fast , given that you really know a thing or two about opitimiizing the code and usually that means removin any layers that you dont really need , like a game engine , and drive the gfix api directly : like this project :https://github.com/gabdube/panic-panda (if you havent seen this clip , its worth watching to :https://www.youtube.com/watch?v=ZC6vrcHni9E&t=409s)
A 3D rendering demo powered by Python and Vulkan. Contribute to gabdube/panic-panda development by creating an account on GitHub.
So this was a relatively brief video about fps games made with python and what they generally look like using it.
In short, it's definitely doable, but if you want something more complex and detailed, you may be better off using something
like Unity, Unreal or Godot. Otherwise, you can still minimalistic but fun 3d games with Python.
Also, anot...
hey can some here help me out with some issues i am having wiith spring framework's requestmapping and jsp pages.
I wanna start learning Javascript, is there a better way to start than just writing it a lot like I did with HTML and CSS? I primarily wanna use it for websites
I know python isn't good for making games, but I have experience with it, and I don't with other programming languages. And learning to use Unity or Godot is more work than just making it in python, which I already know.
but like, I'm not making a game that would even be remotely resource intensive, like I said before, think Stardew Valley. When you take that into consideration python becomes a far more viable option.
So idk how knowledgeable you are of the indie games that are already out there, but my idea is for a top down 2D pixel game, something that looks like games like: Sea of Stars, Undertale, Stardew Valley, Omori, etc.
It will play in a more open-world kinda way, similar to how Stardew Valley plays, but with a heavier focus on the story it's trying to tell.
The hole in the game market I'm trying to target is the steampunk genre, I've noticed that other than bioshock, there really isn't very many good games made for that genre.
(The storyline is still in very early stages and I'm not married to any of it, if anyone has better suggestions.)
So basically its the very start of an industrial revolution inside of this Fantasy world, your home country is under attack by a much larger and more powerful empire. So far the world has revolved around Magic and Alchemy, but as everything is becoming more industrial you've realized that, using the newfound understanding of steam power, and by combining that with the already existing uses of magic and alchemy, you can create machines that could give your home a fighting chance in this war, as well you have to try to protect the nation from internal issues as well, betrayals, unrest, economic downfall. All in the hopes that it won't fall to a far more powerful empire.
So you have to collect materials, research new technologies, scale factories, discover secrets, expand to support an economy dying from the effects of long years of fighting, carefully choose your business partners. This isn't just creating war machines, you are essentially this nations sole hope.
I hope I did a decent job of explaining it, the ideas in my head are quite complex and don't always translate well to writing
#include <stdio.h>
void foo(int* ptr) {
int x = 10;
ptr = &x;
}
int main() {
int* p = NULL;
foo(p);
printf("%d\n", *p);
return 0;
}```
hey guys can u help me out here? why doesnt the pointer value from the function foo() get transfered to the pointer p
what language are you using?
c
that i can understand also i would suggest taking a look at the making fps in python as there are better alternatives for pygame, also if you already know python,... while i havent used it yet , mojo is a superset of python with many optimizations partially amed at calculating neural nets on the GPU and speed them up significantly, since gaming is also a gpu bound task maybe just running pygame in mojo instead of python will speed things up allot aswell
I will watch the making fps in python, but a retro style 2D top down pixel game, is almost entirely cpu bound as you pretty much just have static images, and any animation is a very low number of frames. Most similar games say "128 MB VRAM" for a minimum gpu requirement, python being slow isn't a huge deal. And honestly the only thing that might be better for me is RPGMaker, but that feels too limiting.
first to allocate memory on the heap u can use : ```c
int *p = malloc(sizeof(int));
> local variable on the stack of type int with name x equals 10
> pointer equals the adress of local variable x
the local variable x will be removed of the stack after the function completed so you are now left with a variable to a stackpointer that is no longer there , thats why you use the heap to transfer data between fuctions:
#include <stdio.h>
void foo(int* ptr) {
printf("we got ptr, a pointer to: (ptr) %p and (*ptr) %i is the value at the location of that pointer, as argument in foo\n", ptr,*ptr);
int x = 10; //assign 10 to local stack variable x
*ptr = x; // make the value of whatever ptr points to the same as the value of x or 10
printf("we just stored the value (x)%i at the spot in memory pointed to by ptr so (*ptr) %i\n ",x,*ptr);
}
int main() {
int *p = malloc(sizeof(int)); // alocate some memory on the heap of size equal to store an integer. and store a pointer to that memory in *p , so *p is a pointer to a space were ints can be stored.
printf("the address of p on the stack: %p\n", &p);
printf("the address of the space on the heap that p points to: %p\n", &p);
printf("the vallue currently stored in that space on the heap interpreted as an int : %i\n", *p);
*p=0;
printf("the vallue stored after initializing : %i\n", *p);
printf("so p now is a pointer to: (p) %p and (*p) %i is the value at the location of that pointer\n", p,*p);
foo(p);
printf("since memory on the heap survies function transistions as long as they have a pointer and we created the pointer here to then pas to foo who changed its value so\nthe value in the memory of our pointer now is (*p) %i ",*p);
return 0;
}
result
the address of the space on the heap that p points to: 0x7ffe71dd4a68 the vallue currently stored in that space on the heap interpreted as an int : 0 the vallue stored after initializing : 0 so p now is a pointer to: (p) 0x21f42a0 and (*p) 0 is the value at the location of that pointer we got ptr, a pointer to: (ptr) 0x21f42a0 and (*ptr) 0 is the value at the location of that pointer, as argument in foo we just stored the value (x)10 at the spot in memory pointed to by ptr so (*ptr) 10 since memory on the heap survies function transistions as long as they have a pointer and we created the pointer here to then pas to foo who changed its value so the value in the memory of our pointer now is (*p) 10```
how i read things in my head to make it simpler:
create a local var equal to 0
int *pvar=&var;
create a local pointer pvar to the address of var
so after this *pvar and var are the same if you printf them
*pvar :the value (or the thing) pointed to by pvar and since pvar points to the address of var pvar points to 0,
&var: the address of the thingor value var.
&pvar: the address of the pointer to var
*p = 10 , have the thing pointed to by p
also , maybe not as clear as could be but defenetly helpfull (and i cant blame him i have problems presenting the whole pointer thing as clear as day to someone that has the wrong idea or is a real beginner aswell but ) https://www.youtube.com/watch?v=2ybLD6_2gKM
One of the hardest things for new programmers to learn is pointers. Whether its single use pointers, pointers to other pointers, pointers to structures, something about the concept drives new programmers crazy. The C programming languages is recognized as one of the most difficult programming languages to learn. The reason for this is the limitl...
whithout the long explanation your code to make it work : ```c
#include <stdio.h>
void foo(int* ptr) {
int x = 10;
ptr = x;
}
int main() {
int p = malloc(sizeof(int));
*p=0;
foo(p);
printf("value of p: %d\n", *p);
return 0;
}
You need a double pointer
Or this
not saying it wont work (it could) but i dont tink a function can write to a variable declared in another function on the stack even with a pointer. another way this could work and you wont even need pointers or anything (its just bad praktice ,and gets complicated if the functions arent in the same file that need the var is : ```c
#include <stdio.h>
int x = 0;
void foo() {
x = 10;
}
int main() {
foo(p);
printf("value of p: %d\n", *p);
return 0;
}
or since in C a function actually can retrun int's, or a single char, or a struct(dont ask me about how the struct gets returned but it works) so you can: ```c
#include <stdio.h>
void foo(int val) {
val = 10;
return val;
}
int main() {
int val=0;
foo(val);
printf("value of p: %d\n", val);
return 0;
}
```']
i hate this so much
Im pretty sure i can answer this, i gotta read the chat history tho
code 100% can reach across functions, up the call stack, and modify variables if given a pointer.
nevermind there isnt too much left to answer.
void foo(int* ptr) {
*ptr = 10;
}
Is how you assign the data where p points to to 10
did you forget to do val = foo(val); in your second example? also the function signature should be int not void. Unless im not understanding properly
Yeah p sure you are correct here
i need to create a project for my uni.
most people are going to be making a management system like libraryMS, AttendanceMS
can anyone suggest me some ideas
yzsa
my bad , i was editing code in the chatbox message , bucause i only tought about it when i had posted the previous ,... should have dropped it in compilerexplorer just to be sure but i did not, and thats how bugs happen 🙂 srry
#include <stdio.h>
int foo(int val) {
val = 10;
return val;
}
int main() {
int val=0;
val=foo(val);
printf("value of p: %d\n", val);
return 0;
}
as i said it verry well could be , but since every function has its own stackframe , your reaching across those , and given how a stack works that seems like an overly complicated mess (that if possible is hidden but anyway the procedure has to be there underneath)
nvm im an idiot : https://godbolt.org/z/xb1c4Y4sa
It's fine to reach UP the call stack to modify data, but never okay to use results from DOWN the stack.
After all, the only way to return strings in C is to actually reserve memory above (which can be in a stack variable) and then call a function that writes to that block of memory reserved for a string.
But yeah if you use stack memory, and return a pointer to it, once that function completes that memory can be overwritten by anything, so you can't create a var and return a pointer to it.
if you look at this , same program but compiled for the c64 , this is what would have happend in my mind to achieve that , and thus what the overly complicated means https://godbolt.org/z/YjP11Pdxb
i like my pointers 'p' prefixed most of the time 😄
I don't like that personally. Usually if I need to get a pointer I suffix it with ptr
I think there a name for prefixing everything with a type initial bit I can't remember
also something i only recently learned, i wrote a program in c , compiled it using zig cc, worked great on linux, since it only used std i figured mmm should work on windows aswell, so i compiled an exe using zig aswell, tested it and seemed to work in wine . week later went on to do a demo of the program, but only windows host availeble , i could not get it to work , didnt know why... found out linux gives you 10MB of stack where windows only gives you 1mb 😦
I have literally never wrote C code for windows looollll
The stack can't just grow beyond 1 or 10mb?
i do that most of the time aswell, type or its size depending but i like my code to fit in 80 colums and i dont like long variable names , (i am one of those hardheads that wont use lsp so ) so i get code like , this prolly you hate code like that 🙂
beyod 1MB on windows and beyond10MB (depeds on your kernel config) on linux
Does anyone here knows what directory or path windows gives to a connected android phone via usb? trying to setup a script to autocopy files between 2 folders but i cannot find the directory or where it's attached
i think the best option is to write a script that does not use the storage function of android , but to just directly use adb pull and adb push and or adb shell to do that , does require developper tools to be enabled and usb debugging (or wifi or bluetoot should all work then)
it was between a real device connected via usb and the computer but i've learned that i would need a third party thing to mount it to a letter
!!!
I hate column line limits, should be at least 120. I have a widescreen monitor and I use it! And it lets you be more verbose in the code, sometimes you can go a bit too far yeah, but yeah lol
i once saw a really good talk about why 80 (100) cols is best even on a modern ultrawide monitor,... its the same reason , newspapers who have uge pages , still print their text in small long collums, its how we read best, since we read the start of a scentence and by the time we have an expectation what comes next we infer what the end of the line should look like without actually consious reading it, before reading the next line, and stats show that in code that uses wide spread , (not saying more bugs as that i cant say) but undetected bugs at launch, were some huge pct in the second half of the code lines , henney (forgot his frist name) was the one who gave the talk
think its this one :https://www.youtube.com/watch?v=B3b4tremI5o&t=8s
This presentation was recorded at GOTO Copenhagen 2016. #gotocon #gotocph
http://gotocph.com
Kevlin Henney - Independent Consultant, Speaker, Writer & Trainer
ABSTRACT
Systems get bigger, technologies reach further, practices mature, advice changes... or at least some of it does. Some guidance remains unaffected by the passing of paradigms, th...
I have a program that I compiled on two different versions of Windows:
64bit Windows 10: MinGW64, MSYS2, SDL2 v2.26.0 and later, g++ make
32bit Windows Vista SP2: MinGW, msys.bat, SDL2 v2.0.3, g++ make
When I ran the program compiled on Windows Vista on Windows 10, Windows Defender flagged it as severe for Win32/Wactac.B!ml. When I made an exception in Windows Defender the program ran fine.
Why does this happen and how can I fix it so other users won't experince the false-positive?
Not this exact issue but Ive had issues with cloud based AI antivirus
Compiling with optimizations “solved” the issue for me
additionally, this is why products that may work just fine on a different version of an OS, don't "support" said OS, its often easier to drop support entirely than to continue making builds which circumvent alerts from antivirus protections. If this is a program that absolutely needs vista support for whatever reason, keep compiling as a seperate binary, and then inform your users that using the Vista edition on a modern windows version will cause it to be flagged as malware
no
Trying to understand why this code doesn't work on mobile and I can't click on the door div to close the navbar, only on anywhere where nav isn't present
Okay beautiful, seems like the javascript is just not reloading. That's wonderful
Yep javascript worked, seems like it just didn't reload
Any way to prevent this in the future?
lol, the files are being cached, rea
if you're actually on a mobile im not sure how to fix that. But on a browser its like ctrl+shift+r or something to refresh without cache
Yeah or ctrl f5, still kinda pain to deal with though
for sure
has someone experience with subscribing to mqtt on a website over homeassistent
guys i need to find a good c++ graphics library or physics library or entitysystem library
ive been looking for a while but cant decide Box2D is a nice physics library but would it be comptabile with an entity system library
https://www.youtube.com/watch?v=bZ6pA--F3D4 This talk is absolute garbage
Snip taken from "Preventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc)"
Original video: https://www.youtube.com/watch?v=ZSRHeXYDLko&t=0s
#gamedev #gamedevelopment
oh this is awesome.
"High level code is a problem"
Yeah because smart pointers are an issue? gtfo.
I dont agree with the main take away that "HIGH LEVEL BAD". altho I do wish more people/projects did performance evaluations for changes instead of blindly following a trend or not bothering to try and be efficient at all. I am very much looking at web pages that loads 20 different google fonts.
Merely changing a const to a var in C can drastically change performance depending on the platform. We don't need to rewrite the whole thing in ASM and probably be slower then clang.
Oh, he could have had a point, but he didn't.
1
"now you can't just copy a program from one computer to another and have it work"
absolutely yes ... I don't like high level languages but Java / python / Javascript / ... all interpreted/VM based languages can be run independent of the hardware ...
and even if you only take in consideration compiled languages, let's take C for example before GCC you basically had one proprietary compiler per project ... so you wouldn't even be able to compile the program for your machine (assuming both machines didn't run the same assembly)
Just wanted to put here that text i found: https://mastodon.social/@raiderrobert/112054416889018230
Users do not care whether you code in Python or Javascript or C# or Java or Cobol.
They care about software that solves their problems.
Lies, users do actually care what you code in
since it affects if they can have a f*@#ing exe file
My comment was satire, for context: https://www.reddit.com/r/github/comments/1at9br4/i_am_new_to_github_and_i_have_lots_to_say
Oh yeah that lol
Yeah... Truly a dumb moment from humanity lol
Why you no do extra work on this thing you do for free
this rage bate got quite the attention when it was posted lmao
Anyone know a thing or two about github actions?
I can not figure out how to transfer files from the git repo onto a docker container that the action spins up
Except copying directly in the dockerfile. I know I can do that but we have been doing docker-compose.yml to handle file stuff since it lets us deploy it easier
you can reference a dockerfile from a compose if that works for you
Yeah we do that, we kinda have a roundabout system I guess
Dockerfile to build a base image, and then use docker-compose to set ports, volumes, and environment variables for the deployment
I think I need to just make a new dockerfile that bakes in the config files for testing, because I can not find a damn way to get files onto a container from a github action
Last week I was making my own Discord bot and after adding the feature I had always wanted to make a bot for, I tried to also make it into a music bot. However, I could never get anything back from yt_dl, its entries array was always empty, so nothing ever came out of the bot. Is this due to legal issues or something like that? I was using Python with the yt_dl library
unsure how taboo this kind of thing would be here, but consider using something like lavalink instead (ytdl kind of sucks for this usecase)
Any idea why the code doesn't work and pressing on the doordiv doesn't close it?
Thanks! I'll try to implement that when I get to it again
Do you think a Raspberry Pi 2 would be able to handle music playback? I'm already hosting the current version of the bot without the music playback feature on it
havent seen that talk but.... of all the things i know about jonathan blow... an idiot he is not so... i often dissagree but more agree with him , ill be back after ive watched the talk
he isn't entirely wrong, but he's also wrong about why he's right.
5 minutes in and he's 100% right so far
His premise is wrong, and the measurements are garbage.
done , he's o so right about everything he said in this one
You can agree and be also wrong 😄
haha or we watched a different video , since i dont came across any measurements
"large companies don't deploy many new user facing features [citation needed] therefore modern programmers are useless"
quak1 -> quake 2 : functionallity added / people working on it >>>>> assassins creed blackflag -> assassins creed origins -> new stuff in the game / peope working on it
yep, still not actually proving the "programmers aren't productive anymore"
The problem he's talking about is more one of inherent limitations of scale, people, and the normal distribution
is that a direct quote , i didnt hear him say useless or not in that context atleast , more like in the context : they dont get anything done because of the useless complexity added to the systems that dont need to be there
yes, useless complexity like.. security. scalability. repeatability.
it's very old man shaking fist at clouds
like I said, it's not entirely wrong, it's just wrong about why it's right.
but at the core its not really needed , its just complexity on top of complexity to fix the complexity of the thing , cant argue that it feels that for every function there is alteast 5 abstactions of it that serve a specific goal for then someone to make a wrapper around the 5 abstractions in order to combine them again , and the interface is more complex than the original function...
like indeed snaps and flatpacks... are a complex solution for things that go wrong with packagemanagement and versioning , but the packages were only created to make installing software easier .... but if you just look at a per package basis, creating a flatpack is a hell of allot more complicated then running : ```sh
./configure
make
su -c 'make install'
the way you install software before someone made a package of it
didnt say that , all i said is that snaps are far more complicated to create
Everything is more complicated. Sometimes things are more complicated to be more simple.
You cannot expect all programmers to code in C at genius level. It is quite literally impossible, even if it wasn't insane.
building from source is fairly lenient with versions if you let it ... you might have to do allot of recompiles on your system to get everyting compiled for the version that is new on the system but its not that crazy
..... Ok great, I don't care.
You cannot do that at scale.
Literally no.
then please inform me what you mean with scale since gentoo both has a verry large userbase , and allot of packages availeble to install on it
You're talking about an extremely small userbase and mostly desktop machines.
you forget that chrome os is gentoo based ... so are allot of target specific derivatives of gentoo...
...no, I didn't. ChromeOS updates don't install by running make install.
but there are other source based distro's that also manage it, and btw allot of the aur is also source installs so.. (package count on gentoo 75598 btw , and thats the publicly availeble , but thats besides the point , scale enough to POC. and can be done ... not saying it doesnt take time but its not that hard to write an ebuild for the program you made while it is hard to make a snap for it
and to prove the point about programs essentially doing thesame thing on windows and linux and mac , but the interfaces to the os ARE COMPLETELY DIFFERENT|| C for mswindows api's joke im not yelling here || but if your really carefull you can compile one binary that still runs on all os's given that they use the same cpu architecture, and you stay within the limits of what the kernel allows for sizes and memory usage (like 1MiB stack on Win (~10MiB on linux) eg) just compile your c code with cosmopolitan libc instead of glibc msvc clang or ....
and if you open the taskexplorer of your browser you can see directly that no webdevelopper ever stops to think about how big the size of the objects he creates is in memory...
pretty sure web "developers" just #include **/**
I'd meme-card it as "include?" "yes"
without all the complexity and abstractions of os web and browsers and what not , this is all you need to play the dino game from google chrome ,, when the assembly is compiled to binary its 512bytes , not kb , just bytes ... https://github.com/franeklubi/dino/blob/main/dino.asm
no drivers no nothing, just that code , it boots the game. id like to see how much an efi binary is that does the same, prolly bigger but by how much , ?:D
when it comes to abstraction... you also have to appreciate in that circumstance - just how much is done under the hood. from dma'ing video memory to move sprites around to maintaining the video buffer, system interrupts, HAL code in general, drivers, etc... in the most simple system possible that has an LCD you're still talking... thousands of instructions to maintain some graphical output and a video buffer
one could argue that a compiler which takes a single byte instruction say, \x00 as an example; and builds this program - is more efficient
and if you watch this , and see what they made in what time i feel like a useless programmer and i dont know anyone that is as productive as the guys that did that , these days 🙂 https://www.youtube.com/watch?v=lC4YLMLar5I&t=3014s
Elite may be the most complex 8-bit game ever produced. And it was arguably the most groundbreaking game ever released for its time. Back in the early 1980s when arcade-shooters reigned supreme, two undergraduates at Cambridge redefined what computer games even were.
In this video we'll look at some of the technical aspects of how David Braben ...
ow yes true ofc , but that was exactly his point , to make stuff work on platform a , with exactly the same hardware , as platform b you have to use completely different approaches to in the end end up with code that does exactly the same, but the fact that you have to write it twice because of different abstractioins and interfaces and layouts could be seen as really annoying
yup
and the fact that a runtime like .net or jvm or whatever essentially completely solves this issue is the main drawcard
technically you can write .exe for mac in the PE format (and linux for that matter)
but they are horribly inefficient (err not PE but jvm and other runtimes)
it's the one-size fits-all philosophy meets computation, it saves somebody time and essentially is why we have massive software projects like triple A titles in the first place - as in why they are even possible to create in the current era
but as an embedded systems engineer I can't help but cringe at things like web "software"
and why it takes 10 megs and 250 http requests to load a web page
Reading this load chart of browsers for my site, and it doesn't make any sense to me.
Why is there such a big discrepancy between mobile Chorme and mobile Safari? Granted, it is a small sample size, but it doesn't seem to make much sense for it to be such a big gap. Does safari handle stuff differently and take longer to process?
Not enough data to know
Fair enough
how do I disable and enable a certain rule in my firewall using the command shell?
What firewall? What os?
what is "productive".
This is part of the fundamental problem. He's started out by defining productive as an extremely narrow niche.
I mean it CAN. It doesn't always. There's actually a decent push back on this .... through abstractions 😄 doing server side DOM rendering and sensible [lots of stuff] means you can streamline this a lot.
if you had limited the dataset to mobile devices that might be useful, but on an iphone all browsers are 'the same' from this respect. Given the low numbers, what you're probably seeing here is whoever is using their iphone on your site has an old iphone
ofc productive is subjective but here is a good measure, if you worked your ass off for a whole month, and for all the real work you did it feels like you barely accomplished anything worth showing to anyone outside of your field , without fearing he/she'll say "that all?" while it cost you blood sweat and tears to actually do it, that is called Not productive... or different example, if 50%+ of your time spent is not doing the actual thing but setting up and or tearing down the tooling and environments so you can start doing what contributes to the outcome of what your making. , that's called not productive a dumb analogy if the olympic swimming team has use of the pool for 5 hours a day but they spend the first 2 hours cleaning it and the last hour cleaning up and closing off each day that's called not verry productive. if they hire a poolcleaner and he cleans 10 pools a day , then he is productive. so if your trying to make a simple tool that parses and escapes / unescapes strings,but you spend more time on setting up and installing an ide,docker,github,plugins, test environment , (tests) , debuggers, and what not then you did on actually writing the code for it , knowing that for the next tool you write you would have to do it all over again. your body/brain has a build in mechanism to let you know when your doing something that it considders unproductive... it makes you feel bored and makes you want to go do something else that is productive.
Tldr if you work on backend tooling you achieve nothing
... So what is the alternative? Write a complete http handler in C from scratch in a text editor every time?
Not to be that guy but this kind of reads like a skill issue lol
Personally I find setting up backend tooling quite enjoyable and fulfilling
GitHub actions my beloved
"for the next tool you make"
... Working on different things is different.
Many of the decisions you make on a project are critical and are made before you write a single line of code.
You know what, it's basically a P=NP problem.
He is insisting that there is an NP solution to all problems.
truly a git moment
when git diff HEAD HEAD~ -w is empty
cleaning the pool is a little different each time asswell, yet its not time spend productively from the point of view of the swim team. if your a programmer fidling to get docker to do what you hope that it can or want to do but doesn't is not time well spent if the goal was to write code. at the end of the month if your boss asks and what have you contributed to the project, what do you say? i configured neovim 5 times, i spend weeks figuring out how docker works and then created a development environment in it , collected all the build tools needed to compile the code i havent written yet,... got a great syntax theme btw ,... Plans for next month? do it all over again because the feature i wanted to code has already been finished up past month ? and yes each project is different but thats the point , having to do all that boilerplate stuf just to get going each time is not productive... i also dont say you can go and do it without the whole circus because you cant but that doesnt make it suddely productive because you have to , wich was the point he was making ...
and yes i know that, but also not really the point , since if there is one thing unless the desisions you make hardlock you into that choice, after the first draft most off them had to be adjusted and adapted , if not by the project , by the client changing demands or required features. but if you mean brainstorming on how to solve the problem and how to structure the code , best approaches , is not unproductive, to keep with the swimteam analogy, spending a day marking out a schedule and what to train when in order to optimally train and rest according to each athlete's capabilities is not unproductive as it directly contributes to their performance. since if you dont do it their performace will be worse,... cleaning the pool during their training time on the otherhand while also required is detremental to there performance.
Yeah tldr, "I don't value other people's contributions"
It absolutely wasn't. It's bullshit wankery "it was better in the olden days" completely absent any kind of actual metrics or anything. It was about how he feels, not how anything actually is.
first of all if you think he's saying that, your an idiot.... what he is saying imho is that each layer of abstraction requires you to learn or use an entirely different different approach and language, and you cannot abstract away complexity in a way you retain all functionallity,... if then for a single platform each vendor decides to do its own unique kind of abstraction layer and only allows for that layer to be used on their platform with otherwise identical hardware underneath, it makes things morecomplicated than it needs to be. , second of all , what he said is objectively true, take a bare modern system nothing on it ,... count the number of stepps you have to do in order to add 2 numbers (pre-set , lets say 5 + 2 or whatever) , dont even have to show up on the screen dont have to enter them , just have the cpu, any core , add 2 to 5 , and store the result somewhere in memory wherever ram , cache .... ,just dont think the number of steps that need to happen before that can be done is astronomical... the fact that your cpu needs another simpler cpu to start up , should say enough... (and yes a cpu isnt capable of starting itself anymore ) , you know the number of steps it takes on a z80? you look up opcodes in the manual you need about 4 opcodes and convert 5 and two to hex by hand , turn on the thing in programmable mode, and enter those directly into memory using a keypad and hit reset, done. Its simpler -not better , not more powerfull , not more versatile , not whatever , and who made the other one so complex , most of the complexity got dumped on top of complexity on top of abstractions , on top of complexity. take a simple highly abstracted language like python.... the hoops you have to go trough to run conde concurrently is mental ... why because the system is build on systems designed to work on single core cpu's , so now we have a hack to do things on multicore cpu's stepping around the code its build on making stuff more complex ten needed
and here if you wanna give it a go : https://floooh.github.io/visualz80remix/ you can enter hex in the memory without a keypad on this one 🙂
and this one makes the case pretty well to :https://www.youtube.com/watch?v=FyCYva9DhsI
Kevlin Henney
It is all to easy to dismiss problematic codebases on some nebulous idea of bad practice or bad programmers. Poor code, however, is rarely arbitrary and random in its structure or formulation.
Systems of code, well or poorly structured, emerge from systems of practice, whether effective or ineffective. To improve code quality, it m...
.... I love that there are a grand total of zero actual examples because ironically you're even talking about this in an abstracted way.
If you're using a whole programming set to add 5+2 you've done it wrong
"more productive". His exact words.
Define productive in this context.
or this one has a nice piece a few minuts in comparing doing something with usb on the 3 main platforms , why does it have to be that complicated if the hardware in essence is the same https://www.youtube.com/watch?v=9-IWMbJXoLM
Benno Rice
https://lca2020.linux.org.au/schedule/presentation/28/
UNIX is a hell of a thing. From starting as a skunkworks project in Bell Labs to accidentally dominating the computer industry it's a huge part of the landscape that we work within. The thing is, was it the best thing we could have had? What could have been done better?
Join ...
Again, you're making a different point
a LOT of words right here wow
i was actually telling you that that was the point he was making, (especially if you look at the usb thing in the last , wich is exactly what he discribes with shaders thing)
So you're saying the point he's making had nothing to do with what he actually said
Only things he didn't say
the problem is not abstraction in and of it self, never claimed that and never will be , since functions... the problem is that today everything is( bad ) abstractions on top of bad abstractions, on top of legacy and outdated and no longer valid ,codedebt abstractions
and instead of backtracking and fixing some stuff , programmer today just pile more abstractions on top of it to force the old stuf in to a form and shape so its stilll works
what specific?
"programmers are less productive"
For starters, there are now millions of programmers not thousands. We are talking many orders of magnitude difference, so any comparison is going to be shitty.
the usb example, the python async lib vs the multiprocessing lib vst the threading lib vs subprocesss lib all part of stdlib all trying to bend code around the GIL wich was implemented in 94 or so
And productive? Measuring programmers productivity has been a problem for the ages.
both fairly specific examples i alreadyu gave
quake1 -> quake 2 vs AC blackflag AC Origins
Yeah... It doesn't mean shit
Again, "programmers" is now a term that encompasses millions of people doing millions of different things for different reasons at different levels of skill and experience
"guys I spent a week and I made ed".
Ok great. Technically it's a text editor.
Spoiler alert, notepad++ is also a text editor, which has all the modern bullshit abstractions, but also has slightly more features and is a bit easier to use.
...->excel 2.0 -> excel 95 , vs excel 2013 excel 365
Like I said, it's not NOT a problem, but the idea that programmers in general are "less productive" is barely a question that is even possible to answer across the last 50 years, let alone come to a clear conclusion
lines of code squared but functionallity did not
windows Nt4 - 2000 , vs win 8 -> 11
Oh look, Microsoft are the champions of abstracting stuff so hard that it's useless
lol im not talking about abstraction now , im talking about productivity , wich is defenetlyh a different thing,
But it still doesn't stop you, a programmer, from going out and writing useful code in reasonable time.
i already gave the examples for abstraction , the python and the usb thing
What you're describing isn't coding problems, it's management.
i also did not say abstraction is bad
It doesn't matter
Like I said I don't think it's possible to come to a meaningful conclusion.
Because the comparison is inherently ridiculous
And the metric so amazingly undefined.
🤦 i never clamed that it was impossible, but the amount of work you have to put in to make the same amount of progress is far worse. because of and here starts the circle again.... nobody stops you from doing machinecode today, but ... the amount of abstraction you go trough when you use python async ...
.... What the fuck? "To make the same progress"
The same as what
It isn't the same.
als what ? already expland that earlier in the piece about adding 5 and 2 together , not specifically python but same deal progress
You can literally just put 5 + 2 in python.
Also that's not a problem that needs solving
What progress are you making
yeah, count the steps before your cpu actually does the 5+2 starting with yoru python code bytecode interpreter ,...... vs ,... already gave the example
..... Who fucking cares that has nothing to do with shit
That doesn't make your programmer less productive
You keep getting distracted.
The premise is that "programmers are less productive".
And how that is presented is that programmers are releasing less features
wich is true,.... your mistaking being productive with working hard wich is not the same,... you can be verry productive with minimal effort , and you can be counter productive with the most work put in you possibly can...
if not , you would see it ...
Nobody is saying this isn't the case.
making a website render 2 times one time on the server and another time in the client , that then also renders it 2 times , once on the dom and once in the background all that to make a single page, in php days the same page would render 1 time: client
.... You absolutely fail to understand how server side rendering works right there.
But again, irrelevant
all the extra work that goes in to keeping the two /three in sync and have them communicating in a way so they are a mirror image, not needed , only if your doing js
does php render serverside ?
Sooo you're saying that work done to improve user experience is not productive?
.... That's literally what you said
You said server side dom rendering is a waste of time and stupid
But it's also.... A different outcome
no i did not say that , quote me
A one page website in js with a server side renderer is a web application. Not a single html page generated by PHP
They may ultimately serve the same purpose... But is that your issue? You think that productivity is only measured in pure simple function outcomes?
your point being , php is also a webapplication ... what else would you call it?
productive is gains made towards goal/(time spent + effort required)
Then how do you know what the goal was?
If programmers are absolutely smashing their goals
But their goals are stupid and not set by them
Are they productive? Or not.
Is a programmer working on infrastructure that doesn't directly serve the goal productive?
easy , if the infrastructure is finished , and that was his goal, verry productive. i must remind you about the poolcleaner being verry productrive cleaning 10 pools
So if you don't have enough scope for a dedicated infrastructure person
You're not productive
In the general case that "programmers are not productive"
Is it because you can't easily sit down and write stuff to do things? No, it fucking isn't.
also not what i said , productiveness is measured towards a goal,... did you get closer to winning an olympic medal by cleaning the pool for 2 hours , that you could have spend swimming: no , was the poolcleaner productive when he finished cleaning that pool out of the 4 he had to do , 1/4 done vs 0/4 done yes , same job only one of the two had a productive day , this is not that hard to understand
The problem with programmers being "productive" is the value judgement on the production, not the actual productivity.
Also you can still write code in vi on an 80 line display if that's really what you want.
Opinions?
I have not once had a need for this, I have no idea why you even would
Also this seems like it'd just hurt the developers, there's a Cloudflare Pages plan that lets you blacklist certain things and force them behind captchas, imagine trying to blacklist bots but they have this and just bypass it
And it also just hurts cloudflare, if someone tries to refresh constantly and waste bandwidth, they get put behind a timeout protection, and if this removes it it'd just hurt cloudflare because now their bandwidth is being wasted
Though I'm not qualified to speak on this that much, this is just my opinion and I'd love to be corrected if I am wrong
@solemn solar
You raise valid points about potential implications for developers and Cloudflare's services.
Your statements are correct, this browser is not meant for others.
I built it to bypass cloudflare to hack websites that use cloudflare, not to give out to others.
This does not target CloudFlare directly, just the sites past it.
CloudFreed does bypass timeouts, but CloudFreed does not use up bandwidth, it just makes requests past/to cloudflare
Hey fellow python coders what sould functions should i add to a colored logger ?
plz ping if u got ideas
Yeah lolno
Is it open source? Theres no way it is, because otherwise botters would be able to scoop out the magic sauce that bypasses cloudflare. If it's not open source, it certainly is not unparalleled freedom.
also this that even a real browser? I searched for it and couldnt find it anywhere
Is AWSs captcha thing broken for anyone else? Every time I do it it just shows me another one, doesn’t even say it’s wrong it just reloads
LMAO literally says in the post I cant read, it does not say that
I very misunderstood what that project was i think. Whatever bla bla bla I cant read, it does not say that
this has to be the most obvious bait for pwning idiots
I refuse to believe it's anything else
note: I have not read the messages below that message
if such a thing was ever released publicly, you'd be sued into oblivion by both cloudflare and any large site operators that use cloudflare
A program I compiled on Windows Vista was flagged by Windows Defender on Windows 10 for Win32/Wactac.B!ml (Runs fine once I whitelist it though). I summitted it to https://www.microsoft.com/en-us/wdsi/filesubmission/ under PUA (Potentially unwanted programs) False Positive so it wouldn't be flagged by Windows Defender, and I am not sure how to interpret the response I got.
The submitted files do not meet our criteria for malware or potentially unwanted applications. No detection will be added for these files.
More detailed information about the approach and criteria categories currently used by the Microsoft researchers are available here: https://docs.microsoft.com/windows/security/threat-protection/intelligence/criteria
What does this mean? If it means my program will still be flagged by Windows Defender, how would I fix it when compiling the program (32bit Windows Vista SP2, MinGW, msys.bat, g++ make)
seems like an obvious fix... compile a win10/11 version on 10/11
The Windows 10 version of the program is very similar (MinGW64, MSYS2, g++ make) and has no issues. I want the program to work on Windows 7/8/8.1, but the closest I have is a Windows Vista machine, which is why I compiled the code on it. When I tried to compile the code from Windows 10 to target Windows Vista, it didn't work. It put in NT 10.0 libraries iirc, which don't run on NT 6.0 (Vista)
pretty simple guess: versions of the things used to compile on vista are older, and had issues, so defender now flags that
it's not MS's problem that you don't have any other machine to compile on for 7/8
and I question why you wouldn't just do it in a VM
I suppose I could try a VM. I used one for Windows XP in Orcale Virtual Box years ago, but it didn't render anything on the GPU correctly. What would you suggest instead
windows xp not working in a modern vm
what a surprise /s
Don't support unsupported OSes?
that too ^ 
hi
neovim inside neovim inside neovim inside neov......
Why-
Yes
10x development
Just as Bram Moolenaar intended
Gotta alternate neovim and tmux for peak 10x energy
CloudFreed expected to release on the 15th
CloudFreed is safe for puppeteer or anything similar.
???
🤔
I'm not sure if this is the correct way to use neovim
CloudFreed is intended for educational and research purposes only. Please use it responsibly and respect the terms of service of the websites you visit.
God I fucking hate this cop-out
Yeah no that does not sound right, not a fan of this one tbh
i don't understand how this has educational/research uses
i'm guessing that's just to help make the case that it's "fair use"
or something like that
I guess probably that
I've only looked at the code for a minute, but if I'm understanding this, it's just pulling a cookie from your browser that tells cloudflare you're real
exactly the sort of skid shit you'd expect from someone that still plays roblox and calls themself a software engineer and has a profile picture like this and a github username like that
and would use stackoverflow questions to advertise it, resulting in being removed by the mods
wait how does that convince cloudflare to not show captcha?
i assumed that was all handled server-side
because it's literally the cookie cloudflare uses to identify you
so is it copying the cookie from site-to-site automatically?
in the script, you tell it the site, and it grabs the cookie for that site
It basically puppets your browser in a hidden window, navigates to the site, and pulls the cookie for you lol
Does cloudflare not validate the clearance value? I don't get how or works at all lol
fun fact: puppeteer is detected.
also, you used "skid", which means I stole programs from others. If you look at the code, you can see it's mostly created by me.
No, skid does not mean you stole it, lmao
means an unskilled individual who uses scripts or programs developed by others
also, I suggest you don't assume like that.
Cloudflare detects puppeteer using an item called "webdriver", a boolean that shows if you're automating tasks.
My version evades this.
I also made a method that goes around cloudflare entirely, directly to the server hosting the site.
Problem is, cloudflare has workers for websites, meaning you cannot go everywhere you can with cloudflare.
This fixes that problem.
That is one of the many definitions, not the sole definition.
what definition were you referring to?
I'd call this more of "advanced skid" - knows how to write something pretty basic, but is still doing it for shit reasons because they think it'll make them look cool
There's no legitimate reason for this to exist, ever.
don't give a shit about "looking cool"
Also I made this for my reason.
Automating website interactions
You clearly do, since you've posted it here, and on GitHub, and wrongfully used stack overflow to advertise it lmao
sure
define "pretty basic"
do you know how to code?
You've written a automation script. The most basic of things lol,
And yes I do know how to code, and I sure as hell don't waste my skills doing what you're doing lol
my skill wasting got me ~$24,000
not ethical though lmao
Cybercrime isn't fashionable, and admitting to it online is a very fun way to inflate your ego.... And end up in jail
Isn't that right, johnathan? 
who said anything about cybercrime
If you're going to do dumb shit, at least wipe your name from things
also good job checking my spotify
not my real name
Literally you, indirectly
yeah but if you have done it onece its stores a cookie so you dont have to redo it every next link you click on the site :p and , dunno where i heard this but by the time you see the are you human thing it suposedly has already figured out that you are human, but it has to show the thingie in order to figure it out or so ... since if you click the link using autohotkey on windows it still works , but if you use firefox on linux and have some safeguards enabled you will get the verify and orient or click picture each time 😦 but also if i set my dns to be 1.1.1.1 i also dont have to that so
I do believe that cloudflare knows whether or not you're human based on the way you move your mouse
|| not to flamestart again but just on technical grounds: i also know a few rather simple ways of making lots of $$ that arent illegal in anyway , but they seriously require some moral flexibillity , thus why i cant do them (i had parents who raised me with a moral compas so||
possibly but -- hold on a sec ---
dont remember if i did mousemove to the spot to click or click(coords) since if the second it should not work since no mouse moved in that case it just appeared on the button
In theory if you moved your mouse at all during the entire process of the page while the page was in focus it would be enough to detect, not sure though
think i did mouse move but a verry short one like 0.01 or so
See I'm intrigued by this, but also concerned if I should be intrigued or not lol
haha its not that hard to figure stuff out like that, ill give a verry similar example from a completely different field: its not illegal for pharmacies to sell you Homeopathic medicine, or its not illegal to sell anything as long as its clear what your selling, if you want to sell coper wire under the audiofile banner and ask for $200/meter for wire you purchased for 5ct/meter you are allowed to do so ... and there are even simpler ones
think any store that sells tarot cards (the real ones ofc lol) or dowsing rods (also the really really real ones) are in violation of the law? but i could not ever bring myself to sell stuff that does not work or doesnt work any better than random would(or not better than the placebo effect in the case of homeopathy)
lmao there was me thinking this was going to be something new that I hadnt considered doing before
There's also the option of being an IT tech that has software which will periodically blow up a customer's computer in such a way that it can be easily reset and you look like a hero, just to keep them suckered in and coming back
there are more questionable ways using it aswell , like pump and dump schemes , really popular by influencers these days , and the howto get rich schemes , (i mean starting them not joining them ofc)
yeah, selling your online trading course or your gym workout course (and it being a direct clone of another one in many cases ive heard of), all great ways to make money, and theyre not exactly easy to fight against because you could in fact get rich quick, but you could also lose it all quicker
its not even illegal to send mail with a text like you have been hacked , your files will be encrypted if you dont pay whatever amount of bitcoin in the next 10 days and resend it everyday with a day less , not that that mail does anything nor that you have to actually include mallware with it sicne that would be illegal, but if you send the mail to 10mln people and 10 pay out of panic or confusion you made a pretty buck 🙂
i tought it lessons to the elderly as a volunteer, had to warn these people abtout scamms like that and hwere i rarely get them (i get different ones) somehow them scammers have a way of easely finding old peoples mail addresses because they get the weirdest scams in their inboxes
(had to teach them windows tough , unfotunatly hehe no obviously ,or Osx/chromeos if they happen to have bought an apple, or chromebook)
I wouldnt mind teach old folks how to internet, but sadly there really arent any paid opportunities like that around here, and I dont have enough spare devices that I can set up in a safe way to be doing something like it
you could easily set up a company doing that by airgapping some android tablets with a "fake" email app that had some example nefarious emails in there that opened up some locally hosted "hacked" sites that could be used for demonstration purposes
hell, it wouldnt even need to be old people, you could organise with some schools to do sessions to teach kids basic internet safety
i did it for an organisation , for free no payday , but the org provided the classroom and the laptops (sponsored by the local governmnent)
and our government only sponsored intiiatives like that because the stopped accepting tax return forms on paper so with an elderly population and others aswell not being able to do their taxes witout a pc they did this. got me to program a substantial amount of scam pages , mails and fake malware (using actual exploits) so we could show them howto recognise them at a verry basic level, and not just with bad images or warning texts 🙂
lake a fake but identical facebook loginpage that just logged their credentials to a textfile before showing the credentials of the wole class to them with (password only first and last letters but its effective
exactly, this sort of stuff can also be used on teens who are dumb with their security (most of them). Just instead of facebook, make it snapchat or instagram, or tiktok, and have it be an app instead of a website
Btw trying to learn javascript and databases, what's the best way to do that from scratch?
start with something simple like sqlite and work it into a project you want to work on
both ,since apps can just be html5 and js bundled
React Native 
java script from scratch lol
Oh god no
java script is the language that since ever has needed 8000 frameworks build on top of eachother and language hacks like typescript to make it workable 😛 so
as is always the case, build something that you might want to use yourself for this stuff. Since you'll inevitably lose interest if it does not benefit you in some way
other than that theprimeagen (a netflix dev) seems to prefer using htmx when it comes to javascript
I don't intend on using javascript for anything other than primitive website stuff (Detecting scrolling and applying classes, dark mode light mode, cookies, etc) and with databases I don't plan on doing more than SQLite for now and NodeJS for linking since from what I see that's the most documented one
nodejs is simply the most popular, but not because it is good
Is there anything better?
depends how much learning you want to do, there are a great many things that are better but they mostly use anything that isnt javascript (and for good reason)
I'm fine with learning a little more as long as it's relatively intuitive and versatile
chills.
hey guys using py bs4 need to scrap tags based on the text inside (Home)
now I have parsed the html using source=BeautifulSoup(html, "html.parser")
so when I am trying to look usinig
source.find('label', string='Home')
for the first case (with html elements as child) I can get the result
<label for="123">
Home
</label>
But when there is an element present it return nothing
<label for="567">
::before
<div>
<p></p>
</div>
Home
</label>
any element with multiple children sets .string to None because it's unclear what it should be. you can, however, iterate through every string object found in an element (be careful how you do this and try to find ways to restrict how many elements you're iterating through with python being python and all.) surface level it would be something like: ```py
labelList = soup.findAll('label')
for label in labelList:
if "Home" in [x.strip() for x in label.strings]: # Depending on the text you're looking for, you might need to cleanup the strings which is another performance tax that you need to be careful of when working with elements containing many children.
return label
see: <https://beautiful-soup-4.readthedocs.io/en/latest/index.html#string>
Ah I see the
kinda worte it like this
list(filter(lambda string : string.text == 'Home', source.findAll('label', {'class':'menu_item_text'})))
guess this is also very taxing if DOM size increases
did more digging, there's also .get_text() which I never use but apparently is perfect for this. In your examples it would get you:
['\nHome\n', '\n::before\n\n\n\nHome\n']
from example 1 and 2 respectively.
where would I even use.get_text()? I mean text prop gives me same thing anyways and get method won't work on collection. unless I can use it inside find method 🤔
certainly wouldnt want to try and use it in a oneliner. idea is element.get_text(), with optional arguments.
(from: https://beautiful-soup-4.readthedocs.io/en/latest/#get-text)
but if your route already works then no need to bother using it
oh I see thanks 🙂
alternatively you can ```py
import re
string='''
<label for="567">
::before
<div>
<p></p>
</div>
Home
</label>
<label for="0567">
::before
<div>
<p></p>
</div>
Away
</label>
'''
htmllbltxt_mask=r'<label.?>.?(?P<TXT>\w+)[\n|\s]*</label>'
lblrex=re.compile(htmllbltxt_mask, re.M | re.S | re.X)
lbldata=lblrex.findall(string)
print(lbldata)
result: ```py
['Home', 'Away']
``` re is much easier for finding test in textual paterns like html 🙂
Oh ofc though of it , but my problem statement involves me quering element just next to the element that matched my condition that is a label element with innerText as Home
or using: py htmllbltxt_mask=r'\<label.*?for="(?P<FOR>.*?)".*?\>.*?(?P<TXT>\w+)[\n|\s]*\<\/label\>.*' lblrex=re.compile(htmllbltxt_mask, re.M | re.S | re.X) byname=lblrex.search(string) print(byname.groupdict()) result: ```py
{'FOR': '567', 'TXT': 'Home'}
the element next to it is just another \<(\w+).*?\>(.*?)\<\/$1> where $1 is the correct number in the sequence but if you dont need the others only that you can dust drop all the other groups in the first sequence and use just these ones $1 as a backreference and $2 for the contents of the next element
if you however have to change that element ,bs is prolly the better choice if jou just need to parse it id go with re
🤔 thanks for the script but I cant do regex for shit, gotta study and understand it first then maybe I can make sense of what you said 😅
Random question: I got a 16 GB RAM laptop recently but found that it's probs not enough, so I'm getting a different one. I use JetBrains IDEs almost exclusively. I plan on upgrading the RAM on the new laptop by replacing 1 DIMM. Should I do 8+16 GB for $50 or 8+32 for $88?
I also like a lot of browser tabs
This is more of a tech question, but neither one of those sound particularly good. Mismatching ram just defeats the purpose of dual channel, so I'd suggest going for a cheaper but matching 2x(something) kit, probably 2x16 which would give you 32, a little less than the 40 you'd have, but 32 is plenty and it would be matching. Same thing with the 8+16, 2x8>8+16 IMO
Also I would suggest seeing if you are even missing ram. If you regularly hover at 15, then probably good to upgrade, but if you are at like 8-9 most of the time, that's perfectly fine and you don't really need more
I have to mismatch since 8 GB is soldered.
Edge and IntelliJ take 5 GB and pushes me to 97% utilization unf
Wanted to ask here since I primarily use this laptop for dev stuff
I see
24 might not be enough if you have a lot open at the time, so if you can, try to push it and just get the 32, though it may be a bit overkill, but if it's reasonable within your budget, then that's fine. Just means ram won't be any concern anymore
Hopefully performance doesn't die w/o dual channel. Still sucks that I need to do this since I really like this laptop
In theory if you don't do much gaming there shouldn't be that big of a difference in performance, but yeah, that's why I hate laptop companies
Is cloud development worth exploring maybe?
No clue, that's honestly up to you. I prefer having local files in case my internet goes out (Which happens sometimes), but some might prefer cloud
I'm the same way, just thinking in terms of cost/feature set
I have a mix of both technically since everything's backed up to Onedrive and I also can remote into a Github repo if I need to, but it's up to you to decide
Like if my issue is RAM on my IDE is cloud even gonna help
Maybe, if your cloud connection uses less ram than your regular connection ig it would
Ig I'll just be safe and go with 8+32 then, thanks
(No)
I don't think jetbrains offers remote LSP
I thought it just spoofed the cookie without needing to query anything. Misunderstood what it claimed to do
primeagen awesome
started watching some videos of him reading articles and shit recently, cool guy
i love his good takes and love his garbage ones even more
what is theo gg
Theo is awesome, same with Primeagen
Sometimes he makes me feel like I need to drastically improve as a developer but then other times when he reads stuff its clear im doing fine lmao
Both make me self conscious, and then both do dumb stuff that proves I'm just as liable to being dumb as they are, and I feel better soon enough
afaik he seems to think AI wont harm developers too much but I absolutely cant see it working out that way
I'm just always self conscious of my coding abilities lmao, though in fairness i have only been doing it for 4 months so i might not be that bad
Yeah 4 months is peanuts bro whever ur at right now i can guarantee you will see massive progress
I've been doing this for checks calendar about 10 years, and I still suck, you learn how to find what you need to get by and then from there its just how you apply it to figure out how well you do 🙂
Ngl I kinda agree with him
It's gonna hurt those who don't adapt
It's good to be self critical but not unconfident
Only thing you should be judging is whether you're making progress, even if it's a little
You're never going to be a perfect progamer but if you're willing to write down what you're doing wrong (i.e. being inefficient by not knowing your keyboard shortcuts) then you're gonna be relatively good
ie being ineffcieint by not knowing how to use vim /s
But yes, generally I do agree, some of the best things you can do to learn programming are learning how to type properly (and quikly), and learning the various keyboard shortcuts of your chosen environment. the more time you're fingers are on the keyboard the more productive you can be, and that is always going to be the case no matter what language you code in. The best thing you can do for yourself is spending time on sites like monkeytype or typeracer and working on hitting pbs and improving typing confidence, accuracy, consistency, etc
For my current situation. By far my biggest time waste day to day is having to fuss with my development environment to get projects building reliably. It's actually been a problem on every single project I work on to the point I think its a me problem lol...
