#development

1 messages · Page 14 of 1

solemn solar
#

Lmao

#

And the video would also explain how linking SQLite works and stuff like that?

fading osprey
#

it is five AM, I have had 1 hour of sleep in the last 25-ish hours

solemn solar
#

Chirst

fading osprey
solemn solar
#

I see, thanks

fading osprey
#

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"

grim citrus
fading osprey
#

MySequel, Sequellite, Postgre SQL, MS SQL, NoSqueal

grim citrus
#

yup

solemn solar
#

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

solemn solar
#

Nvm fixed it

#

This is awesome

solemn solar
#

Ayy, with the help of github copilot, I got it working!
Thanks for the help Altrius, appreciate it

mild trench
solemn solar
#

no please

fading osprey
#

Yes!

solemn solar
#

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?

fading osprey
#

not unless you keep track of which IDs are in use yourself somehow (which is highly inefficient)

solemn solar
#

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?

indigo dragon
#

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

solemn solar
#

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

indigo dragon
#

as long as the filesystem supports file locks then it should be fine

frozen flame
indigo dragon
#

Well the same database file

#

Unless you mean something else

frozen flame
indigo dragon
#

This is a fork of the project right?

#

By out of the box I should have clarified the upstream stock configuration

frozen flame
#

No it's not

#

Its in beta atm though

indigo dragon
frozen flame
#

They label things weird with their own vcs, by conventional standards it's not a fork

#

Anyways yeah concurrent sqlite coming soon tm

indigo dragon
#

Awesome

midnight wind
#

use the postegres or one of the full databases

solemn solar
#

Any major advantage?

indigo dragon
#

Idk do whatever works honestly. I doubt you will operate with enough scale and complexity for that to matter

solemn solar
#

Yeah it's just a project for easily adding in recommendations and removing them, nothing much

indigo dragon
#

Use what works until it doesn’t work and change at that point

hollow basalt
#

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

solemn solar
#

This is a sideproject, but I'm wondering what it does better and if it's worth moving to Postgres

hollow basalt
#

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

solemn solar
#

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

hollow basalt
#

unless your webframework doesn't have a driver/adpater for sqllite, then it's still up to you

solemn solar
#

Idk what that is tbh

hollow basalt
#

are you learning web dev from scratch ? like is this your first side project

solemn solar
#

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

hollow basalt
#

i'd recommend
progamming languageg then learn framework then learn sql

hollow basalt
solemn solar
#

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

hollow basalt
#

what language are you using btw

solemn solar
#

For what?

hollow basalt
#

for your cat

solemn solar
#

I am very not used to this terminology it seems, what's that?

hollow basalt
#

tell me everything you've used so far, then ill tell you what to learn next

solemn solar
#

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

hollow basalt
#

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

hollow basalt
#

like create your own homepage, everything about you, with animations and such

gilded fox
harsh kindle
#

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

solemn solar
#

would this be a valid reason to @ the mods?

#

kinda curious cause it differs server to server

wooden shore
#

What

neon oriole
# gilded fox

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. 😄

mental panther
#

it's a family tree.... someone being dead doesn't magically stop them being their parents on the tree

neon oriole
#

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

peak acorn
#

Bad idea to forward port 80 on my network to my main computer?

frozen flame
#

If you're running a website it's probably fine as long as you don't pull a sourcehut

peak acorn
#

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

indigo dragon
#

It is GOATed

peak acorn
#

not familiar

indigo dragon
#

A lot of my infra stuff for personal projects is connected that way

indigo dragon
#

so port 80 on google.com can be accessed via any local port on your computer

peak acorn
#

Other way around, I need the external server to be able to send me http messages

indigo dragon
#

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

peak acorn
#

i cant ssh into the external server it's some random company service thing

indigo dragon
#

Yea you’d have to open a port at that point

#

Or at least that’s the easiest approach

peak acorn
#

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

indigo dragon
#

Networking in WSL2 has some quirks

#

I haven’t needed to do that

peak acorn
#

nginx might be able to just redirect that for me im not sure

indigo dragon
neon oriole
#

wsl 2 apparentlyu sh netsh interface portproxy add v4tov4 listenport=<yourPortToForward> listenaddress=0.0.0.0 connectport=<yourPortToConnectToInWSL> connectaddress=(wsl hostname -I)

