#development
1 messages · Page 12 of 1
ASP.net is serverside programming and not applicable for your use case in the browser.
If it lags, you should try disabling components and using Chrome's profiler to look at your Javascript's performance - most likely you're just doing something really inefficiently without noticing.
You can't really do much better than Javascript - you could look at WebAssembly if you were making complex games and stuff but for a homepage with a couple of animations it's ludicrous overkill and shouldn't be necessary.
better javascript and css
noted. Thanks for the info!
Alright then. Guess there's no other options. Thanks for the suggestion!
Well, there's loads of options. But I often think it's better to establish that what you're doing is inefficient over the idea that your tools are inefficient. Sometimes the tools are inefficient, but as much flak as javascript/css gets for being scripty slow garbage, they're really not, and can easily run in the same order of magnitude of native code.
It's probably not the case that something like Javascript is to blame.
I put a load of stress on css, so it is my fault
I can instead chop the gif into several sections and make it be animated with the keyframe function, but in really quick snaps. I think this will work, buf I have to try it out first
Does this method actually work tho?
I don't have any Windows 7/8/8.1 machines to test if my program runs or not. I do have a 64bit Windows Vista machine, which said something like "This program does not run on your version of windows" when I attempted to run the program (Although I am not sure if its caused by the GPU not supporting OpenCL 1.2).
When I tried to run my program in Windows Vista compatibility mode on Windows 10, where it ran just fine. How come the error does not display when I run the program in compatibility mode?
Hey I can talk about batch programing here right?
sure why not
You tell me I'm not an expert on it
if you mean like hadoop yeah but like I only took one class on it
or do you mean like in general because I have a lot experience in batch processing
I meant like can I ask questions and then put some of my coat up so that people can criticize it for help
sure
it is the programming channel, see also the ltt forums which may get you more comprehensive help
can anyone tell me why this code snippett doesn't work? I know that it doesn't, and I know how to make it work, but I don't understand why
System.out.printf(""+ "Calories: " + "(%.2fcalories)" + " calories");
running in java
System.out.printf("Calories: %.2f calories", calories);
unfortunately my professor isn't available on weekends
Java does not support string interpolation, so the arguments must be passed separately
okay, so is the calories in double quotes what gets printed, and then the %.2f is just a placeholder for what comes after the comma?
sorry if I'm confusing and sound like I have no clue what I'm doing, I don't know what I'm doing, lol
What's in the quotes is a string. The %f part is what is replaced by your float (literally specifying, the first argument that follows is a float and will replace it). The %.2f means display the float with 2 decimal places
ahhhh, okay
System.out.printf("Calories: %.2f calories", 3.1415); prints as Calories: 3.14 calories
so it is just a placeholder for whatever argument follows next
yes
awesome, thank you
for multiple arguments you do: System.out.printf("1st: %s, 2nd: %s", "first_string", "second_string")
happy to help 
gonna stick to floats for now just cause that's what I'm working on currently, but it would be something like this for two arguments?
System.out.printf("%.2f: %.5f:", "float", "float")
yes but you would want to use actual float datatypes
them number keys too far for fingies
my pinky hurts from pressing + all day already, lol
if you think that's bad python broke on me
it refused to give me float values until I did a type conversion by adding 0.0, but this isn't how python is supposed to work
oh I see, they were using python2 
I know nothing abt python, but definitely don't think that's how it's supposed to work, lol
truediv go brr?
also that is a cursed way to convert to a float lol
Good news ! Going to release my reflink code from work as open source
question
for UX designers
for my portfolio site
should i build it myself
or use a template through adobe portfolio?
well if you make it yourself you can have the portfolio site be a part of the portfolio
congrats
it is supremely boring to almost everyone 😄
What is it
when using a modern advanced filesystem, you can use reflink, which links blocks from the same files - basically filesystem level copy on write.
What that means of course, is that calculating usage can be extremely difficult - and it really only works at the filesystem layer, or if your files are simple, you can get an approximation. This does the ACTUAL calculation to get on disk usage of a subset of files
So you end up with accurate numbers, rather than a vague guess because you don't actually understand the problem 😄
As per all these solutions, which are either volume level, or wrong:
https://community.veeam.com/script-library-67/immutable-storage-actual-disk-used-per-folder-1205
https://community.veeam.com/blogs-and-podcasts-57/check-reflink-and-spared-space-on-xfs-repositories-244
https://www.virtualtothecore.com/calculate-space-savings-of-a-xfs-volume-with-reflink-and-veeam-fast-clon
The complex bit is the extent mapper - you add an extent which has a start and an end, and it checks with other extents for collisions
im so confused how my work buddy actually uses AI chat bots for code
It's literally garbage, makes shit up constantly and doesn't know what it's talking about, it's slow often misinterprets my questions lmao
yep. If you are writing shit code, it's a good way to do it faster.
any way to make this thing have a shorter code line?
I wouldn't do that, but AWS's CodeWhisperer gets it right about 70% of the time and I find it very helpful when I pause to think and it's suggested something close to what I planned to write.
The other 30% it's comical but oh well
It's not really a "write me a function that does X" kind of thing though, it just suggests what one might write next based on your open documents.
No you don't understand a bunch of professionals managed to prompt engineer the creation of a connect 4 game.
Prompt engineering is boring, I write programs, not individual functions or trivial toy examples
I can also actually write code and do not need to write a text explanation of what I want only for it to comically mess up and have to weld a bunch of responses together
But yeah I agree, overhyped
What you mean text prediction AI that doesn't contain logical faculties isn't able to code? crazy
Text prediction is great for your boilerplate code, definitions, common progressions
I don't want to write boilerplate anyway
I can't fix this. Can someone help me with this?
60GB of unity tutorials + 12GB of WPF
imma go brrrrrrrrrrrr
but the Visual Studio updates ain't lletting me go brrrrr
i think there is a missing dialogueIndex between the if function
if (currentIndex < dialogue.length - 1) {
dialogueElement.textContent = dialogue[currentIndex + 1];
sprite1Element.src = sprites[currentIndex + 1];
dialogueIndex++;
} else {
document.querySelector("button").style.display = "none";
}
I'm not sure what you're trying to do, could you put your code into jsfiddle or something?
why doesn't this range work? everything outside of it does, but anything within the range throws up exceptions
written in java
it works if you change "printf" to "println" but I still don't know why it doesn't work with printf
don't you have to escape the %
I think you do:
"23**%** tax ""
it needs to be %% to escape the %
interesting, I don't remember anything in the lessons saying that, so that's probably why it didn't work, but would've been nice of them to tell me that, lol
it would have told you if you had error messages and if you read the online docs it's in there
generally if you use something like %n, or \n you need to escape the % or \ character so the computer knows what to do
the only error messages popping up said "exception in thread 'main'"
what are you running it in
there should be a backtrace with a much more detailed description
it's the zybook web compiler, cause it's for school
agreed, but unfortunately, I don't have the influence to make my uni use a proper code compiler 😭
just use System.out.print
I'm able to fix it. Thanks for helping!
I'm just missing some stuffs, I forgot of where to put it
I'm able to develop it to be functional. I forgot to put the image query
that's good keep it up
I'm only confused of how to use the typewriter effect
I saw a bit of it in the forums, but I'm still confused
It's not that neccessary, but I'd want to be able to learn this just in case
well indian youtubers really help you with that xD
they really do
they explain better than my professor
agreed
i got this off stack overflow these examples might help you
HTML:
<p class="typewriter">Hello, world!</p>
CSS:
.typewriter {
animation: typewriter 1s steps(14) infinite;
white-space: nowrap;
overflow: hidden;
border-right: 0.08em solid;
}
@keyframes typewriter {
from {
width: 0;
}
to {
width: 100%;
}
}
idk if it helps you yk i'm into desktop app and game engineering
worth a try, will try it layer
dat fine
I think I should make it atriggered by a click or smth
They said that python is stupid, but I definitely can see why people use it:
entropy calculation on a dataset in like 5 lines of code
who is 'they', because that's a stupid thing to say
You'd be surprised
I wouldn't.
🗣️ mojo lang
I don't trust languages with a "contact sales" button in their header
Mojo is a meme language atm
Interest may return when they actually deliver on their promises
Hello, I'm not really great with coding and I don't know exactly where to ask this, but I'm assuming in this channel is best. Does anyone know how to code your own bot on here?
Discord Bot?
in what language? i know JDA for java
Has anyone done a game jam?
i use python for my discord bots
how much fun can you have with an rp2040 with only i2c and 4 adc pins broken out?
I mean… I really didn’t like python syntax so I’d not prefer that for my self
What do u mean by “Game Jam”
making?
do you have any published bots?
no i havent published a bot
oh ok
It's not stupid, it's more that many people (including me) find its syntax akward... and well let's not talk about performance
Pandas, numpy, scipy all wrap C code so it's fast
That is true. You should just use libraries for EVERYTHING essentially to make python not be incredibly slow
I've never had to wait on python programs
Programs often need to wait on me though
I'm the bottleneck 
Hahaha yeah that is true though. But you can measure the difference in speed
huh 😭
im sorry idrk what that means, can you explain pls?
Java is programming language and JDA stand for Java Discord API
ohhh, i think its JDA
yup there are so many tutorial on it but you need to understand the base of Java and also you might need to use a Database i'd prefer SQLite for discord bots
okay thankyou :D!
yw bud
feeling very tempted to host my own gitea instance for the "swag" of a selfhosted git on my own domain, but at the same time, it'd be pretty shitty if my server died and i lost all my repos 
I'm going to need you to pay for every git download thanks.
My name is Unity and you're watching the death of a platform channel.
function decodeString(str) {
const arr = [];
let tally = "";
for (let i = 0; i < str.length; i++) {
const char = str[i];
const charCode = char.charCodeAt(0);
if (charCode > 47 && charCode < 58) {
tally += char;
} else if (charCode > 96 && charCode < 107) {
tally += charCode - 97;
arr.push(parseInt(tally));
tally = "";
}
}
return arr;
}
Is it possible to make this one go faster?
It's already O(n)
If you want it to go faster write it in Rust or C
Oh
Wait, you're doing string concatenation
Don't do that. Use a string builder object or use a character array and join them for your tally variable instead.
Every time you're doing tally += you're creating a new string which is slow
Apparently it's faster than doing arr.push to build a string
hmmmm
Apparently concat is the way to do it on javascript
Oh okay, I'll check it
const integerArray = [864, 3710, 3698, 523];
const packed = integerArray.map(num => Math.floor(num / 10) + String.fromCharCode(97 + (num % 10))).join('');
console.log(packed);
// 86e371a369i52d
Basically this is what I'm doing. I take integers and I pack em into a string
For less size
So decodeString just turns packed into integerArray again
you could pool web workers or try to compile wasm
anyone know how to make voice commands using unity?
what can you do with arduinos? ive been using them for keyboards but idk what i wanna do with it outside of that, i want to try something ig
you can do a load of things with them, I know someone who uses one to monitor the hydration of their indoor mini-farm, and water the plants automatically when they are away from home, I know of other people who use them to trigger smart home automations depending on what room they are in using motion sensors. Arduinos are incredibly flexible
they are just microcontrollers so basically anything. Arduinos are imo overhyped and there are better options out there at a much cheaper price
i mean its not an arduino arduino, its a processor supported by arduino library, i just dunno what would be fun with em
I really like platform.io IDE for microcontroller development
find a problem try to solve it
eh im pretty happy with what i can do on like, x86
dunno whats exactly useful abilities of a mcu
the whole point is that it's low power
depends on the exact model, but for example the uno r4 has CAN Bus, wifi, bluetooth, UART, I2C, SPI support as well has just plain ole digital ON/OFF pins
fun little project could be a gps clock?
hmmm i got a good idea, why don't somone try to make laser tag, that is compatible with agumented reality so you can see the real laser shots
ESP8266/32 open a ton of doors for projects involving cheap networking.
Just... don't be stupid about what you expose directly to the internet.
MCUs and boards come in all shapes and sizes but modern ones are often defined by tons of CPU power but not much memory.
I mean you could just use a smoke/haze machine, which is already common practice.
any other recommendation other than godot 4?
Unity?
nah
Maybe not the right place to put this parody of the unity statement, but it will affect devs so....
Basically. If anyone hasn't kept up with the unity drama, this will tell you most of it
Not really true
If you look behind the lines, the whole thing to get devs to use their own ad platform since if you use it then you get a 100% install fee waiver
Unity's concepts set an incredibly dangerous precedent of charging users per install, rather than for a license (which can have unlimited installs). Imagine a world where every time you install Microsoft Word you have to pay some amount.
It may not even be a large amount, it could be like $0.01. But the concept is certainly there about adding what are essentially microtransactions to everyday software.
They've created a business model that is even more devious than the subscription model.
So yeah, if Unity's business plan fails spectacularly no one will do it. Which I think is a good thing for the health of software as a whole.
I'm going to need you to pay for every time the car that you sold 6 months ago drives on the road.
Not to distract from the unity conversation, just a quick question. I’m going to start learning to code tonight, idc if it’s. Just 10 min. Would anyone recommend something other than python? If yes, I’d appreciate suggestions. I’m in the process of career shifting and figured understanding the basics will help me decide which path to travel Down further
PPM- pay per mile
Sure, C#
It's better than others in its same class because:
- It has excellent documentation
- It's packaged into Visual Studio and setting it up and running it is easy
- Visual Studio's integration makes it easy to learn about things like debugging, offers helpful hints and suggestions, and comes out of the box this way
- It's a useful and prevalent language with large real-world use
Not quite the same, since miles represent actual depletion of the car's actual lifespan. The more miles driven the fewer miles the vehicle can be driven. This means it's a devaluation so paying per mile is not an unfair bargain necessarily. Installing software does not degrade the software or any license to use it, its value remains independent of number of installs.
yes, I was just saying that leasing is basically pay per mile
It's a bit more nefarious than that but yeah
thank you for the detailed response! Im reading up on c# now.
There there is always LibGDX for Java
i used to create my 2D games using that but yk after awhile your brain just gets tired using this goddamn boring framework
i just moved to unity
and yk it's good, i like it
it's like i'm using unity about a month i really got good at using it
user-friendly interface
yall I need some advice
I’m looking to buy an M2 Mac mini for software development, because rn there is an insane deal for students (100 dollars off plus an 100 dollar gift card, so 400 dollars total), although I’m trying to get a second opinion. Any advice?
I already have a Magic Keyboard and mouse for my iPad so I save money there
Has anyone here used Xcode on a Mac mini m2? How does it perform?
I mean you're limited to macos is really the only downside. Technically you can use asahi linux but it's still in alpha releases.
m2 processors are very quick, xcode and whatever else you want to run shouldn't have any issues.
I already have a nice windows pc
this would be my schoolwork/ios development machine
Then sure, you'll be hardpressed to find an equivalent machine for that price. Of course the baseline configuration tends to skimp on memory and ram.
Q='Hello, ... is your name? '
print(f'Welcome, {input(Q)}')
``` ```
Hello, ... is your name? nelson
Welcome, nelson
``` 🙂
So many choices in python...
It feels like the same I ain't gonna lie, it's fun too
yeah my mainreason for posting my reply is thqt its counter intuitive; most expect the welcome to be printed first followed by the question
print(f'Welcome, {input("Hello, ... is your name? ")}')
``` maybe its more clearin a one liner what im pointing out
stringmanipulaion , python is indeed really king there
like unicode by default , try dong that messin c without pullingyour hair out :p
I haven't exactly learn c in general, I gotta focus in js and gdscript. Thanks for the advice!
Try messing with matrices in c
I'm going to have to hard disagree from both an English and clean code perspective.
I’ve used it on an M1 Mac Mini and it was pretty good. Though I’ve also done development on a 2012 MacBook Air.
Just kinda depends on your build process. The M2 is pretty solid overall though.
M-series processors are fine for most and perform well, just make sure to buy all the RAM and storage you want upfront because Apple provide no upgrade path.
Any regex wizards in here? I'm parsing through html files, and need a regex to match something like
<input [should not have type="..."] >
trust me i've tried
you could also just use jquery
I'm parsing them as text files, with nodejs, not a frontend thing
so no jquery either
$.get('file_to_read.txt', function(data) {
do_something_with(data)
}, 'text');```
you can use jquery in the backend it's just a JS library
sure but it wont be able to parse as html, it's an Angular file
with custom decorators and stuff, otherwise i would've used node-html-parser
oh gotcha
so yeah in this use case the probable best alternative is a regex that can say "has this in both ends, anything at all in between, but also not specifically type= anywhere in between"
give me a minute
<input.*type="[^(text)].*>
or for multiple types:
<input.*type="[^(text)(number)(password)].*>
i dont think thats how [] works
ahh no bars it's been a minute
what flavor is that
[] matches only single characters.
putting () inside [] just matches ( or )
you probably want negative lookarounds
but arent lookarounds just ahead and behind, not inbetween?
you can do it if youre tricky, i dont have the example off the top of my head
ohhh yeah we can just use a lookahead
I think it's gonna end up being easier to match the input field with a regex (i already have that) and for each match, just do a !string.includes("type=") i guess
try this
its more readable
<input.*type="(?!text).*>
the check is for should not have type at all, rather than just text type
ohhh gotcha
if node html parser libraries could learn to just... quietly ignore all the angular syntax, unknown custom elements and directives, i could just do something like $("input:not([type])") and i'd be done in 15 seconds
^(?!<input.*type=).*>$
?
<input((?!type=").)*>
Another solution like you were saying is to render the angular into html. I don't use angular but you can do something similar with like razor templates.
Hi guys anyone here?
No
Never
All messages in this channel are actually sent by bots, including this one
bot reporting 
404, bot not found
it does offer the most bang for buck on the market rn but if youre a student i wouldnt recommend it entirely the reason being you will most likely be trying stuff out aand exploring softwares which dont always work on macos. if youve already specialized in a certain type of development which you know will work on mac then go for it
most of the time its not an issue and there are ways to circumvent those problems but yeah
Are there any iOS developers who want to collaborate on making a new (actually decent) professional manual camera app?
There are genuinely no good ones. I’ve quite literally tried every single one. So I’ve designed the UI and just need a developer to actually make it
(It would be going through my companies developer organisation)
Drop me an email at info@shaunclarke.co.uk if you are interested!
i dont think ios exposes much in manual settings
Nah there are other apps that has everything, it’s just they’re all really bad UIs and they don’t label things properly
Native Swift?
Any parser and lexer code using C++ specialists on here? I'm an online college student, and my professor hasn't responded to my question in over 3 days (project is coming due in a few days and I'd rather not wait till the last minute). I'm not asking for someone to do the project for me, just trying to get unstuck.
Don't ask to ask
Just ask your actual question and if someone can help you they will
what is ur question
is anyone good at java and can tell me what im doing wrong in trying to round the money amount to 2 decimals(im a newbie so if this is a dumb question sorry)
month1Interest + month1Interest
"850.0000000000001" + "1868.00"
You're concatenating the unrounded variable to the rounded variable.
Oh I see, so it was a super simple solution, thanks.
ive got an extra adc/pwm pin, i want to do something fun with it, but unsure what'd be interesting, so far ive got ideas like "LED" and "potentiometer" and "speaker"
How do you get a month from using integer values 1-12 to display a person birth month in java? I can only find tutorials on //java.util.Date giving time and day but I only need month using 1-12, is there an easier way to do this instead of declaring each number a month with 12 lines of declarations?
you could make an array to hold the months in order then use the number as index
whats an array? (im in an intro to java class) so not familiar with alot of terms yet, my teacher is also shitty so have to self teach alot of stuff through w3 and other sites
import java.time.Month;
...
Month month = Month.of(10);
System.out.print(month); // Prints "October"
thank you, so to recieve input do I just import java.util.Scanner and then do month.nextInt() or how does that work since month isnt an int or double etc , i.e "Please enter a value 1-12" , user enters 10, print month october etc
Scanner scan = new Scanner();
int myInt = scan.nextInt();
Month myMonth = Month.of(myInt);
I've finally found one
a wild Fleet user
its either Fleet or IDEA, these days I cant decide, the UIs are so similar
well you need a prompt I guess idk
I'm a poetry convert
it downgraded the package to the one I wanted 
Poetry is one of those tools that usually does what it says on the tin, but it makes everyone else's life miserable and when it doesnt do what it says on the tin, god fucking help you
I think one can say the same of pip really
NPM
APT :P
I was a pip boi for while but poetry has been really clean. I like how it handles everything
the screenshot from above looks like IntelliJ Idea (to me)
Anyone here good with html? I've made a digital calculator collection webpage, https://irish.repair/, but can't figure out how to scale the grid to fit the image
Don't use grid use flexbox https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Our comprehensive guide to CSS flexbox layout. This complete guide explains everything about flexbox, focusing on all the different possible properties for the parent element (the flex container) and the child elements (the flex items). It also includes history, demos, patterns, and a browser support chart.
lol i just finished switching from tables to grids
but i'll take a look at flex boxes, thank you!
Yeah, let each box decide how big it should be.
that fixed it, thank you so much!
Anyone knows how to remove the bottom menu? I only want the left menu option. Editing FlyoutDisplayOptions doesn't seem to change anything.
Thanks!
I have been informed that
W I D E T A B L E time is here
https://blog.cloudflare.com/d1-open-beta-is-here/
Normalisation? Hardly new her.
serverless
sigh, another technology that's the cutting edge that I need to catch up with
*SQlite
It's just managed sqlite
Ok, it has a few bits that make it easier to use for a distributed service (like backups)
But it is for most purposes just sqlite on the other side of an API
I got this rock paper scissors project and I can't figure out how to count how many times someone has won a round so I could then print who won the game. The game only has to have 3 rounds. Heres the code for the game so far
for (int i = 0; i < 3; i++ ) {
int roundWinner = doRound(p1Name, p2Name);
if (roundWinner == 1) {
winnerName = p1Name;
}
else if (roundWinner == 2) {
winnerName = p2Name;
}
else if (roundWinner == 0) {
winnerName = "";
}
announceRoundWinner(winnerName);
}
I just gotta figure out a way to know how many times winnerName has been assigned to p1Name and p2Name and whichever is greater would be the gameWinner.
/**
* Requires: p1Name and p2Name are the names of the respective players,
* gameType can be 1 for regular rock-paper-scissors
* or 2 for rock-paper-scissors-lizard-spock
* Modifies: cout
*
* Base Project:
* Effects: If gameType is 2, prints "Under Construction" to indicate that the
* s'more has not been implemented. Returns empty string.
* Otherwise, plays exactly three rounds of rock-paper-scissors while
* keeping track of the number of round wins for each player.
* When a round results in a draw, neither player is the winner,
* so neither player is awarded a point.
* After each round is played, the round winner (or draw) is
* announced.
* Returns the name of the game winner, or "" in event of a draw.
* Prompt: Under Construction
*
* S'more Version:
* Effects: Has same functionality as base project, but also handles a
* gameType of 2. When game_type is 2, plays exactly three rounds of
* rock-paper-scissors-lizard-spock. Keeps track of round wins for
* each player and announces round winners in the same fashion as
* described above.
*/
string doGame(string p1Name, string p2Name, int gameType);
thats the rme for the doGame function. Im trying to figure out the keeping track of number of round wins part
well theres 2 routes that seem straightforward to me:
- have an
intfor each player's number of round wins and compare them after the game ends - have 1
intthat would start at 0 and go - or + based on who wins rounds, then if its negative you say player 1 won or if its positive you say player 2 won.
either way, make sure you define it outside of the for loop because youd want the value to persist through each iteration of the loop.
right but how do I get that int value in the first place, since the for loop doesn't return anything when it runs.
doRound returns an int value but idk how I would implement that
how do I count the number of times roundWinner is equal to 1 or 2?
so umm you were right, thanks
string doGame(string p1Name, string p2Name, int gameType) {
// TODO: implement
string winnerName;
int roundWinner = 3;
int p1Wins = 0;
int p2Wins = 0;
if (gameType == 2) {
cout << "Under Construction";
return "";
}
for (int i = 0; i < 3; i++ ) {
roundWinner = doRound(p1Name, p2Name);
if (roundWinner == 1) {
winnerName = p1Name;
}
else if (roundWinner == 2) {
winnerName = p2Name;
}
else if (roundWinner == 0) {
winnerName = "";
}
announceRoundWinner(winnerName);
}
if (roundWinner == 1) {
p1Wins++;
}
if (roundWinner == 2) {
p2Wins++;
}
string gameWinner;
if (p1Wins > p2Wins) {
gameWinner = p1Name;
}
else if (p2Wins > p1Wins) {
gameWinner = p2Name;
}
// NOTE: return "" to avoid compile error
// remove it after implementing
return gameWinner;
}
it works now, I don't exactly understand how because I thought the for loop would just run 3 times before the compiler would look at any code before it, but I guess adding the code outside the loop works for some reason. Thanks again
ugh, Stackoverflow is offline, now where am I supposed to copy/paste learn how to fix my issue.
oh no, if stackoverflow goes down and the stackoverflow devs need help figuring out how to fix it where do they go
stack underflow
Load up dev site on their own machine
would it use all the same data though or just test data
All data is test data if you suck at testing...
a lot of places just scrub prod data for test use
its back online now anyway
Anyone know any good one function implementations of SHA3 in JS? I can only find simple one function implementations of SHA2 etc
Hey I was curious about using a Linux distro on my gaming PC. Is it worth having a dual boot of windows 11 and a distro like Ubuntu? More detailed posting: https://discordapp.com/channels/375436620578684930/899753979108552774/1158154212199370892
See #linux
already did
dualbooting works fine
this tbh
My code wasn't working so I went to bed
I ran it this morning without any changes, and now it works
fuck
Sounds like DNS
ML is a wild beast
sometimes it works when it shouldnt, and others it should when it doesnt
Hey can i get some input on this powershell script i found? I changed a few parts but for the mostpart its unchanged. All it looks like it does is start EXO module, grab distro groups via upn, then export as a csv. I'm still super new to powershell but it looks like it would work to me. Any thoughts?
Nevermind, I ran it in my sandbox and it worked. gg
"Programming doesn't have math"
Me:

Programming is just mixing math with words to make sand think
If you think about it we're all just spellcasters
Hey guys, is this the right place to talk about a problem of my attempt of a discord bot? I have some strugglest I cant get past with
Sure but I don't know anything about discord bots
I should call myself a spell-caster when people ask me what I do for a living 😂
"what do you do for work then, John?"
"I engage in the ancient arts of wizardry, commanding both man and machine to work in harmony"
"uhh? nice?"
"evil cackling in the distance as thunder cracks across the skies above yes, nice indeed"
Don't forget to mention you live in an old abandoned church on a big mountain where there's always dark clouds
oh that wasnt a given? My bad, must come with the poor social skills haha
Not all programmers have poor social skills tho
At my first job there was a senior developer who was kinda acting like my mentor for learning programming haha. He had great social skills (he was a bit awkward sometimes, but he was a good comminucator in general). Learned a lot of that guy and I don't think I would've gotten very far without him.
oh yeah, I was just pointing out that is also isnt uncommon for us to suck at communicating haha
True, but if you want to be a valueble developer it's something you should learn to be better at. I am also pretty shit at it, it really depends on the team.
At my old job I was okay in it, on my new job I suck at it cuz I don't have a connection with these people
No common interests, big age gap etc
thats one of the reasons I both do and dont want to write code as a job instead of a hobby.
I love talking to people, and I can be a great communicator, when I am comfortable with the people I work alongside.
I struggle bridging the age gap that often exists in these places in the UK, because I am 21, and a member of the alphabet mafia, whose only real interests are software, computers, aircraft, and motorcycles. Compared to the interests that the older generations tend to have where code is their job, and something they wont discuss outside of work, or on break, and their primary interests are football and Brenda from accounting.
There isnt a whole lot of common groundon which to build a relationship and get to know one another, when there's nothing in common you can use as a diving board
also imposter syndrome, thats a big kicker
I'm in the same boat as you. I am now 24 years old, and I got 7 years of experience as a c# dev. My old job also had an age gap I was 17-22, and they were like 30-50. However most of them had the same hobbies as I did. Some liked gaming, and also programmed in their hobbies making tools etc. an older collegue got me into homelabbing and another even older collegue hooked me up with a decent desktop pc so I could get started.
Where I work now they are all 40-67 years old, and they don't have any common interests. 2 of them fly a race drone which is kinda cool, but that's bout it.
Still working on my bachelors atm, but I am almost finished. When I am done I'll be looking elsewhere
I dropped out of college because I didnt enjoy having to tutor my class, given that the lecturer wasnt willing to put in the basic effort of administering the coursework in a way which could be understood by the other students, I luckily had enough knowledge of python that I could just about scrape by without the class, so I was the one people ended up going to, dropped out mid way through my second year because I didnt fancy going through another year of hell in that course
now I'm in the boat of "I can do XYZ but I dont have the paper that says I can do it", which is leaving me without even being an option that gets considered for almost any position I apply to
I was also tutoring my class (previous course) haha
Yeah not having papers sucks
I do have some papers, but nothing very impressive really, but enough to get jobs, but a bachelors is really required if you want a higher paying job
I will be done over like 4 months, so almost there 😄
I'm looking into going back and starting off from fresh at Uni next year, need to figure out how funding works for it because its different here in England than it was when I was in Scotland, looking at doing a bsc hons course at UOL
What is bsc?
yeah, the course im looking at is a 4 year B.Sc course with honours
but really all that honours part means is that you only get it if you finish really high in the course
otherwise you just get a B.Sc without the honours
Probably doesn't mean shit to an employer
An employer in NL looks at if you have a bachelors, and how much experience you have
Good scores only really matter if you have no work experience tbh
Maybe if you wanna work at google it matters, but for most jobs, probably not so much
around here they check these things a lot apparently
Ahh
idk anymore tbh, things seem to change weekly ¯_(ツ)_/¯
Maybe then it's worth it 😄
I'm just doing a part time bachelors course. It was supposed to take only 3 years, cuz I skipped the first year, but I started my 4th year now cuz I had some delays due to covid
We don't even get to do a minor lol
the course im looking at is a 4 year course, but can be done part time over 6 years, which is nice, I may have to take the 6 year option since I likely wont get full funding to support myself and will need a job still to ensure I can pay for my accommodation
Yeah thats what I did too
But 6 years, that's a long time
I was already burned out before I started lmao. Could never imagine doing 6 yrs
yes, yes it is. if I start next year, I would be graduating when I turn 28...
I would literally be reaching midlife crisis territory around graduation haha
Luckely my tutuition (or however that's spelled) isn't too much for me
I paid like 8k so far, and I don't expect to pay anymore
first year was like 900 euros, second year 900 euros, thirs year 1900, this year 1900.
So that's what, like 6k only
I dont even know how much it would be for me here
but I know it isnt close to that cheap
first year is 50% off, and second year was 50% off due to covid
Americans pay that each month lmao
But it's so cheap because most of it is paid by the government. If I wanna do a second bachelor I'll pay the "real" price
yeah
I still think it's expensive for the amount of work done by the university itself, literally everyuthing is via teams, and I haven'd been inside the school building in over 2 years
my current biggest issue is that I only have a desktop, so even if I wanted to go to uni, I would have to get a laptop of some sort, which is the most expensive thing for me even with funding, since even with a student discount I would be looking in the higher end range of laptops to do coursework during classes.
Bro, get a refurbished enterprise-grade laptop
Put in a bunch of ram, and hope it';s a decent screen
You don't need a wicked-fast processor, just good ssd and enough ram
Make sure the outside is metal so it doesn't get destroyed when you look at it
Just a decent i5 with 4 or more cores will do
yeah, im looking at a mac simply because ive found apple's laptops to be the easiest for me to use, which is annoying tbh
I don't think a mac is a good choice for a CS course
You'll probably be using software which doesn't run on mac
would you mind listing some examples? everything I currently use runs on all three major platforms, so I'm a little out of touch haha
also keeping in mind this course is based on python since it has a focus on AI/ML
Ahhh, AI/ML does require some beefier hardware
Not sure how a mac would compare then.
M1/2 mac should handle AI/ML decently, since it has accelerators built in for that
My course is mainly learning programming and did a small AI/ML assignment which I've trained on my desktop pc
And my laptop had a quadro gpu so that one also could do the job
My first course (wasn't bachelors) was app development and many tools were windows only
even buying refurbished I'm still looking at £1,000 for an M1 mac with 16gb of memory, which would barely sturggle along with most workloads
nah you need 32 for ML/AI and big-data
However, maybe a potato is good enough, and you can train it in the cloud
I just don't know if that's viable for you and if it's possible for your assignments
depends on your dataset, I was doing processing with whisperx on a GTX 1660 and system memory never went above 12GB (including GPU overflow and Windows overhead)
Lol wtf, my pc is already using 9gb after a cold boot
I have discord open, whatsapp and 7 browser tabs lol
if I can justify the cost, I could probably use my server thats in the garage to do ML training on, would just need to find a way to stuff a GPU in there since it hasnt got PCIe power connectors anywhere on the board
And this, but everyone memes on this lmao
Yeah host a vpn on your server if you don't do that already, and use that
Or maybe buy a upgrade kit second hand for 200 pounds with a decent ryzen processor and put a gpu on it
I have two instances of firefox (total roughly 20 tabs), Webstorm/IntelliJ, VSCode, Discord, and Bruno
why is bruno highlighted lol
though, granted, thats Debian im running on, so memory usage would be lower
hyperlink
This is my usage on debian lol
But tbf half of it is ZFS, so it doesn't really count
It would be a struggle to get it running modern hardware, its a HP DL360 G8 1U chassis, two sockets and 32GB of DDR3 prowess
No I meant, just buy a cheap pc with a decent ryzen processor and slap a gpu in it
And a cheap laptop
And then it's just as expensive as a decent laptop lmao
ah, fair enough lol, I could do yeah, if no particular reason I couldnt just run an SSH session from cheap laptop to cheap server box through a VPN
Run tailscale on them, if your ip changes it doesn't really matter
I run a dynamic dns client on my server in a docker container which updates dns records at cloudflare, which works for me. But tailscale is easier
ironically, I'm doing the same since some of the services that power TWDB are running on my garage server instead of the cloud VPS ive got for the really important ones
I just saw your site, looks sick
Maybe look into cloudflare caching to reduce hosting costs
hosted using R2, cf pages, cf workers, Stream, Images, KV, D1, and Queues 😉
the costs are about as low as I can get them for the content that is being served currently, only thing left for cost cutting is getting rid of the cloud VPS, but that cant happen since my home upload isnt good enough (thanks Virgin)
the prototype of the redesign looks a lot better, even if it doesnt function properly yet
Oh that sounds a lot more complex than I thought at first haha
I thought you just indexed the thumbnails, youtube chapters and put it in a db, and then just embedded the yt link with the timestamps
the easy bit was the UI, the difficult bit is the automation
I dont wanna be awake for WAN show every week, I want and crave sleep. But I also want the archive to be as complete as possible
I technically do, but also, I have indexed the VOD, the audio stream of the VOD, and even have an AI generated caption track for each VOD
(hence the WhisperX workload mentioned earlier)
also scaling doesnt work very well yet
Ahhh. Make sure to document it really well so you can put it on your cv/resumé
It's really impressive for a hobby project
prototype redesign: https://proto.thewandb.com/
re cv/resume, yeah, thats one of the things im doing it for 😉
the thumbnails wont load btw because I purged the CDN ahead of an update I am coming out with soon™️
Looks sick bro
scaling still isnt great, but its getting there, the search box will be crushed into a burger menu on small screens and mobile
My front-ends look like a kid took a crap and called it a day haha
The options menu needs a bit of white paint btw
Anyways, I should really get back to work now
Was fun chatting with you 🙂
oh boy, trust me, ive been there.
options menu is coming from a third party UI lib, and for some reason refuses to accept color hints, so I'll be rebuilding it before it goes to prod, dw 🙂
enjoy your work
Thanks 🙂
Most classes for AI don't have exceptionally large datasets.
I completed all of my AI courses on a framework running an intel processor.
GRANTED, the final project was a chore because it took like 20 minutes to train the model, but it was a google codespace so it didn't actually use my hardware.
That's good to know, thank you!
Rant: Every time i have to develop for iOS i hate the platform more nad more and more
simple fix: dont
sure, tell that to my boss 😄
feel free to send me his email, I'll write you a letter saying that forcing you to do iOS is an abuse of human rights under the "cruel and unusual punishment" conventions 😉
are memes allowed here
Is there a need to protect routes like password-reset or other sensitve actions like that?
Well I'd use a bit of common sense there. If you're emailling reset links you don't really want a flood of those, or allow people to identify valid accounts they don't own by attempting to reset a lot of accounts at once/bruteforce passwords. You probably also don't want unauthenticated routes hammering your server either for performance reasons.
is there anyone here that can help me with a little python code please?
i got this error and i cant figure out why
You’re not passing data
Dictionary.get(key) can return None (as opposed to Dict[key] which would just return a KeyError), my first instinct is that results.get("columns") is returning None.
thats what im thinking
but idk why
would ot help if i shared my whole pyhton file?
well step 1 is to confirm the theory, get a print or some kind of visual feedback that can confirm that results.get("columns") is actually giving you None, then step 2 is to figure out where or why the columns key isn't being set to an expected value
i would say render_template expects app, template, context, and you are not passing app, you are passing the name of template as 1st parameter and then instead of a context you are passing parameters which should be map ? (never did python or flask)
but seems like how you do is fine
and instead the columns parameter you pass is empty and not an array
could be as simple as your query not returning columns (metadata) when there is no result
Can I ask coding related questions here?
I dont know, can you?
it is infact a possibility
i do agree
Yes
thats the question
He will prob redo the line lol
Unity CEO got the boot
https://www.gamingonlinux.com/2023/10/unity-ceo-john-riccitiello-is-leaving-effective-immediately/
im learning python at the moment
and tips to get better at it. i got an coding exam in january for python
best way to learn is by doing a lot of the time, so find some programs you would like to make for yourself and just make them
I paid 10 euros for copilot to suggest this....
Create some tools like a file migrator, Spotify Explorer, statistic dashboard based on open data
okay
make little minigames like hangman, madlibs, wordle, etc
go to the local zoo and talk to the natives
Just use it to do tasks that interest you.
Scraping websites for data, Transforming spreadsheets and CSV in Pandas to get more interesting results is both fun and a very employable skill, to my understanding.
Made a Discord bot to hit Jagex's APIs for player data and scraped GE data off another page when I couldn't pull it from an API
Work's time tracking sucked so I scraped that, parsed it and compared with my own time tracking for discrepancies
Find stuff you want and get it with Python, basically
python just gives you a : SyntaxError: invalid character ';' (U+037E) wich also is enough imho , zig does something similar : An error occurred: playground/playground278011722/play.zig:4:94: error: expected ';' after statement playground/playground278011722/play.zig:4:94: note: invalid byte: '\xcd'
rust be like
in the year 200BC the greek society boasted a new symbol in their alphabet , the writer and historicus plato discribed it as a welcome and highly needed .... .... futher more when the printingpress was invented in the year ..... .... we also project that by the year 2610 this symbol and unicode for that matter .....
want to really confuse a javascript programmer , write jscript and execute it natively on windows :p
i want to state that my favorite javascript extention is nojs ... 🙂
Golang also does something similar as well:
# command-line-arguments
./main.go: invalid character U+037E ';' in identifier
funny thing is that 80% of python programmers dont even know you can use the semi-colon as a separator between statements ```py
print('');print()
im learming to program a discord bot and im trying to make a kick command but i have an error
code:
@client.tree.command(name="kick", description = "Kicks a user (No admin abuse!)")
@commands.has_permissions(kick_members=True)
async def kick(ctx, member:discord.Member, reason: str =None):
if reason is None:
reason="Reason Not Provided"
await ctx.guild.kick(member)
await ctx.response.send_message(f"User {member.mention} has been kicked for {reason}✅")
@kick.error
async def kici_error(ctx, error):
if isinstance(error, MissingPermissions):
text = "You dont have permisson to run this command❌".format(ctx.message.author)
await client.send_message(ctx.message.channel, text)
response:
The application did not respond
client.send_message does not exist
also you're eating all errors that arent MissingPermissions in your error handler, so you wont get any other error messages
dont know anything about discord bots but ... isinstance checks if an object is of type
that error says that you dont have permission
MissingPermissions refers to the user missing permissions based on your decorator
(also id strongly recommend you join the discord.py server for help instead of asking here)
trynna get git/github working for the first time rn for a school group project, with pycharm specifically, but every time I try to clone it makes me reinstall git and then after i press clone it just says "clone cancled" and i cant open or edit the file, only delete it, anyone know what im doin wrong?
Does anyone know what CoBRRa is?
good and enlightened people of this chat: How do I move images to be on certain parts of webpages in markdown? I am a complete noob who decided to get a HUGO website running and idk how to do it. Adding the image in via HTML and going that route as searches on goolge recommended did not work at all (the image didnt even show)
That displays the image, yes, though how do I move the image to a certain side of the screen? Resize it?
wdym by move, show screenshot
As in the image is centered on the webpage, I want the image to be on the right side
so that's styling, idk how hugo works but from what I read markdown has little to no styling options
so either you modify the template or embed html that has styling
Would anyone be able to help me figure out why a java program is not reading form a config file?
Im looking into Rocketry, pretty new to this and want to get started in developing flight control software etc. etc. What will be a good CFD to do this with?
what type
so generally rocketry you don't have any custom flight software
you use off the shelf components
for simulation most people use openrocket
this is based of several equations that model generally the flight
CFD is not needed
I’m making my own rocket, as well as the software for it
Wasn’t sure if openrockrt supported that
Well yeah you just put what motor you have and the construction
That will simulate your flight
Go to the r/rocketry discord for more info
about to drive for 30m again, but if nobody else can help you DM me exact error msgs and what you're trying to do and incl. details like what os you're on, etc and ill try assist when home
same as i just said to naneek
reinstalled 3 times and it worked out, ty for the offer tho. any chance you could help with a python issue tho? i made it work but it seems like theres a way better solution than 5 if statements
if currentScreen == 1:
screen1()
if currentScreen == 2:
screen2()
if currentScreen == 3:
screen3()
if currentScreen == 4:
screen4()
if currentScreen == 5:
screen5() ```
my first instinct is have a:
screen() function instead of screen1 screen2 screen3 etc
thats the code, it does work, just it runs on every frame and 5 if statements seems unnessecary here, but idk a better solution. inputs are always 1-5
those 5 functions are about 90% of the code so just wanted to seperate them a bit, and either way id have to have the same if statements
also, mostly unrelated, you should use elif after the 1st if statement. if currentScreen is 1, itll do the first bit but then itll unnecessarily check if its 2 3 4 or 5 etc whenever it was already decided that its 1. elif will make it so that if a statement is true, itll skip over the rest in the group of elif's
thats actually a good point ill switch that ty
well shouldnt make a difference since it returns tho and ends the function right?
cant hurt ig
Use a dict of number: function
idk what that means, could you explain more?
From there it's just a matter of
lookup[currentScreen]()
it would go:
printScreen1to5(currentScreen)
----> screen1()
<---- return
| now you're back to where you were in printScreen1to5() (right after where screen1() was executed)
lookup = {
1: screen1,
2: screen2,
... etc
}
but if you did
return 1
print('x')```
i dont think it prints x ever
yes, but if you did ```py
def main():
xyz()
print("x")
it would
sorry ive never actually used that, how would i call it, would it be like lookup[currentScreen]?
Yes
ohhhhhh im dumb mb it used to have a return in the if statement lol mb
You're grabbing the function from the lookup table, and then you call it with ()
yeah u right
so there lookup[currentScreen] would bring you to the value of the key currentScreen in the dictionary called lookup, which in that case would return a function which u can then call by adding () after it
so itd be lookup[currentScreen]() to call the function associated with the value of currentScreen (i.e 1: screen1 or 2: screen2)
not to be confused with the return value of a function which would be like 1: xyz() with the (), which would call the function. here you wouldn't put the () because you just want to reference the function to call it somewhere else
yeah you right, thats mb, i thought the xyz() was replaces with a return function, forgot i changed it
i have this
def printScreen1to5(currentScreen):
lookup[currentScreen]```
and it just fails and says: TypeError: 'set' object is not subscriptable
Something is different from what I sent here
Namely, you're missing the numbers, and you're also calling the functions, which you don't want to do.
so a dictionary (which is { and } encasing things) requires key: value, youd use the key to get the value. key here would be whatever u want currentScreen to be in order to refer to a function, value would be a reference to that function, (the function name without the () )
ah ok ty, idk what a dictionary is before now sorry
did this and it didnt work
lookup = {1: screen1, 2: screen2, 3: screen3, 4: screen4, 5: screen5}
and then you would take that reference in your printScreen1to5 function and then put the () after it.
so after running lookup[currentScreen] youd have a reference to the function you wanna use
that you now want to call with a () after it
wait sorry where do i use the parenthesis?
so if currentScreen is 1 and you run lookup[currentScreen], you basically now have the line screen1
so slap the parenthesis after lookup[currentScreen] to make it lookup[currentScreen]()
to make it a little bit less daunting, its like saying:
func = lookup[currentScreen]
func()
youre just skipping the func = part
yeah ig that makes sense, just overthinking it
wouldnt that define func as a variable tho?
yeah. it'd be useful if you needed the func variable elsewhere in your code but you dont so just doing lookup[currentScreen]() has the same effect.
ah that makes sense ig. also one more question why isnt it just screen1() in the set directly? also could i replace those with like strings if i needed something similar for something else?
Hey developer friends.. Are any of you familar with the luhn algorithm?
Yes. 🎉
...Were you ever planning to ask a relevant question or is this just a survey?
oh sorry I had to run
lets say you were a professor, and you made an asssignment based on coding a simple python program to verify if numbers should or should not be valid based on CC issuer, and report errors. If you did it efficiently, 23 lines of code
2nd half of assignment was a write-up explaining the logic behind everything'
the prof turned the 1st half into turnitin. the entire class got flagged.
since half the code is literally set ranges...
tldr: he reported all the guys and 0 of the girls. my appeal went to some lady over zoom who doesnt know what python is
I have it all documented and all 4 women in my discord group will back me up should i escalate further, but having a little black * on my transcript bugs me
(the writeup was us guessing the error in the black-box checking validity)
I'm not fond of Turnitin, especially for programming tasks.
I am trying to deply a vite app on gh-pages getting this
GET https://xxxxxxxx.github.io/src/main.jsx net::ERR_ABORTED 404 (Not Found)
Its output should not be trusted blindly.
hey uhh i'm very new at java.
first semester CS
i just wanna know what you think about my simple java code
it's probably bad for someone who's experienced's standard but pls no bully lol
just a simple 2 value calculator
Main could be simplified. Instead of checking if it's yes or no and looping, just read the line and have a switch. If it's n, break and exit. If it's y, call mathOperator. If it's something else, loop around. Don't need nested loops here.
You only ever set val1 and val2 twice, so you can do it as
final double val1 = verifyDouble();
Assuming you've covered final ofc
wouldn't final prevent from changing val1/2 variable when the user do another operation?
it's similar to JS const right
You only set val1 and val2 once per call to mathOperator right?
Final here will mean that you can set the variable once per lifetime of the object. So:
final int foo; foo = 1;
is much the same as
final int foo = 1;
Simlarly, this will work:
do { final int foo = 1; } while (true)
Every time through the loop you create an int, use it then it's released and gone. You create a new int as you come through again.
ah
i get it now
You can also make the parameters on the methods final unless you need to modify them to avoid issues where you are editing stuff that you don't intend to
so i have this now, but default and case "y" basically does the same thing which is redoing the mathOperator
now i can just make any key means yes it but that's no fun
how do i make if it's neither y/n it makes the user input again
Default will exit and the loop will continue, no?
So why isn't the call to mathOperator in 'y'?
y also calls mathOperator again
You only need to call mathOperator from inside the 'y' case, right?
You can even then move the "Do you want to do anther..." to inside the 'y' case after mathOperator returns
moved mathOperator in the y case
and another mathOperator before the loop
this finally got the desired outcome
thanks for the help
this is definitely more readable than the nested loop
This is why people get stabbed.
I would move that switch into a function, and possibly turn the switch into a lookup on a dict, so the dict is string -> function. That doesn't really change it hugely, it's just way more expandable and easier to read and modify
none of that is necessary of course, and I'm taking it from a learn basic stuff exercise into better coding patterns.
The switch at the end is really ever gonna be used once, which is on the end of the main method. Not really necessary to make a method just for that switch i think.
Though i guess that would be necessary if i ever make the program have more than the single mathOperator() method to prevent repeating that ending switch.
yeah that's what I was saying - not worth doing, but worth understanding in terms of patterns
Yep.
I got way too many bad habits learning JS first that Java keep punishing me for.
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> This is also why people get stabbed
XML is the worst thing ever
I agree
Good habits come with time. Hitting the workplace and seeing code standards that people have helps a lot
and that people don't have. So much shit code
I'm new to microcontrollers, and would like to write a very time-sensitive program for the PIO on the Raspberry Pi Pico. I know what I want it to do, in a big picture sense, but have no experience with PIO and programming with microsecond precision.
I mean, it's not that complex - but depending on exactly how tight the timings are you MIGHT need to consider other tools
1 us precision is pretty damn precise - unless you mean 1ms
What exactly are you doing and trying to achieve
PIO you mean platformIO I assume
suuuuuper easy to write stuff in vscode using it for the pico
Programmable input/output on the raspberry pi pico. I'm very new to the whole deal. I know what I'd like to do is possible because it's been done before. But, I don't understand the code at hand, as it is not documented. So, since I have a pretty decent idea of what I want it to do on a very simple level, it might help to get some experience with time-sensitive functions.
oh ok yep
Broadly speaking, I'm trying to simulate Nintendo 64 controllers from the Raspberry Pi Pico in order to interface with the console.
I've been talking with people on the N64 homebrew server, which is very helpful and full of knowledgeable people, but I've got a lot of gaps in my knowledge so I'm coming to the LTT server to get some necessary understanding.
I'm not sure about that. The Joybus protocol is kinda picky about how the controllers respond to polls from the console.
Their wiki has a lot of information about the joybus protocol, but I don't understand a lot of it because I've never done anything like this. I've got some programming experience, but nothing of this sort.
Code exists to simulate an N64 controller, which is supposedly able to extend to simulating four controllers with minimal changes. I may already understand the extent of those changes. However, the existing code takes controller input from a bluetooth source, and since it's not documented, I have next to no idea how I would go about getting that data from a network source, let alone translating one controller's data into another. Network programming is something I've never even attempted, though I do have friends with lots of experience who I've been working with in order to make sense of the task at hand.
I mean... I'd just ... take what you've got as above (or whatever - it's been done, don't do it again).
then add network bits to it
I mean is the protocol already existing blah blah?
Would it not be easier to write a PC network to USB controller software and just use the off the shelf software?
That sounds like it makes a lot of sense, but the issue is that since the code isn't documented, I don't understand which parts come from the protocol and which parts come from the networking.
what does this hardware actually do?
I mean... at some point you're going to need to learn
bear in mind your first version of this will SUCK
like... a lot. Trust me 🙂
Essentially, a Raspberry Pi Pico is wired to four N64 controller cables, with the data wires connected to GPIO pins, ground wires connected to ground pins, and power wires left not connected. The Pico gets controller data from a network source and relays that information to the console when polled, pretending to be 1-4 controllers as needed.
why a network source though
like I get your design, but what function are you actually performing
I would like to play retro games with friends in other places.
what problem is being solved that can't be done right now
and you don't want to use an emulator?
which would be easier in EVERY way
Surely it would, though I am fond of the console itself. I've got an EverDrive and have already got the hardware I'll need to simulate the controllers.
ok yes, but the hardware is the least of the problems
is there already a protocol for the network?
Could you explain what that means? This is my first venture into networking.
While this project is my idea, I'm not the only person working on it, so the gaps in my understanding are not shared by everyone involved. However, I am illiterate of many of the details I'll need to work with in order to bring it to fruition.
like... what is on the other end
what will the messages for the controllers be
what happens if they disconnect, blah blah blah
Ah, gotcha. It has not been written yet, but we have a couple of architectures in mind for how we might have it take shape.
like this is a fairly significant project
In one paradigm, the decoding of controller data would be done server-side, and the Pico will need to account for everything that might be transmitted by anything it hopes to be compatible with.
don't get me wrong it sounds fun, but it is more of a "because yuou can" not because it makes sense
nonono, the remote users - how does their controller input get to the pico
I think it would actually make more sense in your use case to use the off the shelf pico software and have a pi running the whole thing
because advanced networking on a pico is a pain in the butt, and will screw up your timing
Oh, heard. This has not yet been written, but the others know a good bit about this. How much is not for me to say, since I don't even know what all there is to know.
You're definitely right about the "because we can" nature of the project. It's honestly my motive for doing most of the things I do, at least from a recreational point of view.
https://github.com/nathanRamaNoodles/Tinker-Controller This dude already has a UDP protocol you could steal
I mean, probably not if you wanted to use it over the internets, but hey 😄
given it's extremely simple
but given what you're saying, I think what you really want is a pikvm for a gamecube.
What is a pikvm?
so you do capture and control from a pi. Maybe using a pico as a bridge, but meh
look it up
Ohhh, I was kerning that as pik virtual machine and confused about what the hell was a pik
So, this looks great, but is a lot more expensive than I'm able to do anything with at the moment. Currently I've got the Pico and associated tech for ~$30, and this is closer to $300-400.
Wait, I think I get what you're saying. I thought you were saying "The device you need is PiKVM". Do you mean "You're trying to do something similar to what PiKVM does, but for a Nintendo console instead of a PC"?
yes the latter
Hi! I have a problem with running a VBA Macro(I have no experience with it, I just copied a code from a YTber, but it was repeating), I used chatGPT to help me with it to resolve the repeating process but now, it doesn't work anymore. I endep up here: Sub ShuffleJump()
Dim FirstSlide As Integer
Dim LastSlide As Integer
FirstSlide = 2
LastSlide = 4
Dim SlideList() As Integer
Dim i As Integer
Dim temp As Integer
Dim SlideIndex As Integer
' Create an array with slide numbers
ReDim SlideList(FirstSlide To LastSlide)
For i = FirstSlide To LastSlide
SlideList(i) = i
Next i
' Shuffle the array
For i = LastSlide To FirstSlide + 1 Step -1
SlideIndex = Int((i - FirstSlide + 1) * Rnd) + FirstSlide
' Swap slides
temp = SlideList(i)
SlideList(i) = SlideList(SlideIndex)
SlideList(SlideIndex) = temp
Next i
' Start the slide show
SlideShowBegin
' Visit the shuffled slides
For i = FirstSlide To LastSlide
SlideShowGoToSlide SlideList(i)
' Pause for a moment (adjust as needed)
Application.Wait Now + TimeValue("00:00:01")
Next i
' End the slide show
SlideShowEnd
End Sub
Sub SlideShowBegin()
If SlideShowWindows.Count = 0 Then
SlideShowWindows.Add Range:=ppViewSlideShow, _
Left:=0, Top:=0, Width:=1, Height:=1
End If
End Sub
Sub SlideShowGoToSlide(slideIndex As Integer)
SlideShowWindows(1).View.GotoSlide slideIndex
End Sub
Sub SlideShowEnd()
SlideShowWindows(1).View.Exit
End Sub
@vague falcon i improved the code further and implemented more of your suggestion.
i moved the math logic to its own function and also the one that asks for an operator to its own function.
i also added ability to use previous values now using a storedValue object.
take a look and see if i can improve anything
hmm maybe i can combine mathOperator and mathOperatorPrevious into one function
warnings not errors. it should run
warnings about you not validating your variable contents (eg, null ref exceptions)
You need to null check stuff.
Ye but If I input a lot of things it gets bad
Fixed it by putting an exclamation mark after Console.Readline
ah macros
Hey guys, how hard can it be for someone to decompile a python 3.9 exe code? Keeping in mind there isn't a decompiler of course? Does that mean it's secure?
Extremely easy
Python is not meant to be compiled, so any exes are actually just a python interpreter plus the source files
Define secure
Security through obscurity? If you’re worried about decompilation as an end for security you’ve got bigger fish to fry
If it's running on someone else's computer you can't trust it, which is why companies like web-based SaaS so much.
Make money forever on subscription, never give your customers the code - great for everyone bar the consumer
Thanks for these amazing responses, what can I do to make my app as secure as possible from getting it's source code obtained?
Why do you want to keep source code away, you shouldn't be keeping any secrets in there in the first place really
You can compile code like C, but it can still be decompiled which won't give raw code but can still get logic
nah you cant compile python like that
it does give raw code when you decompile it
I phrased it badly, meant to say something along the lines of "C code can complied"
ah right
Cython would like to have a talk with you
You can’t ever get source code straight back from compiled binary chief, what on earth are you cooking that you’re scared of the users getting the source code?
If you’re worried about plain text junk left behind because you’ve hard coded passwords and all that jazz you can run strings against it and comb through that output for low hanging fruit
Anyone here into game development?
If yes, where should i start if i want to learn from fresh?
Yes you can
Depends how it's packaged, look above
I mean, Java packages would be straight back
Everything else you’ve stripped comments, if memory serves me correct
No
C/C++ you have nothing from code basically
Python depends but you have the whole code since it's just a package of code + interpreter
Question: i want to develop a bunch of simple database manipulation programs that run locally on someones ocmputer. ON my macbook i can install perl or python and mysql and run the scripts but i need a way to package it so that i can give this to someone and they can run the same stuff on their end on a windows or a mac with no effort including the need to install stuff. How would i best do this?
Everyone needs to do the same database manipulations and i want to get everyone off using 40GB .xlsb files
Maybe don't use mysql for something local
python can be bundled into an executable, so just use pyinstaller to make an executable out of your script
You may want to use sqlite for something local though
For the "same database" problem, you'd need to have one central database in the office or whatever. IE not locally on a computer. If your office has a server rack (most do), you might be able to get IT to put it on one of the servers.
(I missed the same database part until that last comment, hence the sqlite suggestion.)
Pretty much you need to make an installer for each platform and bake in a copy of the desired dependencies and call them instead of relying on system versions being present or correct. If it's for internal at your company licensing isn't really a problem when doing that.
Centralising the dataset's also a pretty good idea if you have the time and can get a server for it but without context I can't provide much advice. Otherwise, I'd agree with maybe giving mysql a pass if everyone's getting a database each, sqlite's probably a better fit unless you need mysql-specific features.
Actually I rather think decentralised data is better. 1000s of ppl running data stuff on one server? Lots of power needed... But each person has enough power on their own machine to do their work. It's almost impossible to get enough server space to run everyone's stuff (this is actually the problem I'm trying to solve for...).
Any particular ideas for packaging MySQL+scripting?a
Sidebar I think my company is using advanced machine learning to do stuff which has now resulted in the hilarious "stuff is happening, is not happening like it should and literally no one in the entire company knows why or how"
1000s of ppl running data stuff on one server? Lots of power needed Yes and no, you get the benefits of performing certain common operations once or even ahead of time
If you have to keep distributing new datasets as-is and you're only pulling small amounts of calculated data out as insights it also massively cuts down on transmitted information
But the "our organisation can't do centralised servers competently" problem is one I've seen many times and I have sympathy for you
I don't think you understand how wickedly optimized modern databases are
Maybe not mysql, but something like Postgres runs insanely well on limited hardware
(Also recommend not using mysql btw)
MySQL's performance is excellent
The reason to not use it is to not be running a database server on every endpoint at all times or manage its service with starting multiple tools
MySQL slogs once you get past fairly basic queries ime
There's really no reason to use MySQL in todays world other than for legacy reasons
MySQL is fine. Massive companies use it just fine. - Don't get me wrong, if picking an RDBMS I use Postgres and prefer it myself for my use cases...
Some companies (Uber comes to mind) even have use cases which make it superior to Postgres
Using it just fine and it being fine are two different things though
You can use it just fine once you're used to it's quirks and the bs it sometimes spits out (or takes in as the case may be)
Anyways the problem is getting data and operating on it in Not Excel, not database holy wars
Not Excel you say... clearly the solution lies in MongoDB then 
MongoDB with a 40GB document, perfect
You'd probably want to install your dependencies to a subdirectory of your project and test+confirm that it does not rely on anything outside that directory, such as on registry entries. (If it does you'll need to add a script to set them appropriately/mitigate that)
Then use a packaging tool relevant to each platform to generate a install package (For windows MSIX is the trendy new thing, else just build an MSI)
I'd seriously consider using sqlite so you can just send the .db files around as needed without additional ETL tasks on the end users computer (not to mention not needing double the disk space at import time to store both the source datafile and the generated database).
Else you will need to either create a service for MySQL/manage its installer from yours and ensure it never starts twice from two tools.
I don't think you understand how wickedly optimized modern databases are seriously consider a centralised database server if its even remotely a possibility, because they are indeed highly optimised and efficient. Rules out people having stale copies of data too.
Sending large files around is definitely not a solution which scales much more than its present size
1000 clients on a server should handle just fine
Depends on the queries ofc, but in the grand scheme of things 1000 isn't that much for a db
note that you have to keep track of how many queries you actuallty make , as some orm/frameworks and other js attrocities hide the amount you actually are making , i dont do js but theprimeagen had a video sometime ago where he had a small portion on the topic
note that you have to keep track of how many queries you actuallty make Not really, that's what server performance monitoring is for
my question, in linux program arguments are keptr in the programs data segement in memory right? , argv[n] holds pointers to them , so if i copy a pointer to a struct , and later use that pointer in that struct to loop over all chars behind that pointer (untill \0) thereby changing some , that should not be possible imho , but i figured that that is exactly what im doing in some code i wrote , so the code works but it shouldnt.
i mean while writing your code , i cant find the exact piece where it was discussed but the gist of it was , there are orms/frameworks out there that , worik in a way that to read a value MSG from a table you could do CHAT.USERS.USERNAME.MSGID ... wich would in turn create queries for all db's to choos the one named chat all tables in chat to select the users table, all records ... you get the point, all really short fast querries butt allot of them,.. where you could write one single SQL query that would get that message with one single querry
Yea but this is literally a problem we have at work. People are struggling cuz everyone's work is slowed down during peak periods. I literally had to tell everyone to go home a few weekends ago becuz the database was slogging
No this was an application developed by central IT
The reason ppl use 40gb Excel files is cuz centralised applications are too slow to develop and changes that are needed aren't done cuz a centralised application ca apparently only cater to the needs of the majority
There's too many small little things ever person requires different from every other person. There's actually no need to manage anyone's files or data once installed since all the files and data have to come in the form of a CSV dumped from centralised big data repos that are bogged down by poorly optimized web programming
so you dont need a centralized server?
does the data need to be synced across users in real time?
Not beyond there data pool that is the source of data anyway
sounds like using sqlite would be a fine option then
Not at all, ppl just download the date they need from the IT managed pool and mess with it
I ended up going with MySQL+ Perl... Why no MySQL? What are y'all opinion on oracle dB?
well mysql is a server app for one
installing it invisibly is quite annoying in comparison to bundling an sqlite binary
sqlite is file-based, and doesnt need a server process running in the background
which is more ideal for running on an end users computer
Yea I started with sqlite but I think I ended up moving to MySQL cuz I couldn't figure out how to do date time and a few other things
just make sure you dont leave the server running all the time on the users computers
most people use unix timestamps for datetime in sqlite since it doesnt support it as a type
Really? Again I wanna hear ppls opinion on oracle dB as well
havent used it, but i do have a hatred for oracle so theres that
Just to highlighte the level of competence we are working with here...our software that we use for creating quotes and ordering stuff...doesnt do BEDMAS/PEMDAS properly. It has to churn through billions of lines on a daily basis, frequently gets stuck and any attempt to improve it by extending it(many that have been very successful very quickly) have been met with "nuh uh, my application, how dare you"
An sqlite or heck even access file on each individual computer would be better in every way
sounds like IT
Lol
So... Just normal IT things? Damn I thought it was just me or the company I work for
The issue is requirements. Most ppl who do data stuff in the company only do like 20k or 30k lines of data. The team I have... 200k is a slow day. So most applications are designed for 20k or 30k. Rounding errors don't matter if Your max is even $2k. But if you're price before discount has 11 digits all of a sudden 0.001% is a massive number and 1000 people are a lot.
Maybe it's all the front end stuff that's slowing it down then? Like genuinely, if I run all the basic calculations and analytics on my computer on MySQL or sqlite it usually doesn't take more than 5 minutes including needing to download things like pricing tables data from central databases. OTOH, put it into our centralised tool, takes 24-48 hours and may not come out right
That's wild, probably some badly written queries/bad table design/they've put it on mechanical hard drives with little RAM or something equally poor
200,000 rows a day per user shouldn't really be a problem
Oracle's downsides are all the same reasons I'm not recommending MySQL on user systems, plus licensing and genuinely awful stability starting and stopping the services - Use MySQL instead any day of the week on end user computers
Sounds like you need to write a resume, not utilities :P
Date time, store as a unich epoch and make sure that it's UTC aligned simple enough, what else can't you figure out how to do?
Oh @stable bough Did you delete your thing? Oracle: If it's enterprise licensed I understand it's by core and horrifically expensive
So that could be part of why it's slow
Any experience with power query? Is sqlite better/faster or not really?
By core?
Ooh yes that can get real expensive real fast
I actually can't remember anymore. Let me try sqlite simple enough to send to ppl if it works it'd be great
SQlite for single user databases has excellent performance. It is a database. Power Query is for transforming data into spreadsheets or PowerBI. It's a visual ETL tool
Unless power query is just as good there's a few ppl already using it
Different purposes
Wait, it's not a database thing?
Ooh, ok yea sqlite it is then. I'm comfortable with perl or C++ either one can handle date math if I need it to. So should work I think. Ty
For what you were asking earlier, Power Query is an alternative to using scripts to transform the data
...By using more different scripts and visual flows depending on target product
If you're a programmer anyways I'd just do your desired transforms in a language you're familiar with and can get running where needed
Yea I'm having a hard time finding something that's easy to do but works in Windows
I just don't like .net programming
would "Excel+CSV files + power query" be just as good as "sqlite + power query" or since both is power query it wouldn't matter? Or even both of those Vs SQL for data storage and transformation
Not really my area of expertise, but If the sqlite database is derived from the Excel+CSV files and you're doing your transforms in Power Query there would be little difference.
Does anyone have experience on selenium? Been stuck on a issue for a couple hours now 😭
Oracle DB is great for Enterprise stuff with big databases but for most projects MySQL or PostgreSQL are totally fine (or sometimes a NoSQL database as there are plenty of options).
hello
I'm a freshman CS major and I'm looking to purchase a laptop, I know that I have to look for 12 gen i5 or i7, but should I get the H version of the cpu or the U version? cuz if it doesn't matter I don't wanna over spend on a gaming laptop, also I'm majoring either software engineering or cybersecurity
IIRC h = faster u = better battery
Hey guys, was wondering if there is a free option for the discord bot to keep running and active. I tried repl.it with Uptimerobot and the keep_alive Code but the bot keeps turning off/on whenever he wants to. Would appreciate all help coming ;)
It’s called your computer
As long as you live with your parents and they pay for the electricity, you get a. Free running discord bot
:(
Is there any good youtubers for understanding functional programming? Newbie here trying to learn on my own time but not sure where to start
No one is gonna pay for servers that you get to use for free
Not without significant caveats such as those of replit (which btw is shutting down their hosting at the end of this year)
does anyone know what this software is? its not grafana and its used to view CSV data but I cannot for the life of me figure out what its called. Please ping if you know!
it is technically grafana, but customized
awesome thank you!
For all those who would like to use ChatGPT on the smartwatch:
https://play.google.com/store/apps/details?id=net.devemperor.wristassist
https://github.com/DevEmperor/WristAssist
https://www.youtube.com/watch?v=goIoDTxPllc
We are building a kinda crappy chat system. Right now each client will just poll the back end to see if there are any updates every 5 seconds. But we want real-time updates, so we are adding a websocket connection. The question is:
Should the websocket itself provide the data for the chat (ie "theres a new chat, heres the msg: <>" and "message of ID <> was edited, it's now <>" and "msg of id <> was deleted") OR should we just make the websocket say "there was some sort of update, you can query the server to figure out what the actual update was"
Im thinking the former is the way to go? Seems a lot nicer logically. But since we already have polled working, it would be so easy to make the websocket just re-poll basically
looking at devtools it looks like Discord does the former, whenever people start typing and sending messages the websocket traffic goes crazy and its otherwise pretty chill
right-o
can confirm that this is accurate, Discord uses a system called "gateways" to deliver new messages to the user in realtime.
The api provides historical messages, but they are transmitted in real time (along with cool stuff like typing notifications and presence updates) via the "gateway network" as they call it, which is a fancy term for a series of highly inter-connected websocket nodes which people and bots connect to for realtime data
The latter is basically a self-ddos fwiw
i suppose so
so basicly IRC , but you have to ask their server for the backlog 😄
Effectively yeah
Yeah but it breaks down way more often 
thats because it isnt federated lol
i can see the logic behind this, '+' checks if the first term of the operation has add implemented ifso , (a string so yes in this case) then it checks the type of the second term and if that implementation opf add implements how to deal with that type, in this case because it tries to add to a string , the most logical path is to convert the second term to a string aswell.
(ps: i said i can see the logic not that i approve of it. i)
Turns out the answer is that nextjs just puts a string into that param without telling the typescript system or whatever
If it comes from the url, despite whatever typing you give it in Typescript, it's extremely likely to just come as a string, you should always typecheck and parse/convert yourself (including catching/throwing appropiate errors for invalid values)
@neat laurel no self promotion:|
name checks out
I'm still surprised whenever I see a job for a programmer on discord
For me it feels so odd
For contractual and specific discord servers not so much.
My friend got his gig from discord
but ofc, randomly posting your skills to discord server is still odd
Yeah
No
Clearly development channel means "post my CV here"
Hey lads, I'm trying to do Speaker Identification with Supervised learning in python.
What are the best set of features to extract from the audio files? (the audio files are for now from audio books, so it's a single person talking with clean and not noisy audio for about 10 to 30 mins per file and I have 10+ files per speaker)
also what would be the best algorithm to use??? I'm using SVC now, but I think deep learning might be better.
the features I'm extracting now are: MFCCs ,Chroma, Spectral Contrast and Tonnetz
Using all 4 features got me 70% acuracy, but only using MFCC got me to 80%.
I know a little about the theory about what could be an issue.
maybe my moddel is too simple for complex data? or I don't have enough data?
maybe I'm causing overfitting to happen
Can someone help me choose and use a deep learning algothim to see if it's better than SCV, I have never done that before and I don't have enough xp to choose which features/models or libraries to use
Does anyone have the manual for a leader 8101 oscilloscope
I don't think an analog scope is really a #development But for the heck of it I had a look... it looks pretty basic from a look at the front if you're familiar with oscilloscopes generically - most of the terms you can just google and understand. If it's damaged your best best is probably careful disassembly and analysis. Not easy to find a manual for it.
If you do disassemble it, please be careful of the CRT, they can deliver a dangerous shock when charged and can maintain that charge for an extended period of time.
Thanks
Ive been bug hunting in QEMU since I submitted some patches back in February and want to contribute to open source some more. My strategy was to throw AFL (the fuzzer) at it by loading generated BIOS images. I kept it running until it generated a failure that resulted in some memory corruption (either in AddressSanitizer or Valgrind) and it found one after about 48 hours
It hit many other issues but all of those involve TCG breaking and I feel like the likelihood of a patch being accepted is higher if the problem is a segfault because the solution is more obvious
What is generally preferred? :
loadedMessages
.filter(filterAllowOnlyMessagesISentFunction)
.reduce(reduceGetMessageWithHighestIDFunction).id
versus
selectMessageWithHighestID(filterMessagesISent(loadedMessages)).id
Basically the bottom just moves the filter and reduce into its own function
Ok guys, I need tips
My problem is:
I have an API and my frontend needs to upload an excel file and import the data to the database
The code for uploading, reading the file and adding the data is all working fine
The thing is that there's a lot of data, so it takes some time to do all the importing, and the request times out
What do I do in this case?
Either
Respond immediately upon successful uploading, defer the processing. Perform the processing in a separate thread or process and allow the user to check progress of processed files via an endpoint/just tell them the data may take time to be reflected.
If the time's all being taken up by a big insert rather than something in your code communicating progress may be a pain
Is this a terrible idea? (diagram incoming..:)
this sort of double recursive deal
or should I be structuring the data differently to not have things like this
if you can avoid recursion, absolutely try to, but sometimes it is significantly harder to avoid than to accept and work with
Realistically you should ever only have one layer of recursion, but unless I change the data type i cant really enforce that
Could just change the datatype to not have the batch and simply provide a list in the first place maybe
/^[0-9a-j]+$/.test(str)
Is it possible to do this check faster? I'm basically checking if a string is either something like 423did9j32b4hac0j52418ge261 or a normal English text
Strings are a lot longer than my example, that's why performance is critical
/^[0-j]+$/.test(str)
/^(?>[0-j]+)$/.test(str)
The second one gives me a "? The preceding token is not quantifiable"
Thanks... I guess
Pretty hard to do I think. Best bet would be to use a dictionary, but then you cannot accept words which aren't in the dictionary, or even words with a typo in them without calculating a hamming distance.
Maybe a dictionary is good enough and only accept if more than 50% of the words are in the dictionary. I think performance can be pretty fast if you do the following:
0. Load your entire dictionary in a hashset (You only need to do this once)
- split input string on space (returns an array)
- initialize a counter set it to 0.
- foreach through the array
a. Check if the word is present in your hashset (hashset is (near) o(1) performance)
b. if true: up counter, if false: do nothing
c. check if the counter >= array.length / 2
d. If true, return true. if false, keep iterating - If you get here, less than 50% is english, so return false.
You can maybe do some more optimalizations, like calculate if the unprocessed batch can even reach to 50% if it's all in the hashset
Or just use a.i. 🤷♂️
Also check what it does if someone puts multiple spaces in their input. Maybe you need to strip those out
Is it actually an issue if your input isn't English or just garbage? Maybe it's just a non-issue.
Yeah it is an issue cause I need to tell the engine how to handle the data
So I have that .test attatched to an if sentence
My stupid little game engine is coming along nicely.
Why is web assembly code 15x slower than when I run it natively, both with -O3 optimization?
Hello everyone
Help, I am losing my mind and sanity, I can't for the life of me parse this number in Lua (for Conky)
Value coming in is just 0.4, but tonumber spits out nil
That's pretty cool.
Put simply, WebAssembly targets a special Virtual Machine your browser runs with its own instruction set (unlike native code which will target your CPU's instruction set), much like .NET or Java. That level of abstraction has a performance impact.
Depending on the browser it may be implemented differently, which means different amounts of performance impact.
It'll also depend on what kind of code you're writing.
It's a (usually) faster, low-level alternative to JavaScript for heavier compute tasks you can target from LLVM. Because it's a VM your code will run on any CPU that runs a browser supporting WebAssembly, assuming you're OK with its other caveats around memory and IO.
I see, does a 15x time slow indicate something wrong with my code, or is that expected
Hard to say without a ton more context but native code being multiple times faster is expected.
If you need more performance, target the platform natively. If you need it to run in a browser faster, aim to optimise the program's code. If you need neither... don't worry about it?
Ok, thanks!
could just check for [k-z], would catch a great deal of normal english text strings, then see what regular enlish text still fall strough the sieve and build on that (like possibly checking for single letters surrounded by digits, or lack of vowels eg
i think hes looking for an operation manual not a maintenance manual , but anyway, i own a Philips PM3365a (many manuals online for that scope, oa https://bama.edebris.com/download/philips/pm3365/Philips PM3365A-67A-75-77 100MHz Digital Storage Oscilloscope Reference Manual.pdf) alswel as on the internet archive, but for the leader its harder to find so it seems, however there is a 50minute video on youtube about that scope https://www.youtube.com/watch?v=4gYcaCzsorc browsing trought the transcript its basicly a guide on how to use it . (and perhaps you can contact the creator of that vid and ask him if he has a digit al copy of the manual)
This scope not only provides 100Mhz Dual Trace Capability, but it also provides On Screen Digital text information on your settings as well as voltage, period and frequency, dual time bases with delayed sweep, additive and subtactive waveforms and more. The video introduces the scope and its many features, then runs Horizontal accracy tests, ban...
The first part of my answer was basically "I can't find that, but the controls look pretty self-explanatory so learning about scopes generically will likely help"
The remainder was talking about maintenance because no context was provided as to why they wanted the manual.
Anyway, here's a very basic .BAT script that:
- Downloads videos from
D:\OneDrive\Apps\yt-dlp\list.txtusingyt-dlp. In the process it removes various sponsored segments, adds chapters, image preview for the video, and all subtitles available from the original. - Downscales the videos to 2560×1600 if necessary (my OneXPlayer has a 2560×1600 screen).
- Transcodes videos rather aggressively into AV1, with 96k OPUS sound.
- Moves the resulting file into an SD card mounted on H:\ drive.
- Uses binary comparison to ensure there are no errors in the process of copying the file.
- Cleans up the temporary files.
I barely attempted to fix anything and haven't tested a lot of stuff (SD card free space check for example), it's really raw.
m starting to learn c# any tips?
Visit an optometrist
hmmm that seems like the common consensus i guess ill learn rust instead /s
or basic
Uh learn how to build your project outside of Visual Studio (helpful for testing later), learn to program generally, lean on your IDE's completion features, get familiar with C#'s types if you're not already
yeah im not that far ahead
c# types?
the core types, python has dictionaries, javascript has maps, rust has whatever you decide to code into it, that sort of stuff
how long will i need to learn c# before i can make even the most rudimentary program? got any yt guides text guides?
learning tasks?
took me about 30 minutes, but I was learning it to write basic scripts for a game, so entirely irrelevant
unity?
oh, no, Space Engineers scripts
Not long for a console app or WinForms if you use Visual Studio
I find video tutorials to be unwatchable and unhelpful myself but I'm sure you can find more than you could ever watch with a YouTube search on the matter.
Always felt like this to me when I was new at it
yeah kinda feels like that to me also
30 minutes on the fucking circles and 2 minutes on the owl
but is there any other way?
I select my own projects and work towards their completion at my own pace with the developer documentation, but I get that this suggestion is unhelpful at first.
Perhaps you'd prefer course-style materials?
i have no idea what i even want to learn to do in c# is my problem
i dont even know what i can do
I'd start by figuring out what you want to do.
nah 1st i need to figue out what i can do
