#development

1 messages · Page 87 of 1

hollow basalt
#

no

livid bison
#

Swift would be the perfect language if it didn't have to coexist with its satanic older brother that is ObjC

spring pond
#

honestly it doesn't really have to, you can use it just fine while ignoring all of the objc

livid bison
spring pond
#

im sorry to hear that lmao

#

i really only work with swiftui so i guess the experiences differ widely

cloud knot
spring pond
#

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

wispy compass
#

is this where I go when I need JS support?

#

just days before the deadline?

hollow basalt
slate frigate
#

JS is of the devil

silk eagle
#

this is the complaining channel, please format your problems in the form of a complaint.

alpine girder
wind horizon
#

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.
midnight wind
#

fr

viral olive
#

Shit talking is a lot easier than helping

silk eagle
#

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 rollsafe

next cipher
#

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 😆

peak acorn
#

rust bad

next cipher
#

uh oh here we go

silk eagle
peak acorn
#

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

silk eagle
peak acorn
#

Couldn't possibly go wrong

peak acorn
#

we do make interpreters in a class im taking next year

hollow basalt
#

ok?

peak acorn
#

So i can make it in there

peak acorn
#

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

peak acorn
#

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?

rancid nimbus
#

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.

rancid nimbus
peak acorn
#

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

rancid nimbus
#

This first post in a series on CUDA C and C++ covers the basic concepts of parallel programming on the CUDA platform with C/C++.

GitHub

OpenCL kernels for ucb-bar hardware. Contribute to ucb-bar/opencl-kernels development by creating an account on GitHub.

fickle veldt
#

Game about tax evasion

hollow basalt
#

so big companies simulator

cloud knot
peak acorn
#

huh wtf lol

hollow basalt
grizzled steeple
#

I mean...

hollow basalt
#

digusting

grizzled steeple
#

You can do a lot of cursed things with C++ Using and define...

hollow basalt
#

that's no longer programming, that's hieroglyphics

karmic estuary
#

its cool

grizzled steeple
peak acorn
#

Getting there, no idea how pdn gets it curvy

supple hull
#

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?

next cipher
#

no that just sounds like he's an idiot

wind horizon
#

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.

slate frigate
#

@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

storm fjord
#

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?

storm fjord
cloud knot
viral olive
#

Hello developers I have a question do you guys use 2 monitors or do you use a widescreen ?

storm fjord
storm fjord
viral olive
#

Welp I think im going to get 2 1440p screens

storm fjord
#

Am living temporarily with my mum looking for a new apartment so I dont have my ultrawide setup cause little room

viral olive
#

might be better but I still have no idea how I will make it work with the mac

storm fjord
#

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

viral olive
#

yeah I always use one vertical and one horizontal

#

makes coding easier buy I wanted to explore my options

storm fjord
#

Mhm, when I have mu full setup I also go for a vertical monitor, looks better when coding and scrolling spotify :p

stable bough
#

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

nocturne galleon
hollow basalt
nocturne galleon
#

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

cloud knot
nocturne galleon
#

maybe i'm just misunderstanding where the file is supposed to go, it's <internal or external storage>/Android/data/mypackage/files/, right?

hollow basalt
#

normally, you wouldn't care where the physical file is, because as long as the context files dir returns something that's fine

nocturne galleon
#

i want somewhere that the user can access, that's my only hard requirement but it being consistent would be nice too

hollow basalt
#

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

cloud knot
nocturne galleon
#

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

cloud knot
nocturne galleon
#

it just overwrites it when asked to

hollow basalt
cloud knot
#

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

nocturne galleon
#

it's in /data/data

hollow basalt
#

screenshot assistant sounds like should be using MediaStorage API

nocturne galleon
#

feels kinda weird to store stuff that isn't media on something called MediaStorage but i guess i'll do that

hollow basalt
#

but it's screenshot right

nocturne galleon
#

no

hollow basalt
#

just a text?

nocturne galleon
#

it's the deletion link for a remote screenshot, so yes

hollow basalt
#

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?

cloud knot
#

in any case, we answered @nocturne galleon 's primary question, so at least that's a win for today 😛

#

(and an actual answer)

nocturne galleon
# hollow basalt uhm, why, yea not mediastorage

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:

  1. upload image
  2. parse link from response and copy it to the clipboard
  3. parse deletion link from response and save it to a file
