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
Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Shaggar posted:

c++ has the excuse of being ancient. the people working on scala should have known better

that's academia for ya

Adbot
ADBOT LOVES YOU

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

at my first job as a git-toucher I somehow managed to get a merge conflict with myself

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

at my first job people would tell junior developers that writing unit tests was unnecessary because the only way you can have a bug that the scala typechecker can't handle is if you have side effects, which are bad, so

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

uncurable mlady posted:

types dont guard against npe
that's why you use Option[T] types rather than null, and Either[T,U]s to propagate errors back instead of exceptions :smugdog:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

gonadic io posted:

yeah but any of those could also be null (or exceptions)
luckily the check and balance here is that every FP :spergin: 's favourite thing to do in a code review is leap down the throat of someone who uses an interface that could return null or throw and not lift it into a None or Left(...)

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

gonadic io posted:

any interface that returns Option could also return a null. this is my issue with scala: you can put all the layers on top of it you like, but you're still hosed

imo scala should not allow nulls at all, and then nullcheck all calls :colbert: then Option would be safe
oh sure, I mean, "~ by convention ~ we only return None or a Some, or a Left or a Right, we pinky-swear" is exactly the kind of not-actually-safety safety that Scala-touchers will blindly defend and simultaneously roast Java-touchers for

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

at $OLDJOB our build process took upwards of an hour and if you ran make with -j4 or greater the OS would start OOM killing linker processes, so you'd expect to do two passes (one with parallelism to build the object files and a second serial one for linking) to get the drat thing built

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

yeah this doesn't sound like you have any real constraints, tech-wise, just so long as you can atomically-update the A->B and B->A mappings (if you can tolerate non-atomic updates your job is even easier). And, since your workloads are read-heavy you can do the ol "stick a cache in front of your DB" thing.

What do you mean concretely when you say "minimal latency"? What's your expected RPS? What's your current k8s deployment like (if you're living across datacentres / AZs then choosing DB X over DB Y won't matter when your requests are bounded by speed of light between DCs)

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

YOSPOS: A co-worker is on a tricycle screaming about microservices.

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

who says inheritance is a bad idea

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

good to see linux's font rendering is about as sharp as it was in 2003

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

speaking of plangs, I spent my summer internship hacking on the compiler for literally the P language https://p-org.github.io/P/

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

(as with all other plangs, nobody should use it)

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

tracked down some simulation code similar to what I'm writing, and, in between a bunch of Python functions that don't return values but instead mutate `global`ed identifiers,

code:
#round function has been used throughout the code to resolve the floating point issue


researchers, man :argh:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

on the topic of academic code from the last page, opened up a paper artifact and was presented with the following blessing

ah yes, the unnamed definite-article floating point issue

Only registered members can see post attachments!

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

if the option is between C++ and rust being your new hot thing, just stick with C imho

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

at the risk of making a shaggar-grade plang defence: if you've got more than a few gnarly places where you truly don't know what datatype's behind a pointer, there's probably some straightforward refactoring that you can do to make that better (edit: and, if one of your big concerns is C ABI compatibility, as theirs was, you're going to end up having void*s that you just gotta assume you're getting right across the language boundary anyway)

Dijkstracula fucked around with this message at 18:43 on Oct 23, 2022

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Xarn posted:

I am sure that the people who wrote the code that ends up source of type-confusion bugs also knew what type was behind the pointer. :v:

hey just so long as you know whether it's something you're supposed to pass to `free()` you're half way there :vroll:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

PokeJoe posted:

Types? They're good

:yeah:

MrQueasy posted:

Types are a pain unless you've got some of that sweet sweet Hindley-Millner action going on.
agreed and lol if you're plang's type system is not system f at the absolute minimum

did we ever have a type theory/fp megathread

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Deep Dish Fuckfest posted:

seeing or writing a cast in c is just tuesday. a cast in c++, to me, is an indication that someone's cutting corners with either their design or implementation

I guess each of our milages will vary here, but I feel like your description of C++ casting matches my experience writing production C. :shrug: Short of casting to a `uint8_t *` to access byte-level representations of some more complex type, or "upcasting" to a particular "subtype" of a tagged union, seems like for most cases if you're blithly recasting values then something's likely askew in C, too? I'm not even sure it's a matter of implicit casting; even the presence of a `void *` suggests I should be thinking super-carefully about what I'm doing.

