#development
1 messages · Page 8 of 1
are you grading something? lol
no, I'm trying to get better at algorithms so I do leetcode problems and then see how other people approached it with their crazy stuff and try to wrap my head around their explanations
lol
lol
Can someone explain why I'm getting interference with CSS styles which have the same name in separate files, even though I'm only importing one CSS file in my .JS?
Basically I have a class name "dropdown" in App.css, and a class name "dropdown" in dropdown.css, and the style from App.css is being applied even tho I'm not importing App.css into dropdown.js
App.css and dropdown.css aren't even in the same directory
try using Ctrl + F5 to reload the page without caching styles
Anyone have opinions on JWT vs Cookie sessions for authentication? I'm struggling to understand how JWTs are used for anything that matters
It seems like JWT's are used to save database calls by storing tamper-proof data. But because of how hard it is to invalidate a jwt, it seems like you could only use a JWT for the most non-critical things imaginable and they are almost useless
how TF do i do session management lmao
anyone here have experience doing development in a corporate environment?
the other day, i was talking to the team developing a tool for my team and, well a few months back we asked for a checkbox to be added that did a certain thing if checked (the thing it did wasn't too complex, it had to do with how it submitted the data downstream). And they did put that in, apparently it should be working. Now we find out, "turns out the checkbox doesn't do anything"
now i've only written small programs and such, so my question is, how does this happen? this isn't like a bug or a small mistake anyone can make, is there something fundamentally different about developing in a corporate environment that makes these kinds of issues more possible?
i'm trying to find an answwer to "how did that happen" that isn't "they let the intern code that day and they fell asleep"
Mostly because of how rigid their management is. At my old company this probably wouldn't happen, it seems very extreme that a team lead can't make a task for just a button. But if our customer wanted to make software changes of literally anything in the requirement set, it needed to be in the weekly meeting, negotiated on how long ($$$) it would take, and only then it'd get added to the task list for weeks down the line

Meirl
oh no no, they had the monye, the even implemented the button and the logic...except i guess the code skipped through that entire section for some reason or smthg?
Someone prob mistakenly didn't actually make the button call the function or something lol
yea see that's what i mean, it seems like a really dumb mistkae but...that can't be all it is right?
I mean I can't be for sure
But if the code is there but not ever activated it must be a mistake on some part
Either it was mistakenly not called. Or the dead code was mistakenly taken into main branch
honestly, all in all, the last few mths of working with the team to develop the tool has really made me question the intelligence and skills of everyone involved. THE TOOL DOESN"T DO BEDMAS PROPERLY, how is that a thing?
Sorry wtf is bedmas
Yeah... my old work has done real duds in the team. That's what my team lead told me in private lmao!
mathematically correct order of operations
years ago when i was starting uni and thinking about a career, my uncle (who had worked years in tech at that point) told me i shd go into software architecture or smthg similar, he said there aren't enough smart people doing that. And i thought, that can't be true, i'm not actually that smart and besides, i know the kind of people who take ComputerScience at my uni those guys are wicked smart...
i don't know what is happening between "the wicked smart guys at my uni takign CS" and "whoever the hell does programming and SW architecture in companies" but...something is happening, and i'm starting to see his point
Yeahhhhh so the smart guys just stand out a lot. Odds are there are a lot of people lagging behind you even if you don't think ur that good lol
need some help. Macbook i have a bunch of simple scripts in python. mac decided to upgrade to python3.9 and it massively broke everything. so i used pyenv to downgrade to 3.8...how do i get tkinter to work?
It is unfortunately true... people with solid software-architecture/design background are rare... and they usually have an uphill-battle to fight to get management to "allocate" resources (aka time) for this. When working as freelancer in different companies (large or small) this is common place. Only exceptions are the big software-only companies (Google etc) From some friends, I heard that the banking-sector is the worst example. Medical software is a close second... as scary as it sounds.
Yea, that last one is kinda scary. And their hardware ain't managed any better either tbh
built myself a rp2040 based physical hardware monitor 😄 (with drivers needed to send info from windows to show the info) https://www.youtube.com/watch?v=odeUvKtQJaI
Hardware monitor built from RPI Pico and 320x240 LCD
awesome! thats like, arduino?
similar, but used a raspberry pi pico and the raw C/C++ pico-sdk
ah rp = raspberry pi? you used a pico or a rp2040 directly?
pico, v2 is gonna be the LCD with the rp2040 directly on the board
fyi, its -> ram + 32 cores + avg cpu temp + cpu fan + gpu temp + gpu fan
Anyone used gqlgen + GORM in a backend golang project? I don't get how you can use gqlgen to generate a model, and then GORM to build the database, since you might beed to customize attributes like auto-increment for gorm. But you can't edit the gqlgen models
You could use a non relational database, theyre way more mutable
Unless you're stuck with sql-like for a reason
eh its just what we're using
ok turns out you can write your own models and add the auto-increment things, so not a big deal
just requires some extra effort if you modify the schema, have to manually adjust the internal model
literally the entire internet: use AzureAD powershell module here's shitloads of easy examples
Update: Update December 15th, 2022: ADAL end of support is now extended to June 30th, 2023. We will retire AAD Graph API any time after June 30th, 2023. Through the next six months (January 2023 – June 2023) we will continue informing customers about the upcoming end of support along with providing ...
It's a goddamn powershell module. You couldn't wrap it to the new backend API? Seriously.
Seriously
You have the whole .net maui
.net?
no, for c++
I've heard that razor thing is kinda cool
But specifically in the context of developing a video game hud+ui not for web
You don't always know how much RAM you need
Dynamic memory for anything you can't determine at compile time or recursively stack allocate
should i round up or down on division calculations if i work with a integer variable?
okay, that i know that for the Future. thanks by the way 🙂
i was about to do 25/2 and i got 12.5
in my head
anyway, i'm working on making Deep Doodle work atm, and i didn't know i need that much RAM
well, that didn't do anything
MemoryError: Unable to allocate 513. GiB for an array with shape (2230, 2232, 192, 144) and data type float32
Rugg, do you happen to know about Deep Doodle?
it just makes me run out of RAM
I'm not sure what deep doodle is
Java is used for the backend and mobile app development I think
And C# is good for the backend also
For the frontend, I mainly use React/Vue.js
Im gonna just use fortran
But still using C is a good de("C")sion to make
Just made my first fortran program hell yeah 😎😎😎😎
barebones c or cpp?
any programmers here? i have a question?
lol, aight bet. I am planning on getting a laptop, primarily the macbook with an m1 chip, I plan on using it to do some coding but is 8gb of ram enough?
depends, what are you codeing
For most stuff, should be fine. If you're doing big data manipulations, or anything that'll have a big memory footprint (i.e. pictures, videos, sound) you'll want more
mac handles lower ram pretty decently for regular use
I would side on getting 16gb even if it was like +$200, but if theres no budget then meh
It really depends, like others have said. I was fine with 8GB doing light web development back in college. But as I moved to iOS development, I suffered a bit as Xcode takes a lot of memory. What kind of development are you looking to get into?
Love this. This is one of many reasons why I don't respond to people who do this. I think needing to know priority / turn around time is important too, mainly for work. Also, I agree. Some people may not know the answer but they know someone to reach out to.
This may not be super relevant, but my base spec M1 air handled iOS development in XCode just fine
It really is a great laptop. I highly recommend it
Yeah, 8GB is fine for some simple iOS apps. Mine started to go a lot slower as the application grew in size. Not saying it isn't doable. Just build times increase and go slower as the project becomes more complex.
My name is Buque... Dee-buque
Discords new api event for audit log entries is nice
I’m leaning into working in data science however since I’m still learning, would you advise I go for which of these two options:
I would go for the Windows laptop as it has more RAM and a 1TB ssd. The CPU isn't the fastest one though. If your budget allows, you might want to get a faster processor. (200-300 euros/dollars extra is definitely worth it spread out over the lifetime of the device).
🤔 I see and I agree with you but I just want to to use it for when I’m out travelling working on small projects. I just can’t decide between more ram and more internal ssd at the expense of the cpu and software that ios provides besides I could also carry an external sdd for, I have a very good desktop for more demanding tasks.
how much money is that lenovo supposed to be
that thing has the fake "5000" ryzen, not the real
not really directly comparable like this lol
and data science related workflows are typically cpu and io bounded if not operating on gpus
and for the purpose of learning - mac will give a significant advantage as it is very common both in academia and industry
whereas windows is the opposite
Then I would just get a good windows laptop with a dedicated GPU. like a 3060 or something like that (has lots of vram)
That apple has so little ram & storage, I doubt it will be any good
Plus data science means big data sets, and for learning you'll probably have multiple datasets stored at any given time
why why why
because mobile SKUs are hell
Intel had concurrent ice lake and comet lake on 10th gen mobile after all
thanks a lot this settles it!
oh lord didnt even see that. Thanks for notifying me
it's more practical to run gpu/tpu workloads in the cloud in the majority of cases
though I agree that both are on the low end, that doesn't have any impact on "goodness"
this one is just a no
big data set -> cloud
and even if you do have something sizeable running locally
you don't load it all into memory simultaneously
just like your registers and L1-3 cache, ram is typically used on an as-needed basis
I know it's not all loaded into ram at once, but 16gb is just not enough for more advanced workloads. At work I have a 16gb laptop for software development (which isn't ML, I know), and my ram usage always looks something like this: @stone pumice
I am pretty sure not everything is going to be in the cloud. He'll probably also have a smaller subset locally and has to use Python or Julia to create some algoritms, which requires an IDE, maybe he wants to run a database to make life easier. Maybe he's going to do that in Docker etc...
I would get a laptop with either 32gb, or 16 gb which can be upgraded to 32, 6 cpu cores and a 1tb ssd.
I know I made a lot of assumptions, but at least get somethign which can be upgraded ^^
And for the CPU not lucienne
Would also say that with modern programming tooling, you really want at least 32 GB today. Tools like Intellij really want some RAM for caching a lot of files and provide fast auto complete.
Also because, as a programmer, you often end up having a lot of tabs open in a browser combined with several different tools for debugging 😄
16GB has been fine for me when not using VMs
Not going hard on tooling yet. But the extra memory helps a lot when doing Java heap analysis on 10+ GB dump files 🙂
I have 32gb in my pc at home, and if I am developing I am also at 20-25gb usage. Few times VS + chrome + Docker really adds up.
However lately I have a lot Resource-Exhoustion-Detection warnings in eventvwr right before an application crashes (Usually Runescape + chrome + vs all at the same time). Does anyone have a clue? Usually it is only when Docker is running in the background...
I looked it up, and it seems to be pagefile full, but I have plenty of RAM left when it happens
I use a 16gb intel macbook writing java for everyone's favourite cloud provider and it's fine... one thing you may want to note is that windows and macos manage memory differently, especially in the case of apple silicon
and to reiterate - data science workflows are considerably different and less resource intensive than normal programming, except in specific circumstances - and for these exceptions, it is almost always cheaper and faster to rent compute rather than pay the up front cost for something that will be under utilized and will depreciate over time
since the prospective buyer in this situation is intending on learning data science, the logical choice is the option that streamlines that process through familiarity with the available literature... that option is the mac
I haven't thought about that, maybe you're right.
However the reason behind recommending a beefier machine was that he's not held back by his own hardware and gets frustrated after spending a buch of money
I would also note that the stated goal is "learning data science", not "running advanced workloads such as machine learning" - and even if machine learning is a goal, the windows machine has no advantage in this case as it does not have a dedicated gpu, meaning that the performance of training will be CPU bound - not RAM
I know, thats why I recommended a laptop with dedicated gpu in a previous comment, and a faster cpu in general.
But renting a server for a short while is probably better indeed
It gets you familiar with the usual workflow, and it's way faster as well.
yup, you don't even need to rent a server, in many cases you can run small ML workloads for free
Really? I wasn't aware of that. thats pretty cool
Yup, there's a number of companies that will give free GPU compute for scientific/educational purposes
Colab being one that is quite popular (or was, when I was focused on data science etc a few years ago)
https://colab.research.google.com
Sagemaker also has a 2-month free tier if you want to go into advanced workflows
https://aws.amazon.com/sagemaker/pricing/
^ also, has a desktop machine - set up ssh (and possibly a VPN if you want access from anywhere) on WSL / a linux install and you have yourself a nice test bed for more demanding tasks
taxes make this possible, we should all love taxes. (because R&D)
Isn't it just like Adobe? Offer students free licenses, so that they know your software, and will prefer your software once they start their job?
something something just open with your question instead of asking for permission to ask
how does the method clear it? is that known?
how are you inspecting the object?
Through blueJ
do you know how to use the debugger?
Fairly new to me actually. Good suggestion though, I'll go there next
Basically every single company does that
In the engineering field at least
possibly similar in theory but in practice i'd argue it's much less malicious
given that the alternative to adobe is picking a different career path
for cloud providers, the free tier is more a way for you to test the product before deciding if you want to build on it
anyone have the LTT 3d print files for the CPU holders?
why is this transition not working? .open sets the top to 0% but it does it instnatly, should be smooth
might just be applying top 0% before the transition time is set is my guess
maybe set the transition in .slideup and see if that works
lol css. I managed to make it 1.5 years into my software dev job until I finally went through my first css tutorial on youtube
Not really a developer, when a website uses precise location will it show up on builtwith under "mapping"?
Transition should be applied to the element before the change.
For example I’m assuming slideup is always applied, then open class is added when open. So you’d put the transition in the slideup class.
MDN has some good examples of how to use transition: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions#simple_example
CSS transitions provide a way to control animation speed when changing CSS properties. Instead of having property changes take effect immediately, you can cause the changes in a property to take place over a period of time. For example, if you change the color of an element from white to black, usually the change is instantaneous. With CSS trans...
Thanks. That fixed it
Made a network analysis tool in bash cause I got bored. Uses very minimal resources and will work on any Linux machine 😀
if you made it in bash, I wouldn't say "any" linux machine
Was initially to monitor “BBoS” traffic but can be used for other things
Well nearly any Linux machine
you would be surprised
Eh it’ll work on most linux servers. I daily drive ubuntu personally and I’ve booted and played with quiet a few others and it worked
any machine using bash you mean 😉
🫠
I know right?
Well if bash doesn’t work you can modify to work w ash,ksh, zsh, or fish
Which are the alternatives for the distros that may not support bash
Funny thing haha the cpu temp didn’t work on the vps I was using to create the tool but did work on my pc. Evidently the vps I used didn’t have a L2C/ Bus adapter or whatever it was that monitored it can’t remember
specifically the same version of bash, given that incompatibilities between versions are common
depending on features used of course
Very minimal in the script at that
then it's probably fine
if you downlevel it to posix sh then it'll be truly cross compatible (well, significantly more)
It’s on my like 65ish lines too lol
Yea I may look into it. I’d like to give it away but might convert it to C so I can better protect the project
just to make sure im not going to break something, is it an acceptable way of making a unique ID for something by using Date.now() with a random number appended onto it because obviously Date.now() returns a number for the exact time the action was made
Why not use UUIDs
That's basically what they are
welp i totally knew they existed i already coded an ID generator now but yeah
Is there a benefit of UUID vs using a cryptographically random bit string generator?
Don't reinvent the wheel if you don't have to?
- UUID/GUID is often a primitive in RDBMS
Make sure you don't use GUID's as the "Nobody will be able to guess this url" excuse. If your psuedo random guid generation is flawed, attackers are able to guess what guids might exist.
Although the risk might be low, the impact can be huge if confidential data is leaked this way.
Any neovim enjoyers? If so what all in one setup should I use or should I spend hours doing it manually?
Sublime Text masterrace
I do use sublime and viscose also but also want a tui editor
Sometimes I don't have a working graphical environment xD
100%
I personally just use neovim without any plugins
Not sure if I should be using anything, but if I ever need power, I just open VS Code or something
Treesitter and some of the LSP stuff is amazing
Hey all!
I'm not sure how to logically deal with this
So I've been working on my project for the past few months (I'm not sure if links are allowed, so I'm not posting it, but feel free to DM me if you're curious!), and it utilizes Cloudflare Workers which connect to a MongoDB via realms. This MongoDB stores all the data I need to store on users.
I've open sourced my code, and right now my API keys are not in the git repo, nor in the history. I understand that this is the best practice and this makes sense. My only question is if someone wants to contribute to my project, how could they contribute, without having access to my database. I know that they could make their own workers and database based on documentation I give them, but would that be ok for pull requests? And also, what about those who prefer to compile their own software. How would I support them?
I know this is a strange question, and I thank you all in advance for answering it!
I have no clue what that is but time to look it up!
You should provide instructions on setting up the mingodb to match and also maybe a prefill script of some test data. There is also a secrets section in your action settings that you can use to setup actions with keys etc if needed without divulging them.
Hmm, interesting thanks for that
I'm already using actions secrets for building binaries so that's good.
Would you say there's any good solution for those who want to compile it themselves? I was thinking that they would have to email me, and then I'd approve it and create a realm key for them, which they would access with their own cloudflare workers. I'm just not 100% sure if that's the best approach to take.
Not really got a lot of experience with serverless collaboration but I think people tend to use terraform configs or other similar tools
Combined with test data
Never give others access to your actual data or infra
You would provide instructions on deploying it themselves
They shouldn't touch anything that's yours or have any of your API keys
alright, thank you both!
Made some changes and added Clock speed and some other stuff. Currently working on all Debian distributions of linux
Coool, what lang?
Bash
That's pretty cool, I wish I knew bash that well tbh
Bash is probably one of the easiest language to learn aside from javascript and batch
I dunno if Javascript should be considered easy. Sure, it doesn't require you to manage memory, but between the multiple ways to do things (each with slightly different outcomes), and the differences between browser support, and IMO code that can be difficult to read at times... it feels like it's the least friendly of the more popular languages.
I found it really easy to learn tbh
But I was interested in it so i guess it made it much easier anyway
can someone explain any usecases of Bash
Can use it for running a lot of terminal applications, monitoring systems, setting up software quickly, and many other things. Biggest thing is it can be used to do stuff in the background so that it doesn’t take time outta the users day
often used for linux scripting
Ah Right
Yeah that explains it
If your good with bash your life in Linux command line will get infinitely easier if you’re a developer
Yea i'm planning on getting to backend stuff as soon as i finish up my front-end modules and projects
haven't thought about if i'd need linux anytime soon
Yo can someone just create a discord server for developers tho
yall dm me invite if you happen to
developers of what?
Yea gotta be a little more specific the amount of fields is nearly endless
there's r/homelab discord already
there's a discord for youtube channel about general tech
linus tech tips if you want to search
Is it possible to disable this (or set it to 1000 seconds or so) only when my code is running and restore it when my program finishes (Since I would want to have it reset to 5 seconds when I am gaming and such)? I have a fractal rendering program that will crash if it renders for more than ~4.5 seconds due to this feature
Is it not just a regedit thing
so I spent an annoying amount of time trying to figure out why my nginx config wasnt working and then I realized it was using the default and I was getting mixed behavior because I had the proxied port open and didnt realize I was accessing that instead of port 80 
I've got a pretty good javascript snip for anyone interested. (while I don't recommend copy-pasting code off forums into your browser, this one should be obvious)
[...document.querySelectorAll("table > tbody > tr > td:nth-child(4) > div > div")]
.map(function(item){
return parseFloat(item.innerHTML.replace('$',''));
})
.reduce(function(acc, a){
return acc + a;
}, 0);
That displays how much you've spent on the lttstore when you paste it into the console on the orders page.
Here is an interesting problem.
I have GUIs that I need to be able to make navigable from compass directions without using hard coded maps. GUIs can add elements in any order and anywhere on the screen.
If you have a UI like
-A-
B C
-D- E
You could be able to go from A to [B, C, E] (see next clause), from B to [A, C, D], from C to [A, B, D, E], from D to [B, C, E] and from E to [A, C, D].
It would be preferable if an element that can have multiple sources would use the position of the last move to go back to it. So if you have something laid out like
A B
C
and you went from C to B by navigating right navigating to the left again will go back to C.
What might be a good way to model this?
Stuff like this is why I switched to caddy
Graph models
it's a shell
you probably have to reboot to change the value
can you explain the usecases of paper
can you explain the usecases of your reply
can you explain the usecases of your reply to my reply
very funny
GOTO
Programming in General or Universally as some might say, WITH dedicated channels
i wanna say but i might risk getting banned
it's about as broad as saying you want to make a server for gamers in general
Then dont
this functional
pairs seems confusingly defined
okay so pairs breaks off the first two values as x and y, passing them to the function f
uhhh
i dont know how to parse this at all
idk this language but im trying to implement reduce over a tree
Are the 3 foldt and 2 foldi's currying the inputs?
i think it's folding the input list in a tree like manner, with an initial accumulator z?
hey, so i'm planning a startup so i bought a domain on namecheap and looking for a free hosting service and then found freehosting and infinityfree, what's a better choice? and are there any other free domin services?
If you don't need a backend and only want to show HTML, CSS, and Javascript, try Netlify.
okay sure
what type of product are you trying to make? what type of website will it by?
Cloudflare pages/workers are pretty cool
just a site which is a personalized e-commerce platform that recommends unique and affordable products to elevate your shopping experience.
might be a dogshit idea
just a site
that's a whole platform, which definitely requires a backend, and definitely can't be hosted for free
Yep
me poor so just bought a domain
;-;
and if you don't already have web dev experience, you're in for a rough ride
not to mention from the business side of things
bought that domain to for like a $ lol that's the whole reason i bought it
I mean you can just hold the domain and do nothing
i don't but ik a senior who does
you'll need to pay them then
yeah ik but since i'm just gonna start there'll not be much traffic so it can run with free hosting
yeah but he said he'll do it for free ; )
what you're trying to make is nothing simple
what frameworks? django? custom everything?
i really don't know about it all i'm just making the site so there can be a way for people to buy the service
i do have a bit of plan and since i'm not investing much it won't matter if i fail
Hi, Im facing this weird problem, so basically i have a site on WordPress but then editing on WordPress consumes a lot of time rather than coding. I wanna work on animation for the website which can be only done by coding if I'm not wrong!! Is there any way or plug-in i can add to Vs code that connects to the WordPress site?
What are you editing? A WordPress theme?
If you can login to the server via ssh you can use the vscode remote editor plugin
Yes sir
How so?
Visual studio code is absolutely terrible. Personally can’t stand using it. I’d rather be forced to use command line editor
then don't use it, I find it really good
I don’t lol
I'm writing some rust code for an ESP32-C3. i only have S2 on hand at the moment, should i wait until i have some C3s on hand prior to starting my project or is the code compatibility good enough that it shouldn't matter?
ohh technically this is a new start, i cant continue my website then
You can? You just edit existing files
btw you know my site is on WordPress rn!!
and taking a step ahead is like a new start XD
Oh WordPress.com?
yes sir
I was thinking it's just a WordPress installation, which is what it usually is
In that case I would recommend setting up a local dev environment
And editing the theme, then uploading
but how? cuz the site is on WordPress!
Why set up a development environment? When developing themes, it is best to do it in an environment identical to the production server which…
someone recommended me this
you can use this https://localwp.com/
I in general don't reccomend wordpress.com for hosting
I really like siteground, that's what we use at work
sftp access
staging environments
this is big stuff, im just a student
i have to research a lot for this
I'm a student too
ok so talking about transferring the file right? Do i need a hosting server? and different Domain?
Just to clarify you want to edit the theme php files in vscode?
You should call it "Amazon"
(watching random Code Bullet videos)
I should try out Unity Studio. That looks really great
I need to figure out neural network stuff.
It's why I want a 4090/A100s (or whatever the new ones are called).
is windows 11 actually stable enough to upgrade to? (from windows 10)
i’ve done it once before around a year ago and it gave me a hell of a lot of issues, i’m wondering if it’s any better
Added alot of stuff tothe little project I call DataDaisy! Any suggestions on what I should add next?
anyone knows that there is a tool thing that would create a vm/container (not sure) like chroot and let you do stuff inside it for development/compiling like python venv?
I kinda found it? don't remember. Is vagrant good?
Has anyone here made a CLI calc app?
I am working on one and it has been a fun challenge so far.
hi guys can any one help me to center a div in my project website code
i am really tried a lot of thing to center the div but i am not able to do it
if anu one could help me it would be great
https://siddheshuncodes.github.io/aashiqinnashik.github.io/ this is my website
GNU Octave
There was some acknowledgement of assembly in that post of mine when I typed it.
It is the RV64GC arch that I am using.
So, I have to first load the address I want to load then load the data? What can I not just load the data directly from the address?
It's RISC.
The instructions are simpler so you need more of them but they can be executed much faster.
Everything is a tradeoff.
RISC has and always will be the future
20 years from now, risc will be the future. 20 years ago, risc was the future
Hello nerds. Only your right speaker will enjoy this clip because I don't know how to into ripping clips.
RISC architecture is gonna change everything.
To be fair, ARM is somewhat RISC and it's in most devices.
It's certainly less CISC than AMD64. :^)
advanced risc machine, it counts
So, I do an lb t1, data_addr then that breaks down to something similar. So then I try la t2, data_addr and lb t1, 0(t2) and that works. It ends up loading some address from the global offset table and then uses that to fetch the data I want.
A lot of the extensions they have added over time do complicate it.
Sounds about right.
Acorn risc machine I thought...
Companies love to change names.
Also, arm is in the server market taking some of Intel's market share.
Unfortunately also AMD I'm sure.
https://www.digitimes.com/news/a20230217VL209/amd-arm-digitimes-research-intel-meet-the-analyst.html
If this is right Intel just lost market share and AMD and ARM gained market share.
Can anyone here help me with some Java?
idk what's wrong with it, if I put the Main method it doesn't run
Your debug circle doesn't have a main and your error suggests. You could run the other class. DebugFour1 looks like it should have a main method.
Try java DebugFour1.
You use the default constructor without a radius. Replace line 13 of DebugFour1 with c = new DebugCircle(radius);.
Thanks man, that helped
although what does adding "radius" inside DebugCircle even do?
prob gonna post more stuff in here since I'm working on my java hw and I kinda need help with the stuff
You have two initializers. The first uses the default value for int and float which is apparently zero. The second is the one that takes the radius. Look at line 9 and 10 of the debug circle class.
oh I see
Here is a fun thing. I java you have both an int that is a normal int and an Int that is instead a class.
oh cool
yo I got another one
idk what to make of lines 13 and 14 in class DebugPen
I'm trying to figure out how to make the user input correct
I figured it out it was a this variable
pro tip: use intellij
what's intellij?
An IDE that's well-tooled for Java development.
I use eclipse
I used Eclipse when I was younger so I'm used to that one
Can anyone help me on more Java stuff?
Don't ask to ask just ask.
Oh ok
this is what I have so far
it says I need "set and get methods" idk how to properly set that up
All your get methods look wrong. They look closer to a set method (kinda). Set methods usually take in a variable, validate that it is valid, then set the local variable to the input value if valid.
For the bread example a get would return just the local variable (attribute). This would look something like return this.bread. This is because the internal variable should be private and inaccessible from outside of the class.
So do get methods just have a return value?
Yes
Oh ok
What about the set methods? My grading software is still giving me an error
ok I checked that and I still don't get it
How does the sandwich know what bread it has or what the price is?
Set methods are usually void and return nothing.
On the main error. Somethimes they return something on the error return, but you are probably not there yet.
I'm unsure
doesn't it use the Scanner input to read it? it has to find a way to read that somehow
The scanner get the price let's say and it put it in a box labeled price. It then does nothing with that value as hinted by the orange underline.
Basically the variable it set but never used.
Oh I see, so does that mean I have to make the scanner use that value?
Yes
I'm trying that in different areas but it keeps giving me an error
if I put it in Sandwich() or NextLine() it gives me an error
You have a set method for price. Consider passing it in to that.
Put it after you create your sandwich and before you use the get methods
holy shit
that's actually legendary dude
sorry I really need to get tutoring earlier in the week it's just that I prioritized a math exam
Holey shirt? Shorts usually have holes in them for your head, arms, and such.
because I failed calculus once I don't wanna fail it again
wait is this a family friendly server?
Yea tutoring would be a good idea.
that's the plan tbh
thanks for the help man
I really needed it I'm not getting this stuff super well
Maybe... IDK. I just try to be family friendly in public.
Ahh ok that's cool
Thanks
hot take but I think maybe test things a little bit, right, and then the massive ramifications will be known before u release changes
its not rocket science, but it wouldnt matter even if it was rocket science, because he has rocket scientists.
oh right i'm sure they haven't considered that
personally i just write code directly on production servers
oh okay no links cool
"I think if you want to have a really high velocity of features we'll just need to do a total rewrite"
He's an idiot and the more people that see that the better.
If you say no to him you get fired.
He talked about electric cars, people don't know much about that, and assumed he knew what he was doing. Then he started talking about rockets people don't know much about that, and assumed he knew what he was doing. Then he started talking about programming, quite a lot more people know about that than the other 2 things, and are now aware that he's had no idea what he was on about the entire time and is just a loud mouthed con man
Yeah starship is one of musk's crazy ideas that has been somehow gotten a lot in dev
And it may actually work because of the work of the engineers at SpaceX
I learned stuff about EVs and thought he was an idiot, I knew a little about rockets and knew he was an idiot, I know a lot about programming and was shocked that people hadn't figured it out yet, the tunnel is just pointless and the hyperloop is impossible.
u can't BS programmers, we're just waiting for an opportunity to nerd battle people
a running animation for a game
uh im taking a class thats using codeHS so if anyone knows abt it/javascript and they could help me heres my reddit post on the codeHS reddit
a boss for a game
Why are ORMs so bad
is it because SQL is just so inherently epic or because it's difficult to make ORMs good when relying on sql database backends
it kinda depends on the orm doesn't it?
some are very minimal and mostly just convert models to records
some completely take over the database
specifically for golang it seems like nothing is good for databases that will need to be maintained over time
I really liked the ORM idea when I first learned about it, but hated it in practice.
For Java projects, what do people here mostly use, Intellij or Eclipse?
Idea is SO MUCH better than Eclipse
Intellij. Mostly because that is what I also use at work so it does not really make sense to learn different IDE's. But it is also a lot better in general compared to Eclipse.
Of all of the people I know that code, probably >95% use Idea.
haven't used eclipse in over a decade now
can spotify send a cease and desist to an open source project? Its literally a script to download spotify playlists for educational purposes.
I mean if you're following their terms of service then realistically no
I am having an issue mounting the SD card on my raspberry pi running VxWorks. Any pointers?
I think I am supposed to see /sd0a, but I do not see that.
0x0000001