indigo dragon
#

AHHHH

#

I think I hit a compiler bug with GCC

burnt spear
#

Can we share things we make here?

frozen flame
indigo dragon
#

Uhh I didn’t solve it and just worked around it

#

It could be correct and some funky C++ thing

neon oriole
#

dunno if this also works for c++ but to enable weird gcc quirks in c you can :

#define _GNU_SOURCE
indigo dragon
#

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

solemn solar
#

I thought I was editing the border radius lmao

#

That's gonna be one very big button

mortal geyser
solemn solar
#

Make it a pill shape at any size, I could go with 200 or something but big number funny

fading osprey
#

and also inefficient, since the maths till has to be done

solemn solar
#

So it's still better to keep it low?

fading osprey
#

it saves precious bytes when transferring the site to the client, so its always better to keep it low

solemn solar
#

Fair enough

frozen flame
#

No one can truly comprehend the mind of a webdev

solemn solar
#

Neither can I

harsh kindle
#

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

vagrant bramble
#

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

silk eagle
#

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

acoustic pine
vagrant bramble
pulsar prawn
#

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.

fading osprey
#

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

neon oriole
#

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)
wooden shore
mellow oracle
pliant ether
#

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

dreamy widget
pliant ether
#

I like that the problems are sorted by type at your link

dreamy widget
#

there's a roadmap as well but i prefer the practice tab

indigo dragon
pliant ether
#

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!

dreamy widget
#

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

dire vapor
#

Anyone here who knows python feel up for helping me with some basic code?

nocturne galleon
#

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)?

frozen flame
nocturne galleon
#

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)

frozen flame
#

:)

nocturne galleon
#

good point!

pulsar prawn
#

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.

solemn solar
#

Oh sick, good luck!

cloud knot
#

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. 😡

cloud knot
#

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 🤷‍♂️

mellow oracle
#

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. 😩

cloud knot
mellow oracle
#

If it’s not reported already, perhaps you could report it. success

cloud knot
#

i would rather not have to deal with Safari ever 😄 (but that sadly won't happen)

frozen flame
#

But at the same time WebKit is good because we don't want to give chrome more damn market share

cloud knot
#

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

frozen flame
#

Idk I think they did a fine job with swiftui/uikit

cloud knot
#

that is not web tech

frozen flame
#

Yes it is

#

What do you think is rendered under the surface mmLul

cloud knot
#

i mean the amount of pain their webcrypto implementation brought me... ewww

indigo dragon
#

i haven’t had to use it but i’m just curious

cloud knot
# indigo dragon what issues did you have?

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

indigo dragon
#

makes sense

#

it sucks

cloud knot
#

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

indigo dragon
#

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

cloud knot
#

really the only limitation is what you can serialize into something you can store (most likely in local storage, so few MB limit)

indigo dragon
#

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

cloud knot
#

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 😛

nimble shore
#

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

eager sandal
#

I’m getting errors and I’m not sure why…

#

This is what it should look like and here’s the tutorial

nocturne galleon
#

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?

wooden shore
#

Yes it will sleep in the loop because you are awaiting it

nocturne galleon
#

ah, right

vestal spire
harsh kindle
#

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

mortal nebula
#

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

GitHub

A high-level Python interface to the Unifi controller software - GitHub - nickovs/unificontrol: A high-level Python interface to the Unifi controller software

#

I'd appreciate any help I can get

peak acorn
#

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?

thorny lantern
wooden shore
neon oriole
#

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 ... 😦

neon oriole
#

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 🙂

vestal spire
lean rover
#

i am using it pretty often when i want to check how website was built

vestal spire
#

I wanna try to do something similar to the one I sent earlier

cloud knot
#

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.

vestal spire
cloud knot
#

pretty sure i broke every good practice tho 😄

snow oar
#

Not sure if this is the right place, but anybody familiar with Google Docs/Sheets?

Is there a "Find and Replace" but for Color?

fading osprey
#

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

snow oar
#

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 😮‍💨

cloud knot
snow oar
#

Less of a typing it all up and more of copy and pasting then, reformatting and tidying up. It was originally a Word Doc.

silent moon
#

Designing a website for the 2nd time, any thoughts?

#

sorta looks out of proportion, but alright

hallow hazel
fading osprey
#

This meme is the forking bomb

keen spoke
#

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

dreamy widget
#

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?

cloud knot
#

less, because you also got RSA headers. RSA/assymetric encryption is ideally used to exchange a symmetric key which then both sides use

dreamy widget
#

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

cloud knot
#

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

dreamy widget
#

hmm ok. so i gatta look into it more. got it

cloud knot
#

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 😄

sick fossil
#

hey does anyone know verilog that I can ask a quick question from?

indigo dragon
#

I know a bit. What’s up?

#

@sick fossil

sick fossil
#

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

indigo dragon
#

Is there some provided test infra with Verilog?

sick fossil
#

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

indigo dragon
#

The test infrastructure I’ve had to use was mostly custom stuff

sick fossil
#

i dont think so its building an ALU from scratch pretty much

indigo dragon
#

Yea Id have to see a lot more to be helpful

sick fossil
#

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);

