Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
necrotic
Aug 2, 2005
I owe my brother big time for this!

Finster Dexter posted:

The current frontend guy's readme says: Put necessary env vars in the appropriate `.env.*` file. Any local variables you don't want committed go in `.env.local`

These .env are absolutely intended to go to source control and be used for prod builds. But near as I can tell from the source code, everything is wired up with dotenv, so setting environment variables on my local env or even in a docker container are just flat ignored and it complains about not having a .env value for that variable. This seems so awful. And I've read 6 articles about webpack now that all say that is how you should do it: "gently caress env, put everything in .env files or pass them as arguments to your webpack calls in package.json"

your dev is an idiot. the first faq entry on dotenv package:

quote:

Should I commit my .env file?

No. We strongly recommend against committing your .env file to version control.

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!
we use dotenv and it works fine if you set a variable in the environment, it supersedes the one in .env.

as is documented in the package.

fire your dev

necrotic
Aug 2, 2005
I owe my brother big time for this!
into the sun (along with javscsript)

necrotic
Aug 2, 2005
I owe my brother big time for this!
after a very quick google search, the top SO link had a comment pointing to this thread https://forums.developer.apple.com/thread/12885

quote:

Note Just as an aside, you can access peer-to-peer Wi-Fi without using Multipeer Connectivity. The underlying technology is Bonjour + TCP/IP, and you can access that directly from your app. The WiTap sample code shows how.

you should read some links instead of... not.

necrotic
Aug 2, 2005
I owe my brother big time for this!

MALE SHOEGAZE posted:

thanks to whoever recommended the emulator101 tutorial it's great. should probably thank the person who wrote it. hope they like bitcoins.

yeah ive been building out an emulator because of that link. its been a fun distraction from work.

necrotic
Aug 2, 2005
I owe my brother big time for this!

MALE SHOEGAZE posted:

oooh, so the problem is that all the branch targets are off because of the directive, so you need to shift everything down so that it starts at 0x100.

which is what the author says, but i didn't get it.

yeah that took me a while to figure out. its even more unclear when you get through that rom as it calls a BDOS function, which if not implemented will end up moving the PC to 0x0005 and moving forward with gibberish.

ive been using this reference for cpm/bdos whenever things cross over to that side, a bunch of diagnostics end up needing at least the print functions.

edit: right, thats the FOR_CPUDIAG ifdef on that same page you linked before. those print branches are BDOS functions 2 and 9 on the page i just linked.

necrotic
Aug 2, 2005
I owe my brother big time for this!
dont you need the cycle count if you want an accurate clock?

necrotic
Aug 2, 2005
I owe my brother big time for this!
i decided to go with c for the emulator stuff. i dont regret it but its also been uh... different.

but it works now!

code:
====== test_roms/TST8080.COM ======
MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC
 VERSION 1.0  (C) 1980

 CPU IS OPERATIONAL
Jumped to 0x0000 from 0x06BA



====== test_roms/CPUTEST.COM ======

DIAGNOSTICS II V1.2 - CPU TEST
COPYRIGHT (C) 1981 - SUPERSOFT ASSOCIATES

ABCDEFGHIJKLMNOPQRSTUVWXYZ
CPU IS 8080/8085
BEGIN TIMING TEST
END TIMING TEST
CPU TESTS OK

Jumped to 0x0000 from 0x3B25



====== test_roms/8080PRE.COM ======
8080 Preliminary tests complete
Jumped to 0x0000 from 0x032F



====== test_roms/8080EXM.COM ======
8080 instruction exerciser
dad <b,d,h,sp>................  PASS! crc is:14474ba6
aluop nn......................  PASS! crc is:9e922f9e
aluop <b,c,d,e,h,l,m,a>.......  PASS! crc is:cf762c86
<daa,cma,stc,cmc>.............  PASS! crc is:bb3f030c
<inr,dcr> a...................  PASS! crc is:adb6460e
<inr,dcr> b...................  PASS! crc is:83ed1345
<inx,dcx> b...................  PASS! crc is:f79287cd
<inr,dcr> c...................  PASS! crc is:e5f6721b
<inr,dcr> d...................  PASS! crc is:15b5579a
<inx,dcx> d...................  PASS! crc is:7f4e2501
<inr,dcr> e...................  PASS! crc is:cf2ab396
<inr,dcr> h...................  PASS! crc is:12b2952c
<inx,dcx> h...................  PASS! crc is:9f2b23c0
<inr,dcr> l...................  PASS! crc is:ff57d356
<inr,dcr> m...................  PASS! crc is:92e963bd
<inx,dcx> sp..................  PASS! crc is:d5702fab
lhld nnnn.....................  PASS! crc is:a9c3d5cb
shld nnnn.....................  PASS! crc is:e8864f26
lxi <b,d,h,sp>,nnnn...........  PASS! crc is:fcf46e12
ldax <b,d>....................  PASS! crc is:2b821d5f
mvi <b,c,d,e,h,l,m,a>,nn......  PASS! crc is:eaa72044
mov <bcdehla>,<bcdehla>.......  PASS! crc is:10b58cee
sta nnnn / lda nnnn...........  PASS! crc is:ed57af72
<rlc,rrc,ral,rar>.............  PASS! crc is:e0d89235
stax <b,d>....................  PASS! crc is:2b0471e9
Tests complete
Jumped to 0x0000 from 0x0137