Dereferencing a null pointer is not a good idea. Also there is no memory down that low so that wouldn't execute anything.
As it turns out, VxWorks documentation only ackolages sd/sdio/mmc on the raspberry pi 4 not raspberry pi 3(+).
I just realized that the lack of Raspberry Pi's caused the price to more than double from MSRP.
And I don't think ThinkPads have GPIO or proper support for VxWorks.
yeah but its like... bro...
Tbh an orange pi 5 or libra sbc is just as good or better
Tbh if you could even find an old thinkstation those are pretty solid
And can be got in some cases for as low as like $80-100
hi
For VxWorks, probably not.
Well I was just referring to them in general because of the price of the rpi4s
Ah, yes if you just want a box to put Linux on.
Most of my rpi projects will not work on a desktop.
ew linux
ew computer
average console player
actually i play mobile games
even worse
Windows is superior, and yes I've use to daily drive Linux
and macOS is worse than linux
So as someone with a professional Microsoft cert, I use Linux since it has less bugs than windows.
from a consumer standpoint, and a reliability standpoint, i would say that windows has a superiority over linux from certain standards
And Windows is easier to understand if you aren't that experienced with computers
can confirm
Linux is a really nice server os
systemd units are so simple to implement in C#
I have seen windows just not let me enter my password (no hardware issues) and I have not seen windows stay online stable without reboots for months, but Linux... Online for months without reboot. The most stability I have seen for Windows is Windows 11 pre release (why IDK). When most websites run on Linux with more 9's of uptime than windows I would imagine Linux is more reliable.
Windows is a lot more convenient
Basically every program works, and I don't have random issues like Linux desktop does
For server use it's great
Systemd in Microsoft language
Oh how far have we’ve come
IHost host = Host.CreateDefaultBuilder(args)
.UseSystemd()
.ConfigureLogging((hostContext, builder) =>
{
// if we're in fact using systemd, throw out the default console logger and only use the systemd journald
if (Microsoft.Extensions.Hosting.Systemd.SystemdHelpers.IsSystemdService())
{
builder.ClearProviders();
builder.AddJournal(options => options.SyslogIdentifier = hostContext.Configuration["SyslogIdentifier"]);
}
})
it's this easy
Windows if you just want to use your pc sure
Linux if you want something not garbage
Macos if you want to feed the tech giant that is Apple
I give apple 20 years before it rules the world or disappears entirely, no in between
MacOS is good for laptops, but for desktop it's not worth it
i think a lot of it also hinges on how well their VR hardware goes
There are niche use cases where macOS is the absolute best on the market and nobody else is even trying in comparison. Keybinding customization and desktop automation are big ones for me. It makes no sense that macOS is the winner here and not Linux, yet it's not even close.
Language learning is another "killer app." Chinese is so much less painful on macOS. OCR and translation features are baked into anything that wraps the system image display or text field elements. It also supports inputting Pinyin in a way that only requires learning four extra keyboard shortcuts instead of a hundred alt-codes or using a custom AutoHotKey script.
BSD based OS’ 🤢
Nah that’s rude BSD is okay I guess id just never use it let alone daily it, like I do Linux
At the end of the day that is exactly what it boils down to. Power to battery life, Macbooks/Apple wins in the laptop market, but Power to price, Windows computers just knock it out of the park in the computer sector!
Windows is great for desktop, Mac OS is good for (non gaming) laptops
Currently making a game using Open AI. Its got the base right now but will add a bit more to the UI and possible 3D elements with some text to speech as well for aesthetics.
Very proud to share a passion project of mine that's publically available and ready for use; a video encoding benchmark tool (first of it's kind): https://github.com/Proryanator/encoder-benchmark so far friends of mine and some people on reddit have used it and I've gotten good feedback, but I hope people here (and maybe LTT) can make good use of it 😁 so far it supports nvenc, amf, and soon to support CPU encoding and GPU AV1.
Was able to identify which encoder settings for my 3080ti would allow me to stream 4K@120 locally (default Geforce Gamestream settings could rarely get 4K@90) 😊 as well as what bitrate minimum is needed for visually lossless quality at a target resolution & framerate. Hope some peeps find it useful here!
pretty good
arent you the house of bingus mod
i was, like a year ago
you were the garfield dude?
yea
yup i rembre
i dont remember u tho
i was trolling with necktie afaik or he was banned and told me to trolli in general
anyway this isnt the appropriate channel to talk about this kind of stuff
hello
does annyone want to help me make my own operating system
for pc with python
ok
it's possible
can have all modules and stuff in python
I mean don't you basically have to write an actual os-level interpreter first
Could use wasm/graalvm/micropython
could someone help me with some c code for a project of mine pls?
Do ask not to ask, just don't ask
How can I learn programming? I have a subject which I need to do some C coding and another that I need to Some java game probably (not confirmed).
The C language I know about it's structures and almost everything I need but when I have an exercise my mind just goes blank and I was wondering which is the best way to either start a new language from scratch and how to progress
Look at Harvard's free online cs50 course
Great place to start
It gives a great introduction to programming in general
I'm writing tests with jest (TypeScript) and I wanna use this
https://www.npmjs.com/package/jest-specific-snapshot
However, I'm getting
Property 'toMatchSpecificSnapshot' does not exist on type 'JestMatchers<number>'.ts(2339)
I need some help
does anyone know a free website\app i can use to start learning graphic design?
kek
thanks👍
i wanna make a file system
this looks like a balls
try using FUSE, it's fun!
https://www.kernel.org/doc/html/next/filesystems/fuse.html
do you know anything about file systems?
you can make userspace filesystems. edit: as mirandaniel said.
you can install an OS to a FUSE filesystem, just needs some jiggery pokery
to do what?
i wanted a kinda make models for directory structures so i could change between the Linux standard hierarchy and a more custom one
I've implemented read support for a basic fs once, probably not enough to implement a whole proper fs myself
like given a base directory model and a file or something to transform the model, you can mount the transformed dir structure
yeah seems doable with links i just don't like how convoluted and complicated to change itd be
I loooove Journaling schemes
Lmao chatgpt 4 is completely crippled
At this rate it'll be like one message pee hour haha
🙏🙏🙏
What language to learn for backend web development?
Does anyone know how I would be able to select the python kernel that is in my Docker Container from VS Code? It runs the code blocks fine. But I am not able to get any autocompletion working.
Once I disable Pylance, it gives me proper suggestions. But these aren't as easy to use as the Pylance suggestions.
Oh found a solution. When you use the Dev Containers extension you can attach to the Docker container. Once you've done that, you can install the Python, Pylance and Jupyter extensions inside of the attached container.
Definitely depends on what your end goal is, each language has different applications. But if you're just getting started Python is pretty easy to learn and has a lot of frameworks to use
Javascript
Python, Ruby, Golang
Python has Django and Flask
Ruby has Ruby on Rails
Golang has idk never checked but I know khan academy switched their site to it so it cant be too bad
Someone thought it was rust, but I don't do web dev, so I don't know.
i wouldnt be surprised, rust is cool like that
I have had fun with rust. It has mostly been GTK4 GUI and embedded (rp2040).
Some rust people will argue everything should be written in rust, but I would disagree. C is fine for proper embedded and JavaScript is fine for web dev.
Yeah rust purists are annoying
Let's rewrite everything in rust
Make everything on web rust wasm
lmao true
Added some nifty features to "DataDaisy" for monitoring my VPS network and system resources
And just under 200 lines of code 🙂
does anyone know how different python flask 1.0 and 2.0 are? im taking a class that is using 1.0 and scratching my head wondering why
is the class using python 2.x by any chance
if so then: flask 2.0+ is python 3 only
no the class is using python 3
None of those 2.0 changes look particularly massive or crazy. Probably the teacher is just most familiar with the version the class is using.
I wouldn't use an older version in production, but it's common to teach somewhat older software. Otherwise the teaching material has to be constantly updated, which can be quite time consuming.
Hm
ooh la la, is this some fancy mtod script you've created or like an upgraded take on something like neofetch? i will have to give this a spin
It’s a C script it’s not public yet but I hope to release it soon on GitHub if all goes well
Maybe convert it to another language as well
sounds good
For a basic idea of my project: I want to keep adding some pics, into the product, and based on the attributes that I give to each one of them, I'll be able to filter this huge stock of pictures
Now, I want to have it on both phone and desktop
I don't know the concept yet, so I was asking that is it possible to create one app, for both phone and desktop? or the two will always need two different apps?
If the latter is true, then I think that building a website would be the best case here, right?
There are cross platform tools like flutter or react native i think
Left
hey guys, i have a simple project on python and i went around to play with it "just for fun"... ended up in total of 6 hours of researching every bit of info i could and still nothing helped, its crypto related for my litecoin node. server side all good, but i end up with an error 500. anyone know the error here? ```import requests
import json
Set the authentication details for the JSON-RPC server
rpc_user = "user"
rpc_password = "pass"
Set the address to check the balance
litecoin_address = "LQjKXs4MLLsRtoYcvoMAjKtNGa8tS3TtTq"
Set up the JSON-RPC request
url = "http://localhost:9332"
headers = {"content-type": "application/json"}
rpc_request = {
"jsonrpc": "2.0",
"id": "0",
"method": "getbalance",
"params": [litecoin_address]
}
Send the JSON-RPC request to the server
response = requests.post(
url,
headers=headers,
auth=(rpc_user, rpc_password),
data=json.dumps(rpc_request)
)
Parse the JSON-RPC response
if response.status_code == 200:
data = response.json()
if "result" in data:
address_balance = data["result"]
print(f"{litecoin_address} balance: {address_balance:.8f}")
else:
print(f"Error: {data['error']['message']}")
else:
print(f"Error: {response.status_code}")```
code written by chatgpt for most part
i had to edit it a bit but still got the error 500, 401 is bad auth, 405 when i change request.post to request.get and 500 for this. i'll get the server side config too.
server=1 rpcallowip=* -rest -rpcport=9332
Have you considered writing code yourself?
you rly cant be asking ppl to debug ur chatgpt code
https://litecoin.info/index.php/Litecoin_API
One Google search to find the bug
I dont think you need to json.dumps the rpc_request object, it could be causing issues with weird string formatting stuff (but dont change anything if theres not a problem there). if "result" in data is also weird, I recommend using if data.get("result") is not None for dictionaries instead. as for your issue, I did some digging and in the documentation that mirandaniel sent above, it says "Most of the Litecoin API calls are the same as they are in Bitcoin", so I checked how Bitcoin does it, and in their examples at https://developer.bitcoin.org/reference/rpc/getbalance.html it shows content-type: text/plain not content-type: application/json
but then at this unofficial source https://www.kompulsa.com/litecoin-cli-commands/ it says to use content-type: application/json
my best guess is just that it doesnt like the data the request is sending, most probably because its being dumps'd. like it would prob be checking: request method -> auth -> then checking through the data & that could explain why the response code was changing away from an internal server error
I made a thing: https://github.com/deimosian/riftderandomizer
The mod itself is just a simple re-balance to eliminate gear reroll grinding, nothing special.The python scripts that automagically create the mod from the game files... those I'm kinda proud of.
hi there, i am trying to figure out what Python is exactly besides codes. My company has me building access databases and relation bases databases like SQL, however access is trash and I need to replace it with something. How, or can Python replace some functions of access? What does python do? Any help is appreciated thanks
python is a versatile programing language
I guess i don't know how you go from program code to a user interface and how it stores data. Can you build a user interface, make input fields asking for data, have it store it and then send it to a database for record retention? or do you not need a database for python
python is just a language. It is a high level programming language which translates to machine code that the computer executes.
Yes you can build user interfaces, you can interact with databases
there are many frameworks that do a lot of the heavy lifting for you like django
and a ton of different libraries that decrease the amount of code needed to do things such as interact with databases, do web requests, GUIs, etc
every programming language has an ecosystem of different libraries and frameworks
my company is using access databases for their records and inside the access db are forms to input and edit records. Its very time consuming and out of date
So python isn't so much a storage application, its more so a language to code a computer what to do with the data and where to put it?
Yes? It can do whatever you want
it has the capacity to store data like excel sheets?
It's a language not a database, you can build a database in Python, probably not a very good one
Well yeah it can manipulate excel and stuff
The typical method is to run database software like an SQL server, and your python code will talk to it to store, retrieve, update, etc, data
^
AH HA
I didn't explain it very well
ok that clicks
Yeah most large applications have many different components
A library for manipulating excel files for example
its starting to make sense now though thank you! oh ok i will read that right now
ok so that example has python enter int - 42 A1 and todays date and time to A2
For working with msaccess for example https://kontext.tech/article/1077/python-read-data-from-ms-access-database-via-odbc
Microsoft Access database is commonly used as a file database. It can be used to store small amount of data in your desktop system. To access data in Access database, we can simply use ODBC driver. For Python, we can use pyodbc package. As part of the installation of Office Access, the ...
oh ok
so essentially if i wanted to start learning python i could start by making a rudimentary python user interface with input fields that feed into my access database. This way users dont need to open the access database which takes forever
?
To learn general python i would stick to smth simpler
oh ok i figured that was the simple path- but thank you i do have a better understanding now. I appreciate your help
i mean that would likely be quite simple
moreso if "rudimentary user interface" can be fulfilled without a GUI
so you suggest do the following? auth -> request method -> check data not sure how, but i tried switching it out in the code by just replacing the list at # send the rpc request to the server with url 1st and auth 2nd and tried replacing if data.get("result") is not None and the text/plain too but still error 500
application/json back and again
no I meant the webserver is likely doing something like request method -> auth -> then handling the data, so that explains the difference in response codes when auth/method is different given the assumption that the data isn't being sent in a way that the webserver handles (it was only mentioned to show my thought process there). I recommend you read around and see if the documentation for whatever you're using can provide some insight on the issue or google around to see if anyone else has experienced the same issue.
Hello
Any idea on how to check ansible syntax or make ansible-lint work on windows ?
Anyone know how I can randomly generate a list of N integers that [0,N-1] whose values are indices into itself, and has a full loop? There must be an algorithm for it but idk the name
is leaky ReLU is better than tanh or?
i was thinking of having the hidden layers of the CNN be tanh and output sigmoids, but leaky ReLU seems to be better, even in terms of performance
which DL library should one use to be able to decide layer functions eg. hidden layers = leakyReLU and output = sigmoid()
care to explain in a bit more detail?
I figured out how to do it or was simple. Will explain
Any of y'all ever set up proxmox and had portainer running in a container running traefik that was hooked into your other containers and then setting it up for multi level subdomain routing like subsubdomain routing and then have your applications in their little docker containers running with the tags that you needed to have it run on the specific sub/subsub domain?
Isn't that just a super fun high-level nightmare?
The actual problem i was solving was basically given a list of objects, create a randomized loop of all of them. I was being stupid complicating the problem. The obvious solution is just to shuffle the list using built in functions, and then to help with the search i made a hashmap that goes from current object -> next object incase.
yup
.NET devs, I'm trying to find a "strongly named" version of the Hangfire.SqlServer.dll file, downloading it from NuGet shows that it's not strongly named. Is there some where else I should be downloading it from or something?
What are the differenced between the features and characters of C++, Java and Python?
Also, please mention that what are the different use cases for which, each one of the language is used.
thats formatted like a homework question
No, I am not in college yet, for coding courses 😂
I really have that question
C++ and Java is statically typed, meaning compiler will warn you when you try to do anything invalid like getting the square root of the word "Monkey"
C++ is one of the 3 fastest language out there, producing the smallest binaries as well (the other fastest ones being Rust and C).
My man forgot about assembly language
Btw best Assembly language is RISC-V
Oh shit, why did I never see a development chat here in the LTT discord? This is awesome!
Assembly language is pain in the a** for most of the CS grads out there 
i mean... lots. If you give a bit more context then people here might be able to help more however...
C++ is a compiled language. in that you put your code through a compiler and get a file that is 100% machine code. and as 66656d.... pointed out a statically typed language (you give your variables a type and the language will hold you to that contract for the life of the program). In most cases you also need to manage your own memory (see "pointers"). similar too other languages like C, D, Rust, Go.
You would use C++ when you need fast code or on embedded devices where you need to be extra sensitive of certain requirements like memory. Hardware drivers are written in languages like c++ to minimize the latency and impact of chatter between your computer and your shiny new PCI add on card.
Java requires a "virtual machine" to run. java is compiled more or less but it is compiled to an intermediary language that a virtual machine will then read and make the computer do the program. This leads to greater compatibility as technically your java program will run without additional compilation on any computer that can run a java virtual machine. but the java virtual machine means that your program will run slower than a raw machine code program as there is extra layers between your program and the processor (this slow down is not noticeable generally and is absolutely fine for any program you want make in your first 5 years of development) . even though your program is compiled it general will take less time to compile a java program than a c++ program. java is also statically typed. you also don't have to manage your own memory, the java virtual machine will handle cleaning up your memory for you. similar too other languages like C#, Kotlin, Scala
Lots of large, enterprise software is written in languages like java due to the virtual machine worrying about low level stuff like memory management. means your big shiny accounting program is going to be more resilient to bugs like memory leaks, or thread scheduling
Python is an interpreted language. This means you don't need to compile anything but your code is run by an interpreter which is a bit like java's virtual machine. Python programs are generally slower than java programs because the interpreter is doing more heavy lifting and there isn't a compile step to optimize the order and flow of your program. Python is a dynamic language in that you don't declare what you are going to store in your variables you just tell it to hold the value which could be a number like 30 or a string like "potato" or both or neither, Python don't care. Python like java manages its own memory. The biggest interpreted language out there is JavaScript if you are looking for a similar language.
Python is used in lots of rapid development and science programs, a scientist doesn't care about SOLID principles they just want to find out if their theory works or not. Python allows you to get an example of your idea up fast without worrying about compiling or linking or compatibility. if you have the python interpreter you are good to go. Once you have proven your concept you probably want to use a more rigid language like Java. Lots of AI stuff uses python because scientists.
I hope your teacher likes the answer
hello world
C++ is bae
ASM is easy as fuck
Not when you gotta solve DSA questions with it 
It isn't much different then C for that though
It is just procedural programming
Is FlatLaf UI Library only available on IntelliJ?
Or is there any way I can use it on Eclipse to ditch out the outdated Swing library?
funny bug on the current lttstore new items
https://www.lttstore.com/products/lttstore.com/products/womens-boyshort the link that you go to
posting here too coz i remember having issues with this once or twice last time i messed with JS
This answer was pretty good, but I just can't decide which one to master first
I just started with Java three years ago, to make a game of Ludo, as a challenge, and completed it, because of the challenge, and not the interest
Now, because of the interest and for the knowledge, I started with Python, but haven't reached GUI yet, so it's pretty basic right now
Every answer is just adding to my dilemma, that which path should I follow
And it wasn't a teacher's question 
Java if you want a job and you dont really care about programming. The reason i say this is because there is a lot of old java code still needing to be maintained for big companies. Personally i hate it though. Especially becuase all that old java is java8, wich is an absolute dumpsterfire imo. Newer java, like java 11 and 19 are actually quite nice to work with. Still, i'd use Rust or C over it every time.
Totally against jobs, I am behind the knowledge of coding, and want to use it for my personal fantasies and projects and experiments
Then i suggest Rust and C. Rust has one hell of a learning curve but it has one of the greatest if not the greatest programming communities out there.
There's an unofficial rust discord with tons of people that are willing to help you learn and explain things for ya
So I should I totally leave Python and Java and start learning Rust?
I wanted to make apps and use Machine learning, will Rust be able to fulfil that?
No, i think python is still very useful for scripting and non heavy (usually IO) workloads.
Though i suggest you dont bother with java
Define "apps"
Yeah, some people find it really tough and annoying
But as I hadn't known any other languages back then as a child, I started with Java, and learnt it pretty easily
Though I don't remember anything right now
Programs? 😂
The exe files you run on your Windows (I don't know shit about any other operating systems)
Yeah my school courses also started out with java (because its what the industry wants generally speaking)
And ofcourse, Android apps
From there i started learning stuff by myself and stuff
Unfortunately you cant really escape using java for native android apps
The only options are the Dart language and stuff like embedded browsers inside android apps
I'll learn it to be honest, I ain't got any problem applying more effort
What about using Flutter with Dart?
And yes rust is a compiled language and produces exes or elf files for linux
?
Yeah flutter with dart is an option as i mentioned
I haven't yet understood the compiler thingy, as I have only been subjected to Java and Python
What did this mean?
Compiling is turning your human readable code down to machine code, basically you dont need anything else to run it
Java needs the JVM, python needs the interpreter
Ok, I know this basic definition
Are JVM and the interpreter, compilers?
Ok, but I think one person just said above, that they are not compilers and work differently, and thus add to a little of latency and reduced performance
they do "compile" in a sense, but instead do this at runtime
so it's not like a conventional compiler where your source code is compiled to machine code ONCE and you can then run it forever without compiling it again
So, the compiled code is outputted as a new file? which we have to run manually?
While if you run Java or Python code, the JVM or interpreter understands it and makes the system do the work, always at runtime
yes, generally speaking
java and python are not exactly equal in that regard
because java has an intermediate language called java bytecode wich is then compiled in real time by the JVM iirc
So, if I keep making changes to a code in Rust or C++, then I'll have to delete the compiled files manually?
no, you dont have to do delete anything
Yes, even I think I recall that
in my case i just press F5 and it re-compiles my project
Then the compiled code's file is updated ?
see it as a little factory
your source code is the intial product, it goes into the compiler and out comes a binary you can run
without the compiler present
Um, so what's the problem with Rust and C++ then? Like it's just learning a new language and writing code, like other languages, right? Why do people find it very tough? and what about the memory collection stuff
i can move that binary around anywhere on my system, or to another system, and it will still run (granted it's on the same arch and OS)
Python is completely dynamically typed, there are essentially no types and there is a grabage collector that manages all your memory allocations for you
Yes, so it simply gives the machine code back, the machine's primary and only language which it can understand without the use of any other software
yes pretty much.
rust and c are generally seen as "harder" because you have to know alot more about programming and low level systems stuff.
But again, what's the catch with Rust then. What is the difficult part that others talk about?
Rust is difficult because it's a very new way of writing code in the low-level systems language space
Ok, so basically you have to use a lot more of your mind, because you are taking control of much more stuff, which is taken care by softwares in other languages
Yes and there's a few concepts that are brand new like borrowing and ownership
that's kind of where the learning curve starts
you'll be fighting with the compiler alot, not knowing what you're doing is wrong and why it is wrong - however, the rust compiler is extremely helpful with it's error messages IMO
way more than C/C++
though, i do have to say that going from Rust to C is way easier than from C to Rust
mostly because alot of crap you can get away with (but realistically shouldn't) you can't get away with in Rust
you can write alot of unsafe code and undefined behavior in C, rust doesn't let you do that (not implicitly, you can still do it explicitly via a language feature but it's generally not advised)
So, I'll master Python for now, and probably the first years of coding alone
And then, when I get to the complex tasks, or making performance games or server softwares, then I'll start Rust
Sounds like a plan my dude
nothing wrong with dabbling in rust every now and then, and like i said there's a large community that's willing to support newer users 🙂
Thanks man, and others who answered my questions
It wasn't a homework question 😭
if you have any other questions feel free to send me a DM 
Rust does a truck load of checking during the compile step. and it gets uppity if you dont do things like tidy up unused objects or give a mutable reference to more than 1 function at a time. so it forces to keep your code clean but it can be a nightmarish task to properly write your program so that it compiles even though you know the logic is sound. C++ compiler does not care if you tell it to compile it'll go, if your program goes and eats 500 gigs of ram in 2 minutes C++ dont care
I'll think about C++ vs Rust later, I have wasted enough time over the past two days trying to think about this
This first step is anyway mastering Python
hmmm I'm not sure about that. Rust without knowing what malloc and free works kinda feel like you'll have a hard time with understanding the borrow checker 🤷♂️ I have gone from C to Rust tho so i might be wrong
I have seen the opposite with a few people, because doing stuff in rust that would be absolutely possible in C will have the compiler scream at you. You don't have this the other way around
malloc and free aren't that hard to understand either
C is just rust but without having to be forced to write UB-less and memory safe code.
so that's why i think it's easier to do go rust -> C
though not having a package manager at all kinda sucks so you'll also have to learn that.
(yes i know there are technically package mangers for C)
just not built into the toolchain
The nice thing about having to properly write your code is that you compile it once, and it always runs (edited because i mis-read)
Ultimately whats important is doing projects in what ever you feel comfortable in. If that's Python then go for gold. Learn to program and program well then languages will just become mostly syntax and you just pick the language with the best features for the project you want to do.
yes exactly, at the end of the day use the tool for the job
there is nothing wrong with C, rust, python or java inherently
just look at your task at hand and weigh the ups and downs.
haha not trying to crap on rust. i love rust. but it does strictly enforce good coding practices where c/c++ do not
yeah sorry i misread your comment, my bad
i removed that first part of my comment because it was kinda rash
C has been around for a very very long time
and thus has a ton of support for a bunch of stuff
i don't think i'd write stuff for a microcontroller in rust for example, even though i like it more. Because HAL's aren't that matured in rust as they are in C
and there's so many libraries for very specific sensors written in C that it's kind of a hassle to use rust.
yeah C is so old that there is hardware level support for it :p
haha yep
i like C alot to be quite frank - i kind of despise C++ though
maybe java just left a sour taste in my mouth
i like c++'s standard library and general support. C feels a little to much like having to reinvent the wheel with some things
yeah that is true i suppose
may i ask, why?
if i follow the common part between java and C++, is it the OOP supports?
OOP is a part of it yes (why i dislike it)
understandable
and C style syntax
it just feels like C but because java was so popular, they decided to add OOP to it
i think it's why i've come to love rust so much because it has alternatives to OOP like traits and impl blocks
wich are just zero cost abstractions under the hood
definitly, it is one of the reason why rust is my fav lang now
i have learned more low level concepts through rust than through C/C++
to clarify: C++ was released over 10 years before Java
yehhh
ah yeah would you look at that lmao
tho Java was inspired by C++ so... kinda make sense they feel similar
i guess i have my dates backwards lol
modern c++ has something similar to traits called concepts
yeah but the problem is that you're not going to be writing modern c++ most of the time
the same issue with java, java11 and 19 i actually don't mind at all
but everything you're mostlikely going to work on is java8
oh you'd like to work where i work than, we are in java 11 and migrating to 17 this year 😉
hallelujah
tho, to me, both C++ and Java still are flawed by allowing direct inheritance... it opens the door to bad programmer to make bad structure....
im kinda a fan of C# over Java. Microsoft might be massive douches sometimes but the .Net libraries for C# are 
inheritance is 100% one of the big reasons why i dislike any OOP language
yeah C# seems fine
just java but alot better 
Yep, i kinda prefer koltin if we need to go to replace java
+1
kotlin does seem nice yeh
i've also done some stuff in swift for a few months for work, honestly not a bad language at all
i mean you can if you want to. today if you like. Both run on the JVM so are interoperable with each other
you know what's ungodly? Objective-C
Tho the interrupt between java and kotlin is not that great 😦 on paper, it looks amazing, but optional param to construtor are basically ignored by java...
but to give you a final answer: OOP in general. And the syntax kinda fucks me up sometimes, idk why but it gets a little unreadable sometimes.
i guess it's OK when you religiously use unique_ptr and other smart pointers
I also may be a little pampered by Rust so i'm definitely biased.
im definitely biased toward rust nowadays xD so we are on the same camp
I basically haven't done anything that isn't in rust for a long time. It just works.
Only a little C for home automation on some microcontrollers
??? sorry, im confused. there is no interopt layer, both go to bytecode and get read by the jvm. Yes some mapping maybe required but its all just fluff and gets ripped away during the build
they do work together, but some feature from kotlin are ignored by java making some stuff difficult to work with, example: data class
We have a huge data class and when you test in kotlin, its easy to instantiate, you just fill what you need calling the var from the construtor
TheClass(field = "field")
When you use it in java, you either fill none, or all meaning you are screwed if you wanna keep immutability...
The only workaround i have is create a .kt with a function to create it, but you'll do one function per permutation of the constructor you want
@weak rain from what i can tell it seems you really don't like rust, is there any specific reason why?
would love to hear your side
thats fair, i have no idea how you are applying it and im sure you and your place of work have weighed up the pros and cons far more than i have done or, even, can do
nothing against rust
fair enough 
was just curious, nothing personal obviously
at the end of the day you should write whatever makes you happy and/or is the easiest for you
if you don't mind, can you tell me about these rumors?
C++ has been around for longer than Rust. i think there is just more bad c++ code out there than bad rust code. but rust will have its day in the sun of crap code dont worry
i'm kinda curious
there absolutely already is crap rust code lol, nothing is stopping someone from just spamming unsafe blocks and unwraps everywhere 
the more popular/long living a lang becomes, the more shit code is produced
tho there's a couple that produce more shitcode per sec too ex: javascript 
unless its haskel. no such thing as bad haskel code 😛

npm i is-even 
1 dependency. is-odd
the day an is-even package is on the package index of a language, is the day it has become shit
so basically every language is shit, problem solved

tho, it has 100% code coverage
can't be bad right?... right?
at the end of the day dosnt matter if its a Gun, Knife or a Spoon you are more than capable of injuring yourself with them even all 3 of them at once if ya want
with enough velocity on any of those, your foot will explod 
The error is different, fix that first
So, as a career C++ dev, I'll throw my hat into the ring:
I rarely actually go for full Java-style OOP solutions in C++. Issues come up when you apply it too liberally and it makes it quite easy to get into a inheritance and dependency nightmare
Good thing about C++ is that in spite of its complexity, it's super flexible and you can program in basically any paradigm or some approximation of one very effectively
C# is also good, it's better for game development in my opinion
C# only really sees use in the Unity game engine for scripting afaik
Basically every major game engine and studio is using C++ for their core code and then a smattering of other languages for scripting
I may also be a bit of a deviant in that I don't consider use of virtual interface to be OOP, or lack thereof to not be OOP. Like I still consider Rust to be an OOP language. I disagree with the statement that inheritance is a core tenant of OOP
I dont consider rust oop at all. You need to have these concepts present in a language in order to even take advantage of oop patterns. I dont think impl blocks are oop. They are just an abstraction to not have to write standalone methods that take a struct and modify it.
Also, there absolutely is a use outside game dev for c#. Good example is the vast library space that microsoft has made over the years ( think .ASP, .NET for windows apps etc.)
In my view, there's no pattern that a strictly "OOP" language like Java can implement that you can't do an equivalent with in Rust. Traits are just an alternative, more expressive form of virtual interfaces and polymorphism
The main part is inheritance imo. Basically every contemporary OOP guide strongly discourages stateful inheritance, which basically eliminates that "tenant" to begin with
Yes that is the main issue with oop imo
I think what people really try to get at with OOP is that "objects" are independent and behavioralistic entities that can trigger actions onto other entities or themselves.
This is much more closely related to the original form of OOP introduced by Smalltalk, which focuses on message passing and polymorphism
Rust with Traits basically does this already, and you can already form very OOP-eqsue code that just looks a bit different in Rust because of it
Same with Golang, which similarly doesn't have inheritance or virtual functions, but implements interfaces which allows for polymorphic dispatch and and combining behavior+state
Basically every heavily OOP architecture can get a benefit from separating data from state/behavior, however due to the ease of combining them this often doesn't happen, and that's my personal belief where distaste for OOP comes from
Fair enough
I personally love C#, it's the programming language I use as my default for basically any of my hobby projects unless I have a specific reason otherwise. I really wish it had more widespread use outside of backends for ASP.NET and other web-related stuff. But yeah, you're unlikely to find many game devs using it outside of a handful of notable examples, like Terraria, since it uses MonoGame/XNA which are based on .NET
I still don't think i'd start any project in c++ today, and maybe that's alright. I don't really have a use for it.
Still see it in windows desktop apps a lot.
Yeah, that too, but over the last 5 or so years it really feels like everyone has been pushing to make everything and the kitchen sink into a progressive web app... which I have some reservations about. Not the least of which because it basically leaves me with nearly my entire 10 years of programming experience completely without a purpose in the industry.
To be fair I wasn't learning C# specifically to get a job, but my primary language experience is effectively not useful and that feels bad.
But I digress. I mainly develop my own little console/terminal-based programs for personal projects, and it's absolutely excellent for those IMO.
To be fair, if you have 10 years of experience, it shouldn't be that hard to adapt if needed
I do agree however that Electron apps are kinda bad
True, though admittedly I have quite a few complaints about the direction the industry at large is headed, so my own stubbornness is going to be what makes it hardest for me to adapt 🤣
But I'm working on it!
Good 
There is also a lot of cool stuff in these advancements, namely the SSR side of things people are shifting to now that make pwa's less bulky and a lot faster
Doesn't really solve the problem that these bulky apps have like redicilous memory usage but ey
I think I may have worded my message poorly. I meant that specifically within gamedev, I am not aware of any major use of C# outside of the Unity engine where C# is its scripting language.
I am definitely aware of the massive amount of industry support and use there is for C# in other applications though
Yep that is true ye
I work with a pretty bad C/C++ legacy codebase. Like, it's not that old code is necessarily bad. I've worked with plenty of decent but old code. This code, however, is amongst the worst I've ever seen.
We're gearing up for major rewrites within a few months because it's basically unmaintainable
Well it's good that we're trying to slim down web apps and make them faster and more efficient, that's probably my biggest complaint about them overall. They're meant to be a one-size-fits-most solution to make your app cross-platform and easy to deploy, which is fair, but in my eyes it often comes at the cost of performance, install size, and memory bloat. Not to mention that, if you don't need/want cross-platform support, it would be pretty silly (IMO) to make a web app rather than a native app unless that's your only familiar language/platform.
Thats the unfortunate truth of having a very old language. Rust isn't clear of this either, in due time it will experience something similar (maybe not quite to the extent of c++ but yeh)
Funnily enough it's not even the memory management that's the hard part. I haven't encountered a single bug related to memory or anything "unsafe" from C or C++ bad practices. It's just all super dense, overly complicated logic everywhere with 2000+ line functions and tons of state being thrown around everywhere
It's reminiscent of a big old bandage ball. A lot of patch work over the years does that to any code tbh
yup that's pretty much it. "big ball of mud"
I've seen something along those lines myself, a 15-year-old simulator in C++. Update calls every frame that are enormous 1000+ line switch-case blocks for each object because the update call happens once per frame for each simulated object in the world and the entire processing code core happens for every possible vessel state and configuration.
Ohhh man
Transactions that go through "interfaces" have just giant if statements that dispatch what's supposed to happen
but the worst part is I don't think the original maintainers of this software heard of "functions", because they literally do the same thing over and over copy and paste with no modifications
Headache: The Codebase
or worst when it's copy and pasted with one line different
makes it so difficult to figure out wtf is happening
Yeah it sounds pretty inscrutable
hey do any of you know how to turn a char into a String for user input?
on Java?
so, I'm pretty sure Scanner's nextLine() function gives you a String to begin with
Yeah, there is no nextChar function tho
right, you'd probably just pull the first character from the string
like myString.charAt(0) or myString[0] or something
Ah, but they heard of "job security", because no one wanted to touch that code 😄
I like Luke's security approach in the inner js goop of floatplaneinfra, naming the 'secret don't leak this sauce' "SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED" so that no one accidentally puts them were they don't belong.
Had a poke in the livechat system that Floatplane has and made a golang client. (Took roughly around 3 hours?)
So now I can send messages and receive them, I can also get the user list and current emotes. Pretty cool...
||First message is there to figure out what user guid I have, if there is a better way of getting it without sending a message let me know! :D||
You can find this here: https://github.com/Flonja/sinkingchat
Hi I was making a tic-tac-toe game in react but the I need to make on extra move for it to show the winner
This is the logic I am using
const winningSet = [
[0, 3, 6],
[1, 4, 7],
[2, 5, 8],
[0, 4, 8],
[2, 4, 6],
[0, 1, 2],
[3, 4, 5],
[6, 7, 8],
];
const setMove = (boxidx) => {
if (!isFilled()) return;
const win = isWon();
const newboard = board.map((value, idx) => {
if (idx === boxidx) {
return player ? "X" : "O";
} else {
return value;
}
});
setBoard(newboard);
console.log(board);
console.log("return " + win);
setPlayer(!player);
};
const isFilled = () => {
return board.includes(null);
};
const isWon = () => {
winningSet.map((set) => {
const [x, y, z] = set;
if (board[x] && board[x] === board[y] && board[y] === board[z]) {
console.log("winner is " + board[x]);
if (board[x] === "X") {
setScore({ ...score, score1: score.score1 + 1 });
console.log(score);
setWinner("winner is x");
}
if (board[x] === "O") {
setScore({ ...score, score2: score.score2 + 1 });
console.log(score);
setWinner("winner is O");
}
return board[x];
}
return null;
});
};
how do I make the checking and a winner declaration component appear as soon as I click the final move
Why do some people dual boot with Windows and Ubuntu on a single PC?
And how do they use it? For example, the reason for dual boot might be for using Ubuntu for programming, as a developer, so Ubuntu stays the primary boot OS, but they switch to Windows, for games, and only for specific use cases, when they are stuck with something that Ubuntu isn't able to solve, like, not being able to run some program
I use Debian/openSUSE and Windows, Linux for all work and gaming, Windows just for 3DMark
I'd only use Linux but I love 3DMark and it's Windows only
Why use Linux for gaming? Aren't some games not supported or optimized there? Also, does the hardware sometimes not well-pair with the games, in Linux?
Also, isn't 3DMark a benchmark test?
You downloaded a different OS, only for benchmarking?
I'd rather not game than game on Windows, all my games are Linux native, works flawlessly
Must be a true PC tech reviewer.. 😂
Yup
I didn't understand
Just out of curiosity, how frequently do you benchmark?
So far 12 benchmarks this year 
Also guys, I saw that some people who dual-boot, keep the two OS in different drives, for ease of not partitioning and other problems, like trying to format
Now, can this work?
I set up unactivated and free Windows 10/11 as the first OS, on a slow drive (maybe an HDD, because if it's not my primary OS, why spend extra on the drive, because it's going to be for gaming and used only when I get the work done on Windows?
Then I dual boot and set up Ubuntu on the M.2 SSD, my primary drive, and then use it as intended
But now, if I do not like the setup and want to switch the OS, then can I do so, without any data loss?
A bootloader on Linux such as refind can see the windows on the other drive
Assuming it's efi
Even in legacy mode it should work
You can also setup windows boot manager to see Linux but it's more complicated than having refind boot windows
@willow storm
You are telling me about a program that will help me use dual boot right?
My main question was about switching the drives between the two OS
that's the same thing
doesn't matter if it's on different drives
refind, the boot manager I like to use will see windows on the other drive
I didn't understand
oh as in switching, it depends
it all depends how you install
how you keep the data like a separate partition, but I would still recommend backup seperatly
Hi guys and gals, I have a question. I see that Gyazo (the screenshot app) has an open source windows client. I also see that the available free windows version of Gyazo has built-in limitations (7 seconds GIF and video) that are different from the paid version (30 seconds limit). My question is : would it be possible for a developer to just fork the source code and plainly remove these limitations ? Maybe save the files locally ? Thanks for the answer! (And no, I won't do it myself, I'm not a programmer. :))
Are you asking me to keep backups always? or backing up before switching the OS? and what is the best way to switch the OS to the different drives?
probly
most likely
hi y'all
does anyone know of an arduino project I could check out? I bought one and it turns out I don't really need it, so I'd like to get some use for it instead of collect dust, maybe something I could do where it connects to my modem? idk honestly any suggestion is fine
So y'all.
I was thinking about stuffs.
GitHub Copilot is a thing, right?
I was thinking, does Microsoft vet the code being put into the training dataset?
Because I am pretty sure they don't. If they don't, then that could theoretically allow an attacker to poison the dataset by deliberately coding up software with intentional security vulnerabilities, and then proceeding to allow their code to be trained on by Copilot.
They don't, and thats what is leading to a lot of the "legal issues" around it, it consumes the data of a lot of projects, some are "open source" with licenses that are prohibitive of profiting off of it, which they are being sued for violating. As for writing vulnerable code, you don't need poisoning for that, it already provides vulnerable code if you are not auditing it (I have seen it build stuff with SQLi, XSS, etc), and it could very well provide examples with packages (in Python or JavaScript for example) that are vulnerable if not reported and pulled.
Fair
That's the biggest argument one would have against people who claim software developers will be replaced by AI
Also, you'd need to hire highly skilled, and high paid developers that know how ML works and how to build models.
And you will also have to hire high skilled programmers who know how to proofread code that wasn't written by them and be able to spot any security holes in it
So in the end, congrats, you achieved nothing by replacing software developers with AI 👍
So far between ChatGPT and Copilot, I don't see anything "Gotta replace me". I still have to check the work, I still have to make sure it functions, and when it fails, takes more troubleshooting. Its great for making quick basic scripts / tools. But when I have tried to get it to do something more advanced (for example, complex, serverless or container based solutions) its not gonna do well.
Oh I know. But people really think software developers gon be replaced by ML algos. When in reality, ML algos are almost literally monkey see monkey do
Or stop living in the 90s in BIOS/MBR hell and instead embrace UEFI/GPT and let the motherboard do the boot selection
arduino uno? you could make a packet sniffer
yes it's the uno, do you mind to ellaborate?
Calculators didn't replace mathematicians. Spreadsheets didn't replace accountants. Microwaves didn't replace chefs. But i have probably, thankfully, hand written my last CRUD api.
yeah p much
i dunno if i wrote my last one yet, but the day's coming
does anyone have experience using supercomputers with ssh? I want to know, after i have created the ssh key, how do i access the supercomp?
like i log in or whatever but then what
I'm coding illiterate, so maybe someone can help me with this.
I'm following the shopify dev page, this stuff here.
yet when I put this in:
it generates this monster in the preview:
im guessing it needs something to process on? im not 100% sure having done about 10 minutes of ruby in my life
maybe something like Invoice {{ today | date: '%B %d %Y'}}
No dice. preview is now just "Invoice" with nothing after it.
I tried copying "article.created.at" from the shopify one as well and got the same blank preview.
could you give me a url to that shopify page you are looking at
ahh this should do it
Invoice {{ 'today' | date: '%B %d %Y'}}
yeah its the next code block down in their example
that worked. Now the question is, I see the shopify page saying there's a difference between "article created at" and something like "today". Will today generate a time that is always today? I need it to generate a time that is for when the email/invoice was generated
from the looks of it it is run when the email is generated