sick fossil
indigo dragon
#

I’m a bit busy at the moment but I can take a look later maybe

sick fossil
#

understandable tho bc this is a weird issue for no reason thats obv

sick fossil
indigo dragon
#

You might need to use “assign” to force it to be consistent

sick fossil
#

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

indigo dragon
#

Hmm

sick fossil
#

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 (*)

indigo dragon
wild delta
#

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

nocturne galleon
#

"Currently my GitHub Desktop folder is on my onedrive..." shudders, then vomits

#

What kind of a masochist are you?

solemn solar
#

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

nocturne galleon
#

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

wild delta
#

look at this bro 😭😭😭

wild delta
solemn solar
#

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

wild delta
#

Well you can have it be a private repo

nocturne galleon
#

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.

tawdry otter
solemn solar
#

Fair point

wild delta
#

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

tawdry otter
#

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

nocturne galleon
#

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 📈 📈

tawdry otter
#

Haha

#

Working around non-tech people, doing some basic git operation and impress people

nocturne galleon
#

Me trying to troubleshoot wifi: $~ /sbin/ifconig

#

my friends: HES HACKING

fading osprey
#

cant forget that part

spring cradle
#

points for lame or points for satisfaction?

#

(hoping the latter)

fading osprey
#

points for bragging rights, you get bonus bonus points if you manage to slap "blazingy fast" or "fearlessly concurrent" in there somewhere

spring cradle
#

"terrifyingly fast, hopefully concurrent"

nocturne galleon
#

"That's a cool program whats the time complexity" - "My code is not constrained by your mortal concept of time"

fading osprey
#

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

spring cradle
#

i may have been sick for the concurrency lesson in my uni class :c still afraid to this day

fading osprey
#

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

wild delta
#

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 🤦‍♂️

nocturne galleon
#

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

midnight wind
#

django is pretty good, I've used it in the pass

#

I would also just reccomend using a framework like tailwind, makes life easier

vast dome
solemn solar
#

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

earnest ice
#

today i did a ✨ *thing *✨

grizzled steeple
# earnest ice 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 ...

▶ Play video
solemn solar
#

Because it's a good video

solemn solar
#

I just tunnelvisioned on adding math into my CSS and forgot I can just -100% lmao

hollow basalt
solemn solar
#

I wonder how many lines I can stretch that simple piece of code to in only css

cloud knot
midnight wind
solemn solar
#

Btw any reason to specify -webkit, -moz, -ms for styles when I can just do the style alone?

grizzled steeple
#

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

fading osprey
#

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

grizzled steeple
#

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 <.<)

prisma bay
#

Is that true that Pablo Escobar created JavaScript?

solemn solar
#

Fair enough

#

I appreciate the info

daring gorge
plain willow
#

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.

signal vigil
#

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

acoustic pine
#

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?

thorny lantern
#

I’d probably go into Kotlin

signal vigil
#

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

fading osprey
#

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

gloomy kite
#

is there a way to not suck at pygame collisions

#

ive troubleshooted some for days

acoustic pine
#

decided to pick up kotlin

hollow basalt
indigo dragon
#

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

