#development

1 messages · Page 9 of 1

oblique remnant
#

but you can confirm it yourself by adding in the time to the equation and sending yourself a couple of emails a few minutes apart
Invoice {{ 'today' | date: '%B %d %Y %H:%M:%S'}}

jovial jetty
#

Thats actually what I plan to do. my goal is to convert all my invoicing numbers to date/time

#

like such

#

I guess its technically the subject line of an email so there's no way for it to change after sending.

oblique remnant
#

yeah once its sent its just text.

jovial jetty
#

Does that also apply to the body of the email?

oblique remnant
#

yeah

midnight wind
#

?

#

You don't want to spam f12 every single time

#

Just have it boot to refind

shrewd siren
#

Anyone know of any free write-only public log file services?

I need to be able to accept semi-private log files (Brower Command Line data that can contain search queries) from users in a way that allows them to upload-only, and that I can read later. Are there any existing services for this that I use and can point my github issue reporters for uploading?

Alternatively, I could ask users to encrypt their log files using public key encryption but I don't want to encrypt the local log files by default so that more tech savvy users can review the log files themselves.

Suggestions are appreciated, Thanks in advance!

humble mirage
#

add a log upload tool inside your application? let them upload through a website controlled by you that you do encryption inside before passing stuff to permanent cheap storage?

slow zephyr
umbral plinth
#

I imported my Apple PC's to my game (btw the name of the brand in-game is changed due to copyright reasons)

umbral plinth
#

I named the Apple brand "Quince"

dim lava
#

All 3 of my latest changes are now stalled from submission because of issues in the testbenches that are causing them to fail 😅
all of them failing in a different team's testbench

umbral plinth
#

working on a linux version of a game im making

#

it's designed for windows but a linux port may do well

gleaming sail
stiff mason
#

I'm about to send a cease & desist to amazon for its continuous campaign to psychologically scar me as an AWS user

stone pumice
#

good

hollow basalt
#

what did i just read

stiff mason
# red mulch In what respect?

Several, but overall the absolute state of some of their services & developer tooling. I keep having to re-learn the lesson that a lot of things are broken and will leave you stranded as soon as your use-case strays outside of mundane/rudimentary.

Amazon has such a massive marketing budget - its easy to be suckered into thinking things like Amplify, Codepipeline, AppSync etc are viable when there are 100 prominent influencers on medium and youtube claiming they are the bees knees.

So many services that just dont work - half-finished, half-baked solutions that were seemingly incepted when some company paid an AWS Solutions architect to build something, and then released to the public and never fixed/maintained/updated again... at least until a new company comes along, tries to use it, gets stranded and pays another solutions architect to further develop the service.

red mulch
#

oh you better believe it

#

especially if it's not a tier 1 amazon app.

#

we used amazon uhh... whatever the phone thing is

#

no api. Login uses an AWS login, so if you're using/testing it and you login to AWS it fucks it up. UUGGGHHHHHHH

#

