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
Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

kedo posted:

Flexbox is a nice step forward. Sure it has its issues, but at least it's better than trying to cobble together a stable, responsive layout using only positioning or, god forbid, floats.

Granted I chuckle to myself when I realize that 99% of what most developers use flexboxes for are the exact same things people used tables for back in the early 2000s. We've come full circle.

Flexbox still can't do exactly what I want it to most of the time. One quick example is seeing constant spacing between items. Still requires margin / last-child hackery which doesn't with if I try to hide children.

Adbot
ADBOT LOVES YOU

Pollyanna
Mar 5, 2005

Milk's on them.


I would rather go with the conventional wisdom of the day since then if we get another 90s situation we're all collectively idiots instead of me being an individual idiot. Even if I'm an individual idiot anyway.

Anything that has to do with GUIs has problems of the same nature. Putting together a GUI in Qt is about as painful.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
Well, Qt is one of the best UI frameworks there is, imho. It may be a bit bloated, but (to me) it makes far more sense than any of the alternatives.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
I think the argument was more about each platform wanting to be a special unique snowflake, so pixel-poking in Qt's GUI designer is a lost cause because each platform will look retardedly different to someone.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

kedo posted:

Missed this on my first read. Why not just go back to <img src="spacer.gif" height="100" /> you goddamn caveman?!

Also:


Because pre-css that was the only way to accurately size an element. Alas, CSS has solved that particular problem.

SupSuper posted:

While we're at it, anyone who still has a pathological fear of <table> in 2015 deserves to be shot.

I'm doing it - I'm making a modern responsive layout using tables. I'm living the dream, you can't stop me now!


Pollyanna posted:

Anything that has to do with GUIs has problems of the same nature. Putting together a GUI in Qt is about as painful.

UI is hard. Nobody has gotten it right to date IMO. Effectively describing a UI in code is an as of yet unsolved problem IMO.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

Mr. Wynand posted:

UI is hard. Nobody has gotten it right to date IMO. Effectively describing a UI in code is an as of yet unsolved problem IMO.

Shamefully I think Flash had the right idea - you don't design UI with code, you design UI with a UI. I really don't want to be exposed to the underlying definitions if I can avoid it.

It doesn't help that web isn't a good environment for design-by-UI programs. HTML and CSS aren't really suited to be authored programatically. Most attempts at site designers introduce all manner of facades to make their own lives easer, and bloat the HTML, CSS or JS to such a size that anything you make with them is totally unusable, or just chock full of bugs and need a dev pass anyway. DreamWeaver put a firm nail in the coffin with this concept for web because DreamWeaver is (was?) a massive pile of poo poo. People are reluctant to even look down this path any more.

It's great that web is platform-agnostic - it's what makes it work - but because we can never go beyond the HTML, CSS and JS level, we always have to wait for vendors to integrate new features, designed by committee, and we're constantly trying to support everyone at the same time (I'm looking at you, IE8), which is a nightmare for it's evolution. The speed of its advance (responsive design, cool libraries) is mostly a testament to the sheer number of people using it, trying their best to solve new problems in a bad situation.

Everything designed for the desktop UI suffers from classic desktop UI problems too, because they were only ever designed for use on the desktop. You can't move that poo poo anywhere else. The introduction of touch screens to laptops was an alarming reminder of how desktop apps were designed for one specific method of user interface, and everything else is a hack.

Microsoft's idea for cross-platform universal apps is hopefully a step in the right direction, but their false-start with the UX disaster of metro in Windows 8 isn't helping them win anyone over with the concept.

kedo
Nov 27, 2007

Mr. Wynand posted:

Because pre-css that was the only way to accurately size an element. Alas, CSS has solved that particular problem.

No, I meant what are you using <div class="spacer"> for these days? I know what spacer.gif was used for... I have far too many ancient projects kicking around on dusty backup drives that make ample use of it.

I say we bring back websites that are coded entirely by ImageReady and are one big image sliced into 500 smaller images that load in a slow, beautiful collage. Or rounded corner buttons that take 4–9 images to achieve. Old web was best web.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
You're describing HTML emails.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

v1nce posted:

