Spot the bug: javascript queue
-
Surely it must be able to by now. Javascript is the x86 of the Web!
-
If all else fails, you could probably compile the python interpreter to JavaScript.
-
Can python compile to JavaScript?
apparently.... http://pyjs.org/
of course you could always write your javascript applications in, and i know this will be shocking so you might want to sit down, DUN DUN DUUUUUNNNNN JavaScript!
-
That makes no sense. Should I write my x86 applications in x86? No I should not.
-
Discourse wrote its JavaScript post cooker in JavaScript, but it executes differently on the server than on the client. My Go 3D thingy works the same on the native version as on the JavaScript version.
-
Their mistake was not compiling their server-side Javascript to Javascript. I'm sure you could do that using a compiler written in Ruby compiled to Javascript.
-
HLL <> machine code....
JS is a HLL, x86 is a family of machine code languages.
-
Discourse wrote its JavaScript post cooker in JavaScript, but it executes differently on the server than on the client
well obviously. that's because they execute different code paths to cook in browser compared to on the server.
if they followed the same code path they wouldn't have that issue.
:-P
-
Meh. They're both warty, ugly and ubiquitous.
-
you realize you are talking to someone who loves writing in javascript, for both the server and the browser?
because i do.
i'm not sure this is an argument you can win with me.
-
Oh, I don't know. The odd dabble in x86 here and there keeps me on my toes as well.
-
-
Mis-capped Dvorak with umlaut deadkeys for you!
Filed under: royalty is serious business
-
I love Javascript.
I mean, it's the only possible explanation for me liking it: it's because love is irrational, right?
-
The odd dabble in x86 here and there keeps me on my toes as well.
there's that too. there's also the fun of making a language that is famous for its warts behave beautifully for a problem that most people use an ugly solution for.
-
I actually write more cmd script than either x86 or Javascript, pretty much for exactly that reason.
-
Jokes aside, I'd love if tomorrow all the browser makers decided to adopt Python as an officially supported language for scripting.
-
Pyjs looks quite intriguing, and might actually be better than sixty-leven subtly incompatible almost-Pythons from the browser houses.
-
Or something, I dunno. Hey, V8 is a delicious beverage I should go drink some...
"I coulda had a V8!" Except that I personally wouldn't have had a V8. Never. It contains mostly tomato juice, and is therefore vile beyond redemption, except that it is less vile than tomatoes themselves, because they are 100% tomato.
-
Pyjs looks quite intriguing
https://github.com/qsnake/py2js (seems dead)
(We've got a live one over here!)
http://www.skulpt.org/ (and another!)
(... This isn't funny anymore)
-
Assigning nonexistent would be legal and would result in the destruction of the assignee
var foo = nonexistent;
Filed Under: The var is dead, long live the var!
-
Lèse-majestÊ would be punishable by having your keytops set to AZERTY pattern, your keyboard map set to Dvorak, and double-quote remapped as a compose key for umlauts.
I like the cut of your jib, even though I don't like many of your proposals. Language design is subtle, and most people who try to do it fuck up.
What's up with my keyboard? All the double quotes have become ßmlauts¨!
-
@flabdablet said:
Assigning nonexistent would be legal and would result in the destruction of the assignee, letting me lose the delete operator to unreserve a useful word.
var foo = nonexistent;
Filed Under: The var is dead, long live the var!
I think you mean:function delete(){ return nonexistent; } var foo = delete();
-
var foo = nonexistent;
Yes, you could do that, and it would be almost equivalent to omitting the declaration altogether.
The difference is that declarations are hoisted, so you could use the
foo
that this declares, as long as you did so at a place in its scope before the declaration.
-
@fatbull said:
```
var foo = nonexistent;---------- Filed Under: [The var is dead, long live the var!](#)</blockquote> I think you mean:
function delete(){
return nonexistent;
}var foo = delete();
var nonexistent = delete;
nonexistent = nonexistent();
-
nonexistent
is a reserved word, so you can't use it for a variable name.
-
-
-
Yes, this is exactly the kind of nonsense We made ourselves King in order to banish. If you persist with this, it's off to the umlaut mines with you.
-
-
-
Bah! Off with her head!
-
The fact that present-day Javascript lets you use
undefined
as a variable name says to me that Brendan Eich had a moment of feeling all clever after realizing that a placeholder value for never-assigned variables doesn't actually need a reserved word in the language because you can always generate it for comparison purposes by reading a variable you know you've never assigned anything to.This is an architectural feature analogous to the CPU architectures where register 0 always reads as zero, allowing assorted simple addressing modes to be implemented as special cases of register-indirect-with-index and the use of
move r0, dest
instead of needing a specializedclear dest
instruction.The CDC 6600 used this pattern: register B0 always read as zero, and writes to it were ignored. In an extension of the same idea, it became conventional to load register B1 with the value 1 early on, and never write to it again. Unfortunately this was not enforced by the hardware. You could break any amount of 6600 library code absolutely horribly by putting something other than 1 in B1.
But We are the King now, and in our kingdom such shenanigans are no longer permissible.
undefined
is a reserved word that unambiguously refers to a special value of its own type, just likenull
andnonexistent
are, and any attempt to use it otherwise shall be punished with syntax errors.
-
Is
true
a reserved word? How aboutint
? IsArray
a reserved word, or can I make my own type namedArray
?
-
We have as yet found no reason to object to the existing Javascript common law on those matters. We should remind you, though, that Array is not a type; it's a global object.
-
-
int
is not a reserved word in js, but I wonder if it is in @flabdabletâ script.
-
No more number parsing. Le sigh.
-
We should remind you, though, that Array is not a type; it's a global object.
It's part of the pre-defined standard library. That's entirely cromulent.
-
In my opinion
Array
,Number
. etc. should not be reserved words.
However! the respective properties of the global object should be read-only and non-configurable.To avoid code being fooled into using the wrong objects due to redeclaration in a surrounding scope... err... uh... oh-is-that the-time-gotta-go!
-
The difference is that declarations are hoisted, so you could use the foo that this declares, as long as you did so at a place in its scope before the declaration.
I love that you stick with the non-intuitive nature of the language you're modifying.
-
We value a foolish consistency above non-aggression.
Filed under: annex Python
-
To avoid code being fooled into using the wrong objects due to redeclaration in a surrounding scope...
We have been toying with the idea of reserving a word for the name of the global object of which all the standard built-in globals are properties. Such a word would have, in any scope, equivalent semantics to the word
this
when used in global scope.However, our present view is that to take this path would not give rise to a sufficient measure of :WTF:. Instead, in a manner analogous to that in which absolute pathnames are distinguished from relative pathnames in respectable filesystems, be it provisionally decreed that any name prefixed with a leading
.
, or any prefix-free[Â ]
-enclosed expression that resolves to a name, shall henceforth be taken as referring unambiguously to a property of the global object.
-
So no more 1-element array literals and put periods before line breaks so ASI doesn't murder you. Got it.
-
no more 1-element array literals
Your argument is convincing. The provisional decree is withdrawn, and you are hereby promoted from Court Jester to Grand Vizier.
Filed under: "use imperial";
-
As Grand Vizier, you will need this official seal.
-
-
Discourse wrote its JavaScript post cooker in JavaScript, but it executes differently on the server than on the client.
All that really indicates is that the Discodevs are a buch of idiots (I mean, really, how did this idea make it past prototyping, let alone into production). Then again, nothing new here...
-
@ben_lubar said:
Discourse wrote its JavaScript post cooker in JavaScript, but it executes differently on the server than on the client.
All that really indicates is that the Discodevs are a buch of idiots (I mean, really, how did this idea make it past prototyping, let alone into production). Then again, nothing new here...
oddly, SockDrawer is planning to do exactly teh same thing...... kinda.
we'll be "baking" the posts server side but the page will be rendered in JS serverside on load and client side afterwards.
the difference being that the reder code will literally be identical rather than just being "the same"
-
The entire concept of "baking" makes no sense. Why is that necessary? Why not just parse the raw post every time you need to display it?