#development
1 messages · Page 18 of 1
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
Yeah but that requires more overhead, and learning their API, i already wrote a decent lib myself
Yeah, but you’re requiring others to learn your way. Kafka is not more overhead, it’s one of the industry standard to use for an event based system.
I’m with @cloud knot on this. Don’t reinvent the wheel unless you have some specialized requirements.
But hey, to each their own I guess.
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
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
MVC is what I used back in the day. Now I'm using Blazor, but tbh, I still prefer MVC.
I thought phpstorm/webstorm was already free xD
I paid for phpStorm for a year, stuck on 2022 but tbh, whats even new?
No idea. I had a student license back in the day
Rider is a .NET IDE, that is why i linked it for you
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.
Vs more like Bs
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
i think thats honestly just kinda how india works they use the languages interchangeably
Its funny because I had just downloaded rider the other day and was contemplating buying a license
also me few weeks ago, except it was internal gitlab https://x.com/wesbos/status/1849646009065836655
my brightest green squares on github are my darkest days of debugging deployment CI
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"
nektos/act although im pretty sure it is not a flawless recreation of github actions
to be fair, i personally do this only for work, so only gitlab, which has stuff like https://github.com/firecow/gitlab-ci-local but couldn't make it work
also most of the time the CI scripts are completely different repository
I was able to get act working for my work thing but they are very very sime actionspl
so the CI in the actual project is just "import CI from another common project, and use these environment variables for that"
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 😄
the blender example is kind of dumb, blender desperately needed to not suck lol
https://xkcd.com/1172/ screams of this
but generally yes i think most people will agree with that stance
see: yts new gradient colour scheme (???)
Lmao that xkcd
It's icky tho...
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
Anyone know Any good tutorials for creating a react fourms / Threads app?
i need help whats the problem with this? (im new to python and im using flask)
Why don’t you just run the tests locally? Everything you run in a pipeline you should be able to do locally.
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.
Have you ever tried using LibreOffice as an IDE, just to mess with somebody? I have just done so and it was great fun
Post here not dms
ci pipelines are the worst lol
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
i mean in pipelines LOL
ok. to be precise, what i hit hard was this https://github.com/containers/buildah/blob/main/troubleshooting.md#3-buildah-run-command-fails-with-pipe-or-output-redirection
do you even know how to center a div ha? well?
sure no problemo ... here you go:```html
<center><div>centered</div></center>
theres people out there using VSCode so , theyd prolly think its an improvement
VSC is... fine
i prefer intellij but im also not getting paid enough to warrant buying it 
may i suggest using LibreOffice as IDE? really big improvements 😉
really?
i use notepad and I have highlighters i write with on my screen for syntax highlighting
I prefer VSC over most things tbqh
Why does mapping various vendor APIs have to be so tedious
Well, you see comrade, if neustar is involved, I pitty merely logging into their web-based TN management and porting tools, let alone attempting to use their APIs. 🤢 🤮
FUCK NEUSTAR
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
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.
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)
wait till you add GUI to the mix 😄
that could be down to legislation. Look at GovUK design system for example https://design-system.service.gov.uk/
That is down to meeting all accessibility requirements
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
What is this that you are messing with
it is from internet, it is an integration platform, to be precise https://www.softwareag.com/en_corporate/platform/integration-apis/webmethods-integration.html
webMethods Integration Server provides you the architecture necessary to allow you to connect anything faster with a standards-based integration platform.
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
also i haven't touched webmethods for years 🙂
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. 😄
peak accessibility design
It doesn't do that on chromium (edge) or firefox as far as I can tell, which browser is that?
@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
It is 2024. #nofax. NO. FAX. IN. TWENTY. TWENTY. FOUR.
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
I work with faxes day to day lol
Faxes really need to die
It's funny because they are no more secure then email but medical facilities pretend they are
Its worse than that, they are actually more insecure.
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.
chromium based, vivaldi
apparently they are super prevelent in japan
but why
very risk adverse ¯_(ツ)_/¯
they just got rid of lots of floppy disks
also good vid https://www.youtube.com/watch?v=ky1nGQhHTso
Links:
- The Asianometry Newsletter: https://www.asianometry.com
- Patreon: https://www.patreon.com/Asianometry
- Threads: https://www.threads.net/@asianometry
- Twitter: https://twitter.com/asianometry
I had to use Japanese software at work and it was not pleasant
I find this kinda funny
For a culture like japan, I wouldve (incorrectly) assumed that they wouldve been somewhat on the technical edge
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
Just think about their games for a sec and you'll know they are all about antiquated and horribleness
this bundle is as disorganized as it gets 😄 https://www.humblebundle.com/books/programming-mega-bundle-2024-packt-books
also not sure if i should be disgusted or amazed. Probably both https://x.com/Prathkum/status/1853146128839254072
result
(or plain CSS https://codepen.io/vuyko/pen/LYwBgpo )
ive learned recently to use scss and its made frontend a bit more bearable to me
we use tailwind for our stuff
i feel this, using scss makes is much more clear what im doing
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
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
C++ or bust 
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 😄 )
im a simple man, I see someone's SQL being flamed I immediately brace myself incase I do what they do
ok its not what I do at all
I want an explanation for "true" === "true"
Even worse is doing authentication from an nginx config
I was just looking at this today
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
I didnt even know this was possible
creativity is wasted on satan
If "true" was returned as a string instead of a boolean, return false. Presumably because its assumed to be an injection attack attempt or XSS
but at least I know I wouldnt, at the very least, query select every single user in my table and iterate over them in jquery javascript shit and also unhashed passwords
It shouldve just checked "true" === true which would return false.
It exists in Apache too https://httpd.apache.org/docs/2.4/mod/mod_authn_dbd.html .
Using an IDP is certianly the way to go
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
Were acutally moving to use a forums as an IDP for one of our product
And in case you want that, you still have an option to run self hosted OAuth server, like Keycloak or Authentik
(A minor product)
For its use we require some sort of proof you are a real person so attaching social accounts increases reputation score
Or Gluu if you want pain
Gluu has Everything covered but holy shit
Or SAML protocol for real pain
this looks so evil
We use SAML for a bunch of stuff
Signed and/ or encrypted. POST or redirect... So many combinations, so much XML
what the hell why

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
It is prominent in numerous industries
(if you get the choice between dotnet, javascript or c , id say there is no choice 🙂 only c)
Depends on the task
dang
Well i like coding in c anyway (still an absolute beginner) let’s see where i go from there
as a beginner it is a fantastic choice
because you will learn how the computer actually does things
true
bare C will teach you good concepts for memory safety, but won't teach you OOP which will be required in most of other languages. For that you will have to move up to C++. But i suspect if you can do stuff in C++, you will be able to jump to any ship, i mean language. Maybe except weird languages like R, Haskell, LISP which do not borrow from C syntax/logic
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
Noted ✅
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)
And ofc, i understood C++ more than java
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
yeah it sucks on everything looool
That said, web based setups are the best absolutely
Why learn a toolkit for every platform when we can just program in the language superior to them all--JavaScript
The dark side calls to everyone
or half way to it - React Native 😄
or the modern incarnation of the idea - Kotlin Multiplatform
ngl at least swiftui has the advantage of being cross platform (across apples platforms that is)
that doesn't count as cross platform for me LOL
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
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
with the work that Arc browser is doing, swift might end up being truly cross platform
wdym, swift itself is already truly cross-platform. Unfortunately, SwiftUI is closed source so there's nothing anyone but apple can do to make that cross-platform.
Arc browser is running on swift on windows
I'm aware. So am I lol. Swift is cross platform itself
You are running a UI on swift on windows?
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
whatre you running for your ui?
I haven't settled on using it yet, but I've used Arc's code lol
yeah exactly
which is why i said with their efforts we might get cross platform (ui specifically)
afaik they're working on leenux
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
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,,
a gui that can browse its own structure 🙂
*procedurally generated (i dont like oop :D)
Christ
this is a good example to demonstrate that gui programming sucks
personally to me hashmaps are objects and therefore that is oop
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 ||
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
Can anyone help me with wirting a Moq test in C#? My current test doesn't work and seems to be loading forever...
(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
does ANYONE know how to implement a lazyVstack in adwaita (swift adwaita would be perfect 🥺 )
me when forbiddenfruit enters the equation: >:)
anything is an object if you dig enough
and if its an object it can be forbiddenfruit.curse'd
even prototype based languages (Javascript says hello)
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||
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^
i somehow manage to consistently find the most effective thing to say to get people here to explain things I don't understand
import fractions
I win 
checkmate, scientists.
you think?
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
Hey, random question; are there any AI's (ie. ChatGPT) that are free to download and run locally?
check out LM studio
depends on your hardware what models you will be able to run
Thanks! 🙂
thanks i hate it
another thing to hate https://x.com/LeaVerou/status/1854658564423622882
tf
you just killed half of the people in this channel by posting that
Why, why? Are classes above you or something? Some crazy challenge?
I'm going to vomit
Obviously going at style attribute is a huge abuse of capability, but the feature itself has a reasonable use case. Let's say you render a table with values, and want to highlight negative rows. You can use a class sure, but maybe you already have an indicator data attribute, so why not base the CSS selector on that.
dumb question when are we styling html we cant control ? other than on a personal machine so using stylish or smth , where frankly it doesnt really matter how horrifying the hacks are as long as the outcome suites you ?
i can imagine for example when you get portlets you can't modify, or when you are asked to change color scheme of a 3rd party intranet website you don't have sources for
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 ?
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 ?
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">
<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
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 😄
Bruh. Chatgpt has no chill 😂
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
set the path in the mentioned preferences to /usr/lib/postgresql/15/bin/pg_dump ?
^^ 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
on Ubuntu 24.10 it is part of postgresql-client package, which puts stuff in that folder
gotcha, good to know
alternatively you can symlink the tools one by one from the folder above to /usr/bin, but meh, that is lot of work 😄
(possibly doable with wildcards, but i am not going to try to figure that out now)
I'm having trouble hosting a website on github
did you name your file Index.html. With capital I ?
https://xavier2845.github.io/Myhomepage.com/Index.html -> rename it to index.html and it will work without need to type Index.html
(and maybe you want repository to be private ? Up to you tho )
Did this stuff earlier now I'm trying to implement a image gallery system
yourusername.github.io should be the name of the repo
then your url would be https://yourusername.github.io
your index would be index.html
so if your username was xavier1228 on github you would make it xavier1228.github.io as the repo
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
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
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
is this too much comments? https://github.com/Rapter001/rapters-assistant/blob/main/main.py i want it to be understandable
@fading osprey should be changed now
in general you don't need to comment every line, you want to comment logical blocks. And often even that is not needed, if the method and variables are self-explanatory. But if it helps you, sure, why not
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 🙂
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
that way of checking 2XX code actually disgusts me 😄
listen, PAL. listen.
it was either this or I convert it to a string and check the first letter
this seemed more slick
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)
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
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
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
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
that ws just a random output i made back then. ah, old times 😄
example
i think I have a few of those lying around somewhere, I was messing around with pi picos a while back
i2c :o
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.
if its meant for people then python is always great for the "rapid prototyping; rapid development" stuff
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
yeah its pretty much english. once you have a decent understanding of computer science you're basically already top 30% of python developers
probably the biggest issue i would have with Python would be indenting and lack of brackets
Pascal, Delphi (don't remember much of those these days tho), PHP, Java (both CLI and server side, various libraries - Struts, JSF, EJB etc), Javascript & TypeScript, some Android (Java, Kotlin) and iOS (Objective C, Swift) programming in last 2+ decades
indenting gets to be pretty intuitive, you can still organize things regardless of the indentation and there are style recommendations for line length limits and such to incentivize that neater stylization:
i use yaml so i know, it's just my brain being trained on { and } being around blocks of code. You can't make 20 years of mental training dissapear
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
that reminded me of this gem
and you cant have tabs and spaces but you can have tabs or spaces to indent and thats why tabs are converted to spaces
thats disgusting and genius
I feel like learning this alone made coding SO much easier for me. I guess I felt like everything had to have some succinct, sleek name when really you can just name stuff what it is or what it does. Not only is it easier to read when you need to look at it again later, it's easier to read WHILE you're writing it
can someone help me with this
I am trying to do something similar but whenever i toggle the button the emoji is under the circle
nvm i resolved the problem
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 🙂
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.
feedback on my web design mockup? https://www.figma.com/proto/Ml4CbWmKW7JOnOAOlgVVOJ/Dawn-Layout?node-id=4-8&starting-point-node-id=4%3A8&show-proto-sidebar=1&t=VFuoY2r2Vk78AXuH-1
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' 🙂
the only sane way with white space in programming is :
- 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 ? - 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 )🙂
lol you from the netherlands much?
any reason to go with a PCIe 4 or 5 gen ssd for compiling code?
can't find benchmarks
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)
@cloud knot compiling? pretty significant
you need to read all those files and nvme ssds were a huge speedup
but he is asking between gen 4 and gen5 ssds, So 7 vs 14GB/s.
right, and those speeds aren't maintained from what I can see
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
right, I'd go even as far as to say most text files are around that area
so look at reviews of drives which do good 4k read/write
any tips? been scouring the web and can barely find anything fitting
https://www.storagereview.com/consumer/client-ssd is probably your best bet for reviews ?
Client SSD reviews encompass the wide variety of SSDs designed for end user systems. Client SSD reviews include m.2 SSDs as well as
thank you
seems like 990 Pro is the king ?
the rest, i don't even know how to interpret those curves 😄
990 pro is still gen 3 right?
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)
also Java/Kotlin and Node (plus containers/vms)
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
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)
only 20k lines ?
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
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.
i am not saying don't buy a Gen 4 drive. But personally i would go for NVMe of specific capacity and then pick based on price. Gen 3 vs Gen 4 vs Gen 5 most likely will make minimal difference imo
thanks
how do i properly post code here without it being normal text or an image
put `'s before and after
tilde (~) squiggly lines but not shifted idk what they're called the tilde apostrophes not normal apostrophes
backtick/backquote?
that sounds familiar so probably that, might just be ticks
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))
Getting this to work right, and render right was a pain
Belgium but same thing fr
/s right?
crazy people doing crazy things. Presenting you the reverse indenting style 😄
Back to hell where this belongs
You ought to be shot out of a cannon into the sun
that is not my code, i am not savage
ran out of indents have to make a commit indenting the entire file
ah van boveste gedeelte dan , kzen ok van da erreges
/s ?
It’s not a compiled language.
it is ... it just also has in interpreter , but you can compile it to a binary as i demo in the gif ...
Never worked in python but my understanding is that it was an interpreted language.
you can transpile it to c since its cpython after all so , and you can compile that c code
I mean, most languages are built on C. lol
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
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/
With the Python compiler Nuitka, you create protected binaries from your Python source code.
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
anyone here?
Python gets compiled to byte code so that's technically a compilation step
Beyond that things like nuitka exist to turn python into c code yeah
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
what do you mean by "inbetween numbers"
1_000_000
git gud
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
its used all the time when writing big numbers, the whole point human numbers are written like 2,147,123
xs:decimal in XML Schema would kick your but for that type of 'number string' as well
but again, why do you want a transport/data format to deal with formatted numbers instead of the actual numeric value ?
It is not JSONs job to be a formatting tool
yah i mean obviously the right thing is i use a proper config file format
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'
most programming languages will take underscores
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
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
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
start with C#/C++ and then youll be able to learn python super easily.
best way to learn for free i would say:
- 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.
- make some little projects to start - calculators, programs that read text/json/xml/csv files, do some googling to help out.
- increase complexity as you learn and try to keep challenging yourself.
but then again, we are back to:
- put it in JSON as string, parse it yourself, deal with invalid values yourself
- make your own RuggsJSONVariant parser, which allows numbers to have _ as thousand delimiters in numeric values
as i said before, i have yet to see an exchange format which allows this. JSON doesn't. XML doesn't.
well no im saying its in python. python seems to ignore the underscores so they can be used as a delimiter for readability. data formats cannot ignore the underscores very easily because they arent interpreted consistently (that is - every implementation of reading a JSON file would have to be changed which isn't feasible at this point) or compiled.
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
Could I just do the free Harvard cs50?
yes cs50 is perfect for that imo
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
Only issue is that I need someone there making sure I pay attention the entire time
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
i would not do c++ or c# , but just C instead , possibly on for microcontrollers to get the basics right
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)
ive used a aurdino and a raspberry pi at school
today i seen a tweet showing one of the stupidest metrics in software development. Basing performance on number of PRs submitted
Thats really stupid
for every single line change commit
75 and 69
as someone calculated, with 40 hour workweeks, that guy did around 1 PR per hour
REALLY?! Holy shit. You consider that low!?
it all depends on context, bugfixes, sure, New development, one PR per hour is sus
Me over here rewriting config files with built in documentation and proper var defines gonna need a raise I guess
mfw ive been working on a single pr for the last 3 months
id be so fired there
Theres this one PR someones been working on for 2 years
Its a massive rewrite of some core shit
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).
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
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
make sure you put in your resume how many pull requests you average per hour
Been working on this, this weekend
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.
whats ur personal use case for this?
oh iphone 15 video
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
👍
man, i love the way Apple's CDN caches Apple Developer documents 😄
for context, it is this page https://developer.apple.com/news/upcoming-requirements/ and the page literally puts text in and out depending on which cache the browser hits
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:
- created fake linkedin job postings to get applicant emails for specific positions
- 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
- 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)
- 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
this is the way
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?
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
chatgpt: complicated solutions for simple problems
yep. cause curl -O --limit-rate 100K URL is complicated 😄
maybe this was all an elaborate scheme to get a better solution here
to be fair, his solution is about string manipulation mostly
Something to consider as answer to your old question 😄 https://www.youtube.com/shorts/ex5eGnU1ZEY
Watch the stream here:
https://piratesoftware.live
Join the community here:
https://discord.gg/piratesoftware
#Shorts #Twitch #PirateSoftware
Im loading a database right now of all phone number switch data and its taking its sweet time
ugh
whats the most engaging c# tutorial
how many entries you got lol
1.286 Million
damn lmao
anyone
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
Thank you.
My goal for the circles was to show the relyable and budget service provided.
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...
you may be right on the apostrophe but the s i think is correct as you take multiple GCSE subjects
https://codepen.io/Oscar-the-lessful/full/jOggRxW
Hello! still havent made it responsive but i improved the gradient and colours.
I plan to redo the gradient behind the text soon.
talking about merging... I guess the small mistakes our new coders do is nothing compared to what i seen here 😄 https://fxtwitter.com/trunarla/status/1861434891872645632
Gen z programmer strikes again 😩
what the FUCK
noooo
and is probably going to make mistake 20% of the time at least
importing npm packages for everything is one thing but
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.
this would drive me crazy if i would have to debug an issue like this https://x.com/hnasr/status/1861570729600483794
i cant say i wouldve known to even check for that
i woulda assumed it was just a me problem and bandaid it up
HDD going fast
Well the question I now have is why are you holding open a db connection for that long if its idle
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))
what the fuck
What the FUCK
this scares me
Life Support scheduling relying on a DB Synced Clock
not his case, but you could have long running database update (that wouldn't send packets either i suspect).
how does one bleach eyes
ah thanks, appreciate it
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)
have you considered modern Angular ? 😄
they added deferrable views in Angular 17, now in Angular 19 they added developer preview of incremental server side hydration etc
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.
just a note, zone.js is gone, now they got signals, effects etc https://angular.dev/guide/signals . RxJS is still a thing, but it is a choice for some use cases where signals can replace it
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
i forgor 💀
where is the json youre trying to update
hello, is it a right place to ask git and SSH related questions?
globalChatTask in Cache class is supposed to be Json
Any advent of code private leaderboard on this server? 🙃 If not, we should make one
It's the most appropriate place, given that Git and SSH (together) are likely to be used for development.
found a new text editor and really liking it.
its like notepad++ in speed, customizable as vscode, portable and full multiplatform configs.
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
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
What's the issue you're having?
#java
@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
Sounds like your conditional checks are wrong.
vim out of the box
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
-- 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
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
ok
vim users try not to talk about vim challenge
is there a vim plugin to make it nano
vim users everywhere have felt a disturbance in the force
lol
LOL AWS Aurora https://x.com/craigkerstiens/status/1864029392831402475
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
"behaves comparably" yeah, if you dont want to use any of the real features of an actual database
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'
Does it even have plpgsql
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
See the following to learn more about which PostgreSQL features are unsupported in Aurora DSQL
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.
you can also only have one db per cluster
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
Actually AWS Aurora has all of that
I use Views, Materialized Views, The prefix extension, they also have AWS specific extensions
Sequences, json,
this is right off my instance
The issue is with the DSQL feature set, not normal Aurora like yours
OOooh
Yeah go figure since DSQL is bastardized version of high availability
yeah I see it now
Lol this is the first time I get http 418 (I'm a teacup) from a real website https://www.cargurus.com/Cars/l-Used-Volkswagen-Golf-GTI-d199
Browse the best December 2024 deals on Volkswagen Golf GTI vehicles for sale. Save $4,816 this December on a Volkswagen Golf GTI on CarGurus.
ah, joke IT 😄 you connected to the local tea pot.
itea
also can't decide if i like it or hate it https://github.com/PostgREST/postgrest
I unironically use this
aparently it is used by supabase ?
yeah it is
I use it for Wireline information
btw this is still tripping me mentally 😄 https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer
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
it is still worse than the standalone SQL Developer, but for basic stuff it is nice
I basically use it to replicate this: https://www.localcallingguide.com/xmldialplan.php?npa=918 into REST
because fuck XML
is it valid for postfix expressions to have a number at the end?
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>
anyone trying to make something in cython, dm me
hi! is there any way to make output assemby file(NASM type) in GCC?
New Quantum chip and an awesome progress 👏
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...
Assembly output? Yes with -S. NASM type? No, it defaults to AT&T syntax but you can change it to Intel with -masm=intel.
https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Overall-Options.html#index-S
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
vb classic, or vb.net?
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
https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1?view=net-9.0
(in the right corner select VB)
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
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
LOL
I waited 5 minutes on a response from this a.i. model........ lmao
worth the wait
What language would you recommend learning to end up making a game engine in?
well you can't go wrong with learning C++
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
let me plug mine once more 😄
the COBOL thing is mostly down to "don't touch it if we don't have to" and not "we need it". If those COBOL guys die off, it will be replaced within few years
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
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
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...
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.
I'd learn more about Docker, and third party CI/CD platforms which you can self host. Using Gitlab, Github, Bitbucket, or whatever, only locks you in their eco-system. But that's just my opinion.
To awnser your question, I would learn how Gitlab's pipelines work, try to migrate a smaller project, and then work your way up more complex applications.
Im looking specifically for this, i do Docker since 2015 and know other CI/CD platforms already, but i wanna learn GitLab in a structured way
what does git mean with ```
CRLF will be replaced by LF the next time Git touches it
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 🙂
not much more there to it than the official documentation https://docs.gitlab.com/ee/topics/build_your_application.html, plus possibly helper stuff like https://buildah.io/
my best recommendation is to create a separate pipeline project which does contains the CI stuff, and then your actual project only has a small .gitlab-ci.yml file which includes the requested build pipeline from the pipeline project:
include:
project: pipeline/project
ref: branch/of/the/pipeline/project
file: path/to/ci.yaml
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
aws vs digitalocean for static website?
for static neither
cloudflare pages works great for free
Thanks for the idea, but im looking for a solution for 15+ people that enables them to have ground-work knowledge to talk to each other and have the same basic knowledge as well as giving them the ability to have the same wording when they talk about stuff. I know the official doucmentation is really good, but not everyone learns the same and reads the same sadly.
not really sure what you are after then. Tutorials ? Best practices ?
Something that helps "unknown dev/admins to the Topic GitLab" to migrate from another CI/CD system and git away. Giving them the basics and the learning how to construct the new pipepiles in yaml and register project-based runners and whatever a dev/admin in learning needs to be able to be educated.
But Yeah, Tutorial+Best-Practices surely would help
ok..thanks
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.
SaaS based apps are more like ERP
They could be. They could be a server management panel, an invoicing solution, or even a platform to resell other SaaS services!
so suggestion is to test it on VPS before deploying full scale on other services?
Suggestion is to always rest your code. How you test it depends on the code's requirements.
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.');```
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.
TLDR: regex101 is lying to me
D:
Uh, no? It's just not giving the same "warning" that regexr.com provides...
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..
(screenshot from https://regex101.com)
bunch of different implementations of regex which occasionally have inconsistencies
and i think sometimes different browsers can have different behavior if its being processed in the browser
I tried them all, I assumed EMCAScript worked since it says JS but 🤷♂️
It's not even running on the browser, just a basic VS ts-node call to run it in console
I'm using TS as just a scripting language cause I'm weird
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.
man i love primeagen's takes 😄 https://x.com/ThePrimeagen/status/1870267800230441104
this take is the worst
also we are 19th months into 6 months until AI takes our jobs
"we are 19th months into 6 months until AI takes our jobs" so true 😄
dear god
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).
}
I think the idea they have is to overlay an image on all the images on a page
and the image path is not being found (although they are using the correct method to get a relative file path for the chrome extension: https://developer.chrome.com/docs/extensions/reference/api/runtime#method-getURL)
The issue is in the manifest.json.
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
You can’t just say <all_urls>
Reference documentation for the web_accessible_resources property of manifest.json.
under host_permissions I think you can: https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns#special
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.
I Have Fixed it Was a issue with it being local i believe and now it works. If anyone that wants to try it i have made a website for it https://t3chiejack.github.io/HidethePainHarold/
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 😭
this feels like a problem version control can fix
yeah.... kinda our own fault 😅
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
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
how hard would it be to make a programming language?
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.
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
Python and rust are both fine choices, just depends how verbose of a language you're looking for
Making a language is easy
Making a good language is really hard
May the gnomes steal your pillow when you aren't looking
Why?
I think it would be a fun challenge and project
..... But you don't know the first thing about it
What is your language going to do? What makes it different?
It is specifically going to by for game development and will be simple to understand and write
Specifically for game development? What makes it specific to game development? How will it be simple to understand?
It makes it specific to game development as it can only be used in a game engine. It will be simple to understand as it will have very simple syntax which looks very similar to English
You are almost exactly describing gdscript
What is that?
GDScript is a high-level, object-oriented, imperative, and gradually typed programming language built for Godot. It uses an indentation-based syntax similar to languages like Python. Its goal is to...
Oh
accessing the DB for every message is such garbage optimization for my program 
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
pk
that is incredible when compared to me
progress on my part price scraper version 9000
- 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)
- big ole logging (this was a grievance of mine from my last version of this project)
- 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. andmisc_pricejust parses a price from the element and tracks it separately
...which all ultimately results in an output like this:
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
Do something logical and learn a game engine, something you can make bigger projects with
C++ or C# is good for making game engines
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
Python would be good for learning more programming design and higher level concepts. Or I would learn C
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
I don't have much experience with fivem, but I do have devops and a lot of developer experience. What's up with the server?
It got nuked backup is from last night so tables are mostly gone
What is it hosted on? And what's your budget for hosting costs? I think more backups are in order.
I'd recommend an hourly local backup and a nightly off-site.
Uhm it’s not a server server it’s a fivem server
Ohhh, you have to have it hosted by one of the approved providers right?
No that’s no problem but it’s a vds
Most problems are like tables that are need to be added to the database idk a lot about that
I see, intriguing.
Tables as in Lua tables?
Yes database tables
Should be as easy as sshing into the vps and mv all the database tables into their respective directories?
its not too bad, although it can get exponentially more complicated as you go beyond "functions" and get into "genuinely good" territory 💀
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.
- 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
- 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
anyone hiring example of my basic frontend work I made this in under 20 mins
lot of hovers
🙂 I like to add effects
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
dark text on a light background is typically better on the eyeballs, reduces eye strain
I agree
Some more of the work I do
Hello guys. Anyone can give insight on how to setup an email using a subdomain as address?
The same way you set it up on a main domain, but point it at the subdomain instead
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)
having said that, own SMTP is pain when using for email, you will sooner or later get banned by big boys
you should be fine if you have dmarc and co setup correctly and aren't exploitable for sending spam (open relay etc). I run my own mail server for about two years now and every thing is fine
experimentation about combinig pc funcionalities to enchance performance of the pc? some being?
if you shake the PC itll jostle any rogue electrons stuck in the carbide rails which increases the induction capacity of the real-time ray traces.
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
"should be fine" is purely luck based. You live in bad IP neighborhood - you are mass banned and have to pay to get whitelisted. And that is if you aren't straight blackholed by the big email providers
I've been running mine fine for ~5 years now
But it's also not just a skill thing - there's some luck to what IP your server gets and whatnot
Well I'm saying you clearly can do it, and I'm not the only one
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
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
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.
Are you building a client side and server side application?
Because for only client side you are complicating this way too much
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).
Well for server side just do this if you are using express for example
app.post('/accept-user-token', (req, res) => {
let data = req.body;
sdk = SpotifyApi.withAccessToken("client-id", data); // SDK now authenticated as client-side user
});
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?
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.
I usually use Next.js
I love how the server and client side works
anyone code windows 11 to GAMING PERFORMANCE?
https://github.com/Sorrow446/Beatport-Downloader
somone knows how to install this?
Someone knows
Given the first open issue, I'd say it likely doesn't work anymore.
https://github.com/Sorrow446/Beatport-Downloader/issues/s
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
Ain't no one following tos these days
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
I'm aware, it still doesn't do jack though lol
I say this as someone who develops APIs as a job
ok
I have a nother thats woking
A better looking hetrix status page made(can deploy on the edge)
Demo: https://status.waffle.host
Github: https://github.com/Waffle-Host/better-hetrix-status
#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
- This was play code, it's literally doing nothing lol
- The pointers are valid and aligned prior to entry
- Is this is just random out of context LLM slop??
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"
Maybe you could help me reticulate some splines with SME?
SME is syscalls? That's news to me

