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
brap
Aug 23, 2004

Grimey Drawer
also hilarious that homebrew just refuses to run if it notices it's root and instead instructs you to instead chown or whatever until everything it needs belongs to you. now imagine doing this on a computer with multiple regularly used accounts.

Adbot
ADBOT LOVES YOU

brap
Aug 23, 2004

Grimey Drawer
react, typescript, and .net core in visual studio is seriously own zone. god help you if you use razor for anything more complex than making GBS threads a few static elements and script tags into the page.

brap
Aug 23, 2004

Grimey Drawer

Shaggar posted:

if you are using javascript at all for anything other than like form validation or maybe injecting new content from a razor partial, you are doing things wrong.

grabbing a chunk of html called a "razor partial" and shoving it into the page with jquery is much worse than react

dynamic UIs with razor are at best on par with typescript/react-based stuff. razor has terrible error reporting-- definitely admire that "do nothing" webscale approach to error handling-- and the way templates are managed is really bad compared to react components, but typescript without bundling has the risk that maybe you forgot a dependent script tag in a page while developing

brap
Aug 23, 2004

Grimey Drawer
it's far far better to put a markup language into a programming language (jsx) than a programming language into a markup language (razor).

my experience with razor error handling is making a typo or renaming a string name of a template or what have you, getting a white page instead of a prominent error when I render that page, and finding an unobtrusive green squiggly when I come upon the view that has a problem.

react components are actually symbols in the program, and they're checked well for consistent usage by typescript. they're more usable and maintainable than razor templates.

brap
Aug 23, 2004

Grimey Drawer
re: razor
not really but it's aged a bit and could use some love/modernization

brap
Aug 23, 2004

Grimey Drawer
why would you use gradle unless you're being forced to

brap
Aug 23, 2004

Grimey Drawer
use typescript

brap
Aug 23, 2004

Grimey Drawer
i would prefer a nullable column to a "one to zero or one" relation between two tables

brap
Aug 23, 2004

Grimey Drawer
I feel like most people's DB schema falls apart in the face of "oh poo poo, the customer wants edit history"

brap
Aug 23, 2004

Grimey Drawer

Potassium Problems posted:

I implemented event sourcing for an internal project here that needed edit history, and a pleasant side-effect was how much easier it was to handle read-model schema changes. replaying events ftw

how does event sourcing play with changing schema over time

brap
Aug 23, 2004

Grimey Drawer

NihilCredo posted:

datomic is great, but it's more than an event sourcing db - it's an immutable database that gives you transaction histories out of the box; you can use it for event sourcing, by designing your facts in an event style, but it's not required (and since you get immutability + transaction history anyway, you could argue that you have less reason to do that). also I'd go further and say that you really want to be speaking clojure to work with datomic

if you just want to mess around, i'd suggest downloading eventstore. it's kinda janky and i wouldn't trust it in production, but it has nice APIs (.net or js) and it's explicitly about event sourcing in a way other, tougher products aren't. look up some sample projects too

from what i've seen, most real-world event sourcing designs just use whatever no/sql datastore fits best with their stack, architecture, and scale (and bigger ones split the architecture into multiple components, eg distributed messaging system + dumb kv store for events + acid store for aggregates). the legwork really comes in the application code

does datomic still prohibit benchmarking in their license agreement

brap
Aug 23, 2004

Grimey Drawer
yeah this is one of those blaming the tool when you should be blaming your boss situations

brap
Aug 23, 2004

Grimey Drawer
statements will continue to be good and necessary until debugging of expression-based languages becomes easy

brap
Aug 23, 2004

Grimey Drawer
whoever wrote that example hosed up badly

brap
Aug 23, 2004

Grimey Drawer
i thought that "view" was your render template, "controller" contains the methods that get called when clients make requests, and "model" is literally everything else. I do very simple kinds of parsing of URL query parameters in controller methods and otherwise delegate poo poo out to another layer.

Blinkz0rz posted:

i'm porting a piece of software we wrote in javascript to go as a proof of concept and it's not a great language to write in if you don't know the shape of your data until runtime

that led me to a question: beyond p-langs are there any languages where it's not stupidly annoying to deal with unknown data without a predefined shape?

I don't know how you can write a program that operates on data whose shape you know jack poo poo about unless it's serialization or tree traversal or something else that really doesn't care how many attributes there are on a particular node or whatever, it just slurps them all up.

basically, if you can't represent the kind of program you're talking about in typescript without using `any`, something seriously hosed up is going on.

brap
Aug 23, 2004

Grimey Drawer
I'm the ?

brap
Aug 23, 2004

Grimey Drawer
it's pointer arithmetic.

brap
Aug 23, 2004

