|
anthonypants posted:this probably belongs in this thread https://bugzilla.mozilla.org/show_bug.cgi?id=1154339 lol
|
# ? Jul 19, 2016 04:09 |
|
|
# ? May 11, 2024 09:38 |
|
[making inlining decisions based on the number of characters in the source text is a little goofy] no poo poo...
|
# ? Jul 19, 2016 04:19 |
|
anthonypants posted:this probably belongs in this thread https://bugzilla.mozilla.org/show_bug.cgi?id=1154339 lmao
|
# ? Jul 19, 2016 04:20 |
|
*adds much-needed documentation to code* *code magically gets faster*
|
# ? Jul 19, 2016 04:25 |
|
CPColin posted:You think that's bad, try doing that tutorial in Ceylon! hmm since a 3-vertex polygon is always planar shouldn't I be able to linear interpolate Z rather than running full calculations for every point inside the polygon I need to do some more reading
|
# ? Jul 19, 2016 04:27 |
|
I think the problem is that, for a triangle ABC, you have to interpolate between A.z and B.z and between A.z and C.z at the same time. I went around in circles for ages before I noticed the part where the three Z values are added together before being checked against the z-buffer. But Ceylon manages to paint a 600x600 frame in only 2.5 seconds! Software rendering!
|
# ? Jul 19, 2016 05:05 |
|
Luigi Thirty posted:hmm Barycentric rendering is poo poo-slow yes. Apply a perspective transform first to get screen X,Y co-ordinates (but keep the Z around because you'll need it later), then sort the triangle's vertices by Y co-ordinate. Split the triangle into an upper half triangle and a lower half triangle with a horizontal line running through the middle vertex as the common edge. For each scan line in each half triangle, determine the start and end of the scan line using Bresenham's line drawing algorithm. Then you're just drawing a series of horizontal lines. Do your Z-buffer test for each pixel and then apply perspective-correct interpolation to whatever vertex attributes (texture co-ordinates u,v for texturing and/or normals for lighting) and then stuff those into your "pixel shader". Sapozhnik fucked around with this message at 05:09 on Jul 19, 2016 |
# ? Jul 19, 2016 05:06 |
|
anthonypants posted:this probably belongs in this thread https://bugzilla.mozilla.org/show_bug.cgi?id=1154339 working as intended to punish idiots who dont minify their scripts i have no idea if a tab is technically any more characters then a space
|
# ? Jul 19, 2016 05:09 |
|
CPColin posted:You think that's bad, try doing that tutorial in Ceylon! i was thinking of looking into this because redhat but it doesnt really get me excited
|
# ? Jul 19, 2016 05:12 |
|
MALE SHOEGAZE posted:working as intended to punish idiots who dont minify their scripts i have no idea if a tab is technically any more characters then a space lol really
|
# ? Jul 19, 2016 05:20 |
|
MALE SHOEGAZE posted:i was thinking of looking into this because redhat but it doesnt really get me excited The language has some neat ideas, but Eclipse definitely struggles to deal with it and it's type system is a pretty big drain on my laptop's limited resources, regardless of whether I compile for JavaScript or the JVM. I definitely like the concept of having certain parts of a codebase compile for both platforms and, in theory, act the same, but I think the language tools need some polish.
|
# ? Jul 19, 2016 06:03 |
|
qntm posted:so Nah, its a rare case of hackbunny being wrong (or it mightve been that way in older C++, Ill admit I am a bit hazy on standards before C++11) Different fun thing though, user defined iterators are allowed to overload the "," (comma) operator. This means that this code:
|
# ? Jul 19, 2016 09:27 |
|
Mr Dog posted:just cut to the chase and create a single FACTS(ID, KEY, VAL) table but if you choose assertions(predicate,noun,noun) instead you get so much more flexibility!
|
# ? Jul 19, 2016 10:17 |
|
Xarn posted:Different fun thing though, user defined iterators are allowed to overload the "," (comma) operator. what the heck how does anyone get anything done in c++
|
# ? Jul 19, 2016 10:18 |
|
this is now the second operator,() overload I've seen discussed the first was in MetaKit: quote:c4_View c4_View::operator,(const c4_Property &prop_) const who the hell thought operator,() was a good idea?
|
# ? Jul 19, 2016 10:28 |
|
eschaton posted:this is now the second operator,() overload I've seen discussed Dehumanize yourself and face to operator. overloading.
|
# ? Jul 19, 2016 11:03 |
|
fart simpson posted:what the heck how does anyone get anything done in c++ When I write code, my PoV is that if you do dumb poo poo like that, its not my problem when it blows up. People who maintain and write STL are of the opinion that what isn't forbidden is allowed and must be accomodated, and because of the model of definitive standard vs various implementations, they are probably right. Honestly I don't think I've ever been bitten by operator overloading, but I didn't have to work with types that overloaded && or || yet. Also these things are usually way overblown, I have yet to meet overloaded "," operator in the wild. Xarn fucked around with this message at 11:15 on Jul 19, 2016 |
# ? Jul 19, 2016 11:09 |
|
MALE SHOEGAZE posted:working as intended to punish idiots who dont minify their scripts i have no idea if a tab is technically any more characters then a space \t vs 0x20 Mr Dog posted:Barycentric rendering is poo poo-slow yes. okay thanks i'll try this instead
|
# ? Jul 19, 2016 13:11 |
|
today in code review: 15 minute discussion between 3 devs about whether it is better to create xml that uses attributes or xml that uses elements i.e. XML code:
XML code:
|
# ? Jul 19, 2016 13:12 |
|
so what's the answer
|
# ? Jul 19, 2016 13:14 |
|
redleader posted:today in code review: 15 minute discussion between 3 devs about whether it is better to create xml that uses attributes or xml that uses elements what's the answer?
|
# ? Jul 19, 2016 13:14 |
|
fart simpson posted:so what's the answer we have two senior devs who once they get into an argument on a code review will never stop my lead's official advice was "just delete the review, do whatever one of the two says, and hope the other one doesn't notice it this time"
|
# ? Jul 19, 2016 13:15 |
|
the answer: we have no standards or conventions for xml in any way, so whatever anyone ever writes is fine this is unless the cto decides to get on his high horse and proclaim that 'we should be using <Fucking_Awful_Cased_Xml With_Attributes="Wherever possible" />' this week - and, of course, totally forget about his decree the week after
|
# ? Jul 19, 2016 13:25 |
|
always use elements, because sooner or later you are going to want to put an xml blob inside one, and you can't put a CDATA in an attribute
|
# ? Jul 19, 2016 13:35 |
|
anthonypants posted:this probably belongs in this thread https://bugzilla.mozilla.org/show_bug.cgi?id=1154339 https://top.fse.guru/nodejs-a-quick-optimization-advice-7353b820c92e#.e6wdtz7yl optimize your comments for best performance
|
# ? Jul 19, 2016 14:00 |
|
using a verbose markup language for computer data was such a terrible industry decision that we deserve all the bikeshedding we get
|
# ? Jul 19, 2016 14:30 |
|
redleader posted:today in code review: 15 minute discussion between 3 devs about whether it is better to create xml that uses attributes or xml that uses elements attributes for 1:1 relationships, elements for 1:*
|
# ? Jul 19, 2016 14:42 |
|
comedyblissoption posted:using a verbose markup language for computer data was such a terrible industry decision that we deserve all the bikeshedding we get sins of the greybeards also holy gently caress js optimizing based on character count is the most shitshow thing i've ever heard of e: speaking of shitshow JavaScript code:
HoboMan fucked around with this message at 15:02 on Jul 19, 2016 |
# ? Jul 19, 2016 14:57 |
|
HoboMan posted:sins of the greybeards php function-name length hashing?
|
# ? Jul 19, 2016 15:00 |
|
lol it gets worseC# code:
Captain Foo posted:php function-name length hashing? i had not heard of this HoboMan fucked around with this message at 15:19 on Jul 19, 2016 |
# ? Jul 19, 2016 15:17 |
|
Awful_Case is objectively the worst casing style, bikeshed all you want about c_case and C_CONSTANT_CASE vs javaCase and PascalCase though.
|
# ? Jul 19, 2016 15:47 |
|
Mr Dog posted:Awful_Case is objectively the worst casing style, bikeshed all you want about c_case and C_CONSTANT_CASE vs javaCase and PascalCase though. sorry,, the worst is rEVERSEcAMEL
|
# ? Jul 19, 2016 15:57 |
|
HoboMan posted:lol it gets worse rasmus picked the standard library calls to have unique-ish lengths as a result
|
# ? Jul 19, 2016 16:01 |
|
fleshweasel posted:the natural end state of SQL is a table with a key column and a value column containing arbitrary XML Luigi Thirty posted:hello this is the basis of one of our product's primary features
|
# ? Jul 19, 2016 16:14 |
|
fleshweasel posted:the natural end state of SQL is a table with a key column and a value column containing arbitrary XML jsonb
|
# ? Jul 19, 2016 16:19 |
|
here's some useful database advice - put an index on it - no, really tbh, the whole "schemas for everyone" works best when you have a number of small tables with no shared functionality, and uh you're 100% ok with downtime for migrations i've tended to go for schemas of <every indexable field gets a column> and <everything else gets dumped in jsonb> it has worked very well for our use case
|
# ? Jul 19, 2016 16:25 |
|
tef posted:- put an index on it sql troubleshooting 101
|
# ? Jul 19, 2016 16:32 |
|
tef posted:i've tended to go for schemas of <every indexable field gets a column> and <everything else gets dumped in jsonb> so i've got super limited database experience, but i did work somewhere that hacked a solution like this together (with a mysql text field), and it sorted worked until you suddenly had a feature request like "filter and sort over this field" that you had in your json blob, and you had to write an annoying migration to pull the field out of the json into a column i guess using postgres's actual jsonb type you can now add indexes to json fields and stuff, right? so maybe this isn't as big of an issue, idk
|
# ? Jul 19, 2016 16:35 |
|
dont put json or xml into a column
|
# ? Jul 19, 2016 16:37 |
|
|
# ? May 11, 2024 09:38 |
|
how long until we can put sql in json?
|
# ? Jul 19, 2016 16:47 |