a lot of things are just thin veneers over a bunch of lambda functions (I'm looking at you code pipeline)

#

The key is to stick to the "basics" tier 1 services and go from there.

next cipher
#

ran into something like that at work a month or two ago

#

they just randomly made breaking changes to one of their SDKs with no warning and didn't even mention it in the changelog

red mulch
#

lambda, ec2, sqs, sns, s3, efs, rds, networking, load balancing, etc.

red mulch
next cipher
#

then when i complained to our rep and in a ticket their response was straight up "we can change things whenever we want and actually it's your fault for assuming we follow semantic versioning"

red mulch
#

user error 😄

next cipher
#

the SDKs are usually pretty poorly documented and maintained

#

but that is definitely the most egregious I've seen

red mulch
#

oooh, yeah, they are.... .... useable.

#

but I haven't done AWS for like ... a year?

#

and I have done azure, and fuck I hate azure. It's like a microsoft guy from 2005 heard about cloud and was like "oh shit we better make some cloud"

#

AWS as discussed has its problems, but it has the feel that it was at least core designed by engineers, not button mashers

next cipher
inland maple
#

IDK SAM is absolute jank

#

Anyone know of a good way to implement a metrics counter within AWS? We use DDB for a lot of things but their non-atomic "atomic" updates in DDB aren't great.

granite oracle
bronze mural
#

does this look like a 2008 UI ?

red mulch
#

Looks like a Zune skin

cedar hinge
umbral plinth
#

i think it looks good

weak lichen
#

what the fuck does this mean
Makefile:2: *** missing separator. Stop.

here is my makefile:

all:
    g++ -g --std=c++17 -I../include -L../lib ..src/*.cpp ../src/glad.cpp -lglfw3dll -o main
livid bison
#

Twitter's public algorithm has some banger PRs today

dim lava
#

makefiles are whitespace sensitive

#

i normally suggest using cmake instead of make because it simplifies your life a ton

weak lichen
#

but I actually just switched to rust because I got lazy 💀

oblique remnant
#

++ for Rust. Cargo runs circles around cmake imo

restive ore
#

for those who used MATLAB in university, do you actually got a school license for it, or just a "license"(aka, a iso)

crisp harness
midnight wind
#

Would login with school email and it will give you the proper licence

grizzled steeple
#

Announced today

random ivy
#

I want to employ your guys' brilliance - I'm working on a birthday scavenger hunt type thing for my wife. I'm making it in Python, if that matters.
I already have 10 steps coded that range from silly (fake) questions, to substitution cipher, ASCII85 encoded strings on notes around the house, Bacon Cipher, Satisfactory coordinates to a clue, Spotify playlist QR with titles as the clue and so on.

She's into geeky things, video games movies and the like. She's not so much into coding, ciphers and all that, but I figured this might be a fun way to introduce her to the concepts here.

I'm wondering if you might have any other cool ideas of how I can hide clues to stuff.

Ideas I've been considering but too lazy/stupid to implement: AR model with a clue hidden inside it, youtube videos where the clue can be decoded by skipping to the parts in a correct order, geocaching.

restive ore
#

advantages of being on a non-english country i guess. but it's probably because we just use matlab for simple stuff. 🤣

uneven owl
#

Might be a stupid question. But I created a Docker container for the data science project my team is working on. So we have to deal with less merge conflicts when working on the same notebook and so we can share one requirements.txt file that works on all machines (because of different operating systems). We like to use VS Code for development because it has an easy integration with Git, decent highlighting, and integration of handy plugins like GitHub Copilot. But.. once I select the Jupyter server of the Docker container as the interpreter, the intellisense of packages installed with pip install are lost. Only the most basic packages still have intellisense since their source code is stored in ~/.vscode/extensions. Now I don't really want to use the Dev Containers extension because you lose access to git integration from the terminal/extensions that way. But would it be possible to select the python interpreter of the Docker container as the python interpreter for VS Code? Or would it be possible to add the source code of other extensions to the ~/.vscode directory? And would it be possible to update these automatically when starting the Docker container according to the requirements.txt file?

twilit beacon
dim lava
umbral plinth
silk eagle
#

im loving the sound

umbral plinth
#

thanks, i got it on a royalty free website

night halo
#

shotgun channels much

primal blade
brisk thunder
#

Anyone developing for scientific research in emacs? (Very niche field I’m aware)

shadow rapids
#

Scientific computing for fluid dynamics

#

But to be honest, I develop on my laptop in VS Code, then copy paste the whole file into nano when I SSH into the HPC

#

Ping me btw

brisk thunder
#

@shadow rapids ahhh I don’t work in HPC mainly computational math (working with a perturbation algorithm for a graph network)

#

It makes sense why you would use nano though, you don’t really need to do extra editing once you have it established in vscode

#

I’ve started using emacs for latex and python but I still run MATLab and R in their respective ides

shadow rapids
#

I really hate the default editor

#

Problem is, I use macOS, and MathWorks has not released an Apple Silicon compatible CLI MATLAB. Which, in my opinion, is completely embarassing.

brisk thunder
#

Their community is super nice too, similar to rust

shadow rapids
brisk thunder
#

Julia is very fast compared to Python, and it’s speed is near comparable to C. The documentation is there and it’s really good for establishing macros and runs with LLVM

#

Obviously nowhere near as good as C but better than matlab

midnight wind
brisk thunder
#

You could develop without Simulink kekw, but why is Simulink so vital to you?

#

I’m sure there’s numerical libraries for any other language that’ll offer you the same endgoal, but is it just the graphical interaction you prefer?

midnight wind
#

and modeling

shadow rapids
#

I don't use Simulink

midnight wind
#

it's not just the graphics, there's many other parts of it that are useful

brisk thunder
#

I do modeling and we don’t need Simulink, my models are for neurons/neural networks

#

We just use matlab because it’s easy to code a quick simulation for testing but not implementation

midnight wind
brisk thunder
#

I run data sets from physics engines. But there’s literally FreeCad

midnight wind
#

freecad sucks

brisk thunder
#

I think Simulink might make it an easier front end but it’s not the only option

midnight wind
brisk thunder
#

I mean, then why not C

#

The libraries have existed for years, same with Fortean

#

Fortran
MATLab uses a lot of the open source C libraries

midnight wind
brisk thunder
#

You can draw them with hand and figure out how to model them

midnight wind
#

that's a waste of time when there is software to do it for you

brisk thunder
#

The EE I know who’s been working with circuits uses a software specific to their company so I don’t know why you use matlab

#

Are you in school? Because then that makes sense

#

What is your job or end goal?

#

Because if you need matlab then you can just use it, but I was just offering a solution to someone who wanted a different solution than matlab

midnight wind
brisk thunder
#

Well, if you’re in school. There’s nothing stopping you from building that alternative for the future if you have time. Hopefully if you’re still in school, then by the time you go to a company you can just use their implementation because they usually have it scaled to their entire operation

umbral plinth
umbral plinth
#

ignore the desktop

cold steeple
#

rustaceans assemble crabrave

#

rust deserves it's own channel fr

umbral plinth
#

no they don't

cold steeple
#

we do

umbral plinth
iron lynx
cedar hinge
bitter edge
#

I was bored so i created a calculator

bitter edge
limpid bough
#

Dawg I watched it

#

I don't care about development

bitter edge
errant turtle
#

Does anyone have experience with getting the API key from a Google Cloud project? Im super confused and google is just not helpful...

bitter edge
twilit beacon
limpid bough
#

Bros broke

vestal spire
#

I have a question regarding testing. Let's say I have a test case where i have to update/manipulate data a certain way and check if it updates correctly. However, the test data should be reset to the original state so the test can run and update it again. Should I perform the reset before or after the test?

For example in jest's context:
beforeAll() vs afterAll()

mortal geyser
foggy coyote
#

I'm actually the mostist coolest

bitter edge
stoic imp
#

Does music production count as development?

hollow basalt
#

If you develop the software

stone beacon
#

anyone good with MySQL Queries, got a strange one I can't thing of a resolve for

It's for views, I'm querying the views table and grouping by country and date, to graph, but if I limit the query then it will limit the amount of days of data it shows, but i want all days of data in a range, just for a limited amount of countries

twilit elk
#

or am I misunderstanding something ere

#

i probably am, normally not digging into views :P

stone beacon
#
select
  `country`.`display_name`,
  Date(article_views.created_at) as date,
  COUNT(article_views.id) as value
from
  `article_views`
  left join `articles` as `article` on `article_views`.`article_id` = `article`.`id`
  left join `ip_addresses` as `ips` on `article_views`.`ip_address_id` = `ips`.`id`
  left join `cities` as `city` on `ips`.`city_id` = `city`.`id`
  left join `countries` as `country` on `city`.`country_id` = `country`.`id`
where
  `article_views`.`created_at` >= '2022-04-06 00:00:00'
group by
  `country`.`display_name`,
  `date`
order by
  `date` desc

This is the current query, table looks something like this https://cdn.dectom.dev/noc-kYjnOV3jXu.png

IP Address ID resolves to an IP which has a city which belongs to a country

#

I want to group the views by date and country, then only return the top 10 countries

twilit elk
#

about to jump into a meeting but I threw the question at bing...

select
  `country`.`display_name`,
  Date(article_views.created_at) as date,
  COUNT(article_views.id) as value
from
  `article_views`
  left join `articles` as `article` on `article_views`.`article_id` = `article`.`id`
  left join `ip_addresses` as `ips` on `article_views`.`ip_address_id` = `ips`.`id`
  left join `cities` as `city` on `ips`.`city_id` = `city`.`id`
  left join `countries` as `country` on `city`.`country_id` = `country`.`id`
  -- subquery to rank the countries by their total views
  join (
    select
      country_id,
      rank() over (order by sum(value) desc) as rank
    from (
      select
        city.country_id,
        count(article_views.id) as value
      from
        article_views
        left join ip_addresses as ips on article_views.ip_address_id = ips.id
        left join cities as city on ips.city_id = city.id
      where
        article_views.created_at >= '2022-04-06 00:00:00'
      group by
        city.country_id
    ) as t
    group by
      country_id
  ) as r on r.country_id = country.id
where
  `article_views`.`created_at` >= '2022-04-06 00:00:00'
  -- filter by the rank of the countries
  and r.rank <= 10
group by
  `country`.`display_name`,
  `date`
order by
  `date` desc;```
#

(I've had mixed success with bing and sql queries myself)

stone beacon
#

oh yeah it's gpt powered now, forgot about ai. might have to give it a hit

#

and r.rank <= 10 it just made up a rank column?

#

wrapping the rank with '' just resolves it, it runs, a bit slower then i'd have liked but it does run

twilit elk
#

Yeah it did spit out at me that its good to test it first to make sure things are ok.. but yeah, it did look a bit more "fluffy" than I wouldve wanted too..

stone beacon
#
SELECT 
  `country`.`display_name`,
  DATE(article_views.created_at) AS date,
  COUNT(article_views.id) AS value
FROM 
  `article_views`
  LEFT JOIN `articles` AS `article` ON `article_views`.`article_id` = `article`.`id`
  LEFT JOIN `ip_addresses` AS `ips` ON `article_views`.`ip_address_id` = `ips`.`id`
  LEFT JOIN `cities` AS `city` ON `ips`.`city_id` = `city`.`id`
  LEFT JOIN `countries` AS `country` ON `city`.`country_id` = `country`.`id`
WHERE 
  `article_views`.`created_at` >= '2022-04-06 00:00:00' AND
  `country`.`display_name` IN (
    SELECT 
      `country`.`display_name`
    FROM 
      `article_views`
      LEFT JOIN `ip_addresses` AS `ips` ON `article_views`.`ip_address_id` = `ips`.`id`
      LEFT JOIN `cities` AS `city` ON `ips`.`city_id` = `city`.`id`
      LEFT JOIN `countries` AS `country` ON `city`.`country_id` = `country`.`id`
    WHERE 
      `article_views`.`created_at` >= '2022-04-06 00:00:00'
    GROUP BY 
      `country`.`display_name`
    ORDER BY 
      COUNT(article_views.id) DESC
    LIMIT 10
  )
GROUP BY 
  `country`.`display_name`,
  DATE(article_views.created_at)
ORDER BY 
  COUNT(article_views.id) DESC;

This seems like a better solution I got from chatgpt after prompting it a bit, but I get this error [42000][1235] This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'

So I can't limit in a subquery on the where? kinda sucky, wonder what version i can go to for that its just straight up not supported https://dev.mysql.com/doc/refman/8.0/en/subquery-errors.html
https://cdn.dectom.dev/noc-PRyf2LYj0e.png

As a whole, far more efficient, but still doesn't limit to top 10 countries pepeHand

wind horizon
# vestal spire I have a question regarding testing. Let's say I have a test case where i have t...

Typically I use before methods to setup and after methods to tear down / cleanup. Since you are talking about resetting state to default, I’d use after.

Quick note on all methods, they are used for the test suite / file in Jest. So you’d use beforeAll todo setup once for multiple tests and afterAll to cleanup. When you need todo it per a test then you use the each methods, beforeEach and afterEach.

On the Jest docs there is a helpful section called order of execution that demonstrates when every method runs using console logs.

errant turtle
#

Could someone tell me what im doing wrong here, its discord.py

import os
import discord
from discord.ext import commands
from discord_slash import cog_ext
from discord_slash.context import SlashContext
from discord_slash.utils.manage_commands import create_option

Tries to import "discord_slash" and says this

Traceback (most recent call last):
  File "main.py", line 4, in <module>
    from discord_slash import cog_ext
ModuleNotFoundError: No module named 'discord_slash'
nocturne galleon
#

your python environment doesn't have the library installed

errant turtle
#

I tried that

nocturne galleon
#

weird

#

i dont use discord_slash for my bot though

errant turtle
#

What do you use?

#

ill use anything at this point

nocturne galleon
#
@client.tree.command(name="ping")
async def ping(interaction: discord.Interaction):
  await interaction.response.send_message(
    f"Pong! {round(client.latency * 1000)}ms", ephemeral=False)
errant turtle
# nocturne galleon pip install discord_slash

This is what it says when I do that

ERROR: Could not find a version that satisfies the requirement discord-py-slash-command (unavailable) (from versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.4.1, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.8.1, 1.0.8.2, 1.0.8.3, 1.0.8.4, 1.0.8.5, 1.0.9, 1.0.9.1, 1.0.9.2, 1.0.9.3, 1.0.9.4, 1.0.9.5, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.4.1, 2.4.2, 3.0.0, 3.0.1a0, 3.0.1, 3.0.3, 4.2.1)
ERROR: No matching distribution found for discord-py-slash-command (unavailable)
nocturne galleon
#

just use discord interactions

errant turtle
#

how install that?

nocturne galleon
#

you already did. its part of the discord library

errant turtle
#

I did???????

nocturne galleon
#

set up your slash commands the same way my ping slash command i sent is set up

desert iron
weak lichen
ionic sun
#

Can soemone with a google play console account dmme? i want to transfer 2 apps to another play console acc since theyre clogging my list, and i cant delete them please dm me

limpid reef
# ionic sun Can soemone with a google play console account dmme? i want to transfer 2 apps t...

I've never used Google Play Console (aka an Appstore developer account?) but looks like Google has instructions on a support article.
https://support.google.com/googleplay/android-developer/answer/6230247?hl=en

carmine lantern
#

can't seem to figure out how to give this the proper user input

delicate basalt
#

May be a long shot, but try changing the ++x in your for loop to x++

#

I can't really see anything wrong with your code

silk eagle
#

I'm a python abuser but in my google searches it looks like .substring() takes a starting index

stoic charm
#

Would it be possible to run a game’s logic and how often it checks for input at a higher rate than the framerate? Wouldn’t that reduce latency? Or is there some problem with doing that?

wind horizon
# carmine lantern can't seem to figure out how to give this the proper user input

Yup what Pepe said, looks like subString requires a start, but end is optional and if end isn’t passed it goes from start to end. Since you passed 3 characters and start at the 3rd I’m guessing that shortEntry is now an empty string and matching the first item in the books. Try changing it to subString(0,3)

Idk Java well, but looks like the code is also trying to stop the loop by making X the length of the array. You can probably use a keyword like break to get out of the loop more elegantly.

If you have a local IDE with debugger it’ll help a lot with inspecting the code while running it, but if you don’t a quick hack could be to toss in some println to print the current variable values.

carmine lantern
#

I switched if(books[x][0].startsWith(shortEntry) to if(books[x][0].startsWith(entry) and it passed the checks

silk eagle
carmine lantern
#

Anyone understand arrays well? This is for a homework assignment, but I'm unsure how to set this up

delicate basalt
#

god i should get back into programming...

carmine lantern
#

different variable?

#

I'm confused

#

I'm still getting lossy conversion errors on line 16 and line 27

delicate basalt
#

so for your array index, you want an int. currently you're using a double. im just saying it mnay be best to make a new variable for your index (you don't HAVE to tho 😊 )

carmine lantern
#

ahh ok, the problem is I need to be able to input doubles and get the averages of doubles, not integers

delicate basalt
#

OHso you'd want to do an explicit typecast everywhere you're using average as an array index. just put (int) in front of it

delicate basalt
carmine lantern
#

got this now

delicate basalt
#

java sees that decimal point and freaks

carmine lantern
#

do I need to convert the double into a String and then convert the String into an integer?

delicate basalt
delicate basalt
#

gonna say this rn: don't feel bad if you don't understand arrays right away. it took me a solid month in school to figure it out

#

oh i forgot! you'll need a new import statement to use Scanner

#

at the top of the file, add import java.util.Scanner;

#

i think i see some confusion... when i say array index, i mean the spot in the array where the data is located, not the data itself, example: in array[x] = 2, x is simply telling Java where in the array to stuff that 2

#

if you were to print the contents of array[x] after that, java would print a 2

carmine lantern
#

ahh ok

#

uhh the only thing I have now is a "bad operand for binary operator on line 29

delicate basalt
#

wtf

carmine lantern
#

also when I try to get an average it just tells me "no numeric values were entered

carmine lantern
delicate basalt
#

that's weird

#

i've never cared for java bc of shit like this

carmine lantern
#

oh shit when I change it to my 'distance' double it tells me the average is Infinity

#

idk what I'm doing lol

delicate basalt
#

im getting intellij

#

give me a sec. i would already have IntelliJ but i wiped my computer recently

#

wait i could do this in vs code...

#

I THINK I FOUND THE ISSUE

#

you're using the average as an index

#

im seeing a lot wrong now that im copying this

carmine lantern
#

lmao

silk eagle
#

this is why I use a method called the "write twice" super time efficient method. I write code once, then I go line by line rewriting it.

carmine lantern
#

I asked stackoverflow

silk eagle
#

i write the code once, right
and then i rewrite it which lets me go through the code step by step and disassociate with the code

#

i talk in my head like
"ok so we're gonna iterate through th-- oh shit thats inclusive exclusive its gonna be 1 off"
"alright now if this value is 💃 this 💃 itll do this but oh crap theres an edge case here"

delicate basalt
#

that's what im trying

#

big hint: line 30, you're comparing a whole array to a 0

delicate basalt
silk eagle
#

the screen is my rubber ducky

delicate basalt
#

i have an actual rubber duck somewhere just for debugging

#

idk where he is tho 😦

carmine lantern
#

I don't know how to do that, I'm just tryna get the averages

delicate basalt
#

from what i can tell you're doing that math correctly

carmine lantern
#

I tried asking for help on stackoverflow and they closed my comment

jagged marsh
#

Good day Linus tech tips

I hope you are doing well and having fun as per your tube channels which we as a family love to watch.

My name is Markus and I’m from South Africa.

We all our pcs and electricity costs are getting extremely high, not just for personal use but for business use as well
What if I tell you that I designed a new energy source which we all can use for our pcs and use later as a source for businesses as well.

This means you wont ever have to pay for electricity but just for maintenance for the design.

I would love to have an opportunity to have a full in depth chat to you regarding my design and see where our chat leads us

Thanks again and always stay as your are

hollow basalt
#

Is it written in java or go

humble mirage
#

Has to be Adobe ColdFusion

#

ColdFusion Markup Language, more commonly known as CFML, is a scripting language for web development that runs on the JVM, the .NET framework, and Google App Engine. Multiple commercial and open source implementations of CFML engines are available, including Adobe ColdFusion, Lucee, New Atlanta BlueDragon (who offer both a Java-based and a .NET-...

mortal cradle
#

Does someone have some VueJS / Cors expierience who's brain i can pick? 🙂

grizzled steeple
#

You mean CORS as in Cross-Origin Resource Sharing?
I do have some knowledge in VueJS but wouldn't call myself an expert. Still learning the more advanced ways of working with the Options API and only recently started reading into the new Composition API...

flint mist
#

Hi guys. I've been working on a website project in java script... most of the stuff is done however there's some issues with the login service (database). I use MongoDB/Atlas. If there's anyone with experience, you can DM me and i can explain, or even call if it's not a problem. I don't think the issue is big, i think i roughly can point to the problem that's occurring, and i don't think it's a huge issue. I had an issue with the recipes, but i kinda sorted that out. Backend is kind of my weaker side, i haven't gotten the time around to play with it. If anyone wants to help me, you can hit me up! The project also uses node.js code as well. Any help would be appreciated!

#

The website is about food products. And no, this won't be a website that i will use.

rose blaze
#

Hey guys, I’m working on a project that involves pulling data from several rest APIs and comparing the data across them. We are trying to use a DB with it and I’m trying to find the best way to do this. Currently we are using Python but I was curious to see if there is another better way.

If you have any insight, feel free to send me a DM. I would love to bounce ideas off of someone with more experience.

jovial jetty
#

What is this and how do I get rid of it? My website should have no facebook plugins or anything of that nature.

nocturne galleon
#

I made a minecraft mod

silk eagle
jovial jetty
echo fog
#

i am a uni student and i am sort of ok with java but i have never used swing before

#

the assignment description said to use swing

hollow basalt
#

then swing it

echo fog
#

i didn't read the assignment description properly and made the entire project in javafx

#

it is due in 2 days

#

ill probably be fine but :(

hollow basalt
wind horizon
#

Checking on the Facebook developer site looks like connect is for sharing account info, friends, etc often used for signup/login with Facebook. If you have a pre-made auth solution, like Okta, Firebase, AWS Amplify, etc they often have a Facebook option.

jovial jetty
#

I think I may know what the source is though. Could it be from facebook's advertising tracking? I think its called pixel?

unborn imp
#

If you posted the site I'm sure someone here would find it in about five seconds.

#

Tracking pixels, 3rd party comment systems, maybe GTM, there's a whole bunch of options.

jovial jetty
#

Even if its found, I may not be able to do anything about it. Anything I'm going to do to it, has to be usable with shopify's interface and without digging into the code for the theme.

unborn imp
#

Source is https://connect.facebook.net/en_US/fbevents.js, getting loaded by https://cdn.shopify.com/s/trekkie.storefront.32dc1f4fe8f576a6d20c0db4541aff3dd4b06687.min.js

jovial jetty
#

so not much I can do about it I take it?

unborn imp
#

Probably not

jovial jetty
#

if you see any glaring slowdowns, especially for mobile, let me know. I've tried to reduce the size of as many photos as possible that'd be loading on home screen, and done away with an app I noticed was taking up too much.

#

would be greatly appreciated 👍

hollow stone
#

Hey guys what do you think of my tech stack? /s

humble mirage
#

where's ember

hollow stone
#

who

#

Is ember that popular?

#

I haven't heard of it as much

humble mirage
#

Discourse used it back in 2013

#

but i mean Angular has been proclaimed dead for a while and still exists

unborn imp
#

I've been helping maintain an Angular app for years. It's absolutely fine. Pretty boring, which is increasingly a desirable quality in frontend frameworks.

bitter edge
bitter edge
bitter edge
#

well did you fail

echo fog
#

not yet

#

but the gui is almost done

#

i stayed up all night 2 nights in a row

#

and the rest of my group is helping where they can but only around 3 of 25 people know what they're doing

bitter edge
#

i can create gui in seconds
mainly because I use html instead of real code linuth

echo fog
#

i can also create a gui in seconds but it might just be an empty window

bitter edge
#

is that really a gui tho

echo fog
#

add a button that crashes the program

bitter edge
#

now that's a gui

echo fog
#

that also only takes a few seconds

#

it's still kind of shit though

bitter edge
#

all i need to do is type ! and visual studio will write the html file and then I just write <button>Hello World</button>

echo fog
#

every time i see a self checkout station in a store im going to get ptsd but i don't like them anyway because the scan noise hurts my ears

bitter edge
#

you're scared of that?

echo fog
#

not scared

#

it hurts my ears

#

i have really bad noise sensitivity

bitter edge
#

how many times do you have to hear that little noise for it to hurt your ears

#

then shouldn't fire alarms or someone screaming be worse

echo fog
#

once, depending on how loud it is

#

if there's a fire alarm i will have a meltdown on the spot

bitter edge
#

what did you do in elementery through high school when they had drills

echo fog
#

i covered my ears, but i was able to not scream. Those weren't super loud though compared to the residence hall ones. I should have specified

#

as a small child i would scream at the vaccum cleaner and stuff but now i don't unless im really caught off guard

bitter edge
#

just cover your ears in the market

echo fog
#

yeah that's what i do

#

or wear noise cancelling headphones

bitter edge
#

isn't the silence to loud

echo fog
#

no

bitter edge
#

i don't know bout you but when I use my noice cancelling earbuds after a few hours I get that weird feeling in my ears when I take them off

echo fog
#

if im going somewhere crowded noise cancelling headphones aren't strong enough so i use industrial strength hearing protection but even that doesn't get rid of that wanting to scream feeling if people blast music

#

also, some noise cancelling devices are different than others

#

usually when headphones hurt my ears it's because of the way they're sitting on my ears

bitter edge
echo fog
#

i think it's my glasses

bitter edge
#

thick glasses

echo fog
#

people tell me my ears are small which is a weird thing to say to people but ok

bitter edge
#

get contacts smart

echo fog
#

maybe

#

idm wearing glasses because the headphone feeling is only after several hours

bitter edge
#

you got one trait enhanced while the other one got decreased

echo fog
echo fog
#

update the project is done but my group had to finish it off because i burnt the fuck out a few hours before the deadline due to stress + spending all my waking hours on it for like 2 days and not sleeping much

#

i actually don't mind it because now i know how to use swing and javafx

#

programming is fun ngl that's why i was able to focus on it so well

#

although 25 person groups are hell

#

especially because it's a second year course and not everyone really understood how the provided code worked

#

im glad that at least a few other people knew how to do the not code part. It was just drawing big diagram but still

spice locust
#

any recommendations for a good lib for building a python TUI?

silk eagle
rigid wigeon
#

Hey i am going to start college this year, i have good interest in Development and also know Python a little bit, which language should I learn in my college time which will give me good knowledge and of course a high package, like is was thinking of buying a Mac and learning Swift but the 16gb ram Mac Air goes out of budget for me

rose solstice
#

but I would personally recommend Go. it's a very easy to learn language and I think it's a good stepping stone onto other statically compiled, strongly typed languages, without dropping you in the deep end. + a great ecosystem

rigid wigeon
#

Ok brother will see how it goes for me

#

Thanks for help

sleek blade
#

a Mac mini is a cheaper alternative

rigid wigeon
#

Brthr i am going to college in India so there in any hostel u ain't get space and ports to be using Mac mini

mint coral
#

hi, i know this is probably an off topic question but i havent found a better chat to ask this in. im in need of little help in coding in matlab, trying to solve a problem using the equation solver and getting an issue with symbolic non linear equation. in any case that any of you have some knowledge and willing to help a little in this matter, ill be very grateful. also if its not the right channel to ask this in, please @ me and ill move it to the correct place

wind horizon
# rigid wigeon Hey i am going to start college this year, i have good interest in Development a...

It’s always the sucky answer of “it depends” lol

What do you enjoy doing, that can help you get to at least a ballpark of what lang is popular in that field. With that said I’d suggest try to get 1 lang to a decent level before hopping all over, once you get over the core concepts most of them transfer to other languages just new syntax which you can often google / read docs to learn.

umbral plinth
#

Got my radio and walkie talkie I made into unity

#

I’m currently in a stage of testing if models and their materials import correctly (which they thankfully do). When I can get scripts and other gameplay mechanics working correctly I will start the making levels, voice acting and lots of other things

vestal spire
#

do we know when google cloud's C3 compute engine public preview period will end? I don't want to wake up with unaffordable cost

topaz flare
vestal spire
limber bluff
#

I could use some help from people who know python.

twilit beacon
hollow basalt
#

i know monty python

paper kraken
#

[Position]: Machine Learning Engineer
[Experience]: 9 Years
[Previous Projects]: Trading algorithm, Forecasting, Image generation, Computer vision(Captcha recognition), Natural language processing
[Programming Languages]: Python, C/C++, JavaScript, Go
[Availability] 30 ~ 40 hrs / week

oblique remnant
#

at a glance, im going to guess that the context you create in the test isnt the context that is used by the <service> to save the <user>

dawn flicker
#

You don't have to mock everything. If you're just testing if a user is created and saved then the mockContext.Setup(m => m.Users).Returns(System.Linq.Enumerable.Empty<User>()) should suffice. This should work, since a Mocked object doesn't really do anything

#

||i may have written a few parts wrong since coding on mobile sucks, so please check if it's all written correctly||

dawn flicker
#

What do you mean by it cannot parse the object?

plain basin
#

What if i want to include \n inside a string? and i dont want to create a new line

real leaf
#

oo hey it ate my backslash

#
\\n
desert iron
#

It's always with an extra \ in front of those extra signs to have them included in a string.

silk eagle
#

in Python, you can also put an r at the start of the string, same as you would for f-strings/u-strings, and it'll do a raw mode. Basically it literally just puts a \ before escape sequences and doesn't interpret them.

narrow void
viscid pendant
#

Does anyone have experience using Appium for mobile test automation? I can't figure out why my Accessibility ID's randomly disappear from Appium Inspector and can not be used when automating

viscid pendant
#

I also can't figure out why it keeps cutting off my output in Appium 2 CLI

Element subtree:
 →Window (Main), 0x12af94120, {{0.0, 0.0}, {414.0, 896.0}}
    Other, 0x12af94230, {{0.0, 0.0}, {414.0, 896.0}}
      Other, 0x12af945e0, {{0.0, 0.0}, {414.0, 896.0}}
        Other, 0x12af94340, {{0.0, 0.0}, {414.0, 896.0}}
          NavigationBar, 0x12af94450, {{0.0, 48.0}, {414.0, 44.0}}, identifier: 'Feedback'
            Button, 0x12af946f0, {{0.0, 48.0}, {44.0, 44.0}}, label: 'Back'
            StaticText, 0x12af94800, {{168.0, 60.0}, {78.0, 20.5}}, label: 'Feedback'
          Other, 0x12af94910, {{0.0, 0.0}, {414.0, 896.0}}
            Other, 0x12af94a20, {{0.0, 0.0}, {414.0, 896.0}}
              Other, 0x12af94b30, {{0.0, 92.0}, {414.0, 804.0}}
                Other, 0x12af94c40, {{0.0, 92.0}, {414.0, 804.0}}
                  Other, 0x12af94d50, {{0.0, 92.0}, {414.0, 770.0}}
                    Other, 0x12af94e60, {{0.0, 92.0}, {414.0, 770.0}}
                      Other, 0x12af94f70, {{4...```
hushed knot
#

Hello there 😉

Haven't touched php in eons, but I assume somewhere there is a tool to do this without me writing the whole thing : I would like to generate "badges" for my association members : you can submit text and a (transparent background) picture and the tool will combine all that in the appropriate places I defined.

Does that ring a bell to any of you guys ?

There are a few hundreds of them, I would rather not have someone forced to photoshop all them in 😛

tranquil shuttle
#

Ok

#

Day 69693374627 of waiting for microsoft to redesign WordPad, charmap, and regedit in Windows 11

desert iron
#

I finally managed to be able to the Vulkan API with VS Code. Only took over an hour to figure this out and a few breakdowns

hollow basalt
#

nice

drowsy elbow
#

Anyone experience with Piral and Blazor?

inland bramble
#

Forgot to disable mention sorry >_<

desert iron
#

Don't need to be sorry pat pat
And yeah, it is totally worth it since before that I depended so much on Visual Studio and I wanted to change that.
And the knowledge I got from that actually helps with basically everything else I wanna work with in C++, mostly. Like I could also make it work with Qt and/or Boost.

#

And the principle behind that can also be used in any other language, well almost.

static marten
#

So, I am trying to make a sort of alarm clock in python, however I'm running into a snag where the code does not seem to enter the final while loop at all

hollow basalt
#

@static marten Deutschland, Holland?

the clock.mainloop() blocks everthing.
Because the window would respond to the GUI actions
no more code would execute after that.

Did you verify if the "Script started" is printed after the GUI

spring cradle
#

if i am attempting to make a sound chips style module in go, with adsr stuff, would oto v2 or faiface/beep by recommended

#

faiface/beep is more popular, and seems more friendly, but it's based on oto v1, which isn't supported any longer

#

though the ebitengine from the same guy as oto uses oto, which is more popular than beep?

#

i guess it boils down to which design pattern i like?

silk eagle
#

sometimes I mess up with the args field, if it messes up because of that just put a comma inside the args parenthesis its weird.

static marten
static marten
nocturne galleon
#

Welcome to Omelette labs. Today, we will find out if we can run ray tracing on a MacBook.

nocturne galleon
#

Should be considering I'll be doing a 'from scratch' one.

#

Will start studying it next week.

fresh rampart
#

oh and because it would probably help
the image files for backgroun and the bugged banner

#

NVM
I fixed it!
YAY

ruby spindle
#

OK so I have an idea - I find myself carrying around lots of USBs for various things and its kind of annoying. I recently found out the raspberry pi zero can emulate a mass storage device and people have been using it to run network drives into the usb port of their TV etc. I am thinking of using it in combination with this screen to navigate/create and select which usb drive you want to emulate. Thoughts?

#

with the ups-lite board on the bottom and a 3d printed case it should be a similar size to the flipper zero.

#

i'm certain someone else would have done this already. if anyone knows please send 😛

glacial tartan
#

require('crypto').randomBytes(64).toString('hex')

#

is this a valid way to generate a secret

glacial tartan
#

you'd just need a big SD card

#

like 256 / 512GB SD card

ruby spindle
#

yeah it only needs to be small for my needs, I service printers and they only require like a 512mb usb to update firmware, pull data etc

#

but there are like 300 different models lol

glacial tartan
#

lmfao

#

tbf with the price of SD cards and the fact that you're limited to USB 2.0 speeds with the pi zero

#

you could get away with getting a cheap 512 GB then you have headroom to play with

ruby spindle
#

usb 2.0 is foine for my needs, although if it is quick enough to boot hirens or windows installation media it wont stop me from using it haha

glacial tartan
#

you just have to bare in mind that if you're gunna use something like circuit python or something it does have a few annoying things like you have to enable / disable read only file system if you want to write anything to it

#

i had that issue when i made the code for my Pico W USB rubber ducky

#

with wifi so you can control the ducky from your phone

#

it creates its own wifi network you can connect to and control it from your phone

ruby spindle
#

well, from my limited research it seems it just reads/writes to an image or bin file so pretty easy to use

glacial tartan
#

i just need to be able to get a Pico W that has a USB A Male instead of a USB micro B female

glacial tartan
ruby spindle
#

i generally use java for my projects, just my preference as its all im used to

glacial tartan
#

idk you might have to make your own storage driver

#

depending on if you can find one or not

#

i mean i made an aincent printer, wifi compatible

#

with a pico w

#

i wish i had like infinite pico Ws

#

they're so useful

ruby spindle
#

honestly i'd just keep it simple and just have java run the commands to mount / create / delete the image files

ruby spindle
#

Can the pico emulate a mass storage device too you think?

#

would make it a hell of a lot smaller and use less power

glacial tartan
#

honestly, with circuit python you can do mf anything

#

there are sooooooooo many libraries for emulation

#

you can make the pico act like a fuggin printer

ruby spindle
#

interesting... I bet it would be pretty slow but for mass storage

glacial tartan
#

or tell the pc its a printer, it does everything

ruby spindle
#

yeah that would be weird haha

glacial tartan
#

then again you get like 2 MB of space to write your code

#

after you install an "OS"

#

and it doesn't have an SD card slot so you'd have to solder your own onto it

glacial tartan
#

anyone here any good with expressJS

#
Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent (/home/ubuntu/etc/node_modules/send/index.js:386:13)
    at SendStream.send (/home/ubuntu/etc/node_modules/send/index.js:613:10)
    at onstat (/home/ubuntu/etc/node_modules/send/index.js:725:10)
    at FSReqWrap.oncomplete (fs.js:154:5)

I know what it means but i dont know where the extra header is, is there an easy way to find it

#

nevermind i found it

eternal scarab
#

for an example
if (true) {
res.send(something)
}
res.send(something2)

glacial tartan
#

i have a question though,

require('crypto').randomBytes(64).toString('hex')```
is this a valid way to generate a secret
eternal scarab
#

secret normally aa unique string, so yeah u can use this to create a secret

glacial tartan
eternal scarab
#

what is the scenario tho ?

glacial tartan
#

website encryption

#

not for hashing to the database, just cookie and session tokens

#

stuff like that

eternal scarab
#

ah okay so random string, sure this is fine

glacial tartan
carmine lantern
#

Hello, me and a classmate are in a beginner Java programming class and need help with a program. The instructions say that the code should run properly like this:
Enter area code to add to numbers >> 835
(835) 435-9845
(835) 239-9845
(835) 981-9283
(835) 384-5656
(835) 875-3784
(835) 874-8120
However, when I type the first prompt in, I get no return. The .java file for the program, DebugEleven2.java, is structured like this:

import java.io.*;
import java.nio.channels.FileChannel;
import java.nio.ByteBuffer;
import static java.nio.file.StandardOpenOption.*;
import java.util.*;
public class DebugEleven2
{
   public static void main(String[] args)
   {
      Scanner kb = new Scanner(System.in);
      Path fileIn =
         Paths.get("/home/nt-user/workspace/DebugData3.txt");
      Path fileOut =
         Paths.get("/home/nt-user/workspace/DebugData3New.txt");
      String areaCode;
      String formattedCode;
      String phone;
      InputStream input = null;
      OutputStream output = null;
      System.out.print("Enter area code to add to numbers >> ");
      areaCode = kb.nextLine();
      formattedCode = ("+ areacode +");
      try
      {
         input = Files.newInputStream(fileIn);
         BufferedReader reader = new BufferedReader
            (new InputStreamReader(input));
         output = Files.newOutputStream(fileOut);
         phone = reader.readLine();
         while(phone != null)
         {
            phone = areaCode + formattedCode +
               System.getProperty("line.separator");
            byte[] phoneBytes = phone.getBytes();
            output.write(phoneBytes);
            phone = reader.readLine();
         }
         input.close();
         output.close();
       }
       catch (IOException e)
       {
          System.out.println(e);
       }
   }
}```
young elbow
#

booting up intellij, what version of jdk are you guys using?

spring cradle
#

what is the recommended way to generate audio/music? i have a function that generates waves, but im not sure if i should create many instances of that generator for each note/wave type, many instances of buffers holding each possible note/mutation, copy them to the buffer as needed, or what. or is this premature optimization

carmine lantern
young elbow
carmine lantern
#

yeah

#

not sure why

young elbow
#

because, on my side, it does write something

carmine lantern
#

no it does not

#

we already have files with the numbers implemented in the assignment

young elbow
#

hmmm is it located at "/home/nt-user/workspace"?

carmine lantern
#

I figured it out

young elbow
#

what was it?

carmine lantern
#

formattedCode = (areaCode);

#

It needed to be formattedCode = ("(" + areaCode + ") " );

#

so the parentheses of the area code would be implemented correctly

#

the grade checker was reading the .txt file not the .java file, because it outputted to the second .txt file

young elbow
#

i see! 😛

carmine lantern
#

yeah it was kinda funny

young elbow
#

hmmm yehh kinda weird it acted differently on my side x3 might be windows

carmine lantern
#

anyone know how to divide the file size of two files in Java?

lavish minnow
bitter edge
#

i spent my free time doing this

#

every gen 1 pkmn in a single image not to mention that those are gameboy printer images that I had to painfully wait for when using a emulator

bitter edge
inland bramble
#

Thanks sharing, I miss those old sprites

nocturne galleon
narrow void
bitter edge
nocturne galleon
nocturne galleon
#

Probably under a minute for 1920x1080

#

Still better than Colab. It's running on numpy though so I'll be converting the code to jax so I can use GPU

stoic imp
#

Damn

nocturne galleon
#

This is not live raytracing though, just a render.

#

I need to rework the shadows

stoic imp
#

Oh ok

distant fern
#

how do i make an exo suit

fierce tinsel
bitter edge
fierce tinsel
#

Yeah I’m gonna need some context for that

twilit beacon
violet bridge
#

I wish I could back in time and slap the guy who wrote VBA

#

I told company I can do the shit they want in C++ / C#

But no... my superiors said it has to be done in VBA...

sly marten
#

who can sensibly use VBA these days? unless it's an existing and very old codebase eek

violet bridge
#

"So everybody can run it without needing to install another software"...

violet bridge
#

I know it is idiotic, tried told them it is idiotic, well I was overruled

sly marten
#

tell them to do their job and you will do yours lol

violet bridge
#

We are company of Perkele

sly marten
#

would probably personally hand in my resignation at that point ngl

violet bridge
#

nothing makes sense, everything is on fire, everybody is struggling to survive, we are borderline black company

sly marten
#

we have some VB.NET stuff at work, and the only reason is because C# wasn't really a thing back when the codebase was built 😛

violet bridge
#

It all started when I just wanted to update single spreadsheet that we were using to a bit modern..

sly marten
#

thankfully I don't have to touch the codebase though 😄

violet bridge
#

somehow now it is starting to soon to be full fledged ERP if they keep adding features to spec sheet

sly marten
#

don't put your blame on the person making VBA though, they did nothing wrong - your company's managers is the problem here

#

ERP in VBA? eek

violet bridge
#

yeah... i don't know how things got this bad

sly marten
#

tell them to find someone else to do the project lol, and have them assign you to something else, because what they are asking you to do is not a task for you

violet bridge
#

This single excel file... will make you a report, labels and signs work project, print out instructions for laborers, protect you from doing stupid imcompatible shit

#

All I wanted to update the report part... and somehow all of those other features were added to it

#

now I am coding those... and constantly struggling with VBA's unique approach to object oriented coding

#

just needed to rant... world is... weird... inefficient...

sly marten
#

oh is VBA actually still maintained? actually think I confuse it with VBS (which I used for pranks like 20 years ago)

violet bridge
#

no... VBA is still the same

#

it is a cyber security hole

#

and I can see why... you can pretty much invoke anything from this with unlimited rights 😄

sly marten
#

wtf, so the reason they tell you to use it is probably because it's built into Excel is my guess?

violet bridge
#

yup

#

(truth to be told, we have like 0 actual programmers in house)

sly marten
#

isn't it cheaper and better to just get an actual ERP system? eek

sly marten
violet bridge
#

I am afraid to tell you..

spring cradle
sly marten
#

have them look at Zoho? 😛

violet bridge
#

We have a good ERP, but our dudes in the board and who maintain it... dont know how to use it properly

sly marten
#

sounds like integration hell to integrate anything with Excel anyway, so doubt that's the case

violet bridge
#

so.... everybody uses... excel... because the ERP we use is configured so badly that it hinders everyday work 😄

sly marten
#

lmao, nice nodders

spring cradle
#

the e in ERP stands for Excel, clearly

violet bridge
#

Excel Role Play

sly marten
#

Excel Roleplay Program

#

nice, we thought about the same thing, I was about to type the exact same thing, but decided Roleplay is one word 😛

violet bridge
#

Also... definitely won't trigger AV: Creating a project folder with folder structures inside

#

from excel

#

wait until I get my hands on API of our ERP

#

I will pull project files out of there automatically... then that old good ERP will turn just into a cloud drive 😄

cyan niche
#

you have to leave the company

#

it's the only way

bitter edge
#

github is broken

#

how am I supposed to upload my useless ideas now

cyan niche
#

print your code out and fax it over

bitter edge
cyan niche
#

close one

bitter edge
#

imma go back to sitting for hours

chilly raptor
#

First time I've seen FizzBuzz in the wild, here in a basic coding class in university.

#
#include <stdio.h>

int main(){
    int limit;
    
    printf("Enter a whole number:");
    scanf(" %d", &limit);
    
    for(int i=1; i<=limit; i++){
        printf("\n");
        if(i%3==0){
            printf("Fizz");
        }
        if(i%5==0){
            printf("Buzz");
        }
        if(i%3!=0&&i%5!=0){
            printf("%d", i);
        }
    }
}
#

My solution in C

cyan niche
#

Nice work.

chilly raptor
#

I am not a fan of C, but it is a course requirement for now.

ruby spindle
#

using 256gb sd card I can store quite a few images

glacial tartan
ruby spindle
#

dont think that would work

glacial tartan
ruby spindle
#

on a pi zero?

glacial tartan
#

So it can run pretty much anything if you're patient enough

fresh marsh
#

hey you guys know to code

#

?

cyan niche
#

Not really, no

#

I just let my cat play on my keyboard and complain to ChatGPT until it compiles.

narrow void
fresh marsh
#

Sorry guys

#

I need some help with a file. I was trying to code in for a small application. Was using PyCharm for that. Now it was on my dad's laptop. Now to host in the bot, i didn't get the .configure file with me. Can I just type it out on a notepad or maybe I need to do it on the app again, it's a fairly simple bot. Ik that it's a dumb question but am really really new to this.

#

Also where do you guys think should i host my bot, I mean for free maybe? I was considering a few options but maybe you guys can help? please?

cyan niche
cyan niche
fresh marsh
#

The host i was using, named discloud requires a .configure file

cyan niche
#

I'm not familiar with that service, but you'll have to create a new .configure file

fresh marsh
#

hmm i see

#

hey if i send you the .py file in dms, will you check it out once?

cyan niche
#

I recommend having ChatGPT look it over.

sly marten
narrow void
#

Anyone use lisp? Is it worth learning? I can't think of what I'd use it for but I know people who use it advocate strongly for it

cyan niche
#

No it's terrible avoid at all costs

hollow basalt
#

If you learn lisp, you can tell other people you know lisp

eternal scarab
#

Any Kubernetes experts ? what is a best way to accumulate the logs from all pods in one place. Technically keeping them permanent

carmine lantern
#

I'm doing a debugging exercise for a class in which a user enters a number, the result is supposed to be the sum of all numbers between that number and the number 5 greater
The result is supposed to be this:

The sum of all the numbers between 
     5 and 10 is 45
``` Unfortunately, my code has an error, so the code shows like this:
``` Enter a number >> 5
The sum of all the numbers between 
     5 and 10 is 5
``` I'm unsure of what the issue is.
Here's my code:
```import java.util.Scanner;
public class DebugTwelve2
{
   public static void main(String[] args)
   {
      Scanner input = new Scanner(System.in);
      int x;
      int y;
      final int GAP = 5;
      int answer;
      String userInput;
      System.out.print("Enter a number >> ");
      userInput = input.nextLine();
      x = Integer.parseInt(userInput);
      y = x + GAP;
      answer = sum(x, y);
      System.out.println("The sum of all the numbers between ");
      System.out.println("     " + x + " and " + y + " is " + answer);
   }
   public static int sum(int x, int y)
   {
      if(y < x) 
         return(sum(x, y - 1));
      else
         return (x);
   }
}
``` Note this is for a class. I just need some assistance.
#

It's recursion.

hollow basalt
#

@carmine lantern double check your sum function logic

carmine lantern
#

I did it

#

it works now, but like how does it function

#

because I know now that on line 26 it should say return(y + sum(x, y - 1) why does it work like that?

hollow basalt
carmine lantern
#

Oh yeah

#

I'm learning about sequences in calc II as well

hollow basalt
#

yeeeesss

carmine lantern
#

sigma (10) over (n=5) n + (n-1) + (n-2) + (n-3) + (n-4) + (n-5)

#

it's a series not a sequence since you're adding the numbers up

desert iron
chilly raptor
#

I don't know C, like at all, but I'm not sure it'd work in C. No doubt it would work in other languages.

cyan niche
#

i % 3 == 0 is preferable because it's more readable

desert iron
#

It's astonishing, how much speed you can get by breaking some rules of clean code.

cyan niche
#

Something like that should be optimized by the compiler imo

desert iron
#

Compilers aren't build to handle all rules of clean code

silk eagle
#

luckily I use python, so "fast" only works in big O's

desert iron
#

Python is actually one of the slowest languages.
So when speed is crucial or at least important, I wouldn't recommend it

vapid sentinel
#

python itself isnt slow its the default VM. pypy is a good example of that.
a lot of libs for python are also actually written in c. numpy being a good example of that.
or just be a mad lad and write a LLVM frontend for python
https://exaloop.io/benchmarks

desert iron
# humble mirage lol

Yeah, I was also surprised to see that. Especially the difference in speed when ignoring rules of Clean Code.
When you ignore the first 3 rules, your program is 20-25x faster.

desert iron
humble mirage
#

unreflectedly going from "abstractions are a tradeoff" (which is what the article actually hopefully seems to say) to "need to save every keystroke and use every clever trick bool-less languages have" is not the way though

peak acorn
#

Readability >

vapid sentinel
vapid sentinel
# peak acorn Readability >

this, generally you are going to get bigger gains by just not doing what you're doing rn and making your code readable helps with changing it

golden brook
#

There's a really nice talk by Matt Godbolt about what compilers do for you, if you're in something like C or basically anything that can be compiled by LLVM a lot of these "little tricks" usually don't matter

vapid sentinel
#

unless you know what the fuck you're doing, generally the compiler is smarter then you.

golden brook
#

Python just likes to throw exceptions and call it a for loop (this is not a joke)

silk eagle
# golden brook Python just likes to throw exceptions and call it a for loop (this is not a joke...

I think this is that:

static PyObject *
builtin_all(PyObject *module, PyObject *iterable)
/*[clinic end generated code: output=ca2a7127276f79b3 input=1a7c5d1bc3438a21]*/
{
    PyObject *it, *item;
    PyObject *(*iternext)(PyObject *);
    int cmp;

    it = PyObject_GetIter(iterable);
    if (it == NULL)
        return NULL;
    iternext = *Py_TYPE(it)->tp_iternext;

    for (;;) {
        item = iternext(it);
        if (item == NULL)
            break;
        cmp = PyObject_IsTrue(item);
        Py_DECREF(item);
        if (cmp < 0) {
            Py_DECREF(it);
            return NULL;
        }
        if (cmp == 0) {
            Py_DECREF(it);
            Py_RETURN_FALSE;
        }
    }
    Py_DECREF(it);
    if (PyErr_Occurred()) {
        if (PyErr_ExceptionMatches(PyExc_StopIteration))
            PyErr_Clear();
        else
            return NULL;
    }
    Py_RETURN_TRUE;
}
raven pulsar
#

Python is still slower then languageslike c# and c++ because it’s a interpreted language. In most cases you won’t see the difference in a python application unless it’s just spaghetti code but it is technically slower

silk eagle
#

the way I sees it is, if you're doing a lot of iterations/loops, Python's speed will be actually noticeable. for mostly anything else 'see this -> do that' Python is a-okay. most of the time you're doing things in Python that you otherwise wouldn't be able to do without massive development time invested into a project, so doing it at all is faster than not.

raven pulsar
#

True, plus python is a good language to learn. Not something I’d use on a major scale project but still a good language to learn

vapid sentinel
vapid sentinel
silk eagle
# vapid sentinel define interpreted. Its compiled just like java and c#.

I think the misunderstanding is in that people think compiled languages = only to machine code. It varies depending on what exactly you're using (and admittedly I'm out of my comfort zone here) like cpython/jpython/ironpython/the other ones staredge but at least for CPython, code is converted to bytecode and then directed to P(ython)VM (/JVM/etc for others)

