🔗 Quick links thread
-
-
-
ONT:
http://reverent.org/an_artist_or_an_ape.htmlAn artist or an ape?
by Mikhail Simkin
Some of the images displayed below are masterpieces of abstract art, created by great artists. The rest were painted by an ape. Can you tell which is which?
-
That's a trick question, isn't it, given that humans are apes.
-
i'd say it's a question
-
Yeah, yeah, I'll believe it when I get the
i'd say it's a question
HumansApesdon't have tails.
-
i know, but there's no :ape: emoji
-
I got 83%. Got the first one wrong.
-
i got ~66% if you 3 and 5 are easy. the others confused me a little
-
I got exactly that result as well. In hindsight, I can see I didn't develop my heuristic until image 3, and had I gone back and applied it to image 1, I would have gotten that right as well.
Then I sat back and pondered what that means about me. Then I saw a clock and realized it was time to go home :)
-
##7 Essential JavaScript Functions
Pretty good collection of js tricks. There's one that was really a revelation, some that I like but already knew and a few pointless ones.
-
His debounce is fine, although way more complex than it has to be.
His poll is utterly unnecessary. (Is he not aware you can create your own events in JS? Why would you EVER need polling?)
His "once" helper is actually pretty clever. (Although, again, I'm not sure why you'd need it... is he not aware you can remove event handlers once they're no longer needed?)
Get absolute URL is 1) a DOM trick, not a JS one (YES I WILL NEVER SHUT UP ABOUT THAT) and 2) old and well-worn.
His "isNative" is 1) useless, 2) a mess of badly designed regex that only works due to assumptions made about how the JavaScript engine works-- assumptions that are likely to break in future versions. "This function isn't pretty but it gets the job done!" It's not prettiness I object to, but wrongness. And the job it gets done is useless.
His "insertRule" is just basically saying, "oh BTW you can dynamically create STYLE tags in DOM, just like literally every other kind of tag, here's a badly named helper function that kind of sort of makes that slightly easier? I guess?"
"MatchesSelector" more browser-specific DOM hacks that are guaranteed to fail in the future.
-
Get absolute URL is 1) a DOM trick, not a JS one (YES I WILL NEVER SHUT UP ABOUT THAT) and 2) old and well-worn.
Man, this javascript stuff is just getting in the way all the time. Can you tell me how I can cut out the javascript middle man and just do DOM?
-
Can you tell me how I can cut out the javascript middle man and just do DOM?
ActiveX
-
Can you tell me how I can cut out the javascript middle man and just do DOM?
Any language that does XML (and isn't shitty) does XML DOM, so that's Java, C#, F#, VB.net, etc. ActiveX/VBScript does DOM. ActionScript 3, and probably 2, do DOM.
-
@boomzilla said:
Can you tell me how I can cut out the javascript middle man and just do DOM?
Any language that does XML (and isn't shitty) does XML DOM, so that's Java, C#, F#, VB.net, etc. ActiveX/VBScript does DOM. ActionScript 3, and probably 2, do DOM.
But...then you'd bitch that we're doing DOM and not Java, C#, F#, VB.net, etc. What about that function makes it not javascript?
In short, STFU about this bullshit.
-
What about that function makes it not javascript?
JavaScript does nothing in that function except pass the params on to a DOM function. The DOM function does all the work. Then JavaScript returns the result.
If I write a macro in, say, Lua that controls Photoshop and does some image operation, would you say that Lua did the operation, or Photoshop did it?
-
I'd say Windows did it. Unless it was running through Wine on Linux or something
-
If I write a macro in, say, Lua that controls Photoshop and does some image operation, would you say that Lua did the operation, or Photoshop did it?
I sure as hell wouldn't whine about you saying you wrote something in Lua. Since you obviously did.
If someone presented you with a function in any other language that used some library, would you complain about them pointing out the language they used?
-
I'd say Windows did it. Unless it was running through Wine on Linux or something
LIAR. It was obviously a conspiracy between his RAM, CPU and GPU.
-
If someone presented you with a function in any other language that used some library, would you complain about them pointing out the language they used?
Only if they claimed the language did the work and not the library.
Look, JavaScript exists in forms that do not have a DOM available. Therefore if you have an article titled, "7 JavaScript functions", they shouldn't depend on having a DOM available. Because if I'm saying, "oh hey this function is handy, I'll put it in my JScript WSH script which has no DOM" now I'm fucked because I foolishly believed that moron knew what the fuck he was talking about.
If JavaScript were required to have access to a DOM, well, then it'd be a different story.
-
Only if they claimed the language did the work and not the library.
But then you bitched about the javascript function in the link just above, contradicting this.
-
Jesus. Look you don't agree with me, fine. Shut up and stop badgering me with questions, just be wrong and stupid in silence, ok?
-
Only if you stop with whining about someone calling some sort of DOM method from javascript and having the nerve to say they were using javascript.
-
A genius once said:
YES I WILL NEVER SHUT UP ABOUT THAT
-
Get absolute URL is 1) a DOM trick, not a JS one (YES I WILL NEVER SHUT UP ABOUT THAT) and 2) old and well-worn.
That's the one I didn't know. I guess my DOM skillz are rusty.
His "isNative" is 1) useless, 2) a mess of badly designed regex that only works due to assumptions made about how the JavaScript engine works-- assumptions that are likely to break in future versions. "This function isn't pretty but it gets the job done!" It's not prettiness I object to, but wrongness. And the job it gets done is useless.
Not sure what's that one for. You should never ever mess with native functions, except maybe polyfill for old browsers.
"MatchesSelector" more browser-specific DOM hacks that are guaranteed to fail in the future.
For that sort of stuff just use jquery or zepto or one of the micro-replacements. No need to invent hot water.
His "once" helper is actually pretty clever. (Although, again, I'm not sure why you'd need it... is he not aware you can remove event handlers once they're no longer needed?)
You should remove event handlers or rely on jquery to do it for you. His implementation leaks and shouldn't be relied upon in long-lived pages.
His poll is utterly unnecessary. (Is he not aware you can create your own events in JS? Why would you EVER need polling?)
It could be safer than trying to control events through object lifecycle. Also, you don't have events for everything - eg. react when element is added to dom.
-
Also, you don't have events for everything - eg. react when element is added to dom.
Elements don't get added to the DOM by magic. YOU WROTE CODE THAT PUT THEM THERE.
(Or, more likely, in today's Discourse-like development environment: you adopted a buggy framework that's built on top of another buggy framework, that makes use of a third buggy framework to "help" you write code and you're now so fucking abstracted from the actual work the computer is performing you honestly believe DOM elements can appear by magic and you have to poll for them.)
-
Elements don't get added to the DOM by magic. YOU WROTE CODE THAT PUT THEM THERE.
(Or, more likely, in today's Discourse-like development environment: you adopted a buggy framework that's built on top of another buggy framework, that makes use of a third buggy framework to "help" you write code and you're now so fucking abstracted from the actual work the computer is performing you honestly believe DOM elements can appear by magic and you have to poll for them.)
Actually, in most modern frameworks, you're not supposed to touch DOM at all. And if you do, you should certainly know when you add and remove stuff (working with encapsulated components and all).
I'm thinking more of the jQuery "widget" scene. You know, there's a premade calendar thingy, but then boss asks you to add an additional tooltip in a certain field. Ooops, the widget manipulates its own DOM and you have no idea when elements will appear and disappear. Something like this could save your ass from digging through minimized code and trying to hack shit in.
-
I give no shits.
If you need to poll in JavaScript/DOM it means you're writing over-complicated shit.
-
Guy quits go, whines about go problems we have already discussed at length. A refresher course.
-
Relatively frequent need for a generic
syscall
package?
-
THE SETUP INTERVIEWS
What do people use to get stuff done?
Various creative people (programmers, designers, writers...) describe what hardware and software they are using. I mostly use this site to feel the pulse of the PC to Mac exodus among the "professional elite".
-
"professional elite".
Seems to have a gross overrepresentation of hipster kids, judging by the photos.
-
-
I would like Windows to abolish Secure-Boot, so I can run Win8 dual booted with TempleOS.
Y'know, you can disable this thing. It's actually mandatory for manufacturers to provide the option for now.
Also:
I would like a machine with a disk controller and BIOS that used
ATA/ATAPI PIO and a BIOS which also supported legacy PS/2 keyboard/mouse
emulation, so I could run TempleOS natively. I am aware of a 70 core
Knights Landing Intel CPU coming-out. That might be nice.A 70-core procesor working in tandem with PIO. Jesus Christ, it's like steampunk, just more insane.
-
Must have been a slow news day:
Because the state has no active faults like California's, 'the big one' can't happen here, Maine's state geologist explains.
Good news for @accalia, I guess.
-
yeah. that's what i call a slow news day.
-
'the big one' can't happen here, Maine's state geologist explains.
But they can get tsunamis, probably from an undersea landslide. Those just happen from time to time; we don't really know the likelihood for a random piece of continental slope to give way and tumble into the abyss. The thing we know about is that Teide in Tenerife may collapse into the sea — it has the right sort of structure and there's evidence it's got a track record of doing so, just like with the Hawaiian islands in the Pacific — and would be a catastrophic disaster if it occurred (with details being just about impossible to predict in advance). But a continental slope collapse would be probably more hazardous to Maine, not because of size, but rather because of potential proximity.
There's no real limit to the size of wave an underwater landslide can produce other than the depth of the ocean. Which is not reassuring when that's a few miles!
-
Must have been a slow news day:
Because the state has no active faults like California's, 'the big one' can't happen here, Maine's state geologist explains.
Good news for @accalia, I guess.
I don't know how much I would trust this guy. Maybe Maine has no active faults, but reverse [thrust] faults have produced surprises before. Maybe not gigantic surprises, but big suprises. The Loma Prieta earthquate was 6.9; that was the one that collapsed the Nimitz freeway; it originated in a thrust fault.
But otherwise, yeah, slow news day. Earthquake can't happen. Dog bites man. Cat climbs tree.
But they can get tsunamis,
...and, of course, those. Which could be a problem in Maine; population distribution is costal.
-
##A Constructive Look at TempleOS
Guy goes through templeOS and points out the good / interesting things.
-
/san-andreas-style-earthquake-not-possible-in-maine/
They get killer clowns, huge rabid dogs, towns getting cut off from outside world and high-school girls running rampant through cities destroying everything, but hey - at least no earthquakes!
-
I'd be more worried about Yellowstone than tsunamis.
-
I'd be more worried about Yellowstone than tsunamis.
Depends where you live. I'm not very worried about either Yellowstone or tsunamis…
-
I'm not very worried about either.
-
I was under the impression that, if Yellowstone were to throw a tantrum, everyone everywhere should be worried.
-
An Atlantic tsunami is much more likely to happen in my lifetime, and far more practical for me (or anyone else) to do something about. Guess which one is going to exercise my worry braincells?
-
Guess which one is going to exercise my worry braincells?
Neither. there's far more immediate things to worry about, particularly ones that you actually stand a chance of affecting one way or the other.
-
The headline here is awesome:
Flaming Hawk With Snake in Its Talons Sparks Fire Near La Jolla
-
Uh oh:
Seems like some nation-states are upping the stakes to a place nobody wants them to be...
-
##Age, Pleasing Apple, and Trying To Climb Out of the Hole
Jeff Vogel on growing old in a creative field. He's a great indie game designer, but his recent titles were more towards the mediocre side than his earlier stuff.
Excellent blog post.