neon oriole
#

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...
▶ Play video
solemn solar
#

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

fading osprey
#

(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.

wooden shore
#

🤓🤓🤓

peak acorn
polar tendon
#

maze generation is crazy sometimes

#

using 58GB of ram on a single python process

#

8% on my Ryzen 9 5900x

peak acorn
#

🥴

#

Maybe use some different algorithms for that

solemn solar
#

And yeah as the host, trying to find out a way to make the .html end not be there

fading osprey
solemn solar
#

Okay thank god

#

I genuinely got scared and thought me trying to remove .html at the end of my URL was illegal

fading osprey
#

Nah lol, added context now

solemn solar
#

Thanks

acoustic pine
#

Well i've won the memory race but at what cost? (runtime go die)

peak acorn
#

at least memory is probably consistent

#

On some simpler problems runtime is too variable and random to get accurate scores

harsh kindle
neon oriole
# peak acorn Maybe use some different algorithms for that

@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

eternal scarab
#

Anyone know any company hiring full-stack dev remote? its tax free for foreign income in my country.

frozen flame
#

Highly suggest not asking random people in a discord channel for full time employment

eternal scarab
fast flame
prisma violet
#

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
frozen flame
wooden shore
#

Which is none since it does not return anything

modest tartan
#

any book recommendationsfor learning c++?

silk eagle
#

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

vague falcon
solemn solar
#

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?

nimble shore
#

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
solemn solar
strange marlin
#

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

vernal veldt
strange marlin
#

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

vernal veldt
strange marlin
real lotus
#

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

real lotus
#

i'll just use something easier than C instead
probably a good idea

fading osprey
#

you should use Rust

real lotus
#

and i don't like rust anyway

fading osprey
#

The crab will come for you some day

real lotus
#

The crab can't get close to me

fading osprey
strange marlin
#

Why do batch scripts have to be so complicated xD I wish programming was easier

real lotus
#

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

strange marlin
real lotus
#

My knowledge is very limited

spark temple
#

Uh, aren’t batch scripts different than bash scripts? One being Windows and the other Linux?

vagrant bramble
#

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

spark temple
# real lotus 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.

real lotus
#

I know

strange marlin
#

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 😅

neon oriole
#

wich one of the two get your preference ?

acoustic pine
#

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

pliant ether
# acoustic pine I'm trying to solve the longest palindromic substring problem on leetcode and th...

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?

acoustic pine
#

It's problem no.5, medium

#

Can't share link for now, no access to pc outside

pliant ether
#

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

acoustic pine
#

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

opaque terrace
#

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

neon oriole
# acoustic pine I'm trying to solve the longest palindromic substring problem on leetcode and th...

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())

acoustic pine
neon oriole
#

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

spring cradle
#
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

neon oriole
spring cradle
#

i was having a silly time

#

i lost my annotated version though

#

i should rewrite it without stdlib someday

neon oriole
#

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

spring cradle
#

same

#

it was mostly an exercise in how silly i could make it

#

it was written normally then fucked up manually

neon oriole
#

hehe make it brachless 😄

#

improves speed , ruins readabillity if not carefull

bright bolt
#

can someone help me with downloading stable diffusion on amd+win, im stuck in a situation here

bright bolt
#

im getting real damn close to just using my old pc for it

pliant ether
#

It gives you class Solution by default

neon oriole
#

now that is one hell of a bad practice especially to teach young starting develppers

solemn solar
#

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

acoustic pine
solemn solar
#

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

solemn solar
#

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

honest juniper
#

hey, I was learning html and I don't understand the use of <title> even after reading documents on it

solemn solar
#

The title is essentially what the website name is called

honest juniper
#

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

solemn solar
#

Seems like it's used for accessibility

dawn fjord
#

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.

honest juniper
#

thanks @solemn solar

edgy path
#

Hey can some here help me out with a spring framework issue i am facing?

edgy path
# edgy path Hey can some here help me out with a spring framework issue i am facing?
Linus Tech Tips

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...

fading osprey
bright bolt
#

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

elder sierra
#

Yeah linux

wanton solar
#

How do you usually find open-source projects for python?

fair skiff
#

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.

fair skiff
nimble shore
#

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
neon oriole
#

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 ||