hollow basalt
#

what android version are you targeting now?

nocturne galleon
#

24

#

actually nvm

#

just realized i forgot to change it in the build.gradle

cloud knot
nocturne galleon
#

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 😅

cloud knot
#

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

nocturne galleon
#

in that case i'll keep it at 29

hollow basalt
#

bump up your minimum SDK and target [or higher] to your phone current's version

cloud knot
#

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

hollow basalt
cloud knot
hollow basalt
#

scratch that, dev in general is fun when breaking changes

nocturne galleon
#

i find mobile development a big pain tbh, worse than general GUI development

cloud knot
#

this was february, then march, then april, then july, now they added a note about may

nocturne galleon
#

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

nocturne galleon
hollow basalt
cloud knot
hollow basalt
#

typical programatic UI designer vs file-based ui design

cloud knot
cloud knot
hollow basalt
cloud knot
#

you literally have the connection between UI and code in those XML files

nocturne galleon
hollow basalt
hollow basalt
nocturne galleon
#

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

cloud knot
nocturne galleon
cloud knot
nocturne galleon
nocturne galleon
cloud knot
nocturne galleon
#

i never said that, explain where you think i did

cloud knot
#

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

nocturne galleon
#

no

hollow basalt
hollow basalt
cloud knot
#

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

hollow basalt
#

oh yea, we haven't asked for what permission in your manifest

cloud knot
nocturne galleon
#

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

nocturne galleon
#

Yes

hollow basalt
# nocturne galleon 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

cloud knot
nocturne galleon
#

there it goes

midnight wind
#

Anyone used edgedb, it seems pretty nice

hollow basalt
nocturne galleon
#

It did work

hollow basalt
#

aight, sounds good

peak acorn
#

Why are variable length arrays discouraged in C

hollow basalt
#

because you don't C the length at compile time

peak acorn
#

In this instance im creating the array based on a parameter size

#

i dont get how it could rly be unsafe

#

and yes haha

karmic estuary
#

ok

peak acorn
#

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

hollow basalt
#

remember C is still "trust the programmer" . if you think it's good, then it's good

cloud knot
true path
#

Is anyone well versed in JavaScript?

nocturne galleon
#

just ask whatever question you have

somber dome
#

Any free and good ressources for the cka certification ?

hollow basalt
silk eagle
#

javascript is an easter egg hunt but the eggs hunt you

trail summit
#

"I'm looking for this ... oh you mean this no I mean this idk where this went"

nocturne tree
#

"this" is dumb

peak acorn
#

Is making a queue thread safe as simple as throwing mutex locks around every function

hollow basalt
peak acorn
#

C

#

making stuff myself for-fun

hollow basalt
#

yea pretty much locks are the optimal (?) way

peak acorn
#

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

alpine girder
alpine girder
hollow basalt
somber dome
#

Any good ressources to prepare for the cka ?

sturdy ingot
gentle falcon
#

(C, preferably standard libraries)

how can I search for a string in a file, and then seek to a known location near it?

hollow basalt
#
  1. open the file
  2. search for the string
  3. get location of cursor
  4. seek
  5. profit
sturdy ingot
#

And faster variants depend on the standard library and syscalls you have at hand (mmap+memmem is astonishingly fast)

peak acorn
#

How the hell do you use only atomic operations to implement a queue

next cipher
#

only atomic operations? that doesn't really make sense

#

unless you mean only atomic operations, no locking

peak acorn
#

presumably any queue operation has to be a single atomic operation if its not locked?

next cipher
#

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

peak acorn
#

Sure sure but how do you even do that

next cipher
#

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

peak acorn
#

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

next cipher
#

right

#

i mean every cpu pretty much has to have some kind of atomic instruction

#

because that's how locks are implemented

peak acorn
#

true i guess lmao

next cipher
#

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

peak acorn
#

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

slate frigate
#

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

peak acorn
#

never tried it

slate frigate
#

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

peak acorn
#

interesting

