#development
1 messages · Page 87 of 1
Swift would be the perfect language if it didn't have to coexist with its satanic older brother that is ObjC
honestly it doesn't really have to, you can use it just fine while ignoring all of the objc
Not when your job involves maintaining a 10-year-old iOS codebase 
im sorry to hear that lmao
i really only work with swiftui so i guess the experiences differ widely
good luck till someone requires you to integrate an UI component which exists only as Objective C code
lol i already have, it wasn’t that bad, it’s when you have to do it hundreds of times is when it gets really bad
or when you have to try to bridge async stuff
this is for months before the deadline
JS is of the devil
this is the complaining channel, please format your problems in the form of a complaint.
I am going to pretend I did not see that
I can't figure out X
- no help provided
X Lang sucks, because I can't get it todo Y
- lots of help will be provided to defend how X lang is good and easy todo Y using X lang.
fr
Shit talking is a lot easier than helping
not really
cuz then u have to deal with smart people being mad at u for shit talking and then you dont get help in the future or they shit talk u in return
its easier to stay silent than to shit talk if u cant help 
problem is you also get dumb people who are convinced they're really smart
or legitimately smart but completely inexperienced and convinced they know enough that they don't need experience
this discord seems to attract both 😆
rust bad
uh oh here we go

I wonder if there is any shitty probably esoteric oop language that gets attributes by saying like {variable}'s {attribute} thatd be goofy
lot of weird verbose 'englishy' programming languages right

