#development

1 messages · Page 18 of 1

silk eagle
#

wait you mean you arent supposed to write the bytes to a .txt file line by line stored on an microSD card connected through a USB 2.0 dongle?

cloud knot
#

to be fair, unless we talk about super-special requirements, i would just push this through a message queue/even streaming server (like Apache Kafka or MQTT) and call it a day

sick bronze
#

Yeah but that requires more overhead, and learning their API, i already wrote a decent lib myself

spark temple
cloud knot
#

i mean if it is a very high throughput pipe, then yeah, a distributed, event driven solution might not be right for him. But if it is just async messages back and forth, MQTT, or if bigger needs, Kafka is the way to go

sick bronze
#

I'm not requiring anyone do anything, it's all my code :P. Also for the latest thing I've been working on, the lower the latency, the better. I started using shared memory simply to avoid writing to a database or disk every request.

#

As far as the "lib" goes, it's not much more than LevelDB, but in RAM.

#

This project is a game, kinda like Kahoot, more like JackBox. The premise is that a host connects to the game server, and all the players connect to the host using their phone. The Phone client is a web page, but the host client could be written in any language.

#

But I'll admit, I'm pretty stubborn. It's pretty nice knowing the entire code base myself because if there are features or issues, I can handle them myself. PHP is solid enough that if something isn't working, it's 99% on me.

#

Also been messing with 6502 assembly a lot too so managing memory blocks ain't that hard

drowsy elbow
#

MVC is what I used back in the day. Now I'm using Blazor, but tbh, I still prefer MVC.

cloud knot
drowsy elbow
#

I thought phpstorm/webstorm was already free xD

sick bronze
#

I paid for phpStorm for a year, stuck on 2022 but tbh, whats even new?

drowsy elbow
#

No idea. I had a student license back in the day

cloud knot
drowsy elbow
#

Oh yeah I know, but for some reason my coffee-starving brain read phpstorm instead of rider.
However I just use vs, cuz that's what we use at work and I really like vs, even though it's kinda buggy often, and makes me very frustrated on a daily basis.

frozen flame
#

Vs more like Bs

cloud knot
#

there is a special place in hell for Indian youtubers, who put out videos with title and description in English, and then in video they talk in Hindi or other language from India

silk eagle
#

i think thats honestly just kinda how india works they use the languages interchangeably

plush valley
cloud knot
#

i still don't understand why is there no infrastructure for CI/CD systems like Gitlab (and Github too) to do test runs without need to commit the files to repository

#

i mean, why can't we have it like "run it on the build node, but instead of GIT checkout it would upload your lcoal files and that would be the whole difference"

peak acorn
cloud knot
#

also most of the time the CI scripts are completely different repository

peak acorn
#

I was able to get act working for my work thing but they are very very sime actionspl

cloud knot
#

so the CI in the actual project is just "import CI from another common project, and use these environment variables for that"

vast reef
#

some the Canon Service Tool for MG3600?

#

i have to reset my printer :D

cloud knot
#

I literally just set 1.0.0 as version of my components when I have working initial feature set. Or usually follow the versioning of upstream when I just package some SDK into simplified API.

#

Commercial software UI changes is more about having to show something as new. It is harder to sell when your new feature are some obscure formulas in Excel 😄

neon oriole
frozen flame
#

the blender example is kind of dumb, blender desperately needed to not suck lol

#

but generally yes i think most people will agree with that stance

#

see: yts new gradient colour scheme (???)

peak acorn
#

Lmao that xkcd

random talon
neon oriole
# frozen flame https://xkcd.com/1172/ screams of this

problem also is : people use that as an excuse not to have to deal with bugs or admitting that their solution might not be all that great... or not havving to eithter considder a better option... since everything you change in theory breaks backward compatibillity, yet they do bring new features if they themselfs like it...
and yes every new feature breaks backward compat, since downstream might be testing for that new feature not existing 😦

me personally think the whole never break userspace /backward compat is nonesense in the long term...
version A , version B-> should not break anyone depending on A, version C should not break b and have tooling to convert A to C , D should not break C have tooling to convert B to D but can break original A now , eg

#

people realy sticking to A should keep using A 🙂 and backport anything they want from B,C,D themselfs

#

and make sure every format and or protocol or type that is used in between libs or whatever has a version field 🙂 and a set of reserved parameters/space fro future use , if not only to facilitate what i mentioned above

waxen belfry
#

Anyone know Any good tutorials for creating a react fourms / Threads app?

nova coral
#

i need help whats the problem with this? (im new to python and im using flask)

spark temple
cloud knot
# spark temple Why don’t you just run the tests locally? Everything you run in a pipeline you s...

what is being fixed is the pipeline itself. For example i wasted a day on something which is in the FAQ/common issues for the gitlab runner, but you would need to know about it to avoid it. To be precise, i screwed up that a command to run had a pipe in it, and that pipe was not passed down as the command, but interpreted by the runner itself.

And often it is really just about perfecting the pipeline itself. Yes, i know how to build my app and it works just fine. But after that, you need to make all the "is the base system to run the build from (docker, macos computer) set up right so it has the right versions of tools, has all the SDKs preinstalled" followed by "are the right artifacts saved between the steps" followed by "are we uploading it the right way to the distribution system" and so on.

simple canopy
#

Have you ever tried using LibreOffice as an IDE, just to mess with somebody? I have just done so and it was great fun

midnight wind
#

Post here not dms

frozen flame
cloud knot
#

to be precise, i was hit by the fact that yes | command - yes was interpreted by the runner, while command was interpreted by the host, cause i didn't run the whole command on the runner due the pipe character

frozen flame
#

no?

#

code gets posted here in a decent amount of discussions

cloud knot
frozen flame
#

not you

#

someone deleted a message and or got banned

cloud knot
neon oriole
#

