#development

1 messages · Page 10 of 1

cyan niche
#

Delete and remake your venv, only this time don't pip install requests.

Seems to be a bug with VSCode, just swtich from global interpreter back to your venv after you've installed requests

#

really bizarre

wintry plinth
#

now i am getting on every new terminal a
[XXX preload-host-spawn-strategy] Warning: waitpid override ignores groups

#

i dont like it, but atleast requests works

cyan niche
opal cape
hollow basalt
#

bug in python 🤔

#

when I install a new one it never works
Sounds like a you problem. if there's a problem with import. it would already be reported and fixed

silk eagle
#

my imports work

cyan niche
sinful ridge
twilit beacon
#

Probably really poorly coded and just bad within itself but im proud of it an happy its my first github post

#include<stdio.h>
#include<math.h>
#include<windows.h>
      int main(){int A=0x28;int B=0xC8;float Cx=0;float Cy=0;float Cz=0;
    printf("\033[1;1H\033[2J");int D=B*A+A                   ;char E[D];float F=(B/0x2)/
  tan(0x2D);float Gx=0x1;float Gy=0;float                         Gz=0;float Hx=0;float Hy=0;
float Hz=0x1;float I=cos(0.02);float J=                             sin(0.02);int K=0;while(0x1
){if(GetAsyncKeyState(0x52)){Hx=Hx*I+Hz                             *(-J);Hz=Hz*I-Hx*(-J);Gx=Gx
*I+Gz*(-J);Gz=Gz*I-Gx*(-J);}else if(                                 GetAsyncKeyState(0x57)){Cx+=
Hx;Cz+=Hz;}else if(GetAsyncKeyState(                                 0x53)){Cx-=Hx;Cz-=Hz;}else 
if(GetAsyncKeyState(0x44)){Cx+=Gx;Cz+=                               Gz;}else if(GetAsyncKeyState(
0x41)){Cx-=Gx ;Cz-=Gz;}else       if(                                GetAsyncKeyState(0x54)){Hx=Hx
*I+Hz*J;Hz=Hz*I-Hx*J;Gx=Gx*I+Gz*J;Gz=                            Gz*I-Gx*J;}int M=0;for(int N=
A/0x2;N>-A/0x2;N--){for(int O=-B/0x2;                           O<=B/0x2;O++){if(O==B/0x2){E[
M]='\n';}else{float Px=Hx*F+O*Gx;float                        Py=N;float Pz=Hz*F+O*Gz;float
Q=sqrt(pow(Px,0x2)+pow(Py,0x2)+pow(Pz                       ,0x2));float Rx=Px/=Q;float Ry
=Py/=Q;float Rz=Pz/=Q;float S=fmax(                      fabs(Rx),fmax(fabs(Ry),fabs(Rz
)));int T=0;for(int U=0;U<0x64;U++)                   {float V=Cx+U*S*Px;float W=Cy+
U*S*Py;float X=Cz+U*S*Pz;if(V>-0xA                 &&V<0xA&&W>-0x5&&W<0xA&&X<0xA&&
X>-0xA){T=round(U/0xA);char Y[]=            "@#$1[{!;:.";E[M]=Y[T];break;}else
if(W<-0x5){E[M]='.';break;}else    if(U==0x63){E[M]=' ';}}}M++;}}puts
(E);Sleep(0x1E);printf("\x1b[d"  );}return 0;}
```ž
#

wasd is to move and rt to look left and right

grizzled steeple
#

Cursed Code formatting

#

Then again, there's a doughnut shaped C code snippet that renders a spinning ASCII doughnut in the Terminal, sooo...

untold badge
#

Should I buy a better laptop GPU as a way to futureproof for AI workloads?

#

Deciding between a 4050 or spending $400 more for a 4070 and better CPU

inner wraith
#

My opinion on the matter is that any attempt to future-proof graphics on a laptop will just reduce battery life and add cost+weight.

spring cradle
#

Would it be useful to generate Ansible playbooks/roles/tasks programmatically, if I were to be doing a set of similar tasks a bunch of times?

desert iron
#

You can just save some playbooks as presets to use for other scenarios. And the same tasks for more systems is very easy by just adding the machines to the hosts and then let Ansible do the magic to all of them.
Tbh: I love Ansible.

real dome
#

development question, i am developing my first multiplayer game in unity, and i am getting to the point where i am attempting to sync movement, most sources recommend trusting the client, but conventional wisdom is to give the client a little trust as possible, are they any issues here or is it a nessecity to trust the client to sync the movement?

#

i am using the built in netcode package

hearty forum
#

if you don't trust the client at all, you're gonna have a hard time keeping up with server resources

#

so you need to find a balance

real dome
#

thank you @hearty forum , i think since it seems to be the most recommended solution from my researching, i will go with it for now i can always alter later if needs be

inner wraith
ornate summit
#

So my game has made some good progress today, both the openGL and Vulkan renderers do something. Tomorrow I'm going to try to get the OpenGL one in parity with the Vulkan one.

Yes these are both done by the same instance of the game, the way the rendering abstraction works trivially allows for such tricks!

red mulch
spring cradle
#

that's what i was thinking lol

#

sucks that everything is so different

#

yet so similar

#

awkward middle ground of abstraction

red mulch
#

haha that's pretty much the issue with anything ever

#

how much do you abstract it.

#

I just re-wrote a whole bunch of my code because I'm abstracting it another level

#

which will be better, and is much easier in terms of expansion etc, but uuuugh

red mulch
#
 'message': Message('note_on', channel=0, note=110, velocity=127, time=0),
 'source': 'midicontroller'}
{'eventtype': 'unknown-message',
 'message': Message('note_on', channel=0, note=110, velocity=0, time=0),
 'source': 'midicontroller'}
{'eventtype': 'change',
 'source': 'midicontroller',
 'values_changed': {"root['light']": {'new_value': True, 'old_value': False},
                    "root['pressed']": {'new_value': True, 'old_value': False},
                    "root['value']": {'new_value': True, 'old_value': False}}}
{'eventtype': 'change',
 'source': 'midicontroller',
 'values_changed': {"root['pressed']": {'new_value': False, 'old_value': True}}}
{'eventtype': 'unknown-message',
 'message': Message('note_on', channel=0, note=24, velocity=127, time=0),
 'source': 'midicontroller'}
{'eventtype': 'unknown-message',
 'message': Message('note_on', channel=0, note=24, velocity=0, time=0),
 'source': 'midicontroller'}
ornate summit
#

Learning and options.

icy wagon
ornate summit
#

I'm making both renderer backends at the same time.

icy wagon
#

bruh

#

i feel like this will end poorly

hollow basalt
#

go to #trolling for this

nocturne galleon
#

Any one who can help me in a game development using UE5e? Any lessons would be welcome...

ornate summit
inner wraith
#

I guess it's cool to learn both but it's not of much use if you're getting visually different results

arctic lantern
#

making my own ipod dock with a pi pico

red mulch
#

I have to say, I am loving the ssh extension for VS code.

#

certainly an improvement over four putty windows with vim 😄

river forge
arctic lantern
#

serial commands

red mulch
#

that's why you make an interface library FIRST.

river forge
inner wraith
#

You write that and it's Requests.<command> forever after, I do similar to libraries I don't like the interface of semi-regularly.

red mulch
#

I think I will finish off the doco before working on the home assistant endpoint

#

oh, and I need to move the button/light style config from the hardware config to the endpoint config

red mulch
#

lol thanks discord

arctic lantern
#

now i just need to finish power off for this thing

earnest dune
#

i dont know much about coding ai but is it possible to code an ai that can answer survey questions that you input to it ?
would be to compare how humans and ai respond to particular survey questions

silk eagle
#

well youd first have to train the AI on survey data from humans

#

an AI cant actually answer survey questions, it would have to model its answers on data that already exists

hollow basalt
#

In some sense, so is humans

#

You need to be trained in societal norms by your parents and environment to think

silk eagle
#

I guess youd want to train an AI like youd train a baby from birth and then see how it answers the questions

#

put some neuralink in a baby at birth and then upload everything it sees hears smells tastes and feels

earnest dune
#

ok so its not really possilbe
how about asking gpt3, will that have the same effect since it already has a massive data input from the internet?

cyan niche
#

Like Family Feud?

#

ChatGPT is already capable of this:

silk eagle
#

like they could just shuffle the data around and itd be a completely different answer

#

so it wouldnt draw a meaningful comparison of human vs ai answers

earnest dune
#

proof chat gpt being affected by herd behaviour?

inner wraith
peak acorn
#

Any favorite sources, books websites playlists etc, on how to comprehensively test software?

cyan niche
raven pulsar
#

It’s what differentiates man from machine.

#

No free will to think for its self. Chatgpt isn’t actual AI

#

It’s been programmed to respond a certain way and maybe even change it’s response depending on the response of the user

#

Also no ability to critically think if it has not already had experience with the topic

cyan niche
cyan niche
raven pulsar
#

Dude people have literally deep dives into Chatgpt and proved its control by its creators lol

#

Simple stuff like the people who created it are politically left leaning. And if you ask it political questions it will try to sway you in the direction of the left lol

#

I’ve done testing with it myself

#

It’d not as intricate as people belief it to be

cyan niche
#

?

raven pulsar
#

And while yes peoples responses do influence and let it learn it is still controlled in the way it thinks and responds

cyan niche
#

I'm not sure how you think it works, but it's a neural network.

raven pulsar
#

It’s not lol

cyan niche
#

It literally is.

#

Look, I'm a CS graduate student and AI is my focus.

raven pulsar
#

I don’t care what you specialize in lol

midnight wind
raven pulsar
#

Loads of YouTube videos have dove into Chatgpt and proven the responses are catered to the way the developers think

midnight wind
cyan niche
#

I don't know what that means, but that doesn't have any scientific rigor.

raven pulsar
#

But it’s not actual AI LOL

cyan niche
#

?

midnight wind
#

you can adjust training data

#

yes it is

cyan niche
#

It is subject to the biases of its training model, though it was processed through two different training phases, one of which was to produce a filter to remove objectionable responses.

raven pulsar
#

No it literally can’t think for its self. Has no capability of doing so. It pulls data from experiences it has no ability to critically think when presented with a new problem it and the internet has never experienced

cyan niche
#

Uh, how then?

#

What does its backend look like?

raven pulsar
#

I’m just telling you from my experiences and several other peoples experiences with the program. It’s not true artificial intelligence

cyan niche
#

Okay well I'm telling with my advanced formal education in this subject that it is.

midnight wind
cyan niche
#

You can disagree all you want, but the idea of neural networks date back fifty years.

midnight wind
#

the fact that it doesn't fit in your idea of AI is irrelavent

cyan niche
#

This isn't a brand new concept, or something esoteric floating in the atmosphere. We've known and been developing these for awhile.

midnight wind
#

yeah, OpenAI has just perfected it

cyan niche
#

More like dumped monstrous amounts of resources into it, hardware just barely able to keep up lol

midnight wind
#

that too

cyan niche
#

AlphaGo was the previous king

midnight wind
#

but tech plays a factor too

cyan niche
#

Though that was narrowly focused into a single task.

midnight wind
cyan niche
#

IBM is currently developing Watson for medical purposes.

midnight wind
#

books? internet data? we don't know

midnight wind
cyan niche
#

Yeah "OpenAI" is kind of a scumbag company.

midnight wind
#

also a completly different form of AI no?

cyan niche
#

Their AI isn't open at all lol

midnight wind
#

yeah lol

cyan niche
#

Though we do have like the stable diffusion leak etc etc.

raven pulsar
#

It will not step outside of that programming. If it did it would be self aware and become very dangerous

#

Aka thinking for its self

midnight wind
raven pulsar
#

That’s literally all I’m saying lol

midnight wind
raven pulsar
#

It can’t think for its self it can’t critically think it pulls data from what it’s obtained within the guidelines set by the developers

#

That’s legit all I was saying lol

raven pulsar
#

🤦🏼‍♂️ then how does it work

midnight wind
#

thinking critically can be probobly achived with enough training data. Think of a human brain, over the years it is getting trained, and part of that is how to think critically

raven pulsar
#

Cause if it learned and reacted accordingly outside of the training guidelines. It would become unstable and unpredictable. It’s answers either wouldn’t be right or would be extreme.

midnight wind
#

data, not guidelines

raven pulsar
#

It’s still a training guideline you ever notice it doesn’t condone normal violence but certain violence it will condone?

midnight wind
#

well no shit openai adjusts data to get it more to what they want

#

plus there are filters on top

raven pulsar
#

Ben Shapiro a political podcaster got it to say the minorities rights are more important then white peoples life’s lol

midnight wind
#

who knows, it could be a LLM feeding another LLM

raven pulsar
#

Aka it is controlled to an extent by its politically biased developers it’s been proven

#

They even asked them in an interview and they just pushed off the questions I’ll have to try and find it

buoyant socket
#

quick question for anyone who knows css: i want to apply a custom cursor to a website. Every cursor symbol should be replaced with this custom one, except for cursor.none, i still want the cursor to disappear when set to .none . i used body * {cursor: url(example), auto; } previously. how can i apply a custom cursor to every state except .none?

raven pulsar
#

I don’t have the best way of explaining it cause I’m terrible with words but do you understand what I’m getting at @midnight wind

midnight wind
#

well yes it is adjusted

#

but it's still an AI model

raven pulsar
#

That’s literally all I was saying aka it’s not what most would look at as true ai unfiltered with the ability to openly learn and adapt

midnight wind
#

there is no such thing as true ai

cyan niche
raven pulsar
#

Funny how when you say something objective someone has an opinion about you always hear about it

cyan niche
# midnight wind there is no such thing as true ai

I mean, even dumber AI is still "true" AI. We can't move the goalpost of what AI is because it offends people's sensibilities of what intelligence is. In software systems artificial intelligence is regarded as the simulated or mimicing of human intelligence by computers and machines. We saw this formally put on paper with Turing's first paper when he invented computers in the first place. Even weak attempts at intelligence are considered to be AI, even if they're poor. For example, a Chess AI which looks ahead so many moves and attempts to select the best one based on a simple cost/benefit analysis.

Formally and in the field, AI is represented by any number of different fields, of which neural networks is only one branch:

midnight wind
#

but there's no non-human influenced AI, because that makes no sense

cyan niche
#

True.

#

But there's the extremely real ability to produce a super intelligence, that exceeds all human capabilities and intellect.

#

It would require combining both KRR and neural networks. But essentially it would give it the ability to improve itself, find flaws in its reasoning, and fix them as it sees fit.

raven pulsar
#

Humans don’t have the processing and learning capabilities that proprietary software can have

#

Simple

#

People forget, and make mistakes fairly often and most don’t learn from them

#

You can upgrade a super computer but not a brain ;.;

cyan niche
#

Consider the problem of a peanut butter and jelly sandwich. You can define this programmatically, but essentially what you want an AI to be able to do is when faced with a dilemma of not having any bread, it'll attempt to find a substitute, so say a bagel. But you'll find this is difficult problem because it needs to reason that bagels are normally cut in half to produce two pieces instead of one, and not to grab two bagels as though they were each one slice of bread.

#

This requires prior knowledge that bagels are bread and are normally cut in half.

cyan niche
#

ChatGPT is capable of passing this test, by the way:

raven pulsar
#

That’s what I was saying whereas a human would logically just think oh wait ima just cut this in half that’s seems smart enough

#

Without having prior knowledge of doing so

cyan niche
#

I don't think so

raven pulsar
#

In most cases without them being a numb skull yes

cyan niche
#

Perhaps some people would, but I don't think that's a universal principle.

raven pulsar
#

Yes ofc their are more then likely people without common sense

inner wraith
#

Just use the more specific term for whatever you're doing

hollow basalt
#

?

twilit beacon
#

erm... what the flip

ruby thistle
# cyan niche ChatGPT is capable of passing this test, by the way:

The issue with that example is you told it about having bagels. If you just say you have no sliced bread, or give it a selection of bread-like products, some more or less suited to being made into a sandwich, then that is a better test of 'intelligence'.
I expect GPT would still pass, but to me seems a more rigorous test

cyan niche
#

<@&750150305383186585>

cyan niche
ruby thistle
#

I have:

  • tortilla wraps
  • Keema naan
  • a sesame seed bagel
  • a cinnamon bun
  • crumpets
twilit beacon
# ruby thistle The issue with that example is you told it about having bagels. If you just say ...

no, it just doesent work intelligently. what is ironic about chatgpt and it being ai, is that it fails as soon as its expected to to do logical thinking while not having that certain example in its database (where it has learned from). As a matter of fact you can test it by asking "if 5 cars need 10 hours to london, how much would 10 need". In this case it will see similarities with those "10 machines make 10 products in 10 minutes how much do 5 machines make in 5 minutes" maths excercises so it will look no further (and will skip the logical deduction to even check if it were the correct solving process (which is isnt)). So to finalise, it is AI but that it doesent have any real "intellingence" (the one we humans do) apart from the logical components in its structure (components in transformers etc.).

#

Its mostly just a compilation of what we as humans did and gave it to learn from, there is no further learning from that point on unless we make more data for it to "extract knowledge" from.

#

And the bagels thing, well you can find a million of people saying to substitute bread with bagels (and vice versa) for many different reasons on the internet (which is also its database, it learned on)

peak acorn
#

Is it recommended/not recommended to do searching from within an SQL query? Specifically for basic word matching? Say I am displaying a table with a full name, address, and date. Within the query there's not really any problem with adding some checks to the WHERE caluse to check that against a search term. Is that preferred?

frozen briar
#

is there a company that does a custom mouse build i need a specific kind

cyan niche
# twilit beacon no, it just doesent work intelligently. what is ironic about chatgpt and it bein...

This isn't how ChatGPT is trained. It doesn't search a database for examples, or use existing examples as its basis

It's essentially a text prediction AI. It was trained by using how well it can predict the next word in whatever piece of training data it was currently processing. But this isn't all it is, because it's a neural network. More accurately we created a brain by feeding it natural language so it understands language extremely similar to how we do.

#

Like imagine if you could take a brain and say, "Finish this sentence: 'The dog jumped... '" and graded it based on how it completed it billions or even trillions of times. And each time it did it correctly, it reinforced the neural connections that did it.

#

It isn't all that different from how humans learn language.

cyan niche
#

Like, are you searching the database when the user enters someone's last name?

#
SELECT *
FROM [users]
WHERE [name] = 'Bob';

This is how SQL is supposed to be used; you're supposed to query it.

peak acorn
#

I just mean opposed to doing any sort of post-query processing instead of in the query

#

so like idk
select u.*
from users
join posts p on...
join comments c on ...
where search in u.name
and search in p.body
and search in c.body

that kind of thing

cyan niche
#

So, in terms of software speed, querying the database is generally always faster than doing post-processing.

#

In terms of reasons why queries ran on the DB are better, there's a number of reasons:

  • Moving the entire dataset over the network is ill-advised
  • Databases have what are called query planners and query optimizers, and use facts about the database to intelligently optimize your query
  • Databases have many tools to improve the speed of queries
#

And normally, when there is some sort of inefficiency that's difficult to correct in the database, you can tell the query planner to do it a specific way.

peak acorn
#

ok, so it generally IS preferred to do any simple-ish searching within the query wherever possible then

cyan niche
#

Yes, depending on the data size and how frequently you're querying.

#

You may want to cache data items that are nonvolatile (such as configuration settings or enum-type look up values).

peak acorn
#

thank

cyan niche
twilit beacon
#

The entire NN was trained off of text databases on the internet, meaning books articles etc. and its no suprise someone would have written the bread substitution at least once. The ai doesent have any concept of what a certain thing is, so it doesent logically deduct why the substitution is possible rather it bases its replies on the dataset it learned on

#

so if it only consisted of sentences where it gets to the conclusion 1+1=3, it will keep saying 1+1=3 regardless of the validity of the statement. It just doesent have a grasp of why something is, as it really just works as many say: "monkey see, monkey do".

cyan niche
#

Uh sorta. It can build new information built on prompts.

silk eagle
#

if you told it "hey bro 1+1 is actually 2" and it learned from that, would it have also learned from "hey bro 1+1 is actually 4"

red mulch
red mulch
silk eagle
#

exactly

red mulch
#

it tries as HARD AS POSSIBLE to give you what it 'thinks' you want.

#

which is why it cares not for facts, or any of that sort of malarky

inner wraith
#

I'm reminded of the fiasco in a small business I did software dev for that chucked a fit because I didn't hit a deadline for rewriting a reporting system when they upped the scope after and assigned me to do other tasks instead (training new staff, meetings about ERP systems, build a new phone system for us)...

#

But of course longer estimates with room for problems and <100% allocation were routinely rejected

#

I can deliver projects on a deadline every time, as long as I control how much time is spent on them, there is a generous error margin built into the estimate, and you don't care if I ship broken garbage if something goes wrong and more work is needed.

#

Mind you that's what the outsourcing firms do anyways in the same situation, in my experience

silk eagle
# red mulch

within 20% of 1000 years is still a good time frame

inner wraith
#

The secret is if you fall short to spend the dev time fixing all the broken shit your boss doesn't care about because it's not shiny

velvet ravine
#

can someone tell me how password managers such as password1 work? do they use cryptography?

silk eagle
#

hopefully yeah

hoary frost
#

Any Go devs here? Any good and proven resources?

red mulch
red mulch
#

but this is in the fucking job ad. It's very obvious the person writing that understands zero about actual development

ornate summit
#

Does anyone here know much about GLSL?

jagged vault
#

Hi all! Do yo guts think bestbuy will hire someobe other thab a 3rd grader fror queues next iteration? Or will Newegg earn that you're supposed to validate tings on thes server side

inner wraith
#

But yeah if they didn't use cryptography it'd be terrible

silk eagle
#

I store all my passwords in a passwords.csv

#

plain text with login urls and css selectors for the entry fields to make it easier for people to steal.

inner wraith
#

Of course some people also like to have their usernames managed and not just their passwords. For them I have another, equally useful solution.

#

This is the best possible online cryptography-free credential management solution, guaranteed or your money back

#

I'm taking investor funds for a version 2.0 for the presumably massive non-security conscious security conscious market

silk eagle
#

hey even their site is cryptography free!

#

http

inner wraith
#

Well it wouldn't be cryptography free otherwise

velvet ravine
peak acorn
#

Is WSL still uber slow on /mnt/?

midnight wind
peak acorn
#

sadge

inner wraith
#

Eh?

#

WSL1 has awful IO performance, WSL2 is actually faster for it.

midnight wind
#

Consider using WSL 1 if:

Your project files must be stored in the Windows file system. WSL 1 offers faster access to files mounted from Windows.
If you will be using your WSL Linux distribution to access project files on the Windows file system, and these files cannot be stored on the Linux file system, you will achieve faster performance across the OS files systems by using WSL 1.

inner wraith
#

Yeah I'm not getting anything close to the performance I can get in a VM/WSL2 in WSL1

#

They can say it's "faster" but one of the big reasons WSL1's model was ditched was how slow it was

#

There is stuff WSL1 makes possible that you can't do in WSL2 because of its integrations with the Windows kernel sure (like directly interact with hardware), but IO performance is abysmal

peak acorn
#

Is it good speed if I ran on a non-ntfs mount drive?

#

I'm really used to using WSL for a lot of my commands for git and stuff because it's so much easier to work with, but it's brutally slow on this one project that i kinda need to be running on a windows directory

inner wraith
#

The Linux directories are Windows ones

midnight wind
#

WSL has an ext4 FS

#

you can access windows disks through /mnt/ but it's not as fast in WSL2 as in WSL1

glacial tartan
#

does anyone know how i can check which process has a file in use in .net c#

#

its confusing me i've tried looking at the streams, checking attributes, process information and it isn't giving me any useful leads

#

i am 100% aware that there is a powertoy that does this but i need it in my own "api" if you may so i can integrate it with one of my tools

cyan niche
inner wraith
#

It's an otherwise perfectly ordinary system directory you can visit with a file warning you not to touch anything

glacial tartan
#

no

glacial tartan
#

thanks

#

ahhhhhh its in cpp i need to translate

vivid tangle
#

Looking for an IIS wizard. I tried updating php and the site is down and when trying to revert changes it still seems to be down. Willing to compensate for your time! (dm me please)

eternal scarab
#

Any Kubernetes experts ? Im running control-plane with 2 nodes, using nginx-ingress, nodeport & hostNetwork. How do I use control-plane's IP for DNS ? Do I have to taint ? if I do how do I make sure ingress-nginx-controller runs only on control-plane ?

floral zodiac
#

Hi, I'm looking for a new domain registrar with the closure of google domains, some of the things i'm looking for are, free/included whois privacy protection, unlimited subdomains, easy to use, transparent pricing, free DNSSEC.

silk eagle
#

namecheap

nocturne galleon
inner wraith
#

Verisign upped the wholesale .com price, not really Gandi's fault

floral zodiac
grim rapids
#

Namecheap hasn't ever caused me problems and had good support when I asked for help

inner wraith
#

I use namecheap

#

It's fine.

midnight wind
wind horizon
#

Kind of sucks, I actually liked Google Domains. Modern UI with minimal upsell, a lot of other registrars try to get you to buy all their other products when you just want a domain.

silk eagle
hollow basalt
nocturne galleon
inner wraith
#

Domains and infrastructure aren't free to the resellers and someone has to pay if prices go up and it's going to be the customers in one way or another

#

I don't know that company, but probably not, no.

inner wraith
#

Thanks kindly, Mikrotik for changing how you present dates to scripts without putting that in your changelog

#

Oh well it can kinda go in either

peak acorn
#

ISO 8601!!!!

left steeple
#

if anyone is familiar with porting unity games for android; any idea why saves wouldn't persist after closing the game

inner wraith
near rapids
#

I have this weird file with the extension "ymf". It's supposed to be an image of album art from a yamaha receiver, but the file format doesn't appear to be any known image formats. Anyone know how to get the image data from this file?

cyan niche
#

It's likely Yamaha didn't try to recreate the image format and it's probably a collection of files with specific image formats.

#

Open it in a hex editor and see if you can't spot image header information.

crisp ember
#

I have created something and I dont know if to share it on development or creative

#

is this channel for help and technical stuff or for "i programmed this"?

cyan niche
#

it's for whatever you want

#

there are no rules, only anarchy

drifting pendant
drifting pendant
crisp ember
#

well, I made my own social network and then conected it to the fedi a few months ago. Its a tumblr clone

#

its made with typescript

#

you could host your own but documentation is not good enough yet. BUTT if you'd like to I would love to give you a hand to host it yourself

near rapids
#

i genuinely cant figure it out

cyan niche
#

There's going to be header information about the whole collection in the header.

#

You have to find out past that idk

#

do they have a spec or maybe someone else did this?

near rapids
#

nope

#

nothing on google, no internal documents mention it either

#

i have the literal internal yamaha documents on how their receivers' web interface works and they mention it's a ymf format but they do not elaborate at ALL

untold parrot
#

I built a very important Chrome Extension that adds a field under every youtube video, telling you what Linus might think of it, based on the title and the top30 comments alone 😄
https://www.youtube.com/watch?v=lRF5_sWl-PQ

Get the Extension here, it's 100% free:
https://chrome.google.com/webstore/detail/linus-knows-better/ldcjjmomcgfcfklomcidmipnpmochogd?hl=de

For those who don't get it:
This is meant as a lighthearted joke, if Linus wants me to remove his likeness from any part of the extension I will obviously immediately comply.

Videoclips borrowed/recorded f...

▶ Play video
spring skiff
#

Hey! Kinda odd question that I've had for a while and got resurfaced with the news of Google selling off their domains division to squarespace.
Assuming after that, .dev domains are still a thing and something we can get, I know they're a secure namespace and require an SSL cert and HTTPS. Does this only apply to HTTP protocols (aka basically just websites/apis)? Is it something enforced browser-side?
I wanted to aim it at a VPS I have that also hosts game servers, would I be able to connect to said game servers with it as if it were any regular .com domain?

midnight wind
#

Hsts stands for HTTP strict transport security so it only applies to HTTP procotols

spring skiff
#

Great, thanks! Then it's a lot more tempting to get one of those domains

arctic lantern
#

doing this made the ui way more stable and now can spam f5 without css dieing

#

vs the orignal way it was done

cyan niche
arctic lantern
#

lol

cyan niche
#

Imagine introducing fragility. What if the file doesn't exist!

arctic lantern
#

thats a user problem

#

not a me problem

cyan niche
arctic lantern
#

the intire html is only for one thing anyway render an ipod and make the clickwheel work

midnight wind
#

Or vscode live server

arctic lantern
#

meh

#

its running on a pico w lol

silk eagle
hollow basalt
#

This just cursed

arctic lantern
#

but it works

#

it gives me wifi enabled controling of an ipod

#

only just need to get airmode to work whats proving to be a pain lol

arctic lantern
#

if i quickly make a cable for controling older ipods you can see i can control my ipod with a click of a mouse

oak perch
hollow basalt
#

this is still a "why, just why""

arctic lantern
silk eagle
#

ok, now you need to write the code to deliver the file for downloading.
so first lets try getting the file from the server

    page = open("index.html", "r")
    html = page.read()
    ...
#

but then what if the file doesnt exist ok lets cover that:

except:
    html = """<!DOCTYPE html>
    <html>
    ..."""
round jolt
#

Anyone familiar with python re know how I can find the first occurrence of a pattern in a string, modify that pattern by adding/removing (etc) characters, then put the new modified pattern in a substring?

#

For example, if I have "2x" and I want "2*x", I can find and replace the pattern with re.sub()

import re
string = "2x"
substring = ""

if " " in string:
  string = string.replace(" ", "")
  pass

while string != "":
  modified = re.sub("^\dx", "idk what to do here", string)
  substring += modified
  # remove pattern from string here
  pass
silk eagle
#

re.sub(pattern, replacement, string, count=0, flags=0)

round jolt
#

after some pain I managed to get it (prints are from debugging)

import re
string = "2x"
substring = ""

# clear spaces in string
if " " in string:
    string = string.replace(" ", "")
    pass

iteration = re.finditer("^\d" + re.escape("x"), string)
matchObj = next(iteration)
tupleMatch = matchObj.span()
print(tupleMatch)
print(string[tupleMatch[0]] + "*" + string[tupleMatch[-1] - 1])
cleaned = re.sub("^\dx", string[tupleMatch[0]] + "*" + string[tupleMatch[-1] - 1], string)
print(cleaned)
round jolt
#

here's a version that doesn't look like chicken scratch

import re
string = "2x"

# clear spaces in string
if " " in string:
    string = string.replace(" ", "")
    pass

# convert to python syntax
def cleanNested(string):
    # nested multiplication
    try:
        nestedMatch = next(re.finditer("^\d" + re.escape("x"), string))
    except StopIteration:
        return string
    else:
        mTuple = nestedMatch.span()
        cleanedNested = re.sub("^\d" + re.escape("x"), string[mTuple[0]] + "*" + string[mTuple[-1] - 1], string)
        return cleanedNested

print(cleanNested(string))
stone smelt
#

how can i make my excel sheet column to ("x@gmail", "y@gmail") this format?

#

using pandas

#

im trying to make an auto mail program with python. the mails and the names are in the excel sheet. so yeah gotta make a code utilising the sheet

silk eagle
#

I feel that googling it would be your best bet at getting a satisfying answer for whatever you're trying to do

#

like "python how to read excel sheet"
"python convert array to pandas dataframe" or whatever youre trying to do there
etc

inner wraith
stone smelt
inner wraith
stone smelt
#

oh this, nuh. gotta do with python

inner wraith
#

You give it your spreadsheet and a template and it'll just make one for every row

#

Eh if you're sure, just wanted to make sure you weren't accidentally reinventing the wheel

stone smelt
#

he he

#

taking such hassles for fun

inner wraith
#

So yeah you can just import it into pandas with pandas.read_excel() but idk what you mean by "this format" - is your goal an array/tuple of addresses?

#

Did you intentionally strip the .com?

stone smelt
inner wraith
#

Ok so basically you want to load a spreadsheet, get just the email row, make a list of email addresses.

#

Then presumably iterate over those.

stone smelt
#

Yeah

#

Wanna use those emails

#

Help me regarding that

inner wraith
#

I like to play with this from a repl while figuring stuff out.
Assuming your spreadsheet's just a nice table with a header row and nothing special going on you can basically do something like...

df = pandas.read_excel(<file object>)
email_list = list(df[<email column name as string>])
#

I didn't test that because I'm just on my phone at 2AM but it's something like that

#

You don't really need pandas for that but it's not complicated

stone smelt
#

Uh OK. Lemme try

#

'list' object has no attribute 'encode'

inner wraith
#

No idea, play around a bit

#

Inspect the resultant dataframe before the cast

stone smelt
#

actually i did something like yours, after doing
",".join()
only the first email gets a mail

inner wraith
#

That'd give you a comma-separated string

#

Not a list

stone smelt
#

yeah, im stuck

hollow basalt
ripe osprey
#

hey, quick question

with the twitter free api it is no longer possible to make real time streams right?

peak acorn
#

Any UI suggestions for styling these buttons on the table?

wind horizon
# peak acorn Any UI suggestions for styling these buttons on the table?

Looks more like a list than a table to me. 🤔

Could you maybe use an icon, like pencil, instead of a long name? Similar to the trash can. Then you could put it right after text and turn the text into an input field on click.

Normally I’d question if you should even be able to rename in the list like that, for example does clicking a list item show more info on the right there? Looks like there is another card, is so maybe that’s where they should be able to rename.

#

Also you could possibly remove the trash icon and have just the edit + a select icon. Then when they select items trash appears, that’d also allow them to bulk delete.

#

Kind of hard to suggest without knowing what the user interactions are, for example how often do you expect them todo these actions will help determine how many clicks are okay / how visible it needs to be.

peak acorn
#

Sorry, yeah, a list is a better name

#

1 sec

peak acorn
#

Brief demo spamming the features

wind horizon
# peak acorn

Hmm what’s the purpose of clicking them to add them on the right and the 2nd check box on the right? 🤔

#

Could it maybe just be 1 table or list of groups, with buttons / controls in it?

#

For example something like this tailwind component

peak acorn
#

Wew

inner wraith
#

I had an acute case of "answered my own question" and deleted what I asked

stone smelt
#

worked perfectly yesterday, but showwing a red underline today. help

stone smelt
#

anyone help

hollow basalt
#

Go back yesterday

jagged vault
# stone smelt anyone help

I'll be home in a few hours if you actually want help, but could you DM me a brief description of what it was and what your understanding of it was? I enjoy new puzzles but I don't like to do them blind 😉

jagged vault
#

Why was the comment on how stock-pinging servers work removed 😦 could be slowmode has slowed my brain to a snailzzzz pace too. (since I wasn't looking at the tab when I tried to reply :D) - tldr: amazon was only affiliate with a program that paid anything worthwhile, but they weren't scams. Still had folks working on BB and Newegg even though those ended up being the worst hehe. (dont worry, the one linked had a scam owner in the end, but a lot of people just like helping others and that's what we were trying to do for most of the run 🙂

Anyway - Do toss me a reminder if you need a hand later still Maha, DM's work much better than pings for me

jagged vault
# inner wraith

I made an extension that backs up all of your discord chats - I'd need to fix it to work with current versions but if you are actually running into the problem frequently, also toss me a DM. And then I need to flee from here since I'm behind on my own stuff to begin with 😄

inner wraith
#

No I'm quite fine thanks

stone smelt
jagged vault
stone smelt
jagged vault
#

I showed my dad the proper way to use a can opener when I was over at his place the other week. Blew his mind. Same thing sort of, even if what you've been doing is working, you might pick up a better or more efficient way.

arctic lantern
#

so if i changed the port stuff broke
so i have a 10/10 fix

cyan niche
arctic lantern
#

its a pi pico lol

#

https not too importent to control an ipod media controles

cyan niche
#

imo all devices should implement https

arctic lantern
#

only works on local networks anyway

raven pulsar
#

You spelled breaks wrong

arctic lantern
#

fixing will also brake it

raven pulsar
burnt bough
#

Hello. Not sure if this is the correct place to ask. But here's my question: is framework developing any solution for mobile gpus? For example asus with its xg mobile. Thank you!

worldly remnant
#

RIP GitHub

stoic flame
#

Time to become a potato farmer!

silk eagle
#

everyone dont panic

#

dont forget to* panic

next cipher
#

a few months after my office switches off github enterprise on prem to the cloud version because the sales reps really pushed cloud KEKW

inner wraith
#

Of course they did

cyan niche
next cipher
#

that's exactly what i'm saying

#

they are deeply discounting cloud because they wanna stop offering on prem

midnight wind
wind horizon
#

Tbh my experience has been ops/IT orgs at past jobs do a much worse job keeping internal Git online and updated. If they’d keep things updated and stable I’d be all about saving the money. Lol

inner wraith
#

It's not saving money, it's how reliant you'd like to be on someone else's infrastructure

#

-So they can set prices however they please later

#

Outages? Tough

wind horizon
#

Yeah but most jobs internal infra has gone out a lot more. Now that I’m at a massive company it’s actually often up more internal, for example our GitHub was up all day and never been out while I worked here. Most places I have worked it’s been reverse.

wind horizon
#

Twitter/Elon says people will now have to login to see tweets to prevent data scraping, but people who refuse to pay will just automate account creation to scrape still. Lol

I’m convinced this is really to try and increase daily active users.

peak acorn
#

I can never open twitter without getting a popup to log in before accessing

inner wraith
#

Reliability is a design decision.

wind horizon
# inner wraith Sounds like a you problem, I have worked with infrastructure with years since it...

Not a me problem since I’m not maintaining it. That’s exactly the problem, a lot of corp IT depts aren’t staffed well for maintaining systems and they have more outages than cloud providers or another common issue I see is infrequent updates to internal hosted solutions, like GitHub, because the just don’t update it often.

On average I’d usually take a cloud hosted solution over an internal one. If it’s a small IT/ops team I’d be more open to it, since they tend to be better at being flexible and move fast.

inner wraith
#

Poorly staffed and more importantly often poorly planned

#

I've seen some really incompetent IT teams

wind horizon
#

Yeah I think staffing is the biggest issue, mix of understaffed and not good staff / budget constraints for hiring good talent.

It seems way too common for there to be people in upper positions in IT depts with no clue what’s going on. Lol

inner wraith
#

Yeah I think for some when they get into senior management they end up one way or another not communicating problems to the executives and they don't really know all their shit's degrading until it's far too late to fix with their current IT/ops manpower

#

If you keep on top of it you don't need a massive ops team to maintain infrastructure

wind horizon
#

Yup but so often IT dpt is viewed as a cost, so companies try to cut IT until it’s barely staying alive.

inner wraith
#

Then you lose efficiencies, then it kinda collapses from there

#

That's how you end up like my former clients at my last job with Server 2008 machines with no patches ever in 2022 with no plans to replace

#

Hacked, of course

#

But that doesn't mean SaaS is automatically a better option though for those teams it likely is

wind horizon
#

Yup, glad I’m no longer in ops. Haha

I mean the work was fun and I’m sure there are those good companies that treat you well. But it just seemed too common to get treated poorly and underfunded.

I sympathize with them still, but I just need stuff like git to be working and don’t want to deal with IT outages. Lol

Granted at the small business and then here at the big business it has been solid. It seems medium size business I worked at struggled the most.

inner wraith
#

It depends on the company. My clients ranged from thousands of systems to a very large multinational telecom company and they all sucked

#

They bought our software because they sucked and got hacked for it

#

Imagine: having to explain to the head of IT sec of a multinational why HTTPS is still secure if it's not on port 443

wind horizon
#

With a SaaS solution I guess the one nice thing is if they have an SLA you can get some money back from outages. But doesn’t recover your biggest loss, which is staff not being able to work while your paying them. Lol

inner wraith
#

At least with IaaS you can decide how much redundancy you'd like to pay for

wind horizon
#

I had to explain to an IT person the other day https was on port 443. I’m like umm shouldn’t you know this already, I could see asking to confirm it’s not a custom port but they sounded like they had no idea at all what port https would be on.

#

Edited it, Sorry just work up put the wrong port myself. 😆

inner wraith
#

lol

wind horizon
#

I should have messed with them and gave them something like port 80 to see if they double checked with me. Lol

cyan niche
#

With AWS you don't have to worry that your backups aren't working. I've seen that happen before, "We should have backups, oh turns out they haven't been working for the last 3 months, sorry guys"

neon oriole
#

so how would one read escapes from comandline arguments and then print the escapes (not the code , so /n prints newline not /n) in C? purpose i have a comandline option that is --markup , the value of this being something like : <style>.... //or \x1b[1;34m however , i run into problems with escapes : c printf("%s\n", markup); //prints newline as it should printf("%s", "\n"); //prints \n , the \n is stored in a varaible but for demo purposes.. is there a simple way of dealing with this ? because if not i have to write code for every possible \ escape out there , not to mention duplicate (so no switch case) \x and \x1b = different escape requires different amount of characters to be read)\

silk eagle
cyan niche
#

Or, if you're using C++11+, prepend your string literal with R: R"This is a raw string.\n"

inner wraith
#

Having that critical file be faithfully deleted everywhere at the same time is not a backup

#

Snapshots are a type of backup if they're being geographically replicated properly

#

They're a good backup actually, because you can trivially turn the result into another bootable machine or mount them on something else

next cipher
#

others.... like github enterprise on prem for example, was often 3-4 months behind on patching, had the occasional outage, often had useful features turned off because someone non technical decided they sounded too risky

#

also uhhhh. don't wanna reveal too too much but we have 3-4 different internal "private cloud" platforms plus enterprise agreements with ALL the major public cloud providers. and none of them are really convenient or reliable or complete because again weird overwrought security fears

wind horizon
bitter edge
#

editing the text creator inside of itself

cyan niche
#

security managers what people to have access to nothing and software developers want access to everything

#

So they lock everything down and then it's like, "Well now I can barely do my job."

#

and the security manager goes, "Great!"

inner wraith
#

Well, security and cost control.

#

IT usually implements it but it's not always IT's fault

#

Often someone wanted it to be that way

silver furnace
silver furnace
#

It's really worth renting just host machine with good connection for costs sometimes. We had hyper-v host with at least two other lesser machines in same city close by. But that was the very demonstration of being locked to same vswitch which meant same two datacenters in one location which was ultimately from exactly one and same provider

#

The more 'yours' it is naturally saying the same thing as reverse compliment: the less 'theirs' it is. Which on paper is the sooner what theyre responsible for in sla ends as you move from ground up to whichever service you required sitting on top of everything

#

In practice, you'd be least responsible if you don't own everything except for whatever you actually need from host. If the SLA defines the service as managed innodb cluster itself, they are responsible for providing it to minimal guaranteed uptime, being operational usually. They are responsible for literally everything else below it down to bare metal.

#

So if you want to have a physical hosted server with mysql, you want optimally managed mysql db. If you want a second service like prod rabbitmq + java application prod runtime, you should max get some virtual machine with enough physical resultant capes. 'Cores', ram, storage, storage speed, cpu speed, etc

#

Worst case scenario for both is renting metal box and managing everything on it. So windows server on it set up as hyper v host. Then two guests or something one with mysql and the other with runtime crap.

#

If you have a host that's yours to bare metal, then you should specify exactly what 'problems arising from something internal' means. On bare metal host, I've seen this. Sometimes it even means coping or trying different host (maybe now is best time to consider different approach given migration regardless)

#

So for instance they still are responsible for building you PC, hooking it up and making sure that it's running. Or at least can be booted at all times. That's their service. They also hooked up storage which both volumes were SSD arrays

#

Those begin failing. Or you have bad RAM stick in machine. First you gotta prove to them it's hardware issue. Ours actually fought us on that for a while. Technically, they have to examine if hardware is broken and fix it but you're in charge of OS and everything running on it. Even if they offer and agree to run tests on your host, they have to ask for permission officially for certain time

#

They can run perf metrics logging, stress test, poke around for system logs starting from host OS (ideally but ours didn't; I had to). Upon agreeing to give access to employees, you usually agree to their waving responsibilities of even service itself breaking/losing data/blah

#

So like 3 techs in your environment who asked for root access to windows hyper-v guests with oracle linux on them run test for a week inside services' guest envs themselves (they had a linux version specifically for our scenario)

#

You don't know if they're legit enough to at least not do anything bad or skilled enough to cause accidental damage. They're not responsible specifically because you asked them to dig around in "your own" portion which you're responsible for tbh by default

wind horizon
#

Nah I’m just talking pushing a simple container image and having it run, nothing special or server permissions. Even internal only where there is no needed SLA, just over locked down imo.

silver furnace
#

Well I mean the SLA is what you can look for with certain common traits:

#

Service = what you need exactly hosted. As little as possible of the underlying infra to run
Agreement = guaranteed that service will be rendered and made available and functional to guaranteed minimal extent. Usually minimum up-time as percentage or fraction over 95%.

wind horizon
#

It’s not related to SLA in this case, it’s security controls locking it down make it very difficult todo anything in cloud providers at my job.

silver furnace
#

They define mitigating cicrumstances out of their control like power loss, natural disaster, etc, etc. Those are only ones that can cause downtime max complimentary portion of time without xx days warning in advance

#

So also minimal time warnined in advance if it will be unavailable. They still can't do maintenance shutdown if uptime min isnt met

silk eagle
#

solid 95% uptime over a period of 100 years

wind horizon
#

I think most the people here are familiar with an SLA. 😅

silver furnace
#

So already, you don't have to worry about whole host as it sits on bare metal. It can even be same host itself just that they rent you your 'windows server or linux vm'. IRL the cloud is datacenter racks with your pc in it being real metallic one. Now they have to run around and make sure it's up. When you click 'make backup image' or 'restore', they have to literally clone hdd or copy min file system somewhere now :P

#

But most importantly an instance on cloud host or vm you've removed yourself from at least bottom metal layer. Either way, metal runs it at some point but you never have to worry about it. All you know is machine should be on.

#

On Hyper-V metal host, machine is on but like one of the ssd arrays' volumes just gwent because of harware error

#

You're responsible for all guest hyper-v vhd images but also the backing up/restoring etc of what's on those ssds at host level that's sitting directly on top of metal. It's just an impractical place to divy up responsibility between you and whomever hosts.

#

Practically, even if they offer some sort of administration interface that usually has at least power button and open live support ticket for machine, any possible backups or storage space for that simply doesn't exist in anywhere as near of a practical way as your snapshot on cloud host or better yet container deploy configuration. Either way it's a hard drive and something is going to clone the volume on it. Nobody wins

#

Or like you run out of connections on that bare metal arch's gen they built you 4 years ago. You're forced to rent another machine in same physical location from them just stripped down NAS basically. Then you hook up second RAID array of anything but you know it's just as physical over network. It bugs out when you restart 'your' rented machine and they have to fix connection somewhere in provider's v-switch

#

In other words, you can't reboot your machine and get half storage back without opening ticket. We pretty much just got ready and pre-opened lol

#

Even without migrating away from that host, any 'upgrades' or changing tier of service, etc (we were planning to) is inevitably giving you different physical machine. They simply can't really do anything else themselves from the looks of it lol kekw

#

But it's entirely on you to move whatever it is over to new box. That's guaranteed same transfer over network somehow. Theirs is by far the only fast enough location to compare to your snapshots of cloud hosted machine

#

Ideally, we'd get managed instances from some one provider of every service we had running inside guests. So you have managed mysql hosting. You originally used an innodb cluster with 3 nodes. You look for wherever you can rent managed innodb cluster and not pay for 3 separate instances. In fact, you can't.

#

But when you used innodb cluster as one base with just load balancer and 2 read only nodes, you don't even need a cluster anymore. Just get same managed innodb compatible base. You didn't need 3 machines to be 'yours' and manage a cluster. You needed db

#

When I was onboarded for that specific job where I had those personal experiences, I was staring at one host with all 'services' being inside their own guest vms all under the one and only windows server host. There was system drive and the terabytes of storage were on two volumes. Half the vms were stored on directly connected ssd array. The other half was on a separate machine only because it ran out and additional device could only be over network.

#

I was like lol why do we even need this. What's the point of separate machines. All 3 instances in cluster and even load balancer vm everything connected through were on the same connection to same SSD array PogChomp

#

So we were tripling writes just for the fck of it. The guy who's been there since beginning was only one who really knew what was good. Sometimes the cluster crashed and took down its vms along with that half of guest vms stored same host volume. If it needed to be rebuilt in core hours, we ran standalone one node for weeks or months eventually until we could plan downtime for maintenance (where I spent at least 40 mins cloning two nodes from the one that ran by itself during that time)

#

What's funny is we never gave two craps about which node to resume. The read only or just 2 for some reason was the most likely to binlog with last id or something. I always ran the first because it was just the default one set as r/w. Nobody cared about what was lost because it was always something with crazy writes going on. This was always a batch task which in our application didnt have any use until it fully ran

#

So we didn't even care about the fault tolerance. It always just crashed together and hopefully at least one of the three copies still has the previous data before whichever transactions led to crash. One time I didn't notice but just first node had config the original brainfather of this infra made. It like disappeared. I guess inevitably a result of guest vm crash. Up until I left luckily we didn't lose copy of the running sql data

silk eagle
#

facts

silver furnace
#

There were backups cron job which were just mysqldump of all individual db but it was wrong options. Even restoring a single schema w data from them to prod was a pain. I would shoot myself if the day came when I had to remake from scratch using those dumps. Btw all those dumps were sent to the third and last server we had in same location from exact same host. This one was centos on bare metal too I think but it copied over sql dumps via rsync so scp I'm pretty sure.

#

But here I guess the thing to notice was we tried to use it as that service. We dumped ideally from just one mysql innodb compat server something to store and later be able to image over entire same innodb mysql. Sadly, we were not backing up innodb but anything inside it. Hopefully innodb but sometimes a few tables weren't kekw

#

Which should backup and restore 'fine' as far as that goes for me having to do so. Again, thank god it never came to that but I think fine here means possible at least. Sometimes certain employees didn't even care about innodb compat and made tables in their 'sandbox' bases used for testing pre-deployment code something that would only slide in myisam or some sht

#

So sandbox was on prod. Somebody writes a thing which doesn't even replicate in innodb. It spams errors and stops repl. This leads to RAM usage until it's all gone. VMs run out of swap space and die somehow. Other vms on same host storage die too. Half of prod services now frozen 'xfs please remount partition'. Reboot.

#

But tbh everybody needed just mysql server. Why should every dev care about constraints innodb cluster has. He made myisam table or something lmfao. Tbh why we were testing pre-deployment code on sandboxes in production base is a better question but even more stories.

#

Tl;dr the last time we forgot about rebuilding cluster for like 2+ mo and no issues. Only I remembered. Lead programmer forgot briefly but I reminded him. He secretly wanted to get rid of it and didn't say a word kekw

#

When we tried convincing team lead again to just get rid of it because it will increase performance and get rid of issue no matter what, he still kicked and screamed unless we agreed to 2 node cluster PogChomp

#

2 node cluster is dumb regardless. We weren't using it for any normal purposes. He reminded me that it's at least one redundancy of living base. Basically he remembered that we have only hopefully full backup dumps after that pogPogChomp 💥

#

Either way, it became every two days at some point which wasn't enough on the other hand. It would literally set back up to 48 hrs of data entry, analytics, etc. I quickly switched back to his side and left one ro node for backup. But I also stressed how I wanted to schedule a brief downtime for copying the redundant my instance to other physical ssd array. I said that if the ssd array itself is dying (which we thought might be happening and they had issues like that before), both would be affected by total data loss

#

Also it would have halved writes because it's still 2x. At first we were literally in the end of talks about getting separate fourth machine w them (as always) because we wanted more memory for runtime and dbs. Were gonna build same thing and move some of guests to it.

#

I said it would be first scenario where mysql cluster would even make sense kekw

Then he like sold company to one of our biggest clients which had most states subcontracts, they began rewriting it on azure (good for them as long as it's going to be properly this time). Last I saw they outsourced data transformation specialists to go through and restructure literally all data for presumably rewrite which doesn't exist yet 🙃

silver furnace
# wind horizon I think most the people here are familiar with an SLA. 😅

Again. It matters what the service is. SLA is typically a guarantee of some sort that the service will do x to a minimal y. It's largely a contract that service will get rendered and keep being rendered for whichever price. It's a sale but instead of good it's something intangible and not defined as what provider charged for that must be entirely fulfilled. Otherwise customer didn't get the service to whichever satisfactions for which the payment was made.

It's important because if you consider a metal host, the service provided is metal machine. It only makes sense that uptime only includes the time it's running after successful post, bios boot to... what?

#

Idk screw all that I wrote literally paragraphs detailing worst infra ever scenario.

#

You should have no infra. There should be no 'internal' place from which issues arise with respect to you.

#

You should try to make 'your service' not 'your server' as in 'infra provided on which service runs on'

#

Containers idk either tbh. Containers sound like they might be used both by you and the host.

ornate summit
#

What are some decent places to try to find a starter job?

neon oriole
# cyan niche Replace all \ with \\\

Won't work, since escape odes have no relation to rhe code (\n and n) but they represent a byte for most but for unicode(/uFFFF, so \ and n, together need to be replaced by one byte '\n' afterwich the string beyond this point needs to shift over one char., however this is feasible for /n eg but for \octal 2~3 chars 0padded or not, /u4 chars, \x zero padded or not, and there is no way to look up the characters and getting teg code back at best you can char-48 for he and lowercase

ornate summit
#

Most of these are extremely easy to do, the x one just requires you to read chars for a bit and shift values. It's also implementation defined so have fun.

ornate summit
#
char* escape(char* source) {
    if(!source) {
        abort();
    }

    size_t length = strlen(source);
    char* result = malloc(length);
    if(!result) {
        abort();
    }

    int o = 0;
    for(int i = 0; i < length; i++, o++) {
        char c = source[i];
        if(c != '\\') {
            result[o] = c;
            continue;
        }

        switch(source[++i]) {
            default: abort();
            case 'a': result[o] = '\a';
            case 'b': result[o] = '\b';
            ...
        }
    }

    result = realloc(result, o + 1);
    if(!result) {
        abort;
    }
    result[o] = 0;
    return result;
}
spring skiff
#

Recommended domain registrars that are relatively cheap and not completely trash? ty

#

Preferably with an API for updating the host records

surreal chasm
#

I use gandi.net. Not the cheapest, but their no BS attitude is refreshing

midnight wind
neon oriole
neon oriole
# ornate summit Most of these are extremely easy to do, the x one just requires you to read char...

yeah you also forget the octal ones wich can be either 2 or 3 chars following the , the x ones is also nice because , when used with sscanf , there is no limit on the amount of chars that will be read as long as they are valid hex, so while \xFFFF is actually {byteval 255}FF , sscanff makes 65535 from it but i went the verry long way around after pulling my hair for half a day, string -> char array with every other char a \0, and a pointer array to every first char in the first array so arr2[2] points to arr1[4] , then loop over them looking for '\', if found switch case on the value of the next pointer in the array, and eg for x, read the values of the next pointers aswell , sscanf on each of them, multiply by position and write the value to the first array at the place where the '' was, and fill the next 3 with '\0' , seemed less cpu compared to shifting over the whole array x times accordingly , just to avoid reading 3 dead values or so in the end

glacial tartan
#

if someone has experience with the Pico SDK and you know how to make the on board flash memory show up using C++ code please let me know

#

because i have tried everything and i cannot figure it out and i dont mean using the bootsel button

spring cradle
#

ooh nice, not running a random exe from discord, but nice

solemn bay
solemn bay
#

Is it python based

bitter edge
#

python bot terminal because yes

spring skiff
#

Is anyone knowledgeable on nginx? I got a domain, setup some subdomains, everything's working fine. But some subdomains I made are for "future" stuff so I just want to refuse the connection or return a 404 or something when any subdomain that isn't explicitly defined is queried.
Eg, lets say I have domain.com, with subdomains www. , plex. , magic. , and my nginx config already proxies the root, www and plex but not magic, and I don't want it to redirect anywhere else (not even the root/www)

ornate summit
#

You can just not put the subdomains in your DNS records.

#

Worst case point them to something stupid like 127.0.0.1/::1.

spring skiff
#

I thought of that but wanted to leave them up in my DNS records for quick nginx plug and play when the services are up and running later, but I guess it takes like 1min to propagate, I could honestly just remove them 🙃

ornate summit
#

I guess you can also just make it return 400 errors on everything, but I'm not sure how to do that.

inner wraith
#

<@&750150305383186585> Seems to have some anti-analysis stuff built into it and communicates back with a bunch of command-and-control servers, so yeah definitely malicious

ornate summit
#

And this is why I send sources with stuff.

surreal chasm
robust kayak
#

Going into post secondary for programming soon, is 64gb of ram worth it over 32gb for tasks like game development? Both amounts have the exact same price/GB

#

Oh! Also i’m on itx so going 2x16 and adding more/ upgrading down the line is less cost effective than it would be on a larger form factor

crisp cliff
#

Web development question:

Why does 1 instance of Threads.net in chrome uses 61% of my 5950x.

frail basalt
#

like why threads need that or how its possible

crisp cliff
#

You see what I saw

#

it makes absolutely no sense. Like the webpage doesn't show anything but a stuttery graphic

cyan niche
#

I'm sure unreal engine has optimization tools

silk eagle
peak acorn
silk eagle
#

(which means u should enable hardware acceleration in your browser so it uses the GPU for the graphic)

fierce rock
#

anyone got any clue how discord detects devtools being opened?

silk eagle
#

well I guess you could just go to 97d5813....js:52 and see if that shows how they do it

inner wraith
ashen geode
#

So I'm teaching myself C and one of things I just made is a Calculator can Solve Trig functions, Find X, and do basic math

limpid reef
# fierce rock anyone got any clue how discord detects devtools being opened?

There appear to be many ways a website can detect if the user opens their browser's Dev Tools console.
https://stackoverflow.com/questions/38910904/avoid-the-detection-of-whether-chrome-devtoolsconsole-is-open

nocturne galleon
#

all for a chrome extension

spark temple
lament bridge
#

Hello.

I have a Socket.io backend but it fails with error:

/home/marcell/PagerCast/server/node_modules/express-session/index.js:172
  store.on('disconnect', function ondisconnect() {
        ^

TypeError: store.on is not a function
    at session (/home/marcell/PagerCast/server/node_modules/express-session/index.js:172:9)
    at Object.<anonymous> (/home/marcell/PagerCast/server/server.js:23:3)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.16.0

Part of the codes: https://pastebin.com/NBk6EHcn

Not sure what I am doing wrong, I even tried to save the session to my postgresql db, but either the error above or

WebAuthn authentication requires session support. Did you forget to use express-session middleware?

inner wraith
#

Well the part you've shared doesn't include where the error is so I'm not sure what kind of assistance you expect

lament bridge
#

True, I am really sorrzy.

#

This is the rest of the code.

io.on('connection', function (socket) {
  passport.use(new WebAuthnStrategy({ store: store }, function verify(id, userHandle, cb) {
    pool.query('SELECT * FROM public_key_credentials WHERE external_id = ?', [ id ], function(err, row) {
      if (err) { return cb(err); }
      if (!row) { return cb(null, false, { message: 'Invalid key. '}); }
      var publicKey = row.public_key;
      pool.query('SELECT * FROM users WHERE rowid = ?', [ row.user_id ], function(err, row) {
        if (err) { return cb(err); }
        if (!row) { return cb(null, false, { message: 'Invalid key. '}); }
        if (Buffer.compare(row.handle, userHandle) != 0) {
          return cb(null, false, { message: 'Invalid key. '});
        }
        return cb(null, row, publicKey);
      });
    });
  }, function register(user, id, publicKey, cb) {
    pool.query('INSERT INTO users (username, name, handle) VALUES (?, ?, ?)', [
      user.name,
      user.displayName,
      user.id
    ], function(err) {
      if (err) { return cb(err); }
      var newUser = {
        id: this.lastID,
        username: user.name,
        name: user.displayName
      };
      pool.query('INSERT INTO public_key_credentials (user_id, external_id, public_key) VALUES (?, ?, ?)', [
        newUser.id,
        id,
        publicKey
      ], function(err) {
        if (err) { return cb(err); }
        return cb(null, newUser);
      });
    });
  }));
  
  socket.on('/login/public-key/challenge', async (req, res) => {
   store.challenge(req, function(err, challenge) {
      if (err) {
        console.error('Challenge generation error:', err);
        // Send an error response to the client
      } else {
        // Generate and send the challenge response to the client
        const encodedChallenge = base64url.encode(challenge);
        console.log(encodedChallenge)
        socket.emit('/login/public-key/challenge222', { challenge: encodedChallenge });
      }
    });

  });


inner wraith
#

I think I know what you've done anyways, namely that you probably didn't intend to use the store object on line 172 of index.js and should have used a different one - perhaps socket or io at a quick glance?

lament bridge
#

This is the output of store and the store.challenge function


SessionStore { _key: 'webauthn' }

challenge: function(req, info, cb) {
  if (typeof info == 'function') {
    cb = info;
    info = undefined;
  }
  info = info || {};
  
  if (!req.session) { return cb(new Error('WebAuthn authentication requires session support. Did you forget to use express-session middleware?')); }
  
  var self = this;
  crypto.randomBytes(16, function(err, buf) {
    if (err) { return cb(err); }
    req.session[self._key] = {
      challenge: base64url.encode(buf)
    };
    if (info.user) {
      var user = clone(info.user);
      if (user.id) {
        user.id = base64url.encode(user.id);
      }
      req.session[self._key].user = user;
    }
    return cb(null, buf);
  });
}```
inner wraith
lament bridge
#