Shamefully I think Flash had the right idea - you don't design UI with code, you design UI with a UI. I really don't want to be exposed to the underlying definitions if I can avoid it.
Good lord no. The laying out of components is a photoshop-like manner is trivial - that was never the hard part. It's the way everything interacts and for that you need to deal with all manner of abstractions and straight up programming logic. UIs don't really help you with that (beyond maybe some basic type hinting and documentation where you need it - but that's more an IDE than a visual editor).

quote:

DreamWeaver

HTML, CSS and JS

Desktop apps have had decades of free reign to do whatever they want, and they haven't gotten it right either. Cocoa was probably as good a job as anyone could do (and it had a visual editor to boot!) and it still falls short.

quote:

Everything designed for the desktop UI suffers from classic desktop UI problems too, because they were only ever designed for use on the desktop. You can't move that poo poo anywhere else. The introduction of touch screens to laptops was an alarming reminder of how desktop apps were designed for one specific method of user interface, and everything else is a hack.

Microsoft's idea for cross-platform universal apps is hopefully a step in the right direction, but their false-start with the UX disaster of metro in Windows 8 isn't helping them win anyone over with the concept.

This too is wrong (sorry, I'm not actually going out of my way to be contrarian - but I do genuinely disagree). Different devices require a different experience to be explicitly designed for them. Of course if you just need to adapt something on the quick and cheap crossplatform doodads will do, but they are just shortcuts. You will never be able to do a great job with them. There can (and should) be tools and abstractions that might make some of that work easier but there is absolutely no such thing as "write/design once, run anywhere", and there never will be. AIs will write software and design UIs entirely on their own before that becomes a thing.



kedo posted:

No, I meant what are you using <div class="spacer"> for these days? I know what spacer.gif was used for... I have far too many ancient projects kicking around on dusty backup drives that make ample use of it.

I say we bring back websites that are coded entirely by ImageReady and are one big image sliced into 500 smaller images that load in a slow, beautiful collage. Or rounded corner buttons that take 4–9 images to achieve. Old web was best web.

Oh I don't since, like I said, I've been wasting my life trying to keep things nice and semantic. I can certainly imagine a situation where you just need a div to take up space and nothing else and rather than calling it "abstract-noncontent-placeholder" or some poo poo we can just call it spacer and be done with it.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

Mr. Wynand posted:

sorry, I'm not actually going out of my way to be contrarian
That's fine, I'm trying to get into the spirit of the thread.

Mr. Wynand posted:

The laying out of components is a photoshop-like manner is trivial - that was never the hard part. It's the way everything interacts and for that you need to deal with all manner of abstractions and straight up programming logic. UIs don't really help you with that (beyond maybe some basic type hinting and documentation where you need it - but that's more an IDE than a visual editor).

I really didn't mean just slapping elements down. I mean actually interacting, transitioning, modifying, etc. I'd love a UI editor which worked play-for-play how it'll work on the target device, including the ability to walk through it, hook up functionality. From my limited knowledge I'm dreaming of something between Qt's designer, SquareSpace and Android's designer. With the ability to be responsive, or the ability to specify my own specific layout per breakpoint. I really don't want to be editing lines and lines of code to position and style and transition poo poo.

Flash was a bad example - it can only poo poo out content designed for itself in a fixed window. But as a UI editor goes it was a step in the right direction, especially for its time.

Mr. Wynand posted:

Different devices require a different experience to be explicitly designed for them. Of course if you just need to adapt something on the quick and cheap crossplatform doodads will do, but they are just shortcuts. You will never be able to do a great job with them. There can (and should) be tools and abstractions that might make some of that work easier but there is absolutely no such thing as "write/design once, run anywhere", and there never will be.

Just like a web page, I don't expect to just look at it on my 1920x1200 monitor and go "this will work everywhere!" and it magically looks perfect on my phone, but I want a UI tool which lets me switch to the breakpoints I need, and modify the layout and elements to fit. Maybe even let me specify how I want the transition of elements to look! What a magical day it would be. Yes, there will always be platform hokey-pokey poo poo that just requires a crowbar, but for the core interface elements I just want an authoring tool where I can say "This is a loving button, it triggers this thing over here to go boop. It fucks off in that direction. This new stage slides in." Then I look at it all in the other breakpoint, and I go "woah woah, make the transition faster! make the button flash! Make the title huger and put it over here!", or perhaps I specify an entirely different process for a specific device because I can.

I want a tool that can handle these differences and unique situations and let me implement them, with the least amount of key presses - if any. UIs are visual, and I should be able to visually author them.

Heskie
Aug 10, 2002

Mr. Wynand posted:

Oh I don't since, like I said, I've been wasting my life trying to keep things nice and semantic. I can certainly imagine a situation where you just need a div to take up space and nothing else and rather than calling it "abstract-noncontent-placeholder" or some poo poo we can just call it spacer and be done with it.

I'm guessing, but I think what kedo is getting at is why even do this when you could just apply some padding/margin/positioning to some of the markup used for actual content rather than dropping in empty divs.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

Heskie posted:

I'm guessing, but I think what kedo is getting at is why even do this when you could just apply some padding/margin/positioning to some of the markup used for actual content rather than dropping in empty divs.


I'm sure you can for many situations, but like I said, I can conceive of a scenario where having a spacer div is the cleaner solution. Again, the actual point being that it's OK to treat markup as the presentational structure it actually is.

kedo
Nov 27, 2007

Mr. Wynand posted:

I'm sure you can for many situations, but like I said, I can conceive of a scenario where having a spacer div is the cleaner solution. Again, the actual point being that it's OK to treat markup as the presentational structure it actually is.

code:
SCSS:

.breathe {
  margin-top: 5rem;
  margin-bottom: 5rem;

  &--top {
    margin-bottom: 0;
  }
  
  &--bottom {
    margin-top: 0;
  }
}
code:
HTML:

<p class="breathe">I have extra space on the top and bottom.</p>
<p class="breathe--top">I only have extra space on the top.</p>
<p class="breathe--bottom">I only have extra space on the bottom.</p>
An example of my preferred method. :shrug: While having uber semantic code is not super important to me, I'd still rather not add extra elements when I don't need to. But in general I agree with your point that it's okay for parts of your markup to be purely presentational.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Mr. Wynand posted:

I'm doing it - I'm making a modern responsive layout using tables. I'm living the dream, you can't stop me now!
Still the simplest way to make a grid.

Mr. Wynand posted:

UI is hard. Nobody has gotten it right to date IMO. Effectively describing a UI in code is an as of yet unsolved problem IMO.
I like WPF. :shobon:

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

kedo posted:

code:
SCSS:

.breathe {
  margin-top: 5rem;
  margin-bottom: 5rem;

  &--top {
    margin-bottom: 0;
  }
  
  &--bottom {
    margin-top: 0;
  }
}
code:
HTML:

<p class="breathe">I have extra space on the top and bottom.</p>
<p class="breathe--top">I only have extra space on the top.</p>
<p class="breathe--bottom">I only have extra space on the bottom.</p>
An example of my preferred method. :shrug: While having uber semantic code is not super important to me, I'd still rather not add extra elements when I don't need to. But in general I agree with your point that it's okay for parts of your markup to be purely presentational.

Eh, the thing about adding all the outliers to the stylesheet, is they bloat your CSS just for one offs. If I have a tweak thats needed for just one instance of a template, an inline style is totally okay. Sometimes a design just has something that doesn't fit too well into the system, and that's okay. Inline styles say clearly, I only exist here, and that's actually good for maintenance. Same reason BEM is effective (which I try to adhere to religiously when writing CSS classes)

In the end of the day, div's are passovers in accessibility unless they're given a role, so they don't really affect things to make use of them.

kloa
Feb 14, 2007


I do miss WYSIWYG editors for HTML, but I understand why it's no longer useful :sigh:

kedo
Nov 27, 2007

The amount of code needed to add extra margins to an item inline in term of actual bytes is about the same if you declare it in CSS. And if you're using SASS partials and minifying it's not like you're making your CSS harder to navigate or that much heavier to download due to bloat.

"I'll just do inline styles this once because it's a one-off," is exactly the type of thing that any developer who touches your code after you will loath. Why is this one paragraph padded more than all the others? Oh look it has inline styles. Now in order to change it in CSS I have to !important it, or go in and change the markup. If I'm changing the markup I need to figure out what template file is being used, etc etc. What could have been a five second change is now A Waste Of My Time And I Hope That Other Guy Got Hit By A Truck.

The only times I'll add inline styles if if A) I'm declaring a background image for an element that's getting pulled from somewhere in a CMS and I can't add it into the CSS itself, or B) if I plan on adjusting the values with JS and want to be able to change the style attribute directly.



ps. I don't really hope you get hit by a truck. <3

Jo
Jan 24, 2005

:allears:
Soiled Meat
What's the current state of Polymer JS? It looks like they just hit 1.0. Has anyone used it? Thoughts?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
You're over thinking it mate. If it needs to change in CSS, delete the inline styles and there's no problem. If your development has strict naming schemes, its really no problem, because inline styles are localised.

Yes they're bad for specificity, which is why you only use them for one offs where there's no need for media queries. The overhead you think is added is only there if inline styles are used for more than one off text aligns or spacers.

If you're making code thats meant to be overridden by others, of course you wouldn't use inline styles, but sometimes it's better to inline style on a true one off where the only thing you could meaningfully name it is block--slightlyPadded or u-leftAlign or something. Sometimes it's better not to come up for an arbitrary name for every little thing in your system.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

v1nce posted:

I really didn't mean just slapping elements down. I mean actually interacting, transitioning, modifying, etc. I'd love a UI editor which worked play-for-play how it'll work on the target device, including the ability to walk through it, hook up functionality. From my limited knowledge I'm dreaming of something between Qt's designer, SquareSpace and Android's designer. With the ability to be responsive, or the ability to specify my own specific layout per breakpoint. I really don't want to be editing lines and lines of code to position and style and transition poo poo.

But the vast majority of the time you actually want to be positioning things in relation to other things - and expressing that relationship is not necessarily easier in a visual tool. Instant preview in a variety of settings OTOH is a worthwhile thing to do (and between webpack-dev-server and webkit dev tools, we're mostly there already).


quote:

Flash was a bad example - it can only poo poo out content designed for itself in a fixed window. But as a UI editor goes it was a step in the right direction, especially for its time.

Just like a web page, I don't expect to just look at it on my 1920x1200 monitor and go "this will work everywhere!" and it magically looks perfect on my phone, but I want a UI tool which lets me switch to the breakpoints I need, and modify the layout and elements to fit. Maybe even let me specify how I want the transition of elements to look! What a magical day it would be. Yes, there will always be platform hokey-pokey poo poo that just requires a crowbar, but for the core interface elements I just want an authoring tool where I can say "This is a loving button, it triggers this thing over here to go boop. It fucks off in that direction. This new stage slides in." Then I look at it all in the other breakpoint, and I go "woah woah, make the transition faster! make the button flash! Make the title huger and put it over here!", or perhaps I specify an entirely different process for a specific device because I can.
Again, I think you're really underestimating the problem of expressing these behaviors, and I don't think visual tools are likely to help (but hey I could be wrong).

quote:

I want a tool that can handle these differences and unique situations and let me implement them, with the least amount of key presses - if any. UIs are visual, and I should be able to visually author them.

UIs map the functionality of an application to a mental model of that functional interface in the user's head. A "user interface" if you will. They are not necessarily visual (and many incorporate sound and haptics yada yada) and I think it actively hurts UI design to think of it in primarily visual terms. The conceptual model is always the important (and difficult!) part. Once you nail that, getting the visuals in order is pretty easy.

Also never worry about saving key-presses (or mouse actions, whatever) during development. Worry about maintenance and debugging. A little repetitive busy-work is a small price to pay when it buys you clarity for future development.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

Maluco Marinero posted:

You're over thinking it mate. If it needs to change in CSS, delete the inline styles and there's no problem. If your development has strict naming schemes, its really no problem, because inline styles are localised.

Yes they're bad for specificity, which is why you only use them for one offs where there's no need for media queries. The overhead you think is added is only there if inline styles are used for more than one off text aligns or spacers.

If you're making code thats meant to be overridden by others, of course you wouldn't use inline styles, but sometimes it's better to inline style on a true one off where the only thing you could meaningfully name it is block--slightlyPadded or u-leftAlign or something. Sometimes it's better not to come up for an arbitrary name for every little thing in your system.


Inline styles (other than theming/branding details) for component elements defined in the component itself are the loving bee's knees. It's where they are most relevant and useful. The only concern is the wasteful repetition when pre-rendering a large number of component instances into the HTML - but I bet we could hoist them out to actual CSS files using a webpack loader or something.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Yeah, I'm not drinking the inline by default koolaid just yet. I like BEM, using extends and mixins and so forth in my stylesheets, partially because generated poo poo is adding more layers of abstraction to what you wrote vs what the runtime received. Still, hard lines are hard to draw in front end land, shits changing so much, I think the main thing to draw on is that isolation is good for maintainability. Figure out ways to do that better because isolation doesn't go out of style.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Wouldn't it be weird to do things like media queries with inline styles? You'd end up having to have javascript hook on to window resize and update all the inline styles.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

piratepilates posted:

Wouldn't it be weird to do things like media queries with inline styles? You'd end up having to have javascript hook on to window resize and update all the inline styles.

I just wrote a Flux store that represents viewport dimensions - React components can render based on it as a special "layout" prop (which also includes some other details like grid sizing). I can do any amount of re-layout I want - beats the pants off bootstrap columns both in terms of the things I am able to do and markup weight. The additional rendering overhead is minimal. It's not like window resize has to be heavily optimized for. It does kind of gently caress up pre-rendered content since I have to pre-render it for one specific viewport size and all devices will get a flash of that layout before the real one loads. Might be a few ways to mitigate that though...

We can/should still use media attributes on our stylesheet links to conditionally load heavy device specific assets, like images.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Mr. Wynand posted:

I just wrote a Flux store that represents viewport dimensions - React components can render based on it as a special "layout" prop (which also includes some other details like grid sizing). I can do any amount of re-layout I want - beats the pants off bootstrap columns both in terms of the things I am able to do and markup weight. The additional rendering overhead is minimal. It's not like window resize has to be heavily optimized for. It does kind of gently caress up pre-rendered content since I have to pre-render it for one specific viewport size and all devices will get a flash of that layout before the real one loads. Might be a few ways to mitigate that though...

We can/should still use media attributes on our stylesheet links to conditionally load heavy device specific assets, like images.

Well you got me, that sounds pretty elegant.

gbaby
Feb 6, 2015
Meteor 1.2 came out today. It comes with ECMA15/new JS stuff and support for React and Angular built in, along of course with it's own templating system Blaze :350:. I haven't learned React yet so today's the day.

Huzanko
Aug 4, 2015

by FactsAreUseless

gbaby posted:

Meteor 1.2 came out today. It comes with ECMA15/new JS stuff and support for React and Angular built in, along of course with it's own templating system Blaze :350:. I haven't learned React yet so today's the day.

Is Meteor worth diving into?

kloa
Feb 14, 2007


Noam Chomsky posted:

Is Meteor worth diving into?

It's pretty cool, but if it's still tied to only MongoDB, I'm staying away.

streetlamp
May 7, 2007

Danny likes his party hat
He does not like his banana hat
I've enjoyed my brief experiences with it but they have all just been for quick prototyping of some idea. I believe PostgreSQL is on the roadmap for official support?

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


I'm surprised this thread hadn't already discovered Elm. It's a statically typed, purely functional, compile-to-js-html-and-css language, an arrowized FRP platform, an architecture pattern, a time-travelling live-reloading development server, a package repository, and god knows what else. So far I think it's only used in production by this guy.

Somewhere out there is the one person who wished Meteor was more like Haskell, and who now can't believe their luck.

(I predict I will write real things in this.)

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Doc Hawkins posted:

I'm surprised this thread hadn't already discovered Elm. It's a statically typed, purely functional, compile-to-js-html-and-css language, an arrowized FRP platform, an architecture pattern, a time-travelling live-reloading development server, a package repository, and god knows what else. So far I think it's only used in production by this guy.

Somewhere out there is the one person who wished Meteor was more like Haskell, and who now can't believe their luck.

(I predict I will write real things in this.)

Elm is great, but some things can get annoying. The Elm model strongly pushes you towards having all state defined at the top level and passing it down throughout the view hierarchy. This makes FRP much easier to use and reason about, but it also gets annoying if you have simple things that could be represented by local state. My canonical example is a Bootstrap-style dropdown. If I have 10 of those on a page, I need 10 booleans at my top level defining whether each dropdown is open. This is something that React handles nicely by allowing local state.

We have used Elm for data visualization and animation (when D3.js was just too annoying) and it worked great there since there wasn't much that would benefit from local state. We used the elm-svg package to build the visualizations.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop
I know this thread has been dead for a while but it looks like webdev is still completely hosed. I expected a shitshow like reddit to have hilariously bad deployment hygiene, but Netflix? Don't forget to take the time to read the comments because there's some serious gems in there.

The best part - beyond just the "oops all our poo poo can't build-on-demand" - is that by nuking everything it left all the packages references available for anyone else to upload. Anyone. If they just re-uploaded the previous version now they're the maintainer - or if they were a little more creative, they could put a pointlevel bump "bugfix" and add a nifty backdoor into approximately 2.4 million websites - all of which will happily automatically injest it without question because things like "code signing" aren't cowboy enough.

Good job, Webdev! Glad to see 30-year-old lessons are still being learned daily.

Edit: Oh, I wasn't caught up all the way in coding horrors, it was brought up there already. Still funny as poo poo though.

Harik fucked around with this message at 16:32 on Mar 24, 2016

JawnV6
Jul 4, 2004

So hot ...

JawnV6 posted:

It really seems like the entirety of frontend web tooling needs to be burnt to the ground and rebuilt by adults. Thoughts?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

As soon as somebody finds some adults we'll get started.

feedmegin
Jul 30, 2008

v1nce posted:

I think the argument was more about each platform wanting to be a special unique snowflake, so pixel-poking in Qt's GUI designer is a lost cause because each platform will look retardedly different to someone.

Pixel poking stops working well the instant you need to internationalise an API anyway :shrug:

Analytic Engine
May 18, 2009

not the analytical engine
Here's a video trashing Node and webdev by Casey Muratori, a guy who contributed to the game The Witness, wrote very popular graphics rendering code, and is making the C++ Handmade Hero project:

https://www.youtube.com/watch?v=6azav9sXK_4

I do webdev and data visualization for tech-focused-but-not-really-tech companies, and I'm worried that guys like this have the right idea and I'm wasting my career on garbage software.

FamDav
Mar 29, 2008
He has some valid points but you can tell his personal definition of quality is heavily informed by the stuff that he works on. His negativity towards garbage collectors and his implication that c means high quality are questionable.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

FamDav posted:

He has some valid points but you can tell his personal definition of quality is heavily informed by the stuff that he works on. His negativity towards garbage collectors and his implication that c means high quality are questionable.

Questionable is being generous.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Analytic Engine posted:

Here's a video trashing Node and webdev by Casey Muratori, a guy who contributed to the game The Witness, wrote very popular graphics rendering code, and is making the C++ Handmade Hero project:

https://www.youtube.com/watch?v=6azav9sXK_4

I do webdev and data visualization for tech-focused-but-not-really-tech companies, and I'm worried that guys like this have the right idea and I'm wasting my career on garbage software.

If you weren't doing viz then what would you be doing instead, and what makes you think that'll be better or less of a pain in the rear end than what you're doing right now?

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Game developer and people with demoscene background tend to hate the idea of GC, because GC pauses and predictability kill you in a networked, realtime environment where the expectation is 60fps. He's right when he says C is one of the only modern, usable languages which let you effectively use system resources to their maximum potential.

I've encountered this with web APIs. Canvas, in general, is notoriously lovely about pretending resources are free. Chrome doesn't even track ImageData allocation size correctly, let alone manage it. It thinks since it has a width, a height, and a pointer to a Uint8Array, it's relatively small object and doesn't bother cleaning it up. By creating too many ImageData objects, you can crash Chrome:

https://bugs.chromium.org/p/chromium/issues/detail?id=242215
https://bugs.chromium.org/p/chromium/issues/detail?id=554523

Any sane API written by graphics people who expect 60fps at a bare minimum wouldn't do allocations on getImageData, it would require you pass in a pre-allocated buffer of the correct size so it could be reused. You never do allocation in your hot path.

A good part of the web's poor performance, IMO, can be tracked down to superfluous object creation. I try hard to hit 60fps in everything I do -- preallocate resources, make sure not to create additional objects and closures during runtime, as much as I can. My X server project had to jump through bizarre and unnatural hoops to cut down on GC pauses.

Not to mention that uncollectable reference cycles are extremely easy to create in JS -- closure holds onto a DOM node means that the closure is not able to be freed easily without a full GC collection run in both Firefox and Chrome, since it crosses WebIDL boundaries and destruction can't be done during a light pass.

  • Locked thread