Maybe it's different in embeddedland or something, ECEs thinking they know how to write a computer program heh :smuggo:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

I'm never happy, you know this rotor

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Sagacity posted:

we did but the thread didn't allow io

Nice!

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

sb hermit posted:

the joke flies past everyone's head. Apparently I was the only gen x that actually played the ultima series
those games were totally unplayable so this is very possible

"ah sure assign this especially painful ticket to the guy who actually made it through the jumping puzzles in ultima 8" says me, the other Old on the team

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

I've been sitting on my hands for pages trying to not post about mercurial being better, because I figured everyone would just assume I was shitposting

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

rotor posted:

same, but in a different way

:nice:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

also what the heck happened to your av

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

if you're working on more than one thing at a time it's nice to associate the issue/JIRA number with the change branch

also strongly suggest the "prepend your name to each branch" convention almost as much as "name your branch something funny and semi-relevant to the change" convention

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Jabor posted:

If a branch is on your machine, that means you're the one working on it, no? Why does the branch name need to include extra information to tell you that?
not necessarily: if a branch is on my machine, that might mean I'm the one working on it; or it isn't and I've fetched it as part of my review process because I want to inspect it in my IDE, or I'm cutting a canary release where I'm cherry-picking particular changes to test on a single box, or I'm pair-programming with someone on my workstation, or

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

all of yall got a lot of bees in your bonnets about naming things well instead of like `bug_fixes_2_final` as if you're backing up excel spreadsheets or something

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Achmed Jones posted:

this is my hill! it was made for me!

:same:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

was gonna suggest ButtState but honestly yours was better

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

sounds like some plangers itt haven't heard the good news about .ini for hipsters, toml :smugdog:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

the fact that you get xpath and xslt means xml is the right choice, sorry, shaggar is right

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

awk owns, we should have an awk appreciation thread

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

The C++ thread in SH/SC would know better, I'm sure, but I imagine for the major features like stripped-down concepts ("template constaints") and the new memory model, going to the published papers is likely a better resource. I know the "Concepts Lite" paper is fairly old but I'm fairly sure it's only now getting integrated into the actual standard, for instance. As for the memory model, I'm not actually sure what they settled on for c++20/23 but going to Viktor Vafeiadis' and Derek Dreyer's work in the space might be a good intro.

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

nice, that looks good, ty for reporting back :shobon:

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

in my experience go is fine, so long as your team has exactly one overly-opinionated go fanboy who will take care of the worst parts of the language like migrating to the latest broken dependency management system on your behalf

if you have zero such coworkers, buddy, strap in and learn what a vendor/ directory does, if you have two such coworkers, buddy, strap in and enjoy the constant thoughtleader-wannabe bikeshedding

not too many sharp corners and the standard library's good, for most things the runtime performs "well enough", the built-in race detector and auto-formatter is "I can't believe no other languages ship with one of these"-levels of useful, your most "meets expectations"est plang coworker can pick it up without much effort, and the fanboys have mostly shut up about how "it's made by Google so you know it's good!!!" or moved onto Rust by now

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

VSOKUL girl posted:

iirc that you cannot take two types that have an identical field and then access that field on the generic object. all i really remember is there was something i wanted to write a single function for and was like "ah, generics!", but then go was like "no lol"
that's fairly standard for languages with parametric polymorphism/generics, though: there are a few languages with a type system that let you say "this function operates over all types T such that T has a field named foo" (so-called row polymorphism), but it isn't common. OCaml's got it, TypeScript has something roughly like it, but in Go, as well as Java, Scala, etc., you have to concretise the notion of there being an identical field by defining an interface/trait.

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

TheFluff posted:

but in golang properties are not part of interfaces and it doesn't have traits, so you simply cannot do it at all
another nail in the coffin for go's type system being bad

(I read VSOKUL girl's post as being about "constraining/wildcarding a type variable" more generally than what they'd likely meant)

Adbot
ADBOT LOVES YOU

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

Xarn posted:

The race detector is a lot weaker than it looks at first glance.
What do you mean concretely - like clearly it's a runtime thing so it's not complete, but it should at least be sound, and in my experience it's reasonably comprehensive for the stuff I used it (and TSAN, which it sits on top of) for?

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