necrotic
Aug 2, 2005
I owe my brother big time for this!
ctps: got the first screen of space invaders to render but then it segfaults. gotta put this down for the weekend though i dont want to

necrotic
Aug 2, 2005
I owe my brother big time for this!
primary/secondary is a fine replacement for master/slave imo

parent/child seems to fit better in the cpython case though, or anything related to forking

necrotic
Aug 2, 2005
I owe my brother big time for this!
i think im going to try and follow crafting interpreters in rust for a new side project. i just finished the rust book and this seems like a fun way to get into a larger rust project.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Shaggar posted:

javascript is the worst thing

the new safari release is caching arrays
https://stackoverflow.com/questions/52390368/array-state-will-be-cached-in-ios-12-safari-is-bug-or-feature/52392901

necrotic
Aug 2, 2005
I owe my brother big time for this!

redleader posted:

so what do you return if the request is well formed but invalid (because of rules like, i dunno, the caller passes an email address without an @)? i tend to use 400, but that diagram seems to reserve 400 for malformed requests and doesn't seem to offer any advice for this situation

imo http response codes often feel juuust not quite right for rest apis

use 422 Unprocessable Entity

https://tools.ietf.org/html/rfc4918#section-11.2

necrotic
Aug 2, 2005
I owe my brother big time for this!

Chalks posted:

As long as the front end is always sending you data in UTC or with time zone information attached you're fine, yeah?


yeah, utc doesn't have DST. if you send everything in UTC then you can figure out the correct poo poo (by letting a library handle iut for you)

necrotic
Aug 2, 2005
I owe my brother big time for this!
not my problem

necrotic
Aug 2, 2005
I owe my brother big time for this!
gcp has the best cost exploration out of all of the providers, with a simple way to split projects up and look at them individually. their kubernetes offering is also the best by far.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Kevin Mitnick P.E. posted:

do you mean scale 7 or 7 significant digits

quote:

All numbers have a fixed 7 decimal places, and the maximum permitted value is +- 99999999999, or just under 100 billion.

necrotic
Aug 2, 2005
I owe my brother big time for this!
it also appears to use floats for any division of two "Fixed" numbers. nice

necrotic
Aug 2, 2005
I owe my brother big time for this!
IE gave us the wonders of AJAX

necrotic
Aug 2, 2005
I owe my brother big time for this!

Sapozhnik posted:

what's a good tool for building docker images

do people really use docker's own container build system these days or is there something better

yes people really use it a lot.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Kevin Mitnick P.E. posted:

yeah see that’s all v bad. don’t use k8s to store anything important

how is it any different than running on bare metal? if a server dies you still need to replace it and spool up new replicas.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Kevin Mitnick P.E. posted:

i assumed that the thing op was talking about with pinning pods to hosts and hostPath volumes wasn't actually happening cause if you do that k8s is just a pointless complexity layer

oh that makes more sense.

necrotic
Aug 2, 2005
I owe my brother big time for this!
yeah let me just load up a 300tb database whenever we run tests

necrotic
Aug 2, 2005
I owe my brother big time for this!
we use k8s for everything, across multiple clouds. We're even shipping on-premise packages using k8s so we don't have to mess with a bunch of different infrastructures. Doing our first non-cloud deploy soon, too.

There are definitely some pain points but it's been great to have a consistent platform no matter where it is deployed, for any scale.

necrotic
Aug 2, 2005
I owe my brother big time for this!

suffix posted:

or on rare occasions starve other more critical services

Your critical services should have matching resource requests and limits so they cannot be starved. Proper resource limits and requests are hugely important to a stable k8s experience. Also pod priorities.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Finster Dexter posted:

For starters. We've had that happen multiple times, but also annoying bullshit like k8s deciding to move pods off a hosed up node, but then for whatever raisin it can't provision persistent volumes in the zone that node is in... so we end up having to do weird bullshit like re-provision nodes in different zones or create special pvc storage classes that are restricted by zone.