do you even know how to center a div ha? well?
sure no problemo ... here you go:```html
<center><div>centered</div></center>

neon oriole
frozen flame
#

VSC is... fine

#

i prefer intellij but im also not getting paid enough to warrant buying it x0r6ztGiggle

neon oriole
#

may i suggest using LibreOffice as IDE? really big improvements 😉

crude pulsar
#

really?

silk eagle
#

i use notepad and I have highlighters i write with on my screen for syntax highlighting

plush valley
#

I prefer VSC over most things tbqh

#

Why does mapping various vendor APIs have to be so tedious

limpid reef
plush valley
#

We use Neustar for various things and it's bad

#

We use Neustar for campaign verification and enhanced caller id (doesn't work)

#

Peerless uses SOAP APIs

#

Bandwidth uses XML over HTTP

#

Telnyx uses standard REST APIs but they basically aggregate carriers for you and also they suck all around

limpid reef
#

No comment. I all but shit my pants and screamed bloody murder during a screenshare meeting when they presented their "new" replacement Numbering Portal webUI in ... late 2022(?) 😦 They managed to make it open 3x as many popup windows as the old interface, have more fields you can't easily copy/paste from, and require 2x as many screens just to check the status of a number.

#

I don't expect a complete polished system - it's an internal / B2B tool after all, but holy hell in a handbasket, they went straight 1995 when it comes to the design and functionality of the updated interface.

fading osprey
#

of course, if they made it easy to use then any old schmuck could do it, and then how would they rake in the support fees????

#

(I have no experience with this company but I'm sure based off what I've heard that summary is accurate)

cloud knot
cloud knot
#

it looks stupid for 90% of people, but the remaining 10% with vision impairment will appreciate the spacing, the colors (button goes from green to yellow when pressed), all the ARIA attributes and so on

plush valley
cloud knot
#

it is pretty much a server, which can publish Web Services, REST etc; and can take data from various sources and do transformations on them, call other services etc

#

in short, the GUI designer configures the flow of calls/transformations/etc to perform some task, so it acts something like a glue between stuff

#

technically it is IBM now tho

#
#

(and yes, they made a SaaS version of it too now)

#

or PaaS or whatever it is called

#

that one looks like this

cloud knot
limpid reef
# cloud knot that could be down to legislation. Look at GovUK design system for example https...

Oh this updated design didn't meet any accessibility requirements I can tell you that much. Fonts were 50% smaller that your browser's default with no built in way to change them, many fields / buttons had poor or no contrast against other nearby elements or backgrounds, and there was a sheer lack of consistency to the order in which you could TAB through elements so even if your screen reader worked it would sound like a lunatic designed the site. 😄

weak glen
#

peak accessibility design

#

It doesn't do that on chromium (edge) or firefox as far as I can tell, which browser is that?

plush valley
#

@limpid reef So we took on a new carrier that does LOA's over fax

#

so now I am having to use programmable fax to injest the LOA's

#

Like what the fuck

plush valley
#

I think its because this is how they USED to automate LOAs

#

But never upgraded in the past like 20 years

#

This is worse than the shit I have to use to program alarm systems 😦

#

@limpid reef Omg this carrier offers Modem bank services LOL

peak acorn
#

I work with faxes day to day lol

plush valley
peak acorn
#

It's funny because they are no more secure then email but medical facilities pretend they are

plush valley
#

Most carriers dont have TLS/Encryption enabled for the RTP Communication between points. Its one of the easiest things to intercept on a network.

#

If its analog, then its even easier with 2 alligator clips.

midnight wind
plush valley
midnight wind
plush valley
#

For a culture like japan, I wouldve (incorrectly) assumed that they wouldve been somewhat on the technical edge

silk eagle
#

i think the deal is japan is pretty culturally kind of perfectionist & bureaucratic so they perfect their existing tech and are not incentivized to work outside of the corporate structure of "boss-tells-you-what-to-do-you-do-that-and-nothing-more"

#

but with software a lot of it is rapid prototyping rapid development stuff which doesnt work well with bureaucracy

#

and with the bureaucracy it becomes difficult to, say, phase out faxes when your bosses still use faxes or everyone else still uses faxes so why be the one company that doesnt use fax

peak acorn
cloud knot
cloud knot
#

result

peak acorn
#

i fuckin hate front end development

#

lately ive been doing a lot of it

silk eagle
#

ive learned recently to use scss and its made frontend a bit more bearable to me

peak acorn
#

we use tailwind for our stuff

tawdry otter
silk eagle
#

yeah im not doing anything super complicated and nothing in a team so I just like it for making my basically just raw CSS more readable

compact scaffold
#

hey guys, can you help me, this month i complete 3 months since i started studing programming with python, but now i think it kinda sucks, its boring being fr, searching a litle i found GO wich i found it really attractive (and i already have a C base ), you guys think go is a good lenguage to learn in the beggining

elder wing
#

C++ or bust pepoJuice

cloud knot
#

btw have you guys seen the today's twitter sensation of horrible code ?

#

(note, i am not responsible for health issues caused by reading this code 😄 )

weak glen
#

I am crying

#

that code is causing me distress

#

on multiple counts

silk eagle
#

ok its not what I do at all

weak glen
#

I want an explanation for "true" === "true"

plush valley
#

I was just looking at this today

silk eagle
#

i steer away from doing my own authentication because I dont know what I'm doing so I just use oauth with google n shit then deal with sessions not the actual authentication. that way I never have passwords to lose only all the other user data

plush valley
#

I didnt even know this was possible

silk eagle
plush valley
silk eagle
plush valley
#

It shouldve just checked "true" === true which would return false.

plush valley
silk eagle
#

i figure that way I dont need to deal with people creating a bunch of fake accounts on my service google can deal with that and ionhave to do forgotten passwords email verification 2fa etc

#

of course people do have a lot of 'fake' gmail accounts but I don't really care at that point because the barrier to entry is a lot higher

plush valley
#

Were acutally moving to use a forums as an IDP for one of our product

cloud knot
plush valley
#

(A minor product)
For its use we require some sort of proof you are a real person so attaching social accounts increases reputation score

plush valley
#

Gluu has Everything covered but holy shit

cloud knot
peak acorn
plush valley
cloud knot
frozen flame
plush valley
#

its a means to do HTTP Basic Authentication easily.

#

out of a database

frozen flame
neon oriole
silent moon
#

how useful is c?

#

Rn learning the language and lowkey digging it

neon oriole
#

id say while maybe were in an inbetween period were allot of code from this point forward (will be,*edit : should be / hopefully increasingly) written in more memory safe languages, C is verry usefull in terms of learing to program , and knowing it won't be a waste, as once you know one language others come allot easier and c is a verry good base as its the base for allot of languages , and cpu's are designed around it

peak acorn
neon oriole
#

(if you get the choice between dotnet, javascript or c , id say there is no choice 🙂 only c)

peak acorn
#

Depends on the task

silent moon
#

dang

#

Well i like coding in c anyway (still an absolute beginner) let’s see where i go from there

peak acorn
#

as a beginner it is a fantastic choice

#

because you will learn how the computer actually does things

cloud knot
#

what i mean that most languages are following the same logic than C/C++, but many are very different

#

C++, Java, C#, Typescript, PHP - in the end, they all share the similar mental model, with minor differences

silent moon
#

Noted ✅

cloud knot
#

i mean something like

#

the steps are pretty much identical, some syntax and API library differences, but if you can code in one language, you can quickly jump to other

#

for example i did some Swift iOS programming with more or less no issues within few days even tho i never looked at Swift before.

#

(that is, i didn't touch GUI)

silent moon
peak acorn
#

gui programming fucking sucks

cloud knot
# peak acorn gui programming fucking sucks

i meant more like every language/platform has their own toolkit.

Want to do native iOS programming? Learn SwiftUI/UIKit etc
Want to do native Android programming ? Learn the XML or Jetpack compose
Windows ? MFC, WinForms, XAML, lots of other MSFT toolkits, lots of multiplatform toolkits.
Java ? Learn AWT, Swing or SWT.
Linux ? GTK, Qt etc

And so on.

No wonder web based solutions are winning, when you need to learn specific toolkit for every damn platform

peak acorn
#

That said, web based setups are the best absolutely

weak glen
#

The dark side calls to everyone

cloud knot
#

or the modern incarnation of the idea - Kotlin Multiplatform

frozen flame
cloud knot
frozen flame
#

i literally specified what i meant

#

anyways we made an ios app and it was a breeze to port it to a desktop app, we just had to modify the ui a bit when compiled for desktop as opposed to mobile

cloud knot
#

with web technologies, you make your UI once, maybe with some progressive scaling. With any other option, you need to redo the UI multiple times. This is ironically where Kotlin Multiplatform might be the best choice

frozen flame
#

with the work that Arc browser is doing, swift might end up being truly cross platform

cloud knot
frozen flame
#

which would be neat

#

Theyre running swift on windows for their browser right now

keen sorrel
frozen flame
keen sorrel
#

I'm aware. So am I lol. Swift is cross platform itself

frozen flame
#

You are running a UI on swift on windows?

keen sorrel
#

Yes, just not SwiftUI because that's not cross-platform and isn't what Arc is using. They have made swift bindings for WinUI for windows

frozen flame
#

whatre you running for your ui?

keen sorrel
#

I haven't settled on using it yet, but I've used Arc's code lol

frozen flame
#

yeah exactly

#

which is why i said with their efforts we might get cross platform (ui specifically)

#

afaik they're working on leenux

keen sorrel
#

It's just my opinion, but I don't consider binding to each platform's own UI as "cross-platform UI". That's pretty much the polar opposite

frozen flame
#

baby steps

#

get bindings for each platform first

neon oriole
# peak acorn gui programming fucking sucks

depends make it easy on yourself, and ask, how fast does my gui need to run code/update itself, if its for humans , well you can pick pretty slow and easy languages , that basicly reduce gui programming to connecting buttons to callers of functions (in any languages) and vice versa,,

neon oriole
#

a gui that can browse its own structure 🙂

#

*procedurally generated (i dont like oop :D)

frozen flame
#

Christ

silk eagle
#

personally to me hashmaps are objects and therefore that is oop

neon oriole
#

lol 😛 anything with objects is oop, 😄 thats a new one

#

a c-struct with pointers to both data and functions , also object and therefore oop? , so lisp is an OOP languages since it has hashmaps ,... ||datastructures in the code doesnt make it oop ||

neon oriole
# silk eagle this is a good example to demonstrate that gui programming sucks

but i also have to do a caveat here, under the hood python is as OOP as it gets,.. that doesnt mean you program OOP style if you use python... because if that actually was the factor that decided what kind of programming you did only 1 parradigm exists(on PC's (cpld/fpga is a different story)) , and that is procedural , since even the most hardcore OOP or even fuctional language like haskel is procedural under the hood 🙂

#

-fpga/cpld -> vhdl is a synchronous (aka tik based ) language but other than that all procedural

north pebble
#

Can anyone help me with wirting a Moq test in C#? My current test doesn't work and seems to be loading forever...

neon oriole
#

(by the way you know the difference between programming a Gui , a Cli and an Api,.. cause to me they look all the same 🙂 , only a tui is a bit different , since i havent seen a good library that can tackle that with ease without dropping to much features , so i usually end up doing raw ansi wich is fun but it clutters the code allot unfortunatly)

#

dont know much C# but if the tests are not working as expected , there might be a chance your trying to test to much in a single test and one possible solution would be to split it up in smaller chunks

kind lintel
#

does ANYONE know how to implement a lazyVstack in adwaita (swift adwaita would be perfect 🥺 )

frozen flame
#

anything is an object if you dig enough

#

and if its an object it can be forbiddenfruit.curse'd

cloud knot
neon oriole
# frozen flame me when `forbiddenfruit` enters the equation: >:)

thats why i dont considder datastructures to be objects in the OOP sense of the word , they can be ofc . like a simple string , is an array , and to (highly simplified) print it to the screen, in procedural , you would pass the memory location of that array to your print function , the print function is also a place in memory where where all the logic to extract the data from the array , and all the logic to display it on the screen is stored . you could say ,you passed an object to the print function but that is not what object "oriented" is in my view ,... object oriented would mean the string is not just an array, but a struct , containing the array (or pointer to ) aswell as the logic to extract the data from the contained array , and the logic to display it on screen., so an int in OOP would also be a struct similar to this , but it would store different logic that instead of extracting data from an array would convert the numeric value stored to ascii , and then also the logic to display it on screen... in the oop way the actual print function that would do the heavy lifting in procedural is mostly an empty box in oop that only knows to look for a certain logic block in the struct and look for a print function in the struct and passing the outcome of the first logic it ran to the print function that it found... pretty neat concept at first glance since instead of havving to write an extremely bloathed print function that is able to deal with and convert any possible datatstructure, or struct that might get passed into it and then to display it on screen in the desired way, every type carries its own specific small convert and small print functions that only have to care about the exact type they travel with, and the print functions itslef only has to look for the specific functions in the object to make it happen...

#

problem is that you have to know in advance exactly what your program is going to do so you can organise everything nicely and group everythig together to share those functions (types and inheritance ) so you can write those functions in a way they work for the type and all its subclasses. you can easely forsee this to be a technical problem where you want to add functionallity that uses (partial or full functions) functions already existing in a different section of your inheritance tree, forcing you to insert a new type in a spot where there is no room for it or in a spot where it now carries all the wrong functions that have to be overwritten with the correct ones , or your writing duplicate functions that when they should change both have to be changed . but its worst problem is that it assumes that we humans are as a group[ capable of categorizing things in a consistent and sane manner , and combine that with the magic orb required to also take any future expansions into account ...

nice one to think about: i want to correctly store a fraction ,.. what is its type and what does it inherit from,... float ? well "10/3" cant be stored as a float correctly, if you have some idea , keep it in mind and apply that same logic to where do complex numbers go and what do they in herrit from in that scheme , ||ps last time i asked this one , some one went l, an array for the fraction , wich is ofcourse a procedural way of storing it not an OOP way of storing it , you have to pick a type carrieng all its operations as functions for it to work ofcourse , the actual format it is stored is non consequential in this excersise||

neon oriole
#

btw i only now just found out (* might have known this but my brain recently got scrambled a bit so, you don't know what you have forgotten ofc) but i dont think i ever noticed this 🙂 when going from 999 to 1000 in base 10 you go from 3 identical digits to 4 digits with the first getting the one increase and the 3 that were already there getting zeroed 999 1000 like obviously but same in binary (*) 999 to 1000: 111 1000 3 identical max values , then 4 . first incremented and the 3 that were zeroed , only difference : the leading `11110' in front of both
and this is for every order of magnitude the case ```

9 ->(0)1 | 10 999999 -> 111111 | 1111010000100
10 -> 10 | 10 1000000 -> 1000000 | 1111010000100
LSB^MSB^

silk eagle
#

i somehow manage to consistently find the most effective thing to say to get people here to explain things I don't understand

silk eagle
#

checkmate, scientists.

neon oriole
#

also not storing the actual numbers 🙂

#

and that is hardly creating it by yourself and fractiosn.Fraction is a class that inherrits from nothing : so ... they had to reimplement everythign expecially for that class, prooving my point exactly

obtuse temple
#

Hey, random question; are there any AI's (ie. ChatGPT) that are free to download and run locally?

peak acorn
#

depends on your hardware what models you will be able to run

obtuse temple
cloud knot
peak acorn
rapid storm
#

is there like

#

a course or video series that i could use for roblox lua??

cloud knot
peak acorn
#

tf

cloud knot
silk eagle
#

you just killed half of the people in this channel by posting that

sick bronze
#

Why, why? Are classes above you or something? Some crazy challenge?

fading osprey
#

yes

#

yes they are

cloud knot
neon oriole
cloud knot
#

but again, the example in the tweet is obviously a huge abuse of the technology. I shown you an use case where it makes sense

#

if you already got the data attribute, why add an extra css class to present same information, if CSS allows you to do it via attribute value ?

neon oriole
#

arent portals meant to reflect the acual site they point to so ... , and 3rd party intranet you havent resources for , well id say if it runs locally more or less just replace the css that goes with it with your own :), or just (assuming you pay good money for that 3rd party site) have them fix it upstream ?

cloud knot
#

like imagine <tr data-value="-1.0"> and then you make a CSS selector for tr[data-value*="-"]

#

instead of having <tr class="negative" data-value="-1.0">

neon oriole
#

<tr class="negative" data-value="1.0"> then i presume 🙂

#

ow wait i see 🙂

#

nvm

#

i use that on my site i think 😛 sec

#
            section input {
                position: fixed;
                opacity: 0
            }
            section {
                height: 0px;
                overflow: hidden
            }
            section:not(:has(input:checked)) {
                height: 0px
            }
            section:has(input:checked) {
                height: 100vh
            }

<!-- ... -->
  <nav>
    <menu>
      <li><label for="home">Home</label></li>
      <li><label for="sysinfo">System Info</label></li>
      <li><label for="manager">Manager</label></li>
      <!-- ... -->
    </menu>
  </nav>
</header>

<main>
  <section>
    <input  name="tabs" type="radio" id="home" />
    <h2>Home</h2>
    <!-- ... -->
  </section>
  <section>
    <input  name="tabs" type="radio" id="sysinfo" />
    <h2>System Info</h2>
    <!-- ... -->
  </section>
  <section>
    <input  name="tabs" type="radio" id="manager" />
    <h2>Manager</h2>
    <!-- ... -->
  </section>
<!-- ... -->
</main>
``` okayits different but similar i guess
cloud knot
# neon oriole ```css section input { position: fixed; ...