reef star
#

Anyone tried jlcpcb before? The easyEDA integration is really really nice.

wanton solar
silk eagle
#

it wont solve your exponential filesize growth problem but if you want fast to access these are the options with python projects

reef star
silk eagle
# reef star quick question how would you share variables between some concurrently running p...

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)

reef star
fading osprey
#

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

neon oriole
vestal crest
#

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

peak acorn
#

Kinda impressive for about 10 hours

terse veldt
#

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)

wooden shore
indigo dragon
#

But that sounds non-trivial in python

indigo dragon
indigo dragon
#

Regardless any approach in this direction is filled with gotchas so fix your architecture to not need to do this

indigo dragon
reef star
#

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

wooden shore
reef star
#

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

wooden shore
reef star
#

Yeah embedded system, SBC, locked down, in a closet somewhere

neon oriole
# indigo dragon also pickle is fucked if you need interoperability outside of Python

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

manic snow
#

Hi guys

neon oriole
#

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?

neon oriole
#

helloworld

thorny lantern
#

I think so

reef star
#

this is as straighforward as it gets

bitter pebble
#

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?

peak acorn
#

pick an engine, learn the basics

fading osprey
#

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.

neon oriole
# peak acorn pick an engine, learn the basics

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 ||

neon oriole
peak acorn
#

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.

bitter pebble
#

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?

peak acorn
neon oriole
# bitter pebble ahh but where you said there is "very little real programming left once you have...

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)

GitHub

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...

▶ Play video
edgy path
#

hey can some here help me out with some issues i am having wiith spring framework's requestmapping and jsp pages.

solemn solar
#

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

bitter pebble
#

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.

bitter pebble
# peak acorn Ive never used pygame but as I understand it, it's more of a rendering and windo...

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

regal folio
#
#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

bitter pebble
regal folio
#

c

neon oriole
# bitter pebble I know python isn't good for making games, but I have experience with it, and I ...

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

bitter pebble
# neon oriole that i can understand also i would suggest taking a look at the making fps in py...

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.

neon oriole
# regal folio ```c #include <stdio.h> void foo(int* ptr) { int x = 10; ptr = &x; } in...

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...

▶ Play video
#

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;
}

indigo dragon
#

You need a double pointer