vapid sentinel
#

conda straight up compiles python to native instructions using LLVM

golden brook
inner wraith
#

Python (cpython in particular) does have a reputation for being rather slow though this is improving with time - speed wasn't really a priority until somewhat recently.

inner wraith
#

Well C# and Java will take your bytecode and compile it to native code for better performance buuuut just ignore that if you like putting things in boxes with readable labels

desert iron
#

The example was with a shape class and soke derived shapes like circles, squares, etc.
Plus a method which calculated the total area of each shape.

#

And the 20-25x improvement was with lightly optimized code for AVX.
Oh and btw: The code is still readable. It just doesn't use polymorphism but uses switch-cases, a function does know about the internals of an object, a function isn't small and does more than one thing.

desert iron
#

Even without AVX optimization you get 10-15x more speed.

raven pulsar
# vapid sentinel define interpreted. Its compiled just like java and c#.

It’s ran by an interpreter a system boot whereas c# is a compiled language and is translated directly into machine code. Technically speaking python is compiled but it’s compiled into byte code which is then ran by an interpreter. But the byte code can’t be directly executed by the cpu so it has to be interpreted by tools like pypy, and cython

#

Thats the only reason technically you can even say it’s slower. Cause it has no direct path to the system resources without first being interpreted

inner wraith
# raven pulsar It’s ran by an interpreter a system boot whereas c# is a compiled language and i...