Idk what else to tell ya, but regurgitating or sharing LLM slop output is just not that helpful
Here's my oneplus pro 7 that's on it's own telco network and has a custom bootloader and custom kernel
hes worse than LLM slop. just ignore him
Why are fpga development board so expensive
150$ for a low spec microprocessor that has a couple I/O pins
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.
Anyone got some project ideas? Am bored
Ideas good for webdev (Next.JS, TypeScript, JS, TailwindCSS + PHP/Laravel) or C# are preferred
you could always program yourself a chess engine
or if you really wanted a twist you could program a battleship! engine
yeah, forced to use the xilinx vivado program for school. but hey. at least they pay the licensing fee
Ah, that's the other benefit of Kria. It's licensed for the free vivado.
Anyone here able to help teach me how to link a SAML plugin to Keycloak for SSO authentication ?
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
what do you mean by link ? Configure a SAML client to verify against Keycloak ?
and if yes, what language/tool/whatever
(to be fair, i only did SAML against MS AD)
Yes ! I have Keycloak setup to access AD through LDAP so I can use Keycloak for SSO, however I have no idea how SAML actually works.
The tool is glpiSAML ( plugin for GLPI Ticketing System).
Linked to IIS ?
My main issue is that the "language" on the SAML Plugin is so messed up I can barely understand what it actually wants.
this is how SAML works. In short:
- user reaches website
- 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)
- Keycloak receives request, decides if it needs login, optionally shows UI to log in
- generates a response and redirects back to your website with XML answer in it
- 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)
For the 3) - if Keycloak is setup to link to LDAP, that basically is SSO right ?
well how keycloak logs in/verifies the user is up to keycloak configuration. SAML is just the external interface for it
Oh ok.
in other words, keycloak realm holds the users and authentication database
keycloak realm then has clients, which is OAuth or SAML clients
Which if linked to Active Directory bascially acts as an AD Authentication server right ?
and then clients hold other configuration data, including mappers, which allow you to push stuff inside the returned SAML data your app receives
i suppose
and let me see that glpiSAML
Sec I need to blurr some domain names out . One moment please.
nah
This is the general tab ( filler text inside )
https://glpi-plugins.readthedocs.io/en/latest/saml/entra.html let's go by this
No entra sorry
huh ?
More like : this was done before but idk how
the point is, you need to configure the SAML data, which is on the service provider tab
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.
this is what is on the service provider tab.
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)
So both need to be set to email for nameID Format. Correct ?
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
uu nice!
hm, let me google a bit, the guides refer to older keycloak versions which have a different UI a bit
Yep. First thing I noticed googling Keycloak things
I even found an article reffering to version 15. something lol
ok, so i think it's like this on first page
Client ID = entity id from the client
I got that one right ( by luck )
ah sorry, nevermind, it's the metadata URL !
oh
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)
you opened your keycloak to 8081 ?
nah, that is picture from someone on internet 😄
lulz
But that port is the one I assigned to it when I configured keycloak I'm guessing.
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)
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
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
shared key already . idk how I found them kekw
"Assertion Consumer Service POST Binding URL" or "Assertion Consumer Service Redirect Binding URL" => AcsUrl
ACS goes in valid redirect URI and post binding url ?
possibly, as i said, i did this only via MS AD FS, not sure about fine details of keycloak configuration, just guessing
makes sense
any one into nanobots
I mean if we do mess it up, keycloak or the GLPI will just shout at us ( WRONG CONF : error# )
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
next tab
Entity ID , SSO URL SLO URL X509 Certificate ( I found the certificate already )
Master SAML Processing URL is the AcsUrl
That's 3 places ACS goes in to already lol
root and valid redirect uri is your website (redirect URI you want to have * at the end)
done
well then you test it and see if it works 🤷♂️
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 ?
again, entity id is your app's data, i guess we need to explain SAML internals to you
scratching head
https://auth0.com/blog/how-saml-authentication-works/
- user visits your app
- your app decides "i don't have a session for this user and his browser"
- 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
- 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
- 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
- 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)
I have to make an Identity Provider in for SAML in keycloak first
epic fail with glasses cuz can't see
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
Clients (at top) => interfaces keycloak provides for external stuff to authenticate against keycloak
Identity Providers (2nd from bottom) => keycloak allows login against these external services
User federation => keycloak checks users against these services - kerberos and ldap by default
so to get users from AD to keycloak, you deal with user federation -> ldap
Done but somehow our dumb AD tree is split in to sub tree of sub tree of sub tree of subtree to get to users xD
issues with having 14 locations to deal with
?
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
configure multiple ldap providers, with different subtree configurations ?
it's more work, but if that is what you have to do 🤷♂️
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
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
Still have that error with the SP Private key
Aight. Time to test see if it works
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
so accessing the setup SSO link just shows me a login screen for it
keycloak login screen ? yes, that is how it is supposed to work
nope, webapp login
I must've messed something up as usual /facepalm
is active ?
this is something i can't help you with, that is internal to that glpi
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
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
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 ?
I think I know where I messed it up xD
http://SERVERADDRESS/realms/master/CLIENT-ID-HERE?/saml
Is this how it's supposed to look like ?
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
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 !
@cloud knot You still here ? 😄
yes, but not sure what can i help you with more than i told yesterday
I'll read through it again because probably hyperfocus skipped something. I'll @ you if I fail to understand something if that's ok 😄
Any good code ide's/editors for linux?