10,000 Matching Annotations
  1. Mar 2021
    1. While various shortcomings of the standard run-time library are the obvious, immediate reason for the creation of micro-packages
    2. 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.
    1. antimicro is a graphical program used to map keyboard keys and mouse controls to a gamepad.

      why is it named this?

    2. 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.
    3. 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...

    1. 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.
  2. github.com github.com
    1. (Nearly all of the code from D3 3.x has been rewritten.)
    2. has better readability
    3. 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.
    4. They reduce the distinction between a “core module” and a “plugin”
    5. Each library is maintained in its own repository, allowing decentralized ownership and independent release cycles.
    6. 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.
    7. The default bundle combines about thirty of these microlibraries.
    8. The default UMD bundle is now anonymous.
    9. 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.
    10. No d3 global is exported if AMD or CommonJS is detected.
    11. The non-minified default bundle is no longer mangled, making it more readable and preserving inline comments.
    12. 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.
    13. Small files are nice, but modularity is also about making D3 more fun.
    14. D3 now passes events directly to listeners, replacing the d3.event global and bringing D3 inline with vanilla JavaScript and most other frameworks.
    1. 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.
    2. 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.
    3. This allows those other dependencies to share the same module instance.
    1. 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

    2. 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.
    3. 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.
    4. 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.
    5. 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:
    1. 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
    2. These applications load faster and foster a good modular development approach.
    3. 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.
    1. 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.
    1. Self answer: 4d00bdf it seems to be to prevent shifting lines in source maps.
    2. Maybe it would be simple to always add that line, and always shift the source maps by 1.
    3. 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?
    4. yeah I discovered too late that #310 exists and does that
    5. 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.
    1. Sure, you have a few extra newlines and semicolons, but the minifier will remove them anyway so no harm.
    2. 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.

    3. And we shave off 6 or so seconds, that is huge.
    4. And no need to walk backwards through all these strings which is surprisingly inefficient in Ruby.
    5. Essentially after any edit of any js file if we reload /qunit it takes us about 10 seconds for the page to render.
    6. 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.
    7. reducing it down to one call significantly speeds up the operation.
    8. Granted it's a toy example using StringIO
    9. I feel like the walk in string_end_with_semicolon? is unnecessarily expensive when having an extra semicolon doesn't invalidate any JavaScript syntax.
    10. I was debugging our painfully slow reload times in Discourse when running qunit.
    1. 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.
    1. 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.
    1. 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.
    2. if we can fix source maps, unconditionally adding ";\n" would be a better solution
    3. 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.
    1. 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...

    2. Inserting on the same line seems fine

      Fine unless the last line is a comment...

    3. Any news on this one?
    4. Thanks for posing that question @SamSaffron
    1. They also lacked a lot of the features users wanted, e.g. more options for searching games and wishlist notifications.
    2. In recent years, Steam also added the features and options that its users were asking for.
    3. 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

    4. 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.
    5. 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.
    6. 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

    1. 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.
    2. 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.
    1. 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.
    2. 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.
    3. "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?

    1. 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.
    1. 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.
    2. 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!
    3. 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.
    4. I am finally getting usable source maps for SCSS, wow!
    1. putting a line break before the directive in the Gem (not suitable because I don't own the gem)
    2. I've been able to find three alternatives ahead of the bugfix
    3. I confirm that since version 4.0.0 of sprockets, a single line directive is breaking the source maps and the javascript debugging system by consequence.
    1. There's not a way to do it at the moment without enabling all debug features.
    2. 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?
    3. You'll still get the correct backtrace, and can use that to view your own sources locally though.
    4. Goal: Give bug trackers like bugsnag access to sprockets generated source maps.
    5. Note: The above rake task executes after the default rake assets:precompile runs, it doesn't replace the default rails task
    6. Any update on this?
    7. Sorry to bump this but we're also in the same situation
    8. we want source maps in production (like DHH)
    9. 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?
    10. After waiting years for sprockets to support this we were very happy to see that sprockets 4 officially added support (thanks ), but then when trying to upgrade we noticed there's actually no way to use it in production... (without brittle hacks mentioned above).
    11. Now that source maps in production by default seems to be the official Rails position, can we expect some movement on this?
    12. If you don't mind putting the sourcemap url in the minified JS
    13. minified_url: MINIFIED_URL_PATH, source_map: HTTP::FormData::File.new(LOCAL_SOURCEMAP_PATH)
    14. //= link application.js.map
    15. While I understand orgs wanting not to expose their unminified source, it's security through obscurity (meaning it's not adding any real security).
    16. The only place I can find it is in the sprockets-rails gem. javascript_include_tag calls this: def find_debug_asset(path) if asset = find_asset(path, pipeline: :debug) raise_unless_precompiled_asset asset.logical_path.sub('.debug', '') asset end end
    17. If I'm understanding correctly, this means that Sprockets only adds sourceMappingURL when assets are dynamically compiled.
    18. I'd be happy to open a PR for this, but I'm not sure exactly what code needs to change. default_source_map.rb and source_map_utils.rb seem like candidates, but I'd appreciate guidance
    19. It seems I'm in the minority, and Sprockets seems to already pretty far along in the beta process, so at most we should add a configuration option to enable it for static compilation.
    20. modifying my build process to send the source map to my error logging service, Rollbar
    1. Sprockets 4: The effect of config.assets.debug does not match the rails documentation.
    2. This appears to be an undocumented breaking change. For example, the word "debug" does not appear in the sprockets 4 changelog.
    3. I'm getting mixed signals
    4. I don't even know how to tell if they're working 100%, I'm getting mixed signals ..
    5. Should it only contain link* calls?
    6. When should I use link, vs dir, vs. tree?
    7. but I still have no idea if I'm writing this new file correctly.
    8. The docs say: "When using Rails and Sprockets in development mode, no assets are concatenated."
    9. concatenation still occurs.
    1. To achieve this, we created a small Compressor which wraps the Uglifier compressor and links the source maps so they are written to disk.
    2. Here's the four case: foo.js Load/Require dependencies Concatenate dependencies foo.js.map Load foo.js Currently grabs metadata[:map] from asset to build an asset, need to move that generation somewhere else to accomplish de-coupling map generation foo.debug.js Load foo.js Load foo.js.map Add comment to end of foo.js with path to foo.js.map foo.source.js The raw file on disk, the map file will need to point to source files.
    3. Now I just need to figure out how to decouple this ball of mud
    4. The way we do it currently is by calling load from inside of load, via different "pipelines" and processors which is quite elegant and completely impossible to work with.
    5. Certainly appreciate the work you've done!
    6. If I can find some time, maybe I can help pitch in somehow.
    7. I'm kinda stuck at the moment, going around in circles. Everything is really heavily coupled. I would like to get to the point where no load is called from within processors, but i'm not sure if that's possible. Currently the API and the caching strategies are fighting me at every step of the way. I have a branch where i'm hacking through some refactoring, no light at the end of the tunnel yet though :(
    8. That should work, but it's a non-trivial change.
    9. For the $$$ question, nothing comes to mind. These problems i'm hitting up against are larger than a contractor could solve in a few hours of work (which would be hundreds/thousands of dollars).
    10. Right now major changes require a deep and broad understanding of the codebase and how things get done.
    11. If a company really wanted to invest, I would prefer they dedicated an employee for X hours a week for Y months than money.
    12. Money could be good if it is spent to provide some of the above things. Money on it's own is hard because then it means I would have to spend time book-keeping and managing instead of programming.
    13. Triaging issues, reproducing bugs, fixing reported bugs are all helpful.
    14. Yeah, can we pay money to make this go faster? Serious question.
    15. I think that's fine, but I also don't particularly care about @mikeycgto's desire to not have the linking comment be present in the minified JS.
    16. Progress is slow though. I want to change how assets are loaded, the current implementation of "pipelines" is challenging to work with.
    17. Our team is also looking into generating source maps in production/staging for error reporting (via Airbrake).
    18. I want source map in prod too (for error tracking, same as @vincentwoo)
    19. Could you explain your use case in a bit more detail? How are you using source maps without source map comments? Are you uploading them to a bug tracker?
    1. Sentry supports un-minifying JavaScript via Source Maps. This lets you view source code context obtained from stack traces in their original untransformed form, which is particularly useful for debugging minified code (e.g. UglifyJS), or transpiled code from a higher-level language (e.g. TypeScript, ES6).
    1. Abbreviations used in bookkeeping

      so inconsistent!

      PL – Profit and loss; (or I/S – income statement) P/R - Payroll etc.

    1. The term taxon was first used in 1926 by Adolf Meyer-Abich for animal groups, as a backformation from the word Taxonomy
    1. Accounting or Accountancy is the measurement, processing, and communication of financial and non financial information about economic entities[1][2] such as businesses and corporations. Accounting, which has been called the "language of business",[3] measures the results of an organization's economic activities and conveys this information to a variety of users, including investors, creditors, management, and regulators.
    2. The terms "accounting" and "financial reporting" are often used as synonyms.
    3. The recording of financial transactions, so that summaries of the financials may be presented in financial reports, is known as bookkeeping, of which double-entry bookkeeping is the most common system.
    1. still compiles everything into single CSS/JS files

      I noticed this too

    2. Reopening #162

      https://github.com/rails/sprockets/issues/162 was already closed as duplicated (so this just creates another duplicate).

      Technically this could be added there.

      Oh, I see, it was from so long ago (2015), that it would probably be frowned upon to reopen such an old issue.

    3. Yes, it's true that it returns a single file, but with the more robust caching in 4.0 it works well enough in my experience.
    4. The semantic has changed a bit as far as I understand. You need to select a pipeline in debug mode.
    5. In order to move forwards with this issue I'll need an example app that reproduces the behavior (https://www.codetriage.com/example_app).
    1. let me know if you've got more issues (by opening a new issue)
    2. it's super hard to test master because i have no idea which gems need to be updated. is there a guide on how to take a rails 4.2 project to master sprockets without everything mysteriously exploding? ill try to make a repro case but its hard to tell where to even start
    3. There's no release of sprockets 4 so there's nothing to revert. Master branch is a WIP. I would recommend using Sprockets 3.
    4. Source maps are on my radar, but i'm playing catchup. See: #124 (comment) for a rundown of where we are right now. Source maps are a pretty big project, it's not li
    5. I'm trying to get official time at work to dedicate to source maps, and haven't made much progress there.
    6. But we're definitely sticking with the source map idea rather than the current (Rails 3/4) behavior of including all JS and CSS files separately while in development?
    7. Still broken, @cannikin. Nobody's on board to investigate, much less fix it. Please do dig in
    8. Any updates on this one? It makes debugging JS and CSS in the web inspector next to impossible when you can't get any help finding the offending code in your own source files.
    1. Sprockets 4.0 treats the ".js.erb" as the extension now. There's no mime type registered to that extension. You need to do: register_mime_type 'application/javascript+ruby', extensions: ['.js.erb']
    1. Opal is a Ruby to JavaScript source-to-source compiler. It comes packed with the Ruby corelib you know and love. It is both fast as a runtime and small in its footprint.
    1. Notice that the HTML elements (BUTTON, DIV, etc.) are in CAPS. We know this is bending the standard Ruby style rules slightly, but we think it reads better this way.
    2. n this example, we are calling a function on FaaStRuby which is a new serverless platform built for Ruby developers.
    3. we used `backticks` to jump into native Javascript to use moment.js

      In regular Ruby, `` executes in a shell, but obviously there is no shell of that sort in JS, so it makes sense that they could (and should) repurpose that syntax for something that makes sense in context of JS -- like running native JavaScript -- prefect!

    4. Hyperstack gives you full access to the entire universe of JavaScript libraries and components directly within your Ruby code.Everything you can do in JavaScript is simple to do in Ruby; this includes passing parameters between Ruby and JavaScript and even passing Ruby methods as JavaScript callbacks.There is no need to learn JavaScript, all you need to understand is how to bridge between JS and Ruby.
    5. Think JavaScript is your only option for the front-end? Think again. Hyperstack is a Ruby DSL, compiled by Opal, bundled by Webpack, powered by React.
    1. I decided a couple of months ago to look for a way to work on faastRuby full time. Today is October 1st, 2019, and I am excited to announce that I am bringing faastRuby into Shopify. As I start this next chapter, I will be taking down all faastRuby servers. 
    2. I decided a couple of months ago to look for a way to work on faastRuby full time. Today is October 1st, 2019, and I am excited to announce that I am bringing faastRuby into Shopify.
    3. What happens to my functions? I encourage you to migrate your workloads to OpenFaaS.
    4. On the “lows” side, I’d say the worst thing was the impact of not being present enough for my family. I was working a full-time job and doing faastRuby on nights and weekends. Here I want to give a big shout out to my wife. She supported me through this and didn’t cut my head off in the process.
    5. One day last August 2018, I stumbled upon an online petition that sparked my curiosity - We Want Serverless Ruby. At that time, none of the major cloud providers had first-class support for Ruby in their serverless products. There were ~1400 devs signing that petition, and I wondered if there was something about Ruby that made it unsuitable for FaaS. I decided to roll the sleeves and start building what would be the first PoC of faastRuby.
    1. The core of OpenFaaS is an independent open-source project originally created by Alex Ellis in 2016. It is now being built and shaped by a growing community of contributors and end-users.
    2. OpenFaaS is hosted by OpenFaaS Ltd (registration: 11076587), a company which also offers commercial services, homepage sponsorships, and support.
    3. OpenFaaS® makes it easy for developers to deploy event-driven functions and microservices to Kubernetes without repetitive, boiler-plate coding.
    1. Emscripten is an LLVM/Clang-based compiler that compiles C and C++ source code to WebAssembly
    2. The Unity, Godot, and Unreal game engines provide an export option to HTML5, utilizing Emscripten.
    1. Examples include Closure Compiler, CoffeeScript, Dart, Haxe, TypeScript and Emscripten.
    2. A source-to-source translator, source-to-source compiler (S2S compiler), transcompiler, or transpiler[1] is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent source code in the same or a different programming language.