What if I told you C# isn't translated directly into machine language? https://en.wikipedia.org/wiki/Common_Intermediate_Language

Common Intermediate Language (CIL), formerly called Microsoft Intermediate Language (MSIL) or Intermediate Language (IL), is the intermediate language binary instruction set defined within the Common Language Infrastructure (CLI) specification. CIL instructions are executed by a CLI-compatible runtime environment such as the Common Language Runt...

#

It's translated to bytecode, which you ship.

raven pulsar
#

That’s Wikipedia dude…

vapid sentinel
#

It’s quite useful information

raven pulsar
#

It’s still wrong lol

spring cradle
#

from wikipedia

vapid sentinel
spring cradle
#

"This article needs additional citations for verification" even wikipedia says its lmao

vapid sentinel
#

Nor is using intrinsics a “dirty code” thing and is required to get the maximum amount of performance out of modern CPUs

raven pulsar
#

find me a c# interpreter then

inner wraith
vapid sentinel
#

Why the fuck do you think we need to download .net to run shitty C# apps on Linux

raven pulsar
#

In windows .net framework applications compiled intto MSIL files

inner wraith
#

MSIL is the old name for CIL

vapid sentinel
#

What something compiles to means fucking nothing as I can compile python to a EXE buts it’s still ran on a embedded interpreter

