|
lmao as of 2017 go actually added a concurrency safe map to their standard library (https://medium.com/@deckarep/the-new-kid-in-town-gos-sync-map-de24a6bf7c2c) it is, of course, a `map[interface{}]interface{}`, meaning both keys and values are untyped, because go does not have generics
|
# ? May 8, 2020 07:42 |
|
|
# ? Apr 25, 2024 07:17 |
|
go is fine, and interface{} isn't that scary if you only use it when you actually need to generics will be in the next version finally though if you're using vscode for go use the nightly go plugin. there's a great official go language server that's been in the works for a while (gopls) included, which you can also use in any editor that supports the lang server protocol too
|
# ? May 8, 2020 08:07 |
|
or use a big boy language like java that supports threads and types and has sophisticated concurrent data structures. this shits not hard devs just gotta reinvent that wheel
|
# ? May 8, 2020 12:44 |
|
java slow lol!
|
# ? May 8, 2020 12:44 |
|
abraham linksys posted: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. Your mileage will vary, but I basically do this with kotlin and docker in Windows 10 with Intellij ultimate. I transitioned that project from linux a few months back and other than some gradle fuckery and changing accomodating docker's general Windows/Linux differences it with was surprisingly painless. Just make sure you have Windows 10 pro because home doesn't support the virtualization needed for docker.
|
# ? May 8, 2020 13:07 |
|
suffix posted: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? i gis'd "lead javascript guy" and this is what i got
|
# ? May 8, 2020 13:10 |
|
Turn your webcam off
|
# ? May 8, 2020 14:04 |
|
Nomnom Cookie posted:or use a big boy language like java that supports threads and types and has sophisticated concurrent data structures. this shits not hard devs just gotta reinvent that wheel you can even compile it into a single self contained binary these days with graalvm. or run it straight from the source code like a plang if you’re allergic to compilers. java good
|
# ? May 8, 2020 17:36 |
|
Soricidus posted:you can even compile it into a single self contained binary these days with graalvm. or run it straight from the source code like a plang if you’re allergic to compilers. java good when you think about it even (visual/CLI) c++ can be a plang imhbo* *in my humble butt opinion
|
# ? May 8, 2020 17:49 |
|
yeah Blazor is not quite there yet I don't think. It'll be cool if it does a take off a bit more though because a big pain point with c# mvc is having to glue poo poo together with bits of javascript if you're doing anything dynamic like adding elements to a list in a form on click, and while it's not hard (and the partial view engine and some extensions to how collections are managed make it way easier), it's like laying a trap for yourself when you change a class structure and then gently caress a view you forgot about. when I tried using it it was really good for this because you basically just add a new element to your base list and the framework auto renders a new element or whatever, but the handling of nested objects was loving horrible with loads of passing of functions around up and down all with the wonderful "lol no compiler warnings until you run and get a stack barf" weakness of cshtml and the bonus of not being able to make changes without restarting like you could with razor
|
# ? May 8, 2020 18:03 |
|
DrPossum posted:Your mileage will vary, but I basically do this with kotlin and docker in Windows 10 with Intellij ultimate. I transitioned that project from linux a few months back and other than some gradle fuckery and changing accomodating docker's general Windows/Linux differences it with was surprisingly painless. Just make sure you have Windows 10 pro because home doesn't support the virtualization needed for docker. good news/bad news on this one: * good news: docker is moving to using wsl 2 as a host. unlike regular hyper-v, wsl 2 actually works on windows 10 home, which is pretty unexpectedly cool of ms * bad news: intellij is still behind the curve on properly supporting wsl2, though, even compared to other jetbrains IDEs (https://youtrack.jetbrains.com/issue/IDEA-223986). that said, i guess if my source lives in windows, and is just mounted into docker-on-wsl, it should be okay, the same as what you have now? i'm curious to know more about your setup! does intellij have built-in stuff for running inside docker you're using (debugging/running tests/etc)? i think i understand how you'd normally use docker for development on the command line (have a build folder with the app that's mounted into the docker fs, set up a dockerfile that just runs the app, restart docker any time you rebuild the app), but i don't really know how it'd work with intellij, especially the testing side of things. if intellij is running gradle etc. in windows, you have to maintain your dependencies on windows and "just" mount the build output into docker, right? that seems kind of reasonable for java, since theoretically the jvm should be able to handle stuff built on one os and running on another, much better than, like, how you can't just copy-paste a `node_modules/` folder from one os to another if it has any native c dependencies since they need to be rebuilt i think if i was living in a world where i was doing most of the work through an IDE, i actually wouldn't really give a poo poo whether it was running on windows or linux, tbh. for node/frontend dev i am in the command line most of the time and it'd be kind of weird, though. also i'd have to rewrite all my shell scripts, i guess? development "on windows" is so much more mysterious to me than this WSL stuff, but i'm not sure i actually have any technical blockers from preventing me from doing development on windows, other than just learning new poo poo
|
# ? May 8, 2020 18:35 |
|
tak posted:go is fine, and interface{} isn't that scary if you only use it when you actually need to on one hand, i kind of disagree with this because type safety is the entire reason i've left the comfort of my p-lang shell and started trying all these other languages, so while i don't necessarily need haskell levels of type magic, i do want to not have to cast in and out of unknown on a regular basis. that said, in practice, i see your point. like, basically every web framework i've seen in a static-typed language has middleware functions you can run that can store or read values on an "http request context." this way you can have a middleware function that goes like "if this user has an auth token, find their user from the DB and store it on the request context, so my route handlers can quickly grab the user from the context." in practice, the context is inevitably some kind of `map[string]interface{}` where you can store whatever the hell you want and just have to type cast on either side i do like that in static type languages you can, y'know, type cast, instead of in JS either relying on nominal typing with instanceof (which is rarely useful because everyone just uses anonymous objects instead of classes), or writing duck-type runtime asserts for every single `unknown` value you have, which is a ton of boilerplate (and, in typescript, doubled boilerplate since you end up having to maintain that along with your static `interface`) quote:if you're using vscode for go use the nightly go plugin. there's a great official go language server that's been in the works for a while (gopls) included, which you can also use in any editor that supports the lang server protocol too i'm using this and it's... not the worst editor experience i've had, but man, it's not great. i tried it like ~6 months ago and it was a loving wreck, so i can say now it's relatively usable, but it still cannot pick up new or moved files without me restarting the language server. i think everyone is having trouble getting a language server working well (i believe rust's is still similarly unstable) so i'm pretty sympathetic to it, but it's weird that a language that's been around a decade has such an immature tooling situation - like, i know language servers are new and there was an ecosystem of CLI tooling, but now all of that's been abandoned or deprecated and not updated to support the new go modules stuff, so as far as i can tell i'm stuck with this language server. or, uh, goland. Soricidus posted:you can even compile it into a single self contained binary these days with graalvm. or run it straight from the source code like a plang if youre allergic to compilers. java good i wanna try this at some point, but graalvm requires a lot of manual configuration if you're using libraries that involve any kind of reflection, which in the web dev world, is "most of them." that said most frameworks at least have tutorials for getting started with graalvm and i know some are specifically built for it (quarkus, micronaut), i just gotta figure out if i'll wind up wanting some dependency that doesn't work in a native context. i've been using jib to produce super-lightweight docker images for deployment, which hasn't required much effort at all. my small javalin app hovers around 170 megs of memory which fits comfortably onto the cheapest digitalocean box you can get, along with postgres/redis/a node frontend server. i'm sure this is like 10x the footprint of a go server with the same functionality, but i feel like also took me 1/10 of the effort to write, so shrug
|
# ? May 8, 2020 18:52 |
|
“untyped maps are fine just cast and don’t make mistakes” is some shameful java 1.4 era bs. a language that doesnt even have type erasure is just sad, and so are the justifications of plang-likers who have to act like every single thing about their trash fire is delightful. some things just suck. JavaScript sucks. go sucks. it’s ok to admit that your job requires you to use bad tools. it’s not fun to think about, but pretending that your plang spork is fit to dig ditches with doesn’t get the job done faster
|
# ? May 8, 2020 19:21 |
|
Is there even a reason to use any Plang other than Python? Or if you want to compile things, use C++ >= 17 or Rust.
|
# ? May 8, 2020 19:23 |
|
the only languages worth using in 2020 are java, rust, and python
|
# ? May 8, 2020 19:25 |
|
Nomnom Cookie posted:the only languages worth using in 2020 are java, rust, and python watch shaggar shaggar in and add some .net langs
|
# ? May 8, 2020 19:27 |
|
what's a good ui framework to use with spring boot? i've got my server up and running for a project i've been wanting to build and have built the spotify integration but now i want to make it look pretty
|
# ? May 8, 2020 19:29 |
|
abraham linksys posted: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 surprise: golang sucks
|
# ? May 8, 2020 19:30 |
|
bob dobbs is dead posted:watch shaggar shaggar in and add some .net langs c# would be a good language if it weren't for that whole "microsoft" thing the language is good, the ecosystem is impoverished
|
# ? May 8, 2020 19:30 |
|
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 of course, but then there's truly no need for types anywhere I'm damaged on the edge of my applications because I either have to interface with databases in one or both ends and databases are awful
|
# ? May 8, 2020 19:31 |
|
tak posted:go is fine, and interface{} isn't that scary if you only use it when you actually need to lol at this nuclear hot take tak posted:generics will be in the next version finally though the completely useless garbage type system is fine, except, even the language authors concede that it is utterly useless
|
# ? May 8, 2020 19:31 |
|
Boiled Water posted:of course, but then there's truly no need for types anywhere databases are great, usually the only good part of an application (i.e. where the data makes sense and has types assigned)
|
# ? May 8, 2020 19:32 |
|
whats the least bad way to write-once run-everywhere apps? react native? this is for like an idiot spare time prototype-tier crud project
|
# ? May 8, 2020 19:33 |
|
PIZZA.BAT posted:what's a good ui framework to use with spring boot? i've got my server up and running for a project i've been wanting to build and have built the spotify integration but now i want to make it look pretty if you have a java thing and you don't know what to use as a default component look at dropwizard http://dropwizard.io this started as a "batteries included" model for "how do i java web app" but keeps growing their default setup is mustache for templating and jersey for http forms/apis , and those seem like pretty reasonable choices to me?
|
# ? May 8, 2020 19:34 |
|
Notorious b.s.d. posted:c# would be a good language if it weren't for that whole "microsoft" thing is there an open source community in c# yet or is it all do as microsoft has deigned correct? Notorious b.s.d. posted:databases are great, usually the only good part of an application (i.e. where the data makes sense and has types assigned) usually being the operative word. My local DBA (who has veto rights on application architecture for some reason) has lot of weird and annoying thoughts about the db. Such as allowing duplicate information, but then having a bespoke db function which cleans up and marks rows as done. No it can't run automatically once in a while, developers should call it in their code.
|
# ? May 8, 2020 19:35 |
|
Boiled Water posted:is there an open source community in c# yet or is it all do as microsoft has deigned correct? not really and much of what does exist is loving horrible (e.g. nuget, chocolatey) Boiled Water posted:usually being the operative word. My local DBA (who has veto rights on application architecture for some reason) has lot of weird and annoying thoughts about the db. Such as allowing duplicate information, but then having a bespoke db function which cleans up and marks rows as done. No it can't run automatically once in a while, developers should call it in their code. ah, you are posting from 1989 you poor bastard
|
# ? May 8, 2020 19:46 |
|
Boiled Water posted:is there an open source community in c# yet or is it all do as microsoft has deigned correct? .NET Core is open source, and Microsoft's docs even call out non-MS open source solutions from time to time like Polly for HTTP retries. Some of their domain- centric projects are open source too, like in healthcare, but in practice those are mostly updated by MS.
|
# ? May 8, 2020 19:49 |
|
Nomnom Cookie posted:the only languages worth using in 2020 are java, rust, and python Kotlin and swift are pretty good
|
# ? May 8, 2020 19:52 |
|
Notorious b.s.d. posted:c# would be a good language if it weren't for that whole "microsoft" thing yeah i think it's been weird that while reading a little bit about c#/asp.net i just have not seen anything other than like "we just use what microsoft offers," with the exception of folks using dapper instead of entity framework i mean kotlin sorta has this problem in terms of "kotlin-first" ecosystem being primarily just jetbrains developers experimenting with half baked ideas (ktor, exposed) but you have, yknow, the whole fuckin jvm ecosystem to lean on there with pretty much any popular framework or library having some kind of compatibility layer if necessary i noticed that in the asp.net docs they talk about a few open source projects that seem to be de facto standards in the community, like IdentityServer4 being used for auth (efb by Eldred here) Nomnom Cookie posted:the only languages worth using in 2020 are java, rust, and python feel like once java records land in whatever the next java LTS version is i might give it a shot? until then kotlin seems like the way to go
|
# ? May 8, 2020 19:54 |
|
brand engager posted:Kotlin and swift are pretty good Also I wish kotlin would just steal the "if let" and "guard let" syntax from swift, it makes dealing with nullable stuff so much nicer
|
# ? May 8, 2020 19:55 |
|
abraham linksys posted:yeah i think it's been weird that while reading a little bit about c#/asp.net i just have not seen anything other than like "we just use what microsoft offers," with the exception of folks using dapper instead of entity framework Now that it has that stuff, hopefully the situation will start to improve.
|
# ? May 8, 2020 20:10 |
|
Notorious b.s.d. posted:
i loving wish. I'm posting from a government IT project that has unlimited funds for more people, but not enough funds for good people
|
# ? May 8, 2020 20:12 |
|
brand engager posted:Also I wish kotlin would just steal the "if let" and "guard let" syntax from swift, it makes dealing with nullable stuff so much nicer val yep = someNullable ?: return you can get close
|
# ? May 8, 2020 20:42 |
|
Nomnom Cookie posted:or use a big boy language like java that supports threads and types and has sophisticated concurrent data structures. this shits not hard devs just gotta reinvent that wheel goroutines and channels and builtin stdlib concurrency primitives seriously own just don't use interface{} unless you actually need to and do type assertions (type cast basically) it's fine, go types and interfaces are really nice
|
# ? May 8, 2020 20:56 |
|
Nomnom Cookie posted:“untyped maps are fine just cast and don’t make mistakes” is some shameful java 1.4 era bs. a language that doesnt even have type erasure is just sad, and so are the justifications of plang-likers who have to act like every single thing about their trash fire is delightful. some things just suck. JavaScript sucks. go sucks. it’s ok to admit that your job requires you to use bad tools. it’s not fun to think about, but pretending that your plang spork is fit to dig ditches with doesn’t get the job done faster so use a typed map then it's not hard go is good, I will die on this hill
|
# ? May 8, 2020 20:58 |
|
abraham linksys posted:on one hand, i kind of disagree with this because type safety is the entire reason i've left the comfort of my p-lang shell and started trying all these other languages, so while i don't necessarily need haskell levels of type magic, i do want to not have to cast in and out of unknown on a regular basis. you don't like what language doesn't have something like type casting and interfaces? it's really not as big of a problem as people seem to think generics will be really nice though abraham linksys posted:
the gopls wiki has pretty good docs if it's not upgrading the gopls lang server for you with the nightly go vscode plugin goland is ok but has its own problems, especially with go modules e: the gopls wiki design docs are very promising tak fucked around with this message at 23:33 on May 8, 2020 |
# ? May 8, 2020 21:06 |
|
tak posted:so use a typed map then great idea where do i find the typed map for my custom Fart object in the go standard library
|
# ? May 8, 2020 21:16 |
|
the c# ecosystem is "impoverished" only because the framework is already pretty good so there's not much motivation to poo poo out packages like js or most oss languages seem to need to for basic stuff i have only run into one situation in the last four years that i couldn't handle with the default framework plus what's available in the .net oss world (specifically: the .net core grpc libraries are not as flexible as the go ones) the packages that are out there tend to not have a billion dependencies of their own either, which is nice this is a pretty good list of what's out there: https://github.com/thangchung/awesome-dotnet-core
|
# ? May 8, 2020 21:21 |
|
mystes posted:Before .net core, I think c# was really just a language that people were using to make windows desktop applications, and it didn't even have an actual package manager / repository for third party stuff.
|
# ? May 8, 2020 21:23 |
|
|
# ? Apr 25, 2024 07:17 |
|
ive basically never needed to use a third party library in a c# project because the stdlib is just that good
|
# ? May 8, 2020 21:25 |