That's what the error says, but I did not. Please check it again

inner wraith
#

In that code you didn't share

#

Must be haunted, call the exorcist

lament bridge
#

I am sorry you feel that way, believe me or not, I did not use store.on

inner wraith
#

Ah actually I'll give you that after a much better read of that stacktrace, you didn't write it but your middleware contains it

#

You are using this to initialise your app:

const SessionChallengeStore = require('passport-fido2-webauthn').SessionChallengeStore;
const store = new SessionChallengeStore();
const session = require('express-session');
const app = express();
app.use(
  session({
    store: store,
    secret: 'your-session-secret', // Replace with your own secret key
    resave: false,
    saveUninitialized: false,
  })
);

express-session's index.js then does this with store:

  // register event listeners for the store to track readiness
  var storeReady = true
  store.on('disconnect', function ondisconnect() { <-- L172:Index.js - Line of error
    storeReady = false
  })
  store.on('connect', function onconnect() {
    storeReady = true
  })
#

Clearly, whatever require('passport-fido2-webauthn').SessionChallengeStore exposes is missing an expected property, namely the function on

#

AKA: whatever an instance of SessionChallengeStore is isn't compatible with whatever express-session expects store to be for one reason or another

#

So probably time to read the docs for both

lament bridge
#

Yeah, I figured out 😦