desert iron
vapid sentinel
#

Polymorphism > switch statements is some bullshit made up by oop languages. Small functions when done right won’t have a performance impact unless it’s a extreme case and it should be optimized later.

#

im personally willing to argue that short functions are dumb and instead you should avoid nesting

desert iron
#

The "functions should be small" thing was also something that is weirdly handled.
I was adviced here at work to put basically every step into a seperate function which is then called. Even though it's just one step called once. And then having to nest the functions because of it but with logical names. That's what they mean with "functions should be small" and "functions should do only one thing", literally. So if you need certain steps for something, every step should be its own function which is called.

vapid sentinel
#

Making every step a function is just dumb and even if it’s a “rule of clean code” it isn’t done in practice.

desert iron
#

Well, at least in my company it is, or my department to be fair.
Was forced to do it.

sly marten
sly marten
# vapid sentinel Polymorphism > switch statements is some bullshit made up by oop languages. Smal...

the size of a function is less important than the content of it - at the end of the day, if you have 3000 lines in one function or split it up in 300, you're still executing the same 3000 lines of code

as for readability, shorter != better/easier to read either, people shouldn't follow rules blindly, use common sense and keep standards/conventions/rules in mind and follow them if it makes sense to do so

cyan niche
#

I missed it

real locust
#