yes, the point of these new selector types is removal of the need to add CSS classes just to represent something which can be done through other logic.

I mean most people stopped at basic + child selectors, maybe some of the pseudo classes; sibling selector is already too confusing for many. Attribute selectors is way above the level many people think 😄

drowsy elbow
#

Bruh. Chatgpt has no chill 😂

onyx tiger
#

im using ubuntu 24.10 LTS and on pgadmin4 im getting this error while trying to backup my databse. ive found a work-around but no fix, any of yall know whats happening? also hi, im new here

cloud knot
fading osprey
#

^^ also worth checking that pg_dump is present in that folder, since in some distros it doesnt seem to come with postgres for some reason

cloud knot
#

on Ubuntu 24.10 it is part of postgresql-client package, which puts stuff in that folder

fading osprey
#

gotcha, good to know

cloud knot
#

(possibly doable with wildcards, but i am not going to try to figure that out now)

slow coyote
#

I'm having trouble hosting a website on github

cloud knot
cloud knot
#

(and maybe you want repository to be private ? Up to you tho )

slow coyote
nocturne galleon
#

your index would be index.html

nocturne galleon
#

you can edit your repo by going to github.dev and using their vs code @slow coyote

#

you can also press period on your repo to clone it to that url

neat pond
#

hello i have a rasbary pi 4 that i installd a linx software and i forgot to install a network driver and now i cant fix the ishu i need help fast it is for a contest

neon oriole
# cloud knot yes, the point of these new selector types is removal of the need to add CSS cla...

well funny enough its the only way i can think of (what i did) to make tabs work when the label is somewhere other than the input, and the thing to be tabbed. if you go look 90% of them all have a css dependand on the number of tabs wich is something i wont do, adding a tab should not require adding css simple, then some others you find go like
you find it more like this:


.tabs {
  display: flex;
  flex-wrap: wrap;
}

.label {
  border: 4px solid #F00;
  cursor: pointer;
  color: #FFF
 
}

.panel {
  display: none;
  padding: 20px 30px 30px;
  background: #222;
  border: 4px solid #0F0;
}
 

.input:checked + .label + .panel {
  display: block;
}
``` ```html
<div class="tabs">

  
  <input class="input" name="tabs" type="radio" id="tab-1" checked="checked" />
  <label class="label" for="tab-1">1</label>
  <div class="panel">
    <h1>1</h1>
    <p>1</p>
  </div>
 
  
  <input class="input" name="tabs" type="radio" id="tab-2" />
  <label class="label" for="tab-2">2</label>
  <div class="panel">
    <h1>2</h1>
    <p>2</p>
  </div>
 
  
  <input class="input" name="tabs" type="radio" id="tab-3" />
  <label class="label" for="tab-3">3</label>
  <div class="panel">
    <h1>3</h1>
    <p>3</p>
  </div>

</div>
``` wich means the tabbed is a thing of3 things isn sequecne not a selfcontained unit, theres also one that uses anchors but that one has the downside that when surfing to the regular html site , no achor or tab is active, or you have to write your .htacces so it reqrites anchors aswell
graceful drift
fading osprey
#

the link is 404

#

looks like a private repo

graceful drift
#

@fading osprey should be changed now

cloud knot
neon oriole
#

golden rule write as few comments as possible , only the code that is out of place or looks weird where it is , should have a short comment for why it is the way it is , and why its there. , comments describing what code does would only be meaningfull to non programmers or to increas linecount artificially. if something took more than 30 minutes of research to get it working it deserves a comment 🙂

silk eagle
#

this is the extent of my commenting:

#

typically most of what i comment is math stuff so i can understand what a line is doing at just a glance 'cause my brain aint math so good

cloud knot
silk eagle
#

listen, PAL. listen.

#

it was either this or I convert it to a string and check the first letter

#

this seemed more slick

cloud knot
#

if that is pythoin, then maybe if 200 <= request.status_code <= 299: ?

#

or request.status_code in range(200,299) ?

#

(maybe 199,300, not sure about the outer edges)

silk eagle
#

range is always inclusive, exclusive i think so itd be 200, 300 maybe probably

#

i always have to triple check when I use range()

#

one-off 50% of the time

cloud knot
#

anyway, about the comments.
My recommendation is to make variable names self-explanatory (even if it means you will have a longer variable name) and to make methods with self explanatory names. No need for comments when the method and variable names themselves provide the commentary

#

i never did anything big in python. i think the only thing i ever did through it was interfacing with some small oled screen from Pi

silk eagle
#

ive recently been trying to follow proper naming conventions in python

#

mostly because i've gotten tired of using variableName because then variableNameName confuses me

#

so I've been doing variable_name and I'm always bad with the actual case names i think its snake case and then the former was camel case

#

but generally I like the snake case

cloud knot
#

ha, found it !

#

some small code using SSD1306 library

silk eagle
# silk eagle but generally I like the snake case

posting that as an example of not necessarily needing comments but rather needing documentation for a function so people working on a project can just hover it and see what it does instead of jumping to the function to find comments whenever applicable

#

if you're going to put comments on a function rather than a line of code, best to use the reference string stuff idk what its called I forget

cloud knot
#

that ws just a random output i made back then. ah, old times 😄

silk eagle
#

example

silk eagle
spring cradle
#

i2c :o

cloud knot
#

i only used Python for this because only libraries for it were for C or Python, and Python seemed simpler for me 😄

#

but anyway, that is the extent of my python coding ever, few tens to hundreds of code lines.

silk eagle
#

if its meant for people then python is always great for the "rapid prototyping; rapid development" stuff

cloud knot
#

but then with my array of knowledge, i could probably be relatively effective in Python within 2-3 weeks if i really needed to work in Python

silk eagle
#

yeah its pretty much english. once you have a decent understanding of computer science you're basically already top 30% of python developers

cloud knot
#

probably the biggest issue i would have with Python would be indenting and lack of brackets

cloud knot
silk eagle
cloud knot
silk eagle
#

really the indentation becomes a problem when people dont use the superior 4 space indents

#

you see, IDEs will convert your tabs into spaces. some people decide, "hey, what if I make my tabs 2 spaces instead of 4?" and then they put their filthy 2 space indents out into the world

#

and then other times you use tabs to indent in vim or something and vim isnt typically an ide so it wont convert the tabs to spaces

silk eagle
#

and you cant have tabs and spaces but you can have tabs or spaces to indent and thats why tabs are converted to spaces

silk eagle
weak glen
knotty python
#

I am trying to do something similar but whenever i toggle the button the emoji is under the circle

#

nvm i resolved the problem

neon oriole
# silk eagle but generally I like the snake case

i see allot of python code comming out of companies and they seem to use (and so do i) ```py

def This_Varies(fn):
'''
whatever
'''
def pre_fn(*a):
return a
def this_varies(*a,**k):
A=pre_fn(a)
return fn(*A,**k)
return this_varies

also what i started to see wich i also kind of liked is the use of ```
__s  instead of self``` frees up the actual name self 🙂
silk eagle
#

my stance is yeah I could do *a & **k and yeah I would understand what it is in reading it in the future, but having it setup like that would just generally make me unhappy with the code i'm putting out

#

like removing rgs and wargs from the variable names doesnt really add more to what I'm doing and it doesn't make the already-python code more efficient at runtime. i could do it to try and match the conventions of companies but honestly I'd rather my personal projects have my personal stylization, its a form of self expression to me.

neon oriole
#

i find ithat if you are also handling the args in a method and storing the args in the object , eg your typing an awefull lot amount of 'args' 🙂

neon oriole
#

the only sane way with white space in programming is :

  1. Indent with tabs (even if you use spaces convert to tabs in the end , since you know how much spaces you like but dont want to enforce that on your peers)
    + converting tabs to n spaces is allot easier and riskfree (when automating)
    - where as (?) spaces to (n) spaces is not riskfree
    + converting spaces to tabs is also riskfree since you know what the (?) number is
    + tabs offer a better way of knowing at what level of indentation something is , since there will be one and only one for each level, nobody does 2 tabs for indent they just double the tab width)
    - lines indented with tabs need context to know that verry same information since 8spaces is how many indents in ?
  2. allign with spaces (same deal ),
    - tabs break allignment if you change tab width so we dont want to force our tabsize onto anyone, but we do want to keep things alligned nonetheless
    - unfortunatly there is no editor i know of that lets you convert allignment tabs to spaces so you will have to get used to this if you used tabs here in the past , but its for the better (alternatively you can write code that adds this capability to your editor maybe)
    + spaces always have the same width so when spaced 4 spaces appart thing will remain 4 spaces appart and if the next line required 5 spaces to get that alligned to the 4 that wil always be 5
    - (starting from row1) whereas 3 letters and a tab (width 4) will only jump forward the sice of 1 character but if 4 letters + a tab are typed the size of 4 characters is added so depending on indentation with a varying width thins may end up all over the place if you do this
#

my ex bos had 1 exception to this he said:

If i get payed payed per sloc , i indent with vertical tabs (tabsize 8 )🙂

inner scaffold
#

yuuhhhh first year actually coding my JavaShitScript works

neon oriole
noble holly
#

any reason to go with a PCIe 4 or 5 gen ssd for compiling code?

#

can't find benchmarks

cloud knot
#

when is storage speed a limiting factor for code ? I would say never. You should maybe look at 4k write speeds, that might be more important for you (speed of saving small files)

noble holly
#

@cloud knot compiling? pretty significant

#

you need to read all those files and nvme ssds were a huge speedup

cloud knot
noble holly
#

right, and those speeds aren't maintained from what I can see

cloud knot
#

and sequential speeds do not matter that much for compiling, 4k read/write does, as most of the time you read and write tons of small files, not big sequential files

noble holly
#

right, I'd go even as far as to say most text files are around that area

cloud knot
#

so look at reviews of drives which do good 4k read/write

noble holly
#

any tips? been scouring the web and can barely find anything fitting

cloud knot
noble holly
#

thank you

cloud knot
#

seems like 990 Pro is the king ?

#

the rest, i don't even know how to interpret those curves 😄

noble holly
#

990 pro is still gen 3 right?

cloud knot
#

gen 4

#

but in the end, for most NVMe drives you won't notice much difference, usually the most limiting factor for me was CPU scaling of compilation (but then i do Java & Node.js mostly, so your use case might be more sensitive to drive speeds)

noble holly
#

also Java/Kotlin and Node (plus containers/vms)

cloud knot
#

node is usually single threaded, so typescript compilation for example (or stuff like Babel/Vite etc) will be bottlenecked by CPU. In Java it depends

noble holly
#

and the other interesting parts like Rust are probably more CPU intensive

#

js build times are the biggest PITA tbh

#

10s to transpile 20k lines of TS is pretty nuts

#

(3700X right now, upgrading to a 9900X this week)

cloud knot
noble holly
#

yeah, hobby project

#

don't need to touch my Angular project too much at work

#

so tl;dr you wouldn't invest 100€ more for a gen 4 drive?