Grimey Drawer
vscode is quite good

edit: luigi maybe obvious but did you verify that the timer callback is happening on the ui thread?

brap
Aug 23, 2004

Grimey Drawer
as far as I can tell, the reason to use .net is because the standard libraries are great, the languages have good features (linq, async/await) and very good tooling, and ASP.NET is the closest thing there is to a "it just works" web framework.

it's too bad that .net core has been a clusterfuck and the cross-platform efforts started so late.

brap
Aug 23, 2004

Grimey Drawer
isn't qt how people strike the balance between performant, responsive, easy enough to develop for and portable?

brap
Aug 23, 2004

Grimey Drawer
Great job, Luigi Thirty.

brap
Aug 23, 2004

Grimey Drawer
if I were starting a personal project for some jvm thing today I would probably pick kotlin

brap
Aug 23, 2004

Grimey Drawer
maven users: if I have some dependency that i want to pull down sources for, modify, then use in the original project that depended on the thing, what's the most straightforward way to do that?

brap
Aug 23, 2004

Grimey Drawer

Powerful Two-Hander posted:

jfc I'm trying to use the api for this new chat thing and it's documented in yaml that you have to use "swagger" to read which can only be used locally if you have node.js running and install it via docker

like I know that all vendor api docs are terrible but this is wrapping a turd in a second turd made of javascript or something

just use autorest. it'll make your life so much easier :unsmigghh:

brap
Aug 23, 2004

Grimey Drawer
honestly I haven't found a method for making UIs that's more pleasant and productive than react or its clones combined with typescript.

brap
Aug 23, 2004

Grimey Drawer

Sapozhnik posted:

Still undecided on typescript vs flow for this reactjs side-project. I rather wish this rift didn't exist tbh

Flow:
- Written by a bunch of guys who love javascript so much they wrote a type checker for it in ocaml.
- poo poo performance under windows. Supposedly.
- The main IDE is Atom. What the gently caress even is Atom. How do I do anything beyond notepad.exe's capabilities with this goddamn bullshit.
- Yeah you can kind of use it from VSCode but the integration is third-party and really crappy and you have to rip out half of VSCode to make it work so wtf is the point.
- I erroneously wrote "import type * as types from 'whatever'" and this sent it into a crash loop. One crash loop per CPU core, as a matter of fact.
- There are already two incompatible versions in wide use.
- Facebook's whole dev tooling landscape in general is really vertically integrated and keeps wanting to drag in other poo poo of theirs.
+ Works with create-react-app out of the box (misnomer: this is a canned build system for react projects with sane defaults).
+ Facebook is stuck with this poo poo so they have to keep React and Immutable and all their other crap sort-of working with it.
+ Supposedly a stronger type system, and was in fact developed in response to perceived weaknesses in the design and objectives of TS.

TypeScript:
- Not a first-party solution: poo poo will break and I have to hope that people will be entertained by the process of fixing it.
- Don't know the details but the type system has impedance mismatches with Redux and Immutable.js. See above.
- Supposedly has a weaker type system than Flow.
+ I can edit it from VSCode and VSCode doesn't make me want to punch somebody
+ Has first-party support from redux-saga.
+ Has wider first-party support in general. Like there's a Protobuf library that emits TypeScript stubs, no such luck for Flow.

Honestly my main problem with Flow is that I really hate Atom from what little I've seen of it.

I wouldn't use languages invented by facebook unless I worked for facebook. they don't give a poo poo about the anyone's use case outside the company whereas microsoft does. the maintainers of @types are also pretty good at keeping definitions up to date when new versions of major libraries come out.

typescript is not about being a formally sound type checker. they carefully choose to allow certain gaps in order to function with the reality of how people write js code and their expectations in practice. they went a little too far with the c#-ey "null can be assigned to anything lol" early on and now the strict mode has fixed it and is where 99% of people wanna be.

fwiw, you can very easily get by in react without an immutable data structures library simply by using the spread syntax to for instance add a [newElement, ...originalList] or { newKey: newValue, ...originalObject}. I'm optimistic that the recent "mapped types" feature (e.g. a keyof MyType meta-type which is basically a set of strings) has enabled a much better experience with immutable.js though, and if you try it, please let us know your experience.

brap fucked around with this message at 20:54 on Oct 8, 2017

brap
Aug 23, 2004

Grimey Drawer
us is tps thread

Adbot
ADBOT LOVES YOU

brap
Aug 23, 2004

Grimey Drawer
yeah if you are serving a different character sequence as js to your clients than you're looking at in your editor you need source maps and you need to know basically how to make them work. doesn't matter if it's typescript or any Babel thing or flow or even loving fable for that matter.

  • Locked thread