Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Javascript 1.7 - very pythonic

Name: Anonymous 2009-01-25 11:45

https://developer.mozilla.org/en/New_in_JavaScript_1.7

For those that would prefer python if it had braces.

Name: Anonymous 2009-01-25 11:51

AAAAHHHHHHHHHHHHHH GENERATORS

Name: Anonymous 2009-01-25 12:25

>>2
 read on De-structuring Assignment.

Name: Anonymous 2009-01-25 13:30

▀█▀ █  █ █▀  █▀ █  █ ██ █  █  ███ ███
  █  ███ █▀  █▀ █  █ █  ██    █  █ █  █
  █  █  █ █▄  █   ███ ██ █  █  ███ █  █

Name: Anonymous 2009-01-25 13:43

>>4
What?

Name: Anonymous 2009-01-25 14:11

>>3
I did and it was SLOW AS FUCK

Name: Anonymous 2009-01-25 19:55

That's not half bad, though. I envision an epic ongoing battle between whoever is adding stuff like this, and the ones that wanted to Javafy it by adding a second class system and type checking.

Name: Anonymous 2009-01-25 20:04

Too bad you can't do any real work with Javascript besides stupid WEB BROWSER PLUGINS and WEB BROWSER APPS.

Call me back when there's a commandline javascript interpreter with a decent system library.

Name: Anonymous 2009-01-25 20:10

>>8
1/10

Name: Anonymous 2009-01-25 21:13

>>8
That's like saying you can't do any real work in PHP because there's no system library.

Name: Anonymous 2009-01-25 21:16

>>8
Agreed.  You sir, are a cunt.

Name: Anonymous 2009-01-25 23:17

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !FrOzEn2BUo 2009-01-26 2:38

Name: Anonymous 2009-01-26 4:07

Funny how this very thread was posted to reddit today.
Really, I've heard of crossposting before, but this brings it to a whole new level.

Name: Anonymous 2009-01-26 4:39

http://www.javascripttoolbox.com/bestpractices/
JavaScript leverages core skillsets and world-class team synergy to provide clients worldwide with robust, scalable, modern turnkey implementations of flexible, personalized, cutting-edge Internet-enabled e-business application product suite e-solution architectures that accelerate response to customer and real-world market demands and reliably adapt to evolving technology needs, seamlessly and efficiently integrating and synchronizing with their existing legacy infrastructure, enhancing the e-readiness capabilities of their e-commerce production environments across the enterprise while giving them a critical competitive advantage and taking them to the next level.

Name: Anonymous 2009-01-26 5:35

>>12
There's certainly a command-line JavaScript interpreter, but if you're using SpiderMonkey then all you really have in the way of system libraries is XPCOM, and if you're using that then I have only sympathy for you.

Name: Anonymous 2009-01-26 5:42

>>15
JavaScript is a professional, scalable business solution based on industry-standard technologies such as parentheses, spaces and words. Its high-availability mechanism delivers five-nines availability for your mission-critical appliations, fitting your business needs. Its core runs on the Scheme or Common Lisp platforms, and is primarily written in Scheme, ensuring the application of industry best-practices and design patterns that will guarantee maximum customer satisfaction. It works in an object-oriented fashion, discovering business logic in a 2-tier architecture you can easily deploy to optimize cash flows, maximize profits and lower the Total Cost of Ownership, offering an early Return On Investment by converting visitors into customers and creating synergy between your different business departments. It works with your Business Intelligence, Enterprise Resource Planning and Content Management System solutions, and it provides an industry-leading Business Process Management module to facilitate workflow management and lifecycle management. A web services interface provides an enterprise-grade facility for business-to-business interaction and seamless integration with business logic. Lisp leverages core skillsets and world-class team synergy to provide clients worldwide with robust, scalable, modern turnkey implementations of flexible, personalized, cutting-edge Internet-enabled e-business application product suite e-solution architectures that accelerate response to customer and real-world market demands and reliably adapt to evolving technology needs, seamlessly and efficiently integrating and synchronizing with their existing legacy infrastructure, enhancing the e-readiness capabilities of their e-commerce production environments across the enterprise while giving them a critical competitive advantage and taking them to the next level.

Name: Anonymous 2009-01-26 8:30

