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
Nomnom Cookie
Aug 30, 2009



Carthag Tuek posted:

couldn't you make an "empty" nginx step that only has those deps & use that as the dep for further steps

would limit the need to update stuff to one place

the pattern I recall using is shoving all the global stuff in a class and then depending on the class instead of enumerating a bunch of resources

Soricidus posted:

given the popularity of the packer ansible provisioner I’m not sure it exactly saves us from anything

free will means it is the responsibility of every dev to reject ansible in all its forms

Adbot
ADBOT LOVES YOU

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


huh, i actually got wsl to compile a linux app. for another (ancient) architecture, no less

i kind of expected that to be a royal ballache for a non-trivial project like this

Ciaphas fucked around with this message at 00:58 on May 7, 2020

simble
May 11, 2004

wsl v2 is real good op

Nomnom Cookie
Aug 30, 2009



the io performance on wsl2 is real inconsistent and disappointing after all the press. yeah, git is faster. that seems to be the only thing they did any perf work on. apt is slow as frozen balls

simble
May 11, 2004

I mostly praise it for the much much better docker integration. also using vs code with the wsl remote extensions doing basically native dev on linux.

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

the io performance on wsl2 is real inconsistent and disappointing after all the press. yeah, git is faster. that seems to be the only thing they did any perf work on. apt is slow as frozen balls

well, two things

  1. the windows i/o layer is irreparably broken. anything that touches the windows i/o layer, ever, will be horrendously slow.

    so the advantage to a virtualized kernel is that filesystem operations can pass through a block cache before talking to the windows i/o layer, reducing the total number of operations. makes git faster. doesn't help apt much.

  2. apt is already slow as balls for reasons unrelated to i/o, so having bad i/o and how loving awful libapt is in combination sucks worse

Notorious b.s.d. fucked around with this message at 03:30 on May 7, 2020

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

well, two things

  1. the windows i/o layer is irreparably broken. anything that touches the windows i/o layer, ever, will be horrendously slow.

    so the advantage to a virtualized kernel is that filesystem operations can pass through a block cache before talking to the windows i/o layer, reducing the total number of operations. makes git faster. doesn't help apt much.

  2. apt is already slow as balls for reasons unrelated to i/o, so having bad i/o and how loving awful libapt is in combination sucks worse

apt is faster in wsl1. that's where i get slow as frozen balls from. either way you have the windows io stack and libapt involved

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

as i understand it (very little), wsl1 had native windows i/o and then emulated unix syscalls. which made basic r/w faster in your shared folders but slowed down a ton of tools like git which worked off of unix metadata

wsl2 is a vm so it's got its own proper linux filesystem where syscalls are fast, but if you mount a shared windows folder it goes through a remote access layer which is much slower

so for wsl1, it didn't matter where you put your data. for wsl2, you want to keep as much data as you can in the linux-only filesystem, and only use the /mnt/ folder for things you actually need to access from windows

Nomnom Cookie
Aug 30, 2009



apt is not using the remote access layer

abraham linksys
Sep 6, 2010

:darksouls:
oh neat, we're chatting wsl2, which i just set up

i will say i/o wise, like, webpack actually works and seems reasonably fast at watching files. having to use lovely poll i/o is why i returned my surface book within hours of setting it up a couple years ago, was an absolute non-starter for web development, so this is exciting. of course, i'm running a very tiny project on a very beefy gaming desktop, since that's my only windows device, so i don't really know how it works in real-world situations.

otoh, i'm annoyed that vscode is more or less the only game in town for an editor you can run in windows but use a wsl dev environment in. i've been thinking of using kotlin as my primary backend language for personal projects going forward, and intellij has no support for remote dev on wsl, and when they add it i'm sure it'll be in their ultimate edition whatever the gently caress paid thing, so that's a bummer. i could run intellij on windows and like... maintain both windows and WSL copies of all my java dependencies, but that sounds fuckin terrible. you can also apparently run intellij via X on WSL but that also sounds fuckin terrible.

not really WSL's fault that kotlin is tied into intellij, though, which is what i came to this thread to complain about. y'all am i right in thinking there is no statically typed backend language for web development that is not one of:

* objectively bad, like go. i tried writing more go since i figured it was easy to run everywhere but it's still a terrible language. it's just fundamentally unfun to write. i keep getting lured back to it due to the runtime characteristics (tiny! multiplatform! wEb ScAlE!) but bouncing off harder each time. also the vscode tooling is pretty bad, though tbf rust has this problem rn too since everyone wants a language server but no one seems to be putting in the high level of money and time needed for it to work well. i'm also bucketing java into this category though with the caveat that i think it is much better than go, just too verbose for personal projects and the reliance on code generation for any practical application is really gross

* relatively hard to write for "normal" web development, like rust. rust actually has some compelling "practical" stuff like diesel, but i would have to spend quite a lot of time to learn it, and i'm not sure the language is actually the right fit for, like, business logic. also the async situation is still really messy on the library support side, though i'm not as negative about it as other people are (lord knows it's taken python a lot longer to figure its poo poo out)

* tied into a semi-proprietary IDE or platform. this is kotlin. kotlin pretty much requires intellij and there are no other editors that have real ide-like support. intellij is at least open source at its core, but jetbrains loves to add new features exclusively to their paid IDE, like i think intellij ultimate has "out of the box support" for a bunch of frameworks and stuff that you won't get in the free version. this loving sucks because i think kotlin+jvm rules otherwise once you get over the hump of understanding the ecosystem, and i've been happily rewriting an api from typescript to kotlin over the last couple months

* a language that does not actually have types at runtime, like typescript or (i think?) python+mypy. i think of this as a dealbreaker because, in web development, type reflection (whether runtime or compile-time) is incredibly useful for things like "mapping object fields to database columns" and "parsing json into a known shape." without this kind of reflection, you wind up with parallel "runtime and static" types, where you have e.g. a typescript interface and a json schema you have to keep in sync, or you use a hacky, poorly-maintained code generator to get one from the other, or you use a hacky, poorly-maintained library that infers complex static types from a bespoke runtime interface (e.g. io-ts). i honestly think the lack of this in typescript makes it worthless as a backend language and i'm shocked so many people are investing in it when you can't get things like "runtime type correctness for database access" like you can in any language that, like, has a runtime understanding of what is supposed to be in a variable and will yell at you if you set stuff wrong (as awful as go's `interface{}` situation is, at least when you go to convert an unknown pointer to a specific struct it'll holler if you're wrong!)

i'm thinking about giving up on types and going back to, like, node with regular ol' js or something. at least vscode gives me autocomplete for imports in that scenario. maybe java with record types and graalvm will be the new hotness in a year or something, since that fixes both the verbosity/ide-generatior-dependence and performance issues. vscode actually is actively working on java support as well (https://devblogs.microsoft.com/java/java-on-visual-studio-code-update-april-2020/)

abraham linksys fucked around with this message at 15:02 on May 7, 2020

CPColin
Sep 9, 2003

Big ol' smile.
Every time I think I need a feature from IDEA Ultimate, I get a free trial and then change my mind. This includes when I'm doing webdev in Kotlin, which is 95% of my work time

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

abraham linksys posted:

y'all am i right in thinking there is no statically typed backend language for web development that is not one of:

i've never used it but crystal sounds right up your alley

Achmed Jones
Oct 16, 2004



:shrug: golang seems fine to me. I don't use it for web dev though maybe it sucks more there

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
I'm of the shaggarpinion that c# is a great web dev language. And I think the .NET web dev community is finally moving away from MVC/MVVM as the end-all/be-all of web dev. (AFAIK, the new hotness is blazor stuff and preferring "endpoints" over "controller actions")

Somewhat related: The guy that created ruby on rails (lol) laments the woeful state of modern web dev.

https://twitter.com/dhh/status/1258074299337826304

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

abraham linksys posted:

oh neat, we're chatting wsl2, which i just set up

i will say i/o wise, like, webpack actually works and seems reasonably fast at watching files. having to use lovely poll i/o is why i returned my surface book within hours of setting it up a couple years ago, was an absolute non-starter for web development, so this is exciting. of course, i'm running a very tiny project on a very beefy gaming desktop, since that's my only windows device, so i don't really know how it works in real-world situations.

otoh, i'm annoyed that vscode is more or less the only game in town for an editor you can run in windows but use a wsl dev environment in. i've been thinking of using kotlin as my primary backend language for personal projects going forward, and intellij has no support for remote dev on wsl, and when they add it i'm sure it'll be in their ultimate edition whatever the gently caress paid thing, so that's a bummer. i could run intellij on windows and like... maintain both windows and WSL copies of all my java dependencies, but that sounds fuckin terrible. you can also apparently run intellij via X on WSL but that also sounds fuckin terrible.

not really WSL's fault that kotlin is tied into intellij, though, which is what i came to this thread to complain about. y'all am i right in thinking there is no statically typed backend language for web development that is not one of:

* objectively bad, like go. i tried writing more go since i figured it was easy to run everywhere but it's still a terrible language. it's just fundamentally unfun to write. i keep getting lured back to it due to the runtime characteristics (tiny! multiplatform! wEb ScAlE!) but bouncing off harder each time. also the vscode tooling is pretty bad, though tbf rust has this problem rn too since everyone wants a language server but no one seems to be putting in the high level of money and time needed for it to work well. i'm also bucketing java into this category though with the caveat that i think it is much better than go, just too verbose for personal projects and the reliance on code generation for any practical application is really gross

* relatively hard to write for "normal" web development, like rust. rust actually has some compelling "practical" stuff like diesel, but i would have to spend quite a lot of time to learn it, and i'm not sure the language is actually the right fit for, like, business logic. also the async situation is still really messy on the library support side, though i'm not as negative about it as other people are (lord knows it's taken python a lot longer to figure its poo poo out)

* tied into a semi-proprietary IDE or platform. this is kotlin. kotlin pretty much requires intellij and there are no other editors that have real ide-like support. intellij is at least open source at its core, but jetbrains loves to add new features exclusively to their paid IDE, like i think intellij ultimate has "out of the box support" for a bunch of frameworks and stuff that you won't get in the free version. this loving sucks because i think kotlin+jvm rules otherwise once you get over the hump of understanding the ecosystem, and i've been happily rewriting an api from typescript to kotlin over the last couple months

* a language that does not actually have types at runtime, like typescript or (i think?) python+mypy. i think of this as a dealbreaker because, in web development, type reflection (whether runtime or compile-time) is incredibly useful for things like "mapping object fields to database columns" and "parsing json into a known shape." without this kind of reflection, you wind up with parallel "runtime and static" types, where you have e.g. a typescript interface and a json schema you have to keep in sync, or you use a hacky, poorly-maintained code generator to get one from the other, or you use a hacky, poorly-maintained library that infers complex static types from a bespoke runtime interface (e.g. io-ts). i honestly think the lack of this in typescript makes it worthless as a backend language and i'm shocked so many people are investing in it when you can't get things like "runtime type correctness for database access" like you can in any language that, like, has a runtime understanding of what is supposed to be in a variable and will yell at you if you set stuff wrong (as awful as go's `interface{}` situation is, at least when you go to convert an unknown pointer to a specific struct it'll holler if you're wrong!)

i'm thinking about giving up on types and going back to, like, node with regular ol' js or something. at least vscode gives me autocomplete for imports in that scenario. maybe java with record types and graalvm will be the new hotness in a year or something, since that fixes both the verbosity/ide-generatior-dependence and performance issues. vscode actually is actively working on java support as well (https://devblogs.microsoft.com/java/java-on-visual-studio-code-update-april-2020/)

like i'm going to do all this reading

Corla Plankun
May 8, 2007

improve the lives of everyone

abraham linksys posted:

y'all am i right in thinking there is no statically typed backend language for web development that is not one of:
c# does seem to meet all your rquirements but since the backend system is just going to be pooting out json anyway it seems pointless to care about type safety in webdev

abraham linksys
Sep 6, 2010

:darksouls:

Finster Dexter posted:

I'm of the shaggarpinion that c# is a great web dev language. And I think the .NET web dev community is finally moving away from MVC/MVVM as the end-all/be-all of web dev. (AFAIK, the new hotness is blazor stuff and preferring "endpoints" over "controller actions")

blazor gives me big google web toolkit vibes and i haven't seen anyone using it in production yet. if you get over the hump of setup i think doing frontend programming with react or vue or whatever is decent these days, so i'm much more worried about finding a good backend independent of that. maybe someday if someone makes the dream batteries-included full stack framework that lets me, like, avoid defining my form models twice between the frontend and backend like you used to be able to do in 2003, i'd try something replacing a normal frontend stack, but until then i am happy to keep writin js against an api

that said, i'm willing to believe the rest of c#/asp.net(??) is pretty good. i read about it a decent amount while learning jvm/kotlin, cuz there is a lot of back and forth between those ecosystems (e.g. lots of newer java db libraries being inspired by dapper). might take a peek i guess, can i just use it with vscode and command line tools? i assume vs for mac is still a weird xamarin thing

(e: yes i know i was talking about WSL earlier, just still on mac for now while dipping a toe into windows dev so looking at cross-platform stuff)

abraham linksys fucked around with this message at 16:53 on May 7, 2020

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

abraham linksys posted:

blazor gives me big google web toolkit vibes and i haven't seen anyone using it in production yet. if you get over the hump of setup i think doing frontend programming with react or vue or whatever is decent these days, so i'm much more worried about finding a good backend independent of that. maybe someday if someone makes the dream batteries-included full stack framework that lets me, like, avoid defining my form models twice between the frontend and backend like you used to be able to do in 2003, i'd try something replacing a normal frontend stack, but until then i am happy to keep writin js against an api

that said, i'm willing to believe the rest of c#/asp.net(??) is pretty good. i read about it a decent amount while learning jvm/kotlin, cuz there is a lot of back and forth between those ecosystems (e.g. lots of newer java db libraries being inspired by dapper). might take a peek i guess, can i just use it with vscode and command line tools? i assume vs for mac is still a weird xamarin thing

(e: yes i know i was talking about WSL earlier, just still on mac for now while dipping a toe into windows dev so looking at cross-platform stuff)

Yeah, your instincts are correct, I think. VS for mac is garbage compared to VS code... and honestly jetbrains' Rider has come a long way, and I even end up using it on Windows sometimes, depending on my mood.

But VS code has really good plugins, now. My only knock for .net dev is that OmniSharp takes forever to load and parse large solutions. Otherwise, I would prefer it over anything else on Mac for .net stuff.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

abraham linksys posted:

maybe someday if someone makes the dream batteries-included full stack framework that lets me, like, avoid defining my form models twice between the frontend and backend like you used to be able to do in 2003, i'd try something replacing a normal frontend stack

there are a few stacks that do this by leveraging a $backend_language->js compiler. see if you like this, for example

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Corla Plankun posted:

c# does seem to meet all your rquirements but since the backend system is just going to be pooting out json anyway it seems pointless to care about type safety in webdev

having been dunked severely in the dynamic pool of clojure doing backend stuff I can safely say that types are overrated

sure sanitize you’re input and output and the edge of your program but in the middle why bother?

mystes
May 31, 2006

abraham linksys posted:

blazor gives me big google web toolkit vibes and i haven't seen anyone using it in production yet. if you get over the hump of setup i think doing frontend programming with react or vue or whatever is decent these days, so i'm much more worried about finding a good backend independent of that. maybe someday if someone makes the dream batteries-included full stack framework that lets me, like, avoid defining my form models twice between the frontend and backend like you used to be able to do in 2003, i'd try something replacing a normal frontend stack, but until then i am happy to keep writin js against an api

that said, i'm willing to believe the rest of c#/asp.net(??) is pretty good. i read about it a decent amount while learning jvm/kotlin, cuz there is a lot of back and forth between those ecosystems (e.g. lots of newer java db libraries being inspired by dapper). might take a peek i guess, can i just use it with vscode and command line tools? i assume vs for mac is still a weird xamarin thing

(e: yes i know i was talking about WSL earlier, just still on mac for now while dipping a toe into windows dev so looking at cross-platform stuff)
I never used google web toolkit, but I think that was a lot heavier? Blazor normally feels more like just react but with c# transpiled to javascript (or run in the server). The main problem with blazor is that you can't really use blazor server for production and the webassembly version isn't stable yet either, so there's basically no way to use blazor in production right now.

I think Microsoft must of decided that webassembly was the future of transpilation and decided to go right to that rather than javascript, and I guess only time will tell whether that was a smart move, but it's sort of unfortunate in that it means that blazor isn't really usable at the moment.

Normal asp.net is perfectly good now, though. Despite the name it just uses c# not the old asp language.

mystes fucked around with this message at 18:26 on May 7, 2020

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
why not just throw a hundred and fifty bucks (three figgies) at jetbrains to get intellij ultimate and be productive in kotlin?

alternatively, use the community edition, write something cool and open source it. boom, free open source license for intellij ultimate courtesy of our eastern bloc friends

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Because they are letting me to use the trial forever apparently

abraham linksys
Sep 6, 2010

:darksouls:

Sagacity posted:

why not just throw a hundred and fifty bucks (three figgies) at jetbrains to get intellij ultimate and be productive in kotlin?

alternatively, use the community edition, write something cool and open source it. boom, free open source license for intellij ultimate courtesy of our eastern bloc friends

oh i have no problem with intellij CE really. i just have this weird quirky specific problem of wanting to do web dev on windows, using WSL(2), and intellij (even ultimate) doesn't yet support WSL.

i am cynical and expect that when they do support WSL it will be tied into the ultimate version, and i'm not going to give them the money for that for personal projects, but idk maybe by that point there will be an open source alternative since it seems they're generally chill with that (and they did already start work on some kind of base WSL communication extension that other extensions can use so that's an okay sign)

the other option, of course, is to not use WSL, and run my backend on windows in development. i don't love this because i'm not very familiar with windows and its way of doing things. i use docker in development to run services the backend relies on (postgres, redis), so if i could easily get those running in docker for windows, and get my java dev environment working correctly on windows, maybe it would be fine? but then i don't love running on windows in dev and deploying to linux in prod

i could also try running intellij through X on WSL which apparently people do and have some success with but it sounds kind of annoying (love to install cygwin in 2020)

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

mystes posted:

I never used google web toolkit, but I think that was a lot heavier? Blazor normally feels more like just react but with c# transpiled to javascript (or run in the server). The main problem with blazor is that you can't really use blazor server for production and the webassembly version isn't stable yet either, so there's basically no way to use blazor in production right now.

I think Microsoft must of decided that webassembly was the future of transpilation and decided to go right to that rather than javascript, and I guess only time will tell whether that was a smart move, but it's sort of unfortunate in that it means that blazor isn't really usable at the moment.

Normal asp.net is perfectly good now, though. Despite the name it just uses c# not the old asp language.

I also think (and I believe MS thinks this, too) that once webasm is more mature, it will totally break the back of js as the main language of frontend devs. I don't know that c# will replace js, but I think it opens things up for kotlin/c#/python/whatever to move into that space.

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

idk holmes, sounds like you should consider c# for the whole dotnet core experience

how does the thread feel about frontend poo poo? apropos of nothing, I think I'm extremely horny for the absolute minimum amount of javascript on the front end. like if you need something complex and interactive go hog wild but don't make react a dependency to just build what could have been a static page

is it glaringly apparent from these opinions that i do not do webshit for work? lol

suffix
Jul 27, 2013

Wheeee!
lead javascript guy thinks http redirects is something programmers havee to write code to manually handle because apparently the node stack is just that broken?

MrMoo
Sep 14, 2000

Network IO in Node is pretty broken. There is no fetch and WebSockets are implemented quite differently from a browser for any reasonable attempt at error handling.

There are multiple ‘popular’ alternatives for HTTP client access in variously cursed arrangements, so disabling redirect in the underlying API and reimplementing above should not surprise anyone.

MrMoo fucked around with this message at 21:46 on May 7, 2020

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

prisoner of waffles posted:

idk holmes, sounds like you should consider c# for the whole dotnet core experience

how does the thread feel about frontend poo poo? apropos of nothing, I think I'm extremely horny for the absolute minimum amount of javascript on the front end. like if you need something complex and interactive go hog wild but don't make react a dependency to just build what could have been a static page

is it glaringly apparent from these opinions that i do not do webshit for work? lol

i'm all for this for projects of a small/reasonably static scope (or at least just pulling in whatever js libs I need manually instead of adding a build step that doesn't need to be there) but lmao if anyone will ever reasonably scope something small instead of set out to change the world with every wepage

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

carry on then posted:

i'm all for this for projects of a small/reasonably static scope (or at least just pulling in whatever js libs I need manually instead of adding a build step that doesn't need to be there) but lmao if anyone will ever reasonably scope something small instead of set out to change the world with every wepage

hubris baby!!!

Sapozhnik
Jan 2, 2005

Nap Ghost
love to build user interfaces using a document layout system for scientific articles

abraham linksys
Sep 6, 2010

:darksouls:

Boiled Water posted:

having been dunked severely in the dynamic pool of clojure doing backend stuff I can safely say that types are overrated

sure sanitize you’re input and output and the edge of your program but in the middle why bother?

i've been thinking about this for a bit and i don't really disagree

i still think a lot of frameworks and libraries are surprisingly bad at the input/output portion, especially in node:

* if you use a sql query builder like knex, you don't have any concrete "model" object with a definition, just a thing translating the returned table to a map, and you're at the mercy of hoping you are using the return value of a complex query correctly. this is actually still true in most static typed languages, since most* sql access in them still generally relies on something like "stringy query goes in, unknown result comes out, cast this result to a struct or object or whatever" and you get a runtime error if you gently caress up. that said, without validation in a dynamic language (or in a no-types-at-runtime-language like typescript), you don't get a runtime error immediately, you just get a surprise `undefined is not a function` or whatever down the road, which can be way worse

* yes i know of things like jooq and diesel that try to avoid this but they're still fairly uncommon compared to either arbitrary string-builders or ORMs that generate queries from models

* if you use a dumb framework like express, and you want to access a query param, you just access whatever on `req.query["paramName"]`. it's totally up to you to parse it and validate it and turn it into a 400, and it doesn't come with something to do this, unlike an actual useful framework. this means a bunch of apps wind up with issues where they just straight up forget to validate it, and everyone has to roll their own validation or bring some other bad library to do it. i know `if (isNaN(parseInt(queryParam)) { return response.status(400); }` isn't the most code to write but it's goofy as hell this is a thing you have to do in the most used web framework on node, the one every fuckin demo is written in

so the problem isn't just static typing it's like... types at runtime. the thing is, you get runtime types for "free" in most static typed languages, except something like typescript or mypy. when i am using javalin, a small kotlin framework that's pretty directly inspired by express, it still offers a basic `getParameter()` function that will cast to a given type and 400 out if it fails, because you just expect that poo poo in a framework built for a staticly typed language.

in conclusion maybe i should just start writing rails apps again instead of trying all this other poo poo

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Boiled Water posted:

having been dunked severely in the dynamic pool of clojure doing backend stuff I can safely say that types are overrated

sure sanitize you’re input and output and the edge of your program but in the middle why bother?

it's actually the opposite of this. at the edges of your program, there are no types, it's just strings coming in and strings going out. ie the "universal interface" of unix pipelines. only inside your program do the types matter. you use them to express constraints in your program, like "this input is sanitized now" or "we are in this state" or "this data structure i am using has the following interface" and so on. you bother to do this because it takes away a lot of cognitive load while programming, since the type system is propagating constraints around for you. if it isn't removing cognitive load for you, then either the type system you are using sucks, or you are using it wrong

abigserve
Sep 13, 2009

this is a better avatar than what I had before

prisoner of waffles posted:

idk holmes, sounds like you should consider c# for the whole dotnet core experience

how does the thread feel about frontend poo poo? apropos of nothing, I think I'm extremely horny for the absolute minimum amount of javascript on the front end. like if you need something complex and interactive go hog wild but don't make react a dependency to just build what could have been a static page

is it glaringly apparent from these opinions that i do not do webshit for work? lol

I put off learning react for years and then I finally did it and it's actually far, far simpler than static pages and the end result is cleaner imo - your presentation layer is completely decoupled from your backend outside of maybe convenience functions.

If you're writing a quick webapp it's both faster to get something working and looking nice with react than it is pure html/css

Nomnom Cookie
Aug 30, 2009



DELETE CASCADE posted:

it's actually the opposite of this. at the edges of your program, there are no types, it's just strings coming in and strings going out. ie the "universal interface" of unix pipelines. only inside your program do the types matter. you use them to express constraints in your program, like "this input is sanitized now" or "we are in this state" or "this data structure i am using has the following interface" and so on. you bother to do this because it takes away a lot of cognitive load while programming, since the type system is propagating constraints around for you. if it isn't removing cognitive load for you, then either the type system you are using sucks, or you are using it wrong

and ideally you are using somebody else's well tested and mature code to handle the translation at the edges. maybe op was working with code that didn't do much with the outside world? i once worked on a system that in one aspect took in hundreds of json docs, each with hundreds of fields, and combined them into one according to a set of rules that varied per field. this entire chunk of poo poo dealt with the docs as map/list/etc. also the types of some fields depended on the content of other fields

this is what you end up without types. anyone who says "well MY system's not like that" is either making the "yet" silent or doesn't know it exists

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Sapozhnik posted:

love to build user interfaces using a document layout system for scientific articles

build a GUI like a GUI, huh?
https://jdan.github.io/98.css/

Sapozhnik
Jan 2, 2005

Nap Ghost

abigserve posted:

I put off learning react for years and then I finally did it and it's actually far, far simpler than static pages and the end result is cleaner imo - your presentation layer is completely decoupled from your backend outside of maybe convenience functions.

If you're writing a quick webapp it's both faster to get something working and looking nice with react than it is pure html/css

Ehh, yeah, just as long as you don't use Redux. Then there's the new Hooks crap which is basically hidden global variable hell with all the non-testability that entails, plus an extra side of quasi-linguistic rules that must be obeyed otherwise the whole thing has the potential to break extremely strangely. Yes, there are unit test helpers and linters and stuff for it but it's still some really weird janky brittle poo poo that ultimately seems to exist to paper over the Context consumer mechanism in a way that solves one problem by introducing four new ones.

I dunno, React is thrashing around in some strange directions lately.

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





hooks are real suspicious looking but the reality is the old class based components were even more magic, you could just pretend the runtime was more sophisticated than you could understand

Nomnom Cookie
Aug 30, 2009



Sapozhnik posted:

Ehh, yeah, just as long as you don't use Redux. Then there's the new Hooks crap which is basically hidden global variable hell with all the non-testability that entails, plus an extra side of quasi-linguistic rules that must be obeyed otherwise the whole thing has the potential to break extremely strangely. Yes, there are unit test helpers and linters and stuff for it but it's still some really weird janky brittle poo poo that ultimately seems to exist to paper over the Context consumer mechanism in a way that solves one problem by introducing four new ones.

I dunno, React is thrashing around in some strange directions lately.

from the outside webdev started having an extremely normal one around 1994 and never stopped for 26 years straight

Adbot
ADBOT LOVES YOU

abraham linksys
Sep 6, 2010

:darksouls:
realized that by trying to build a stateful websocket server in a non-single-threaded language runtime for the first time i have opened myself up to an entire loving class of concurrency problems :shepface:

go's channels are super hard to reason about on this front, particularly. they really recommend you avoid atomic values or mutexes, and you're supposed to use channels instead, as described here. but that just seems like a terribly difficult pattern to use at scale in practice.

i guess a big part is just careful reasoning about what's truly shared - like, my app has a thing where users update their own state with websocket messages, but no other users can update that state. if a user is tied to a websocket connection (and there's a 1:1 user:socket relationship), and i've properly implemented the weird queue pump system this websocket library recommends to limit processing messages to one at a time per connection, i can theoretically assume that only one thing is touching that state at a time. which, like, is a lot to fuckin have to think about, versus the world i'm used to of "this poo poo's single threaded so as long as you never yield to the run loop through callbacks/yield/await you'll be fine to increment that counter or whatever"

i guess i could just start doing all my state management in some kind of database to serve as a "lock"? i guess that's not that weird, like, that's how you can handle multihreaded connections in regular ol' "stateless" http apps, your state lives in a database that is smart enough to handle a bunch of concurrent access. theoretically if i cared about scaling this app horizontally i'd want state in a db and some kind of pubsub broker anyways, maybe i'll just shove everything into redis

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