#development

1 messages · Page 88 of 1

peak acorn
#

I still dont rly remember how to handle merge conflicts

#

But i started just using WSL for all my gut stuff because command line git on windows is annoying and it's quite nice honestly

outer rose
#

Is it stupid/unsafe to put nginx configs in a public github repo? As far as I can tell, the nginx conf has no secrets, or even ip addresses, in it

slate frigate
#

@outer rose ehhhh... It can give people ideas where to start when it come to fuzzing and bruting, but overall no. I personally do not.

nocturne galleon
#

I have rebased in the wrong order with intellij more than I'd like

#

At least 3 times

outer rose
wintry dagger
#

I personally just think it best practice to not put server configs in a repo regardless of whether it's public/private, and regardless of the type of server.
What I might do is add a template, that would make it easier for other people to set up their own config when cloning a repo.

outer rose
#

thankyou both

deft sigil
#

does python have a quick and easy way of converting value+si-order strings to floats , what i mean is like if the input is 2M to convert it to 2000000 or 1p as input converting it to 0.000000000001 or as a power of 10 (1e-12), i kind of hope there is as i dont want to use a dict and possibly missing some that arent used where i live but are in some other places, deci (small letter d) for example , also would be nice if there was a module for calculating with it witout having to worry about floatingpoint errors in really small vallues ... (and as an aside i know you can use the f'{val:sep}' notation in order to separate the thousands (f'{1000000:_}' -> 1_000_000 but how do i get it to continiue after the decial point?

#

you can use bash in windows , it gets installed allong with git , if you use a 3rd party terminal prog like tabby, you can set it to opan a bashtab by default, (if you also install chocolatey , there is even a 'sudo' windows version to 'run as admin' from command line (or at its github page: https://github.com/janhebnes/chocolatey-packages/tree/master/Sudo)

wintry dagger
# deft sigil does python have a quick and easy way of converting value+si-order strings to fl...

I reckon a simple match/case would work fine here (3.10+) (granted I don't know the performance impact of a match/case over different solutions, in Python)

match symbol:
    case "E":
        return value * (10 ** 18)
    case "P":
        return value * (10 ** 15)

Or just return the 18 and 15 and do the multiplication outside of it, to prevent duplicate code.

As for the separating thousands. I am not sure what you mean with "after the decimal point." Do you meant you'd want "1000000.0000001" to show up as "1_000_000.000_000_000_1"? You could do that manually, but I don't think I've ever seen anyone do that before, I think it'd just confuse the user

rancid steppe
mental pagoda
#

how to embed in html

#

😐

#

nothing helpful comes up

#

"how to embed a scratch project in html 💀 noting comes up

#

scratch

#

thas what i have so far, the one there is from the example teacher gave

#

ok

deft sigil
# wintry dagger I reckon a simple match/case would work fine here (3.10+) (granted I don't know ...

no what i was looking for was something like this : https://si-prefix.readthedocs.io/en/latest/ but i kinda hoped it would have been availeble in stantdard lib... , and using f'{BIGNR:}' auto groups by 3 so if BIGNR=1000 it would result in 1 000 using that syntax , unfortunatly it stops grouping by 3 after the decial point print(f'{1000000:,.9f}') 1,000,000.000000000 it resulting in 1,000,000.000,000,000 ould have been nice

next flame
#

Hi, I'm trying to read some API response in JSON but I can't seem to figure out what's wrong.

    render(){
        const {list} = this.state; 
        return(
            <View>
                {list.map((dataEntries, index) => {
                  return <View> <Text> {index} {dataEntries.created} </Text> </View>
                })}
            </View>
        );

I'm getting TypeError: undefined is not an object (evaluating 'list.map') in react native. I was following a tutorial and the guy also read from a map in the same manner. Here's the JSON file in question: https://musicbrainz.org/ws/2/artist/?query=coldplay&fmt=json

#

Any tips are appreciated.

wind horizon
#

Sounds like your list is undefined. Try inspecting it with debugger or printing to console/standard out.

next flame
#
    constructor() {
        super();
        this.state = { fetchedData: []}
    }
    componentDidMount() {
        const baseUrl = "https://musicbrainz.org";
        const endpoint = "/ws/2/artist/?query=coldplay&fmt=json";

        fetch(baseUrl + endpoint)
            .then((result) => {
                this.setState({fetchedData: result})
            });
    }

this is how I save the data

wind horizon
#

Looks like your state is fetchedData not list. 🤔

next flame
#

yeah I make a copy later in the render() function called list

wind horizon
next flame
wind horizon
#

Right that’s destructuring the key list from the object state. But the 2nd code you shared never sets a key of list to the state object.

next flame
#

ah so this.state is always empty, right cuz I assign fetchedData only in the constructor silly me I forgot about setState

wind horizon
#

Based on what you shared your state should start like this:

{ fetchedData: [] }

Then after the data is fetched it should be:

{ fetchedData: resultFromFetch }
#

Although looks like you aren't JSON parsing in the fetch, not sure if react-native does anything diff with fetch but default fetch in web it does not parse the JSON response automatically. You need to call result.json() (returns another promise though, so another .then chain needed or use of async await)

next flame
#

I commented out .then((body) => body.json()) because the format is set to JSON in the URL already

next flame
#

I'm new to react native so pls no bully waveboye

wind horizon
#

That gives you JSON data in the body, but it still needs to be parsed into a JS object.

#

For example open a new tab in the browser, hit F12 to open console, and past this in:

fetch("https://musicbrainz.org/ws/2/artist/?query=coldplay&fmt=json")
  .then(response => {
    console.log("The response is: ", response)
    // Parse JSON
    return response.json()
  })
  .then(data => {
    console.log("Parsed data: ", data)
  })
#

Notice how when the response is logged it's a response object, not the JSON/body data.

hollow basalt
wind horizon
next flame
#

sure thing

next flame
wind horizon
#

But it looks like you wanted to display the created date from the JSON, right?

So that would be something like:
const { created } = this.state.fetchedData;

But there is a problem even with that, since initial render fetchedData will be empty. Also we are defaulting our fetched data to an array, but the returned data appears to be an object.

next flame
wind horizon
#

Idk React Native well, but assuming like React you can conditionally render different things you can do something like this:

this.state = { fetchedData: {}, isLoading: true }

In the fetch function:
this.setState({fetchedData: result, isLoading: false})

Now down by the render/return

render() {
  const { isLoading, fetchedData } = this.state;
  
  if(isLoading) return <Text>Loading...</Text>

  console.log("Fetched data is: ", data)
  return (
    <Text>{fetchedData.created}</Text>
  )
}

(ofc you should have error handling and all that too ,but we are skipping it to make life easy for now. There are pre-built modules that wrap all this up in hooks for you to make life easy or you can make your own.) - ps I did not test the above code so maybe typos lol

wind horizon
#

For example:

state = { name: "dirty_gwyn", color: "green", channel: "development" }

// Later in code something happens where we want to change channel
this.setState({ channel: "lttstore-merch" })
// this.state now is:
// { name: "dirty_gwyn", color: "green", channel: "lttstore-merch" }

// Lets change the entire state to track a new 
this.setState({ name: 'Jake "Bell"', color: "orange", channel: "unknown" })
// this.state now is:
// { name: 'Jake "Bell"', color: "orange", channel: "unknown" }

See how we can update the store and react does a diff, we can replace single items or all the items. It's best practice to try and not change the type of data stored in a key to make it easy to write code later on and expect strings, arrays, etc, but you can even change the entire type. Like setting an array to where a string was.

next flame
wind horizon
#

This syntax:
const { x } = y

Is saying destructure the value for the key x from the object y

const user = { name: "dirty_gwyn", color: "green", channel: "development" }

const { name } = user
console.log(name) // "dirty_gwyn"
next flame
#

yup makes perfect sense, idk why in the hell I thought const {x} = 5; is the same as const x = 5; 😅
I should probably get some sleep lol

#

thank you for putting up with my dumb ass 😅

wind horizon
#

Haha no worries, I don't mind helping ppl who listen / follow along. It's when someone comes in and just keeps saying it's broke and doesn't want to read or try that I'm like noooope. lol

hollow basalt
#

We help, but not those who doesn't help themselves

rain karma
#

does any one know app for face reconginsation , dm the link to me

mighty aspen
#

Plus, it does use an object array, so that also might be where you're getting mixed up. i.e. const [isOnline, setIsOnline] = useState(null);

hollow basalt
#

pen and paper

alpine girder
#

microsoft excel

nocturne galleon
#

iframes? monkaS

nocturne tree
#

Vim

midnight wind
nocturne galleon
#

Vscode(ium) is good imo, though a lot of people recommend visual studio

slate frigate
#

@warped gulch i like Jetbrains Clion

deft sigil
#

anybody how to do NOT or NAND in python (on hex numbers)? AND , OR , and XOR i found but im looking for something including a NOT (not nand nor): py print(hex(0xB & 0x7),hex(0xC | 0x2),hex(0x9 ^ 0x6)) 0x3 0xe 0xf

peak acorn
#

Isnt ~ unary not

#

So nand would be ~(a & b)

nocturne galleon
#

it's basically just a build of vscode without telemetry

#

it can't access the vscode marketplace but you can still manually install its extension files, and it natively supports a separate marketplace

peak acorn
#

Oh cool

#

I should switch to it

hollow basalt
nocturne galleon
nocturne galleon
peak acorn
#

I still dont know how to get vsc to properly suggest stuff

nocturne tree
peak acorn
#

Yea like at work I cant get any of the C shit to work

#

afaik nobody has it working but i havent asked around too much

sullen wind
#

hello

#

im having this issue but i have the file in the directory

hollow basalt
#

what .php is this running from

sullen wind
#

this is running from admin.php

#

admin.php calls admin_view_controller.php which calls user.php which calls db.php

#

login.php works fine but whengoing through the same kind of reference but idk why admin.php wont work

#

when i do

hollow basalt
#

Because your file structure is different

sullen wind
#

so how do i fix it tho

#

cos if i take away the .. another file breaks

#

currently i fixed it by including db.php inside entity folder it doesnt cause any breaks anywhere

sullen wind
#

can i get a explanation im confused and dont understand

amber coral
mighty aspen
# sullen wind can i get a explanation im confused and dont understand

you're not using a dynamic file syntax, probably. Instead, try to use the DIR or FILE vars to base the location of the new file off of your current location.
https://stackoverflow.com/questions/59634601/how-can-i-build-a-dynamic-absolute-path-in-php

Here's another example: https://stackoverflow.com/questions/2617931/php-dynamic-include-based-on-current-file-path

stoic relic
#

I’m developing a social life

sullen wind
#

really appreciate it man u guys were the only people who actually replied to my issue today

#

❤️

misty thorn
misty thorn
hollow basalt
#

what music are they dancing to

misty thorn
nocturne galleon
outer trail
#

I think both need to be built from source, flex has instructions in the README.md and bison has instructions in the INSTALL file

nocturne galleon
#

i cannot see any INSTALL file anywhere'

even on the repo

outer trail
#

Seems like the INSTALL file is missing from the source for some reason but in the readme there are also instructions for building from source.
Basically you need to install the tools listed in the file and then run./autogen.sh and configure && make && make install

nocturne galleon
outer trail
#

Seems kinda sketchy that the university didn't give any info on this 😄

nocturne galleon
#

Pardon if I am not very familiar with these, typically im used to .exe's, or proper github installation shit

outer trail
#

Yeah, no problem. I actually don't know anything about these programs, I just have some knowledge on installing stuff like this because of linux

nocturne galleon
#

more context:

#

no installation process whatsoever kekw

hollow basalt
#

I mean if you're already into compilers. you should have a general direction on how to install things

nocturne galleon
alpine granite
#

Hey guys!! I have a question, how would I go about putting the following code into a trace table?

<?php

  1. $names = array("Tom", "Richard", "Harry", "Sally", "Jo", "Milli");
  2. $namesCount = count($names);
  3. for ($i = 0; $i < $namesCount; $i++) { $value = $names[$i];
  4. echo "{$value}\n"; }
    ?>
alpine granite
#

I asked the teachers for help, but they aren't available for the weekend and the task is due in tomorrow

#

I wrote a trace table for a previous task, and I had no real issues with it. It's only this batch of code that I'm struggling with

mighty aspen
#

its funny thats i've never heard of a trace table, but you're just trying to print in a table right?
echo "{$i} - {$value}"; within your loop

#

probably followed by echo '<br>';

alpine granite
#

This is one of the trace tables that I wrote:

mighty aspen
#

Man i hate how schools teach coding, lmao

#

you can use html to structure it nicer, but this is what i'm looking at https://en.wikipedia.org/wiki/Trace_table

A trace table is a technique used to test algorithms in order to make sure that no logical errors occur while the calculations are being processed. The table usually takes the form of a multi-column, multi-row table; With each column showing a variable, and each row showing each number input into the algorithm and the subsequent values of the va...

hollow basalt
mighty aspen
#
slate frigate
#

I feel like most CS classes lose sight of the forest for the trees

hollow basalt
#

Weeds

mighty aspen
#

being a JS nerd has gone well for me, especially 'cause you don't really learn JS (well you can now w/ all the new structured ideologies), you think JS.

alpine granite
slate frigate
#

Not a fan of js, but its a necessary evil

hollow basalt
slate frigate
#

Been trying to transition to this

alpine granite
slate frigate
hollow basalt
#

people love their JS and frameworks way too much

mighty aspen
#

Tbh and personally, not worth sticking with python unless you're looking to deal with academia - real life is all js/sql/c#/java

slate frigate
#

CyberSecurity. It's python the whole way down

hollow basalt
mighty aspen
#

I'm not a web dev <33

hollow basalt
#

then I don't know why you don't see python

mighty aspen
#

Because I've only worked at paypal and google - and we do see python, it's what people use to gapfill. but it isn't -needed-, you can gapfill with js or c# too

alpine granite
mighty aspen
#

not like i don't know python, just isn't a primary language for work stuff.
@analog pasture did you see the wiki and article i linked? maybe you're using the term trace table to mean something else?

slate frigate
#

Worked at google, and doesn't bring up golang, smh 😉

mighty aspen
slate frigate
#

Not a fan?

alpine granite
mighty aspen
# slate frigate Not a fan?

it's fine I'm sure, just never really encountered it and it doesn't lend itself to rapid iteratiive dev, and i'm typically r&d

alpine granite
mighty aspen
midnight wind
slate frigate
#

Why your stance on not being good for rapid dev? It's my go to for most of the stuff I do, and as long as I don't paint myself into a corner, its been pretty solid for me.

midnight wind
alpine granite
mighty aspen
midnight wind
#

I find a common theme for older programming teachers is that they worked at UPS

mighty aspen
#

^ is that a thing? makes sense i guess... muh gubments

alpine granite
midnight wind
#

A websites source code is kinda public

#

Unless you mean the backend

mighty aspen
#

Tom, so what aren't you understanding here? Far left column seems to be what the program is doing, and then second left to far right is ?how much of the array has been read by the program so far, and what data it's pulled in?

alpine granite
slate frigate
mighty aspen
midnight wind
#

Prob just went into inspect element, look I'm a hacker now

slate frigate
mighty aspen
slate frigate
#

Right?

#

Why you do this?

wind horizon
mighty aspen
wind horizon
#

Yeah I mean I even use it for most of my NodeJS code now too. The only time I don’t is if I’m working in a Node app without TS support since adding it to Node means using something like TS-node or processing the node files with tsc/babel befor running it which is just kind ugly workflow for node. Haha

#

But did you see there is proposal to add typings natively to JS? It’s only in stage 1 right now and it won’t cover as much as TS, but should be similar syntax. That could be a great way to get typings on NodeJS with not setup work… one day, since we all know how long proposal time can take and then time to get it officially into node and then also upgrade your project to that version of node. Lol (esp if you wait for lts node with it)

wind horizon
midnight wind
wind horizon
nocturne galleon
#

rust noob making my first meaningful program here, let's say i have this situation, how could i avoid it?

fn main() {
    let mut accessToken: Option<String> = None;
    // More stuff
    stuff(|_| {
        // This is now inside a closure, in which i need to return a move closure
        move |_| {
            something(&mut accessToken); // Compile error because of the move closure
        }
    });
}

fn something(token: &mut Option<String>) {
    // Modify token here
}
grave jasper
#

Heck, it's probably easier to find a good-paying job in Python than in Java 😉

wind horizon
grave jasper
#

I've coded both for money, but I'm currently mostly doing Ruby

mighty aspen
grave jasper
#

I don't usually work for larger companies

mighty aspen
#

i've noted a lot of DOD stuff is java based, so that definitely skews it as well

grave jasper
#

mostly <50 devs, sometimes <100. I've worked at a couple bigger companies (PayPal, Toptal Core, UCDavis) and found it not only less profitable, but also extremely boring

#

lot's of red tape, very strict environment and extremely limited impact on the company

#

Working remotely from EU it's very easy to find USD120k+ a year paying job in Python or Ruby, but with Java not so much

wind horizon
#

Big tech I feel like is all about getting on a good team, it’s easy to get pigeon holed in big tech but if you get a good team you have the resources behind you and dedicated time todo some awesome stuff.

I once worked more on the service side programming tools, that was boring af. Haha

grave jasper
#

(YMMV)

#

Big tech is IMHO a very few opportunities for a lucky dev to work on something interesting with lots and lots of devs working on some obscure internal software that supports some pointless processes

wind horizon
#

When I worked in cyber security I did mostly FE but the Python backend devs / co-workers were making avg 150-220. It was big in cybersecurity in my experience, but once I left cyber security I saw a lot less of it. Industries 🤷‍♂️

grave jasper
wind horizon
grave jasper
mighty aspen
#

^ yup..
That's why i like being full stack on R&D side... i spend lots of time building tooling, but it's fun greenfield stuff like dealing with jira>github>deployment rather than the tenth iteration of a logs viewer

#

plus if i get too bored i'll go work on FE

grave jasper
#

I usually freelance as a consultant, mostly working on Ruby on Rails performance optimizations

#

sometimes it's tedious, like figuring out missing cache or making something work in parallel

wind horizon
#

I enjoyed RoR, but found node easier so mentally I can start in one language

grave jasper
#

But I've had my share of interesting tickets (like doing a Proof of Work at login to throttle down credential stuffing attacks)

wind horizon
grave jasper
wind horizon
#

Although it’s usually only for you, any dependents you have to pay for. So I think I pay like $250/m or something for my wife and I with a 3k individual or like 5k family deductible. Meaning it pretty much does nothing unless we rack up bills that big. So stupid imo to pay someone who won’t pay unless you then charge up thousands. 😂

At least most high deductible plans in tech come with an HSA to cover 50-100% of your deductible. So it works out to decent health care for free/cheap for subscriber and then kind of a wash for dependents.

grave jasper
#

it's much, much cheaper here

wind horizon
#

But I feel you in general about cost of living, I’m not in the Bay or NYC, so I get like 20% less pay but their cost of living is well over 20% more than mine so. 🤷‍♂️

At least the company is transparent about it and shows me numbers if I were to move there vs stay here. Lol

#

I did see the AirBnB announcement about country based pay instead of city/state. That peaked my interest, but I don’t really have interest in AirBnB. Haha

grave jasper
wind horizon
#

I agree, we are doing the same work just from the place we choose to call home instead of some city we don’t want to live in.

grave jasper
#

I even used to live in Bay area for some time and I've moved back here

#

I wouldn't say you get better developers over there. Maybe better business networking, but that's irrelevant for a lot of developers.

wind horizon
#

Yeah I agree, I never lived in bay but after working for a few Bay area based companies I wasn’t blow away or anything. Felt just like the other companies I worked for with better pay. Lol

#

I have considered moving, just because that 20% actually applies to RSU and bonus from what HR said, so it’d actually be pretty huge not just my base.

But also the idea of paying like 700-1m+ for a house that you’d still have to commute form. 🤢

So I don’t think I will. Haha

#

So it’d be a massive downgrade going from owning a house that cost me less than 2k/m to probably renting and paying even more per month. Lol

grave jasper
#

I don't remember last time I've seen a non-remote job offer 😄

#

(that's the other reason why I've picked Ruby as my main focus)

wind horizon
#

Yup, but problem is as a remote I’m still getting hit with geo pay. I guess next time I switch jobs I’ll just have to make a point to upfront ask during screening if there is geo based pay and not waste my time. Lol

#

Silly but if I move to CA or NY as a remote I’d get the pay increase still. Explain that one. 😂😂😂

grave jasper
#

rent a storage unit or sth in CA or NY, use it as your address, work from wherever you are, tell the company you have moved

#

it should work ¯_(ツ)_/¯

wind horizon
#

I was tempted to ask a friend to let me use their address, then just vpn to CA. Lol

grave jasper
#

I know a few digital nomads which in this kind of company should file for a salary recalculation every week or two

#

so I think it's silly to do this for a company and shows that they don't really understand current market for developers

wind horizon
#

I think usually it’s something like after a month in same state tax wise you are supposed to update company / where you pay taxes for irs. I know tones of ppl ignore that though.

#

I think it’s more todo with where they “assume” your primary residence is. Not where you are at all times.

But yeah it makes no sense, but you know how slow companies can be to adapt.

grave jasper
wind horizon
#

I hear if you are good about deducting the business expenses it works out good, but it’s draining todo. I guess you can hire a tax pro. When the tax laws are so complex people have an entire job of just doing taxes. 😂

grave jasper
# wind horizon Is there high self employment tax there? Here in US that can kill you, it’s anno...

If you earn above ~$4k USD in Poland it's pretty stupid not to be self-employed (unless you're applying for a mortgage).

It's mostly tax related
self-employed dev gets a choice:

  • 12% + flat social insurance fee around $400 (includes healthcare), no expense deductions
  • 19% + 9% social insurance (includes healthcare), you can deduct expenses. Can be brought down to 5% if you're selling products directly, not just coder for hire

Employement agreement gets you
19%/32% (two brackets, first one is really low) + 9% social insurance (includes healthcare)

wind horizon
#

Oh nice, sounds pretty easy if you go the 12% way.

grave jasper
#

I've got 5% last year since I've had a few expenses to deduct, 12% this year

#

also the PRs for client code used to be considered products, now they've kinda closed this loophole 😉

#

(Intelectual Property to be exact, not a Product, the interpretation changed a bit)

wind horizon
#

I think I’m paying like 24% - standard deduction. Since I don’t have enough to deduct. But that’s just income tax, so when self employed I have to account for the social security + Medicare fees employer normally worries about. I can’t remember what exactly it was, but wanna say my self employed was closer to 32%

grave jasper
#

sounds about right, I can't remember my taxes from the times I've paid them in US, but I was pretty early in my career and wasn't earning much

wind horizon
#

Also if you were in bay you had that extra CA income tax prob. Lol

grave jasper
#

I remember the confusion with local, state and federal tax forms

#

I was a researcher at UCDavis back then, so the university took care for a lot of stuff for me

wind horizon
#

Oh yeah I didn’t count local since those taxes are rolled into my house payment. Haha thankfully those are based on property and not income. Unless you live in special areas like some parts of NY when I lived there had an extra high income tax that went to the local.

mighty aspen
#

c2c is easy, just charge 200%. that's actually industry standard

wind horizon
#

Plus 10% more for every annoying question to make it worth your sanity.

mighty aspen
#

for my contract work, which i havent done in quite a while, i chose to go very cheap, like 50/hr. but that's cause friend rates.

grave jasper
#

I'm a consultant, I usually ask stupid questions because I'm often the outsider in the project 😄

mighty aspen
#

consultant work, i ask for 150-200, depending on complexity

grave jasper
#

sometimes though the questions are right, because everybody already knows that so no one has thought about it in depth 😄

#

my standard rate is 80 EUR/hr (about 83 USD), I might need to work on that 🤔

wind horizon
#

Problem is as your day job pay increases, hopefully haha, then over time if you have long contracts you are in an odd spot of either asking for more to make it worth your time or dropping them. That’s how I ended up dropping my last contract gig, just wasn’t worth it when the pay was almost 1:1 to what my salary would break down to hourly and that didn’t account for value of benefits so really it was less than my day job at that point.

grave jasper
#

I don't really like any benefits, they make you stay at one place instead of looking for something better

#

as for dropping contracts...well, if there is something better and I don't see any future cooperation with this particular customer...

wind horizon
#

Well I meant as in their value, like the HSA, health insurance, etc.

grave jasper
#

it's good to at least leave them in a stable state and recommend some replacement, often pays off in the long run

grave jasper
wind horizon
#

Now instead for doing contract for pay I work free for a startup old co-workers started in exchange for shares / ownership percents. Maybe on day it’ll take off and I’ll get a nice layout or maybe it’ll never take off and I just got to code with old coworkers. Lol

grave jasper
#

I usually don't work for shares since it never paid off for me

#

but I do like doing some volunteer coding, even on commercial products if I believe in them

#

for example I'd love to help framework guys with their marketplace, but it's closed source

wind horizon
grave jasper
#

sometimes it's not even about execution. I was an early employee at a UK challenger bank. We had some nice features like card pausing/unpausing, transaction categorisation, budget prediction etc. etc. all back in 2014, but the investor really screwed that company 😉

#

the shares went from worth a little to absolutely nothing in a matter of one meeting

wind horizon
#

Ouch, yeah I worked for a company that got bought by a VC fund. They immediately fired the CEO, renamed the product, and then bought another company to merge with ours and changed all the hiring processes and everything. The majority of the engineering team left that year. 😅

grave jasper
#

¯_(ツ)_/¯

#

but hey, at least I've got to design a full backend for a bank from scratch

#

this was fun, and I've got to see this codebase after a few years again after someone bought it and asked me to install it on their premises

wind horizon
#

Haha that’s cool, interesting how many financial products I have seen using RoR. (Not sure if that did but I know you mentioned you do RoR)

grave jasper
#

quite a lot. Braintree is written in Ruby, I've even worked with them for a week, Stripe too I think

wind horizon
#

Shopify I think as well, right?

grave jasper
#

that's ecommerce, but yeah, it's also written in RoR

wind horizon
#

True, but with Shop Pay it’s got a slight gray area where they are pushing express checkouts. But I think still no wallets.

#

I thought I heard years ago Square used some Ruby too, but that was long ago before mergers so no idea now.

grave jasper
#

it's definitely not the most popular language, but it's easy to write something and even easier to write something beautiful but slow, so I can help for $ 😉

#

also lots of remote jobs

#

even before 2020

wind horizon
#

Yeah I’d say out of the backend code I have had to read it was one of the easiest. With the exception of “magic” parts I didn’t know about when I was first using it. First time I touched it I was like, where can I find this code. Turned out it was auto imported from a specific directory, just something I didn’t know about. Haha

#

Python was pretty close, Django is pretty nice and reminded me a lot of RoR I touched. But I hated the lack of {} / using indents for syntax. LOL

grave jasper
slate frigate
#

I only wrote one thing in ruby, a meterpreter script. Decided very quickly in that process it was not for me.

grave jasper
#

I don't particularly like Python, mostly because of the syntax, but also because I've seen so many projects that needed like two weeks of work to get the project going with all the virtualenvs, dockers, incompatibilities and custom builds

wind horizon
#

Now I pretty much only write JS on the backend. Which is funny since I legit laughed out loud when I first heard about ppl trying to write sever / BE code in Js. 😂

grave jasper
wind horizon
grave jasper
wind horizon
slate frigate
#

Splunk's client module is a PERFECT example of that

wind horizon
#

I can’t stand Splunk, unrelated to coding idk their apis or anything. Just mean the actual interface for digging into logs it feels like one of the worst if have used.

But that’s UX to blame not their backend code. Haha

slate frigate
#

Yeah, its frusterating learning how to query how splunk wants the queries to be. How they actually handle the data is what's super impressive

grave jasper
wind horizon
#

Also their APM platform is meh in comparison to DataDog or New Relic. But now I’m just splunk hating for fun. Lol

wind horizon
slate frigate
grave jasper
wind horizon
#

I haven’t used EslasticAPM yet.

slate frigate
#

Instead of being more efficient, I solve all my splunk performance issues by just saying "well, guess I'll add some ram and cores to the VM"

grave jasper
wind horizon
grave jasper
wind horizon
slate frigate
#

Well, did you put in a jira ticket yet to remove it? ( ͡° ͜ʖ ͡°)

grave jasper
wind horizon
slate frigate
#

Every dev should get one "Remove this manager" card a year.

wind horizon
#

I used todo tones of MongoDB work and I remember all the time devs were querying against stuff without indexes and always hitting primary never using secondary. Also like no devs were using aggregation framework and fetched everything to combine in memory. Also no projection to limit returned fields.

Thankfully those days are behind me, haven’t used Mongo in I think like 2/3 years now.

I ended up turning on the setting to limit the unindexed objects scanned in stage so lot of the bad queries would fail tests in stage and force ppl adding new queries to have to add indexes or adjust queries. Lol

grave jasper
#

I've got a client generating about a terabyte worth of data every week. 90% in one table, 90% useless. They've never looked at what they are storing because deleting stuff would be to lose 'valuable data'

slate frigate
#

I end up using mongo a lot just because of all the data i'm usually ingesting never has a standard format, so just being able to toss them in as documents is so nice

wind horizon
grave jasper
#

things that they've kept

  • location details with a procesion up to a single atom
  • a static string column with the same value for 99% records
  • serialized JSON that could be another table
slate frigate
#

I had one team ask me if I could give them some data they asked for a csv instead of json. Cuz "csv is more human readable"

grave jasper
#

migrating this table was a huuuuuge challenge, you can just drop a column or alter a column on something this big, you have to do add a new table, run a backfill in background and store new data to both tables until the backfill completes

#

also reindexing stuff takes hours on this scale

wind horizon
grave jasper
wind horizon
slate frigate
#

@wind horizon It was data that didn't translate to csv nicely. And I know this team. They WERE going to look at it by hand.

grave jasper
#

you could open a CSV file, add 1 column, 1 row which happens to be JSON

wind horizon
#

I used to have todo unstructured json from into to csv a lot when I worked in healthcare. Since like everyone in healthcare wants to work on spread sheets. Lol

slate frigate
#

I told them if they can't parse json, they aren't worth anyones time as analysts, and left the call

grave jasper
slate frigate
#

I got a talking to after that

wind horizon
#

We had “data analysts” aka Excle power users and they were always the problem makers.

grave jasper
#

One other public administration horror story is a specsheet I've got from a towns hall that had some bizarre requirements

  • "Please make sure that we won't run out of fresh folders to put the data in" (we've added an icon with a pile of folders)
  • "If there is a new property in a folder we'd like to rename the original folder from X to X1 and name the subfolder X2". it took us three days to understand that they've been using physical folders and they don't fit one into another so we have to emulate the behavior of adding 1 to the parent folder and 2 to the subfolder
wind horizon
#

Also had these data analysts that wrote python at an old job, this was the worst since they didn’t know how to program efficiently. We had to make a dedicated replica DB for them to query, since they hammered it so hard all in 1 shot. They’d load tones of the data to memory todo simple transformations and then spit it out into their own SQL db. It loaded so much data to memory their VM needed over 40GB of RAM. Lol

grave jasper
# wind horizon Also had these data analysts that wrote python at an old job, this was the worst...

I have mixed feelings about ~90% of data analysis/data science guys I've worked with. It seems like they know a lot of theory, but I've seen people not understanding how databases work, what's actually in those databases and how to interpret the results of what they're querying for. I'd love to see more data-driven businesses, but it seems the more data I see collected the fewer people can actually make any sense from.

slate frigate
#

Its the same problem people have getting CS degrees, and transitioning to full time dev. The can invert a binary tree, but they can't actually problem solve.

grave jasper
#

Just a few months ago I've asked one colleague about some feature flags toggle and if they want them enabled for different user segments in order not to skew the results

#

and they've said 'sure, let's run this one in this country and the other one in this country' 😓

#

I'm a dev, I suck at statistics by definition but even I can see a problem here

wind horizon
#

Seems like you’d need more of A/B testing in the same/similar traffics type to draw a real conclusion. Lol

grave jasper
#

I've sent them some articles about statistically significant A/B testing and stuff

#

and yeah, they assimilate this knowledge (you can talk to them about it and they understand), but never act on it

wind horizon
#

I do tones of A/B testing, but I sometimes worry analytics doesn’t consider other on going A/B tests and only look at individual results never a combination of changes. But at least my team is mostly making data driven decisions.

grave jasper
#

it's like people who go to conferences to hear about new tech, but keep writing the same code over and over again

wind horizon
#

Sometimes products says they want todo X since they think it’ll be better. Usually analytics pushes back and just says let’s let the data decide which makes me happy instead of going off a product persons opinion alone. Lol

grave jasper
slate frigate
wind horizon
grave jasper
grave jasper
wind horizon
slate frigate
#

That's were being the only dev on my team is nice. No voting, no arguing, its my way.

wind horizon
#

Yeah I have had some bad past teams that had true disagreements over it and some ppl try to force their way. So now I’m extra sensitive to purposing stuff since I never want to be one of those ppl. But thankfully I have a great team now with no one like that, we all are in agreement usually on everything and when we aren’t j feel like we go do a PoC or demo or something to show the ideas we have.

#

My last team was awesome too, I rode that out until it fell apart from a terrible new director. I think the same will happen here, stay until either the teammates leave or management leaves and bad ones come in. Since a good team and interesting work can be hard to determine from interviews.

grave jasper
grave jasper
slate frigate
#

Yup, those are the downsides

#

And no one to tell me I'm goign down a rabbit hole

grave jasper
#

and if you get stuck it means the whole project is stuck 😉

#

literally nothing happens anymore because you don't know how to proceed. Jumping features usually means sacrificing something, yet staying means no new releases. Working alone is fun for personal projects, but not something that pays the bills and has some competition already

slate frigate
#

Yeah its rough sometimes. Fortunately I have a lot of freedom to solve problems I need to solve, and no one cares as long as the analysts get the data they need

wind horizon
grave jasper
wind horizon
#

I also dislike a tests running on commit hook, why was this ever a thing for some places. Way too heavy handed imo, esp since I may commit something and then alter it later and do a rebase or something. I do most of my commits with --no-verify at past jobs since it's often people throw tones of stuff on the commit and push hooks that takes forever. lol

wind horizon
grave jasper
#

Now I have a client with 1.5hr test suite on CI, but the first problem is the CI itself, it's a dual vCPU micro instance. Locally it hangs on I/O, but remote env is bottlenecked by CPU. Other devs still say it's the database, so I guess people don't really understand bottlenecks

#

(and how their own code might bottleneck in a different way on two different machines)

wind horizon
#

The CI at work is super slow, but it's for sure their resources since the exact same tests talking 1/8 the time on local. But I guess they just don't want to throw even more hunreds of thousands - millions at fast CI. 🤷 lol

slate frigate
#

I have one test pipeline that takes 42 mins almost on the dot, but it's way better than the similar 6 hours the previous version of it was taking

wind horizon
#

(Idk the real cost, but I heard that our logging alone cost over mil.) lol

grave jasper
#

I've got it down to 40 mins currently on a 4vCPU, which I've hoped proved the case for a better server, but they still have their doubts

#

(on my local M1 Max 10 core it runs in ~17 minutes)

#

(still slow, but that's actually a DB issue which they saw first)

wind horizon
#

Nice, still sounds slow for CI for sure. I love using CI as a service like in GitHub Actions or Circle CI where most of the time I just write the CI and nothing think about the infrastructure for it. But if you had complex stuff or like big build jobs I'm sure you'd still have to tweak those to be bigger containers.

grave jasper
#

oh, the last case is GH actions, but a self hosted runner since the provided one is also 2vCPU 😉

wind horizon
#

oooh

slate frigate
#

Jetbrains has a nice CI/CD product

grave jasper
#

pr0tip for GH Actions - you can use them for free if you host the runners yourself 😉 and many people have their homelab servers

wind horizon
#

I think last time I looked at self hosted runs it's a all or nothing approach, is it still like that? Where either the repo runs on self hosted or on cloud runners. I wanted something hybrid, like you have some old computers unused or maybe even get creative and have some CI service running on office computers so when they are turned on but not in use they could run CI jobs. But if they are offline or backed-up on jobs it'd then go to GH cloud version and just bill you.

Like a distributed CI solution.

grave jasper
#

You get to decide which one to use per job

wind horizon
#

Oh ok, but it's all or nothing for that job? So if your runner is offline or backed up you the jobs wouldn't be run / queued?

#

I want like use my runner, but if it's busy or offline go ahead and bill me to run it in the cloud. lol

grave jasper
#

Tbh I don’t know

wind horizon
#

I mean doesn't matter where I work now it's all crap Jenkins jobs, but thinking past jobs. lol

grave jasper
#

I havent seen people using both since they have a vastly different use case

wind horizon
#

Right i was thinking from a cost savings perspective, but without effecting availability. Similar to hybrid clouds.

But I bet most use cases of it are people who want to run their own runners for other reasons, like security to something where they want to run it on-prem or at least in their network. Maybe so it has access to resources in their network etc. Maybe also to control costs, like they don't care it impacts availability, they just want to save money. lol

grave jasper
#

other than security you might want to get more performance or a more exotic machine (a mac studio for building mac apps for example, or something with a powerful GPU)

#

or you can have your homelab machine building your repo which is probably already on github. Beware though that people who can run that build can execute code with a permission set of the gh actions runner user, so it's better not to allow strangers building on your homelab server 😉

wind horizon
#

That's true for Mac, always forget that's a thing for apple apps. lol

grave jasper
#

not necessarily fans, but sometimes you have to build something mac-specific, especially iOS apps. Also M1 mac minis are cheap and powerful, draw very little power and are a good fit for a homelab server

wind horizon
#

I no longer have home labs, just found everything fit in free tiers on the cloud, so why pay my own electric. 😆

I do still have home setup for NAS + Plex and networking stuff like pfsense, so I could run a runner I guess on a container of that. But my CI for my open source stuff runs free on either actions or something like TravisCI today.

grave jasper
#

NAS + Plex and networking stuff like pfsense is basically a homelab for most people 😉

wind horizon
#

Oh I consider that my home network, when I think home lab I think like a lab to play with. Like when I used to run vmware and test out stuff or host some custom apps etc. lol

grave jasper
#

I've got a similar setup minus pfsense, plus pihole and piaware

wind horizon
#

I don't really play with any of that stuff, it's all like out of necessity / actual used daily.

grave jasper
#

well, you already have a server to play with, since you have Plex 😉

#

or is it running off the NAS?

wind horizon
#

I moved it off my old home server which I sold, now it runs on an old work laptop the company let me keep when I left. LOL

#

Works out well since that battery acts like a built in UPS. lol

#

Plus the 1070 in it transcodes great.

grave jasper
#

I've got two raspberry pi's, one HP ProDesk 405 G6 mini pc (with Ryzen 4750GE) and a Mac Mini M1 for the stuff I host at home

wind horizon
#

I have the laptop + NAS + fitlet2 for psense + some switches & WAP.

grave jasper
#

well, outside of servers I have a Synology NAS (but that's just plex storage + my girlfriend astrophotography data mostly) and a couple switches as well, but I have a lot of stuff on the network and I separate 10Gbit and 1Gbit networks, so there has to be some hardware to do that

wind horizon
#

I want to move to 10G but cost to upgrade to NAS with that is high, but I have replaced most of my network w/ 2.5G

grave jasper
#

NAS is 1Gbit, I might upgrade to 2.5G

#

these are uncached HDDs, they don't run that fast

#

I need 10Gbit for my workstation since my ISP is 10Gbit 😉

wind horizon
#

Oh ok, my ISP is like 960Mbps, so no point in going over a normal 1g NIC for my firewall WAN port right now

#

I have HDDs as well + NVMe cache, but even with only the HDDs they saturate 1G usually with reads before maxing out.

#

I mostly just use my NAS for storage though, I have like over 10TB on it now. Just dump all my data there + plex storage eats up a lot of it. haha

All my hosted apps, like the LTT Scalper Bot run on a cloud free tier.

grave jasper
#

I don't keep that much data, my entire non-code data footprint which I keep on NAS is about 500 GB, but I frequently delete stuff I don't need, like photos I don't care for or old emails I don't want to read again

wind horizon
#

I'm mostly ripping BlueRays I own and don't compress it, so they take up a lot of space. I think 4k movie is something nuts like 70GB+

I figure if I ever want to go compress it I can, but so long as I have the space might as well keep the original quality since you can't really go backwards easily if you wanted to in the future. lol

grave jasper
#

Oh, that's a different story then, I rarely rewatch movies

wind horizon
#

I just rip everything, even if I pretty much never rewatch it the first watch I usually rip and stream from plex. Since I don't even have a BlueRay player anyway. Plus figure then it's digital if ever want to rewatch it and on any device even while away from home.

grave jasper
#

makes sense

wind horizon
#

But yeah movies I don't rewatch much, mostly it's TV I rewatch from Plex a lot.

grave jasper
#

I'd just download a copy if I had an original disc, since I don't really like the manual process of ripping a disc

wind horizon
#

Like South Park, The Office, etc.

grave jasper
#

Yeah, I get it

wind horizon
#

Yeah ripping can be a chore, esp when you first convert and you have a tone todo at once.

#

Now that I'm all caught up and put away the original discs in storage it's no big deal to rip a single disc.

grave jasper
#

I don't know if I have a bluray player other than my XSX, PS3, PS4 and PS5

wind horizon
#

I just bought a cheap drive I plugged into the PC for ripping lol

grave jasper
#

ironically the only thing I buy on discs anymore are console games

wind horizon
#

I kind of gave up on consoles after the last time I bought a PS4 and I don't think I even logged 10hrs on it. lol

#

But I just don't play on the TV much, if I did console would deff be something I'd still buy.

#

I feel like being a dev has made me game less, since I spend all day in front of the computer so after work I often don't want to game. lol

grave jasper
#

I've had this kind of period too, but I've just discovered I'm playing the wrong games

#

I really enjoy a good single player game with a rich story. I don't play multiplayer games except for PvE and only with friends, never with random people from the Internet

#

I also don't keep myself from pushing through a bad sequel of a game I liked just for the story. I've dropped Halo last year because Halo Infinite had a boring campaign with a terrible plot and the open world doesn't really fit the experience I'm used to. And that's OK, I don't need Halo games anymore.

wind horizon
#

I didn’t try the main story, wasn’t a big fan of the Halo infinite multiplayer so didn’t buy the single player.

grave jasper
#

I haven't even launched any Halo game in multiplayer since I don't like playing with people I don't know

wind horizon
#

I don’t mind playing with ppl I don’t know, but it does feel harder to get a good matchup these days. It’s like multiplayer games have gone into single player mode where you are all playing together alone lol

#

I loved like old CS 1.6 days

grave jasper
#

I was more into Quake and UT those days

wind horizon
#

And most my adult friends have kids and stuff so not many play games anymore, so that does make it harder to play online with friends now haha

#

I did some UT for a bit, never got into Quake.

grave jasper
#

I have a small group of friends with who I mostly play Zero-K, but sometimes some other games

wind horizon
#

I can’t stand MOBA games and that’s what the few coworkers that game a lot play so I don’t play with them. Haha

#

I did play some survival games for a bit with friends, that’s pretty fun esp sandbox style survival. Like ARK if it wasn’t for all the bugs. Haha

grave jasper
#

Try out Zero-K, it's a remake of a fork of a fork of Total Annihilation. OpenSource, completely free and actively developed and extended for close to a decade

#

they have a very fun PvE co-op mode called Chicken Defense in which you have to build a base quickly then defend yourselves against an army of alien chickens 😉

wind horizon
#

An open source game could be dangerous for me, feel like I may fall too much into it and spend my time gaming + coding. 😂

grave jasper
#

well, the main engine is C++, but the games for it are written mostly in Lua, so it's easy to extend and modify

#

and they have Java-based AIs I think 🤔

#

it's also on steam, so it's easy to get your friends hooked up, no weird github-links to download 😉

#

no mac version though, just win + linux

wind horizon
#

I love Eco, but game moves really fast and resets in a month which doesn’t work well if I have a busy week or weeks at work. Haha

grave jasper
# wind horizon That’s alright I only use Mac for work

I kinda wanted to help them compiling their stuff on a mac, since it should be doable, but they use a few low-level asm calls with SSE, so it's not a one weekend process, more like a few weeks of tinkering which I don't have 😄

slate frigate
#

Y'all reminded me about my local CI/CD, so I checked it, and it was down. Why? cuz postgres ran out of disk space.

#

😫

#

This is why I have random SSD's laying around

grave jasper
#

set up some alerts next time

slate frigate
#

Excuse me sir, my homelab is held together with duct tape and twist ties. You think I'm sophisticated enough for that?

grave jasper
#

mine sends me passive aggressive notifications on my family slack (yes, we use slack because it's a slack from a failed startup I had with my girlfriend, no, it doesn't make sense, don't think about it)

slate frigate
#

Ugh, you're right. I should write something

midnight wind
#

I've kinda setup grafana for alerts

wind horizon
#

Honestly space are things commonly monitored, but you can just enable something built in or free todo it.

midnight wind
grave jasper
#

when I've first set up my plex server I've picked encrypted disk from ubuntu install. Then I've discovered that I have to type it on every reboot, and the server is headless

#

for over a year everytime I've restarted this thing I've picked a keyboard, went to my rack cabinet, hooked it up, typed it (without a monitor), pressed enter and it did it's thing

#

last month I've finally reinstalled it, because that's the only option to disable it

#

(only sane option, you can copy drives and do some other stuff, but that's too much work)

#

my only backup was sth like rsync -avz root@home-server:/ ~/home-server-bak

wind horizon
#

I feel like once I setup something at home it takes a lot to make me redo it. So the last time I did new setups I invested the time to setup offline backups + alerts and pushed like all data to the NAS so the server is kind of throw away and virtually unlimited storage / will get picked up by my nas notifications if it ever grew too big. Glad I did that this time. Haha

grave jasper
#

the reason why I actually reinstalled it is I wanted to deploy some crawler on this server and it required a lib that's in newer ubuntu, and I didn't want it to run in docker. I've tried updating ubuntu but it complained that it doesn't have enough space in /boot for new packages of the upgraded version (because /boot is tiny and unencrypted on encrypted ubuntu)

#

so it was 'install docker and live with this crappy disk setup, dockerize the app' or 'backup everything, reinstall ubuntu, bring packages back and config from completely copied /etc and /home'. And yes, I did the right thing, but it was super close for me to actually use a different computer instead 😄

#

girlfriend was very unhappy though, cause I've taken down plex for one day.

woeful rapids
#

does anyone know USB HID descriptor stuff? I'm making a small handheld walkie talkie with cool stuff and i need to have it report battery charge to the PC. After LOTS of searching i found this: https://www.usb.org/sites/default/files/pdcv11.pdf but it's for UPSs and i can't find anything else on USB HID power. is this it?

#

and if so, there are no examples on my use case

lyric peak
grave jasper
woeful rapids
#

yes, i saw usage 0x06 field 0x02

#

but i need full battery reporting with temperature and stuff

#

i asked someone i know and he told me that 70% of the HID spec is not implemented by OSes and that i'll need a custom driver anyway

grave jasper
#

you probably do 🤔 I know apple stuff has their own protocol and they report a lot of info about battery, including stuff like multiple batteries (in airpods)

woeful rapids
#

so i'll use the Generic Device Controls (0x06) and add an HID battery but making sure that it doesnt get read by the OS but only by my custom driver

grave jasper
#

HID docs are also a little dated, they were updated twice in 2020, but other than that it's all pre-2005

#

(think pre-iPhone)

woeful rapids
#

yeah, i need battery charge, status, health, cycles and temperature

grave jasper
#

if you need this much data it's definitely custom

woeful rapids
#

it is in the HID "Battery System" usage tables

#

so ill use a mix of custom and standard

#

and also i'll need a vendor interface anyway for sending compressed audio for debugging

grave jasper
#

what are you building?

woeful rapids
#

a handheld walkie talkie using codec2 for audio, ChaCha8 for encryption, support for sending GPS coordinates and a couple more things

grave jasper
#

ooh, sounds interesting. Is this something you plan on releasing to public or is it a personal project?

woeful rapids
#

it is currently in a private repo under a github org, but it is planned to be released when we can get something working. i still need a few things to ship here

grave jasper
#

cool 🙂

woeful rapids
#

currently the plan is to use a raspberry pi pico, although it doesn't have an FPU which might impact codec2 performance

#

opus has a non-FPU mode but it's too heavy

#

and also too high bitrate

grave jasper
#

any decent alternatives with an FPU?

woeful rapids
#

not at 4$

#

thats for sure

#

ESP32/STMicroelectronics will do

#

but i think that giving the pico an audio core will do just fine

#

from my testing it should be fast enough

mighty aspen
#

not sure why you're going full hardware level code with it, are you sure there's no way to run this info over an api via bluetooth or wifi?

woeful rapids
#

i like using standard interfaces since they were invented for this purpose

mighty aspen
#

thats fair

woeful rapids
#

and also i have used quite extensively USB on the PC side to make tablet drivers and various digitizer related stuff, so i wanted to see how the device side compared

#

and also i'm using a rust crate for basically everything so it is very easy

#

and also i like knowledge and wanna experiment with USB

rancid nimbus
#

If you use a Linux USB client then you could look at free decent examples or enable some USB gadgets.

rancid nimbus
#

I am working on a tiny AI. It gets punished for pressing clearly wrong answers. It then proceeds to press a clearly wrong button over and over.

rancid nimbus
#

At least it now doesn't choose the wrong option the first time.

nocturne galleon
#

The university's module on FLEX/BISON absolutely sucks

#

have to actually rely on a youtube video that does better explaining

slate frigate
#

@grave jasper @wind horizon I now have an over-engineered solution for checking disk space on all my machines. Remotely runs "df -h" over ssh on each host in the config file, and makes a pop-up window on my desktop for anything thats over 90% full.

Its like ansible. Except more limited and more complicated.

#

Nah, this is SPECIFICALLY to make an annoying pop-up window for low disk space. Last night had one of my DB servers completely fill up, and kill my CI/CD services

#

If I wanted to go through that much data, I already have all hosts in my lab forwarding to my splunk cluster

grave jasper
#

for v2 make it calculate the 0-day for no disk space left on device a week in advance, then use twilio to call you on your phone and make it play Samara's voice (from The Ring) "Seven days". That's something people might actually even purchase 😉

grim rapids
#

Actually a good idea

silk eagle
#

1.5 steps forward, 1 steps back. 😔

rancid nimbus
#

I redid the training from yesterday, but with pytorch. This time i did it with two layers and one layer. The two layer had about only 1/2 the output nodes in the intermediate nodes. The two layer performs about twice as fast to train.(in terms of training rounds.) Is there an actual pattern or is the data I am using creating some weird artifact?

halcyon lintel
#

so im making a flow chart of a program but i cant fully grasp how the nested loop inside works, can anyone tell me what exactly is it doing? is it making the value of i go in negative numbers?

hollow basalt
nocturne galleon
#

i'm not sure how to explain nested loops in a way that isn't confusing tbh

halcyon lintel
hollow basalt
#

(i'm explaining it to you based on your observation)

halcyon lintel
#

but i also dont understand in what way it deducts that 1

nocturne galleon
#

1 is never deducted from j, instead what happens is:

  1. the outer loop runs 11 times
  2. each time the outer loop runs, the inner loop runs 10-i times
  3. the value of j, which is between 1 and 10-i is printed, without a newline
  4. a newline is printed every iteration of the outer loop
    does that make sense?
halcyon lintel
#

so the starting number increases while it ends by 10-i?

#

like 1 and 10-i, 2 and 10-i?

slate frigate
#

@halcyon lintelFor this loop at least, think about it physically. Imagine you have 10 sticks. The first loop
for(int i=0; i<=10; i++)
says "Count everything 11 times, each time take away 1 stick"

The second loop
for(int j=1; j<=10-i; j++)
is where you count those sticks, minus how many times you've counted already

halcyon lintel
#

ohhhh

slate frigate
#

If that helps at all. I don't like arbitrary code like this, but when I see it, it helps to apply it to an actually problem to solve, rather than try to keep everything conceptual

halcyon lintel
#

im kinda starting to get it now. so basically i increases and 10 gets deducted by it

slate frigate
#

yep

halcyon lintel
#

yeah i get it now

#

thanks guys

#

so this is correct way to do the FC, right?

#

@hollow basalt@slate frigate

hollow basalt
#

uhh no

#

you don't copy paste code into the flowchart, you abstract the code nto logic

halcyon lintel
#

so i gotta iterate it in words

hollow basalt
#

kinda of, yeah

halcyon lintel
#

but what abt the flow tho? like other than the codes pasted there

hollow basalt
#

(from google)

#

think of a flowchart as explaining the program iinto someone who doesn't code

halcyon lintel
#

yeah makes sense

#

but as far as the flow of flow chart goes, its correct according to that code i mentioned above, right?

hollow basalt
halcyon lintel
#

okay thats good

#

i will change that up so that it fits accordingly, but its a relief that i got it right

grave jasper
#

maybe it's just me, but flowcharts makes the algorithm much more difficult to understand than a properly structured code

lament bridge
#

Yo.

I am trying to return the number 0, (not null) if there aren't any rows between a specific date.
I already tried IF (col IS NULL, '0', col) also coalese(col, 0) but was never successful. Any suggestions please?

midnight wind
#

some people understand logic easily, others don't

hollow basalt
midnight wind
halcyon lintel
#

so i was practicing a program that did the sum of all numbers in an array

#

but it shows the result like this

#

where does that 51 come from?

torn ocean
midnight wind
#

flowcharts show algorithms

torn ocean
#

check this out if i print the array without initialising 👇

halcyon lintel
halcyon lintel
halcyon lintel
midnight wind
torn ocean
#

do this -> myarray [j]=0 in a seperate loop

#

at the top

midnight wind
halcyon lintel
#

ohhhh

halcyon lintel
torn ocean
midnight wind
#

algos can be represented as pseudocode but they don't have to

midnight wind
halcyon lintel
midnight wind
#

int myarray[5] = {0,0,0,0,0}

#

not a very clean way, but it works

torn ocean
#

ye that can be done

midnight wind
#

why I like vectors better

torn ocean
#

ye much better

midnight wind
#

not fixed length so less messy

torn ocean
#

modern cpp supremacy

midnight wind
#

one of the worst things about cpp is the tooling

#

writing plain c++ with no dependencies, pretty simple

#

c++20 modules seem really nice

grave jasper
#

👆 problems like this (also weird syntax and diversity in writing styles across decades of codebases) are exactly why C++ is a horrible first language for newbie programmers

tight valley
#

yee. I would go first language either Python or C (C99). still had easier time learning cpp than java..

midnight wind
#

Dealing with dependencies is a pain

hollow basalt
#

Imagine if people use gradle with c/c++ more

#

But we're stuck with Make

rancid nimbus
#

Make is fine. I will use it sometimes, but meson and ninja is what I see. That build system works better than using make and not setting up proper dependencies.

next cipher
#

i mean make is really in a different category

#

it solves the basic problem of building things in order and avoiding unnecessary rebuilds

#

doesn't handle package management/dependencies on any level

#

you kinda want some way of handling those separately

#

even if it's just git submodules (which are actually really powerful and can essentially become a lightweight package manager)

hollow basalt
#

well yea, because C/C++ dependencies normally are installed using system package manager

#

Unlike more recent languages where they include those already

slate frigate
hollow basalt
midnight wind
hollow basalt
slate frigate
#

Life as a solo dev

grim rapids
#

Gets very lonely

twilit beacon
#

should i learn a bit of assembly to confuse the teacher of cs since its gonna be one of my majors and theres always an easy-to-do programming part, where you need to write a program that checks str, int, in whatever lingo and then returns some statement just to confuse the teacher who doesent know assembly

#

although ill have to also learn html and some front end + backend stuff for whatever reason

leaden gorge
# slate frigate Life as a solo dev

David created a bug,
David blames David for the bug
David is assigned to fix the bug
David is updating the bug to in progress.
David is creating a pull request
David is set as reviewer
David is making comments about the fix, David is updating the PR.
David approved the pull request
David put bug as completed.

slate frigate
#

@twilit beacon Its always good to know some frontend/backend stuff. Never know when you're going to need to write an api

twilit beacon
#

and pascal, it doesent really make much sense since im more oriented towards actually useful lingos like c++/python or something that is actually used irl

slate frigate
#

Yeah, html. I am a data monkey, I only work in API's and databases, but when I present it to people, they need some sort of webpage to actually use stuff

twilit beacon
#

what lingo do you use for apis

#

c++?

slate frigate
#

Depends on who the user is going to be. Usually eiter python or golang

twilit beacon
#

ah, im still kind of in a predicament about the lingo i want to go main in. So far i have tried c++, python etc. but i dont really know what to choose in terms of job offers and not too big saturation.

slate frigate
#

Always know python, its great for prototyping and general use projects. Never hurts to be competent in it. As for other languages, just pick one you like learning.

#

In my experience, as long as the language isn't too niche, you'll always be able to find a job for it

twilit beacon
#

yeah but like js programmers, i have heard of the saturation there and that its hard to really find a job when theres a million other people who compete against you, not to forget that if they have worked somewhere already its a lot harder for you as a fresh programmer to compete against them

slate frigate
#

I mean, if you're looking at langs like c++, there's always a market for that ¯_(ツ)_/¯

#

Alternatively, I'd suggest finding a field you want to work in, and seeing what the common languages for that are

twilit beacon
#

i mean i really am intrested in working anywhere but the problem is my fear for a "over-saturated" area where it maybe would be harder to find a job

mighty aspen
#

JS does not have a lack of market - you probably just aren't deep enough? js/ts is -almost-all front ends, mongoDB, and any node api... lots of jobbos

#

as a fresh out of college (or in my experience, no degree) person, you shouldn't look at big places - look for smaller companies generally

#

LTT's 'junior JS developer' position is a good example

#

are you actually gonna be a junior js dev? No. You're gonna have to try and do flippin everything and run around like a headless chicken

#

you do that for about 2 years, then you go make more money at some fortune 500 company

twilit beacon
#

i mean, ig that could be good

#

whats like the most looked after language? is it js with all the other stuff like css, html ...?

hexed thorn
#

js has basically gone one-for-all

#

if you need to write some code, there's a good chance that you can in js

#

it won't always be ideal, but it would be possible

twilit beacon
#

i just dont want to make a mistake and start learning a lingo that wont help me in finding a job, so ill take js into serious consideration

slate frigate
#

it always helps. I'm supposed to be a backend dev, yet here I am writing JS for a frontend

grave jasper
#

Ruby, Python, JS, Java, PHP are all probably good choices for a first language. None of them requires diving into memory management before you can grasp stuff like imperative programming (which is the first thing people will learn). C99 is a useful tool to learn how the computers actually work and C in general is a valid choice for low level programming (like drivers).

grave jasper
#

Swift and Kotlin are also good starters, especially if the newbie programmer wants to develop mobile apps and that is their main focus

#

but C++? If it's not gamedev I wouldn't recommend it as a first language

#

it's a bit like teaching someone how to drive starting with a semi-truck. Yeah, you can learn this way, and the concept is valid and it's probably the best tool for some jobs. But it's not a good starting point.

slate frigate
hexed thorn
#

||PAIN.||

grave jasper
#

(or kubernetes, so you can do some devops stuff)

#

I actually crawl local job offer sites and have some automated stats to see how the jobs market change over time

slate frigate
#

Underpaid for what my role is. The joys of a military job

hexed thorn
#

i mean if you are working as a backend dev and do full stack, you are prolly underpaid

grave jasper
hexed thorn
#

a full stack dev is a slightly higher paid job than a backend dev, i believe

#

it's not like you get the double the money or anything, but considerable amount

grave jasper
#

but you don't spend double the time

hexed thorn
#

someone earns double what minimum wage is, doesn't mean they work double the time lol

grave jasper
#

what I'm saying is that I don't full-stack job's be worth double the money in today's market

hexed thorn
#

it's not like you get the double the money or anything
that means that it isn't

grave jasper
#

I've misinterpreted that as a complaint that you don't get double the money

next cipher
#

fullstack is just an excuse to hire one person to do what should be two jobs

hexed thorn
#

if you are a single fullstack dev in a team that deploys to prod, live is painful

wind horizon
#

Full stack doesn’t always mean you handle the entire process, about half my team is full stack and often times the front end and back end portions are split so they can be done in parallel to finish features faster.

Splitting a feature between 2 people that are both full stack also works well since they can both be in close communication and fully understand what the other person / entire feature needs instead of a silo.

slate frigate
wind horizon
#

A good job won’t (normally) over work you even as a full stack, you are just worth more since you can fill in many areas instead of one hyper focused spot. You may not be a pro at both, you may be like intermediate at front end but a back end pro, but you can still take on front end tickets and leave the hard ones to the front end pros for example.

grave jasper
#

It depends what do you call a good job? Do you prioritize salary? Impact on the company? Interesting challenges?

wind horizon
# twilit beacon i just dont want to make a mistake and start learning a lingo that wont help me ...

Sounds like you are early in your career and still learning development and in college. If so I’d say focus on learning the patterns and the basics, hopefully your classes will give you exposure to multiple languages and types of projects.

Programming is a massive field and most parts of it pay well and have plenty of jobs that you don’t need to worry. You’ll more likely excel and get promoted if you do something you enjoy instead of something you dislike just for the higher number of jobs.

wind horizon
grave jasper
#

full-stacks aren't always overworked. I've worked with some companies that wanted a PoC with both frontend and backend and had a really relaxed estimates on delivery date

#

that being said I haven't been a full-stack dev for at least three years now so my experience isn't up to date

slate frigate
#

Personally, as long as the project isn't too big, I prefer fullstack. Means i can design everything as I want it, and not have to change atuff because someone wrote a connector or driver different.

#

Its just frustrating when I get wonky timelines

grave jasper
#

it kinda also depends on how big is the client's company. I don't like working at organizations bigger than ~150 people

next cipher
#

my entire job is full stack PoC work right now

#

I'm not saying it's a bad thing

#

but if they're just hiring full stack on a small team so they can justify not hiring frontend or backend experts, it's not gonna end well

gusty girder
#

Does WebGL ever talk or access the GPU, or is it fully inside the browser?
And how does it compare to WebGPU in that regard?

Is my understanding of this correct?

WebGL -> Browser | Browser -> Angle -> Vulkan/Metal/OpenGL->GPU

WebGPU->Vulkan->GPU
->Metal->GPU
->DirectX->GPU

rancid nimbus
#

WebGPU?

#

I will have to look that up. Web GL is hardware accelerated. You have access to setting buffers and such you have to write a vertex shader and fragment shader to use w
WebGL.

grave jasper
#

WebGPU is the successor for WebGL. WebGL was a thin abstraction layer for OpenGL, WebGPU is a completely new API which can use Vulkan or some weird proprietary APIs like Metal or Direct3D underneath 😉

grizzled steeple
#

I hope this layer of abstraction will prevent WebGPU from being used as a way of fingerprinting ('cause rn most WebGL implementations allow for almost uniquely identifiable fingerprints afaik)

grave jasper
#

Unfortunately I doubt it will, but I also hope it can do it.

gusty girder
#

Got an answer elsewhere, if I understood it correctly it works like this:

GPU Supports OpenGL:
WebGL->Browser->Translation->OpenGL->GPU

If GPU does not support OpenGL:
WebGL->Browser->Translation->OpenGL->Translation->GPU

When using WebGPU
WebGPU->Browser->Translation->Metal
->Vulkan
->DirectX

Both have to still to a translation to the underlying graphics API, but WebGPU is faster because it uses modern paradigms

mighty aspen
grave jasper
#

(which is their main browser combo due to the kind of content they host)

#

Safari used to disable localstorage in incognito in a really odd way - it was reporting that it is supported, but the available storage size was 0 bytes.

#

and customer's code was caching data in user's browser a lot

#

Apple fixed it at some point but I was wondering whether this can be used as another data point for fingerprinting (or at least if it can be used to detect incognito)

keen hound
#

The driver has to implement it

#

There will always be a translation layer
API->Translation->GPU

#

You'll find that on every GPU and it applies to every API

#

If the graphics driver doesn't support OpenGL or there's no graphics driver, OpenGL can be implemented in software without a GPU

rancid nimbus
#

Web GPUs website says it supports GPU compute, so does this mean cuda in a web browser or likely just opencl?

gusty girder
ocean kelp
#

hey might sound strange but anyone know a good way to host 42GB of code to be worked on ? was thinking something like Github but they have limits

midnight wind
#

host the source control server?

#

then yeah github, gitlab, gitbucket, all of them based on git are good, just with different features

ocean kelp
# midnight wind wdym host

i need a place to hold data that can be collaboratively worked on by multiple people and the whole repo will be 42gb ish

midnight wind
ocean kelp
#

i need to abe able to see the audit log so we can rollback if needed

midnight wind
#

not really "audit log" per say, but I get what you mean

hollow basalt
#

dang, 42gb

ocean kelp
midnight wind
#

git tracks all changes and can rollback to any commit

ocean kelp
#

and i need to be able to host a separate thing on the same platform kind alike a read only repo that is 600gb

ocean kelp
midnight wind
#

is this for some organization, cuz that's a whole bunch of code

hollow basalt
#

if it's data. probs better to host own

midnight wind
#

or is it not all source code?

ocean kelp
#

if i cant host the 600gb repo i have a way to send it out to people

midnight wind
#

game?

ocean kelp
hollow basalt
#

probs better to host the satellite better on a blob storage

#

minio or some sht

midnight wind
#

^

#

you ain't getting this for free, github wants people to stay under 5gb per repo

hollow basalt
#

indeed, if you have more 5gb repos. you are probably profiting already

ocean kelp
#

my task is to keep costs down so thats fun

midnight wind
#

I would use some sort of blob storage like @hollow basalt said, b2 storage is an option

#

I belive if you use CDN transfer out is free

ocean kelp
#

problem is i havent even seen the data yet i will be getting it sent over this week

#

they just kind said oh ye thats happening next week

midnight wind
#

the files can be stored on like b2 or s3 separately from the code

ocean kelp
#

nice il have a look

midnight wind
#

Git LFS is an extension that stores pointers (naturally!) to large files in your repository, instead of storing the files themselves in there. The actual files are stored on a remote server. As you can imagine, this dramatically reduces the time it takes to clone your repo.

rancid nimbus
#
def fun(arg1, arg2, arg3=None, test="Hello", *args, **kwargs):
    print("arg1",arg1)
    print("arg2",arg2)
    print("arg3",arg3)
    print("test",test)
    
args = (("1","2"),"B")
fun(*args)

Without attempting to run this, does this look like valid syntax? What do you think the output will be?

mighty aspen
# ocean kelp nice il have a look

you need to use gitignore. it will not actually be 42gb. you will want to have a google drive/git lfs as mentioned* host the assets files (images, models etc) and github for actual code and anything that might be changed. The way you designate those things is up to you.

mighty aspen
midnight wind
#

git LFS does that for you

#

when configured

mighty aspen
mighty aspen
#

actually, that looks really neat looking into it- thanks for the tip

restive cedar
hollow basalt
#

no

keen hound
#

got clion to work on freebsd

silk eagle
#

and yes that's valid syntax

silk eagle
sturdy ingot
mighty aspen
#

Idk, I guess I'm probably not the guy to be calling other things bad practice.
Just seems really likely to be unreadable if you do it often? I guess if you're used to it then whatevz

silk eagle
#

I see no universe where that would be bad practice in Python. Unreadable is more like defining default values at the start of every function and checking if theyre set to something different etc, clutters the code unnecessarily.

mighty aspen
#

I mean, you're effectively making a class (if im correct in how this is instantiated), but you're one-lining all of the defaults within the function declaration.
For general (and again, i'm not a python dev) purpose coding, it would make way more sense to save it as a configurable value in it's own namespace at the top of the function, or even in a higher order function.
Doesn't seem overly cluttered in any other language where ya do that.

#

like, I'd rather see a class with defaults that can be overridden than a single line with 7 static vars? Idk, maybe im the odd one here

silk eagle
#

they arent static, they can be changed when calling the function

#

its also good for having optional inputs from using None as the default value

wind horizon
#

Are you saying function param defaults are bad practice or just the way that function is setup?

The pattern of setting defaults on params is 100% normal and common in many languages. I use it nearly every day at work.

wind horizon
#

I'm a Python n00b, but I will say I have never been a fan of the way Python syntax looks when mixing positional params and kwargs. However with that said mixing default params + kwargs seems like it'd roughly get you something similar to destructuring obj with defaults in JS. I love the look of the JS syntax for that, I hope there is a better way todo this in Python and the example code is just intentionally ugly. 😅

next cipher
#

ideally i would say you should either pass all named arguments, or none

#

but yeah generally you can always use named arguments in any order which is by far the clearest way

#

one incredibly annoying thing about Swift is that you have to use named args, but they still have to be in the same order as the original function signature

#

good for clarity but the whole point of named args is that order no longer matters

wind horizon
next cipher
#

also it supports both optionals and default args, but there's no way to combine the two

#

maybe there's some esoteric PL theory reason why this would be unwise, but it seems quite reasonable to allow some way of specifying "this arg is an optional type and if it's not specified it's nil"

spring pond
spring pond
next cipher
#

yeah sorry both of these are more talking about from the perspective of a call site

#

you have to manually specify like that, optionals don't just do that

#

for example all the apple standard libraries don't do that

dull wasp
#

any degenerate here know Handlebars? This is trippin me up

assuming my names are correct, this should work right? post and comment are two seperate tables I sent from mysql

{{#each post}}
        ... random html ...
              {{#each comment}}
                {{#ifEquals this.post_id ../this.id}}
                  <hr>
                  <h3>{{ comment.comment }}</h3>
                {{/ifEquals}}
              {{/each}}
           ... random html ...
      {{/each}}

My ifEquals helper function works fine as well

full socket
#

Do you think there would be a way to get my work schedule to automatically get filled in in my Google calendar? Like a way to make that work where I can connect the two

#

It's such a fucking pain to add in everyday that I work when I'm working a lot

#

I thought it'd make things a lot smoother/simpler

hollow basalt
#

What's the source of data?

midnight wind
#

^

#

A good api makes all the difference

#

Or it's a pita with web scraping

#

@full socket

hollow basalt
#

@full socket

full socket
#

Ah okay

#

I'd wanna get the data from the website for my work that lists my weekly schedules

#

I apologize for late replies, at work atm lol

mighty aspen
#

hit f12 to open the dev tools, replicate the api call that is getting the schedule data in node.js or w/e, then use that data in google's calendar API to update your calendar.

#

then have it run once daily or weekly or w/e using some form of scheduler ( cron-like preferably imo) and set it to get hosted by pm2 in the background

#

only fun part will be trying to make sure you don't continue adding the same events over and over, so you'll need some kind of check for that

nocturne galleon
#

Currently writing my first gtk app, using the rust bindings, and it's pretty nice

hollow basalt
#

Nice

cloud knot
#

cause if yes, then

lament bridge
#

Is it so far looking all right logically?

or maybe I miss something?

Local save is basically writing to disk
SQL is oviously into the DB

mighty aspen
vague mica
#

Hey guys! I am working on a really cool project that is a social media around memes. If you guys want check it out and and give me some feedback,
that would be amazing 😊. We are in the testing phase right now. DM me, i don't want to spam the link.

vague mica
hollow basalt
#

That's 9gag

lament bridge
#

Is it possible to somehow map a coordinate (X Y only) to a 2D image, that acts like a radar/map? Possibly in LUA

nocturne galleon
#

is there an obvious reason i'm missing for this gtk callback not running when the window is closed? it was working before but i haven't started using git yet for this so i have no idea when it stopped

let lock = lock.clone();
let shouldContinue = Rc::clone(&shouldContinue);
window.connect_destroy(move |_| {
    shouldContinue.replace(false);
    remove_file(&lock).expect("Failed to delete lock");
});
rancid nimbus
#

Is that GTK and Rust?

nocturne galleon
#

Is it the last window? does the program stop after it's closed?

nocturne galleon
nocturne galleon
#

(also the only window)

#

Maybe the program doesn't have enough time to run that code

#

I figured it would finish the event queue before returning from the run function, but maybe

#

Sounds like weird design if that's the issue

#

Not sure about GTK, but Qt you have to change the main loop behavior to not close on last window and close it after executing your code

rancid nimbus
#

If that is GTK, the destroy signal is emitted when the "gobject" is being destroyed.

#

That signal will be triggered when the application window exits.

nocturne galleon
#

then why is it not in this case?

nocturne galleon
#

using idle_add instead of the destroy signal causes the code to run before the close button is pressed

mighty aspen
rancid nimbus
#

You could edit the window close event that the close button is mapped to.

lament bridge
#

Sadly, its too bad the game doesn't support Client Scripts 😦

#

but its a great way to start, thanks

mighty aspen
hexed thorn
#

<@&750150305383186585> ^

#

ty

tranquil wagon
#

why am i getting this error

limpid reef
tranquil wagon
#

oh shit

#

i re-read that like 3 times and ig my eyes were just being stupid

tranquil wagon
slate frigate
#

You mean java ISN'T a plague?

left thorn
#

yall see anything wrong with this

midnight wind
left thorn
nocturne galleon
#

hello does anyone know c++ coding>

hollow basalt
#

no>

silk eagle
#

nobody does

slate frigate
#

@nocturne galleon its not my primary language, but i use it from time to time

alpine girder
lament bridge
#

Can someone tell me why LuaJIT returns different timezone than Lua is it possible to fix somehow to return the correct time?

print(os.date("%I:%M %p", 1653753615))
#

My apology, it seems to be happening with every lua somehow different :/

slate frigate
#

They don't all just do utc?@lament bridge

lament bridge
#

Not entirely sure, but it should return the right time which is 16:25PM. Online Lua tools return the right one, but my PC seems to add somehow 2 more hours...

#
local luatz = require "luatz.luatz"
local function ts2tt(ts)
    return luatz.timetable.new_from_timestamp(ts)
end

local new_from_timestamp = require "luatz.timetable".new_from_timestamp
local get_tz = require "luatz.tzcache".get_tz

local miami = luatz.get_tz("NorthAmerica/New_York")
local now_in_miami = ts2tt(miami:localise())
local mtime = now_in_miami:timestamp() --1653753615
print(os.date("%I:%M %p", mtime)) 
midnight wind
#

try that

lament bridge
#

same :/

#

Also, if you check the timestamp 1653753615 it is really should be different

#

for some reason os.date is not giving the right time..

lament bridge
#

@midnight wind Turns out, i just needed ! to return UTC lol

slate frigate
#

Step one to fixing any problem with lua
1.) Don't use lua

😉

lament bridge
#

XD

rotund zinc
#

um java updated their website

#

am i dreaming

cloud knot
rotund zinc
#

wha

#

i'm so confused i feel like i am dreaming ;-;

cloud knot
peak acorn
#

oh

#

did they finally get a download page that doesnt suck awful

#

I always use amazon coretto because openjdk's download page was so bad

fervent thicket
#

Does anyone know of a software that can be self-hosted etc, where users can connect the platform with custom ms SSO (or build ontop of the software to make this work) and access a dashboard where they can create projects, with projects they can create tickets/reservations, is there something like this that exists or is building it from scratch a better solution?

slate frigate
#

@fervent thicket Jetbrains teamcity/youtrack

willow pond
#

no. i have no idea wat you just said

willow pond
#

idrk

wind horizon
#

“Create projects” and “tickets/reservations” is a bit vague tbh. Kind of hard to suggest something based on that.

hollow basalt
#

would suggest facebook groups

fervent flax
#

if you're at the scale where you need sso though honestly just have the hard conversation with your boss to shell out a few thousand for the fully managed version

#

if you're already using github you could just use the built in kanban-esque dashboard for issues and stuff too

hollow basalt
#

if you have sso, you probably can also invest into the cheapest paid plan

#

Unless this is just experiments

#

like I do, I have a SSO to sign in to websites

ancient sage
#

hello

odd pecan
#

can i link CSS file to HTML without the command "link"?

hollow basalt
#

but why would you need that

raven sky
#

so that onn2.tech site right?

#

from the last video? look at this...

#

it straight up downloads the .exe in html form if you try to get the html page

#

that is so insane, i've never seen anything like it

raven sky
#

how does the browser know what to do then?

twilit elk
raven sky
twilit elk
#

yeah just wanted to check if there was any index.html

raven sky
hollow basalt
alpine girder
#

the server just probably returns the executable on the request

odd pecan
hollow basalt
#

you are using the link not it's not working?

fervent thicket
fervent thicket
hollow basalt
#

I meant I personally use SSO just for experiments and not commercial usae

fervent thicket
#

Ahh I see

wind horizon
mighty aspen
#

that would definitely be a pretty broad task - you'd need a db, sign on within the extension, then handle credential management for the end user

keen hound
#

it doesn't need to have a html page

#

the browser connects to the web server at onn2.tech, the web server then serves the .exe file instead of the .html one

#

that's basic HTTP

midnight wind
midnight wind
#

but it isn't an html file

#

what is really happening

#

redirecting you

raven sky
slate frigate
#

They're called mime types, they hint to the browser what to do with the response

#

In this case, the response is likely application/octet-stream, or something like that, which the browser "knows" to download

hollow basalt
limpid reef
midnight wind
#

at first I thought it was some sort of virus/malware...

limpid reef
#

Heya @outer zodiac feel free to ask questions about Discord API here in da #development channel. 🙂

outer zodiac
#

Guys my friend needs help, we making a Discord bot and...

midnight wind
#

So yes

#

Just use a library to handle it all for you

#

You can just get any random message, the bot needs to be in the same server and with read message intent enabled. If you don't need to like make a mod bot, but just want commands, use the slash command API, which will be more supported by discord moving forward and you can do cooler stuff with

nocturne galleon
mighty aspen
#

might i suggest the JS discord bot framework (forgot link https://discord.js.org/#/ ), especially as the discord team list https://github.com/discord/discord-interactions-js as the officially supported api interface lib

not that it -really- matters, but typically it's easier to do stuff the way the developer intended

GitHub

JS/Node helpers for Discord Interactions . Contribute to discord/discord-interactions-js development by creating an account on GitHub.

mighty aspen
wind horizon
#

Personally I hate Discord.js, I think it was poorly designed and documented. Directly using the API was a lot easier for me.

Maybe it has improved though it’s been a long time since I used it. I just remember when I did there were parts of docs completely missing and other areas that were outdated and you had to dig into their code or go look at examples.

But it’s prob moot point in any case since they specifically asked for Python. 😅

mighty aspen
wind horizon
#

I think my big surprise was Discord was recommending it, but it’s actually not official Discord SDK it’s just the most popular one. Right?

mighty aspen
#

discord.js isn't official, but the other link i posted with the js interactions lib is

midnight wind
#

it's just a helper lib

wind horizon
#

Also now no TS last time I used it, I think someone had formed to make a Discord.ts also maybe by now their is a ‘@ types/doscordjs’ idk

#

Wow ok didn’t mean to @ mention haha

midnight wind
#

there's several deno discord libraries

#

deno supports ts by default

#

but they aren't as beginner friendly like discord.js

wind horizon
#

Well with discord just being APIs I don’t think we really need specific libraries usually, just one solid JS one with typings then that can be used to build other tools or frameworks.

midnight wind
wind horizon
#

That’s why I wish Discord would release an official JS SDK that was well maintained and documented with typings support. Then let the community do its thing building more tools with that SDK.

midnight wind
#

yeah

#

working with like quickbooks was easier than discord for me lol

wind horizon
#

Hahaha now that’s saying something

#

Slack is super easy since they at least used to have official libs and docs. Idk been a long time since I touched that

midnight wind
#

Intuit also have pretty damn good docs and libraries

#

sandboxes for testing

#

implenting oauth2 has been the hardest part

#

especially with my inexperience with django

wind horizon
#

Nice, I know financial products can sometimes be a pain so great to hear that.

rancid nimbus
#

Does anyone have any good resources for sending data between a tokio process and a gtk normal process when both are needing to be run in parallel. This is in the rust programming language.

oblique remnant
rancid nimbus
#

I found a way with "mpsc::channel" from the tokio::sync::mpsc package. One thread is sending ans one thread is receiving. In concept I can adjust the UI when this second thread sends some data.

cobalt mulch
#

I legit cannot learn any programming language because I keep learning bits and pieces of every language without focusing on one because the dopamine goes away I’m so frustrated with myself AHSUSHSHAHHSUDNSHS

#

Been happening for over a year I think I have mental illness or some learning disorder

rancid nimbus
cobalt mulch
silk eagle
#

and just repeat that, a different project each time, maybe similar in some ways but touching on different topics

#
  • once u learn how to read the docs of whatever you're working with, you can improve much faster. so if you're working with a module in python, for example, and you're reading a quick tutorial about it, go to the documentation of that module and see what you're really referencing in your code. can find out neat features you didnt know existed, or little bits of information about something that could come in handy when troubleshooting, but most importantly you learn how to read the docs
wind horizon
#

Yup solid advice given above, just pick something and go. Stop worrying about what’s the right language. It’s much easier to learn another language once you know one, so just pick one you enjoy but ideally isn’t too difficult like Python, JavaScript, Ruby, etc and just start doing something.

Once your learn to read docs and debug your code / solve your own problems things will start chugging along.

Scripting is often an easy way to get started, you can do simple automation scripts that do things you did manually like copying some files around or if you have any smart home stuff like Hue bulbs you may be able to interact with their API. Simple victories keep you going, big huge tasks get draining and when you fail to overcome it you feel worn out and demotivated, often times resulting in giving up or at least taking a break from learning.

Programming is easy to get started, but hard to master. Enjoy those small victories of getting started. In fact I miss that experience of how exciting and fun it is when you write your first few programs to automate things or learn to control something with your code. It’s an amazing and addictive experience imo.

hollow basalt
#

Programming.

cloud knot
gaunt holly
#

how do I hide my api key in github

#

i;m not using nodejs

grizzled steeple
#

You can put the API-Key into an environment file and put that into .gitignore

gaunt holly
#

how can I access the env file

grizzled steeple
#

Depends on the Language/Framework you're using

#

With NodeJS I could tell you, same with VueJS...

#

Google is your friend I'd say...

gaunt holly
#

I'm using plain js

#

just html,css,js kinda stuff

#

i should've said I'm not using npm

grizzled steeple
#

Rule No. 1 of the Web:
Anything clientside is not a secret

gaunt holly
#

I made a weather app

#

Which has this api is from open weather api

#

Api id*

#

Should I hide it or maybe just leave it there, GitHub warned me on my mail so i was concerned