#development
1 messages · Page 88 of 1
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
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
@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.
I have rebased in the wrong order with intellij more than I'd like
At least 3 times
thanks, do you mean you personally do not think its stupid, or that you do not personally put confs in public repos?
he personally do not
Overall it's not unsafe. They personally do not put configs in a public repo
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.
thankyou both
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)
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
to clarify, the git bash installed is just a reskin of msys2, which is very useful for windows development
how to embed in html
😐
nothing helpful comes up
"how to embed a scratch project in html 💀 noting comes up
scratch
ye
thas what i have so far, the one there is from the example teacher gave
ok
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
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.
Sounds like your list is undefined. Try inspecting it with debugger or printing to console/standard out.
Seems like it's empty, weird. (printed the first element of the array)
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
Looks like your state is fetchedData not list. 🤔
yeah I make a copy later in the render() function called list
In this code you shared you destructured list from state. But looks like your state is fetchedData
const {list} = this.state;
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.
ah so this.state is always empty, right cuz I assign fetchedData only in the constructor silly me I forgot about setState
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)
I commented out .then((body) => body.json()) because the format is set to JSON in the URL already
fetch(baseUrl + endpoint)
.then((body) => body.json())
.then((result) => {
this.setState({fetchedData: result})
});
I have it like this, I'm still getting the undefined error at list[0]
I'm new to react native so pls no bully 
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.

Can you share full code, maybe past it it into something like codesandbox or one of those sites you can save and share code for free / easily. Don't need to send all files, just copy past this full file.
Little hard to follow single lines. 😅
sure thing
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Thanks, so list isn't in the fetched data either. Look at the JSON here: https://musicbrainz.org/ws/2/artist/?query=coldplay&fmt=json
(Suggest either an extension to make it easy to view or if you are on FireFox they have a good built in viewer that should work out of the box)
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.
Forgive my newbie self for asking dumb questions but I'm a little bit lost here. So as I understand it, I first initiate this.state to an empty array called fetchedData, then JSON stuff gets fetched and with this.setState() the data is saved to both fetchedData and state, am I missing something here?
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
You are initiating state object to have a key of fetchedData with a value of empty array or in the above example I sent empty object.
The state is an object { key: "value" } and you can have any key value pair you want in it. On updates to the state you can change the state and that will cause the component to rerender (reruns the render code).
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.
I didn't know state was a key/value combination, I should maybe have another look at the basics 😅
I also thought list was just a random variable name that had no relation to state you know like declaring int x = 5;
this explains it very well 
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"
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 😅
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
We help, but not those who doesn't help themselves
does any one know app for face reconginsation , dm the link to me
also and seperately, take a look at useState. May be more intuitive for you, and is also more in line with real world work
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);
more info here (look @ example using hooks) https://gilshaan.medium.com/react-native-hooks-how-to-use-usestate-and-useeffect-3a10fd3e760c
pen and paper
microsoft excel
iframes? 
Vim
theres this one stack overflow post I want to send but I can't find it about compiling an image with c++ code
Vscode(ium) is good imo, though a lot of people recommend visual studio
@warped gulch i like Jetbrains Clion
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
What does (ium) mean
that vscodium is also an option
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
Who actually recommends VS over VScode
i have heard at least 2 people, which is a lot considering i don't talk about vs v vscode that much
school people usually
I still dont know how to get vsc to properly suggest stuff
Do you have your language's language server?
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
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
i get
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
can i get a explanation im confused and dont understand
Purely depends on the project, most of the time I'll use code though
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
I've a web site made of some folders, one for each section (info, news, blog etc...).
In each of these folders there is an index.php file that should load a layout (common to all). These are stored...
I want to find a method to include some files based on the current file path.. for example:
I have "website.com/templates/name1/index.php", this "index.php should be a unique file that I will use in
I’m developing a social life
thank you real much i will read these and ask qns again
really appreciate it man u guys were the only people who actually replied to my issue today
❤️
what music are they dancing to
Haddaway - What Is Love
Trying to install these two files
http://ftp.gnu.org/gnu/bison/
https://github.com/westes/flex/releases/tag/v2.6.4
and I am so confused as to how to start using these on my pc as there is no straightforward "install" for these ones
I think both need to be built from source, flex has instructions in the README.md and bison has instructions in the INSTALL file
The flex distribution contains the following files which may be of
interest:
- README - This file.
- NEWS - current version number and list of user-visible changes.
- INSTALL - basic installation information.
i cannot see any INSTALL file anywhere'
even on the repo
ill just follow this instead: https://www.youtube.com/watch?v=0MUULWzswQE
our university did not state anything about installation shit so im going in blind 
Install Flex and Bison which are lexical analyzer and YACC, respectively, on windows.
Steps to execute .l and .y extension files in windows.
Mentioned Link: http://twineer.com/19O2
Music: https://www.bensound.com
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