inner wraith
#

Incidentally, types are lovely

#

Passing objects about and hoping they all have the right parameters is not, for this reason - but that's js innit

lament bridge
#

So I think one possible way would be to not use the socket.io and webauthn for the authentication, instead just use HTTP(S) then se the sockets once the authentication is complete

inner wraith
#

I've used express before but am not familiar enough with it to give you a helpful answer on that sorry

lament bridge
#

No worries

#

I will figure that out, I just hoped it was possible like this

lament bridge
#

@inner wraith mate, thank you so much, I figured it out, the problem was, I had to socket.handshake which contains the session detials

inner wraith
#

No problem

spark temple
#

@lament bridge for the future to read the stacktrace to see where the error is happening is to focus on these lines here;

TypeError: store.on is not a function
    at session (/home/marcell/PagerCast/server/node_modules/express-session/index.js:172:9)
    at Object.<anonymous> (/home/marcell/PagerCast/server/server.js:23:3)

As you can see, the store.on is being called in your express-session node module. It is invoked in your server/server.js on line 23. So, you can read that as you most likely configured something incorrectly before invoking the node module.

umbral saffron
#

do any of you know how to fix the “wlan0 not associated” error on a pi? i’ve tried everything but i’ve never had this issue before

cloud knot
midnight wind
#