It loving sucks and there are new things every day that make me hate k8s, but I'm not sure if it's k8s or just bad configuration on our part. I dunno, I'm not really that experienced with the ops side of things, so have had to rely on CTO to do all this.

Yeah volumes can be annoying, especially in AWS. There are improvements around making sure the pod ends up on a node in the correct AZ but the best approach is to set the affinity of those deployments to either only one AZ, and to use pod priorities to ensure those pods can be scheduled correctly. GCP and Azure don't have this issue as badly.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Finster Dexter posted:

WHAT WHAT WHAT??

Is this documented anywhere... this seems like 100% a deal-breaker, imo. Our system is a giant piece of poo poo built by Russian contractors that is tightly coupled with ultimate trust in NATS as a message queue, and if traffic is just lost, that could explain a LOT of issues we've been having.

If this is a documented known issue, then we need to get off it ASAP

There's a lot of different ways this can be solved, depending on the load balancer in use. In GCP the http balancers have a fixed 10 minute keep alive that you need to be aware of and have your services support. We moved to an L4 balancer with an internal ingress controller which helped a lot, but has it's own annoyances.

I have some articles I can share, just need to go find them again.

necrotic
Aug 2, 2005
I owe my brother big time for this!

CRIP EATIN BREAD posted:

I'm not sure if it's a function of kops or kubernetes itself, but all the nodes get labelled with "failure-domain.beta.kubernetes.io/zone=AWS_AZ" that you can easily use for node affinity to a specific AZ. this is useful if you actually have persistent volume claims. that's shortcoming of EBS though, since a volume is created in an AZ and not available in other AZs.

This is a newer feature of kubernetes itself. We get those labels on GCP and Azure as well.

quote:

what state do you need to maintain in a file? seems like you would have the same issue just using AWS autoscaling groups. this really isnt a kubernetes specific issue.
for ASGs I guess you can create an ASG in each AZ and attach the volume on startup via user data scripts, but that's basically the same as using node affinity per deployment.

It's definitely not a k8s specific issue, but I think it shows up more frequently than for bog standard ASG setups.

We run redis internally and it persists the state to disk. We use a volume for this so if the pod gets moved the data isn't lost. For the most part we stay away from volumes for persistent data, but our on-premise package uses them for elasticsearch as well.

sometimes you just need a persistent disk, ya know?

necrotic
Aug 2, 2005
I owe my brother big time for this!
:sever:

necrotic
Aug 2, 2005
I owe my brother big time for this!
You'd want to anyway. No telling how many people would have some random branches with that password still embeded locally. Committed password is always a change this password case.

necrotic
Aug 2, 2005
I owe my brother big time for this!

brap posted:

this is only possible in closed source projects using centralized versioning isn't it?

and yes the answer for passwords that have leaked to somewhere they don't belong is always to change them.

You can scrub the history and fix the main repo, but any clones can easily keep the old history.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Krankenstyle posted:

lol if you dont force push every day

i have a coworker who does this for all of his prs and its getting frustrated. let me see the individual changes ya butt!

necrotic
Aug 2, 2005
I owe my brother big time for this!
poo poo please bring back the force pushing this is terrible

necrotic
Aug 2, 2005
I owe my brother big time for this!

gonadic io posted:

Related to that, does anybody have some advice for how to accept work from users without being overloaded? I have e.g., a limit of 100 concurrent users and see when (if) I get there what the server load looks like? I'm on a free tier gcp machine so I don't think I need to be too worried about cost.

The workload should be almost entirely network throughput limited if you are simply proxying requests and responses. I'd expect even a free tier box to handle 100 concurrent users just fine as long as there's enough network throughput available.

edit: The free tier GCP instance are limited to 1GB of egress data a month. That may be a factor.

necrotic fucked around with this message at 17:32 on Mar 20, 2019

necrotic
Aug 2, 2005
I owe my brother big time for this!
when do we get a shaggarscript? Is it wasm?

necrotic
Aug 2, 2005
I owe my brother big time for this!
dependency injection

necrotic
Aug 2, 2005
I owe my brother big time for this!

gonadic io posted:

markdown has support for tables but discord doesn't support it

no this is a lovely thing about "markdown": there is "markdown" (the original design) which doesn't include tables, and then a zillion "extensions" that do. saying it supports "markdown" doesnt really mean poo poo anymore.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Aramoro posted:

Just overheard someone saying

My favorite coworker says switching to typescript would entirely solve all bugs for us.

necrotic
Aug 2, 2005
I owe my brother big time for this!
I am a 10xer and therefore right 10x fewer bugs

poo poo there's a bug in that sentence.

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!

Jabor posted:

pretty sure effort actually goes down as figgies go up

exponentially

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply