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.
 
  • Locked thread
tef
May 30, 2004

-> some l-system crap ->
hello new thread are there any good posts yet

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->

BONGHITZ posted:

why do you program?

Every line of code is written without reason, maintained out of weakness, and deleted by chance

tef
May 30, 2004

-> some l-system crap ->

Main Paineframe posted:

regex is a pain in the rear end because i hardly ever need to use it, so I learn just enough to do whatever I need to do, and then by the next time I need it I've totally forgotten the actual syntax and need to learn it from scratch again

regex is a pain in the rear end but i had to use them every day at work for a year and now they are carved into my bones

tef
May 30, 2004

-> some l-system crap ->
i turned on /x but christ my brain is still wired to never use whitespace in a regex

'(?:[^'\\\n]|\\(?:[\"'\\/bfnrt\n]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}))*'

tef
May 30, 2004

-> some l-system crap ->

Chalks posted:

why is nobody capable of doing semantic versioning correctly?

by design

tef
May 30, 2004

-> some l-system crap ->

CRIP EATIN BREAD posted:

javascript is a failure because the people it attracts are loving morons and dont understand that tooling is important.

also the language is bad.

let's compare it to a community of very smart programmers, scala

tef
May 30, 2004

-> some l-system crap ->

rjmccall posted:

i used to use ed as my EDITOR for commits but eventually decided the occasional line transposition and/or checked-in 1,3d was a little too embarrassing

ed is the standard editor

tef
May 30, 2004

-> some l-system crap ->

Sapozhnik posted:

having read tef's litany against message queues a few months ago i'm finishing up a new revision of our system that has a bunch of services communicating via localhost http instead of rabbitmq

there's actual backpressure now and some (though not all) failures propagate all the way to the system's edge

and i can now inject events into the middle of the system with curl to test things out

:toot:

if you want to go the whole :2bong: experience, reify your service objects and return hypermedia

tef
May 30, 2004

-> some l-system crap ->

a witch posted:

broad question for you and or tef.

I have an environment that does long running render jobs, using what I think is a pretty normal queue setup. jobs tend to come in big batches that we don’t have the hardware to handle all at once, so we queue them up in a message queue, and workers grab jobs when they are free.

how/why would I migrate this to a setup like yours?

depends? what do you do when renders fail? is retrying worth it?

tef
May 30, 2004

-> some l-system crap ->

a witch posted:

retrying is worth it within a limited window, depending on external circumstances.

basically a batch job finds items of interest, and will queue up a render job for each item that we don’t already have a successful render for. If an item is failed, but still interesting, it will get retried.

so, like, you're already using some database to track state, and use a queue as a smart load balancer

i think i explicitly talk about this being a pretty normal thing in the long winded rant


the whole 'use http' jerkfest is more 'just do plain old rpc and don't use a message broker as a go-between' for short lived requests that need responses

tef
May 30, 2004

-> some l-system crap ->

oh no blimp issue posted:

is there a link to this message queue post by tef? i’m interested

https://programmingisterrible.com/post/162346490883/how-do-you-cut-a-monolith-in-half

tef
May 30, 2004

-> some l-system crap ->
just use get and post

tef
May 30, 2004

-> some l-system crap ->
that breaks misconfigured poo poo and you can pack more data in a post

tef
May 30, 2004

-> some l-system crap ->

honest answer: something like this from 2009

http://web.stanford.edu/~ouster/cgi-bin/papers/fiz.pdf

the long and short of it is that a lot of how we approached mvc was kinda bunk, and applet like apis, or building a component tree and calling render() is much better for re-use than keeping your html, and your sql in different directories

but javascript wasn't fast enough to do components client side at first, and trying to write your own dom api server side, on the other hand, is a total pain in the rear end. everyone gives up and concatenates strings or uses templates. your component library kinda has to be in javascript too, or you have to be able to compile your widget's logic down to javascript to do it.

now react exists, and sure enough, it was built for doing more interactive components client side

but components are great, here's enough of a dom in serverside javacript that you can render, and send the html over the wire.

in some ways, we have always been doomed to reimplement X11

the shadow-dom stuff looks neat though

tef
May 30, 2004

-> some l-system crap ->

Sapozhnik posted:

x11 is an async rpc protocol for bitmapped rendering that also provides an event stream

x servers do not host any application logic

display postscript i guess in some old incarnations runs imperative code on the renderer side of things but even then it's an immediate-mode rendering api.

react is a tree of stateful thunks. there is a scene graph and there is absolutely client-side intelligence involved.

i meant more about in terms of:

x11 provides a simple api for interfaces: bitmaps, events

we build widget sets atop to provide things over it, patching over the lack of things we don't have

then we get things like xdri and substantial architectural changes that basically violate the whole design principle and some other goddam extension that i can't remember the name of

what was previously a gui over a network became a janitor for local processes.

anyway

we had html, as a way of interacting with remote document collections
we brought in forms, widgets, etc, but we hacked over it with css and javascript
and now, although most of us have moved to widget sets, they're still built in terms of simpler components,
but we also have localstorage and a litany of other extensions

what was a document platform is now an application platform

what was a sandbox is now something with desktop integraton (storage, notifications, etc)

what i wanted to say was, 'wanting to impement NeWS and doomed to reimplement X11' but i felt i was being too obscure

we always wanted the component system, it's just, that's far harder to adopt. too much to learn up front, too much to reimplement for compatibility. but we end up adopting the hack, and crufting on what we need , asking ourselves why this happened, despite maybe taking a decade to get the box model right

but, i also meant that the whole 'things get pushed backwards and forwards between the display and the application as power/resource/latency changes between them;'

meanwhile, we're re-inventing applets again. web assembly.

tef
May 30, 2004

-> some l-system crap ->
try reading wikipedia sometime, might learn something

tef
May 30, 2004

-> some l-system crap ->
that's mostly filler for the definition of framework

tef
May 30, 2004

-> some l-system crap ->

Soricidus posted:

where’s the half assed latex reimplementation in nodejs with json syntax and a bootstrap homepage describing it as minimal and beautiful

you mean in ocaml

tef
May 30, 2004

-> some l-system crap ->
the iss uses utc

tef
May 30, 2004

-> some l-system crap ->
a vector clock of pulsars :2bong:

tef
May 30, 2004

-> some l-system crap ->

MALE SHOEGAZE posted:

(which is not on the table).

delegate up until someone is who is allowed to fix it, can

tef
May 30, 2004

-> some l-system crap ->

cinci zoo sniper posted:

recursively updating values in previous columns?

when you cut against the grain there isn't a good way to go about it

tef
May 30, 2004

-> some l-system crap ->

it says so on the page

tef
May 30, 2004

-> some l-system crap ->

cinci zoo sniper posted:

how to explain to a coworker who has never used git before the entire idea behind code review/pull requests/branching etc because they just roll eyes and moan about necessity of option to "lock out files so other person can not work on thing i work on"

instead of taking out fine grained locks you work off a complete snapshot and then apply changes

locking will prevent editing conflicts, but doesn't enforce a history

with snapshots + changes, you get a nice timeline, which makes undoing changes easy


unfortunately git is a terrible piece of software

tef
May 30, 2004

-> some l-system crap ->

cinci zoo sniper posted:

ty, this worked with minor alterations

:hattip:

tef
May 30, 2004

-> some l-system crap ->
hg makes a lot of sense if you've already been using svn

tef
May 30, 2004

-> some l-system crap ->
git makes a lot of sense, well, not the tool or interface, but the network effects do

tef
May 30, 2004

-> some l-system crap ->

Sapozhnik posted:

git's cli is idiosyncratic as hell but all the people complaining about it could quite easily resolve 90% of the problems with git by writing an alternative cli wrapper around libgit2. they can still use github and collaborate with existing git repositories just fine.

ci systems would continue to use whatever existing integration they use around vanilla git but when they're at the local independently owned cafe laying down some sick code on their Late 2017 Model Apple Retina MacBook Pro with Intel Iris HD Graphics(R) they could use the alternative cli

they could call it cogito or something

that's not how network effects work

tef
May 30, 2004

-> some l-system crap ->
also everyone shits themselves when someone fucks up git history

tef
May 30, 2004

-> some l-system crap ->

Elias_Maluco posted:

never lost a line of code because of git. It works, it does what's supposed to, and its what everyone uses

also it's terrible

tef
May 30, 2004

-> some l-system crap ->

Valeyard posted:

when we used subversion, nobody ever complained about having "subversion problems" in their day to day work

"git problems" on the other hand is rampant

nah we called them conflicts

tef
May 30, 2004

-> some l-system crap ->

DaTroof posted:

ime i get fewer merge conflicts in git than svn or tfs and spend a lot less time janitoring chevrons

been a few years but when i worked a lot with svn it wasn't uncommon for branches to die of neglect just because they were too much hassle to merge



never had to fix permissions errors with git

tef
May 30, 2004

-> some l-system crap ->

toiletbrush posted:

Trouble is they're a bit like survival rogue-likes or SQL query builders in that everyone thinks they'll be fun to write and theirs will be the one that's actually good.

same but class hierarchies in general

programmers loooooove taxonomies

tef
May 30, 2004

-> some l-system crap ->
the eternal saga

tef
May 30, 2004

-> some l-system crap ->

cinci zoo sniper posted:

c tp s: what's a good way to monitor db values and email notifications to peoeple?

say i have table foo with columns bar and baz

i need to check each 3 hours the average value of baz, and if it is less than X or more than Y then an email must go out to computertoucher mcputerface

what's your recovery plan

make a table

uuid, email address, lastCheckTime, lastSentTime, lastMessage

run a script that polls this table
for each email, see if you need to check, update lastCheckTime, and send a email & update sent/message if so

if you like, run it as a worker

add triggers to send notify events when data changes

then in between polling, listen for new emails/data to recheck

tef
May 30, 2004

-> some l-system crap ->

MALE SHOEGAZE posted:

i think i'm going to try to reboot CGI except instead of perl we'll use go

it's callled serverless

tef
May 30, 2004

-> some l-system crap ->

comedyblissoption posted:

The primary reason code in Java/C#/C++/javascript/whatever devolves into spaghetti is unnecessary pervasive use of global mutable state.

i'm sure this used to be true

but now people actually use the alternatives i can confidently say they're sprawling messes too

tef
May 30, 2004

-> some l-system crap ->

NihilCredo posted:

related:

why do so many loving tools (both meanings) need to have their own special snowflake configuration file formats? jenkinsfiles, dockerfiles, nginx.conf, caddyfiles, poo poo.gradle, it goes on and on

because for line in lines: line.split(=) is good enough to begin with


quote:

i give a pass to tools that are two decades old or more, but for anything modern, between xml, json, yaml and toml

yaml has a 'safe_load' option because well, it's not safe to use. or interoperable

json is well, painful for config formats because of the lack of things toml and yaml provide

toml eh? well i guess if you want a holier than thou ini format well

and xml? billion lols, namespaces, xsds. if i was writing a svg like format, i.e an interoperable document format, it would be a great choice.

oh i guess there's protobufs that don't have real collections and uh thrift that does but um it seems flakey and why does finagle use a different version

tef
May 30, 2004

-> some l-system crap ->

NihilCredo posted:

these can be valid complaints but if they follow up with "and that's why dockerfiles use their own special format" it's like bitching that the 2-michelin-star cook oversalted your salmon steak so you'd rather scavenge a dead trout from the riverbed after a drought


- json

it's ambiguous as hell on how some unicode is handled.
it doesn't offer complete range of floating point
byte order marks make it poo poo itself
duplicate keys are a thing

- yaml

i really meant the whole 'safe' thing, like, do you need to be using an object persistence format for your formats
like with c++, everyone sticks to a subset

the most consistent way to have your yaml parsed is using json

on/off, c'mon. sexagesimals?

- toml

i wrote an incredibly pedantic list already about how well thought out toml was. most of them got fixed.

eventually, two years later, someone else convinced him '.' was a valid character and like git's config format, mashed in support in an ad-hoc manner

the biggest user of toml had to make several incompatible changes upstreamed to toml to get it to be useful to them

- xml

well, yes because i write svg by hand too
let me just escape everthing as utf-8 percent encoded hex pairs
complete overkill


also lol if you think these are 2-star formats sorry

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->
dockerfiles are hilarously bad from concept to execution so i guess if you want to complain about the specifics, sure

  • Locked thread