?

#

what's the issue

#

what does?

#

the background?

silk eagle
#

probably something like display: contents; in html's css

#

or something in body's css like overflow-y: hidden; and then html's css overflow-y: scroll;

#

some combination of these things

#

and whenever you make changes are you reloading with Ctrl + F5?

midnight wind
#

source would help

#

the aos library may have something to do with it

#

fine for me

#

except for your horizontal sizing

neon oriole
# cyan niche Replace all \ with \\\

that wont work i think since @silk eagle i right i think , and its just characters not the actual bytevalues that they represent as a combo of characters, but anyway heres what i ended up doing that somewhat worked (as far as i can test anyway) , prolly has a million and one optimizations in it and it only allows for \x[0-f][0f] (2 mandatory valid hex must follow or its reverted to just the characters again , for octal any from \0-377 are allowed and converted to their byte values, :

#

*{} ? that must be performant :S

#

i think that since html elements mostly inherit stuff from their parent , placing stuff like font to be used over the whole page by default is best placed in the body {} , or possibly even the html{} (if you use one)

lament bridge
#

The subscription part looks a bit odd, could anyone suggest a better way to display this?

silk eagle
#

I think if the subscription part's text used up the same amount of width as the number part it'd look better.

lament bridge
#

Slightly modified, so the number will be there, if the sub is active

#

I also did some typo lol

inner wraith
ornate summit
neon oriole
#

cant say oracle is a gold digger, they kill every project and company they swallow or assimilate

neon oriole
#

^^^-prefers nojs over nodejs

unique kestrel
spark temple
#

Yea, something is causing it to flow past that element. What you have open is the head section of the HTML which isn't visible as scripts, meta information and other resources are provided. In the <body> you will have the content that is actually displayed. So, on the right hand side of your browser, where the DevTools are open, you have a dotted square with an arrow. If you click on that and then click on the footer on the page, it will open up the HTML there. On the furthest right, it will then give you the CSS Styles (aka the Styles) that are applied to the footer, there's also a Computed tab. This tab holds the information that is computed because of the order of operations when dealing with CSS ultimately can only have one style be applied by (aka, you can't have two classes applying different background colors).

#

Or you know... you could apply the correct CSS instead of trying to compute it to keep it in bounds.

#

Oh, not saying that computing it is always wrong. Just in this case, it doesn't make much sense and can hurt performance as time goes on.

silk eagle
#

I get anxiety when I think of javascript interacting with page layouts

hollow basalt
#

oops

inner wraith
#

I hate web dev with a burning passion
What are you guys using to get something up quickly without it looking embarrassing? Been playing with some Tailwind stuff and deciding if paying for their firstparty component library is worth buying/will make the suck go away but immediately had a slightly unimpressive experience with layout for their login forms

midnight wind
inner wraith
#

Not familiar with the first two but I'll look into them and maybe some thirdparty component libraries for Tailwind - it's been the least irritating option so far.

midnight wind
midnight wind
inner wraith
#

Thanks.

red mulch
#

Thanks Facebook. I really need a 6 week python developer course. That will help me understand basic programming concepts I learned 25 years ago.

desert iron
#

Btw: This series and plugin for Neovim make it easy to get used to vim controls and gawd they make me feel powerful since you can get things done more quickly.

https://youtu.be/X6AR2RMB5tE

Neovim FROM SCRATCH!!! https://www.youtube.com/watch?v=w7i4amO_zaE

Twitch

Everything is built live on twitch
Twitch : https://bit.ly/3xhFO3E
Discord: discord.gg/ThePrimeagen

Editor

All my videos are edited by Flip. Give him a follow! https://twitter.com/flipmediaprod He is also open to do more editing, so slide deeeeeeeeep into his ...

▶ Play video
red mulch
#

I can tweak it, I can make it work, I will build the backend, I will make it scale, but I will just make it look sensible and maybe use a nice library or some off the shelf whatever to make it pretty.

#

If you want it to be all pretty and shiny, you'll need to pay someone else

peak acorn
#

Anyone do transactional emails with variables with MailJet?

#

I cannot for the life of me get the variables working, all I get is Dear {{data:name:""}}, in the final email

silk eagle
#

like space on the left and right so itd be {{ data:name:"" }}

peak acorn
#

This is nuts

#

I added a column that has a conditional on it, and my resulting email is showing this

#

like their system is just putting my editor stuff straight into the email without processing it

silk eagle
#

the template isnt actually being rendered as a template then

peak acorn
#

rendering, yes

#

hmm.

peak acorn
#

It really just doesnt work in go

#

the test feature within the websites works as well as cURL

#

I feel like it's me being dumb but starting to think it's the library

nimble helm
#

Hello, starting off sorry if this post has to be taken down. I am interested in seeing what you guys think about an idea I had and to see if there are any other similar products.

The platform is called Backendo

Backendo is a platform similar to frontendmentor.io where you can find Backend related challenges based on your skill lever (Begginer, Intermediate, Advanced).

Backendo also offers a paid tier (Backendo PRO) which is 5$ a month or 50$ a year, the pro subscription offers complete tutorials and solutions for all challenges on the platform in 4 different frameworks (Next.js API Routes, tRPC with Next.js, Nest.js, Express.js). Pro also offers a full suite of Test UIs, Test UIs are little frontend applications to test your API, for example a Test UI for Authentication will contain a form which makes a request to an API the user provides, and the User's API will have to match the UIs security requirements (for example using an httpOnly cookie instead of storing the auth token in localstorage). Backendo may also offer a full platform where recruiters can find you, but this is only an idea and not something set in stone.

The costs of running the platform will be very low, and scale as the website grows (The core tech stack relies on Next.js and PlanetScale).

Would you buy a product like this if you were a begginer? Again I want to say sorry if this kind of post is not allowed.

wind horizon
#

I don’t think I would ever pay for the Pro, there are already so many learning platforms with massive catalogs. What you described sounds a lot closer to something I’d signup for free, but not paid.

Maybe you can ad support it somehow, especially while you are starting and don’t have much content.

cursive raft
#

Also, it seems pretty narrow ti focus it only on javascript, especially for a backend platform. I like the idea, but there are quite a few options out ther efor something like that

vast depot
desert iron
# vast depot Is it worth it ive been considering switching off of my regular vim plus powerli...

Neovim also uses basically the same Vim controls but is easier extensible since it uses Lua for plugins and configs. And with NvChad, LazyVim or AstroNvim you have very much a basic config for turning Neovim into your IDE.
And with this series of videos and that plugin (which only works in Neovim btw) you can maximize that power to make you a 10x Developer. It's a steep learning curve, buz once you understand the basics it gets much easier and you're getting blazingly fast.

drowsy elbow
#

Working with .NET MAUI. Deleted the app on my device, tried to start debugging again and now I get this deployment errror

#

Does anyone know how to fix this?

#

I tried cleaning solution, reboot pc, reboot phone, reset usb debugging

#

"fixed" it by changing the application id

hybrid yew
silk eagle
#

just cause an exception by entering text that cant be parsed into an integer and then you win

vast depot
#

general opinion question here which would be more useful as some one going into dev ops to learn. js or haskell?

hasty coyote
vast depot
midnight wind
#

python is a really nice glue language

#

can do almost anything

vast depot
#

hmm..... don't think i have that one in me can't do it. python is only beaten by java in terms of dislike for me

midnight wind
#

not a huge fan of syntax, but you get used to it

vast depot
#

it's a I started self taught so the white space awareness is just breaking to many muscle memory things every time I try to learn/use it. I just end up switching to one of my comfort languages or rust these days

midnight wind
#

rust is compiled so not really great as a scripting language imo

vast depot
#

most of the time its a I moved to this when bash wasn't enough. it's not neccesarily the best choice as a scripting language but I think if you know what you're doing you can make it work well enough

silk eagle
vast depot
#

Youre faith is misplaced my dear

minor ore
#

Anybody know how i can do this its for a game i need a generation script to automatically put PreMade hallways together in such a way it creates hallways but i cant seem to figure it out and cant find any methods online

drowsy elbow
#

I am loading two sounds into my .NET Maui mobile app, but I feel like this is not the proper way of doing this. I can't really find how to do proper async initialisation besides this. Anyone have any clues what the best practice is to load content async?

red mulch
#

graph API is cursed. Why the fucking shit would you do this.

#

(aside from all the normal broken shit, but this is just.. wow)

inner wraith
#

AWS Lightsail upped their low-spec instances to 2 cores and newer CPUs... if you recreate them

red mulch
#

curlogtime = datetime.datetime(year=1999,month=12,day=31) # party time

hasty atlas
#

Hello!!! how ya all doing?

#

Does one could tell if theres a chat-GPT like, opensource that we could use without super GPUs..

i got 2070 - 8Gb vRAM, i7 4790k with 20Gbs RAM

#

i dont want to pay, im a cheap little bastard haha

peak acorn
#

Does llama2 work on 8gb vram?

uneven owl
peak acorn
#

Whaaat 65b needs 200gb+

#

How can gpt4 possibly run on anything

inner wraith
crisp ember
peak acorn
#

What does federating mean? I've heard it in so many contexts

silk eagle
#

usually what that means with social media is:
the network of nodes syncs new data with eachother, usually in separate data stores on the network like in atproto.
I believe the movements of the network do have to make sense cryptographically and be signed by the users that make them
and then individual networks in it are able to filter it however they want

crisp ember
crisp ember
#

in the case of mastodon and other ones, including mine that use activitypub is more like email.

"hello I wanna follow @gabboman@app.wafrn.net" => "hello app.wafrn.net i am @user@otherserver.com and I am following to gabboman" = "hello I am subscribing to gabbos newsletter"

#

internally it works more like that. when you post something your server sends the post to everyone that you're subscribed to. more or less

#

atproto is something different that I havent look at yet since it still makes no sense to connect with it. But people a lot more clever than me has trashed it a bit tbh...

sleek blade
#

Oh just realized that message was like a week old

red mulch
#

going to fork this and make hardeffects. Similar deal, but support for per-source , source-sink, and per-sink chains

#

and support for alternate interfaces and run it from my midi mixer

grim wind
#
const input = document.querySelector('textarea').value;
const words = input.toLowerCase().match(/[\p{L}\p{N}]+(?:\S[\p{L}\p{N}]+)*/gu);

I'm trying to extract words from a text into an array. This works well and gives a pretty good result, but it runs very slow on longer strings. Is there a faster way to do this?

sage vector
grim wind
# sage vector When asking for help about regular expressions, it is always a good idea to prov...
function randomWords(count) {
  const alphabet = "abcdefghijklmnopqrstuvwxyz',.?";
  let words = [];

  for (let i = 0; i < count; i++) {
    const length = Math.floor(Math.random() * 7) + 1;
    let word = "";

    for (let j = 0; j < length; j++) {
      word += alphabet.charAt(Math.floor(Math.random() * alphabet.length));
    }

    words.push(word);
  }

  return words.join(" ");
}

I initially used the common lorem ipsum placeholder text, but that made the test flawed as browsers are good at caching the result if the same operations are executed right after each other. So I use this function to prevent caching by making it random

#

Also, I know using unicode in regex is bad for performance, but I need to support European languages that include non ascii letters

#

Like ü in German or ø in Norwegian and Danish etc

sage vector
grim wind
#

Lorem ipsum sounds weird haha, but it's like a placeholder text used by UI designers and programmers alike. It's like an ancient language that doesn't exist anymore

sage vector
dense badger
lone vault
#

how do i solve this problem? I feel like im almost done, im just missing something.(I all know this isn't the fastest way to solve this )



  //EX: 'abcabcabb' --> 3
  //EX: 'bbbbb' --> 1
  //EX: 'pwwkew' --> 3
  //EX: 'oboadefk'
  public int lengthOfLongestSubstring(String s) {
    HashMap<Integer, Integer> map = new HashMap<>();
    int r=0;
    int l = 0;
     for(int i=0;i<s.length();i++){ 
      for(int j=0;j<s.length();j++){
       if(!map.containsKey(s.charAt(j))){
        map.add(s.charAt(j),r);
         r++;
         }
          if(map.containsKey(s.charAt(j))){
           map.clear();
           break;
            }
        
             } 
              }
    
               }
sage vector
# lone vault how do i solve this problem? I feel like im almost done, im just missing somethi...

At least try format your code before posting it 🙂

    //Given a string s, find the length of the longest substring without repeating characters.
    //EX: 'abcabcabb' --> 3
    //EX: 'bbbbb' --> 1
    //EX: 'pwwkew' --> 3
    //EX: 'oboadefk'
    public int lengthOfLongestSubstring(String s) {
        HashMap<Integer, Integer> map = new HashMap<>();
        int r = 0;
        int l = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < s.length(); j++) {
                if (!map.containsKey(s.charAt(j))) {
                    map.add(s.charAt(j), r);
                    r++;
                }
                if (map.containsKey(s.charAt(j))) {
                    map.clear();
                    break;
                }
            }
        }
    }
#

Also, would help if your current code was actually valid.

#

E.g. map does not have an add() method but are instead called put()

hollow basalt
hollow basalt
sage vector
hollow basalt
#

So true

lone vault
#

Those errors still being there are kinda the requirements of being “almost” done

#

Also homework? It’s summer vacation

sage vector
lone vault
sage vector
silk eagle
# lone vault how do i solve this problem? I feel like im almost done, im just missing somethi...

so the approach here should be a 'sliding window', where you have 2 pointers, one for the 'start' of the window and one for the 'end' of the window. as you increase the 'end' position, check for duplicates in your store of characters (using a hashmap works iirc (but dont force that if its messy to work with)). if there's a duplicate, I believe the trick is you just increment the 'start' position of your window until the duplicate character is gone.

lone vault
lone vault
sage vector
# lone vault Replit

Never used it. If it does not provide feedback as you write the code I would highly suggest using e.g. Intellij Community Edition or some other IDE.

lone vault
#

True, but I use multiple devices,so it would be a hassle emailing myself the files I write on a laptop to another

sage vector
lone vault
lone vault
tacit spade
#

Is there anything better than raspberry pi products? I keep seeing a bunch of videos in my YouTube feed saying all these different boards are better or can do more etc. So I'm curious in general if there's anything actually better

sage garden
#

You mean better in all ways, thus whole ecosystem of daughterboards and software for the raspberry? Than no.

You mean better in specific areas? Yes

silk eagle
#

I guess anything is better if its a matter of in stock vs not in stock

deep bluff
silent gust
limpid flare
# tacit spade Is there anything better than raspberry pi products? I keep seeing a bunch of vi...

Bit late to this but no: on paper there are killer single board computers out there, but 1) customer support is few and far between, 2) the Linux kernel may or may not even support the hardware, requiring third party binaries to work, and 3) the great thing about the raspberry pi is you can easily Google any issue with it, and chances are someone else has had the problem and done troubleshooting.

If you wanted a small, affordable, computer you should be looking on eBay for business surplus PCs, Small Form Factor PCs from Dell/HP/Lenovo with i5-6500s and 8GB+ of ram can be found for $~100 CAD on eBay these days. If you want something smaller you can get a Lenovo M700/710/900/910q which is a 1L PC of equivalent CPU generation

tacit spade
# limpid flare Bit late to this but no: on paper there are killer single board computers out th...

I was planning on doing a bunch of different projects from like custom drones to home automation and securityor robotics like the Boston doggo etc. And I figured I could probably use different pi's for different things and use different types of sensors and things but recently I've been seeing a bunch of different videos on a bunch of different little computers talking about "this is so much better than a raspberry pi" so I started wondering of there were better alternatives in general to pi for various different projects and compatibility with 3rd party products like sensors, cameras, displays, motors etc.

limpid flare
#

Tbh, it sounds like a Pi is overkill for most of your requirements. For a lot of home automation you'd be more suited to using COTS zigbee relays and temp/humidity sensors with a USB sonoff gateway. For everything else use NodeMCUs running MicroPython/CircuitPython and only use a Pi 4 where a full OS is necessary

#

For some sensing and data receiving (using zigbee2mqtt) https://a.co/d/0QTtFsH

https://a.co/d/6dTzbyO

https://a.co/d/5g7ir5p

spark temple
hollow basalt
#

Ok

inner wraith
#

Makes me wonder how effectively ChatGPT can solve them and if this makes them an even less useful metric in hiring

#

Probably. Small, self-contained problems seems to be its forte.

red mulch
red mulch
#

uhhhh that's not how it works

inner wraith
#

Recruiters using it for hiring are and were always fools

red mulch
#

here's me on a sunday night rewriting the translation process for my midi surface control software.

inner wraith
#

Sounds interesting.

red mulch
#

yeah normal midi is 0-127, but you can also do pitch wheel for volume and that's -8192 to 8176 🙂

silent gust
#

between SpaCy and NLTK module of python which one will be better for a chatbot?

red mulch
#

HAHAHAHA ok

#

udp 0 0 127.0.1.1:6980 0.0.0.0:*
<- There is your problem, ASDFHWERTGFUIAWEGHQW#G

#

listens on locahost.

midnight wind
#

dll is a compilied binary, you can't really edit it

slender lodge
midnight wind
slender lodge
silent gust
#

.dll files are in binary you cant really do that lol

#

my ai is pretty dumb lol
You: how are you today
AI: what is your favorite thing to do? i like to go to the park and play with my dog. That's amazing!
You: i agree
AI: what is your favorite thing to do in life? i like to go to the beach and surf. You've got this!