#

going to repurpose my old machine for the kids and debating between buying the kids a 40€ nvme ssd or giving them one of mine and going for a new 140€ 2TB drive

silk eagle
#

well if you get paid an equivalent of, say, €50/hr (for the sake of making this math simpler) and your current compilation times are ~20 minutes and spending €100 on a faster drive would save you 10 minutes on each run, it'd take about 12 compilations to equal €100 of value in time. but also thats 10 minutes that you now no longer have to chill so there's a tradeoff here.

cloud knot
noble holly
#

thanks

neon oriole
#

python takes quite a while to compile to 🙂

hardy bane
#

how do i properly post code here without it being normal text or an image

silk eagle
#

tilde (~) squiggly lines but not shifted idk what they're called the tilde apostrophes not normal apostrophes

spring cradle
#

backtick/backquote?

silk eagle
#

that sounds familiar so probably that, might just be ticks

silk eagle
# silk eagle put `'s before and after

example:

def example():
  return [x for x in [not hex(bool(not x)) for x in [z % 2 == 0 for z in range(0,8)] if bool(not x)]][1:(len(__file__) // 2)][False:-True][0]
if __name__ == "__main__":
  print(not bool(bytes((example().as_integer_ratio())[1] * 2)[__name__.count(str()):False] != 0 != 1))
sick bronze
inner scaffold
frozen flame
spark temple
cloud knot
#

crazy people doing crazy things. Presenting you the reverse indenting style 😄

frozen flame
#

Back to hell where this belongs

peak acorn
#

You ought to be shot out of a cannon into the sun

cloud knot
silk eagle
#

ran out of indents have to make a commit indenting the entire file

neon oriole
neon oriole
spark temple
neon oriole
spark temple
#

Never worked in python but my understanding is that it was an interpreted language.

neon oriole
#

you can transpile it to c since its cpython after all so , and you can compile that c code

spark temple
#

I mean, most languages are built on C. lol

neon oriole
#

but most people dont because you dont have to but there are allot that do to, like big parts of Ableton Live are written in python and they just compile and ship binaries

neon oriole
# spark temple I mean, most languages are built on C. lol

no cpython is the c implementation so it uses c runtime eg , the interpreter is written in c, so in the end when running a python program it gets converted to bytecode like java and then executed , but you can just as easy not go the bytcode -> interpreter part but code -> c-code(with allot of overhead) -> binary https://nuitka.net/

#

most langs are ont dependant on c (even allot of them do require it lol , here goes my argument) what i think you mean is that languages evolved from c, but langs like haskell and ocaml technically can do without c runtime

loud storm
#

anyone here?

frozen flame
#

Beyond that things like nuitka exist to turn python into c code yeah

peak acorn
#

what moron in charge of json decided to not let you use underscores or something inbetween numbers 🤷‍♂️

#

dangling commas at the ends of things as well would be good I think

cloud knot
peak acorn
cloud knot
# peak acorn 1\_000\_000

i don't get it. Why would you put a number as not a number, but as weirdly formatted string ? Use string type, if you want to send strings. Or number type, if you want to send numbers. What you show is not a number, thus put quotes around it, and you are done. You can use any character then. "1$000$000" if you wish

peak acorn
#

its used all the time when writing big numbers, the whole point human numbers are written like 2,147,123

cloud knot
#

xs:decimal in XML Schema would kick your but for that type of 'number string' as well

cloud knot
#

It is not JSONs job to be a formatting tool

peak acorn
#

yah i mean obviously the right thing is i use a proper config file format

cloud knot
#

most formats deal with numbers as numbers, not formatted numbers. Is 1,000 equal to 1000 (USA) or 1.000 (most EU countries) ? That is why numbers are represented with decimal dot and no thousands separator, as that is formatting specific thing which doesn't belong into a data exchange format. You want formatted values, then use them as formatted values => strings

#

or make your own parser for your 'custom JSON with _ as thousands separator'

peak acorn
neon oriole
plush valley
#

hwat

#

_ as a delimiter?

#

Also why would you have a number defined as a string and formatted first? Why not just format it as it gets processed and displayed to a user (if it does)?

#

As suboptimal as it gets

silk eagle
#

i feel like ive seen _ delimiters for numbers in a language somewhere and it was scarring enough to be in my brain somewhere as a core memory i forget where though ill do some digging

#

it might be python actually

#

i remember it was used when storing big numbers in code somewhere while having it readable but not for data transfer

#

yeah makes sense that it was python, readability thing.

#

although this is fundamentally different, in my opinion, from using delimiters in JSON files

modest tartan
#

what programming laguge should i learn first i want to learn c# c++ and python

#

and what is the best way to learn for free

silk eagle
# modest tartan what programming laguge should i learn first i want to learn c# c++ and python

start with C#/C++ and then youll be able to learn python super easily.
best way to learn for free i would say:

  1. find some videos on the fundamentals, if it's your first programming language you'll want to familiarize yourself with variable types and general CS knowledge helps, stacks vs heaps, how bytes work, what a compiler does, etc.
  2. make some little projects to start - calculators, programs that read text/json/xml/csv files, do some googling to help out.
  3. increase complexity as you learn and try to keep challenging yourself.
cloud knot
#

as i said before, i have yet to see an exchange format which allows this. JSON doesn't. XML doesn't.

silk eagle
frozen flame
#

there were a lot of spicy conversations before the core devs even considered adding it

#

and realistically ive yet to see a valid usecase for hardcoding such big numbers

modest tartan
silk eagle
#

i did cs50 way back in middle school when I dropped out (to be homeschooled but technically this was done illegally and not properly at all), cs50 was basically my 7th/8th grade curriculum

modest tartan
silk eagle
#

well typically people get a rubber ducky to explain stuff to but i dont see why you couldnt instead get a rubber ducky to give it a handgun to intimidate you

neon oriole
silk eagle
#

this is fair but also its hard to expect people learning this stuff to have even the slightest idea of how to go about writing stuff for microcontrollers. keep in mind, average person doesnt know what an IDE is.

#

jumping that far into the deep end will scare away most people who are just trying to dip their toes in and see what they wanna do since not everyone is gonna be a 1337 20D3R 10Xer (that is to say some people prefer a different pace at different places in the stacks and its important they find out where they wanna go before they burn themselves out on learning how to make their esp32 flush a toilet)

modest tartan
#

ive used a aurdino and a raspberry pi at school

plush valley
cloud knot
# plush valley

today i seen a tweet showing one of the stupidest metrics in software development. Basing performance on number of PRs submitted

cloud knot
plush valley
#

Make a PR for every commit lol

cloud knot
plush valley
#

75 and 69

cloud knot
#

as someone calculated, with 40 hour workweeks, that guy did around 1 PR per hour

plush valley
#

REALLY?! Holy shit. You consider that low!?

cloud knot
#

it all depends on context, bugfixes, sure, New development, one PR per hour is sus

plush valley
#

Me over here rewriting config files with built in documentation and proper var defines gonna need a raise I guess

frozen flame
#

id be so fired there

plush valley
#

Theres this one PR someones been working on for 2 years

#

Its a massive rewrite of some core shit

cloud knot
# frozen flame mfw ive been working on a single pr for the last 3 months

that length of feature development/PR would be only brand new project/full rewrite - but even those would be commits/PRs against a separate branch.

I mean sure, i have days where i fix multiple reported bugs in 15 minute cycles (read the bug report, bug is obvious, fix one line, test, commit), but more often than not the cycles are full days (1-4).

frozen flame
#

i mean yeah i'm developing a push notification server from scratch that properly integrates with the rest of our setup and properly handles scaling to huge loads

midnight wind
#

kinda funny how in my job PRs mean problem reports

#

don't want PRs

peak acorn
#

I gotta start looking for a new job soon 😔

#

I am not looking forward to it at all

#

The money just ain't good enough

silk eagle
sick bronze
torpid relic
#

Starting a new channel, just to talk about homelab and development. So I made a quick nodejs app that registers usb devices and copy the files inside of it directly to my NAS. So I can just plug it on a usb hub dedicated to my ProxMox instance and it will offload all the raw iPhone 15 pro log footage recorded on an external ssd very quickly 🙂

It also sends nice progress messages on Telegram.

peak acorn
#

oh iphone 15 video

torpid relic
#

Yep. Helps to get all the iphone log footage into my Nas (I edit all the videos directly from it)

#

That way I can saturate the nvme speeds on both ends CU 👍

cloud knot
#

man, i love the way Apple's CDN caches Apple Developer documents 😄

silk eagle
#

I just saw something in my email that looks like the most wild and elaborate SE attempt ever

#

im assuming how this worked is they:

  1. created fake linkedin job postings to get applicant emails for specific positions
  2. created a fake business website and sent emails about setting up interviews (to a company I never applied for) with generic openings on their /careers/ page for literally every single position you can think of
  3. office addresses on their site as addresses in large cities with no suite #, floor #, etc, and the buildings are typically a retail store completely unrelated to the fake business (not even a ghost-mailbox like I expect)
  4. end goal is I guess to get either personally identifiable information or to get enough information for identity fraud or such
#

and the domain being registered a month ago seals it for me

steady dawn
rancid nimbus
#

Hello, stupid problem. I have a python module I am attempting to install on the system level. I see it has an import imp which is deprecated and does not work on python 3.12. What is the best way of fixing this?

simple temple
#

man chatgpt is incredible.

I like download managers for bandwidth limiting but dont need literally anything else from them, so I looked into aria2 and heres what I came up with as a way to run it conveniently.

#function dlfilelimiter {
#    aria2c --max-overall-download-limit=2M 
#}
#Set-Alias dl dlfilelimiter

so I give it this dumb alias and tell it, "can you revise this to wrap the url I paste in quotes"?
it makes this

function Download-WithLimit {
    param (
        [string]$url,
        [string]$speedLimit = "2M"  # Default speed limit of 2MB/s 
    )

    # Ensure aria2c is installed and available
    if (-not (Get-Command aria2c -ErrorAction SilentlyContinue)) {
        Write-Host "aria2c is not installed or not in the PATH." -ForegroundColor Red
        return
    }

     # Remove any accidental leading or trailing spaces from the URL
    $url = $url.Trim()

    # Build the aria2c command
    $aria2Command = "aria2c --max-download-limit=$speedLimit $url"

    # Execute the command
    Write-Host "Downloading from $url with a speed limit of $speedLimit..." -ForegroundColor Green
    Invoke-Expression $aria2Command
}
Set-Alias dl Download-WithLimit
#

thats nuts just how well it interpreted what I wanted from the alias. And made this modular and error checking script for me thats better in every way

#

thats just so cool, this thing can really enable a code illiterate idiot like me get a taste of the life of a poweruser

silk eagle
#

chatgpt: complicated solutions for simple problems

cloud knot
silk eagle
#

maybe this was all an elaborate scheme to get a better solution here

cloud knot
#

to be fair, his solution is about string manipulation mostly

cloud knot
plush valley
#

Im loading a database right now of all phone number switch data and its taking its sweet time

plush valley
modest tartan
#

whats the most engaging c# tutorial

peak acorn
plush valley
peak acorn
#

damn lmao

plush valley
modest tartan
tardy willow
silk eagle
# tardy willow Thoughts https://codepen.io/Oscar-the-lessful/full/jOggRxW

the little circle boxes with stuff in them beneath the "Start Learning" button make me uncomfortable (why do they exist and also why do they have an effect when I hover them). the arrow in the bottom right to scroll to top doesnt go away if you're already at the top. i like the idea of the background having some color but tbh that shadow thing looks like someone sat on blueberries and it makes the center button (and "GCSE" text when it wraps) have uncomfortable contrast. also center button should probably have cursor: pointer

#

i think the light purple + outlined text makes the GCSE hard to read and this is a bit clearer to see when you look at it with adjusted contrast (this is +40% contrast where the text is basically invisible)

#

also not a designer so this is just my nitpicks

tardy willow
#

Thank you.

#

My goal for the circles was to show the relyable and budget service provided.

weak glen
#

Also, I believe you want to drop the apostrophe in "GCSE's". I could be wrong of course but I think that would make it look more professional. You might even want to drop the "s" entirely(?) but I'm not as sure about that one...

tardy willow
#

you may be right on the apostrophe but the s i think is correct as you take multiple GCSE subjects

tardy willow
cloud knot
plush valley
#

noooo

cloud knot
#

and is probably going to make mistake 20% of the time at least

silk eagle
#

the amount of fingerprints on that screen

#

on what does not seem to be a touchscreen device even

#

is what really grinds my gears

#

and you know maybe its reasonable maybe im the crazy one maybe people touch their screen with their greasy hands to point things out.

#

but I feel, in my feelings, that you could at least wipe the fingerprints off with a microfiber cloth or maybe not use the greased display in a room with the most possible glare off the screen

#

I feel that it's a problem, I feel.

cloud knot
#

this would drive me crazy if i would have to debug an issue like this https://x.com/hnasr/status/1861570729600483794

Was chasing a failure in a Postgres client where the connection is lost after 90 minutes. Both client and db are on Windows.

I ended up on Cisco official doc to fully understand what was going on.

This one is interesting.

silk eagle
#

i cant say i wouldve known to even check for that

#

i woulda assumed it was just a me problem and bandaid it up

livid folio
plush valley
silk eagle
#

it's accessed once a week but that access needs to be as fast as possible because that connection syncs the system clocks across every machine in the hospital and the software for life support systems doesnt work if the clock doesn't match 'cause the hospital is trying to meet green energy guidelines by 2035 so it contacts a 'master clock' dell optiplex in the basement to see if it should still run this second. and they dont use a time server because their proprietary OS doesnt support NTP (they sync their clocks via postgres (the time is stored as a string of letters that has to be converted to unicode ordinal values which adds up to a unix timestamp))

plush valley
#

What the FUCK

#

this scares me

#

Life Support scheduling relying on a DB Synced Clock

cloud knot
slate pecan
#

ah thanks, appreciate it

slate pecan
#

Ive been using React + Vite for quite some time. Ive been thinking about moving one of my projects over to vanilla js + vite but I just know I'll end up writing a very simplified framework to make that possible in the process. Any frameworks/libraries yall use for client side rendering and/or hydration?

#

For context the project im rewriting I did so back in mid 2022 and made some choices I regret (ie using react-maps-gl instead of just using a useRef() with maplibre-gl). My skill has improved quite a bit so I was planning on rewriting the site anyways (less so for performance reasons, more so for ease of development) and thought that possible also using a different framework in the process might be a good idea (the only other framework I have used majorly is Vue, which I do through a contracting gig I have)

cloud knot
#

they added deferrable views in Angular 17, now in Angular 19 they added developer preview of incremental server side hydration etc

slate pecan
#

Ive thought about using Angular, I'm just not 100% sure how much (or if) switching to another framework would be a benefit. Ive used it in the past and TBH its syntax does make me go "huh". Also tbh im not planning on doing any sorta server side rendering to keep my costs as low as possible.

cloud knot
keen copper
#

what is my luck

#

found a fucking SDK bug by accident

acoustic pine
#

idk how the fuck to update sqlalchemy json so i created this monstrosity

class Cache(Base): 
    __tablename__="userMessageCache"
    origin = Column(Integer, primary_key=True)
    activeSessions = Column(String, nullable=True)
    globalChatTask = Column(String, nullable=True)
    activeModel = Column(VARCHAR(1), nullable=True)
    webhook = Column(String, nullable=False)

Base.metadata.create_all(engine)

def endecoder(obj) -> Union[list, dict, str]:
    if isinstance(obj, list) or isinstance(obj, dict):
        return str(obj)
    elif isinstance(obj, str):
        return ast.literal_eval(obj)
    
class CacheManager:
    def __init__(self, origin):
        self.Session = sessionmaker(bind=engine)
        self.session = self.Session()
        self.data = self.session.query(Cache).filter_by(origin=origin).first()
        if self.data is None:
            createData(self.session, origin)
            self.data = self.session.query(Cache).filter_by(origin=origin).first()

    def change_data(self):
        self.session.add(self.data)
        self.session.commit()
        self.session.close()
#

if anyone knows how to modify sqlalchemy json please do help

slate pecan
#

i forgor 💀

silk eagle
rose horizon
#

hello, is it a right place to ask git and SSH related questions?

acoustic pine
short oar
#

Any advent of code private leaderboard on this server? 🙃 If not, we should make one

limpid reef
simple temple
#

found a new text editor and really liking it.

its like notepad++ in speed, customizable as vscode, portable and full multiplatform configs.

robust adder
#

is this a place one could get help with coding in java?(if not ill delete this) I got a project and I can not for the life of me get my code to work. Im on java university course so its not super advanced for people who know what they are doing. Any help would be appreciated

rose horizon
#

does someone have a guide or something to setup a C/C++ developpement environement in Linux ( WSL Debian( terminal only), and Raspberry pi 4) . Specifically configuration of project like generating important files, and compiling of project...etc. i'll be saving the code on github and then just pulling it on whichever system i want to work and the push at the end.

#

i was thinkin maybe VS code or something for code modifications since both WSL and raspberry can launch VScode

#

but i'm not sure

robust adder
#

@short oar the project is to make a sudoku solver with certain criterias and one of them is to stop running and give an invalid message if it cant be solved. My problem at the moment is that when i make and invalid sudoku it just freezes and never stops loading OR i get an invalid message (with the code changed ofc) but it happens with any input I do even if its possible to solve

spark temple
silk eagle
#

theres also non neo neovim called non neo neovim or vim

#

but i like neovim cause its less intimidating to me as a person who doesnt want to learn a bunch of moon runes

simple temple
# silk eagle https://neovim.io/

-- Save with Ctrl + S
map("n", "<C-s>", ":w<CR>", opts)
map("i", "<C-s>", "<Esc>:w<CR>a", opts)

-- Quit with Ctrl + Q
map("n", "<C-q>", ":q<CR>", opts)
map("i", "<C-q>", "<Esc>:q<CR>", opts)

return M

#

Yeh. Im well familiar with it

#

I ended up not adapting to it very well.

#

But I will admit it can be a very pretty (by means of minimalism) text editor and the community around it has made it into full blown cross compilation IDE levels

fading osprey
#

neovim is a solid editor if you actually put in the time and effort to learn how to use it. I say this as someone who has been putting in said effort and actively enjoys using neovim, aside from the occasional hiccup forgetting how to do something (or just not knowing and wanting to find out) in which case, a quick google search and you're back on track

#

not having to move my hands off my keyboard is a big win though, especially when I can do almost everything without moving my hands around the keyboard to press function keys for example

hollow basalt
#

ok

frozen flame
#

vim users try not to talk about vim challenge

silk eagle
#

is there a vim plugin to make it nano

#

vim users everywhere have felt a disturbance in the force

plush valley
silk eagle
#

its perfect

#

there is an active pull request

plush valley
cloud knot
#

no views, no sequences => not a database

#

i mean sure, some of these things are hard on distributed database, but still, it is not mentioned

fading osprey
#

"behaves comparably" yeah, if you dont want to use any of the real features of an actual database

silk eagle
#

saying they have identical behavior for "most supported features" but not json(b) is crazy

#

'yeah by the way the db doesnt support integers, you have to put them as text and then convert to int whenever you use the value'

frozen flame
silk eagle
#

what do yall know about this cursed boolean indexing of a tuple in python because it doesnt have value = bool ? 1 : 0; equivalent as far as i know

#

example

cloud knot
#

it's literally just a PostgreSQL wire protocol compatibl nerfed SQL database unable to do majority of basic SQL features. But hey, it's distributed

#

alsoi tough luck if you want a different charset than UTF-8 (not that big deal), and C collation (RIP)

#

A transaction cannot modify more than 10,000 rows, and this limit is modified by secondary index entries.

silk eagle
#

you can also only have one db per cluster

cloud knot
#

in short, it's a joke unless you really need that distributed feature and you don't need any advanced features and never query big datasets

plush valley
#

I use Views, Materialized Views, The prefix extension, they also have AWS specific extensions

#

Sequences, json,

#

this is right off my instance

cloud knot
plush valley
#

OOooh

#

Yeah go figure since DSQL is bastardized version of high availability

#

yeah I see it now

frozen flame
#

there it goes

drowsy elbow
leaden gorge
silk eagle
#

itea

cloud knot
cloud knot
#

aparently it is used by supabase ?

fading osprey
#

yeah it is

plush valley
#

I use it for Wireline information

cloud knot
plush valley
#

Instead of using middleware to expose the data as a restapi that I custom make, this makes it easy

#

stuff like this which has dialplan info

cloud knot
#

it is still worse than the standalone SQL Developer, but for basic stuff it is nice

plush valley
#

because fuck XML

digital sable
#

is it valid for postfix expressions to have a number at the end?

graceful drift
#

i think my code is too big for a docker container i get this when i build ```

PS C:\Users\Rapter\Desktop\code\projects\discord-bots\rappy> docker push rapter001/rappy:latest
The push refers to repository [docker.io/rapter001/rappy]
d69b1641203a: Layer already exists
a0940ad1a79b: Pushed
46d545cce5be: Layer already exists
0c49c3fb9b86: Layer already exists
e6130f860675: Pushed
a2a897de8066: Layer already exists
1643f4387fa7: Retrying in 1 second
f9dad8dbdcdb: Retrying in 1 second
370bf931ae68: Pushed
161799771763: Retrying in 1 second
d66018be7911: Retrying in 1 second
9a5e5d7caab5: Retrying in 1 second
net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
PS C:\Users\Rapter\Desktop\code\projects\discord-bots\rappy>

dense sedge
#

anyone trying to make something in cython, dm me

ashen gazelle
#

hi! is there any way to make output assemby file(NASM type) in GCC?

harsh trench
#

New Quantum chip and an awesome progress 👏

https://youtu.be/W7ppd_RY-UE?si=baw_9DBw0iFV4JCi

The Google Quantum AI team is proud to announce Willow, our latest quantum chip. Willow has state-of-the-art performance across a number of metrics, enabling two major achievements.

First, Willow can reduce errors exponentially as quantum processors scale up using more qubits. This cracks a key challenge in quantum error correction that the fi...

▶ Play video
keen sorrel
nocturne galleon
#

hello
I was wondering if In Visual Basic
im trying to make a script that gets the inputs from the user and saves them in a 1d array
then I want to make a checker thing that sees if that value is already in the array (duplicate)
I’ve tried putting “if numslist(I) = numslist
but I have no clue more than that
thank you

drowsy elbow
#

You could always change your array to a System.Collections.Generic.HashSet<>. This is a collection, which has the "Add" method. It will return a boolean which returns true if it is added, and false if it was already in the collection.
This is assuming you're using vb.net

vestal crest
#

ive been tricked... i was told there would be a hackathon where we get to work on "anything you want" at work... and its been turned into a sales pitch for github copilot from some outside people, trying to trick us into using copilot

#

something worth having shouldnt need to be SOLD to people, people should just want it, and want to buy it

#

and hes giving a very hard-sell sales pitch

vestal spire
#

I'm writing an android app which has a tts feature which receives messages from a server.

I'm testing it out in my emulator and the tts worked fine. However, when i install the app on an android box to connect to my tv, the tts acted really weird; delays, lower pitch, audio cut off sometimes, then the pitch and speed ramps up after a few consecutive messages. This issue doesn't happen when i connect a small usb speaker to the android box or pass audio to my laptop via adb. As far as i tested, it only occurred on the hdmi output. I'm guessing it's the sample rate or bitrate being higher than the box can process smoothly? If so, is there a way to config my tts in code to reduce the audio "quality" maybe, to fix this issue? I already have pitch and speech rate set in codee

drowsy elbow
#

I waited 5 minutes on a response from this a.i. model........ lmao

hollow basalt
#

worth the wait

tardy willow
#

What language would you recommend learning to end up making a game engine in?

silk eagle
#

and if it aint the right choice somewhere down the line, you now know structural engineering and programming languages are legos

#

or i guess you know computer science and programming languages are programming languages

neon oriole
cloud knot
silk eagle
#

but for those few years, we'll experience mild inconvenience like we've never seen before

#

Y2K level of mild inconvenience, random services will stop functioning in obscure ways

#

what if the cobol guys arent there to manually set clocks back on ATMs? 1 word: pandemonium
what if the cobol guys arent there to adjust federal tax rates at your bank? 1 word: pandemonium

fierce idol
#

ever had to deal with Meta APIs? I've got a webhook for WhatsApp Business and Meta's servers sometimes resend messages for no good reason without the person that wrote the message doing anything

#

... oh i'm seeing those requests they made had status code 499... that'd explain why meta resends the message since it believes it was never processed by us... but that would mean that the server must've taken too long to respond or the Meta Servers being impatient af

neon oriole
# cloud knot the COBOL thing is mostly down to "don't touch it if we don't have to" and not "...

by whom, i know companies who actively are searching for young people to learn cobol just so they can convert that code to something new and they cant find any, they even dropped the "some programming experience required" from the requirements and are basicly offering you a full time pay to first learn cobol and then a second language (forgot wich one it was they wanted to convert to wasnt c ,c++ or python i would have remembered that ) and according to a video i saw recently: https://www.youtube.com/watch?v=qNytWcW38us ,would suggest that its still actively maintained 24/7 otherwise the thing collapses 🙂

Recorded live on twitch, GET IN

Article

https://ezalii.substack.com/p/interviewing-my-mother-a-mainframe
By: Tom Jordell

My Stream

https://twitch.tv/ThePrimeagen

Best Way To Support Me

Become a backend engineer. Its my favorite site
https://boot.dev/?promo=PRIMEYT

This is also the best way to support me is to support yourself b...

▶ Play video
crisp talon
#

Hey you guys 🙂 - Question: Are there any courses on YT or Udemy that you guys can recommend on "Getting started with GitLab and migrating projects to it and learning the pipelines" from a Dev/Admin perspective?

Context would be:
Having Bitbucket or Github as a base with totally different deployment-files and learning the basics in GitLab, learn to pipeline and to restructure all this. Wishfull would be focus on the topic and not like 1 hour off-topics on how to setup AWS and Environments on random Cloud-Providers. Would be hosting GitLab myself as the CE/EE-Free-Tier version.

drowsy elbow
vestal crest
crisp talon
neon oriole
#

what does git mean with ```
CRLF will be replaced by LF the next time Git touches it

fading osprey
#

it means that rather than your file using CR + LF to indicate a line ending + new line, it will use the LF character instead.

CR is Carriage Return - used to return the cursor to the start of the current line
LF is Line Feed - used to append a new line below the current cursor position.

windows likes to use CRLF as its line ending convention, whereas most unix-compatible systems use LF, git being made by Linus, original writer of Linux, which is a unix-compatible OS means that git also prefers LF convention over CRLF, and so it will replace CRLF with LF to minimise the number of changes your commits generate, you can change this in the git config but I don't recall the command off the top of my head

Hope this helps 🙂

cloud knot
cloud knot
#

this way you still run the pipelines in context of the actual project, but every CI/CD related artifact outside of CI variables set in project settings is inside the CI/CD project instead

hollow aurora
#

aws vs digitalocean for static website?

midnight wind
#

cloudflare pages works great for free

crisp talon
cloud knot
crisp talon
crisp talon
hollow aurora
hollow aurora
limpid reef
# hollow aurora and for Saas based applications?

Depends on what the SaaS website is doing and how it's written. VPS's like Digital Ocean or Vultr are a great place to start messing around with your code in the real world, but if your SaaS website is overly complex you may end up needing to go with something more performant.

hollow aurora
limpid reef
hollow aurora
limpid reef
#

Suggestion is to always rest your code. How you test it depends on the code's requirements.

jade crane
#

Alright Doods. I'm at hour probably 3 of debugging a regex. At this point I'm lacking some critical information as to why it doesn't/isn't working, because it works on every regex tester I can find.

here is my regex: /(?<=\n|^)(\d+(?:\.\d+)*)(?=\s)([\s\S]*?)(?=(?=\n\d+(?:\.\d+)*\s)|$)/gs

it's designed to capture data formatted like so:

1.1 (Insert header here)
(insert body here)
1.2 (Insert header here)
(insert
body
here)
1.3... Ect

In my regex101 tester, it works totally fine!
In Typescript, using es2018, it doesn't match anything at all. Removing "(?<=\n|^)" results in the first set of numbers to matching to match[1], while the second capture group containing the ENTIRE rest of the body.

What am I doing wrong?

#
// Read the contents of the input file
const data: string = fs.readFileSync(inputfile, 'utf8');

// Adjusted regex pattern to capture number sequences and text
const regex = /(?<=\n|^)(\d+(?:\.\d+)*)(?=\s)([\s\S]*?)(?=(?=\n\d+(?:\.\d+)*\s)|$)/gs

// Define an interface for the JSON object structure
interface JsonObject {
    number: string;
    text: string;
}

const matches = data.matchAll(regex);

const jsonObjects = [];

for (const match of matches) {
    const jsonObject = {
        number: match[1],
        text: match[2].trim()
    };
    jsonObjects.push(jsonObject);
}
// Write the JSON string to the output file
fs.writeFileSync(outputfile, JSON.stringify(jsonObjects, null, 2));

console.log('The data has been converted to JSON and saved to the output file.');```
limpid reef
# jade crane Alright Doods. I'm at hour probably 3 of debugging a regex. At this point I'm la...

I will be of no further help as I left programming behind when the Javascript wars began in 2012, but I'd wager a guess the issue involves how "Positive Lookbehinds" work in certain browsers / languages.

jade crane
#

D:

limpid reef
jade crane
#

I understand that, I think I mostly mean that I wish it did haha

#

It's very odd still becaue, lets say I use /(\d+(?:\.\d+)*)(?=\s)(.*?)(?=(?=\n\d+(?:\.\d+)*\s)|$)/gs

From what I can tell on regexr.com, it captures all the groups I need as I need them. Yet, in my code it doesn't appear to get any matches

#

Also I appreciate the input, even if you don't want to help with JS/TS related things :P
I'm puzzled.

#

ha. It worked first try with the same REGEX in Python..

silk eagle
#

and i think sometimes different browsers can have different behavior if its being processed in the browser

jade crane
jade crane
#

I'm using TS as just a scripting language cause I'm weird

lament bridge
#

Did anyone ever tried to make a website for PSP?

(obviously without HTTPS)

I am trying to make a simple HTTP Call with XML HttpRequest but it does not work, I also have no way of knowing if there is any error, as the PSP just have no developer console.

cloud knot
#

"we are 19th months into 6 months until AI takes our jobs" so true 😄

subtle sand
silk eagle
#

dear god

spark temple
# subtle sand

So, not sure I’m really understanding. It looks like you’re just trying to append the picture you want to the body?

You can do something like;

var allImages = document.getElementsByTagName("Imgur");

for (i = 0; i < allImages.length; i++) { 
  allImages[i].src = “path/to/image”; // Now this can be a remote image you reference to or it has to be a path relative to the site you are on. Or there could be a path relative to the Chrome plugin you are building (haven’t done this but would lead you to what you’re looking to do).
}
silk eagle
#

I think the idea they have is to overlay an image on all the images on a page

spark temple
#

The issue is in the manifest.json.

silk eagle
#

towards the end of your log file I'm seeing:

img.onerror @ content.js:8
invalid/:1  GET chrome-extension://invalid/ net::ERR_FAILED

and looking into it, you might not have permissions to access a .png resource with the extension,

"web_accessible_resources": ["*.png"]

in the manifest.json may fix it

spark temple
#

You can’t just say <all_urls>

spark temple
#

Ah, it’s under the special cases. That’s weird.

#

But regardless, not seeing a file being referenced in the manifest.

#

Can just set the resources in the web_accessible_resources object.

subtle sand
wraith turtle
#

ughhhh, some days we want to just throw the transformers python library XD

#

had the speech to text server in python working and transcribing audio properly.... then made a bunch of changes to start implementing transcription streaming and our pc decided to crash at that moment..... so now it no work and no ability to undo because undo buffer is gone 😭

silk eagle
#

this feels like a problem version control can fix

wraith turtle
#

yeah.... kinda our own fault 😅

drowsy basin
#

So I'm currently in the process of making a MvM-inspired Online PvE game (Still very early. Only a very basic prototype & some conceptuilization stuff done ATM)
1 of the main things I'm trying to figure out from the very start is optimization. 1 of the main appeals of this game is its an online multiplayer game that could run on basically anything. Any cheapo Computer/Phone/Rasberry Pi, most retro consoles (As long as they have SOME way of connecting to the internet), most random smart appliances, etc. Basically the kind of game Bringus would LOVE. But even still, the game will still be 3D in movement (Think smth mostly along Hack n Slash or 3rd Person Shooter, depending on the class being played), so...how would I get it to look aesthetically pleasing across so many generations of hardware with the limitations of the less powerful gens in mind most, without any of the visual jank games from said gen tend to have? I do have a general aethetic direction/theme, but as for translating that into in-game visuals...I'm at a bit of a blank

onyx mirage
#

Could someone give me a hand later tonight with c# project I’ve been working on. I’m stuck on one part but have everything else working fine

runic drum
#

how hard would it be to make a programming language?

agile rain
#

I'm looking to learn a new programming language. I currently know PowerShell and I know the next logical step would be to learn C#. But I want to move away from Windows/Microsoft based development to a FOSS & linux-based/OS-agnostic development. I hate Microsoft with a burning passion and am trying to remove it from my life as much as possible.

Should I side-grade to Python, or should I learn a lower level language? If so, what lower level language? Rust?

Most of my work (https://github.com/alexlarner) has been in SDK & API creation for use in larger automation, which I also build. I prefer backend/command-line tool development.

zealous sky
#

Hi guys, someone could help me out to deploy correctly the AMD IGPU and NPU for inference task’s?…
Im not a python expert and just started learning about Anaconda envyromenta

frozen flame
frozen flame
frozen flame
#

May the gnomes steal your pillow when you aren't looking

runic drum
red mulch
#

What is your language going to do? What makes it different?

runic drum
red mulch
runic drum
brazen mirage
runic drum
brazen mirage
runic drum
#

Oh

acoustic pine
#

accessing the DB for every message is such garbage optimization for my program linusFear
should defo add proper caching later on but it's low on the priority

#

the class name is a lie

#

can't be bothered to change it yet

hollow basalt
#

pk

distant tartan
silk eagle
#

progress on my part price scraper version 9000

  1. error dumps (pictured is not a typical error, that's non-critical and I typically just use the error dumps as a good way to see when CSS selectors may be invalid for a vendor). this project uses playwright, occasionally I might run into issues that would be best solved by having screenshots of the page when they happen so there's also support for that (not typically used here because its not very performant)
  2. big ole logging (this was a grievance of mine from my last version of this project)
  3. super dynamic kwarg'd (sort of) selector setup for vendor configuration. I have, for example, selector types like price, misc_price, & additive_price. selectors of type price will overwrite the listing's price. so if I have, say, the "main" price, then a "after discount" price, whichever is configured latest will overwite the previous. or if I have a shipping price/etc that I want to add to the listing's main price, I can set it as an additive price which would parse the price from the element and add it to the final "main" pricing. and misc_price just parses a price from the element and tracks it separately
#

one roadblock with keeping track of shipping prices is that 99% of retailers will have the shipping price change depending on your region because thats how shipping works. so i've pivoted that into just a "yeah its free shipping" indicator

clever schooner
#

C++ or C# is good for making game engines

zinc lynx
#

Is here a dev that want to learn and get paid a bit to help my fivem server back up it got nuked by a child dev I would appreciate it

white pecan
#

Do not jump to c++ unless you're ready for a lot of crap. Imo, you should learn C first to learn the basics of memory management, data structures, not using oop design. Etc

white pecan
zinc lynx
white pecan
#

I'd recommend an hourly local backup and a nightly off-site.

zinc lynx
white pecan
zinc lynx
#

Most problems are like tables that are need to be added to the database idk a lot about that

white pecan
#

I see, intriguing.

zinc lynx
#

Yes database tables

white pecan
#

Should be as easy as sshing into the vps and mv all the database tables into their respective directories?

grim flint
#

https://craftinginterpreters.com/ is a pretty good place to start (note: scroll down to see the web version for free), it actually builds the same language twice but in two different ways

#

both versions implement "interpreters" for a language called "Lox" that the author of the book invented.

  1. first one is a trivial "tree-walk interpreter" that just parses and then directly interprets the program, it's slow but it's also stupid simple and gives you a mental model for how a language actually works internally
  2. the second is a bytecode compiler/bytecode interpreter that is closer to how most real interpreted languages work, performance isn't a huge focus but this approach is far easier to optimize than #1
#

https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html is also pretty good, although it does assume you understand some of the basic parser theory already (which the first book does a very good job on). It builds a simple LLVM frontend for another author-invented language, this time compiling to LLVM IR (which is then compiled to target-specific machine code by the LLVM framework)

#

beyond that, textbooks are your best bet for fully DIY compilers

#

your first language is going to suck, and if you keep at it you might have a decent language by your third or fourth real attempt 🙃

#

its incredible for learning though

nocturne galleon
silk eagle
#

lot of hovers

nocturne galleon
#

I don't understand why people still dev with a white bg

#

it makes me click off the site instantly if they don't have darkmode

#

or i just css edit it with userstyles

silk eagle
prisma surge
#

Hello guys. Anyone can give insight on how to setup an email using a subdomain as address?

frozen flame
#

The email server isn't tied to the same subdomain (usually people have mx1.domain.com as their email server, while using @domain.com or any other subdomain)

cloud knot
half dome
blissful locust
#

experimentation about combinig pc funcionalities to enchance performance of the pc? some being?

silk eagle
#

also, if the PC is upside down, the fluid in the capacitors can situate at the top and that will allow the inductors' resistors to capacitate at higher frequencies

#

another thing, the further away from earths core your PC is, the better the performance. this is due to newtons first law of centrifugal force

#

so ideally, put your PC on top of a mountain or tall building, but your roof is fine

cloud knot
frozen flame
#

But it's also not just a skill thing - there's some luck to what IP your server gets and whatnot

cloud knot
# frozen flame I've been running mine fine for ~5 years now
frozen flame
#

Well I'm saying you clearly can do it, and I'm not the only one

half dome
#

yes, what is described in the article is sad and I agree with the author on the proposed solution, but until my IP gets blacklisted and I'm unable to do something about it I will continue to host my own email server

north vale
#

as someone that does run their own mail server, it's less luck and more so make sure you follow every rule to a tea and don't mess up anything at all or you are blacklisted. realistically it's probably fine if you proxy your email via something like AWS SES

sacred ermine
#

Hi folks, do you use a TypeScript SDK for the Spotify API? I tried the official (https://github.com/spotify/spotify-web-api-ts-sdk) one on GitHub, but I can't verify the code I'm getting after the callback during the authorization. Are you also using this SDK, another one, or the API itself?

I tried something like this:
async function authenticateSpotify(): Promise<void> {
const sdk = SpotifyApi.withUserAuthorization("asdf", "http://localhost:3000/spotify/callback", ["user-read-private", "user-read-email"]);
await sdk.authenticate()
}

And then I got the correct code and state in the callback URL, but I don't know how I should redeem the tokens with this code. Normally I would do something like SpotifyApi.getAccessToken(code) but I can't find a function that does this. However, before I implement it by myself, I want to ask you, because I can not believe this SDK does not support this and there is no other big SKD for Spotify.

GitHub

A Typescript SDK for the Spotify Web API with types for returned data. - spotify/spotify-web-api-ts-sdk

raven iris
#

Because for only client side you are complicating this way too much

sacred ermine
# raven iris Are you building a client side and server side application?

I thought I had to build it server-side because I have a secret. I try to integrate a small mechanism to start/pause the music from my site, but if there is an easier way to achieve this, I would love to hear your idea. I think the easiest way would be using an API key, but Spotify does not provide simple API keys (or I haven’t found it).

raven iris
#

Then you use the SDK variable to interact with Spotify like normal

#

And client side

SpotifyApi.performUserAuthorization("client-id", "https://localhost:3000", ["scope1", "scope2"], "https://your-backend-server.com/accept-user-token");
// Alternatively if you want to perform your own custom post-back
SpotifyApi.performUserAuthorization("client-id", "https://localhost:3000", ["scope1", "scope2"], (accessToken) => { /* do postback here */ });
#

What stack are you using btw?

sacred ermine
#

Thank you; I’ll try it later. 🙂 I'm working with Nuxt3 (Vue) and use the server directory in it for server-side rendering. The rendering mode for the pages is CSR.

raven iris
#

I usually use Next.js
I love how the server and client side works

empty pier
#

hey does anyone feel like a breakdown

#

past me is an asshole

blissful locust
#

anyone code windows 11 to GAMING PERFORMANCE?

fickle storm
hollow basalt
#

Someone knows

limpid reef
# fickle storm https://github.com/Sorrow446/Beatport-Downloader somone knows how to install th...

Anywho, I wouldn't trust my login credentials to a third party script without first) reviewing every line of code to ensure it's not stealing my credentials and second) verifying that using the script is compliant with the BeatPort Terms of Service. They have their own way to download multiple tracks anyway.
https://support.beatport.com/hc/en-us/articles/4412668129428-How-do-I-download-multiple-tracks-at-once

frozen flame
#

Ain't no one following tos these days

keen sorrel
#

plenty of TOS rules can be enforced on an API. If don't follow them you get banned

#
#include <arm_acle.h>
#include <arm_sme.h>

size_t test_sme(uint8_t* in, uint8_t* out) __arm_streaming {
    svbool_t allVec = svdup_n_b8(true);
    svbool_t vec16 = svptrue_pat_b8(SV_VL16);
    svuint8_t inVec = svld1(allVec, in);
    svst1(vec16, out, inVec);
    __dmb(15);
    return 0;
}

first time playing with SVE/SME. Predicates (svbool_t) are like AVX512 mask regs on steroids. They're how to decide the size of vector you're working on

#

It just adds a few instructions to this reduced instruction set computer

frozen flame
#

I say this as someone who develops APIs as a job

hollow basalt
#

ok

hidden storm
nocturne galleon
# keen sorrel ```cc #include <arm_acle.h> #include <arm_sme.h> size_t test_sme(uint8_t* in, u...
#include <arm_acle.h>
#include <arm_sme.h>
size_t test_sme(uint8_t* in, uint8_t* out) __arm_streaming {
    if (!in || !out) {
        return -1;
    }
    if (((uintptr_t)in % 16 != 0) || ((uintptr_t)out % 16 != 0)) {
        return -2;
    }
    svbool_t allVec = svptrue_b8();
    svbool_t vec16 = svptrue_pat_b8(SV_VL16);
    svuint8_t inVec = svld1(allVec, in);
    svst1(vec16, out, inVec);
    __dmb(15);
    return 0;
}

We introduced null pointer checks to validate the in and out buffers, returning an error code if either is invalid. Additionally, we enforced a memory alignment check to ensure both buffers are aligned to 16 bytes, which is critical for optimal SIMD performance and avoiding misaligned memory access issues. The predicates were carefully chosen to ensure proper vector lane activation, with svptrue_b8() for loading all lanes and svptrue_pat_b8(SV_VL16) for storing only the first 16 lanes. Finally, we retained the memory barrier (__dmb(15)) to guarantee the visibility of memory operations across cores, ensuring proper synchronization in multiprocessor environments.

#

Now if you wanted to make it work in js for example we could do the following

async function runWasm(inputArray) {
    const wasmModule = await WebAssembly.instantiateStreaming(fetch('test_simd.wasm'));
    const { memory, test_simd } = wasmModule.instance.exports;
    const inputPtr = 0;
    const outputPtr = 16 * Math.ceil(inputArray.length / 16);
    const inputBuffer = new Uint8Array(memory.buffer, inputPtr, inputArray.length);
    const outputBuffer = new Uint8Array(memory.buffer, outputPtr, inputArray.length);
    inputBuffer.set(inputArray);
    const result = test_simd(inputPtr, outputPtr, inputArray.length);
    if (result < 0) {
        console.error('Error:', result);
    } else {
        console.log('Output:', outputBuffer.slice(0, result));
    }
}
#

Got bored but nice code tho

keen sorrel
nocturne galleon
#

this code, as written, isn't functional beyond its skeletal setup.

#

you could do ```c
"\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b"
"\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd"
"\x80\xe8\xdc\xff\xff\xff/bin/sh"

keen sorrel
#

Maybe you could help me reticulate some splines with SME?

nocturne galleon
#

check that out that's most system calls

keen sorrel
#

SME is syscalls? That's news to me

nocturne galleon
#

no

keen sorrel
#

Idk what else to tell ya, but regurgitating or sharing LLM slop output is just not that helpful

nocturne galleon
#

Here's my oneplus pro 7 that's on it's own telco network and has a custom bootloader and custom kernel

shrewd valve
tight halo
#

Why are fpga development board so expensive pepegaecry 150$ for a low spec microprocessor that has a couple I/O pins

keen sorrel
# tight halo Why are fpga development board so expensive <:pepegaecry:722547186356977744> 150...

Two things. First they often never price drop so an old model will be as expensive as it was on release. Second, the microprocessor in an FPGA is usually just there to coordinate and configure the gateware blocks that do the actual work.

AMD-Xilinx has some boards with cortex-a78ae cores, but those are targeted at very lucrative industries (ADAS, AI, 5G, etc.) and priced to match. I haven't researched it in a bit, but the Kria product line was the reasonably priced middle ground last I checked.

leaden sorrel
#

Anyone got some project ideas? Am bored

#

Ideas good for webdev (Next.JS, TypeScript, JS, TailwindCSS + PHP/Laravel) or C# are preferred

fading osprey
#

you could always program yourself a chess engine

#

or if you really wanted a twist you could program a battleship! engine

tight halo
keen sorrel
nocturne galleon
#

nice portal for the flipper zero and it has a cli

rustic hare
#

Anyone here able to help teach me how to link a SAML plugin to Keycloak for SSO authentication ?

dusty saffron
#

i made a python quiz for school i need a way to add a leader board and a way to make how much time it took to finish the quiz to be the leader board but i also need a way to make the menu clickable if possible same with the questions
https://paste.pythondiscord.com/VAXA

#

i hate comp sci

cloud knot
#

and if yes, what language/tool/whatever

#

(to be fair, i only did SAML against MS AD)

rustic hare
cloud knot
rustic hare
#

My main issue is that the "language" on the SAML Plugin is so messed up I can barely understand what it actually wants.

cloud knot
# rustic hare My main issue is that the "language" on the SAML Plugin is so messed up I can ba...

this is how SAML works. In short:

  1. user reaches website
  2. website decides that you are not logged into it, so it creates an XML document, optionally signs it, sends it to the SAML IDP (Keycloak)
  3. Keycloak receives request, decides if it needs login, optionally shows UI to log in
  4. generates a response and redirects back to your website with XML answer in it
  5. your app receives XML, verifies and decodes it, logs in
#

now there are bonus features where it can optionally sign and/or encrypt data, which adds complexity, but also security (for these you need to get encryption/signing keys to Keycloak and your app - service provider)

rustic hare
#

For the 3) - if Keycloak is setup to link to LDAP, that basically is SSO right ?

cloud knot
#

well how keycloak logs in/verifies the user is up to keycloak configuration. SAML is just the external interface for it

rustic hare
#

Oh ok.

cloud knot
#

in other words, keycloak realm holds the users and authentication database

#

keycloak realm then has clients, which is OAuth or SAML clients

rustic hare
#

Which if linked to Active Directory bascially acts as an AD Authentication server right ?

cloud knot
#

and then clients hold other configuration data, including mappers, which allow you to push stuff inside the returned SAML data your app receives

cloud knot
#

and let me see that glpiSAML

rustic hare
#

Sec I need to blurr some domain names out . One moment please.

cloud knot
#

nah

rustic hare
#

This is the general tab ( filler text inside )

cloud knot
rustic hare
#

No entra sorry

cloud knot
#

huh ?

rustic hare
#

Boss to cheap to buy entra sub

#

Does not believe in cloud /facepalm

cloud knot
#

via custom SAML app ?

rustic hare
#

More like : this was done before but idk how

cloud knot
#

the point is, you need to configure the SAML data, which is on the service provider tab

rustic hare
#

Normally, this GLPI system comes with alot of freeware plugins. but it also has paid plugins. one example would be OAuth SSO, however this is a paid plugin and again , boss too cheap.

Since I don't have an entra sub to configure SSO through entra I have to do this with open source tools.

rustic hare
cloud knot
#

entity id is the identifier of your client, keycloak will need this
meta url URL you can put in SAML identity provider and it can automatically sync config between your app and the keycloak

#

acs url is the URL identity provider (keycloak) will send it's data back to
SP certificate and SP private key is your apps encryption/signing keys to verify/decrypt received data from identity provider (keycloak)
nameid format is selection of how you receive name of user (some systems send email, some send user account name etc)

rustic hare
cloud knot
#

well that will be up to you to test how it works, as i said, i haven't set up a keycloak SAML client yet, but i have idea what mean what (i set up a Symfony PHP app against a Microsoft Active Directory Federation Services server)

#

now let me fire up a keycloak instance, give me a minute

cloud knot
#

hm, let me google a bit, the guides refer to older keycloak versions which have a different UI a bit

rustic hare
#

I even found an article reffering to version 15. something lol

cloud knot
rustic hare
#

I got that one right ( by luck )

cloud knot
#

ah sorry, nevermind, it's the metadata URL !

rustic hare
#

oh

cloud knot
#

if you enter Client ID as metadata URL, it automatically downloads everything else from that URL (if keycloak can reach your service provider, aka your app)

rustic hare
cloud knot
#

nah, that is picture from someone on internet 😄

rustic hare
#

lulz

#

But that port is the one I assigned to it when I configured keycloak I'm guessing.

cloud knot
#

but let me google a bit more. Anyway, the basic stuff is that Client ID is either the entity id (more likely) or the metadata url (maybe not)

rustic hare
#

Dumb question : is it normal for the client ID to have id= at the end with nothing behind it ?

#

Looks like empty from the MetaURL from GLPISAML

cloud knot
#

then root url = your app
valid recirect URIs = most likely the AcsURL, or wildcard version of it
nameid format => pick whatever you want to have on both sides
Signature encryption => this will need to share public keys between each sides (see keys tab)

#

i can see the URL configuration on the advanced tab

rustic hare
cloud knot
#

"Assertion Consumer Service POST Binding URL" or "Assertion Consumer Service Redirect Binding URL" => AcsUrl

rustic hare
#

ACS goes in valid redirect URI and post binding url ?

cloud knot
#

possibly, as i said, i did this only via MS AD FS, not sure about fine details of keycloak configuration, just guessing

topaz python
#

any one into nanobots

rustic hare
#

I mean if we do mess it up, keycloak or the GLPI will just shout at us ( WRONG CONF : error# )

cloud knot
#

the POST or Redirect is just how it communicates back, it depends on size of the XML document sent. Redirect is for shorter XML documents, POST for longer

rustic hare
#

next tab

Entity ID , SSO URL SLO URL X509 Certificate ( I found the certificate already )

cloud knot
rustic hare
#

That's 3 places ACS goes in to already lol

cloud knot
#

root and valid redirect uri is your website (redirect URI you want to have * at the end)

cloud knot
#

well then you test it and see if it works 🤷‍♂️

rustic hare
#

So redirect could be the create new ticket page then right ?

#

I still need Identity provider tab to fill out on GLPI Side

#

Entity ID I'm guessing it should point to keycloak client ?

cloud knot
#

again, entity id is your app's data, i guess we need to explain SAML internals to you

rustic hare
#

scratching head

cloud knot
#

https://auth0.com/blog/how-saml-authentication-works/

  1. user visits your app
  2. your app decides "i don't have a session for this user and his browser"
  3. it constructs a SAML login request XML document, where it puts the entity id you see in your apps configuration as issuer and then AcsUrl into the AssertionConsumerServiceURL attribute in the XML above
#
  1. browser redirects to the keycloak (idp) who receives that XML document, validates the entity id and acs url against stuff like valid redirect url, if entity id matches etc. If all is well, it tries to see if it has keycloak session, if no, then asks you to log in to keyclooak
  2. after you are logged in to keycloak, it creates a response which is sent back to the acs url via redirect or POST, in the XML you will have stuff like subject, or exrta data you set mappers in keycloak for
  3. browser will deliver that info to your app's acs url, which then proceses the received data and logs you in
#

so you just need to figure out where on both sides you need to enter information about each other's URLs and/or keys (if you sign/encrypt data)

rustic hare
#

I have to make an Identity Provider in for SAML in keycloak first

epic fail with glasses cuz can't see

cloud knot
#

you can always just add manually an user to keycloak if you want to test SAML interface first, before you configure keycloak to check users against AD

cloud knot
#

so to get users from AD to keycloak, you deal with user federation -> ldap

rustic hare
#

issues with having 14 locations to deal with

rustic hare
#

It's more like : root domain : Company Master OU : 14 sub trees for each location and each location has 1 extra sub tree for users

cloud knot
#

configure multiple ldap providers, with different subtree configurations ?

#

it's more work, but if that is what you have to do 🤷‍♂️

rustic hare
#

that sounds like gruntwork I can do later

#

First problem I encountered is : Service provider tab : SP Certificate error : SP private key does not seem to match provided SP certificates modulus.

#

I didn't copy the correct certificate ?

#

Does it have to be the same key in SP Certificate and SP Private key ? I'm confused

cloud knot
#

uhm, not sure if i understand what you did. ideally you skip signing/encrypting at start, so on the service provider (your app) side you do not fill out the SP certificate/SP private key fields.
On keycloak side, you disable everything on keys tab and everything in Signature and Encryption on main tab

#

you can deal with encryption and signatures later if you wish and if everything works

rustic hare
#

Aight. Time to test see if it works

cloud knot
#

but if you need to know, then when you enable Signing keys config on the keys tab, then you can either generate or import a key. if you generate, you will get a private key file downloaded
then you will see a certificate too

#

you can take these two informations and put them into the respective SP Certificate and SP Private key fields in your app

rustic hare
#

so accessing the setup SSO link just shows me a login screen for it

cloud knot
#

keycloak login screen ? yes, that is how it is supposed to work

rustic hare
#

I must've messed something up as usual /facepalm

cloud knot
#

is active ?

rustic hare
#

faceplam xD

#

HOLY MOTHER OF CANOLLI so many SQL errors xD

cloud knot
#

this is something i can't help you with, that is internal to that glpi

rustic hare
#

Tru tru prolly error because it's not working xD

#

I think I skipped the first tab for the SAML in GLPI

#

Yep...totally skipped it

#

Userdomain is configured. Users can trigger a Saml Login by providing their {username}@{userdomain} in the glpi username field and pressing the login button. The password field is ignored and can be left blank. This is a more secure option that wont expose configured IDPs.

Would you look at that .. xD

#

So this means that in theory this works ? lemme setup a user somewhere where keycloak can find it and test it with it

cloud knot
#

well i don't think i can provide much more infoi than this, the auth0 link (https://auth0.com/blog/how-saml-authentication-works/) explains the basics of the protocol, everything else after that is just finding out how to configure each others side to match what is expected

rustic hare
#

Yeah. tru

#

So username@domain doesn't work xD

#

I looked in to the log there are login requests stored now here hehe

#

welp at least there's progress xD

#

when trying to navigate to the webpage of the webApp

#

Can you tell me where can I find the invalid requests on keycloak side so I have a steppting stone for troubleshoot ?

cloud knot
#

in general invalid request is either incorrect redirect url or key/certificate configuration.

On realm settings->events on user events and admin events you can enable events, which will then show up on events page

you can also take a look at the keycloak server log itself ?

#

Start by making sure that:

System time on the servers are not skewed.
The URL you're redirecting to after authentication is mentioned in the client's valid redirect URIs.
The Client ID in Keycloak matches the Entity ID specified in the SAML request.

#

so client id must be entity id of SP for sure

rustic hare
#

Allrighty time to hit the bed damn it...I wish I had more time xD

#

Thank you very much for helping 😄 I'll surely be back tomorrow 😄

#

You're the best by the way !

rustic hare
#

@cloud knot You still here ? 😄

cloud knot
#

yes, but not sure what can i help you with more than i told yesterday

rustic hare
#

I'll read through it again because probably hyperfocus skipped something. I'll @ you if I fail to understand something if that's ok 😄

winged saffron
#

Any good code ide's/editors for linux?