Couldn't possibly go wrong
make one
we do make interpreters in a class im taking next year
ok?
So i can make it in there
Thats the problem with being in school, why would I bother to learn about writing a compiler/interpreter right now when im going to learn in a few months
swirlin
What are the various technologies to write general purpose code on a GPU?
I want to implement this on a gpu and take a shit ton of slices from it to animate it
I only know CUDA, I think openCL is also C code compiled for gpus, is there anything else?
ROCm
https://rocmdocs.amd.com/en/latest/
It might be based on the opencl, but I don't remember.
https://rocmdocs.amd.com/en/latest/Tutorial/Tutorial.html
That's AMD's GPU accelerated libraries. They are also comparable with Nvidia and cuda somehow. If you know CUDA and that does what you want then stick with that. There is no need to learn another.
Is that Perlin noise and flow fields?
I need to read into how the swirls are made, but i coded up a voronoi noise doodad and plugged it into paint dot net with their outline effect
the effect is open src so ill give it a read thru tomorrow probably and clone it into python (which this slow as fuck implementation is in) before moving to gpu
I dont know CUDA so the question is what should i learn first, ive watched videos and read a bit up on cuda but never implemented anything with it
Not as cool as a flow field haha, just some image manipulation
https://developer.nvidia.com/blog/easy-introduction-cuda-c-and-c/
https://github.com/ucb-bar/opencl-kernels/blob/master/saxpy/saxpy.c
https://rocmdocs.amd.com/en/latest/Programming_Guides/Opencl-programming-guide.html
These are SAXPY stands for “Single-precision A*X Plus Y” demo's.
Game about tax evasion
so big companies simulator
probably can macro the hell out of C++ to do that 😄
like https://github.com/Toaster192/czech.h hello world:
#include "../czech.h"
#include <stdio.h>
číslo hlavní(prázdno)
{
položř("Ahoj, světe!");
vrať 0;
}
huh wtf lol
can macro the statements, but not the tokens.
like
a.number -> a's number
would still throw a compiler error cause character
I mean...
digusting
You can do a lot of cursed things with C++ Using and define...
that's no longer programming, that's hieroglyphics
its cool
There's something good you can say about every programming language. But that's no fun. Instead, let's take the worst features of all the languages we know, and put them together to create an abomination with the worst syntax, the worst semantics, the worst foot-guns and the worst runtime behaviour in recorded history. Let's make a language so b...
Ok so I think I'm losing my mind but the contractor we hired to upgrade a stupid drupal from 7 -> 9 has been off in his own world since I was very busy. I'm back on the project and I feel like its insanity. I can't tell if this guy is nuts or the way drupal is done but there's so many goofy things.
The one that's driving me crazy and I can't tell if I'm an asshole is the guy is constantly using JS to do things like reorganize HTML, things y'know, templates do. Another the guy obsessively scopes all SCSS, preferring to re-write per instance of a visual element instead of trying to handle it globally. Is this some sort of common practice I'm unaware of?
no that just sounds like he's an idiot
For the scss I do often see stuff like that, it seems common for web devs to learn their stack and never much about styling.
It's like there is a culture of hack through it until it works. Making for some really ugly code.
@wind horizon just had to deal with this today. Working on a codebase with someone, and he pushed a huge rework that broke all my tests, and the multi threading i spent so much time polishing
I got a PHP issue, using dirname(__FILE__) will return the full directory name starting at D:/somethingsomething, I need a way for my files to waypoint back to domain root without having to use ../../../, any ideas?
define domain root
That is what I'm trying to do tho
you are mixing two things, server side paths and client side paths ?
Hello developers I have a question do you guys use 2 monitors or do you use a widescreen ?
I mean the website is hosted on my D:/ drive so they are pretty much the same 😂
Both, I have a a 1920*1200 and a 3840x1080 ASUS 49" monitor 😛
Welp I think im going to get 2 1440p screens
Am living temporarily with my mum looking for a new apartment so I dont have my ultrawide setup cause little room
might be better but I still have no idea how I will make it work with the mac
I'd go for that rather than ultrawide
I regret buying it, but since I already got it, it ain't bad if you get me
yeah I always use one vertical and one horizontal
makes coding easier buy I wanted to explore my options
Mhm, when I have mu full setup I also go for a vertical monitor, looks better when coding and scrolling spotify :p
guys, some super smart guy programmed a tool at work recently that takes date inputs that can cross between milleniums (1990 - 2030 are possible dates) and uses simple 2 digit years for dates...it basically has the Y2K bug, i can't stop laughing. It actually fails when u try to enter 1996 as a date cuz its 2022
(android) is there something obvious i'm missing that makes this not work?
the file just isn't created
That code runs on the UI thread if that makes a difference
https://cdn.discordapp.com/attachments/282242091000528897/966407526868475925/direct.png
Any errors? What version are you targeting
no exceptions in logcat, i just realized i'm targeting 29 but running 24 (i'm forking another project so that's why i didn't notice before), maybe that's the issue
i'll try a 29 emulator and if it works, figure out how to make it work with 24
They are not
it's just one of those days https://arstechnica.com/information-technology/2022/04/major-crypto-blunder-in-java-enables-psychic-paper-forgeries/
doesn't seem to help
maybe i'm just misunderstanding where the file is supposed to go, it's <internal or external storage>/Android/data/mypackage/files/, right?
do you want want specific storage
normally, you wouldn't care where the physical file is, because as long as the context files dir returns something that's fine
i want somewhere that the user can access, that's my only hard requirement but it being consistent would be nice too
it must be consistent.
but if you say "user can access" they can access the data, but that's kind of inconvenient. not entirely sure what file you are trying to write but check external storage instead of using app specific location
you should check existence of the file with your own app
for context: i'm forking a screenshot app to add a custom host option, and the file i'm writing just contains the deletion link for the image, the app never accesses it again
well, it never reads from it
also there is a simpler solution to check for file, let me type it
it just overwrites it when asked to
sounds like Media storage, not app specific
first run adb shell in command line
then run-as your.app.package.name
that drops you to the folder of your app, under the app's UID
you can then use typical linux commands, like ls -al, cd files and so on
no idea how you have to specify adb shell into an android emulator, but on physical device stuff above works
screenshot assistant sounds like should be using MediaStorage API
feels kinda weird to store stuff that isn't media on something called MediaStorage but i guess i'll do that
but it's screenshot right
no
just a text?
it's the deletion link for a remote screenshot, so yes
uhm, why, yea not mediastorage
anyways, I'm not here to question your design
what code do you have so far? still the one you sent earlier?
in any case, we answered @nocturne galleon 's primary question, so at least that's a win for today 😛
(and an actual answer)
why
it's just a personal project to fulfill something i personally want, if someone else is eventually interested in the app i'll make it nicer, right now i just have it as a 1:1 port of my desktop script:
- upload image
- parse link from response and copy it to the clipboard
- parse deletion link from response and save it to a file
yup
what android version are you targeting now?
btw target SDK is what API you target, minimum SDK is what it will run at. So just because you target SDK 29 or 31, that doesn't preclude it from running on device with SDK 19.
ahhh
this is only my second time messing with android and it's the first time i'm messing with build stuff so i'm still really unfamiliar 😅
of course your dependencies or hasles with other devices might move your minimum SDK upwards
for example not many bother supporting anything older than Android 5.1 these days
in that case i'll keep it at 29
bump up your minimum SDK and target [or higher] to your phone current's version
if this is not going to be published, you can pick whatever fits your needs. if it is going to play store, it needs to have 30 now, 31 soon.
btw there are huge changes about file access between 29 and 30 and later
what makes mobile dev, fun
more fun is google moving the dates 😄
scratch that, dev in general is fun when breaking changes
i find mobile development a big pain tbh, worse than general GUI development
You can now submit a declaration to use QUERY_ALL_PACKAGES permission.
Starting May 4, you won’t be able to submit an app update if your declaration is missing. You have until July 1 to update y
this was february, then march, then april, then july, now they added a note about may
but muhh xml design 😦
honestly i don't think there is a single platform that i enjoy making GUIs in
html + css is the least bad but still painful, Qt after that, then swing as the most painful, haven't used android enough to comment on that
also no i won't put it on gplay, maaaybe fdroid after i polish it, but probably not either
" solely for security-based purposes." so any crypto apps is now eligible to apply for such high-risk
Apple is horrible with non-programatic UI design
typical programatic UI designer vs file-based ui design
actually read the valid uses bellow. You pretty much have to be a app for a bank and ask for exception
i mean the connector system
yea, that's what I'm saying. if we consider crypto as banking
you literally have the connection between UI and code in those XML files
bumped the minimum to 29 and kept the target as is (my phone uses android 10)
yea, i haven't actually tried apple. only androi dev, that explains it
any luck so far about opening/writing your files?
well the file exists as i showed in the adb screenshot, now i need to know what api i should use for saving it somewhere else since afaik /data/data isn't accessible to file managers
stuff like this https://i.stack.imgur.com/Gp9cJ.png 😄
that is where MediaStore api comes in
proprietary development tools
agony
https://developer.android.com/training/data-storage/shared/media stuff like this
you can't really use anything else for iOS development
so i should use it even though i'm not storing media?
suffering
you just said you want to provide media
i never said that, explain where you think i did
The media store also includes a collection called MediaStore.Files. Its contents depend on whether your app uses scoped storage, available on apps that target Android 10 or higher:
You said:
saving it somewhere else since afaik /data/data isn't accessible to file managers
Modern Android file managers use MediaStore API to read files from other apps
but the basic question is - will this app be in play store or not
no
would I get booed if I say cross-platform tools like ionic or react
then don't
then add WRITE_EXTERNAL_STORAGE permission, target SDK 29 or bellow, and write to any folder you want, as long as you have access right
also <application android:requestLegacyExternalStorage="true"/> if you want to run it on Android 10 or higher device
oh yea, we haven't asked for what permission in your manifest
https://developer.android.com/training/data-storage/shared/documents-files this is the Android 11 way for "random files"
already have that permission
and now i added the requestLegacyExternalStorage line
but like, how can i get the path that leads to the root of "internal storage" (not the root of the filesystem but the internal storage root that file managers can access)?
for example in the emulator it's this but i'm pretty sure it's not standard for everything
so the 1B1B for example?
Yes
given you have all necessary permission, try writing a file to
Environment.getExternalStorageDirectory()
note:: android11 screws this up, so keep it in the current ver
well, that is the issue. Kotlin API is the modern one, question is if they even publish that API. https://developer.android.com/reference/android/os/Environment has stuff liek that, as Kyou says
Anyone used edgedb, it seems pretty nice
worked?
looks like deprecated, but Android Studio might suggest better
It did work
aight, sounds good
Why are variable length arrays discouraged in C
because you don't C the length at compile time
In this instance im creating the array based on a parameter size
i dont get how it could rly be unsafe
and yes haha
ok
It seems like its widely agreed to just never use variable length array because cppcheck complains about it and stackoverflow people say u shouldnt but their reasoning doesnt seem to make sense in my case
it's unsafe, but not prohibited
remember C is still "trust the programmer" . if you think it's good, then it's good
because it is very easy to screw up and start writing at places you aren't supposed to, resulting in crash of your app (if you go to memory of other app) or overwriting your own unrelated data (even worse)
Is anyone well versed in JavaScript?
just ask whatever question you have
Any free and good ressources for the cka certification ?
No one is, it's all magic
javascript is an easter egg hunt but the eggs hunt you
"I'm looking for this ... oh you mean this no I mean this idk where this went"
.bind() and .call() are stupid
"this" is dumb
Is making a queue thread safe as simple as throwing mutex locks around every function
java? If yes, they have specific Classes that make it threadsafe
yea pretty much locks are the optimal (?) way
ok
I did realise there is some nuance because if you want to do something like if(isEmpty(queue)) { dequeue and do shit } you need to really just use a single function that tells you if its empty & gives you the data if it isnt
which i already did so no issue but
me still waiting for the question
no it isnt- ok well... ok i guess
always has been
Any good ressources to prepare for the cka ?
Eh, you can create lock-free queues if you use atomic operations, but that's a whole other beast.
(C, preferably standard libraries)
how can I search for a string in a file, and then seek to a known location near it?
- open the file
- search for the string
- get location of cursor
- seek
- profit
And faster variants depend on the standard library and syscalls you have at hand (mmap+memmem is astonishingly fast)
How the hell do you use only atomic operations to implement a queue
only atomic operations? that doesn't really make sense
unless you mean only atomic operations, no locking
referring to this
presumably any queue operation has to be a single atomic operation if its not locked?
right, that's what i'm saying. you can use atomic operations for the critical parts that actually touch the shared data structure, and then never use locks
Sure sure but how do you even do that
but not all instructions are atomic and not all instructions have atomic alternatives
i mean, there's lots of ways, off the top of my head i don't have a particular way to design it in mind
Yeah i know
i googled it apparently some cpus have atomic compare-and-swap instructions that allow it to be possible
im sure there are other features that let you do it, prob requires a lot of thinking lmao
right
i mean every cpu pretty much has to have some kind of atomic instruction
because that's how locks are implemented
true i guess lmao
it's just that "this data structure is locked" is a lot easier to reason about than carefully designing a lock free version to eek out a little more performance
i have no clue how pthreads might be implemented at all
well i guess i have some idea but not enough to possibly make it myself, i guess you just extend the idea of 'leaving notes' for other threads
That's one of the things I've really learned to love about go, how easy it is to get threads to talk to each other
never tried it
It's very nice for backend systems, with a lot of native support for all things netowkring
And it's statically linked by default, which makes it super portable
interesting
But shooting off a new thread is as simple as putting "go" in front of a function call, and if you want it to talk back, you just give it a channel to use
import "fmt"
func main() {
messages := make(chan string)
go func() { messages <- "ping" }()
msg := <-messages
fmt.Println(msg)
}```
kinda weird but neat
I finished the multithreaded brute force voronoi noise generator but only then I learned there is some orders of magnitude faster sweepline algorithm
If it can't be done with bubble sorting, I don't wanna
lol
I mean its fast enough for anything i wanna bother with, half a sec for 60 1024x1024 pixel images
its just for fun anyways, and "fortune's algorithm" looks hard and boring 💀
"Is the answer more efficiency? No, of course not. Just add power"
buys a 64c cpu for more faster images
PATCH NOTES:
Feature Add
During high load, added the ability to automatically overclock the cpu for faster processing
haha
the brute force thing is 'embarassingly parallel' so i mean
doubling core count do be doubly faster
I went threadripper. I can never go back.
Would be neat to have
The biggest downside is that it locks you into an expensive hardware ecosystem,
tru
What are you doing with the images?
I want to figure out how to post process it to make it look like this (voronoi noise put into paint.net's "outline" effect):
I dont quite understand wtf paint.net is doing for the effect tho
ewww, gui/rendering scary.
just a color array really
I thought pdn might be using a series of 'morphological erosions and dilations' but from testing i dont think so
the source code for the effect makes zero sense to me
I know that pain
currently trying to figure out how to sign apks from github actions because manually making releases is annoying, my current idea is to base64 encode the keystore, pass it as a github secret, then decode it at build time, but that doesn't seem to be working, any ideas? https://paste.ee/p/dKOJK
running the same commands on my machine leads to a sha256sum identical to my local keystore
Don't ever use github actions, but is this it?
./gradlew -DRELEASE_STORE_FILE=../android-keystore.jks \
it doesn't look like you're dumping the keystore to the parent directory
it's put in the root project directory, however gradle looks for that path relative to the current build.gradle, which is inside the app directory, so i'm pretty sure that's not the issue
hm now even when i try to sign it locally something goes wrong
i may have messed up more than i thought
i really wish android didn't require signing lol
like, i would understand if it were just a play store requirement
but nope
though funny enough, doing it locally and on actions give different errors
I blame java
I blame
IIRC, C++ Concurrency in Action by Anthony Williams has a whole chapter (maybe even two?) only on a lock-free queue implementation with atomic operations, with details on the correct memsq operations. While it uses std::atomic, you can use the same reasoning for C11's <stdatomic.h>.
Also, a quick search yields repositories like https://github.com/stv0g/c11-queues, which contain single-producer-single-consumer and (single|multi)-producer-multi-consumer implementations.
fixed that
actions still has the issue though 😔
after uploading the keystore with the API rather than the GUI it seems to be better, i get another error now
but i don't see how the password could be wrong
i can open it locally with the same password fine
All of the github actions are similar to running a docker command, so perhaps copy your action into a docker file and run those same steps? To simulate the secret maybe just attach it as an env or something. (ofc don't actually push / use that docker img with the env in the layers, just for testing lol)
well time to learn docker i guess
I think you'll be surprised how similar it is to the actions you already wrote. 🙂
Instead of having to checkout the repo you can just copy in your local code using COPY, then for the image probably use that same / similar Java version (use FROM <javaimghere>). Set he env manually with ENV line (for testing only), and then all your run steps in GitHub Actions should mostly just turn into RUN lines in the docker file.
need laravel project help?
I know a little php BS-ery. Whats up?@zenith plank
@slate frigate Fine. Can you help with laravel setups
Like... installing it?
um its setup for qr code generator
Link to plugin?
i need to create a qr code generator using form data
dont know how to pass the data
I would just dump it into a variable, then pass it to the qr blade
So when the qr code gets scanned does it display the form data?
the what
Assuming you're generating the qr code similar to this
{!! QrCode::size(250)->generate('ItSolutionStuff.com'); !!}
Whatever parameter you put into "generate" will be the data in the qr code
Thanks!
i get the same issue 😔
i don't get it
You get the issue when doing it on local in docker? If so that's a good thing, should make it easier / faster to test and debug it. Haha
I mean that's true, but if it didn't happen it would mean it's almost definitely an issue with how the data is being uploaded, in this case i have no idea whay could be the issue
I'd suggest triple checking your base64 encode, slightest mistake and it's messed up.
In the browser you can hit f12 and type
const data = btoa("key here")
console.log(data)
console.log(atob(data))
To verify your copy pasted string looks good when decoded. If so just copy the encoded string.
Is this a pem key file or something? It's easy to mess those up with the new lines / carriage return when encoding.
Also with docker container you have now you can run exec command and connect to the container. So you can inspect the file it saved the decoded value to and see if it looks right.
@wind horizon reminding me of good ol' powershell base64
Except if the key is base 64 encoded and publicly available then people will attempt to crack the password. You could put the key in a GitHub secret possibly. Just double check that the key doesn't leak in a log that gets published.
That's what they did, it's in a GitHub secret in what they shared.
Does anyone know how to make "sort by: dimensions" a default option in Windows shell instead of having to right click the folder and add the sort option each time? I do this manually every day for work and I haven't figured out how to make it permanent in every drive automatically as a pre-added option. Thank you to anyone who tries to help me figure this thing out!
Java keystore
base64 is not encryption in any way shape or form
please PLEASE don't store your secrets in base64 and put them somewhere public
base64 is just an encoding scheme, to store binary data in Alpha-Numeric Charactes (plus + and /)
Encryption is something that requires a key or a keypair for encoding an decoding (AES, PGP, RSA)
You could also Hash it, if you only need to compare the user input to a pre-determined outcome (like password storage in a DB), in which case the original string can't be extracted from the Hash (MD-5 and SHA2 are two examples of Hash systems)
@grizzled steeple
original string can't be extracted from the Hash
hold mah cuda cores, we collision hunting.
With MD-5, yes. But I'm not aware of any known collisions with SHA2 and SHA3...
Collisions/Successfully finding the hashed data. Same, same.
It gets expensive FAST, but there's a project floating around out there that uses massive amounts of parallel google gpu VPS's for cracking. Gave it a try once, RIP my wallet.
Please please read messages, they are putting it in github secerts, using b64 to pass binary data, escape characters, and consolidate into single line is 100% normal todo. They didn't mistake b64 for encryption. Lol
Sadly I have never used the Java key store, so not familiar with passing that into b64. But since you have the local docker setup I'd deff test connecting and seeing if the key store looks right compared to your local.
docker exec -it container-name
lol that wasn't clear, plenty of people do think base64 is encryption (including apparently the government of Missouri) so i wanted to put it out there either way
nonono guys it is encryption its like caesar cypher
before computers, base64 would be insaaaaaane man
You guys don't simulate an enigma machine your for ssh keys???
lava lamps
vibe check turned lava lamp check
Hey, my current academy project is about interactive storytelling and I would like to learn more about this topic in general. Like an overview and the up and downsides of it, maybe even more in a philosophical direction.
What book would you guys recommend?
I was trying to ask google, but I got a billion different books recommended, heh.
Pls ping me, or DM me if you have a good recommendation. 
guys stupid question
why does my VS code decides to change color for no reason?
Its dead code
while true means the stuff on the bottom will never run and vsc changes the color
np
that is SO COOL btw, as a feature of the editor
ok i like never talk in here but i figured maybe someone in here would know: are there any free alternatives to MATLAB simulink/ways to just get it for free that arent piracy
there's Xcos
Just had to root around in someone else's c# program and fix it. I hate it.
go, or python. If it wasn't them just losing track of some logic, I would have just written it in something else
idk anything about go but i very dislike python for anything bigger than one file
I have a fairly substantial sized python project, and it remains fairly performative. Chose python for it because its going to be a forever growing project (write and submit sub-modules), and I've been told it's not great for project longevity if I'm the only person that knows the language that it's written in.
i mean yeah you shouldnt write it in a rarely used langauge but there are so many to choose
I'm the only hardcore dev in my shop 😉
This project needs to outlast me
I simply dont like dynamically typed languages
stupid that the programming langauage would ever let you call a function meant for ints and give it a string
(now, i think python might have allowed you to limit the function paramters now or is that js?)
Yeah, you can limit them
a somewhat recent edition anyways
Man this servers chat filter is wacky
Anyways, agreed java bad? I have to write a java program for my databases class "because its the only PL that is a prereq for this class so everyone should know it"
its fine but not fun
speaking of python what's a good python framework that does the hard work for you for some simple app, but requires authenticatioon
django?
I work cybersecurity. I shudder when I hear java.
I've only ever used django and flask. Usually setting up my own auth backend though, mainly from familiarity more than anything
in what fashion do you set up the backend auth
like implementing 'login with XXXX megacorp' or
Seems like the smartest choice
yeah, that's what I wanted to do, but no
I know us all based antigoogle folk hate relying on it but like i wouldnt want to be stuck holding the bag when ur passwords get leaked
I like going the way of api tokens. Easy for me to burn, not my problem if you lose.
the thing I'm making is literally to just let vendors see a pricelist from quickbooks basically
so username + password returns api token to use?
No. "Heres your token, don't lose it"
oh
Granted, I don't need anything super hardened for what I do, mainly to keep track of queries
not a user thing, just an API
Well key matches to user
I had to make a shitty ass site for one of my classes i did a very scuffed version of that
you just used random strings to log in per game of risk-like thing
Time to very securely give anyone who uses my program my sql username and password!!!
god I hate sql. Mongo is dah wey
sql aint the issue
program it in cobol
but rather im shipping my username + password to anyone who looks at my program lmao
I hate how none of my classes ever addressed that, i took a 'software engineering' course and yeah we just baked in our password to our program which was publicly available on github
Not even using environs?
wait what the fuck
Now i've heard of R words being banned from chats, but that is an R word i wasnt expecting to be banned
quickbooks don't provide an auth?
that's the whole point
Yaaay some bots on the internet get to scoop up 30+ cloud based sql logins from our class
that they don't need quickbook logins
oh I see, so you want it re-implmented on your webapp
well it's meant to be for vendors of the client to be able to check the price list apparently
We ended up using entity framework which im pretty sure just saves the login somewhere, everyone else just literally put constants in their code for their credentials
super stupid no github secret or anything of the sort just plopped in there
We were considering to host a rest api to actually do the authenticated sql queries but it was too much work for the course which obviously didnt care about it in the first place
environment variables..
oh yea, so using your own should be great.
turns out, state universities arent very good at actually teaching you things
don't think any is
probably
outdated stuff
Don't have a cert or degree to my name, and proud of it.
technically, databases are just saving anything somewhere
I don't have any cert, and I want atleast one just to try it ou
Yeah but you probably shouldn't put your credentials for a cloud based mysql server on github
I'm going for a degree, but not one in the IT world
I dont think they ever got fucked with? I havent checked since i finished the class.
The only good thing about going to school for CS is you get a rigid structure to learn bare minimums, and if ur not stupid you get lots of free time to actually learn shit on your own
I'm surprised how many kids in my grade are going for CS
I mean you could do that on a bootcamp over summer
If i were to go to a bootcamp i'd rather just camp out at my parents place for a few months and learn everything i need to know
bootcamps afaik are basically only web dev tho no?
exactly, that's not the "only good thing",
since you could do that on your own
Living at my parents place doesnt give me any structure tho, i guess a bootcamp would
I absolutely cant get work done unless i have deadlines to meet or am actually inspired, which is rare
I would say the structured learning is good for the more advanced topics, anything where the math starts getting crazy. Or hardcore data arch
good thing my courses barely get into any of that
afaik the only difficult courses at my school are discrete math, algorithms, programming languages (more like Functional programming class), and computer graphics
difficult only relative to the other courses, I probably studies for less than 1 hour before each exam for the courses i took on that list, much less for any other cs class
hmmmmm
(in java using jdbc) how could I do an insert statement, and see if that insert activated a trigger to do an insertion into another table
I could check the number of entries in that other table twice, before and after the insertion. But that isnt really robust against the case where multiple people inserted into the same row and only one of the activates a trigger
this sounds like, fixing the solution instead of the problem
Its a very simplistic system for a class assignment
why would you want to know this happens
^^
^^
its an awful shitty 'atm' thing. On withdrawal it sends an insert statement to add to the transaction table, there is a trigger that checks if the transaction is an overdraft, if so, adds an entry into the overdraft table
im supposed to make the 'atm' shit say whether a withdrawal command worked or was an overdraft
I can just the the count before/after method to satisfy the assignment, but i feel like there should be a better way
there is a trigger that checks if the transaction is an overdraft, if so, adds an entry into the overdraft table
why are you doing this in the database triggers and not in your system
🤷 ask my state uni teacher
Well ill tell u the reason, its becos part of the assignment is writing triggers, so
meh, gotta cover it somehow i guess
let's just make do if you're forced to use such
the solution on the top of my head is the "id" the transcation.
Basically for the overdraft table have a column of "transcation id".
flow would be:
(sys) insert row
(trigger) insert row into overdraft
(sys) select * where transcation id = X
Right they do have transaction_id shared between them
yea check if exists
its auto incremented though, idk how i could get the id of my inserted row
i thought your inserted row also have that transcation id?
The row has a transaction ID but the insert doesnt supply it since that is auto incremented
that's your next google search
Afaik there is no way to get the data out besides what i supply
executeUpdate doesn't return anything besides an int on success/fail
Oh wait no there is a method i think, we good
Yeah ok there is a flag to get the generated key so thats easy
figured
everything leads to SO
Hey, I am working on a hardware project for school rn but we need to collect user data for out presentation, if you are willing to take a few mins to fill out the survey it would help me a lot, thanks! https://forms.gle/aT5G3thESoEPRpVW9
can we see the data?
Anyone know React/Javascript that could help me with this? https://stackoverflow.com/questions/72064723/react-typescript-serviceworker-update-function-warning-how-to-resolve
This is a lint error, not code error.
The lint error is since you have an if statement return, but no default. So you could end up with undefined items in the returned array.
You probably want to use another method such as reduce if you want to alter the data, but also only return some items from the array.
If want to clean up that code I'd highly suggest a look at async/await.
Yeah async/await and try catch work together great.
Does anyone have a good resource for me to start learning C# with?
Usually how I do it is find some program I wanna make in a language (like "whats something simple I can make" type thing, something reasonable for a beginner), figure out how to make it, gradually increase the complexity, and maybe you get more ideas when you find out new tricks in the language
and then once you know all the syntax and generally how to make code function from doing that, you can start reading documentation
and look at other peoples' code, a lot of the time you can learn some useful tricks from seeing how different people approach the same thing
C#-programmer here 👋
It depends on how you like to learn (reading, video's or 'just start' with the documentation). Some places you could look at are:
- Codecademy (https://www.codecademy.com/catalog/language/c-sharp)
- Udemy (https://www.udemy.com/course/csharp-tutorial-for-beginners/)
- YouTube (one of the many playlists: https://www.youtube.com/playlist?list=PLrW43fNmjaQVSmaezCeU-Hm4sMs2uKzYN)
I don't know if you have any previous programming experience. If you don't have any experience, I would first start to practice some pseudo code (https://www.geeksforgeeks.org/how-to-write-a-pseudo-code/) because C# can be overwhelming with its OOP approach.
If you do have (some) previous experiences, you can go 2 ways. If you have experiences with OOP (Object Oriented Programming) programming and 'frameworks', you could combine C# with .NET (Core). Why? Because most of the time you write C# these days, some elements of .NET (Core) is involved because of its wide range of usages. (Mind that I add 'Core' on purpose, because it might be confused with the older .NET Framework).
The other way is just to focus on the language / syntax itself. Try to get used to it, start with the basics (with the resources I mentioned) .
I have a question. I had an idea for an interesting little project I could do, involving sudoku. For now, I just want to design and code the logic for a sudoku board, but i may want to build a front end around it so I could actually play sudoku with it. I don't want to do a mvc design with a backend handling anything, I would want everything to be handled in the frontend. Is there a good language to do that in? I could obviously do it in python, but I can't just plop that into any meaningful frontend(that I know of), whether as a mobile app or Pc app. Any ideas?
yes
?
?
Weird question but does anyone know what stack Floatplane uses?
Hosted on k8s it looks like, believe it’s Angular front end, and not sure on what they use for a backend but job posting they had for BE was JS so likely NodeJS.
No idea on database though.
Oh sweet. Man I am yet to move away from PHP
Also I am scared of k8s and Docker in general
But I might expand my horizons with Nuxt, just a bit scared to move
Using web assembly you can ship some Python to browsers, but that’s overly complex for something like this imo. If you want browser only / no server you’re best bet is JS since that doesn’t require any server to be involved / runs on client only.
Docker is awesome and k8s isn’t as scary as it seems at first, really pretty quick to learn if you watch videos or find someone to teach you. You won’t be like a pro over night kind of thing, but you can learn the basics and how to interact with it within a matter of hours/days depending on your current docker and past ops knowledge level.
In most cases though you have a dedicated person(s) handling your k8s, but it’s good to understand it so you can help investigate an issue or know how to best configure your app setup or packaging into like a helm chart etc.
But even though a lot of sites nowadays still use PHP, is it worth the hate? Personally it's really easy.
You know what, I will give it a try. I have to do it eventually, so why not this week.
Even PHP apps can be deployed on k8s. Anything can that runs in a container, most cloud stuff today is running on k8s.
It’s deff more of a DevOps type of thing.
Is there a performance increase/decrease with k8s?
Start with docker, then after you have the basics of containers if you want you move onto k8s since it’s built around containers.
Will do o7
I’d say it’s more about scalability and management than performance.
I just found a tutorial on Laracasts so it perfectly goes with Laravel
Ah alright then, well thank you either way
Learning docker can be a huge help in your dev life , so even if you don’t learn k8s / devops it’s still a good thing to learn.
Using docker, esp compose, you can have a single command that starts up the entire app and dev env. So when new ppl need to touch it they run 1 command and they have the app running even with a disposable database and everything on their local computer.
Then when you take it to prod they are deploying the same container, so it helps reduce the whole “it works on my machine” issue.
it's just how it's deployed
it's a container orchestrator, and it can do all sorts of advanced stuff
it can handle load balancing
ingress
But do I need it if I am running off of a single AWS EC2 instance?
either way im watching some vids on it just to learn
unless you are developing a software that will be deployed on kubernetes
then things like minikube help
@rotund zinc https://www.youtube.com/watch?v=PziYflu8cB8
Learn the basics of Kubernetes and how it's used to scale containers to massive workloads in the in cloud, in 100 seconds. https://fireship.io/tags/docker/
Docker in 100 Seconds https://youtu.be/Gjnup-PuquQ
Full docker Tutorial https://youtu.be/gAkwW2tuIqE
Official Kube docs https://kubernetes.io/
#docker #100SecondsOfCode
Install the quiz a...
this one is always funny
Thanks to Deis for the use of their video! For more about Phippy and her friends, see: https://deis.com/phippy/
Not only in your dev life, also in your SysAdmin life. Some packages really don't want to work on your system or need some tricky configuration fu**ery, or the applications are hell-bend on using some ports. Creating a container for those application prevents internal and external screaming.
containers, the solution to "works on my machine"
Very true, I just mentioned dev life since it sounds like they are a php dev. 🙂
Containers are awesome for so much stuff, I have even used them as single use todo things since you don’t need to install any of the stuff needed todo it. Like running yp to modify a yaml file.
What's "yp"?
Yaml editor
Yep I am :D
no hate ❤️
yq you mean?
*blinks* But... I have both Emacs and Vim installed? 😄
Yes haha silly cell phone keyboard
yaml kinda annoys me
You can do it in cli / automated, think like modifying a yaml file in CI/CD etc.
Ah, like jq for JSON?
That's of course a different use case, will keep that in mind.
Same I’d rather it all just be JSON files, my eyes can follow it a lot easier. Feels easy to make a indentation / syntax error in yaml to me. But maybe it’s since I spend so much time in json and not much in yaml. Haha
My choices would be:
- YAML for short files/snippets (e.g. embedded Pandoc metadata in Markdown files), but not longer than 60 lines
- JSON for machine-machine communication, where a human might have to inspect some values, or in-line value definition
- TOML for arbitrary long configuration files
Nice, I haven’t done PHP in many years but as a mostly JS dev with a former life in ops I can say knowing containers / docker is a huge help in my daily dev life as well. Especially on small to medium size teams where you’re more likely to be involved in some of the ops.
TOML is nice and easy to read, feels like reading a typical .env file.
At one job I had to use YAML for content / translations and it was a pain. The file was thousands of lines and it was so easy to add a dupe key or make an indent error. If you didn’t have an editor that validated the yaml while editing it was like RIP. Lol
We use JSON for that, together with a VSCode configuration that automatically checks for any duplicate keys or mismatching entries. Lot less error prone.
Yeah I think a lot of ppl moved to JSON for content, at this job we have a weird mix of flat files that get turned into json on build. Why I have no idea, was already setup and content / translations doesn’t excite me enough to go spelunking and try and change it. 😂
And that's how we end up with "It was always like that, better not change it". At some point, the original developer leaves the shop, and a new one will join, see the system, says "that's too complicated", adds an abstraction layer, gets burned out, leaves the shop, and now you have Muppet that gets turned into TOML, then INI, then YAML, then a receipt in your favourite bar, and then finally JSON.
Yeah I’m big on cleanup and often use spare time to refactor old code, esp converting it into typescript. But translations are just so boring to me and it’s such a massive system / setup since to change the file structure it’d require a whole process with translation teams since they consume them todo the translations. Which means refactoring the millions of lines of translations and effecting other apps as well not just mine.
So yeah that one I’m like, naaah. Lol
Also after discussions in #lttstore I think I’m going to work on cleanup for my LTT Scalper bot and push it open source with the goal of allowing users to subscribe to specific items and possibly spin off the historical data into a site for ppl interested in that data.
If anyone is interested in contributing I’ll share GitHub link here once I do. It’s mostly all JS and hosted on GCP today.
Hi, somebody who have experience with PHP can help me with this please, I'm trying to do a post request but an error is showing in the console.
I don't see why it would throw an error, the code looks good at least to me
is there any javascript chads here?
those headers are not sent out, so figure out if you even call the right server/script
Check your actual headers in dev tools, since it’s a CORS error. Looks like you are request from port 3000 to default http aka 80.
Check your headers
Is anyone familiar with handlebars templating?
no
very helpful :{]
I just answered your question
Im asking for help not for you to answer that question
no you didn't
tf is wrong with you
anyway dont have time for your childishness, does anyone know why my express app would be looking only at my index.html when im specifically rendering my layout.hbs?
I looked on stackoverflow and someone stated I needed to to a path.join to my 'views' directory but for some reason my app refuses to render on the root route '/'
It does work when I render other templates on different routes, I made a simple form in handlebars and rendered that on a route I called '/form' and was able to render it
Is there any great documentation or examples on how to pass data from MySQL query to an Excel sheet in Python?
I found out my way to go is XLSXWriter, but I have trouble so far getting the data properly into the Excel sheet
@lament bridge Python?
Yes
Are you dumping data in CSV style, or are you having to do weirdness to it?
Well yes, more weirdness.
Because we want to add rows on Google Drive sheet rather than overwriting its data.
In the past, I've used https://openpyxl.readthedocs.io/en/stable/
Never got too funky with it, but it worked well enough
The only issue is I have no idea how to pass SQL fields into values.
EG. There is an index on UserID and I only want to add new User IDs.
This is just an example what I basically want.
You should
SQL query ---> Data Struct DOC <--- API pull from Drive
| | ^
|--> Check XLSX <--| |
If New ------------- Update Doc --|
I second this
In case I have a google sheet with UserIDs, dates, etc.
Again, I have an another sheet, that include UserIDs.
If let's say I wish to compare these user ids and set the "Contact" to true upon match, would be that happen with INDEX, MATCH in Google Sheets?
I'd assume so. Long time since I've used any sql stuff. Mongo ftw
There's this database, edgedb that I've dabbled with
Easier than sql imo
Schemas are created in the database
Only thing I don't like about edgedb is that it's python. Would probably start dragging with some of my bigger datasets
I don't really need SQL now.
Basically I have two sheets in the same spreadsheet, and I want to compare the UserIDs and show true if there is a match.
Hmm yeah
But otherwise, looks GREAT for built-in document DB
Cuz orchestrating outside services gets to be a headache
True, it feels very nice
And the official java driver feels way better than SQL queries, idk how a SQL based database with an ORM would work though
about performance, it's very close to just raw postgres apparently
The question is at scale, considering python and how it uses memory
Talking DB's that are hundreds of gigs+
true
Alright, discuss this:
no
correct
it's a markup language, end of discussion
Well I'm off to blow my brains out
html doesnt program a browser a browser programs html
it makes sense if you think hard enough
Who’s an experienced programmer here who I can ask for help with a project
depends what the project is/what you need help with, most people here are experienced in their own areas
I’m working on a assignment for my computer science class where I need to make an app with some requirements but I’m stuck and not very experienced
Alright then
@grave sparrow he's just saying go ahead and just put what you need out there. No need to use more cycles than needed :)
My apologies, I just need some help on how to use a function for my program. I need a function with a for loop, and I'm also having trouble on how to link the options in my quiz to the correct answer, and how to keep score. I can send the link here, and then theres a view code option at the top right. https://studio.code.org/projects/applab/GHV7rEhyPuv6EAbqd5fAwaVuVSeVijN8i7CqEaGaTbU
my mind is boggled you seemingly can't buy split flap display boards anywhere on the internet for cheap
make global variables that would hold the scores
a very simple way would be just to have have an int, and += to it everytime a question is correct
ohhh okay I see
Yep that seems to work! Thank you I'll come back if I need some more help
if you want to know the questions that were right or wrong, you could have an array of bools (true/false)
How hard must it be to build a split flap display board
I'm no mechanical/electrical engineer but since they are legacy hardware they are ubsurdly expensive, theres no way they would cost so much if they had modern production lines producing them
I think it'd be super cool to develop an iot split flap board, might be too costly to actually make any money off but it'd be sick as fuck
How could I make it so all other answers except for option2s1 are incorrect without having to make so many on events?
loops
something like
for (var i = 0; i < 4; i++) {
onEvent("button" + i, "click", function () {
// Do stuff
})
}
On a high/abstract level, how would you read parallel data on an attiny85, is it possible?
Im thinking you could use a parallel in/serial out shift register, you could load in all the parallel data using one pin, read it with another pin, and shift the data N times with a third pin
I have a game i've been working on for awhile now and im looking for some people to give feedback on the mechanics and such. If anyone wants to help it would be greatly appreciated 🙂
Well, whats the game
you need to guess it
💀
Anyone have sandboxing advice for an open world RPG? I can't give out many details, aside from maybe the setting.
no
That sounds like you've gathered a handful of cursed runes already
Anyone can help me a bit with Google Sheets?
I am trying to basically check if an UserID in A column matches UserID on a different sheet (but the same document) and if that's the case, mark G(X) field TRUE or FALSE conditionally.
This might explains the best.
@lament bridge Are you using this?
https://developers.google.com/sheets/api
I was not using any API, just straight an excel question, but sorted out with VLOOKUP 😄
Thanks a lot though!
messing with mysql and rust, the tutorial uses url based connection which has the username and password as plain text in the url of the database in the source-code, is this the best way for me to write it? or is there a more secure method of giving programs access to a database for production use
im not building anything for production but just curious how it works
is there a more secure method of giving programs access to a database for production use
yes
would you be able to point me in the right direction as to where I can find said method?
enviroment variables
like the ones I set in my bash terminal?
@nocturne galleon Example from one of my projects (python, not rust, but concept still applies)
also not just mysql
import json
import requests
import os
# Splunk Host Information #
splunk_host = os.environ['SPLUNK_HOST']
splunk_token = os.environ['SPLUNK_TOKEN']
splunk_port = os.environ['SPLUNK_PORT']
splunk_proto = os.environ['SPLUNK_PROTO']
splunk_source = os.environ['SPLUNK_SOURCE']
def __init__(*args):
rebuild_string = ""
for arg in args:
rebuild_string = rebuild_string + arg
data = json.loads(rebuild_string[1:].replace("'", ""))
url = splunk_proto + '://' + splunk_host + ':' + splunk_port + '/services/collector/event'
authHeader = {'Authorization': 'Splunk ' + splunk_token}
payload = {}
payload.update({"sourcetype": "_json"})
payload.update({"source": data['Module']})
payload.update({"host": "omegon"})
payload.update({"event": data['Data']})
r = requests.post(url, headers=authHeader, json=payload, verify=False)
And I have a local, gitignored script that sets env variables, then runs the project
export SPLUNK_TOKEN=""
export SPLUNK_PORT=""
export SPLUNK_PROTO=""
export SPLUNK_SOURCE=""
./main.py
aah awesome, thanks for the help
why not .env files?
or are those technically not standard
i mean .env is a git-ignored script
so heres a story,
my teacher was teaching something about Snap!, simmilar to scratch and I had alot of knowledge about that so i would answer all the questions right, even correct the teacher when she did something wrong in the code
the teacher told me to let that other students participate, and let me do whatever project I want on my computer.
yea
ok
Average school computer class
Boomer
They teach java and python in ap cs courses. Then throw on a vanilla html/css/js web dev course and you got school computer classes
In less than high school they probably just do scratch lookalikes
im no javaer (i tried but the hong kong university guy has a bad mic it was painful so I stopped), but are those things defined and accessible from where they are referenced
Well ovviously adj doesnt exist at that moment
This.s should just be s, as its not an instance variable, but a method parameter
Adj sounds like adjacency list, maybe you mean G?
Homie ur code is riddled with issues lool
I know
I need to walk home rq
i prefer variable names instead of variable letters
Bag<s> doesnt make sense because <s> is used to make a new class that uses a certain type
Yeah this is where I'm confused too.
Gimme a sec to get on my pc
Ok
Right so
The very first statement this.s = G; doesn't make any sense
this.s doesn't exist. It seems like you're trying to use the method parameter int s
Which still doesn't make sense because int s = digraph G, those types dont check out
Am I getting epic trolled like literally 0 lines of your function are correct
Ok, point me in the right direction
I dont remember the algorithm very well, what is DijkstraSP supposed to do?
The program is to create functioning graph with a sorting algorithm
Sorting or search?
I just know the goal is to find the data requested
A graph doesn't make a whole lot of sense in that case
I know but that's the title for the project
So you make a graph thats fine, it should store a specific type of data on each vertex i assume?
Yep
And it has edges, and you're support to sort it?
Besides topological sort that doesnt make sense to me
I'm not the most java literatie.
Its not a java problem its just unclear what you actually need to make
Are you ok with DMs?
sure
Man assembly language is hard
Ive got an assembly program its got a loop in it that loops 12 times and spits out a number from 1 - 12 anyone know how to make it print text in between each number print out?
Just jmp to another function at the end of each loop, where you print the string, then jmp back
@queen zenith
So it prints the string on line 66 right?
Looks like it. Not much of an assembly guy, so I won't say for sure
Whats the purpose in writing actual assembly
besides hacking a binary executable maybe
Project for school
oh ew
in my baby tier college they just had us do MIPS which is actually managable
kinda glad i went to an extremely easy school
Never understood why they bother teaching stuff like this other than a "hey, this exists, and how the cake is baked"
Plenty of other stuff to worry about when writing something
obviously university education has to teach you mostly useless stuff
Professor gave us a program that prints "I can count really fast" and then prints from 00000001 to 00000020
what he wants is a program that does the same thing but only goes to 00000012, puts IS THERE MORE? after every number print and then at the end prints THIS IS MY FINAL PROJECT.
Im going to be honest I figured out how to make it only go to 00000012 but everything else im at a loss
in my class it was half mips asm and half C for the class that covered it
I guess just load the stack with 11 "is there more" strings, and a "this is my final project" string at the beginning. Then just pop the data off the stack every loop
lol
ok that is kinda a sad final project
Also has anyone mentioned 10s slow mode is obnoxious and bad
I mean that sound cool but he hasnt taught us how to do any of that
my programming experience is with python and c++ this is way out of my league
Why else would you work in assembly if you're not being hyper efficient? Otherwise you have to build in extra crap into the loops to build the strings
Not a ding on you, but the concept in general
Which asm are you doing?
cause the professor spent 15 years working at ups and assembly is all he knows...
Imo its kinda dumb to learn anything other than a 'learners' isa like mips if its like a bachelor degree
Shouldnt even be a whole semester on the topic
Or focus on functional languages that are more broadly applicable? smh
lmfao
Get some golang up in there 😄
In the past 5 years or so our class switched "programming languages" to basically "functional programming the class" but kept the name
I feel you
c++ class, talked all about UPS
all ancient stuff
The professor for programming languages in my course is so funny he's like a vim tier evangelist but he shills for emacs 🤡
bro if ur gonna use emacs just use a gui editor lol
Hey, how about we all use GOOD ide's so we can focus on what really matters, the logic of the program, and not the syntax?
he says ML is his favorite language, i'd love to see you calculate the first 1 million primes in fucking ML!!
It irritates the fire out of me when I see people being taught to program, and are getting told to use notepad/gedit/vim/etc
omfg
the first 3 semesters of my class git was never mentioned, until i took software engineering
I have been using git to keep track of all of my course files since high school
they should be teaching that shit like day 1 to cs people holy god
can you imagine being in like java II and doing partner projects without git
And this is why I actively avoid getting any degrees or certificates.
what is popular now is online IDEs like replit.com
Luckily i had one friend throughout those classes who knew how to at least use git and we did all partner projects thru it
honestly github codespaces is pretty convenient
Theia is also nice
ok guys, javascript isn't spaghetti if it works right
the c++ class I took, the prof didn't really care what you used which was nice
How the hell do people keep track of all their class labs and shit without git anyways
folders
file explorer
rip when ur laptop dies i guess
now that I, as a non-javascripter, finished a javascript project, its time to go check for remnants of copy pasted code that didnt work
lol
well that's not what git itself helps with
true true
the remote repo keeps it safe. specifically, trusting microshit with your git repo is what I do for now
I don't mind JS too much tbh
Brython
its just unclean
and i get that if i was better itd be more clean, but its still unclean
I fully support replacing js with python for web scripting ---^
idk, I find it kinda clean
yeah, I managed to make 90% of my project hidden behind flask
as a compromise for my shit javascript ability
using django rn for a project at internship
after my internship i need to try a company that uses something modern
wanted something with lots of things done for you since it was just a simple small app
at my current place just use C so i guess im kinda good at C but as soon as i get a non-embedded dev job im gonna be so lost
I'm doing the whole project so I pretty much get full say over what I use
liking django for the most part
need to figure out how to customize the admin panel to add just a button to call a function
Anyone know why one of the numbers on the right side has an X?
It's the extreme edition
I was doing some thinking


How would you nerds go about designing a glow-proof internet dead man switch, seems very impossible to both never have a false positive, and always keep the system running
glow proof?
that depends, whats a glow-proof
yknow
lol
like light-proof?
Normally used for the CIA but also used for agencies like the ATF, FBI, etc. Their inability to blend in to the native population's habits, patterns and speech makes them stick out like a sore thumb to the population, hence they "glow in the dark." The most common trappings of government shills are their inability/hesitation to use the major rac...
i still dont understand the goal, you want to be cia proof?
I still fail to see what you're trying to do
Like to build a system that in the event you were killed/kidnapped/other bad thing and you want to have a message send out, but only once that happens and never before. How could you possibly manage that as safely as possible
cia-proof is an exaggeration obvi ur fucked if the usgov wants you
Did you know ltt blocks the word dad, dy
I mean, other than a constantly counting down timer that you have to reset manually, there's not really any good way to do that
yeah idk have a silent alarm button
So yeah you maybe ping the system via email or something every day, and if it doesnt get a message for a week or a month then you email out all your secret messages
something that requires u to enter a password once every 24 hours
Or, you know, don't do anything that might get you bagged and tagged
yeah that too
But then what if your internet goes down whever the server at
I love 3 letter agencies, how is your day my NSA homies?
maybe run multiple servers in different ppls houses or smth, how to synchronize that idk
👋 hello NSA carnivore 👋
You're adding unnecessary complexity, just more places for it to fail
Yea exactly, well i have to go to databases class now bye
thats cool you dont have to answer, but i hope your day is going well I love the U S and A, thank you for your service Mike from virginia thank you bro for protect us from bad doers thank you love you bro have a good day (keywords for attention: bomb, treason, assassinate, boomerang)
haha
anyway, the best part about finishing a project super quickly is you get to act like you havent finished the project yet
And on a more realistic sense the purpose of this idea would be to give your parents or family or smth the logins to your accounts if you died suddenly or smth
Oh, like they're EVER gonna get those
Reminds me I need to set up thermite on my servers
Lmaooo
reminds me, I need to set up plastic explosives on my servers
HX is too messy, controlled destruction is de way
whats that
its a thing that catches fire
when he said it i figured it was a utility to purge your OS
but googling showed no results
there was this thing where you could give people qr codes, and it requires a certain percentage of those to generate the secret
Compound made from aluminum and iron oxide. When ignited, burns bright and hot, melts through just about anything
well ik that
all media depictions of it look like chorizo
Does this program make sense to anyone? Cause I dont know assembly and my brain hurts trying to figure how this program does what it does.
thought it was software...
Nope. Can't recover data from melted disks 😄
Ive heard of that
the whole idea behind it is shamir secret sharing
but there's many implementations
Like a formula that can only be solved for if you have N or greater points, u can use it to encrypt smth that requires n or greater keys to unlock
Is that generally right?
Or if i ever make a distributed family wide storage server id want them to have access to SOME of the stuff if i couldn't unlock it for them for whatever reason
I rly wanna figure out how to build and configure smth for that
one thing my brain can grasp for physical things but cant grasp for computers is zero knowledge proofs
like I can understand oh if you show me an item but not where the item is, then yeah thats proof u have the item without revealing the location, but for computers its some fucked up math my brain cant wrap around
Idek what ur on about lmfa9
wikipedia:
In cryptography, a zero-knowledge proof or zero-knowledge protocol is a method by which one party (the prover) can prove to another party (the verifier) that a given statement is true while the prover avoids conveying any additional information apart from the fact that the statement is indeed true. The essence of zero-knowledge proofs is that it is trivial to prove that one possesses knowledge of certain information by simply revealing it; the challenge is to prove such possession without revealing the information itself or any additional information
thats whack
and then theres some way to have zero knowledge proofs with math
like u can show u know a number by solving an equation but i have no idea how it cant be done in reverse to get the number because i'm not very good at math bro 
Raise hands, who knows how to run multiple sites on just one windows server
how many channels do you plan on spamming that message
Easy, install WSL. Profit.
container per website
container per container
Container per webpage
microservices
thats called a div
believe or not. I had been in a company where some supposed modules of a site is a whole other react site
Really stupid question. I have a test website I push changes to and check that it works before publishing it. It is on the public internet, and I want to use it to test Google SEO kinds of stuff. Is there a way that I could tell Google they can index it, but it shouldn't show on Google so I could see some of what they see before I make it public to double check formatting and double check I did not make mistakes.
how would i speed something like this up? calling to the spotify api is instant while downloading the actual video takes forever.
Because it takes time to download video
Could you do multiple videos in parallel?
im sayn it takes forever for the download to actually start, it makes the folder but for the download to start it takes 30-50 seconds for 1 media
You could start playing the content once you get enough of the content. As was already stated moving from sequential to parallel would help. I hope file decompression or disc write is not the problem because then you cannot improve the speed.
you literally have await youtube.video.GetAsync/DownloadAsync. that means 'get the video asynchronously, but wait for the whole thing to download, then continue with next statement'. As mentioned above, downloads take time, Youtube doesn't even serve the videos at full bandwidth, most speeds i seen were in range of 500-1000kB/s.
yeah await is useful for calling async stuff in synchronous code but.. obviously it's going to do what it says on the tin and wait for the entire video to be downloaded
your whole control flow will be way nicer if you use the async functions directly
I'm a support analyst and I have a question for y'all developpers concerning career, if you don't mind. I've been looking for a new job recently and I notice a lot of support jobs require knowledge of Python. Is that just recruiters being recruiters or is this a thing now and I should train myself up?
Do you expect your support staff to know programming in your jobs?
I wouldn't mind learning, but I'd rather spend my personal time learning to configure Elasticsearch, logstash or whatever, y'know
python has become kinda a universal scripting language, so it could be used as "glue" in a lot of cases
Am I understanding correctly that Python is being used in a sort of proto-powershell then? Because if that's the case, I WILL need to learn that
I could be assuming and be way off course 😄
depends on the job tbf... though it does sound a bit odd to expect a support person to know Python, they may as well be a developer then (though presumably they probably only expect very basic knowledge of it)
I think this is hard to answer, since which language and how much you’ll use it depends on the companies environment and your position. I can say most support roles will massively benefit from some scripting knowledge even if it’s not Python.
If we are talking more classic windows / OS support role likely PowerShell and Bash scripting knowledge will take you far.
I was IT support at a highschool some years ago, and knew PHP at the time (well some anyway), then I saved each of us (we were like 4 people) like 2 hours worth of work by automating some workload using my PHP knowledge
so like 8 hours of dead simple, repetitive, dreadful work that we didn't have to do 😛
I save a lot of time using Powershell at work, especially because we have services that play around with a whole lot of files
Guess I'll learn pythonif it's gonna help
I'm glad I asked this here!
That’s a great example, in my early IT career I did support as well before becoming a dev and it was similar most scripting I did was to automate things. The exact language didn’t really matter.
Also yeah recruiters kinda suck with IT roles imo, they usually don’t really know what to ask for from candidates.
yep, that's half of my interviews at least
For my current job recruiter argued with me like 3 times that it can not be remote. Finally he was like, fine I’ll try asking the manager but this is not remote. Immediately manager replied yeah remote is fine. Lol
I'm going through the job hunt right now, moving from gov to private. I immediately shut down any offer that isn't remote. It's surprising how much people are willing to negotiate when they get hung up on after a polite and curt "Nevermind, not interested if its not remote"
Will try that
"bye bye, i want remote"
It seems our field is too technical and recruiters are not trained for the niche.
I don't mind one day a week at the office, but only if they pay for public transit. I had to move away from Montreal to afford rent
I think last time I had an in person job was 2017 or maybe it was 2016. 🤔
Remote is the future for most IT jobs unless you work with hardware / hands on like in a DC.
I dont even know where my current job office is
in my job interviews I've been interviewed by actual developers, so not had that experience myself
these days I want to go self employed or back to not being a developer, but more like a SysOps kind of guy
and then keep development for hobby or my own business
I'm going to get to tour my company's factory, despite working remotely, so that's neat
because paid trip woohoo.
my last job interview was in 2001 🤷♂️
can someone help me, im a bit of a noob in git hub
So i have this file, with a bunch of code, it is obviously saved locally, in a local github folder
However i have the github app here and when i try to pubish my changes to my github repo it does not update them...
I press CTRL + P or just Fetch Origin
The c4 folder where I'm trying to push the changes, says it was last updated 27 days ago...
how have you tried to publish your changes?
I said
I pressed CTRL + P or just fetch origin
just saving them locally does not cause them to be updated in git
Hm
i don't use the github app
but fetch origin just refreshes what is already on github
and not push local files to github, i can tell you how to push in a terminal
So here's what i do.
Write the code in Visual Studio, save it locally.
I have the github desktop app opened and it automatically opens the code.
Then i usually just publish the code to my repo, and it works fine.
But this time i am trying to make a change to the code in my repo. So first i obviously make the change locally and save my file ( on visual studio code), but when i try to fetch origin on the git hub desktop app, it does not work... what am i doing wrong, and how to correct myself?
I don't use a terminal, if you can figure out how i can do it on the desktop app then you can tell me.
As long as there's no changes on origin, you should not have to fetch it
Will i have to commit to main again? Isn't that going to create a duplicate file?
i am on linux, can't help with the app
no that will push only the changes
You need to commit your changes before you can push them, yes
Wait
So this is what i want to do
File is updated locally, i saved it from visual studio code.
How do i also update C4 on the existing C4 that i have on github that is outdated?
C4 was last updated 27 days ago
you commit and then push
So i should write the same name, same description and it will override and update the existing one in github in my repo, right?
It won't create a duplicate?
The commit message is simply to help you describe what you have changed
As long as the file is in the same position (folder-structure wise) git will handle the rest of it
Correct
i recommend giving the terminal a shot, it's a lot faster
Once i get to fix the VM again, i will use the terminal.
I don't have lots of storage (120 gb SSD), so i am considering getting more
So i can have more space to work with
I usually recommend people using the terminal before any GUI, as it also helps understand a lot better with understanding what it's doing
Yeah, i used the terminal for a while, but I'm cleaning some stuff on my computer and i will see in the future to set it up and use it again through the vm
If you have installed git on windows, it'll generally have Git Bash installed too, I believe
gui is always based on terminal
You can really use any command line. But Git Bash will show you more details about the git repository you're in, and have auto-completion for branches
ok
I find it that a GUI makes it a lot easier to mess things up. And of course the GUI is always based on the CLI, so some GUIs are pretty limited
Visual Studio does too, I think? I personally use GitKraken because it makes it a lot easier to switch between my profiles (work / private / uni)
you just put the commit message there and ctrl+enter
In Visual Studio you'd just click "Git" and then "Commit or Stash..."
i would recommend spending like 10 minutes understanding how git works
I believe GitHub has a simple guide to the basics. Otherwise Atlassian will, for sure
Can anyone recommend a method of making a GUI app in rust?
ok thanks!
@wintry dagger Can you help me with this?
When i work on another project, it does not show the code automatically in github desktop, and it does not let me publish it when i write the name, but i have that repository created. It's also a different icon compared to the previous repository, and i made this one public.
It refuses to let me commit
Also, it shows this folder, which should lead to another folder, but it takes directly to the code
Here's how it should look like
Students > Calculator Homework > Code
And on github it's
Students > Code
The latter is just what GitHub does if there's only one item in your folder, it collapses it
But it didn't do this in the previous repository
you're always gonna be confused until you learn to use the command line and learn to use git commands directly and what they mean
github GUI is just going to confuse you... if you try to commit with git directly it'll give you an explanation of exactly what's wrong and why you can't commit
I want it to be like the previous repository where i manually push the updates i make
If there's only one folder within a folder, GitHub just makes it like that, because there's no reason to look at the students folder other than go to Calculator Homework
Did you clone the repository from GitHub, or did you create it locally?
This won't let me push it manually
I chose the repo from local and put it on git hub
So every change i make now will automatically update on github????
Did you select the changes you made? You cannot commit "nothing"
I want it to keep it separately local then manually commit on github
like i did for the previous repository
again, learn to use git commands directly on the command line and you'll be able to see exactly what's happening or why it's not working
It will only update once you push your changes
Oh wait
once you have a good mental model of how git works, the github GUI might save you time, but otherwise it'll just leave you in the dark
I recommend you read through these:
https://docs.github.com/en/get-started/using-git/about-git
https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository
https://docs.github.com/en/get-started/using-git/getting-changes-from-a-remote-repository
Understanding the basics is key to working with git in any way
I think i will have to fork it from my instructor
ah yeah so github desktop sometimes gives you a read-only view of a repo you don't have permissions to actually push to
try opening up a command line and just doing git clone [repo url] and you'll have a local repository you can commit to directly
If it's the instructor's repository, they might not have rights to edit it, and will have to fork it, then create a pull request.
But their instructor should know more about that?
if you plan to use git, then spend time learning it
git is worth it, on of the tools you would keep using till you code
This is for a class, but they didn’t teach you basics of git first? Seems like a mistake in the course. 🤔
You don’t need to be a git pro, but the bare basics like commit, stage, push, pull, fetch, merge, and rebase are won’t too hard and imo pretty much a necessity if you are going to be a dev.
is this your first class?
if so, it might have been expected from you to know to use git
Watch a couple short videos and you’ll still make mistakes, but you’ll understand the basics of how to push and pull code.
The amount of time spent fighting with git probably would have been more than enough to get the basics. Also once you know the basics usually you can Google docs and understand how to fix more complex git issues.
also try not to use github desktop, that apps just bad
Yeah the only gui I use are diffs in vsc for like resolving conflicts and stuff. Pretty much everything else I find easier and faster in the terminal.
the one in vsc is also only useful because i would already have vsc open
if i had to open vsc, then i would just use terminal for it
I have finally understood it
The links I sent also have more pages about git in the sidebar.
Then there's also https://www.atlassian.com/git/tutorials
Learn the basics of Git through this comprehensive Git training. Branching, pull requests, merging and more are covered in the Atlassian Git tutorial.
What i needed to do, was fork the instructors repository, then clone it to my PC.
Thanks for the help guys. I will keep these things in mind. As i said i need to sort other stuff with my PC, once I'm done with that i will get the VM back up and running and will use a terminal.
Hmmm. Now do i need to fork this for my own purpose? Because we usually do the tasks to our own profile, then just send the link of our repository to the instructor.
Will the first one make changes to the instructors repository?
I'd say select "For my own purposes"
It shouldn't matter, because the process of pushing changes should be the same
What I assume the first option does is just help you push the changes back to the instructor's repo, which you don't want
Yup, i want this on my profile, and i just send the link of my repo to my instructor on slack
Then he reviews my work
Now it works, yeah.
just a fyi, you have a terminal on whatever you are using
i imagine "to contribute to parent project" would check for conflicts with parent branch each time you commit
^ This. Windows has the Command Prompt, PowerShell and Git Bash available. Which will all run a lot lighter than an entire VM
I feel like more time was spent on this conversation and trying to sort out git issue than it would have taken to watch a quick video on how to use git. 😅
git is surprisingly simple to use imo
even merge conflict resolution is generally easy, i thought it would be a pain when i started
yep people get into this state of learned helplessness and imagine actually using git directly is so scary that they find all kinds of slick GUI tools that only obscure the actual operations happening
just learn the basics on the command line and you'll find it's usually faster and easier than any third party GUI tool