red mulch
nocturne galleon
#

i want to ask something it's about a mod i have in mind for MarioKart 8

#

I have in mind to make a mod like CTGP-R on the wii just with the Nintendo switch booster Course Pass

#

To implement online features with Pretendo network and such

round shadow
#

hey uhhh

#

im really new to python (2 hours in) and im trying to write a chat bot, idk why but its not working

inner wraith
# round shadow

Can you show us knowledge_base.json? I think I can see what you're doing wrong but there's no way to reliably infer structure from your code. (Ah wait I can do so with L45)

#

I'll also say that the whole for q in knowledge_base["questions"] thing you've got going on in get_answer_for_question screams "use another object, not an array" - that way you can skip iterating over the lot every time you want something and just pick out your desired key.

#

Wouldn't knowledge_base[question]["answer"] be much a much more convenient way to access an entry by a known identifier?

#

I'd inline all of those helper functions and simplify the data structure in knowledge_base to eliminate the last one.

round shadow
round shadow
#

im scared

inner wraith
#

Well that part's in JSON, not really Python.

inner wraith
round shadow
#

no no

inner wraith
#

Basically, if you structure knowledge_base.json like this you can skip a lot of the fiddling about you're doing to get your answers you.

{
    "Who are you?":"I am a bot",
    "Question 2":"Answer 2."
}
round shadow
#