pov: google suddenly decides that your chrome extension is worth promoting, after a year

cyan niche
#

Congrats on your new found fortune

real locust
#

thanks!

#

for context, here is my worse chrome extension with 1/9 of the monthly users 😭

stone rapids
#

question: Would it be stupid to attempt to update an existing react native app that targets sdk 23 and uses gradle 2.x to be compatible with android 13 as my first android dev project?

desert iron
#

Why should it?

stone rapids
#

why should it be first project? or why should it be updated?

inner wraith
#

Check it out, run the upgrades, wait an eternity for it to do its shit and then build it and see what it yells at you for?

#

If you aren't using anything special from native it's probably not going to be complicated to do so.

stone rapids
#

Is it worth it to fight to get it to run in android studio as is and update incrementally, or just better to just try and update everything and work off of error messages? Main issue I've been having is the current packages being so old that they're not supported anymore

inner wraith
#

Depends on how big your project is I guess. But the SDK version and gradle version are aside from outdated dependencies.

#

Your project is in React Native. Unsupported packages are a fact of life :P

stone rapids
#

Ok, thank you

inner wraith
#

-You will want to update to not use those packages though.

stone rapids
#

Luckily it's a fairly simple app, just controlling LED lighting via bluetooth. But a lot of the packages are versions from 2015, so def working on getting everything updated

#

It was initially framed to me as 'the app works, android 13 just has an issue with bluetooth because they changed the calls' and then I start looking into the project and it's back on react v54.2

urban aurora
#

Question, does anyone here know how to write arduino code and could help me?

golden brook
livid bison
urban aurora
#

Yeah sorry, I'll know next time. And I managed to figure the problem out with another person

ornate summit
#

What's a good way for me to use my desktop to program junk from my laptop? Both are Arch.

ornate summit
livid bison
#

Essentially turns VSCode into a GUI wrapper for your SSH connection

ornate summit
#

I'd have to learn a new IDE and that sounds like I wouldn't be able to interact with my program correctly.

livid bison
#

You get a full-fledged terminal in the IDE, so if you can interact with the program via CLI, it would work fine

ornate summit
#

I need 3D X windows.

livid bison
#

I wouldn't be surprised if other IDE's have an equivalent, would be worth looking into

#

Ah ok

#

Perhaps an SSH IDE for the code + Parsec linux for the visuals

ornate summit
#

Someone suggested forwarding X, I wonder how bad that will be.

#

Well that's a fail.

#

Keyboard input isn't working.

It's all in the terminal....

inner wraith
ornate summit
#

Huh, -Y not -X but it's more of a security risk.

ornate summit
ornate summit
#

Pathfinding works (for now).

hollow basalt
#

No it’s not here

silk eagle
#

I too am experienced and skilled in literally everything on the planet pepeHands

spring cradle
#

i have projects,but they're all mine and you can't have any

inner wraith
#

Specialized Full Stack Developer is here!!

👊 Results as late and poor as you make them by changing your expectations within the deadline
👊 Web dev is gross but I'll do it if you force me to
👊 Normal eyes and many ideas you will ignore in favor of hammering in screws

✅ Skill set

🔹 You don't care and I'll learn whatever it is your stack is within a few weeks anyways

If you have any projects, please assign me all the IP so I can make money off your hard work

#

Thank you

hollow basalt
#

Id hire this guy more

cyan niche
silk eagle
#

(You have 30 minutes to show us, and it has to be in a Google doc. Please give explanations of your work along the way & feel free to ask questions which I will reply "Huh, interesting, I don't know." to.)

inner wraith
#

Stop being real, go away

#

No I don't have much good code in public repos because I write primarily core business logic code for businesses and myself, and crappy little scripts to get things done for myself. If I wanted to provide people lots of free stuff, I'd start a charity.

inner wraith
cyan niche
#

I don't think I could answer those code interview questions anymore lol

#

Not without looking stuff up.

#

But I enjoy this is the only field where they expect you to work 16 hours a day.

#

"What do you mean you don't code for fun every waking moment???"

#

Also them: "We're looking for professional experience, your hobbyist experience doesn't count."

silk eagle
#

i've been grinding leetcode to try and do well in interviews but man oh man its really humbling how awful I am

golden brook
#

at least too early

silk eagle
#

for now I'm giving myself an hr per easy/medium problem, then I look at videos walking through the solution with their khanacademy chalk board drawings so I can understand where I went wrong

#

eventually I'm wanting to get it down to 30 mins from first seeing the problem to solving it with a decent solution

golden brook
#

good goal and good luck!

cyan niche
#

"Write a sorting algorithm"
Me, an intellectual:

def my_sort(collection):
  return collection.sort();
ornate summit
#

That's not a sorting algorithm...

#

I'm working on a game and I have A* implemented, but next I need to figure out how to make the actors move smoothly across the tiles. Any ideas?

peak acorn
#

You'd have to move off of a grid system or at least increase the grid resolution a lot

ornate summit
#

The grid is integer based, but the actors are floating point.

#

I'm just not super sure on the algorithm I should use.

peak acorn
#

You could still pathfind on the integer, but add extra logic to help getting from grid to grid in float-space

ornate summit
#

That's exactly what I'm looking for with this question.

#

My guess is some sort of movement vector that is normalized then multiplied by the movement speed, but I don't know much besides that. I'll eventually just bang my head against the wall until I figure it out.

#

Right now I'm working on some other game systems.

#

Hrm, this is another weird one: how can I generate grid positions in order of distance from a given point?

#

Pfft, I can just do a BFS.

peak acorn
#

yupp

ornate summit
#

That's not exactly the most memory friendly thing, but it will work for now.

#

I should probably create some data structures for this in my level class because this sort of thing is going to be a fairly common task, but it works for now.

#

Hrm, I'm going to have to think about some subsystems stuff before I break my code more.

peak acorn
#

search algos wont hurt memory too bad on an integer field like that

#

prob miniscule rly

ornate summit
#
public Optional<TilePos> findNearestTile(TilePos start, Predicate<Tile> filter) {
    //TODO Optimize this?

    var visited = new HashSet<TilePos>();
    visited.add(start);

    Queue<TilePos> toVisit = new LinkedList<>(start.neighbors());

    while(!toVisit.isEmpty()) {
        var pos = toVisit.remove();
        var tile = tile(pos);

        if(filter.test(tile)) {
            return Optional.of(pos);
        }

        for (var neighbor : pos.neighbors()) {
            if(!visited.contains(neighbor)) {
                toVisit.add(neighbor);
            }
        }
    }

    return Optional.empty();
}
#

A little bit of object churn, but on larger maps this might get expensive.

cyan niche
silk eagle
#

what time complexity is that

cyan niche
#

Probably O(n!)

silk eagle
#

pepeHmph just get lucky, the code's fast for me.

cyan niche
#

Yeah best case is Ω(1)

silk eagle
#

worst case O(∞)

#

or whatever an infinite would be

cyan niche
#

Statistically it would have to converge.

silk eagle
#

not exactly a priority to find out monkaS

cyan niche
#

But true it's possible that it never sorts

ornate summit
#

Just do a cocktail shaker sort.

#

It has okay performance and it's not too complex.

hollow basalt
#

Bubble sort

cyan niche
vagrant mason
#

thoughts on this syntax for the semantics of something akin to class/mod

page x {}
pg x {} 
cyan niche
#

You shouldn't abbreviate short words

#

It's not like variables have a small character limit

#

There's some exceptions to this, such as interfaces, which should begin with a capital I: IPage

#

If you have something that's like:
ExecuteAndCheckIfInputIsValidForExternalPersonnel
it can be a bit wordy, but this isn't really solved by making shorter:
ExecAndCheckIfInputIsValidForExtPsnl

silk eagle
#

shortening the words also messes with autocompletions, have to remember which words were shortened and how they were shortened when typing the variable

inner wraith
#

I'm OK with very commonly understood abbreviations and will generally strip unnecessary words
...Like "ExecAndCheckInputValidForExternalPersonnel" is fine because "exec" is nearly universally understood by in context by novice programmers and the "is" wasn't doing anything helpful.

#

Though if your names are that long maybe it's time to refactor your code until your function names don't need to be complete sentences to be understood in context.

ornate summit
#

I don't think interfaces should start with I.

inner wraith
ornate summit
#

I used to use code bases like that, the modern ones without the I are generally nicer.

inner wraith
#

Modern? As far as I'm aware prefixing interfaces with I is a common convention to this day and nobody seems to really be pushing for an alternative.

ornate summit
#

Also you don't need to type a lot of this stuff out, Idea lets you do stuff like EACIVFEP for that ExecAndCheck[...] example.

ornate summit
#

Heck, the JDK doesn't even do that.

inner wraith
#

I'm looking at C# documentation by Microsoft written two months ago and it uses it plenty.

#

They're not mandatory, you don't have to use them

ornate summit
#

Oh, I thought this was Java. C# is just Microsoft's jank Java. :V

inner wraith
#

Eh, not really

#

That's how it came into existence but they both have their own benefits and are widely used

ornate summit
#

Eh, I've tried to do C# stuff but it's just not flexible like Java is and the cross platform support isn't as good.

inner wraith
#

You're entitled to your opinion.

#

But "flexibility" can be defined many ways and I'm confident at least one of them would suggest C# is better than Java ¯_(ツ)_/¯

ornate summit
#

It's based on my experiences. With Java you can just do whatever you want with classes as they are loaded and C#'s binary format is far more complex and has much worse documentation.

inner wraith
#

I use Python more and find it more flexible than other languages I use. Is that the language or my familiarity impacting that?

cyan niche
#

It improves readability without any downsides

inner wraith
#

IVehicle, please

#

I cry

cyan niche
#

We see this in action in C#'s own code, IDictionary and Dictionary, or IList and List

ornate summit
#

You can't use an interface in the context of a normal class and IDEs tell you what kind of class classes are.

#

What's the difference between IList and List?

inner wraith
#

List is an implementation

#

Why? Microsoft made it so in the stdlib

ornate summit
#

How's it implemented? In Java List is the interface with ArrayList and LinkedList being the two main implementations. It's really nice because it allows you know the mechanisms behind them and it allows you to pick for better performance.

cyan niche
#

A List is the actual implementation of a list, but by allowing for an IList interface, you allow the programmer to specify their own object which behaves like List but needs something special.

Suppose for instance you had a TrainCarList which contains a list of all train cars with a list, but this is a special list that you need to behave a certain way. So for instance a TrainCar object may support Next and Previous functions like a LinkedList, but you also want to be able to say, "Get me the third car in the list". By implementing the IList interface you can implement the Add/Remove operators to maintain the integrity of your LinkedList type structure for you.

The real advantage of this is that you can still use your TrainCarList in all places where you would use an IList. So you can use LINQ on your TrainCarList, or pass it into middleware functions that need to transform objects into JSON.

ornate summit
#

List should be the interface.

inner wraith
#

It isn't.

cyan niche
#

This is obviously a basic example, interface use becomes much more necessary when you start doing things like dependency injection.

ornate summit
#

I know what interfaces are, I've been programming for over a decade...

This is a discussion about naming conventions.

cyan niche
#

Oh excellent.

#

Well the I prefix makes it easy to tell what is and isn't an interface at a glance.

inner wraith
#

Tbh at least part of the reason why in C# is that if you don't you'll be mix-and-matching two conventions depending on what code you're calling if you don't

cyan niche
#

I realize that is dipping into Hungarian syntax, but it's a compromise I'm willing to make.

ornate summit
#

Your IDE does that and generally types with multiple implementations are going to be interfaces.

cyan niche
#

Well, your IDE may highlight it a different color, but it's more accessible to use a letter.

inner wraith
#

That's great if my IDE was your IDE but I'm not presently paying JetBrains money :P

#

VS is fickle and VS Code doesn't try

ornate summit
#

I'm not paying them either. :V

cyan niche
#

But do as you wish, I mean it's your code.

#

But the accepted practice is to prefix an I

ornate summit
#

Where's the official documentation for the C# PE files? I can never find it but the Java stuff is super accessible.

inner wraith
#

Like Portable Executable?

midnight wind
inner wraith
#

That's not really C# if so, that's Windows specifically

midnight wind
#

true

ornate summit
#

Yeah I'm not seeing anything about CIL.

inner wraith
#

Well you didn't say CIL did you

#

it's an ECMA standard

ornate summit
#

C# compiles to CIL.

#

It's the bytecode of C#...

cyan niche
#

CIL isn't bytecode

inner wraith
#

Actually it is

ornate summit
#

That's part of its Java heritage, a lot of the instructions are very similar too.

cyan niche
#

Nah it looks something like this:

       extends [mscorlib]System.Object
{
  .method private hidebysig static void  Main(string[] args) cil managed
  {
    .entrypoint
    // Code size       13 (0xd)
    .maxstack  8
    IL_0000:  nop
    IL_0001:  ldstr      "Hello World!"
    IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
    IL_000b:  nop
    IL_000c:  ret
  } // end of method HelloWorld::Main

  .method public hidebysig specialname rtspecialname 
          instance void  .ctor() cil managed
  {
    // Code size       8 (0x8)
    .maxstack  8
    IL_0000:  ldarg.0
    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
    IL_0006:  nop
    IL_0007:  ret
  } // end of method HelloWorld::.ctor

} // end of class HelloWorld
ornate summit
#

That's a form of bytecode.

cyan niche
#

Fair enough I was confusing it with machine code

#

u right u right

ornate summit
#

It's just a textual representation, like ASM is a textual representation of machine code.

#

Can you hook into the C# compiler like you can with javac?

cyan niche
#

Yes and there's an open source compiler as well.

ornate summit
#

That's neat, have you seen faucet? Does C# have something similar?

inner wraith
ornate summit
winged sparrow
#

Im a student looking to go light and want to code on my tablet. Or at least try. I want to use vscode on my browser through code-server. Since i dont have resources to host my own server im interested if theres any Linux VM hosting services offer a free teir that would make this possible.

inner wraith
#

If you want a reasonably powerful system to run code for more time than that, either buy a laptop/tablet that can or pay for it really

#

It's surprisingly usable on a t3.micro you can get on AWS's 1 year free tier if your projects can handle having ~700MB RAM max

golden brook
ornate summit
#

The student stuff is so evil but it's too good of a deal to pass up.

mortal geyser
fierce rock
#

has anyone got some experience in flutter? Basically I want to switch from Svelte but I'm not sure how hard it will be given I got a whole custom UI library built

sage vector
fierce rock
# sage vector In relation to web applications? Be aware that Flutter Web is not that great for...

well, I want to create a mobile & desktop app along my web app, so I thought flutter would be the best option. sure, electron exists, but I'm not sure about mobile. while svelte native exists, I'm not a fan of using in-built components as I'd like to have the same UI on all platforms. using a pwa is not really an option, given that it seems to have a different featureset on different browsers.

sage vector
# fierce rock well, I want to create a mobile & desktop app along my web app, so I thought flu...

It does sound like Flutter would be a fitting solution. I just wanted you to be aware of the issues there might come from Flutter web. E.g. since Flutter draws on one big canvas, you can't use it for web sites and expect any kind of SEO. Also, the initial loading of page/web application is going to be slower than e.g. Svalte since Flutter needs to download the libs needed to do the canvas drawing.

#

Also, making use of multiple threads are also not a fun experience with Flutter web. You can make use of web workers but need to do some manually handling here which is not that smooth

#