>>12
Have you ever actually tried doing anything with SpiderMonkey?
Seriously. It sucks. There's no proper standardization for anything that isn't related to the ECMA core or DOM, no functionality for loading external modules -- in fact, if you want to get anything besides, say, print(), you have to compile it into the interpreter and rebuild the damn thing. And SpiderMonkey's disk I/O isn't even enabled unless you enable some non-default compile time flags. What the fuck use is that?!

>>10
That is also true. PHP is shit, and it even does have library support. In fact there is even a Gtk wrapper for PHP, so it's ahead of JS in that respect, but it doesn't change the fact that it is a hideously shitty language to develop in.


Case in point: you can make 3D games with Python. (the most well-known example of this being Eve Online; see also Panda3D and PyGame) Show me something like that with Javascript. Right off the top of my head, I know Python's been used for air traffic control, as well as mission-critical government and military systems. And I'm sure that all of those use Javascript too... for their web pages. In fact, I can't think of a single non-trivial example of something written in, or even embedding Javascript, that isn't somehow tethered to a web page.

Javascript fails in exactly the same way that Lua fails: its developers, instead of harnessing the language's potential, are sticking their fingers in their ears, going LA LA LA I CAN'T HEAR YOU, and rejecting anything that doesn't fit neatly in their restricted world-view of what they want it to be. Python embeds just as easily as it extends; it's highly flexible and powerful. Javascript could be all of those things and more; a standalone JS implementation with decent FFI and a useful standard library would probably kick the shit out of Python, but is it going to happen? Of course not, because all the Javascript developers have web 2.0 on the brain.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !FrOzEn2BUo 2009-01-26 10:39

"Case in point: you can make 3D games with Python. (the most well-known example of this being Eve Online; see also Panda3D and PyGame) Show me something like that with Javascript"

http://www.nihilogic.dk/labs/wolf/

_________________________
orbis terrarum delenda est
 http://xs135.xs.to/xs135/09042/av922.jpg

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !FrOzEn2BUo 2009-01-26 11:52

Press 'x' to open doors ^

_________________________
orbis terrarum delenda est
 http://xs135.xs.to/xs135/09042/av922.jpg

Name: Anonymous 2009-01-26 12:03

[..] rejecting anything that doesn't fit neatly in their restricted world-view of what they want it to be. Python [..]
Hmmm, sounds familiar.

Name: Anonymous 2009-01-26 12:12

>>19

Even though that is a game, it definitely isn't comparable to the Python examples

Name: Anonymous 2009-01-26 12:36

>>19
this doesn't prove anything against what >>18 said

In fact, I can't think of a single non-trivial example of something written in, or even embedding Javascript, that isn't somehow tethered to a web page.

http://www.nihilogic.dk/labs/wolf/ - webpage.

Name: Anonymous 2009-01-26 12:38

Where are >>19-20 and >>22-23?

Name: Anonymous 2009-01-26 12:39

>>24
I ate them.

Name: Anonymous 2009-01-26 12:46

Even if you go further and consider JavaScript related languages such as ActionScript used for Flash, or JavaScript support in Adobe applications such as After Effects(and others), it's still used to extend functionality of some sort of application, just like JavaScript adds scripting functionality to the browser. Standalone usage seems to be incredibly rare.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !FrOzEn2BUo 2009-01-26 13:12