neon oriole
# indigo dragon 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;
}
```']
peak acorn
#

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

vapid sentinel
wraith sundial
#

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

glad spade
#

yzsa

neon oriole
#
#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;
}
neon oriole
peak acorn
# neon oriole as i said it verry well could be , but since every function has its own stackfra...

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.

neon oriole
#

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

peak acorn
#

Yeah that's correct

#

You can always just do foo(&changeme) to reduce and simplify imo

neon oriole
#

i like my pointers 'p' prefixed most of the time 😄

peak acorn
#

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

neon oriole
#

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 😦

peak acorn
#

I have literally never wrote C code for windows looollll

#

The stack can't just grow beyond 1 or 10mb?

neon oriole
neon oriole
restive ore
#

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

neon oriole
restive ore
#

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

peak acorn
neon oriole
neon oriole
# peak acorn !!! I hate column line limits, should be at least 120. I have a widescreen monit...

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

#

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...

▶ Play video
next igloo
#

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?

indigo dragon
#

Not this exact issue but Ive had issues with cloud based AI antivirus

#

Compiling with optimizations “solved” the issue for me

fading osprey
#

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

glad spade
#

no

solemn solar
#

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?

peak acorn
#

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

solemn solar
#

Yeah or ctrl f5, still kinda pain to deal with though

peak acorn
#

for sure

mint hare
#

has someone experience with subscribing to mqtt on a website over homeassistent

pine elbow
#

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

red mulch
red mulch
#

oh this is awesome.

vague falcon
vapid sentinel
# red mulch https://www.youtube.com/watch?v=bZ6pA--F3D4 This talk is absolute garbage

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.

red mulch
glad spade
#

1

timid pier
# red mulch https://www.youtube.com/watch?v=bZ6pA--F3D4 This talk is absolute garbage

"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)

pale estuary
fading osprey
#

Lies, users do actually care what you code in

#

since it affects if they can have a f*@#ing exe file

frozen flame
#

I mean not really?

#

Most solutions are on the web anyways

fading osprey
frozen flame
#

Oh yeah that lol

fading osprey
#

Yeah... Truly a dumb moment from humanity lol

frozen flame
#

Why you no do extra work on this thing you do for free

timid pier
peak acorn
#

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

frozen flame
#

you can reference a dockerfile from a compose if that works for you

peak acorn
#

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

haughty oyster
#

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

frozen flame
#

unsure how taboo this kind of thing would be here, but consider using something like lavalink instead (ytdl kind of sucks for this usecase)

solemn solar
haughty oyster
#

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

neon oriole
red mulch
neon oriole
#

5 minutes in and he's 100% right so far

red mulch
#

His premise is wrong, and the measurements are garbage.

neon oriole
#

done , he's o so right about everything he said in this one

red mulch
#

You can agree and be also wrong 😄

neon oriole
#

haha or we watched a different video , since i dont came across any measurements

red mulch
#

"large companies don't deploy many new user facing features [citation needed] therefore modern programmers are useless"

neon oriole
#

quak1 -> quake 2 : functionallity added / people working on it >>>>> assassins creed blackflag -> assassins creed origins -> new stuff in the game / peope working on it

red mulch
#

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

neon oriole
red mulch
#

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.

neon oriole
#

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'

red mulch
#

....

#

And nothing ever went wrong with that

neon oriole
#

the way you install software before someone made a package of it

red mulch
#

It's perfectly scalable

#

Yes, I was there.

neon oriole
# red mulch ....

didnt say that , all i said is that snaps are far more complicated to create

red mulch
#

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.

neon oriole
#

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

red mulch
#

You cannot do that at scale.

neon oriole
#

lol it works on gentoo

#

scale enough?

red mulch
#

Literally no.

neon oriole
#

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

red mulch
#

You're talking about an extremely small userbase and mostly desktop machines.

neon oriole
#

you forget that chrome os is gentoo based ... so are allot of target specific derivatives of gentoo...

red mulch
#

...no, I didn't. ChromeOS updates don't install by running make install.

neon oriole
#

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...

warped hound
#

I'd meme-card it as "include?" "yes"

neon oriole
#

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

warped hound
# neon oriole without all the complexity and abstractions of os web and browsers and what not ...

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

neon oriole
#

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 ...

▶ Play video
neon oriole
warped hound
#

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

solemn solar
#

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?

wooden shore
#

Not enough data to know

solemn solar
#

Fair enough

kind sparrow
#

how do I disable and enable a certain rule in my firewall using the command shell?

wooden shore
#

What firewall? What os?

red mulch
red mulch
red mulch
neon oriole
# red mulch what is "productive". This is part of the fundamental problem. He's started ou...

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.

red mulch
#

... So what is the alternative? Write a complete http handler in C from scratch in a text editor every time?

frozen flame
#

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

red mulch
#

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.

frozen flame
#

truly a git moment

warped hound
#

when git diff HEAD HEAD~ -w is empty

neon oriole
# red mulch "for the next tool you make" ... Working on different things is different.

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 ...

neon oriole
# red mulch Many of the decisions you make on a project are critical and are made before you...

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.

red mulch
#

Yeah tldr, "I don't value other people's contributions"

red mulch
neon oriole
# red mulch It absolutely wasn't. It's bullshit wankery "it was better in the olden days" co...

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 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...

▶ Play video
red mulch
#

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.

neon oriole
#

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 ...

▶ Play video
red mulch
#

Again, you're making a different point

peak acorn
#

a LOT of words right here wow

neon oriole
red mulch
#

So you're saying the point he's making had nothing to do with what he actually said

#

Only things he didn't say

neon oriole
#

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

red mulch
#

None of this is specific.

#

This is all about feelings.

neon oriole
#

what specific?

red mulch
#

"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.

neon oriole
#

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

red mulch
#

And productive? Measuring programmers productivity has been a problem for the ages.

neon oriole
#

both fairly specific examples i alreadyu gave

#

quake1 -> quake 2 vs AC blackflag AC Origins

red mulch
#

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.

neon oriole
#

...->excel 2.0 -> excel 95 , vs excel 2013 excel 365

red mulch
#

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

neon oriole
#

lines of code squared but functionallity did not

#

windows Nt4 - 2000 , vs win 8 -> 11

red mulch
#

Oh look, Microsoft are the champions of abstracting stuff so hard that it's useless

neon oriole
#

lol im not talking about abstraction now , im talking about productivity , wich is defenetlyh a different thing,

red mulch
#

But it still doesn't stop you, a programmer, from going out and writing useful code in reasonable time.

neon oriole
#

i already gave the examples for abstraction , the python and the usb thing

red mulch
#

What you're describing isn't coding problems, it's management.

neon oriole
#

i also did not say abstraction is bad

red mulch
#

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.

neon oriole
red mulch
#

It isn't the same.

neon oriole
#

als what ? already expland that earlier in the piece about adding 5 and 2 together , not specifically python but same deal progress

red mulch
#

You can literally just put 5 + 2 in python.

#

Also that's not a problem that needs solving

#

What progress are you making

neon oriole
#

yeah, count the steps before your cpu actually does the 5+2 starting with yoru python code bytecode interpreter ,...... vs ,... already gave the example

red mulch
#

..... 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

neon oriole
#

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...

red mulch
#

Huh?

#

You're talking about how much work the CPU does. Absolutely irrelevant

neon oriole
#

if not , you would see it ...

red mulch
neon oriole
#

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

red mulch
#

.... You absolutely fail to understand how server side rendering works right there.

#

But again, irrelevant

neon oriole
#

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

neon oriole
red mulch
#

Sooo you're saying that work done to improve user experience is not productive?

neon oriole
#

"so what your saying is " wont work here

#

sicne no thats not what im saying

red mulch
#

.... 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

neon oriole
#

no i did not say that , quote me

red mulch
#

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?

neon oriole
#

your point being , php is also a webapplication ... what else would you call it?

neon oriole
red mulch
#

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?

neon oriole
red mulch
#

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.

neon oriole
#

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

red mulch
#

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.

nocturne galleon
#

Opinions?

solemn solar
#

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

nocturne galleon
#

@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

nocturne galleon
#

Hey fellow python coders what sould functions should i add to a colored logger ?
plz ping if u got ideas

peak acorn
#

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

spring cradle
#

read further down

#

seems to be a custom thing

empty pier
#

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

peak acorn
#

I very misunderstood what that project was i think. Whatever bla bla bla I cant read, it does not say that

mental panther
#

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

next igloo
#

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)

mental panther
#

seems like an obvious fix... compile a win10/11 version on 10/11

next igloo
# mental panther 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)

mental panther
#

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

next igloo
mental panther
#

windows xp not working in a modern vm
what a surprise /s

red mulch
#

Don't support unsupported OSes?

mental panther
#

that too ^ KEKW

glad spade
#

hi

dusk crypt
#

neovim inside neovim inside neovim inside neov......

empty pier
#

Why-

molten oracle
#

Yes

dusk crypt
#

10x development

solemn solar
#

Just as Bram Moolenaar intended

weak sleet
#

Gotta alternate neovim and tmux for peak 10x energy

nocturne galleon
#

CloudFreed expected to release on the 15th

peak acorn
#

CloudFreed is safe for puppeteer or anything similar.
???

mental panther
peak acorn
#

Yeahhh lol

#

Definitely fake or illegal

nocturne galleon
peak acorn
#

🤔

jovial garden
frozen flame
#

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

solemn solar
#

Yeah no that does not sound right, not a fan of this one tbh

indigo dragon
#

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

solemn solar
#

I guess probably that

mental panther
#

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

indigo dragon
#

wait how does that convince cloudflare to not show captcha?

#

i assumed that was all handled server-side

mental panther
#

because it's literally the cookie cloudflare uses to identify you

indigo dragon
#

so is it copying the cookie from site-to-site automatically?

mental panther
#

in the script, you tell it the site, and it grabs the cookie for that site

indigo dragon
#

oh okay

#

yea this all sounds pretty dumb

frozen flame
peak acorn
#

Does cloudflare not validate the clearance value? I don't get how or works at all lol

nocturne galleon
nocturne galleon
mental panther
nocturne galleon
nocturne galleon
nocturne galleon
mental panther
nocturne galleon
mental panther
#

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.

nocturne galleon
mental panther
#

You clearly do, since you've posted it here, and on GitHub, and wrongfully used stack overflow to advertise it lmao

nocturne galleon
mental panther
#

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

nocturne galleon
#

not ethical though lmao

mental panther
#

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? KEKW

nocturne galleon
#

who said anything about cybercrime

mental panther
#

If you're going to do dumb shit, at least wipe your name from things

nocturne galleon
#

also good job checking my spotify
not my real name

mental panther
nocturne galleon
#

well, this got off track

#

have a nice day

neon oriole
# indigo dragon i assumed that was all handled server-side

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

solemn solar
#

I do believe that cloudflare knows whether or not you're human based on the way you move your mouse

neon oriole
#

|| 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||

neon oriole
#

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

solemn solar
#

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

neon oriole
#

think i did mouse move but a verry short one like 0.01 or so

fading osprey
neon oriole
#

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)

fading osprey
#

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

neon oriole
#

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)

fading osprey
#

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

neon oriole
#

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)

fading osprey
#

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

neon oriole
#

i did it for an organisation , for free no payday , but the org provided the classroom and the laptops (sponsored by the local governmnent)

neon oriole
#

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

fading osprey
#

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

solemn solar
#

Btw trying to learn javascript and databases, what's the best way to do that from scratch?

fading osprey
#

start with something simple like sqlite and work it into a project you want to work on

neon oriole
fading osprey
solemn solar
#

Oh god no

neon oriole
#

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

fading osprey
#

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

neon oriole
#

other than that theprimeagen (a netflix dev) seems to prefer using htmx when it comes to javascript

solemn solar
#

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

fading osprey
#

nodejs is simply the most popular, but not because it is good

solemn solar
#

Is there anything better?

fading osprey
#

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)

solemn solar
#

I'm fine with learning a little more as long as it's relatively intuitive and versatile

silk eagle
#

chills.

nimble shore
#

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>
silk eagle
# nimble shore hey guys using py bs4 need to scrap tags based on the text inside (Home) now I h...

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>
nimble shore
silk eagle
nimble shore
#

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 🤔

silk eagle
#

certainly wouldnt want to try and use it in a oneliner. idea is element.get_text(), with optional arguments.

neon oriole
# nimble shore hey guys using py bs4 need to scrap tags based on the text inside (Home) now I h...

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 🙂
nimble shore
neon oriole
#

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

nimble shore
#

🤔 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 😅

untold badge
#

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

solemn solar
#

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

untold badge
solemn solar
#

God I hate laptop companies
In that case, ig the 32

#

If you need it, that is

untold badge
#

Wanted to ask here since I primarily use this laptop for dev stuff

solemn solar
#

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

untold badge
#

Hopefully performance doesn't die w/o dual channel. Still sucks that I need to do this since I really like this laptop

solemn solar
#

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

untold badge
#

Is cloud development worth exploring maybe?

solemn solar
#

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

untold badge
#

I'm the same way, just thinking in terms of cost/feature set

solemn solar
#

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

untold badge
#

Like if my issue is RAM on my IDE is cloud even gonna help

solemn solar
#

Maybe, if your cloud connection uses less ram than your regular connection ig it would

untold badge
#

Ig I'll just be safe and go with 8+32 then, thanks

frozen flame
#

I don't think jetbrains offers remote LSP

indigo dragon
peak acorn
#

primeagen awesome

#

started watching some videos of him reading articles and shit recently, cool guy

untold badge
#

i love his good takes and love his garbage ones even more

peak acorn
#

what is theo gg

fading osprey
#

Theo is awesome, same with Primeagen

peak acorn
#

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

fading osprey
#

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

peak acorn
#

afaik he seems to think AI wont harm developers too much but I absolutely cant see it working out that way

solemn solar
#

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

peak acorn
#

Yeah 4 months is peanuts bro whever ur at right now i can guarantee you will see massive progress

fading osprey
#

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 🙂

untold badge
#

It's gonna hurt those who don't adapt

untold badge
#

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

fading osprey
#

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

peak acorn
#

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...