(Should say that I don't use Flutter but only Dart which I have been using/followed for near 11 years. I am active in some Flutter communities just because my Dart knowledge might be helpful for some issues) 🙂

fierce rock
sage vector
#

The canvas thing is because this is how Flutter basically work on all platforms. On mobile, it handles drawing every pixel so any kind of styling comes from Flutter and the libs. you are using. It does not make use of any components from the OS itself.

fierce rock
#

I'll probably have to give it a try to test things like accessibility, thanks anyways!

sage vector
#

Yeah. I recommend making some demo apps to test if Flutter can actually be used for your purpose

#

I recommend joining the r/FlutterDev Discord server which is a large Flutter community server with a lot of people that actually know about Flutter compared to me 😉

drowsy elbow
#

How...

#

Im gonna take a break lmao

hollow basalt
drowsy elbow
#

Fixed it with this dumb shit lol

silk eagle
#

completely uneducated opinion here, but there's != and then there's !==, im wondering if the != there was checking if leftValue was literally the variable rightValue rather than checking if the values were different

cyan niche
# silk eagle completely uneducated opinion here, but there's `!=` and then there's `!==`, im ...

C# doesn't have a !== operator. Or put more accurately, its != operator is Javascript's !== operator. That's not entirely true because it will throw errors if you have different types being compared but that's the gist of it.

But what's what's happening there, is presumably that GetValue is returning an object an object and it's doing an object comparison, which is what C# does by default.

He'll have to override the Equals method to get it to behave like he wants (or use records in C# 9+) https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/how-to-define-value-equality-for-a-type

slim laurel
#

Anybody here knows how to code in Android Studio? DM me If you do Thx.

winged sparrow
inner wraith
#

Tablets in general suck for IDE work, even with the keyboard covers and whatnot

#

But you can buy ones that can at least run the full IDE and run unsigned code outside of a browser.

silk eagle
#

could get a surface

unborn imp
#

I have a 1st gen Surface Go with a keyboard cover; same form factor as a 10 inch iPad. It's bad as a tablet! It's bad as a laptop! But it's magical to be able to just write code anywhere.

#

I use gVim to write vanilla JS and and Lua; don't want anything too heavy. Little browser games or Pico-8 cartridges. Was poking at Dart a little bit, reimplementing the SyncThing protocol. Just fun side projects.

#

It can do Rust, but the build times aren't great. Have to wait ten seconds or so for builds that would be almost instant on my desktop.

#

(To be clear, the 1st gen Surface was passively cooled and used just about the slowest x86 chip Intel sold at the time. Literally any other Intel tablet would be much faster).

inner wraith
#

If I'm not in a nice quiet space on a desktop I'm not really working

winged sparrow
inner wraith
winged sparrow
unkempt coral
#

I'm working on open-source open-hardware PC Fan controller. Mainly because I need one and the ones available on the market are either too expensive or don't have the features I need.
Question for you guys; Would you prefer to have a SATA power and USB connector on the board OR to have screw terminals so you can cut the cable and wire it individually?
I'm asking mainly because sometimes you don't have a USB connector on the motherboard or it's one of those "weird" headers so you wouldn't be able to use off-the-shelf cable...

cyan niche
rancid nimbus
#

When building multi threaded, how much ram per core is reasonable? I am having issues at about 1.5 G per core.

#

Maybe less than that.

cyan niche
#

I'm not sure what you mean.

#

Memory and CPU cores are two different things.

#

And when you multithread something normally you're taking something in one block of memory and processing multiple sections of it concurrently.

rancid nimbus
#

Ok, for one instance of a gcc compile out need to have a certain amount of memory allocated so it can build. If you have more CPU cores, then you will need more memory to utilize all your cores. I am trying to determine how much ram I want for my machine.

unkempt coral
#

Depends on what you are compiling and on which architecture. But you could safely spawn more threads than you have cores without seeing any major issues.
For example when compiling kernel or a large project, I often "run" 99 threads but since my CPU has 8 cores, there is little difference between 99 and ~20...

inner wraith
#

Please put a diode on it if you do add screw terminals though.

unkempt coral
#

I'm making multiple variations of the board for different use-cases so people have options.
I guess for the PC probably the most useful would be SATA power connector + USB header

#

And essentially it's open-source open-hardware project so after the initial release, hopefully the community provides some feedback and suggestions on how to improve it further 🙂

rancid nimbus
#

The arch is RV64GC and the software is a yocto image.

rancid nimbus
#

I ran into an out of memory issue, so I know I need more memory.

cyan niche
rancid nimbus
#

So, yocto builds a whole Linux distraction. I was running into memory issues building GCC, and rust. Yocto decided to at least not build both of them at the same time, but it attempted to build/package other stuff too at the same time.

unkempt coral
rancid nimbus
#

I am building on a ryzen 6 core 12 thread machine targeting a visionfive2 board. (Yes those are obtainable if you know who and when to buy).

earnest ice
glass iron
#

hey I'm a complete noob at programming but I'm building an app in vs, a math solver and I have coded for the calculations etc but as for the ui how do I link the input textbox and a solve button to the code in another file

cyan niche
slim laurel
#

Anybody could help pls

silk eagle
#

does R exist

glass iron
arctic elk
#

Hey guys i need advice:
I am trying to make a simple project that basically adds authentication and logging system to software defined networking controller layer. Basically protecting controller layer from application layer by adding username/password and logging system using blockchain. Anyone has any advice where i can start with such a project? I am using mininet but i am not very advanced in this..

midnight wind
arctic elk
#

i want to use it as a database

silk eagle
#

its such a specific topic that you'll probably have more luck looking in blockchain-specific development places, but I dunno where to point you to

arctic elk
young elbow
#

We had a research team internally that looked into implementing blockchains into our system (it wasn't auth so it could be different in your case). All the options they showed are terrible for auth... The point of blockchains is to verify as a group (subgroup or full) if the action is right -> meaning everybody would have access to the relevant data to process the action in question (list of all username/password)...
Even if you hash the password before logging in, you are allowing an external person to have the user/pass combo... This is not good. They can just bruteforce them one way or another.
There's as well another issue, blockchain has a performance cost...

Note: Im not a pro in blockchains, Im just relating what a presentation of a 6 month research on this subject taught me with some side knowledge. So there could be a way to do it without putting your data in the hands of an external actor, but, to me, it is alot of work for a database that will be slower than a normal sql database 🤷‍♂️

arctic elk
supple hull
#

Working on an explainer, to show people how to their own API key for chat gpt so as not to have to pay $20 a month, and I've found an opensource client that macOS/Linux/Windows, and found an iOS client called GeePeeTee that lets you do this, but Android the only OS I don't use. Anyone know of any non sketchy app for android that just let you use an API key?

rotund swift
#

Does anyone know where I can find a good Java, SDK for android studios?

young elbow
#

Doesn't android studios let you download it? (Been a while since i dev in android)

cyan niche
rotund swift
#

It won’t let me download one

inner wraith
#

It includes a JRE.

#

I updated to... Flamingo? yesterday and it noted that it was going to use its own JRE it installed in the Google folder under program files

cyan niche
#

Found the performance issue guys

#

comment above the function: "// recursive function"

desert iron
#

Oh no, not again

waxen parrot
ornate summit
#

That's fun, I added a crappy pathfinding cache to my game and the tick time for each tick was nearly cut in half.

My pathfinding code is still garbage, but at least it's a bit faster now.

peak acorn
ornate summit
#

The entire map. :V

sly marten
spice locust
#

so I'm using pycharm... but when I build/run I want it to open a konsole - use my system terminal, rather than the build in junk

#

is that possible?

hollow basalt
#

It is

spice locust
#

I've searched everywhere - can't find it

cyan niche
#

python main.py

cedar comet
#

Is there anyone that is good at HTML or CSS real quick

#

i made this product card

#

but its not moving to the middle of the website by middle i mean where that background image is

#

nvm i done IT LETS GO

unborn stone
unborn stone
unborn stone
#

Sign up for a GCP account, and then boom, use a Linux VM from Compute Engine

cedar comet
#

):

cedar comet
cedar comet
#

Bro it worked nvm this CSS has sent me on a roller-coaster

hollow basalt
#

Ok

cedar comet
#

Guys i need help again

#

on my HTML and CSS code

ebon vector
carmine lantern
#

Hey guys, I'm a college student in a Java programming class and I need help with a problem.
The goal of the problem is to create a JFrame program that has a JButton that is disabled after 8 clicks, and then displays a message below it that says "That's enough!"
I managed to get the button to disable after 8 clicks, but I can't get the message to display.
This is my code here:

import javax.swing.*;
import java.awt.event.*;
public class JFrameDisableButton2 extends JFrame
implements ActionListener
{
final int SIZE = 180;
Container con = getContentPane();
JButton button = new JButton("Press Me");
JLabel label = new JLabel("");
int count = 0;
final int MAX = 8;
public JFrameDisableButton2()
{
super("Frame");
con.setLayout(new FlowLayout());
setSize(SIZE, SIZE);
setVisible(true);
con.add(button);
button.addActionListener(this);
}
@Override
public void actionPerformed(ActionEvent e)
{
    String indicator = "That's enough!";
    count++;
    if(count == MAX) {
        button.setEnabled(false);
        label.setText(indicator);
    }
}
public static void main(String[] args)
{
JFrameDisableButton2 frame =
new JFrameDisableButton2();
}
}

If someone can tell me what's wrong with it, that would be very helpful

inner wraith
#

Fixing your indentation would help readability a ton - please don't finish your degree doing that and become the type of developer I tend to inherit code from.

carmine lantern
#

I was able to put label.setVisible(true); in there

#

Programming isn't really my passion or anything I'm just doing it for money

#

Just wanna figure stuff like this out so I'm more presentable to companies

inner wraith
#

Yep you're going to be that type of developer lol

carmine lantern
#

What do you mean necessarily?

inner wraith
#

That was a bit rude of me, I don't know you.
It's fine and good to program for money.
But there are many developers out there who just do not care what they're writing and how it reads and just copy-paste badly-formatted cargo-cult garbage into codebases and change it until it runs.

carmine lantern
#

Oh I see.

inner wraith
#

These people are of negative value to a business if they're touching any code meant to last.

carmine lantern
#

Nah, I genuinely try to read into things to change it around. Bad programming and you end up like YandereDev

#

Programming is hard though, but I definitely do want to learn it, because I know art can be made with lines of code. I'm an artist.

#

Figured out all my homework. I think this summer I'm gonna try to make multiple Java programs.

#

I'm gonna start with a Chess board. And then recreate it in Python.

silk eagle
#

I write code like I would a paper, its meant for multiple people to read: me, the computer man, and usually other people (which includes me a few weeks from now). I write a rough draft, make some notes about its readability / how it could be simplified, then write it again. eventually you get good at writing that rough draft and making the notes in real time, but even just trying to write the same function 2 or 3 times in different ways each time can really help you figure out what works and reads best.

carmine lantern
#

I see.

#

That's interesting to note. I'll remember that.

#

I think my goal this summer is to self-teach myself Python and SQL.

inner wraith
#

The most valuable thing I've learned programming so far is structure

#

Namely how to organise and shape data for efficient processing, visualising inputs and outputs and what they'll look like at each end.

ebon vector
#

anyone know how to add the verbose flag to black's toml settings?

urban aurora
#

I am not sure if this is the right channel but could anyone tell me if connecting an RGBW light strip like this would work or not?
Please ping me in the response, or preferably dm me
Thanks in advance

rancid nimbus
#

You are missing a bunch of grounds.

urban aurora
#

I can get strong enough diodes so amps shouldnt he an issue

urban aurora
idle shadow
#

Wanna try with mobile app development again, and currently want a cross platform app. Now, when i last tried it was basically xamarin or native languages, but now with React Native and Flutter.. What would people recommend me to do? The app i will be trying to develop will be a very basic app. Mainly a recipe bank, fault codes, but also thinking of adding a chat and maybe integrate MS organisation login (AD). What do people recommend? I can't do native iOS as I do not currently have a Mac, and setting up a hackintosh or emulating a mac is out of question really. Can't really work on that

peak acorn
#

Flutter will do fine for basic app

#

React might be better learning experience imo

cedar comet
sharp lynx
simple temple
#

This is like a conda environment but native

wintry plinth
#

(Vscode on Pop Os)

#

cant use requests even tho its installed