i just got a challenge to write a in python

inner wraith
#

So your questions become keys and your values answers.

round shadow
#

wait

inner wraith
#

Sorry look above again

round shadow
inner wraith
round shadow
inner wraith
#

Yes, now you have to change your code to use that structure

round shadow
inner wraith
#

Not much of a challenge if I give you a working one though

round shadow
#

when im done with python ill go over to C#

#

well dont, give me a way to fix it and help me disect it trough because i dont know whats going on

inner wraith
#

I'll still guide you towards a solution, just slower

round shadow
#

dms ?

inner wraith
#

Sure

vast egret
# round shadow

bruh it is a dictionary "key error", you are storing the question as a question string "who are you?" : "answer".
and then when you are looking up the dictionary you are searching for the literal string "question" and not the question that is "who are you?".

silk eagle
#

yeah... that's an annoying way to store questions in my opinion but if you want that to work you'd want to iterate through like for question in dict.keys(): answer = dict[question]

#

alternatively you could just make a JSON list for your questions. example:

[
    {
        "Question": "Who are you?",
        "Answer": "I am a bot"
    },
    {
        "Question": "Question 2",
        "Answer": "Answer 2"
    }
]
#

which would be accessed like:

for question in jsonData:
    print(question["Question"])
    print(question["Answer"])
white bear
#

Anybody know where to get community pycharm?

vapid badger
gentle cipher
#

why cant i do this? im simply trying to say

using WeAreDevs_API;

but it says it does not exist, when clearly it does. any answers?

hollow basalt
#

Does it really exist

inner wraith
#

Also don't try to hack games, go play better ones

#

I'm surprised you got to that point, I downloaded it for funsies to check it against the posted VirusTotal hash but Chrome blocked it, Defender flagged it instantly as a variant of the DarkComet Remote Access Trojan and then I got bored because by that point it's very obvious what it is.

#

In future: not bypassing your Antivirus warnings is a good thing

deep bluff
#

Tho it’s prob filled of adware atleast

inner wraith
#

It is.

#

But hey if you disagree with Windows Defender you're welcome to run whatever mysterious black-box DLL files you find in a Github repo you'd like, I'm not your dad.

stone geyser
#

How would you prevent malware being uploaded by your authenticated users to your s3 bucket? some sort of screening on upload?

near cove
#

Why are you using random DLLs off the internet

#

Use a reputable Nuget package atleat

#

or build from source if its something more random not on NuGet

inner wraith
# stone geyser How would you prevent malware being uploaded by your authenticated users to your...

Are you giving them S3 access directly? If so your only real option without using a more intelligent approach is to use an S3 Event notification to have uploads trigger a Lambda function/SNS/SQS to an instance for the same to scan the contents.

Else... don't allow uploads, specifically do not allow binaries if you must allow uploads, have your app server you upload to require them to be of a specific type and inspect them (don't rely on file extensions, they're nearly worthless), if images or video are expected deliberately re-encode them first to destroy anything included and you can shrink them while you're at it...

#

It's not a trivially solvable problem, look no further than Discord's rampant exploitation as a CDN for malware.

silent gust
#

Since you seems to be using premade patterns + responses for your bot

silent gust
#

So either your anti virus blocked it considering it as a virus or else

#

Exploiting is not accepted in roblox too

silent gust
silent gust
#

How is it going so far?

deep bluff
#

Procastonate 1 language, work on other :D

silent gust
#

Dang

silent gust
deep bluff
#

tho I learnt C# too, not too much but enough to use unity

silent gust
deep bluff
silent gust
deep bluff
silent gust
deep bluff
silent gust
#

Like a python wrapper?

#

I mostly use it for ai, automation and when lazy

deep bluff
silent gust
#

Sadly its kinda slow but all good

red mulch
drowsy elbow
#

My application is supposed to scan barcodes, but it's so trash that it doesn't work lol

#

qr codes do work though, after waiting for like 10 seconds

drowsy elbow
#

Appearantly I had to dail down the resolution so the phone had time to catch up lol

kind jacinth
#

Lol yeah makes sense, you'd be surprised how fast high res image processing cripples CPUs. Consider using an ultra low res image and looking for rectangles first, then crop out that region on a higher res photo to process.

quartz walrus
#

henlo, i make a funny rhythm game and i'm currently making another game with some custom stuff :P

red mulch
#

To scan a barcode you literally only need an image a single pixel high, it has one dimension.

silent gust
quartz walrus
#

for the new one i'm using netradiant :P

#

and yeah, for the rhythm game I made my own

quartz walrus
#

luckily i solved it, but yeah it's by far the most complex part of the game

silent gust
#

Make the thing rotate

quartz walrus
#

it's doing well, i just hope i can get the new one off the ground or else i'll have to find a new job

quartz walrus
silent gust
#

To make an ai that will destroy your game

quartz walrus
#

i tried actually, but there are too many parameters per-note for AI charts to be viable

silent gust
#

By learning and you can make it the last boss on one of your levels

quartz walrus
#

i looked at state of the art osu charts and it's just not there even for osu, and this is much more complicated

#

each note has sine wave params, entry angle, distance etc

silent gust
quartz walrus
#

i made sure to optimize the game so much it actually gets 5h battery life on the steam deck somehow

quartz walrus
#

C++/GDScript

#

there used to be some rust in there but i removed it

quartz walrus
#

i actually became a big fan of c++ after i learned rust, not sure why, also because maintaining a single rust library for a niche feature (audio normalization) was too much work

silent gust
#

Or you love pain who knows

quartz walrus
#

I'm porting it to godot 4 with my own steamworks wrapper so it will finally be able to be compiled with GCC on all platforms

silent gust
#

Atleast its not java😁😁😁

quartz walrus
quartz walrus
silent gust
#

It miss somes hard phonk neon

#

The animation look smooth and simple

#

You surely struggled for that lol nice job!

quartz walrus
#

it's a clone game, but i agree, i'd like to add new stuff, it uses a relatively novel approach to audio thread synchronization that makes it probably the rhythm game of the market with the least drift

#

also, for the other game i'm using radiant hehe

quartz walrus
inner wraith
#

$3.65USD/instance/mo

grizzled steeple
#

tbf IPv4 really should've been deprecated years ago. The only reasons it's still around are that an IPv4 addresses is ez to remember, and no matter how old the device/OS, it will work with it. But it's not like IPv4 to IPv6 reverse gateways don't exist, in-fact the XBox online services will run you through one if you connect to them using IPv4 instead of IPv6...

inner wraith
#

Deprecated?

#

Perhaps the day BGP dies

grizzled steeple
#

Can you name anything still relevant that the average user interacts with that doesn't support IPv6?
I know that some ISPs already won't give you an IPv4 address even if you ask for one. IPv4 outward traffic will be routed through an ISP level NAT on a single IP address which does cause issues for peer to peer connections on IPv4...

inner wraith
#

I'll grant you this isn't a technical limitation (often)

#

But they're all still deathly afraid of the funny hexadecimal values

grizzled steeple
#

true dat

inner wraith
#

I'm having a fair bit of trouble with ipv6 on Telstra LTE as well

grizzled steeple
#

I still find it stupid. IPv6 has been around for years now, you'd think the problems would've been solved by now. No, instead they'd rather focus on how to distribute the few remaining IPv4 addresses...

#

well, except for the giant hard to remember addresses 'cause that's kinda intrinsic to such a large IP pool

inner wraith
#

Of course they're going to focus on getting access to IPv4 addresses when IPv6 adoption looks like this

#

It's increasing sure. Great. But cutting out half the internet is... not possible.

drowsy elbow
#

My collegue just asked if it's possible to change the "Sign in" text (for translation). It's literally 5 places to the left and he can see the parameter he can control from his code.... lol.

#

He even highligted that "Sign in" text

cyan niche
#

Maybe he doesn't know how the null coalescing operator works

silk eagle
#

I am convinced that people don't like IPv6 because it looks way scarier than IPv4. But I think that's because its just not as straightforward as IPv4

cyan niche
#

Who needs IPv6 for internal networks

#

It's like, only the internet actually needs to use it

stone warren
pseudo spire
#

as much as I wish enterprise would switch, they don't

inner wraith
# pseudo spire lol companies will just bite the cost

Because I'm using several small instances for resiliency it'll up my costs by 86% though I am aware that I'm an outlier there. AWS was still cheaper than Google Cloud and especially Azure by a significant margin.

#

T3/a.nano and micro instances just got a lot harder to recommend though if you only need a few and expect to need S/PaaS cloud features it's still likely your best option.

#

Azure Australia still costs like 5x more for small deployments, I don't really get how anyone can look at their instance prices and decide on it without being forced to by a non-technical business unit.

hollow basalt
#

As someone working for an australian company, we dont use australian resources. SEA costs less and the delay isn't noticeable (in most contexts)

grizzled steeple
inner wraith
#

I mean yes that's why Azure's shoved upon people, though I'm going to doubt that it actually makes security that much simpler tbh. Definitely preferred to have less vendors for businesses and that makes auditing simpler than having instances in DO, AD in Azure, object storage in Wasabi or whatever...

#

I'm probably about to set myself up a tenant on it anyways for Exchange+AzureAD because that's stupid cheap.

#

The whole thing feels anticompetitive to me though, a few really core business features with no real competition glued to an overpriced cloud platform.

latent wolf
peak acorn
#

They definitely absolutely neutered chatGPT in the past year

#

it is awful it can't even do javascript properly, which I'm sure it was originally trained on more javascript than any other language out there

silk eagle
#

I cant say I feel bad, all these NFT-ers see chatgpt and then are like haha i wonder what half assed work I can do with this to make money

#

I did hear something about how it interacting with people reduced its accuracy

peak acorn
#

I agree it has minimal impact on me beacuse im not stupid, but I swear I used to be able to ask it meaningful questions and get answers. Now it doesn't even know how to redirect me to a new page.

peak acorn
silk eagle
#

bare minimum, im sure the enterprise implementations of it are perfectly fine at least, and i dont have to see news articles about "I asked ChatGPT about __"

#

i think i recall seeing a CNET article about how bad AI is for workers which was funny cuz iirc they write all their articles with AI

peak acorn
#

Are there any resources for finding common UI design styles? Like I'm trying to update the page for the 2FA code input on my app. Besides scrolling thru my password manager looking for websites to go to and compare, or google searching. Is there like a search engine specifically made to search for UI designs?

latent wolf
#

Apparently you can’t use a google doc for privacy policy when verifying your bot. "Could you please upload your Privacy Policy to a publicly available site? There are a few alternatives you can use, such as a PDF hosting site or a GitHub gist."

#

Makes sense I guess

midnight wind
#

A Google doc is also just not professional or a good way to share things like that

inner wraith
#

An S3 bucket in site hosting mode is nice and easy.

latent wolf
#

I can see how it could be problematic.

civic otter
#

Is anyone here competent with Lua?

hollow basalt
#

no one

peak acorn
#

Most lua I've done is a few gmod addons

#

Weird language

inner wraith
silk eagle
#

Why for and what?

civic otter
#

for why and when for

deep bluff
#

anyone know a bit of typescript? Ive hit a roadblock trying to figure out a odd asf bug applying colours in my VSC extension.

My extension looks at &c &a etc. etc. and gives them acolour, for ex: &aHello , would make Hello red.

Recently I added a way for you to specifcy a colour with &x. For ex: &x&f&f&f&f&f&f is #ffffff . However, for whatever odd as hell reason, that decides to make it so everything is not coloured? Without any errors.

https://hastebin.com/share/posacudafe.typescript