|
cool av posted:it's not separated from our other server costs so I can't give a real number, but not enough to notice a difference with a few thousand users who opted to use voice. In any case I don't exactly recommend rolling your own if you've found a library that looks suitably usable. well if it works, it works, but 8bit audio at 16KHz will sound vastly better than 16bit at 8KHz
|
# ¿ Feb 26, 2021 10:45 |
|
|
# ¿ Apr 19, 2024 09:55 |
|
Powerful Two-Hander posted:I just spent several hours trying to get a stupid toy project to work using typescript in visual studio and I'm sure this thing is great but jfc is the packaging a disaster zone. libraries in typescript are an awful pain that I had to go through recently a few notes from that process: the "module" keyword in typescript is not real modules, is incompatible with real modules, and should never be uttered. it was added a long time ago, works in a different way, and has also been renamed to "namespace" while sitting around ready to shoot you in the foot once you remove that keyword, imports/exports will (silently) turn a file into a module. also modules are rigidly a single file each, so they're incompatible with compiling everything into one file, you can't split a module across multiple files, and you need explicit imports and exports between every file but once you set up for using modules, you have to deal with there being half a dozen different module loading systems that all work in different ways. I went with ES2015 so I could cross my fingers and avoid using a module loader or webpack. I had to end all my imports with ".js" to make that work in the browser, but thankfully the typescript tooling understands that ".js" actually means ".ts". the libraries I downloaded were using commonJS but editing all their imports to end in .js made them work as ES2015 modules. then finally I could write script type="module" src="main.js" (cloudflare hates that sentence) alternatively I could have set up even more compilation steps and dependencies to get libraries to load in short: javascript tooling is awful and typescript punts to javascript for modules Dylan16807 fucked around with this message at 10:13 on Mar 4, 2021 |
# ¿ Mar 4, 2021 10:11 |
|
mystes posted:Javascript tooling is awful but I don't think using typescript really makes it significantly more complicated than it already is? yeah if the choice is between Javascript and typescript then do typescript, it's not making things worse
|
# ¿ Mar 4, 2021 12:39 |
|
DELETE CASCADE posted:afaik this is just how it has to work given the constraints of the postgres storage engine they probably have good reason for not adding it yet, sure, but the end result is still that they don't have the feature
|
# ¿ Mar 23, 2021 21:15 |
|
DELETE CASCADE posted:but it does have the feature? it simply doesn't work exactly like mysql does, because postgres isn't mysql locking the table, copying the rows into a new table in the order you like, and then swapping the tables is something you could quickly code up for any database engine that's not clustered indexes as an actual feature. as a feature it needs to stay clustered over time
|
# ¿ Mar 24, 2021 04:01 |
|
Jeoh posted:do i have severe burnout? no, it must be a rare medical condition and he's not blaming it on a preexisting condition, the story's pretty clear he did it to himself even if his description of the problem is dumb
|
# ¿ May 1, 2021 06:44 |
|
Antigravitas posted:They've done it. well it fetches the entire script before execution, and it uses https so as far as installing on windows goes it's not really any worse than download exe, run exe
|
# ¿ Jun 19, 2021 22:57 |
|
Xarn posted:git reflog yeah, fixing the commit graph can be a giant pain in the rear end but you can put the instructions for retrieving stuff from the reflog on a post-it
|
# ¿ Sep 15, 2021 08:28 |
|
redleader posted:i would like to know more. loving up stashes is something i have done that's resulted in me losing work or to make a shell nightmare with some help from stack overflow: git log --no-walk=sorted --format='%H' --min-parents=3 --reverse $(git fsck | awk '/dangling commit/ { print $3}') | while read hash; do git log -1 --pretty=reference $hash; git stash show $hash; echo; done Dylan16807 fucked around with this message at 11:52 on Sep 20, 2021 |
# ¿ Sep 20, 2021 11:41 |
|
the only thing I can find talking about Fibonacci backoff is a paper that doesn't even compare it with plain old exponential, only "BEB" which delays by a random number between zero and 2^n-1 is it actually better than an exponential backoff of 1.6^n?
|
# ¿ Nov 19, 2021 17:04 |
|
Share Bear posted:ive generally just been doing it in spurts rather than as a daily thing so ive not been reading the posts to avoid spoilers 8's such a weird balance of difficulty it's like "here is an essay on owls" "part 1 draw a circle" "part 2 draw the rest of the owl"
|
# ¿ Dec 17, 2021 08:49 |
|
Xarn posted:xml is good if the person defining the format did their homework and you have proper schema I'm just glad it doesn't print the equivalent of 1 2 3 3 3 3
|
# ¿ Feb 9, 2022 20:58 |
|
pokeyman posted:how is that useful in yaml beyond what a schema does in other formats? or is it just a security vulnerability delivery vehicle his objection to JSON5 is that he doesn't like unquoted strings as values, but JSON5 doesn't have unquoted strings as values? JSON5 is good, it doesn't add anything you couldn't parse with javascript eval, it just makes things less annoying
|
# ¿ Feb 9, 2022 21:17 |
|
Carthag Tuek posted:json5 objects can have unquoted strings as keys (without spaces, cant start with num etc) it can, but the complaints in the post don't apply to that kind of use you wouldn't put naked keywords as keys, and there is no ambiguity about spaces
|
# ¿ Feb 10, 2022 10:42 |
|
redleader posted:what the hell is json5? is it on any standards tracks, or is it just more frontend dumb poo poo? json5 is basically "let's make json be less different from actual javascript object notation" so you can actually write Infinity and NaN, and you can do stuff like trailing commas and comments and unquoted keys it doesn't try to add new types or anything
|
# ¿ Feb 11, 2022 01:21 |
|
chaosbreather posted:rails is great because what if it should? what if time and pagination and joins and all the thousands of little web footguns out there, anything that made you go 'oh here we go', was all just already there, and built in at the highest level without you doing anything?
|
# ¿ Aug 9, 2022 09:43 |
|
rotor posted:pipefail? more like postfail, am i right or am i right? the thread will continue going as long as every post is a 0 out of 5
|
# ¿ Oct 29, 2022 21:47 |
|
polyester concept posted:i can't imagine what the code behind magic the gathering would be like. some of the cards are wildly specific like "gain 1 land if one of your other creatures is wearing a hat", and then suddenly the devs have to add a "has_hat" check on every card dating back 30 years cinci zoo sniper posted:ccgs have by far the simplest code of all games, because it's literally just a calculator with some sfx slapped on. sure, it's a chore to edit 500 card json declarations by hand to extend "properties" list of 37 cards with "has_hat", but like 95% of "wildly specific" card mechanics i can think of are trivially implementable as a list membership check. has_hat is easy because that's in the silly set and they didn't even try to code it in theory all they need to track is basically name, cost, type, rules text, and then they have to make a thousand different hooks for when different categories of events happen but they apparently have awful spaghetti codebases, even on the new client that came out a couple years ago. they had entire sets that were implemented in the beta, taken out on launch day, and then 2-3 years later "oh no we changed too much we'd have to re-code those cards from scratch and it would take months"
|
# ¿ Jan 19, 2023 23:09 |
|
even if I'm on a short lived branch I'd still like git to note down which thing is which in a merge other than "I hope the main one was first" and when it's a long-lived branch that can be even more important/confusing
|
# ¿ Feb 12, 2023 06:27 |
|
are any database engines trying to add the features you'd need in this situation? if you can add columns without downtime, you should be able to widen a column without downtime. juggling old and new versions should be something the database does behind the scenes.
|
# ¿ Feb 24, 2023 02:32 |
|
Sapozhnik posted:oh yeah of course, requests from the outside world come from "downstream" and they flow "upstream". because that's the direction water flows along a stream, up. obviously. requests go one way, and the product goes the other way I think it makes sense that the way the water flows is the direction the product goes
|
# ¿ May 1, 2023 20:57 |
|
async works okay in javascript but I'm not thrilled about what it looks like to trigger a promise manuallycode:
|
# ¿ May 6, 2023 05:50 |
|
also it sucks that you have to misuse generators if you want to be able to resume a javascript function on demand I miss lua coroutines which can suspend at any point without needing colored functions
|
# ¿ May 6, 2023 05:56 |
|
redleader posted:wait, hold the phone. promises are also just colored functions "threads" was already said, and that's a good answer if a function awaits, you pause the entire stack. when it resumes, the whole stack resumes. if you want to split off a task, you use some kind of alternate syntax for the function call, and you get back a promise/generator/thread you can wait on and maybe do other things with. you can create equivalent behavior with promises, by saying every function returns a promise and it gets awaited by default (also awaiting a completed promise happens synchronously, unlike javascript). if you want to split off a task, you use a different syntax that won't await. this way you can write normal synchronous code and it will work the same way it always has, and you can transparently call a function that awaits without your code having to know anything about awaiting. and the automatic promises are just an implementation detail.
|
# ¿ May 6, 2023 10:13 |
|
Sagacity posted:
I don't know if I would prefer it but it didn't cause any significant problems
|
# ¿ Jun 4, 2023 01:59 |
|
mondomole posted:One thing that has tripped me up is that JSON numbers are specified as f64. So in many libraries even if you do the equivalent of get<u64>(field), you end up getting (u64)get<f64>(field), e.g. 53 bit precision integers. You can get around this by passing around strings instead of numbers but you definitely have to know to do this or you'll run into crazy subtle errors. JSON doesn't specify the numbers as anything, the closest is the RFC noting that f64 will give you "good interoperability"
|
# ¿ Jun 18, 2023 01:09 |
|
Private Speech posted:Pascal is a language with zero redeeming features pascal has good strings
|
# ¿ Jul 11, 2023 03:55 |
|
Sapozhnik posted:
this doesn't show the horrible loud noise it makes, also this is my favorite part: "one of the only ways to dump your games on an unmodded system is to use god2iso"
|
# ¿ Jul 29, 2023 01:59 |
|
N.Z.'s Champion posted:the most common solution is to use lz-string compressToUTF16/decompressFromUTF16 is that better than using normal compression and throwing it at base32768?
|
# ¿ Aug 23, 2023 05:22 |
|
ynohtna posted:I'd do something like: it's also worth looking at how that function is implemented. just one real line: Go code:
|
# ¿ Sep 25, 2023 19:48 |
|
tef posted:the justification for han unification wasn't "these are the same characters" it was "if we rank the world by gdp then we're poo poo out of space for cjkv" unicode had a huge change in goal at some point. at the time they only wanted to encode "modern" characters and said it would be "unreasonable" to include all "obsolete/rare" characters. at least in that context, unification makes plenty of sense tef posted:i know people complain about han unification but can you imagine if latin letters had multiple possible code points depending on 𝙷𝙾𝚆 𝙸𝚃 𝙻𝙾𝙾𝙺𝚂
|
# ¿ Sep 29, 2023 06:14 |
|
grep every single file for the names of some of the bad columns
|
# ¿ Oct 3, 2023 05:11 |
|
Markdown can't even consistently format: 3. Half the implementations will turn it into a 1, and half will leave it as 3.
|
# ¿ Nov 22, 2023 21:17 |
|
|
# ¿ Apr 19, 2024 09:55 |
|
tef posted:either way it's funny that people are like "stored procs? don't you know the idea of keeping application behaviour in the database is outdated!" and "using a json column? don't you know that the database is exactly the place application concerns should go" tef posted:programmers: how dare this garbage collector stop the world
|
# ¿ Jan 16, 2024 07:22 |