10,000 Matching Annotations
- Mar 2021
-
news.ycombinator.com news.ycombinator.com
-
-
Essentially we're trying to figure out when it's appropriate for "my" code to become "everyones" code, and if there are steps in between. ("Standard library", for example.)
-
Look no further than C++, where nearly every major software suite has its own strings, vectors, etc. implemented, frequently duplicating functionality already implemented in (1) STL, and (2) Boost. I seem to recall that the original Android Browser, for example, had no fewer than 5 kinds of strings on the C++ side of the code base, because it interfaced with several different systems and each had its own notion of what a string should be.
-
One thing that would be useful to this debate an analysis of a language ecosystem where there are only "macropackages" and see if the same function shows up over and over again across packages.
-
this only applies to end products which are actually deployed. For my modules, I try to keep dependency version ranges at defaults, and recommend others do the same. All this pinning and packing is really the responsibility of the last user in the chain, and from experience, you will make their life significantly more difficult if you pin your own module dependencies.
-
here is my set of best practices.I review libraries before adding them to my project. This involves skimming the code or reading it in its entirety if short, skimming the list of its dependencies, and making some quality judgements on liveliness, reliability, and maintainability in case I need to fix things myself. Note that length isn't a factor on its own, but may figure into some of these other estimates. I have on occasion pasted short modules directly into my code because I didn't think their recursive dependencies were justified.I then pin the library version and all of its dependencies with npm-shrinkwrap.Periodically, or when I need specific changes, I use npm-check to review updates. Here, I actually do look at all the changes since my pinned version, through a combination of change and commit logs. I make the call on whether the fixes and improvements outweigh the risk of updating; usually the changes are trivial and the answer is yes, so I update, shrinkwrap, skim the diff, done.I prefer not to pull in dependencies at deploy time, since I don't need the headache of github or npm being down when I need to deploy, and production machines may not have external internet access, let alone toolchains for compiling binary modules. Npm-pack followed by npm-install of the tarball is your friend here, and gets you pretty close to 100% reproducible deploys and rollbacks.This list intentionally has lots of judgement calls and few absolute rules. I don't follow all of them for all of my projects, but it is what I would consider a reasonable process for things that matter.
-
I suspect you aren't seeing much discussion because those who have a reasonable process in place, and do not consider this situation to be as bad as everyone would have you believe, tend not to comment on it as much.
-
Clearly JS and NPM have done a lot RIGHT, judging by success and programmer satisfaction. How do we keep that right and fix the wrong?
-
That said, I wish more people would talk both sides. Yes, every dependency has a cost. BUT the alternatives aren't cost free either. For all the ranting against micropackages, I'm not seeing a good pro/con discussion.
Tags
- one-sided discussion/debate
- trust/reliance/dependence on open-source libraries
- yuck
- standard ways of doing things
- distinction
- dependencies: locking to specific version
- constantly improving
- interesting idea
- can we do even better?
- good idea
- understand the trade-offs
- security
- silent majority
- micropackages
- best practices
- dependencies: trusting open-source dependencies: review the source code/diff before installing/updating
- C++
- duplication
- tendency of people to only speak up when something is wrong/broken and be silent so long as everything is fine/working/tolerable
- to read
- ecosystem (software)
- good question
- my code vs. everyone's code
- +0.9
- app vs. library
Annotators
URL
-
-
www.facebook.com www.facebook.com
-
Democrat Chicago to allow the economy to open up less than a week after Biden's inauguration...it's all planned to make Biden appear successful! Democrats allowed millions of people to suffer and lose businesses all for their own greed and power!
-
-
en.wikipedia.org en.wikipedia.org
-
-
Whenever majorities trample upon the rights of minorities—when men are denied even the privilege of having their causes of complaint examined into—when measures, which they deem for their relief, are rejected by the despotism of a silent majority at a second reading—when such become the rules of our legislation, the Congress of this Union will no longer justly represent a republican people.
-
-
stackoverflow.com stackoverflow.com
-
Colin D asks how to preserve the JSON structure of the array, so that the final output is a single JSON array rather than a stream of JSON objects. The simplest way is to wrap the whole expression in an array constructor:
-
-
stedolan.github.io stedolan.github.io
-
jq uses the Oniguruma regular expression library, as do php, ruby, TextMate, Sublime Text, etc, so the description here will focus on jq specifics.
Tags
Annotators
URL
-
-
www.usenix.org www.usenix.org
-
-
Unfortunately, this open nature also causes security risks, asevidenced by recent incidents of single packages that brokeor attacked software running on millions of computers.
-
-
github.com github.com
-
www.chevtek.io www.chevtek.io
-
How are hundreds of dependencies and 28,000 files for a blank project template anything but overly complicated and insane?
-
-
www.sitepoint.com www.sitepoint.com
-
Don’t get me wrong — standards are great. Uniformity is bad.
-
The elimination of what is arguably the biggest monoculture in the history of software development would mean that we, the community, could finally take charge of both languages and run-times, and start to iterate and grow these independently of browser/server platforms, vendors, and organizations, all pulling in different directions, struggling for control of standards, and (perhaps most importantly) freeing the entire community of developers from the group pressure of One Language To Rule Them All.
-
JavaScript needs to fly from its comfy nest, and learn to survive on its own, on equal terms with other languages and run-times. It’s time to grow up, kid.
-
If JavaScript were detached from the client and server platforms, the pressure of being a monoculture would be lifted — the next iteration of the JavaScript language or run-time would no longer have to please every developer in the world, but instead could focus on pleasing a much smaller audience of developers who love JavaScript and thrive with it, while enabling others to move to alternative languages or run-times.
-
Ironically, what we’re doing today, is essentially the opposite: rather than reducing the scope of the problem, we continue to grow it, effectively increasing the number of details — and problems — for everyone.
-
for whatever reasons, it hasn’t really liberated anyone from JavaScript.
-
Despite a growing variety of languages that compile to JavaScript, the language itself remains the dominant language in both client-side and server-side eco-systems for web development. The idea of replacing JavaScript with languages that compile to JavaScript, has been explored, and for whatever reasons, it hasn’t really liberated anyone from JavaScript.
-
We standardize on a finite subset of JS (such as asm.js) — and avoid the endless struggle through future iterations of the JavaScript language, competing super-sets and transpilers
asm.js and RPython sound similar (restrictive subsets)
-
agree to accept JavaScript for what it is, but start to think of it as a kind of VM for other languages
-
Again, this is all opinion-based, and due to the sheer number of developers who rely on this technology as their bread and butter, sub-communities and religiousness forms around patterns, anti-patterns, practices, de-facto standards, micro-packages, polyfills, frameworks, build-tools, etc.
-
For instance, those who prefer classical inheritance may enjoy the addition of the class keyword, while others may reject it as conflicting with the idea of a prototypical inheritance model.
-
JavaScript, as a language, has some fundamental shortcomings — I think the majority of us agree on that much. But everyone has a different opinion on what precisely the shortcomings are.
-
-
While various shortcomings of the standard run-time library are the obvious, immediate reason for the creation of micro-packages
-
As to opinions about the shortcomings of the language itself, or the standard run-times, it’s important to realize that every developer has a different background, different experience, different needs, temperament, values, and a slew of other cultural motivations and concerns — individual opinions will always be largely personal and, to some degree, non-technical in nature.
Tags
- software preferences are personal
- why not?
- feature creep
- de facto standard
- separation of concerns
- everyone has different background/culture/experience
- disadvantages/drawbacks/cons
- runtime environment
- object-oriented programming: classical inheritance
- JavaScript: flaws/shortcomings/cons
- non-technical reasons
- everyone has different opinions
- scope creep
- annotation meta: may need new tag
- micropackages
- JavaScript
- uniformity: bad
- standardization
- software project created to address shortcomings in another project
- related but independent projects that can be developed independently
- +0.9
- competition in open-source software
- asm.js
- microlibraries
- fragmented community
- avoid giving partiality/advantage/bias to any specific option
- everyone has different preferences
- standards
- independent release cycles among peer dependencies
- the high churn in JavaScript tooling
- neutral ground
- object-oriented programming: prototypical inheritance
- RPython
- de facto
- reaction / reacting to
- neutral/unbiased/agnostic
- culture
- good point
- single responsibility
- programming languages: choosing the best language for the job
- programming languages
- software freedom
- object-oriented programming
- good idea
- one size fits all mentality
- polyfill
- what is important/necessary for one person may not be for another
- level playing field
- software trends
- rejecting an idea
- anti-pattern
- JavaScript: as a process VM
- JavaScript ecosystem
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.orgPyPy9
-
RPython is now also used to write non-Python language implementations such as Pixie.
-
PyPy was funded by the European Union being a Specific Targeted Research Project
-
Bootstrapping (compilers)
-
Thus the recursive logo of PyPy is a snake swallowing itself since the RPython is translated by a Python interpreter.
-
RPython puts some constraints on the Python language such that a variable's type can be inferred at compile time.
-
There used to be other backends in addition to C: Java, CSharp, and Javascript but those suffered from bitrot and have been removed.
-
PyPy was conceived to be an implementation of Python written in a programming language that is similar to Python.
-
PyPy aims to provide a common translation and support framework for producing implementations of dynamic languages, emphasizing a clean separation between language specification and implementation aspects.
-
PyPy uses a technique known as meta-tracing, which transforms an interpreter into a tracing just-in-time compiler.
Tags
- removing software rot
- interesting approach/solution
- strictly enforced rules/conventions: benefits
- open-source software: funding
- RPython
- PyPy
- recursive
- bootstrapping
- meta
- separation of concerns
- Python
- process VM
- logo
- removing feature that is more trouble than it's worth (not worth the effort to continue to maintain / fix bugs caused by keeping it)
- meta (self-referential)
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
Refactoring is a means of addressing the problem of software rot. It is described as the process of rewriting existing code to improve its structure without affecting its external behaviour.
-
Suppose an administrator creates a forum using open source forum software, and then heavily modifies it by adding new features and options. This process requires extensive modifications to existing code and deviation from the original functionality of that software.
-
cannot be run on any modern day computer or computer simulator, as it was developed during the days when LISP and PLANNER were still in development stage, and thus uses non-standard macros and software libraries which do not exist anymore
-
Software that is not currently being used gradually becomes unusable as the remainder of the application changes.
-
much software requires continuous changes to meet new requirements and correct bugs, and re-engineering software each time a change is made is rarely practical.
-
This creates what is essentially an evolution process for the program, causing it to depart from the original engineered design. As a consequence of this and a changing environment, assumptions made by the original designers may be invalidated, introducing bugs.
-
Infrequently used portions of code, such as document filters or interfaces designed to be used by other programs, may contain bugs that go unnoticed. With changes in user requirements and other external factors, this code may be executed later, thereby exposing the bugs and making the software appear less functional.
-
There are changes in the environment not related to the program's designer, but its users. Initially, a user could bring the system into working order, and have it working flawlessly for a certain amount of time. But, when the system stops working correctly, or the users want to access the configuration controls, they cannot repeat that initial step because of the different context and the unavailable information (password lost, missing instructions, or simply a hard-to-manage user interface that was first configured by trial and error).
-
"the quality in a technical system that prevents a user from restoring the system, once it has failed
.
-
When changes occur in the program's environment, particularly changes which the designer of the program did not anticipate, the software may no longer operate as originally intended.
-
will eventually lead to software becoming faulty, unusable, or in need of upgrade.
-
-
This is not a physical phenomenon: the software does not actually decay, but rather suffers from a lack of being responsive and updated with respect to the changing environment in which it resides.
Tags
- onceability
- refactoring
- constant evolution/improvement of software/practices/solutions
- software rot: dormant rot
- good example
- unanticipated
- software rot
- can't think of everything
- technical solution
- changes (software)
- removing features/code/options that are seldom used
- language: figurative use of word
- emergent behavior
- is it worth the effort?
- high-cost changes
- solution
Annotators
URL
-
-
www.inuse.se www.inuse.se
-
Or perhaps there was no printed manual, only a link to a web page - that has since disappeared (because the provider went bust, or just changed their web content management system).
-
A product’s onceability is, to a certain extent, linked to its usefulness. If it is really useful, we will certainly go to considerable lengths to repair it.
-
But sometimes not even that helps; the onceability factor can, ultimately, trump the usefulness.
-
Even if the damned thing would be really helpful in the long run, I can't give it the time and attention needed to make it work again ... Not right now. And ultimately never.
-
Onceability can be the result of the exaggerated demand for un-memorable passwords.
-
I have proposed a new word for this quality: onceability.
-
It could be defined, tentatively, as "the quality in a technical system that prevents a user from restoring the system, once it has failed".
-
This, I suggest, is an inherent quality in much new technology: the fact that you, as a user, manage to do something once - but not a second time.
-
Digital technology may contain no moving parts but it still, somehow, gets worn, splintered and corroded. It rots. It decays. The rot, though, is mostly invisible (and un-smellable). Still, one day, the thing is broken.
-
But every so often, I wind up a "somewhat-later abandoner".
-
I searched for a replacement, but the list of plug-ins had 5000 items and the search function couldn't find anything of the same kind...
Tags
- onceability
- useful
- deferring until a more opportune/convenient time
- fun wording
- archival: example of something previously available that is no longer available/accessible
- relationship
- difficult/hard problem
- hard to search for
- software rot
- limited time: not right now (maybe later)
- etymology
- supposed to be temporary / things have a way of sticking/becoming permanent
- origin story
- good observation
- definition
- the more useful/important something is, the greater the lengths to which we will go to preserve/fix/repair it
- passwords: too hard to remember them all
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
As a simple example of a basic runtime system, the runtime system of the C language is a particular set of instructions inserted into the executable image by the compiler. Among other things, these instructions manage the process stack, create space for local variables, and copy function-call parameters onto the top of the stack. There are often no clear criteria for deciding which language behavior is considered inside the runtime system versus which behavior is part of the source program. For C, the setup of the stack is part of the runtime system, as opposed to part of the semantics of an individual program, because it maintains a global invariant that holds over all executions. This systematic behavior implements the execution model of the language
-
-
en.wikipedia.org en.wikipedia.org
-
en.wikipedia.org en.wikipedia.org
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
VirtualBox is one example.
-
For example Wine software in Linux helps to run Windows application .
-
is Wine process virtual machine actually?
I think it is, yes.
Wine was given as an example of a process VM above.
-
-
medium.com medium.com
-
Also with one history, these packages will always have commits that are in sync or “atomic”.
-
-
en.wikipedia.org en.wikipedia.org
-
en.wikipedia.org en.wikipedia.org
-
en.wikipedia.org en.wikipedia.org
-
-
The question, 'What is library and information science?' does not elicit responses of the same internal conceptual coherence as similar inquiries as to the nature of other fields, e.g., 'What is chemistry?', 'What is economics?', 'What is medicine?' Each of those fields, though broad in scope, has clear ties to basic concerns of their field. [...] Neither LIS theory nor practice is perceived to be monolithic nor unified by a common literature or set of professional skills. Occasionally, LIS scholars (many of whom do not self-identify as members of an interreading LIS community, or prefer names other than LIS), attempt, but are unable, to find core concepts in common
-
fragmented adhocracy
first sighting: adhocracy
-
The "Pluridisciplinary" or "multidisciplinarity" level The genuine cross-disciplinary level: "interdisciplinarity" The discipline-forming level "transdisciplinarity"
-
Some believe that computing and internetworking concepts and skills underlie virtually every important aspect of LIS, indeed see LIS as a sub-field of computer science!
-
In the last part of the 1960s, schools of librarianship, which generally developed from professional training programs (not academic disciplines) to university institutions during the second half of the 20th century, began to add the term "information science" to their names.
-
-
en.wikipedia.org en.wikipedia.org
-
Documentation science gradually developed into the broader field of information science.
-
-
en.wikipedia.org en.wikipedia.org
-
-
The word authority in authority control derives from the idea that the names of people, places, things, and concepts are authorized, i.e., they are established in one particular form.
-
-
github.com github.com
-
antimicro is a graphical program used to map keyboard keys and mouse controls to a gamepad.
why is it named this?
-
As of May 24, 2016, antimicro has moved from https://github.com/Ryochan7/antimicro to https://github.com/AntiMicro/antimicro. Additionally, project management has passed from Travis (Ryochan7) to the AntiMicro organization due to Travis having other interests and priorities.
-
This repo is currently unmaintained. The code hasn't been updated for a while. But not all is lost, antimicro has a future!
Have to read on to understand...
-
-
yarnpkg.com yarnpkg.comLexicon2
-
Peer dependency A dependency (listed in the peerDependencies field of the manifest) describes a relationship between two packages. Contrary to regular dependencies, a package A with a peer dependency on B doesn't guarantee that A will be able to access B - it's up to the package that depends on A to manually provide a version of B compatible with request from A. This drawback has a good side too: the package instance of B that A will access is guaranteed to be the exact same one as the one used by the ancestor of A. This matters a lot when B uses instanceof checks or singletons.
-
Tags
Annotators
URL
-
-
github.com github.comd3/d314
-
(Nearly all of the code from D3 3.x has been rewritten.)
-
has better readability
-
every symbol in D3 4.0 now shares a flat namespace rather than the nested one of D3 3.x. For example, d3.scale.linear is now d3.scaleLinear, and d3.layout.treemap is now d3.treemap.
-
They reduce the distinction between a “core module” and a “plugin”
-
Each library is maintained in its own repository, allowing decentralized ownership and independent release cycles.
-
D3 4.0 is modular. Instead of one library, D3 is now many small libraries that are designed to work together. You can pick and choose which parts to use as you see fit.
-
The default bundle combines about thirty of these microlibraries.
-
The default UMD bundle is now anonymous.
-
To the consternation of some users, 3.x employed Unicode variable names such as λ, φ, τ and π for a concise representation of mathematical operations. A downside of this approach was that a SyntaxError would occur if you loaded the non-minified D3 using ISO-8859-1 instead of UTF-8. 3.x also used Unicode string literals, such as the SI-prefix µ for 1e-6. 4.0 uses only ASCII variable names and ASCII string literals (see rollup-plugin-ascii), avoiding encoding problems.
-
No d3 global is exported if AMD or CommonJS is detected.
-
The non-minified default bundle is no longer mangled, making it more readable and preserving inline comments.
-
Microlibraries are easier to understand, develop and test. They make it easier for new people to get involved and contribute. They reduce the distinction between a “core module” and a “plugin”, and increase the pace of development in D3 features.
-
Small files are nice, but modularity is also about making D3 more fun.
-
D3 now passes events directly to listeners, replacing the d3.event global and bringing D3 inline with vanilla JavaScript and most other frameworks.
Tags
- compatibility
- no longer any distinction
- breaking change
- fun
- standard ways of doing things
- readability
- core vs. extensions/add-ons/plugins
- modularity
- sad/unfortunate conclusion
- newer/better ways of doing things
- annotation meta: may need new tag
- programming: use of special/mathematical symbols
- release cycle
- reducing the distinction
- constant evolution/improvement of software/practices/solutions
- contributing: low barrier to entry
- d3.js
- flat (not nested)
- anonymous/placeholder/unlabeled object/node
- funny
- simpler code is easier to understand and verify that it is correct
- it's just plain JavaScript
- reasonable defaults
- changes (software)
- wow
- big refactoring/rewrite
- microlibraries
- change of behavior (software)
- polluting the global scope/environment
- limitations leading to workarounds
- bundlers
- independent release cycles among peer dependencies
- making it more fun 
- decentralization
Annotators
URL
-
-
github.com github.com
-
It is unrelated to the technology company AMD and the processors it makes.
-
This is a copy of the "AMD" document in the repo, kept here to maintain historical links. If this document differs from the one in the repo, the repo version is the correct one.
Why not just make this document empty (besides a link) and link/redirect to the canonical version?
That way it is impossible for them to disagree.
Tags
- I have a question about this
- canonical version
- avoid duplication
- maintaining redirect/copy at old URL in order to maintain historical links (broken links)
- not to be confused with
- make it impossible to get wrong/incorrect
- avoid duplication: impossible for them to disagree/diverge if there's only one version/copy
Annotators
URL
-
-
github.com github.com
-
-
Normally you should not register a named module, but instead register as an anonymous module: define(function () {}); This allows users of your code to rename your library to a name suitable for their project layout. It also allows them to map your module to a dependency name that is used by other libraries.
-
For instance, Zepto.js can be mapped to fulfill the module duty for the 'jquery' module ID. There is a notable exception that does register as a named module: jQuery.
-
This allows those other dependencies to share the same module instance.
-
-
medium.com medium.com
-
Because it requires less code to do the same thing as other programming languages projects can be developed faster
-
-
ythakker.medium.com ythakker.medium.com
-
-
An Oligopoly of a few large, mature firms that compete with each other through free market checks and balances (think Detroit auto manufacturers), or
first sighting of: oligopoly
-
Occasionally, like with search engines, #2 occurs because the incumbents gain massive economies of scale (classic Microeconomics), where by virtue of their being large, the cost to produce each incremental good or service at scale becomes much lower.
-
The slightly more dangerous scenario where the market has a winner-take-all effect, where one firm or organization ends up controlling over 70% of the market.
-
When markets are new and “hot”, they often follow that frenzy of dozens — if not hundreds — of entrants trying to grab market share from each other.
-
Inevitably, most of these new entrants get wiped out over a decade or two and their market share goes down into the single digits (often zero). The end result is that the market often resembles one of two possible situations:
Tags
- trend/phenomenon
- monopoly
- ecosystem (software)
- economies of scale
- competition in open-source software
- advantages of being an incumbent
- dangerous result/outcome
- less competition (monopoly): downsides
- competition: results of
- dangerous
- inevitable
- competition
- oligopoly
- JavaScript ecosystem
Annotators
URL
-
-
ponyfoo.com ponyfoo.comPony Foo2
-
-
outdated: link to something from 2013
-
-
www.codemag.com www.codemag.com
-
-
A MicroJS library is a small JavaScript library with a single purpose; you’ve already seen me use a variation of this phrase several times in this article
-
These applications load faster and foster a good modular development approach.
-
Another important MicroJS attribute is independence. Ember, Backbone—even Bootstrap to a degree–have hard dependencies on other libraries. For example, all three rely on jQuery. A good MicroJS library stands by itself with no dependencies. There are exceptions to the rule, but in general, any dependency is another small MicrojJS library.
-
-
microjs.com microjs.com
-
Micro-frameworks are definitely the pocketknives of the JavaScript library world: short, sweet, to the point. And at 5k and under, micro-frameworks are very very portable. A micro-framework does one thing and one thing only — and does it well. No cruft, no featuritis, no feature creep, no excess anywhere.
-
-
github.com github.com
-
Self answer: 4d00bdf it seems to be to prevent shifting lines in source maps.
-
Maybe it would be simple to always add that line, and always shift the source maps by 1.
-
This semi-colon is added to prevent changing the code behaviour (the famous line ending with parentheses, etc) Most people will use a JS minifier If they don't, a single extra character is unlikely to change much If I'm right about all the above: Why don't we simply always add a semi-colon regardless of what the file ends with?
-
yeah I discovered too late that #310 exists and does that
-
If a UTF8-encoded Ruby string contains unicode characters, then indexing into that string becomes O(N). This can lead to very bad performance in string_end_with_semicolon?, as it would have to scan through the whole buffer for every single file. This commit fixes it to use UTF32 if there are any non-ascii characters in the files.
-
-
github.com github.com
-
Sure, you have a few extra newlines and semicolons, but the minifier will remove them anyway so no harm.
-
-
What is the point of avoiding the semicolon in concat_javascript_sources
For how detailed and insightful his analysis was -- which didn't elaborate or even touch on his not understanding the reason for adding the semicolon -- it sure appeared like he knew what it was for. Otherwise, the whole issue would/should have been about how he didn't understand that, not on how to keep adding the semicolon but do so in a faster way!
Then again, this comment from 3 months afterwards, indicates he may not think they are even necessary: https://github.com/rails/sprockets/issues/388#issuecomment-252417741
Anyway, just in case he really didn't know, the comment shortly below partly answers the question:
Since the common problem with concatenating JavaScript files is the lack of semicolons, automatically adding one (that, like Sam said, will then be removed by the minifier if it's unnecessary) seems on the surface to be a perfectly fine speed optimization.
This also alludes to the problem: https://github.com/rails/sprockets/issues/388#issuecomment-257312994
But the explicit answer/explanation to this question still remains unspoken: because if you don't add them between concatenated files -- as I discovered just to day -- you will run into this error:
(intermediate value)(...) is not a function at something.source.js:1
, apparently because when it concatenated those 2 files together, it tried to evaluate it as:
({ // other.js })() (function() { // something.js })();
It makes sense that a ; is needed.
-
And we shave off 6 or so seconds, that is huge.
-
And no need to walk backwards through all these strings which is surprisingly inefficient in Ruby.
-
Essentially after any edit of any js file if we reload /qunit it takes us about 10 seconds for the page to render.
-
Since the common problem with concatenating JavaScript files is the lack of semicolons, automatically adding one (that, like Sam said, will then be removed by the minifier if it's unnecessary) seems on the surface to be a perfectly fine speed optimization.
-
reducing it down to one call significantly speeds up the operation.
-
Granted it's a toy example using StringIO
-
I feel like the walk in string_end_with_semicolon? is unnecessarily expensive when having an extra semicolon doesn't invalidate any JavaScript syntax.
-
I was debugging our painfully slow reload times in Discourse when running qunit.
Tags
- detailed issue/report
- Ruby
- not a real/actual problem
- Sprockets: concatenation: auto-adding a semicolon
- I have this problem too
- going unspoken
- fixing one problem inadvertently broke / made worse something else
- is this a serious question?
- contrived/toy example
- wasteful/inefficient use of resources
- coming up with hypothetical examples
- interesting to learn how they arrived here
- performance optimization
- good enough
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
ECMAScript is a programming language itself, specified in the document ECMA-262. In other words, ECMA-262 is the specification of the programming language ECMAScript. JavaScript is an implementation of ECMAScript which conforms to the ECMAScript specification. JavaScript implementations can also provide additional features not described in the specification.
-
-
en.wikipedia.org en.wikipedia.org
-
The ECMAScript standard does not include any input/output (I/O), such as networking, storage, or graphics facilities. In practice, the web browser or other runtime system provides JavaScript APIs for I/O.
-
-
github.com github.com
-
-
So I was wondering: do you have any examples of broken source maps caused by this approach? I don't use source maps so it'd be nice to have something to start from.
-
if we can fix source maps, unconditionally adding ";\n" would be a better solution
-
Unfortunately, given how widely used concat_javascript_sources is, this required changing a lot of tests. It would be nice if we could remove some of the duplication in these tests (so that similar changes would not require updating this many tests), but that can come in another PR.
-
-
github.com github.com
-
I wondered if we could change the way semicolon addition works to simply append a semicolon on the last line of the JS file and omit the extra newline.
Fine unless the last line is a comment...
-
Inserting on the same line seems fine
Fine unless the last line is a comment...
-
Any news on this one?
-
Thanks for posing that question @SamSaffron
-
-
www.steamprices.com www.steamprices.com
-
They also lacked a lot of the features users wanted, e.g. more options for searching games and wishlist notifications.
-
In recent years, Steam also added the features and options that its users were asking for.
-
P.S. regarding the most obvious question: I have deleted all user information from the database and will not be able to satisfy requests for an export of your collected data - most notably your wishlists.
a little warning probably would have been appreciated
-
Of course, this decision was not made easy. But it was made easier when I looked at the steadily declining visitor count, probably caused by better offerings from other websites that also compare prices to other stores than only Steam. At some point one starts to ask themselves if this is still all worth the trouble. And sometimes you just have to let go.
-
SteamPrices.com has always just been a hobby of mine. It was a nice playground to test and improve my programming skills and I wanted to apply all best practices that I learned. We had a complete website relaunch in 2015 where I added a mobile friendly responsive design and accessibility. But as all hobbies go, you have to find the time and motivation to stick with it. Both were lacking in the last three years and the website went into some sort of slumber. Most tasks always were fully automated and worked without me doing something. When Steam changed their website design and code, I came back to the project to fix the apparent issues. Some issues from the early days were never fully solved and probably never would have, i.e. wrong price information during a sale for games that are part of a cheaper bundle or package. Additionally, defending against people that tried to gather price information from SteamPrices.com instead of Steam was always feeling like an uphill battle.
-
There was a need for websites like SteamPrices.com but this has changed in my opinion. More and more features became obsolete and I countered it with meta-analysis like Price Tracker and Publisher comparison, but the website statistics show that these features were not being used a lot - in the end, they were not in spirit of the initial website idea and goal: compare prices from different Steam regions.
no longer needed
-
-
galyonk.in galyonk.in
-
Of course user expectations for titles are the most important thing. You don’t want to sell a tiny game at AAA price, because you won’t sell many copies and you’ll make your gamers feel ripped off.
-
-
Of course, most of your sales won’t come at the full price, but your original price is a starting point and can only go lower. So choose wisely.
-
-
duckduckgo.com duckduckgo.com
Tags
Annotators
URL
-
-
forum.paradoxplaza.com forum.paradoxplaza.com
-
This thread is more than 5 months old. It is very likely that it does not need any further discussion and thus bumping it serves no purpose. If you feel it is necessary to make a new reply, you can still do so though. I am aware that this thread is rather old but I still want to make a reply.
-
If you think that for every problem there is a simple and easy solution, either you don't understand what is a problem or you don't understand what is a solution.
-
"You will not argue with, comment on or question the actions/authority/ or comments of the Paradox staff (Administrators, Moderators, etc.) in a public forum. Should you wish to do so you are directed to contact the Paradox staff via PM"
do not question us publicly?
-
-
store.steampowered.com store.steampowered.com
-
should be in the base game, not as a DLC.
-
-
store.steampowered.com store.steampowered.com
-
Good bit of content, but very little of it. 10€ for leviathans is a salty price for what it offers, if this was part of the Utopia DLC it's asking price of 20€ would have been easier to justify. Worth getting just to have more content in the game but paradox is really stretching by asking money for this little. Could/should have been a free update really.
-
-
store.steampowered.com store.steampowered.com
-
I didn't mind 20 bucks because Paradox is one of the most linux-friendly companies out there
-
"i dont use this specific thing so this whole pack is irrelevant to me"
-
-
github.com github.com
-
I'd suggest there ought to be config to disable source maps specifically, and specifically for either CSS or JS (not alwasy both), without turning off debug mode. As you note, debug mode does all sorts of different things that you might want with or without source maps.
-
I don't understand why this isn't being considered a bigger deal by maintainrs/the community. Don't most Rails developers use SCSS? It's included by default in a new Rails app. Along with sprockets 4. I am mystified how anyone is managing to debug CSS in Rails at all these days, that this issue is being ignored makes sprockets seem like abandonware to me, or makes me wonder if nobody else is using sprockets 4, or what!
-
Meh... as I said earlier, I think using Webpack is the recommended way now. Another issue is there is no way to generate source maps in production.
-
I am finally getting usable source maps for SCSS, wow!
-
Tags
- annotation meta: may need new tag
- detailed issue/report
- enabled by default but provides a way to opt out if needed
- is anyone even still using it anymore?
- switching/migrating from Sprockets to Webpack (Rails)
- sprockets
- official preferred convention / way to do something
- Sass
- all or nothing (granularity of control)
- source maps
- possible response/reaction to lack of maintainance / maintainer absence/silence
- why aren't people talking about/asking this?
- why aren't the maintainers more concerned about / fixing this?
Annotators
URL
-
-
github.com github.com
-
# This behavior can be disabled with: # # environment.unregister_postprocessor 'application/javascript', Sprockets::SafetyColons
but it appears to no longer be possible in latest version...
-
For JS developers who are colonfobic
-
-
github.com github.com
-
putting a line break before the directive in the Gem (not suitable because I don't own the gem)
-
-
github.com github.com
-
-
There's not a way to do it at the moment without enabling all debug features.
-
I don't get it. Can someone please explain? I've upgraded my Rails project to Sprockets 4, just to get source maps in production. Instead I got sourcemaps in development?
-
You'll still get the correct backtrace, and can use that to view your own sources locally though.
-
Goal: Give bug trackers like bugsnag access to sprockets generated source maps.
-
-
Note: The above rake task executes after the default rake assets:precompile runs, it doesn't replace the default rails task
-
Any update on this?
-
Sorry to bump this but we're also in the same situation
-
we want source maps in production (like DHH)
-
I totally understand that there may be a majority still considering this a bad practice and thus keeping it disabled by default in production seem ok. But there could at least be an option to enable it for people who want to, no?
Tags
- issues: follow-up/ping
- they were confused
- sprockets
- stated goals
- rails: the Rails way
- surprising behavior
- can be disabled by default but at least provide a way to opt in if needed
- best practices
- clarification
- the needs/wishes of a minority
- source maps: using in production
- workaround
- open-source software: progress seems slow
- issues: for improving documentation
- official preferred convention / way to do something
- reasonable defaults
- all or nothing (granularity of control)
- error reporting in production
- missing configuration option or way to customize this behavior
Annotators
URL
-
-
github.com github.com
-
Sprockets 4: The effect of config.assets.debug does not match the rails documentation.
-
This appears to be an undocumented breaking change. For example, the word "debug" does not appear in the sprockets 4 changelog.
-
I'm getting mixed signals
-
I don't even know how to tell if they're working 100%, I'm getting mixed signals ..
-
Should it only contain link* calls?
-
When should I use link, vs dir, vs. tree?
-
but I still have no idea if I'm writing this new file correctly.
-
-
The docs say: "When using Rails and Sprockets in development mode, no assets are concatenated."
-
concatenation still occurs.
Tags
- I noticed this too
- breaking change
- how do you know if you are doing it correctly? (need better feedback/discoverability)
- sprockets
- need better documentation
- no longer the case (outdated info)
- easy to get wrong
- issues: for first impressions / beginner trouble
- documentation: inaccurate/outdated
- undocumented change (missing from changelog)
- annotation meta: may need new tag
- Sprockets: manifest.js
- I have this problem too
- issues: excellent
- issues: for improving documentation
- good question
- seemingly contradictory
- why aren't people talking about/asking this?
Annotators
URL
-