>>23
http://en.wikipedia.org/wiki/JavaScript#Uses_outside_web_pages
Outside the web, JavaScript interpreters are embedded in a number of tools. Each of these applications provides its own object model which provides access to the host environment, with the core JavaScript language remaining mostly the same in each application.

    * ActionScript, the programming language used in Adobe Flash, is another implementation of the ECMAScript standard.
    * Apple's Dashboard Widgets, Microsoft's Gadgets, Yahoo! Widgets, Google Desktop Gadgets, Serence Klipfolio are implemented using JavaScript.
    * The Mozilla platform, which underlies Firefox and some other web browsers, uses JavaScript to implement the graphical user interface (GUI) of its various products.
    * Adobe's Acrobat and Adobe Reader (formerly Acrobat Reader) support JavaScript in PDF files.
    * Tools in the Adobe Creative Suite, including Photoshop, Illustrator, Dreamweaver and InDesign, allow scripting through JavaScript.
    * Microsoft's Active Scripting technology supports the JavaScript-compatible JScript as an operating system scripting language.
    * The Java programming language, in version SE 6 (JDK 1.6), introduced the javax.script package, including a JavaScript implementation based on Mozilla Rhino. Thus, Java applications can host scripts that access the application's variables and objects, much like web browsers host scripts that access the browser's Document Object Model (DOM) for a webpage.[27][28]
    * Newer versions of the Qt C++ toolkit include a QtScript module to interpret JavaScript, analogous to javax.script.[29]
    * The interactive music signal processing software Max/MSP released by Cycling '74, offers a JavaScript model of its environment for use by developers. It allows much more precise control than the default GUI-centric programming model.
    * Late Night Software's JavaScript OSA (aka JavaScript for OSA, or JSOSA), is a freeware alternative to AppleScript for Mac OS X. It is based on the Mozilla 1.5 JavaScript implementation, with the addition of a MacOS object for interaction with the operating system and third-party applications.[30]
    * ECMAScript was included in the VRML97 standard for scripting nodes of VRML scene description files.
    * Some high-end Philips universal remote panels, including TSU9600 and TSU9400, can be scripted using JavaScript.[31]
    * Sphere is an open source and cross platform computer program designed primarily to make role-playing games that use JavaScript as a scripting language.
    * Adobe Integrated Runtime is a JavaScript runtime that allows developers to create desktop applications.
    * OpenOffice.org office application suite allows for JavaScript as one of its scripting languages.
    * Applications on the social network platform OpenSocial are implemented in JavaScript.
    * The client-side web development framework OpenLaszlo uses Javascript.


_________________________
orbis terrarum delenda est
 http://xs135.xs.to/xs135/09042/av922.jpg

Name: Anonymous 2009-01-26 13:26

>>18
What? Lua may not be as pleasant as Python to write, but it's easier to embed, and the reduced footprint does make a difference in both embedded systems and games, which makes it a natural choice in those environments.
That's their niche, what are you saying they're doing wrong? Should they aim to have people write desktop apps with it (it would suck)? Be embedded in design apps (pointless)?

Even more so with Javascript; its only source of recognition is as the web programming language. Stop focusing on that for a moment, and it dies as "that quirky language with all the buggy browser implementations." It's less inert than it seems.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !FrOzEn2BUo 2009-01-26 13:29

>>28
Its doesn't matter, the first language which got integration   into browser is not going to lose
his place to any but the best contender and the transition will take years,if not  decades.  
_________________________
orbis terrarum delenda est
 http://xs135.xs.to/xs135/09042/av922.jpg

Name: Anonymous 2009-01-26 15:23

>>28
I'm not dissing Lua, but any language that strives not to be in widespread usage is doing itself a disservice. If I embed Python (or Perl, Ruby, etc.) into an app, I have the support of a huge mass of people who have written code in that language, because it's so widespread. If I embed Javascript, pretty much the only people who will be able to instantly start working with it are web developers. Sure, there's a goddamn lot of them, but it's not as broad of a category, and as a result the level of experience and mindset of the people writing extensions for my app will be much different. Might be good, might not. If I embed Lua, all I get is a bunch of Quake players, bored programmers who have played with Lua's standalone interpreter, and a random handful of people who've already come across that other app that embedded it, and chances are very few of them will really know how to harness the full power of the language.

The other thing is, Javascript and Lua both have a serious disadvantage overall because no one looks at them and says "hey, I can make whole programs with this!" The motivation is absent beause the languages are limited.

(And suddenly I just thought about mircscript, and now I'm having a great deal of difficulty trying to figure out how it fits into this view of things. Hmm.)

Name: Anonymous 2009-01-26 18:55

>>30
Well, it was more fashionable to roll your own custom built scripting language in the 90s. They live and die with their application, MIRC just happened to take off big time.
It's the same with Lua, a lot of people have learned it for the express purpose of programming for the WoW UI, for example. Popular games or apps will get modding communities, good documentation or previous experience just helps.

Embedding Perl like irssi and rxvt-uterm does seems the better option, though.

Name: Anonymous 2009-03-06 6:08

Platform So get Borland   C Builder 5?

Name: Anonymous 2011-01-31 21:16

<-- check em dubz

Name: tray 2012-03-14 23:18


Don't change these.
Name: Email:
Entire Thread Thread List