Seems kinda sketchy that the university didn't give any info on this 😄
Pardon if I am not very familiar with these, typically im used to .exe's, or proper github installation shit
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
I mean if you're already into compilers. you should have a general direction on how to install things
Hey guys!! I have a question, how would I go about putting the following code into a trace table?
<?php
- $names = array("Tom", "Richard", "Harry", "Sally", "Jo", "Milli");
- $namesCount = count($names);
- for ($i = 0; $i < $namesCount; $i++) { $value = $names[$i];
- echo "{$value}\n"; }
?>
your homework?
Yeah @hollow basalt
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
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>';
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...
why are you using numbers for the columns intead of var name
https://www.codegrepper.com/code-examples/php/how+to+print+a+table+in+php+from+database < example of how to use html table
$connection = mysql_connect('localhost', 'root', ''); //The Blank string is the password
mysql_select_db('hrmwaitrose');
$query = "SELECT * FROM employee"; //You don't need a ; like you do in SQL
$result = mysql_query($query);
echo ""; // start a table tag in the HTML
while($row = mysql_fetch_array($result)){ //Creates a loop to loop throug...
I feel like most CS classes lose sight of the forest for the trees
Weeds
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.
The numbers outer layer of numbers, are meant to represent the position in the array. The 0s are meant to indicate no output
Not a fan of js, but its a necessary evil
that is how it is taught to you?
Been trying to transition to this
Yes 😐
Brython
project been there for a while, doesn't really take off
people love their JS and frameworks way too much
Tbh and personally, not worth sticking with python unless you're looking to deal with academia - real life is all js/sql/c#/java
CyberSecurity. It's python the whole way down
for web developer like you, yes
I'm not a web dev <33
then I don't know why you don't see python
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
It's a pain
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?
Worked at google, and doesn't bring up golang, smh 😉
never, never ever
Not a fan?
Yeah, I actually have it up rn. Also this is what the instructions are for the task:
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
Like.....I understand the code and what it's doing, but I just don't get the trace table stuff
post that template if ya can - your teacher is using the word trace table wrong, need to see what they actually want
This is some old stuff
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.
Much easier to work with than like C
Blame my teachers xD
It totally depends on what you're comparing it to.
commonJS almost always wins in that department, anything that's C/C++ is going to be slower than C#/Js/Py or other third level langs for rapid iteration... doesn't mean you can't do it, just means you need to have a higher level of knowledge in it to match a lower level of knowledge's rapid iteration in another language
Have they by any chance worked at UPS
I find a common theme for older programming teachers is that they worked at UPS
^ is that a thing? makes sense i guess... muh gubments
I want to say yes. Also the school website is easy to reverse engineer
Wdym by reverse engineer
A websites source code is kinda public
Unless you mean the backend
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?
According to one of the students in my class, yes
That's fair. I guess I can't do a personal comparison with js, as its never been something I use beyond throwing together a simple script for a webpage. Its always been py/go/c's for me.
Doubt
ye, i mean it's largely inefficient in resources but much faster to work in commomJS vs typescript, and then faster still for commonJS vs c++ but all depends on the person
Prob just went into inspect element, look I'm a hacker now
@mighty aspen Look at this monster
https://github.com/robertkrimen/otto
my mans made a browser.. my head hurts
Idk these days I think I’m almost faster in TS, since it catches mostly silly mistakes for me. I guess the one edge case is if I’m doing something overly complex, but if I’m trying to iterate fast I just toss on //@ts-ignore until I have a final version then I can go back and type it proper.
these are truths. If I'm shooting for something with iterative-ness in a framework, TS can be faster - especially in front ends, specifically angular/ionic.
most anything else is faster commonJS tho, imo
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)
Woah I wonder if we ever crossed paths without knowing it. I happen to work at one of those too. 😅
The nice thing about deno, native TS
I haven’t tried Deno yet myself, looks like it is written in Rust? 🤔
Also sandboxing, nice.
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
}
Python is much more than just academia. Also other languages are used a lot, PHP, Ruby, Kotlin and even new and niche languages like Elixir are popular enough to easily land a job
Heck, it's probably easier to find a good-paying job in Python than in Java 😉
That’s an interesting thought. I’d say I often see more Java openings, but I have 0 context on Java pay. 🤔
I've coded both for money, but I'm currently mostly doing Ruby
agony
My experience is java pays much better than python, but it totally depends on where you're working more than what you're coding in. python is generally considered newbie stuff, unless you're working in ML/AI - not that it should be, I personally strongly disagree with that, but muh big business
I don't usually work for larger companies
i've noted a lot of DOD stuff is java based, so that definitely skews it as well
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
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
(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
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 🤷♂️
Note that salaries for devs are higher in US 😉 It's rare here to get something above 160, but it's possible
That’s true I guess, I’m on a great team but there are like 10x more devs not on my team building downstream service and support tooling.
consider yourself lucky then 🙂
^ 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
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
I enjoyed RoR, but found node easier so mentally I can start in one language
But I've had my share of interesting tickets (like doing a Proof of Work at login to throttle down credential stuffing attacks)
I should note that was comp with rsu and bonus, base were much lower like 100-150 range.
Also you have to pay for the healthcare much more and cost of living there is higher than here
Yeah, thankfully most dev jobs here either pay your healthcare or give it to you dirt cheap. But it’s often a nuts deductible. Like $3k
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.
it's much, much cheaper here
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
I don't like this approach as it pretty much solidifies the NYC/Bay prices. You can find good developers in more places, pay them without the location factor 😉
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.
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.
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
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)
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. 😂😂😂
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 ¯_(ツ)_/¯
I was tempted to ask a friend to let me use their address, then just vpn to CA. Lol
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
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.
here most of the devs are running sole proprietorship, so they do their own taxes and client doesn't have any insight into it (other than company registration number and other public info)
Is there high self employment tax there? Here in US that can kill you, it’s annoying you pay higher tax under self employment than you do working for someone else.
It the whole reason I stopped doing contact work, I was getting killed in taxes.
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. 😂
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)
Oh nice, sounds pretty easy if you go the 12% way.
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)
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%
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
Also if you were in bay you had that extra CA income tax prob. Lol
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
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.
c2c is easy, just charge 200%. that's actually industry standard
Plus 10% more for every annoying question to make it worth your sanity.
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.
I'm a consultant, I usually ask stupid questions because I'm often the outsider in the project 😄
consultant work, i ask for 150-200, depending on complexity
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 🤔
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.
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...
Well I meant as in their value, like the HSA, health insurance, etc.
it's good to at least leave them in a stable state and recommend some replacement, often pays off in the long run
That's true, with our social insurance here it's easier to switch clients
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
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
Yeah I did it 2 other times and I believed in both products, but the execution wasn’t there and I was only there to code didn’t have time to dedicate to the business. So I swore them off, but with it being my old co-workers that I liked working with I was like sure let’s try this again. Haha
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
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. 😅
¯_(ツ)_/¯
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
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)
quite a lot. Braintree is written in Ruby, I've even worked with them for a week, Stripe too I think
Shopify I think as well, right?
that's ecommerce, but yeah, it's also written in RoR
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.
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
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
Ruby's namespaces and autoloading rules are insane. People often make fun of PHP, but at least you can see what a standard autoloader is doing in that language, Ruby is something else.
I only wrote one thing in ruby, a meterpreter script. Decided very quickly in that process it was not for me.
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
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. 😂
because it's still funny, event loop on the server is definitely an odd concept, even though it has it's own benefits 😄
Virtual env is annoying, but Poetry in Python now makes a lot of that stuff easy. Also docker ofc helps a tone. But even then I still remember having some annoying challenges with like caching the venv after install between layers and thinking dang this so easy in like every other language. Lol
I know it got better over time, but still, nobody does "sprint 0 for setup" except for Java and Python guys 😄
Yeah it works great for async tasks, but when you are like working on data and reporting it’s harder I think. I do think it can help push ppl into streaming data, which is great for large data sets, but I think it slows down dev process for working with data esp if your data sets are small enough you don’t need to stream.
I blame a lot of that on projects that over import stuff, when they would be better off writing their own implementation of something of it, instead of importing an entire module for a single object.
Splunk's client module is a PERFECT example of that
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
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
true, but also in the projects I've seen the python's zen "There should be one— and preferably only one —obvious way to do it." is more like Perl TMTOWTDI in practice, because every for single one of them the obvious way is a different one 😉
Also their APM platform is meh in comparison to DataDog or New Relic. But now I’m just splunk hating for fun. Lol
Yeah it’s like Jira making their own query syntax, it’s like jql right? Who wants to learn how to query in a specific paid product. Let me just reuse my typical knowledge of common sql and nosql syntax. Lol
OH GOD. Having to query it as if was siem'd data, when the metrics should be WAAAAAY easier to access
I really liked New Relic and since I'm working with performance I've spent a lot of time with it. I've also worked with DataDog and I even know some of the devs from that company. But TBH nowadays I'm mostly using ElasticAPM, because DataDog's pricing exploded and New Relic UI got unusable
I haven’t used EslasticAPM yet.
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"
Jira was (and still is) a dominant player in the market, so they are often trying to enforce their proprietary solutions. I'm really happy I don't have to work with Jira or any Atlassian products anymore
Every dev job, legit every dev job since my first the majority of devs disliked Jira. Can’t believe it hasn’t been replaced yet. Lol
that's how I got a contract at one of the cloud providers. They've asked me what's wrong with an endpoint and told me that devs suggested to add more CPU to the database server, but in reality it was an endpoint serializing like 500MB of JSON, most of which wasn't used anywhere 😄
Thankfully the DevOps team takes care of that, most things I ever need are indexed and 90% of the time I come into it from the APM side so I have a proper trace. I just hate the ux.
Well, did you put in a jira ticket yet to remove it? ( ͡° ͜ʖ ͡°)
they don't get to pick and management loves Jira
Replace the management lol
Every dev should get one "Remove this manager" card a year.
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
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'
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
Yeah those use cases are nice for NoSQL style DBs
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
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"
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
I mean that’s common in reporting, since it’s structured and makes communication into other systems easy. I often just made a report or used scripts to stream out of mongo to a transformer in node into a file on either file system or bucket storage.
you're still lucky, sometimes they ask for 'excel file' not knowing what CSV is
Thai I always denied, but I was in a position I could. 😂😂
@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.
you could open a CSV file, add 1 column, 1 row which happens to be JSON
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
I told them if they can't parse json, they aren't worth anyones time as analysts, and left the call
not only in healthcare, I don't really work for polish clients anymore but I had my fair share of public administration projects and they've always asked for "Excel with some database"
I got a talking to after that
We had “data analysts” aka Excle power users and they were always the problem makers.
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
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
JFC
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.
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.
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
Seems like you’d need more of A/B testing in the same/similar traffics type to draw a real conclusion. Lol
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
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.
it's like people who go to conferences to hear about new tech, but keep writing the same code over and over again
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
exactly this 👆
And devs aren't free from that bias. I can't say how many times I've seen people putting decision about some architecture or something else for a 'vote'. It's not a popularity contest, discuss pros and cons, arrive at a conclusion instead of voting.
That's nice. Every time I have a "higer up" go to a conf, they want to change EVERYTHING
Yeah I think voting is only useful when you can’t come to an agreement and it’s like tooling related. Like should we lint for alphabetically sorted keys in objects or not.
yeah, you have to separate marketing talk from evangelists from good programming talks. It's easy to mistake them 😄
I don't vote on those, I'll use whatever the team prefers, but if there isn't anything I'm usually happy with the language defaults.
Yeah I’m pretty passive on them too, my only thing is if it causes friction it should be automated if possible. I’m against managing devs workflows, so let’s automate anything we can if we want to push opinionated things on our code / workflows.
That's were being the only dev on my team is nice. No voting, no arguing, its my way.
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.
also fast, I don't want to wait for a linter longer than a couple seconds for a full codebase scan
no reviews though, nobody to have a discussion with about a problem
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
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
That's true, I often will skip running all unit tests since there are too many and it's slow. I lint + run tests for my code paths, then push and let CI run the entire test suite on it's own time while I move onto something new. lol
fixing slow test suites is something I see more and more. I had a client with 8 hour long test suite and then another one with 1 hour but on a 56 core machine. Nobody ran this stuff locally because it was too slow. I've managed to trim down the latter down to 15 minutes on that 56 core beast, but fixing it to run locally was too expensive for them.
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
Ok 8hrs is excessive, by slow I was complaining about anything over like 3mins since i don't want to wait around that long, LOL
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)
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
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
(Idk the real cost, but I heard that our logging alone cost over mil.) lol
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)
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.
oh, the last case is GH actions, but a self hosted runner since the provided one is also 2vCPU 😉
oooh
Jetbrains has a nice CI/CD product
pr0tip for GH Actions - you can use them for free if you host the runners yourself 😉 and many people have their homelab servers
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.
You get to decide which one to use per job
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
Tbh I don’t know
I mean doesn't matter where I work now it's all crap Jenkins jobs, but thinking past jobs. lol
I havent seen people using both since they have a vastly different use case
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
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 😉
That's true for Mac, always forget that's a thing for apple apps. lol
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
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.
NAS + Plex and networking stuff like pfsense is basically a homelab for most people 😉
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
I've got a similar setup minus pfsense, plus pihole and piaware
I don't really play with any of that stuff, it's all like out of necessity / actual used daily.
well, you already have a server to play with, since you have Plex 😉
or is it running off the NAS?
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.
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
I have the laptop + NAS + fitlet2 for psense + some switches & WAP.
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
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
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 😉
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.
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
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
Oh, that's a different story then, I rarely rewatch movies
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.
makes sense
But yeah movies I don't rewatch much, mostly it's TV I rewatch from Plex a lot.
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
Like South Park, The Office, etc.
Yeah, I get it
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.
I don't know if I have a bluray player other than my XSX, PS3, PS4 and PS5
I just bought a cheap drive I plugged into the PC for ripping lol
ironically the only thing I buy on discs anymore are console games
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
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.
I didn’t try the main story, wasn’t a big fan of the Halo infinite multiplayer so didn’t buy the single player.
I haven't even launched any Halo game in multiplayer since I don't like playing with people I don't know
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
I was more into Quake and UT those days
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.
I have a small group of friends with who I mostly play Zero-K, but sometimes some other games
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
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 😉
An open source game could be dangerous for me, feel like I may fall too much into it and spend my time gaming + coding. 😂
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
That’s alright I only use Mac for work
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
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 😄
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
set up some alerts next time
Excuse me sir, my homelab is held together with duct tape and twist ties. You think I'm sophisticated enough for that?
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)
Ugh, you're right. I should write something
I've kinda setup grafana for alerts
Honestly space are things commonly monitored, but you can just enable something built in or free todo it.
same, it's all barely working
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
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
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.
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
I don't know much about it but I think things like controllers or headphones report battery usage too. I'd look at linux for examples
It's been a while since I saw any low level code for hardware, but I remember there were fields in USB HID for generic device usage, and battery indicator was one of them: https://www.usb.org/sites/default/files/hut1_2.pdf, page 77
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
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)
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
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)
yeah, i need battery charge, status, health, cycles and temperature
if you need this much data it's definitely custom
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
what are you building?
a handheld walkie talkie using codec2 for audio, ChaCha8 for encryption, support for sending GPS coordinates and a couple more things
ooh, sounds interesting. Is this something you plan on releasing to public or is it a personal project?
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
cool 🙂
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
any decent alternatives with an FPU?
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
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?
idk i just like usb.
i like using standard interfaces since they were invented for this purpose
thats fair
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
If you use a Linux USB client then you could look at free decent examples or enable some USB gadgets.
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.
At least it now doesn't choose the wrong option the first time.
The university's module on FLEX/BISON absolutely sucks
have to actually rely on a youtube video that does better explaining
starting with this guy https://www.youtube.com/watch?v=54bo1qaHAfk
This is a two part video tutorial on lex and yacc. This first screencast will introduce lex / flex, the UNIX tokenizer generator. A short introduction to lexical analysis is followed with an overview of lex, and some code examples. We then demonstrate how to integrate the tokenizer generated by lex into a C program. You can download the sourc...
@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
make it play an annoying sound and it seems feature-complete to me
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 😉
Actually a good idea
1.5 steps forward, 1 steps back. 😔
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?
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?
did you run the program before asking here
the value of i is always between 0 and 10, inclusive, it is only ever modified in the loop head
i'm not sure how to explain nested loops in a way that isn't confusing tbh
yeah
what pattern did you see?
(i'm explaining it to you based on your observation)
there's one thing im not understanding tho. like, when i run it, it goes 1-10, 1-9,.....,1. so i just dont understand whether it turns the value of i into negative numbers or whether it deducts the value by 1
but i also dont understand in what way it deducts that 1
1 is never deducted from j, instead what happens is:
- the outer loop runs 11 times
- each time the outer loop runs, the inner loop runs 10-i times
- the value of j, which is between 1 and 10-i is printed, without a newline
- a newline is printed every iteration of the outer loop
does that make sense?
so the starting number increases while it ends by 10-i?
like 1 and 10-i, 2 and 10-i?
@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
ohhhh
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
im kinda starting to get it now. so basically i increases and 10 gets deducted by it
yep
yep
yeah i get it now
thanks guys
so this is correct way to do the FC, right?
@hollow basalt@slate frigate
uhh no
you don't copy paste code into the flowchart, you abstract the code nto logic
so i gotta iterate it in words
kinda of, yeah
but what abt the flow tho? like other than the codes pasted there
(from google)
think of a flowchart as explaining the program iinto someone who doesn't code
yeah makes sense
but as far as the flow of flow chart goes, its correct according to that code i mentioned above, right?
i mean the way you structure the condition is confusing. hence you need to break down the "for code" into something more flow-charty
okay thats good
i will change that up so that it fits accordingly, but its a relief that i got it right
maybe it's just me, but flowcharts makes the algorithm much more difficult to understand than a properly structured code
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?
sometimes for newbies I need to show a flowchart for them to understand
some people understand logic easily, others don't
This tbh, flowchart helps you to understand if you're not yet good with coding.
But as time flies by, code is easier because it becomes intuition
Yeah they get all worried about the syntax
algorithms >>>>>>>>>>>>> flowcharts
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?
this is the code
garbage value as u are not initialising the array
that makes no sense
flowcharts show algorithms
check this out if i print the array without initialising 👇
wait wot
but algorithms r without shapes
so how do i initialize it?
algorithms can be represented as written steps, yes, but they don't have to
ohhhh
can i do that at the start? like just putting in 0 after int myarray[5]
what do u mean by writing algo? u mean pseudo code?
no
algos can be represented as pseudocode but they don't have to
nah -_-
technically yes you can
lmao gotcha
ye that can be done
why I like vectors better
ye much better
not fixed length so less messy
modern cpp supremacy
one of the worst things about cpp is the tooling
writing plain c++ with no dependencies, pretty simple
c++20 modules seem really nice
👆 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
yee. I would go first language either Python or C (C99). still had easier time learning cpp than java..
C also suffers from bad tooling
Dealing with dependencies is a pain
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.
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)
well yea, because C/C++ dependencies normally are installed using system package manager
Unlike more recent languages where they include those already
Works great, unless you're on windows. Then pain.
cursed MSVC
Then the pain when they aren't in repos
Yea, modern PL package manger are easier to work with.
It's alot more welcome (imo) for people to upload their modules
Life as a solo dev
Gets very lonely
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
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.
do it in brainfu*k -
@twilit beacon Its always good to know some frontend/backend stuff. Never know when you're going to need to write an api
i mean, ig the mySQL part may be, but html?
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
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
Depends on who the user is going to be. Usually eiter python or golang
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.
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
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
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
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
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
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 ...?
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
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
it always helps. I'm supposed to be a backend dev, yet here I am writing JS for a frontend
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).
hey, that's what we call a full stack dev
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.
It's what we called underpaid
||PAIN.||
not really, if you know for example ruby the easiest way to get a 30-50% raise is to learn typescript 😄
(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
Here is an example screen: https://ibb.co/Kjvsd1L
Underpaid for what my role is. The joys of a military job
i mean if you are working as a backend dev and do full stack, you are prolly underpaid
not really 🙂 For smaller projects it's easier for one person to code frontend and backend. When you do UI/UX design stuff, then you are underpaid
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
but you don't spend double the time
someone earns double what minimum wage is, doesn't mean they work double the time lol
what I'm saying is that I don't full-stack job's be worth double the money in today's market
it's not like you get the double the money or anything
that means that it isn't
I've misinterpreted that as a complaint that you don't get double the money
fullstack is just an excuse to hire one person to do what should be two jobs
if you are a single fullstack dev in a team that deploys to prod, live is painful
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.
Agreed on your points. Most of the time my frontend is limited to just throwing up a rest api, but this time around im also doing ui/ux/creating all the static resources
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.
It depends what do you call a good job? Do you prioritize salary? Impact on the company? Interesting challenges?
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.
Well I consider not being over worked part of a good job. 😄
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
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
it kinda also depends on how big is the client's company. I don't like working at organizations bigger than ~150 people
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
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
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.
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 😉
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)
Unfortunately I doubt it will, but I also hope it can do it.
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
not really- but there's a lot of other ways. local storage is one - sure you get a popup depending on OS but until the localstorage is deleted (and typically that's not checked by default) it's a solid fingerprint
that reminds me I had a customer who complained about site being slow in incognito on safari
(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)
GPUs don't support specific APIs
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
Web GPUs website says it supports GPU compute, so does this mean cuda in a web browser or likely just opencl?
better like this?
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
wdym host
host the source control server?
then yeah github, gitlab, gitbucket, all of them based on git are good, just with different features
i need a place to hold data that can be collaboratively worked on by multiple people and the whole repo will be 42gb ish
what one would you recomend
collaboratively as in using git? or something like real time collab?
git
i need to abe able to see the audit log so we can rollback if needed
not really "audit log" per say, but I get what you mean
dang, 42gb
ye ik
git tracks all changes and can rollback to any commit
and i need to be able to host a separate thing on the same platform kind alike a read only repo that is 600gb
ye thats what i need
is this for some organization, cuz that's a whole bunch of code
if it's data. probs better to host own
or is it not all source code?
if i cant host the 600gb repo i have a way to send it out to people
game?
600gb is Satellite data
42gb is code for a game
ye ik
indeed, if you have more 5gb repos. you are probably profiting already
my task is to keep costs down so thats fun
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
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
for tracking big binary assets (not code) look at Git LFS
the files can be stored on like b2 or s3 separately from the code
nice il have a look
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.
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?
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.
what language? but no, generally. defining the input to a function is one thing, but typically you can't statically set inputs to a function while defining the function.
nope
git LFS does that for you
when configured
fair 'nuff, haven't used git lfs - we just host it on gdrive or confluence
sounds like a pain
actually, that looks really neat looking into it- thanks for the tip
hey, anyone willing to look into that?
https://www.reddit.com/r/learnpython/comments/uue1e5/help_removing_extension_on_obs_script/
no
python
got clion to work on freebsd
output will be:
arg2 B
arg3 None
test Hello```
and yes that's valid syntax
in Python, you can set arguments to a default value when defining a function
so you can do:
def barbeque(value1="value1"):
return value1
print(barbeque())
print(barbeque("not 'value1'")
output:
value1
not 'value1'
Eh, that's valid syntax, sure, but mixing **kwargs, *args and default-valued args sounds like a plan for nice agonizing debugging sessions.
that's neat, but I have to say that's incredibly bad practice in general...
But I mean, if it works, it works lmao
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
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.
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
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
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.
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. 😅
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
That does sound super annoying.
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"
you don't have to have named args, its just highly encouraged for readability
not sure what you mean by this, i've used signatures like func doSomething(with a: Type? = nil)
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
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
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
What's the source of data?
^
A good api makes all the difference
Or it's a pita with web scraping
@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
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
Currently writing my first gtk app, using the rust bindings, and it's pretty nice
Nice
is there an ical URL for your work schedule ?
cause if yes, then
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
lots of ways to optimize that - the sql itself checking if player is already in DB or inserting if its not should be a single operation
here's more https://chartio.com/resources/tutorials/how-to-insert-if-row-does-not-exist-upsert-in-mysql/
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.
so reddit?
In steroids
That's 9gag
Is it possible to somehow map a coordinate (X Y only) to a 2D image, that acts like a radar/map? Possibly in LUA
ofc it is
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");
});
Is that GTK and Rust?
Is it the last window? does the program stop after it's closed?
Yep
Yep and yep
(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
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.
then why is it not in this case?
i'm not sure how that could be useful
using idle_add instead of the destroy signal causes the code to run before the close button is pressed
https://github.com/liamdurham/HoloMap
That is done in lua in this repo
You could edit the window close event that the close button is mapped to.
Sadly, its too bad the game doesn't support Client Scripts 😦
but its a great way to start, thanks
doesn't need to have client scripts, does it? there's probably some sort of console command or soemthing that will feed you x/y/z in the game space, then you can import that over a static map image and either overlay it or have it on another monitor
why am i getting this error
I avoid JAVA like the plague, but it would appear you have a typo.
thank u very much :^)
You mean java ISN'T a plague?
yall see anything wrong with this
token stealer
Thx
hello does anyone know c++ coding>
no>
nobody does
@nocturne galleon its not my primary language, but i use it from time to time
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 :/
They don't all just do utc?@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))
it's America/New_York
try that
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..
@midnight wind Turns out, i just needed ! to return UTC lol
Step one to fixing any problem with lua
1.) Don't use lua
😉
XD
and openjdk is now https://adoptium.net/temurin/releases/?version=11
AdoptOpenJDK has moved, the blue download button will take you to the new location.
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
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?
@fervent thicket Jetbrains teamcity/youtrack
no. i have no idea wat you just said
idrk
“Create projects” and “tickets/reservations” is a bit vague tbh. Kind of hard to suggest something based on that.
would suggest facebook groups
Google “self hosted alternatives to jira” and you’ll find a wealth of options. SSO integration is a hard one though, usually that’s part of an enterprise license.
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
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
hello
can i link CSS file to HTML without the command "link"?
but why would you need that
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
It's not in html form

you need wget -r -np -k www.onn2.tech
yeah just wanted to check if there was any index.html

the extension doesn't mean the actual file is
the server just probably returns the executable on the request
Bcs it’s not working
you are using the link not it's not working?
Thing is, it isnt for version controlling or such and is just an non-tech related projects and or such
Oh, you mean add SSO to stuff that isnt offered? How so?
can't be
I meant I personally use SSO just for experiments and not commercial usae
Ahh I see
Their server sends a 302, you can see it in your wget log. So there is no html to download, but the installer you get redirected to is getting saved as html since you pass -r which forces html.

you could code it as a chrome extension, but generally i wouldn't bother
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
it doesn't
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
browser doesn't need html
this is just wget, taking whatever the website sent and saving it as a .html
but it isn't an html file
what is really happening
redirecting you

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
it doesn't need to have a html page
browser doesn't need html
Interesting. I only just clued into the fact that the ONN brand is just a re-badging of Walmart's existing Blackweb brand. https://www.walmart.ca/brand/blackweb/51050542
Shop for Blackweb at Walmart.ca. With everyday great prices, shop in-store or online today!
I have no clue what the file is for
at first I thought it was some sort of virus/malware...
Heya @outer zodiac feel free to ask questions about Discord API here in da #development channel. 🙂
Thanks
Guys my friend needs help, we making a Discord bot and...
Well discord API is http
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
Like this https://youtu.be/3LAdiJ5xKDI
Hello everyone and in this video we developed Pagination with buttons
Install the master branch (download GIT in your system beforehand)
pip install git+https://github.com/Rapptz/discord.py
When to sync your commands:-
https://gist.github.com/AbstractUmbra/a9c188797ae194e592efe05fa129c57f#file-when_to_sync-md-readme
Check out the full playli...
You can get the content of a message via message.content()
discord.py has docs btw, they're a great read 🙂
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
JS/Node helpers for Discord Interactions . Contribute to discord/discord-interactions-js development by creating an account on GitHub.
that isn't a framework
ty, forgot the link
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. 😅
that's fair, I used it recently and it was ... good enough? Figured i'd toss it in the running since it didnt sound like they were dead set on a language
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?
discord.js isn't official, but the other link i posted with the js interactions lib is
it's just a helper lib
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
there's several deno discord libraries
deno supports ts by default
but they aren't as beginner friendly like discord.js
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.
Description will go into a meta tag in
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.
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
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
Nice, I know financial products can sometimes be a pain so great to hear that.
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.
its probably a lot of overhead but the first thing that jumped into my mind reading your post would be HTTP. is it the best way? probably not. does it get your blocker out of the way? sure
most languages these days have simple libraries for handling REST calls
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.
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
Try building an application in a programming language. To start with python3 would be good.
Yeah I’m trying to build programs with the knowledge I have but thanks for the recommendation
Decide on a project you want to create and use whatever language you want to/can use to create it.
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
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.
Programming.
or just a swagger/openapi file, and call it a day
You can put the API-Key into an environment file and put that into .gitignore
how can I access the env file
Depends on the Language/Framework you're using
With NodeJS I could tell you, same with VueJS...
Google is your friend I'd say...
I'm using plain js
just html,css,js kinda stuff
i should've said I'm not using npm
Rule No. 1 of the Web:
Anything clientside is not a secret