slate frigate
#

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)
}```
peak acorn
#

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

slate frigate
#

If it can't be done with bubble sorting, I don't wanna

peak acorn
#

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 💀

slate frigate
#

"Is the answer more efficiency? No, of course not. Just add power"

peak acorn
#

buys a 64c cpu for more faster images

slate frigate
#

PATCH NOTES:

Feature Add
During high load, added the ability to automatically overclock the cpu for faster processing
peak acorn
#

haha

#

the brute force thing is 'embarassingly parallel' so i mean

#

doubling core count do be doubly faster

slate frigate
#

I went threadripper. I can never go back.

peak acorn
#

Would be neat to have

slate frigate
#

The biggest downside is that it locks you into an expensive hardware ecosystem,

peak acorn
#

tru

slate frigate
#

What are you doing with the images?

peak acorn
#

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

slate frigate
#

ewww, gui/rendering scary.

peak acorn
#

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

slate frigate
#

I know that pain

nocturne galleon
#

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

slate frigate
#

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

nocturne galleon
#

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

slate frigate
#

I blame java

hollow basalt
#

I blame

sturdy ingot
# peak acorn Sure sure but how do you even do that

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.

nocturne galleon
#

actions still has the issue though 😔

nocturne galleon
#

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

wind horizon
#

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)

nocturne galleon
#

well time to learn docker i guess

wind horizon
#

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.

zenith plank
#

need laravel project help?

slate frigate
#

I know a little php BS-ery. Whats up?@zenith plank

zenith plank
#

@slate frigate Fine. Can you help with laravel setups

slate frigate
#

Like... installing it?

zenith plank
#

um its setup for qr code generator

slate frigate
#

Link to plugin?

zenith plank
#

i need to create a qr code generator using form data

#

dont know how to pass the data

slate frigate
#

I would just dump it into a variable, then pass it to the qr blade

zenith plank
#

So when the qr code gets scanned does it display the form data?

hollow basalt
#

the what

slate frigate
#

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

nocturne galleon
#

i don't get it

wind horizon
nocturne galleon
#

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

wind horizon
#

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.

slate frigate
#

@wind horizon reminding me of good ol' powershell base64

rancid nimbus
wind horizon
#

That's what they did, it's in a GitHub secret in what they shared.

feral garden
#

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!

next cipher
#

base64 is not encryption in any way shape or form

#

please PLEASE don't store your secrets in base64 and put them somewhere public

grizzled steeple
#

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)

slate frigate
#

@grizzled steeple
original string can't be extracted from the Hash

hold mah cuda cores, we collision hunting.

grizzled steeple
#

With MD-5, yes. But I'm not aware of any known collisions with SHA2 and SHA3...

slate frigate
#

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.

wind horizon
wind horizon
# nocturne galleon Java keystore

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

next cipher
#

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

silk eagle
#

nonono guys it is encryption its like caesar cypher

#

before computers, base64 would be insaaaaaane man

peak acorn
#

You guys don't simulate an enigma machine your for ssh keys???

silk eagle
#

lava lamps

peak acorn
#

yeah

#

snapshat me a pic of ur lava lamp, if it checks out then we good u can log in

hollow basalt
#

vibe check turned lava lamp check

brave ingot
#

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. PES_Happy

nocturne galleon
#

guys stupid question

#

why does my VS code decides to change color for no reason?

peak acorn
#

Its dead code

#

while true means the stuff on the bottom will never run and vsc changes the color

nocturne galleon
#

OH

#

makes sense @peak acorn

#

thanks

peak acorn
#

np

stable bough
candid yew
#

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

slate frigate
#

Just had to root around in someone else's c# program and fix it. I hate it.

peak acorn
#

c# aint bad

#

just a superior java

slate frigate
#

go, or python. If it wasn't them just losing track of some logic, I would have just written it in something else

peak acorn
#

idk anything about go but i very dislike python for anything bigger than one file

slate frigate
#

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.

peak acorn
#

i mean yeah you shouldnt write it in a rarely used langauge but there are so many to choose

slate frigate
#

I'm the only hardcore dev in my shop 😉
This project needs to outlast me

peak acorn
#

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?)

slate frigate
#

Yeah, you can limit them

peak acorn
#

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

midnight wind
#

speaking of python what's a good python framework that does the hard work for you for some simple app, but requires authenticatioon

#

django?

slate frigate
#

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

peak acorn
#

in what fashion do you set up the backend auth

#

like implementing 'login with XXXX megacorp' or

midnight wind
#

that's oauth, saml

#

SSO

peak acorn
#

Seems like the smartest choice

midnight wind
#

yeah, that's what I wanted to do, but no

peak acorn
#

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

slate frigate
#

I like going the way of api tokens. Easy for me to burn, not my problem if you lose.

midnight wind
#

the thing I'm making is literally to just let vendors see a pricelist from quickbooks basically

midnight wind
slate frigate
#

No. "Heres your token, don't lose it"

midnight wind
#

oh

slate frigate
#

Granted, I don't need anything super hardened for what I do, mainly to keep track of queries

midnight wind
#

not a user thing, just an API

slate frigate
#

Well key matches to user

peak acorn
#

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

peak acorn
#

Time to very securely give anyone who uses my program my sql username and password!!!

slate frigate
#

god I hate sql. Mongo is dah wey

peak acorn
#

sql aint the issue

peak acorn
#

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

slate frigate
#

Not even using environs?

peak acorn
#

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

hollow basalt
midnight wind
peak acorn
#

Yaaay some bots on the internet get to scoop up 30+ cloud based sql logins from our class

midnight wind
#

that they don't need quickbook logins

hollow basalt
midnight wind
peak acorn
# slate frigate Not even using environs?

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

midnight wind
#

environment variables..

hollow basalt
peak acorn
#

turns out, state universities arent very good at actually teaching you things

peak acorn
#

probably

midnight wind
#

outdated stuff

slate frigate
#

Don't have a cert or degree to my name, and proud of it.

hollow basalt
#

I don't have any cert, and I want atleast one just to try it ou

peak acorn
midnight wind
#

I'm going for a degree, but not one in the IT world

peak acorn
#

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

midnight wind
#

I'm surprised how many kids in my grade are going for CS

hollow basalt
#

I mean you could do that on a bootcamp over summer

peak acorn
#

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?

hollow basalt
#

exactly, that's not the "only good thing",
since you could do that on your own

peak acorn
#

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

slate frigate
#

I would say the structured learning is good for the more advanced topics, anything where the math starts getting crazy. Or hardcore data arch

peak acorn
#

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

peak acorn
#

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

hollow basalt
#

this sounds like, fixing the solution instead of the problem

peak acorn
#

Its a very simplistic system for a class assignment

hollow basalt
#

why would you want to know this happens

peak acorn
#

^^

hollow basalt
peak acorn
#

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

hollow basalt
#

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

peak acorn
#

🤷 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

hollow basalt
#

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

peak acorn
#

Right they do have transaction_id shared between them

hollow basalt
#

yea check if exists

peak acorn
#

its auto incremented though, idk how i could get the id of my inserted row

hollow basalt
#

i thought your inserted row also have that transcation id?

peak acorn
#

The row has a transaction ID but the insert doesnt supply it since that is auto incremented

hollow basalt
peak acorn
#

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

peak acorn
#

Didnt even know what to search for to find

#

eventually came up on SO, go figure

hollow basalt
#

everything leads to SO

dense nexus
cinder ginkgo
wind horizon
#

If want to clean up that code I'd highly suggest a look at async/await.

midnight wind
#

async/await is great

#

same with try, catch

wind horizon
#

Yeah async/await and try catch work together great.

carmine robin
#

Does anyone have a good resource for me to start learning C# with?

silk eagle
#

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

hot hearth
# carmine robin Does anyone have a good resource for me to start learning C# with?

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:

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) .

dreamy chasm
#

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?

dreamy chasm
hollow basalt
#

?

rotund zinc
#

Weird question but does anyone know what stack Floatplane uses?

wind horizon
rotund zinc
#

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

wind horizon
#

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.

rotund zinc
#

But even though a lot of sites nowadays still use PHP, is it worth the hate? Personally it's really easy.

rotund zinc
wind horizon
#

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.

rotund zinc
#

Is there a performance increase/decrease with k8s?

wind horizon
#

Start with docker, then after you have the basics of containers if you want you move onto k8s since it’s built around containers.

rotund zinc
#

Will do o7

wind horizon
rotund zinc
#

I just found a tutorial on Laracasts so it perfectly goes with Laravel

rotund zinc
wind horizon
#

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.

midnight wind
#

it's a container orchestrator, and it can do all sorts of advanced stuff

#

it can handle load balancing

#

ingress

rotund zinc
#

But do I need it if I am running off of a single AWS EC2 instance?

midnight wind
#

not really

#

it's meant for big deployments

#

kinda useless on a single machine

rotund zinc
#

either way im watching some vids on it just to learn

midnight wind
#

unless you are developing a software that will be deployed on kubernetes

#

then things like minikube help

#

this one is always funny

sturdy ingot
midnight wind
#

containers, the solution to "works on my machine"

wind horizon
#

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.

wind horizon
#

Yaml editor

midnight wind
sturdy ingot
wind horizon
#

Yes haha silly cell phone keyboard

midnight wind
#

yaml kinda annoys me

wind horizon
sturdy ingot
#

Ah, like jq for JSON?

#

That's of course a different use case, will keep that in mind.

wind horizon
# midnight wind yaml kinda annoys me

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

sturdy ingot
#

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
wind horizon
# rotund zinc Yep I am \:D

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.

wind horizon
#

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

sturdy ingot
#

We use JSON for that, together with a VSCode configuration that automatically checks for any duplicate keys or mismatching entries. Lot less error prone.

wind horizon
#

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. 😂

sturdy ingot
#

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.

wind horizon
#

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.

ruby aurora
#

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

timber basin
#

is there any javascript chads here?

cloud knot
wind horizon
timber basin
#

Is anyone familiar with handlebars templating?

hollow basalt
#

no

timber basin
hollow basalt
timber basin
#

Im asking for help not for you to answer that question

hollow basalt
#

no you didn't

timber basin
#

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

lament bridge
#

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

slate frigate
#

@lament bridge Python?

lament bridge
#

Yes

slate frigate
#

Are you dumping data in CSV style, or are you having to do weirdness to it?

lament bridge
#

Well yes, more weirdness.

Because we want to add rows on Google Drive sheet rather than overwriting its data.

slate frigate
#

Never got too funky with it, but it worked well enough

lament bridge
#

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.

slate frigate
#

You should

SQL query ---> Data Struct          DOC <--- API pull from Drive
               |                    |                    ^
               |--> Check XLSX   <--|                    |
                       If New ------------- Update Doc --|

lament bridge
#

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?

slate frigate
#

I'd assume so. Long time since I've used any sql stuff. Mongo ftw

midnight wind
#

There's this database, edgedb that I've dabbled with

#

Easier than sql imo

#

Schemas are created in the database

slate frigate
#

Only thing I don't like about edgedb is that it's python. Would probably start dragging with some of my bigger datasets

lament bridge
#

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.

slate frigate
#

But otherwise, looks GREAT for built-in document DB

#

Cuz orchestrating outside services gets to be a headache

nocturne galleon
#

And the official java driver feels way better than SQL queries, idk how a SQL based database with an ORM would work though

midnight wind
slate frigate
#

The question is at scale, considering python and how it uses memory

#

Talking DB's that are hundreds of gigs+

midnight wind
#

true

rotund zinc
#

Alright, discuss this:

hollow basalt
#

no

midnight wind
#

it's a markup language, end of discussion

rotund zinc
#

Well I'm off to blow my brains out

midnight wind
#

html does no logic

#

it's also literally in the name

#

Hypertext Markup Language

silk eagle
#

html doesnt program a browser a browser programs html

#

evilrondo it makes sense if you think hard enough

grave sparrow
#

Who’s an experienced programmer here who I can ask for help with a project

silk eagle
#

depends what the project is/what you need help with, most people here are experienced in their own areas

grave sparrow
#

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

grave sparrow
#

Alright then

slate frigate
#

@grave sparrow he's just saying go ahead and just put what you need out there. No need to use more cycles than needed :)

grave sparrow
peak acorn
#

my mind is boggled you seemingly can't buy split flap display boards anywhere on the internet for cheap

midnight wind
#

a very simple way would be just to have have an int, and += to it everytime a question is correct

grave sparrow
#

ohhh okay I see

#

Yep that seems to work! Thank you I'll come back if I need some more help

midnight wind
peak acorn
#

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

grave sparrow
nocturne tree
peak acorn
#

On a high/abstract level, how would you read parallel data on an attiny85, is it possible?

peak acorn
#

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

languid otter
#

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 🙂

peak acorn
#

Well, whats the game

hollow basalt
peak acorn
#

💀

misty thorn
#

Anyone have sandboxing advice for an open world RPG? I can't give out many details, aside from maybe the setting.

hollow basalt
#

no

peak acorn
#

That sounds like you've gathered a handful of cursed runes already

lament bridge
#

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.

slate frigate
lament bridge
#

I was not using any API, just straight an excel question, but sorted out with VLOOKUP 😄

#

Thanks a lot though!

nocturne galleon
#

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

hollow basalt
#

is there a more secure method of giving programs access to a database for production use
yes

nocturne galleon
nocturne galleon
#

like the ones I set in my bash terminal?

slate frigate
#

@nocturne galleon Example from one of my projects (python, not rust, but concept still applies)

hollow basalt
#

also not just mysql

slate frigate
#
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
nocturne galleon
#

aah awesome, thanks for the help

midnight wind
#

or are those technically not standard

hollow basalt
cursive imp
#

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

hollow basalt
#

ok

silk eagle
#

whatever project you want, you say? hmmm

#

rip school network

nocturne tree
silk eagle
#

average school computer class is learning VB

peak acorn
#

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

ivory plinth
#

These are the errors, the code is in Java.

silk eagle
#

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

peak acorn
#

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

ivory plinth
peak acorn
#

I need to walk home rq

ivory plinth
silk eagle
#

i prefer variable names instead of variable letters

peak acorn
#

Bag<s> doesnt make sense because <s> is used to make a new class that uses a certain type

ivory plinth
peak acorn
#

Gimme a sec to get on my pc

ivory plinth
#

Ok

peak acorn
#

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

ivory plinth
#

Ok, point me in the right direction

peak acorn
#

I dont remember the algorithm very well, what is DijkstraSP supposed to do?

ivory plinth
#

The program is to create functioning graph with a sorting algorithm

peak acorn
#

Sorting or search?

ivory plinth
#

I just know the goal is to find the data requested

peak acorn
#

A graph doesn't make a whole lot of sense in that case

ivory plinth
peak acorn
#

So you make a graph thats fine, it should store a specific type of data on each vertex i assume?

ivory plinth
#

Yep

peak acorn
#

And it has edges, and you're support to sort it?

#

Besides topological sort that doesnt make sense to me

ivory plinth
peak acorn
#

Its not a java problem its just unclear what you actually need to make

ivory plinth
peak acorn
#

sure

queen zenith
#

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?

slate frigate
#

Just jmp to another function at the end of each loop, where you print the string, then jmp back

#

@queen zenith

queen zenith
slate frigate
#

Looks like it. Not much of an assembly guy, so I won't say for sure

peak acorn
#

Whats the purpose in writing actual assembly

#

besides hacking a binary executable maybe

queen zenith
peak acorn
#

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

slate frigate
#

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

peak acorn
#

obviously university education has to teach you mostly useless stuff

queen zenith
#

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

peak acorn
#

in my class it was half mips asm and half C for the class that covered it

slate frigate
#

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

peak acorn
#

lol

#

ok that is kinda a sad final project

#

Also has anyone mentioned 10s slow mode is obnoxious and bad

queen zenith
#

my programming experience is with python and c++ this is way out of my league

slate frigate
#

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

peak acorn
#

Which asm are you doing?

queen zenith
#

cause the professor spent 15 years working at ups and assembly is all he knows...

peak acorn
#

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

slate frigate
#

Or focus on functional languages that are more broadly applicable? smh

peak acorn
#

lmfao

slate frigate
#

Get some golang up in there 😄

peak acorn
#

In the past 5 years or so our class switched "programming languages" to basically "functional programming the class" but kept the name

midnight wind
#

c++ class, talked all about UPS

#

all ancient stuff

peak acorn
#

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

slate frigate
#

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?

peak acorn
#

he says ML is his favorite language, i'd love to see you calculate the first 1 million primes in fucking ML!!

slate frigate
#

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

peak acorn
#

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

slate frigate
#

And this is why I actively avoid getting any degrees or certificates.

midnight wind
peak acorn
#

Luckily i had one friend throughout those classes who knew how to at least use git and we did all partner projects thru it

midnight wind
#

honestly github codespaces is pretty convenient

slate frigate
#

Theia is also nice

silk eagle
#

ok guys, javascript isn't spaghetti if it works right

midnight wind
peak acorn
#

How the hell do people keep track of all their class labs and shit without git anyways

silk eagle
#

file explorer

peak acorn
#

rip when ur laptop dies i guess

silk eagle
#

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

peak acorn
#

lol

midnight wind
peak acorn
#

true true

#

the remote repo keeps it safe. specifically, trusting microshit with your git repo is what I do for now

midnight wind
slate frigate
silk eagle
#

its just unclean

#

and i get that if i was better itd be more clean, but its still unclean

slate frigate
#

I fully support replacing js with python for web scripting ---^

midnight wind
silk eagle
#

as a compromise for my shit javascript ability

midnight wind
#

using django rn for a project at internship

peak acorn
#

after my internship i need to try a company that uses something modern

midnight wind
#

wanted something with lots of things done for you since it was just a simple small app

peak acorn
#

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

midnight wind
#

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

queen zenith
#

Anyone know why one of the numbers on the right side has an X?

silk eagle
peak acorn
#

I was doing some thinking

queen zenith
queen zenith
peak acorn
#

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

slate frigate
#

glow proof?

silk eagle
#

that depends, whats a glow-proof

peak acorn
#

yknow

queen zenith
#

lol

silk eagle
#

like light-proof?

peak acorn
#
silk eagle
#

i still dont understand the goal, you want to be cia proof?

slate frigate
#

I still fail to see what you're trying to do

peak acorn
#

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

slate frigate
#

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

silk eagle
#

yeah idk have a silent alarm button

peak acorn
#

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

silk eagle
#

something that requires u to enter a password once every 24 hours

slate frigate
#

Or, you know, don't do anything that might get you bagged and tagged

silk eagle
#

yeah that too

peak acorn
#

But then what if your internet goes down whever the server at

silk eagle
#

I love 3 letter agencies, how is your day my NSA homies?

peak acorn
#

maybe run multiple servers in different ppls houses or smth, how to synchronize that idk

#

👋 hello NSA carnivore 👋

slate frigate
#

You're adding unnecessary complexity, just more places for it to fail

peak acorn
#

Yea exactly, well i have to go to databases class now bye

silk eagle
# silk eagle I love 3 letter agencies, how is your day my NSA homies?

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)

peak acorn
#

haha

silk eagle
#

anyway, the best part about finishing a project super quickly is you get to act like you havent finished the project yet

peak acorn
#

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

slate frigate
#

Oh, like they're EVER gonna get those

#

Reminds me I need to set up thermite on my servers

peak acorn
#

Lmaooo

silk eagle
#

reminds me, I need to set up plastic explosives on my servers

slate frigate
#

HX is too messy, controlled destruction is de way

midnight wind
silk eagle
#

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

midnight wind
slate frigate
#

Compound made from aluminum and iron oxide. When ignited, burns bright and hot, melts through just about anything

silk eagle
#

all media depictions of it look like chorizo

queen zenith
#

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.

midnight wind
slate frigate
#

Nope. Can't recover data from melted disks 😄

midnight wind
#

but there's many implementations

peak acorn
#

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?

midnight wind
peak acorn
#

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

silk eagle
#

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

peak acorn
#

Idek what ur on about lmfa9

silk eagle
#

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

peak acorn
#

thats whack

silk eagle
#

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 sadge

uneven orbit
#

Raise hands, who knows how to run multiple sites on just one windows server

hollow basalt
silk eagle
#

I know how 🙌

#

I won't tell you though

slate frigate
#

Easy, install WSL. Profit.

midnight wind
silk eagle
#

container per container

slate frigate
#

Container per webpage

midnight wind
silk eagle
#

thats called a div

hollow basalt
rancid nimbus
#

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.

idle aurora
#

how would i speed something like this up? calling to the spotify api is instant while downloading the actual video takes forever.

midnight wind
#

Could you do multiple videos in parallel?

idle aurora
midnight wind
#

Could it be downloading then writing to disk?

#

Idk

rancid nimbus
#

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.

cloud knot
next cipher
#

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

cedar eagle
#

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

midnight wind
cedar eagle
#

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 😄

sly marten
wind horizon
#

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.

sly marten
#

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 😛

cedar eagle
#

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!

wind horizon
#

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.

cedar eagle
wind horizon
#

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

slate frigate
#

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"

hollow basalt
#

"bye bye, i want remote"

hollow basalt
cedar eagle
#

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

wind horizon
#

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.

hollow basalt
#

I dont even know where my current job office is

sly marten
#

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

jagged kayak
#

I'm going to get to tour my company's factory, despite working remotely, so that's neat

#

because paid trip woohoo.

cloud knot
sly marten
#

damn, that's been a minute then 😛

#

my last one was in 2019

flint mist
#

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...

hexed thorn
flint mist
#

I pressed CTRL + P or just fetch origin

hexed thorn
#

just saving them locally does not cause them to be updated in git

flint mist
#

Hm

hexed thorn
#

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

flint mist
#

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?

flint mist
wintry dagger
#

As long as there's no changes on origin, you should not have to fetch it

flint mist
#

Will i have to commit to main again? Isn't that going to create a duplicate file?

hexed thorn
#

i am on linux, can't help with the app

hexed thorn
wintry dagger
#

You need to commit your changes before you can push them, yes

flint mist
#

Wait

flint mist
#

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

hexed thorn
#

you commit and then push

flint mist
#

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?

wintry dagger
#

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

flint mist
#

So i just write summary as c4 and commit to main?

#

Now push origin?

wintry dagger
#

Correct

flint mist
#

It worked, thanks.

hexed thorn
#

i recommend giving the terminal a shot, it's a lot faster

flint mist
#

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

wintry dagger
#

I usually recommend people using the terminal before any GUI, as it also helps understand a lot better with understanding what it's doing

flint mist
#

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

wintry dagger
#

If you have installed git on windows, it'll generally have Git Bash installed too, I believe

hexed thorn
#

gui is always based on terminal

flint mist
#

There is also a terminal on visual studio code

#

so i can also use that

wintry dagger
#

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

flint mist
#

ok

wintry dagger
hexed thorn
#

vsc has really good git integration

#

it's much better than the github app

wintry dagger
#

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)

hexed thorn
#

you just put the commit message there and ctrl+enter

wintry dagger
#

In Visual Studio you'd just click "Git" and then "Commit or Stash..."

hexed thorn
# flint mist ok

i would recommend spending like 10 minutes understanding how git works

wintry dagger
#

I believe GitHub has a simple guide to the basics. Otherwise Atlassian will, for sure

queen spade
#

Can anyone recommend a method of making a GUI app in rust?

hexed thorn
#

depends

queen spade
#

ok thanks!

flint mist
#

@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

wintry dagger
#

The latter is just what GitHub does if there's only one item in your folder, it collapses it

flint mist
#

But it didn't do this in the previous repository

next cipher
#

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

flint mist
#

I want it to be like the previous repository where i manually push the updates i make

wintry dagger
#

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?

flint mist
#

This won't let me push it manually

flint mist
#

So every change i make now will automatically update on github????

wintry dagger
#

Did you select the changes you made? You cannot commit "nothing"

flint mist
#

I want it to keep it separately local then manually commit on github

#

like i did for the previous repository

next cipher
#

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

wintry dagger
#

It will only update once you push your changes

flint mist
#

Oh wait

next cipher
#

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

flint mist
#

I think i will have to fork it from my instructor

next cipher
#

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

wintry dagger
#

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?

hexed thorn
#

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

wind horizon
#

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.

hexed thorn
#

is this your first class?

#

if so, it might have been expected from you to know to use git

wind horizon
#

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.

hexed thorn
#

also try not to use github desktop, that apps just bad

wind horizon
#

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.

hexed thorn
#

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

flint mist
#

I have finally understood it

wintry dagger
flint mist
#

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?

wintry dagger
#

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

flint mist
#

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.

hexed thorn
#

i imagine "to contribute to parent project" would check for conflicts with parent branch each time you commit

wintry dagger
wind horizon
#

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. 😅

nocturne galleon
#

git is surprisingly simple to use imo

#

even merge conflict resolution is generally easy, i thought it would be a pain when i started

next cipher
#

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

sly marten
#

I usually use the GUI stuff in IntelliJ and Rider, but I often find my self be like "ugh, why do I bother" and just use the terminal instead

#

sometimes GUI is confusing and it's often quicker to just use terminal

#

worst shit I've had to deal with was TFS