332 Matching Annotations
  1. May 2021
  2. Apr 2021
    1. There's nothing to stop you from doing initializer code in a file that lives in app/models. for example class MyClass def self.run_me_when_the_class_is_loaded end end MyClass.run_me_when_the_class_is_loaded MyClass.run_me... will run when the class is loaded .... which is what we want, right? Not sure if its the Rails way.... but its extremely straightforward, and does not depend on the shifting winds of Rails.

      does not depend on the shifting winds of Rails.

    1. What you want is not to detect if stdin is a pipe, but if stdin/stdout is a terminal.

      The OP wasn't wrong in exactly the way this comment implies: he didn't just ask how to detect whether stdin is a pipe. The OP actaully asked how to detect whether it is a terminal or a pipe. The only mistake he made, then, was in assuming those were the only two possible alternatives, when in fact there is (apparently) a 3rd one: that stdin is redirected from a file (not sure why the OS would need to treat that any differently from a pipe/stream but apparently it does).

      This omission is answered/corrected more clearly here:

      stdin can be a pipe or redirected from a file. Better to check if it is interactive than to check if it is not.

    1. By the way, the README file of the expect says there is a libexpect library that can be used to write programs on C/C++ which allows to avoid the use of TCL itself. But I'm afraid, this subject is beyond this article. Besides authors of expect themselves seem to prefer expect-scripts to the library.

      possible but doesn't seem preferred

      looking at what the authors themselves use

    1. TTY is right there in the name, but this article makes no attempt to clarify what exactly the relationship between a pseudoterminal and a TTY. I feel like a whole paragraph about the relation to TTY would be warranted, including a link to TTY article, of course, which does link [back] to and explain some of the relation to pseudoterminal:

      In many computing contexts, "TTY" has become the name for any text terminal, such as an external console device, a user dialing into the system on a modem on a serial port device, a printing or graphical computer terminal on a computer's serial port or the RS-232 port on a USB-to-RS-232 converter attached to a computer's USB port, or even a terminal emulator application in the window system using a pseudoterminal device.

    1. Although echo "$@" prints the arguments with spaces in between, that's due to echo: it prints its arguments with spaces as separators.

      due to echo adding the spaces, not due to the spaces already being present

      Tag: not so much:

      whose responsibility is it? but more: what handles this / where does it come from? (how exactly should I word it?)

    1. There is a tendency in short luck-heavy games to require you to play multiple rounds in one sitting, to balance the scores. This is one such game. This multiple-rounds "mechanic" feels like an artificial fix for the problem of luck. Saboteur 1 and 2 advise the same thing because the different roles in the game are not balanced. ("Oh, well. I had the bad luck to draw the Profiteer character this time. Maybe I'll I'll draw a more useful character in round 2.") This doesn't change the fact that you are really playing a series of short unbalanced games. Scores will probably even out... statistically speaking. The Lost Cities card game tries to deal with the luck-problem in the same way.

      possibly rename: games: luck: managing/mitigating the luck to games: luck: dealing with/mitigating the luck problem

  3. Mar 2021
    1. 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. 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!
    1. 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. Feb 2021
    1. step :direct_debit

      I don't think we would/should really want to make this the "success" (Right) path and :credit_card be the "failure" (Left) track.

      Maybe it's okay to repurpose Left and Right for something other than failure/success ... but only if we can actually change the default semantic of those signals/outputs. Is that possible? Maybe there's a way to override or delete the default outputs?

    1. Though rarer in computer science, one can use category theory directly, which defines a monad as a functor with two additional natural transformations. So to begin, a structure requires a higher-order function (or "functional") named map to qualify as a functor:

      rare in computer science using category theory directly in computer science What other areas of math can be used / are rare to use directly in computer science?

    1. note that TRB source code modifications are not proprietary

      In other words, you can build on this software in your proprietary software but can't change the Trailblazer source unless you're willing to contribute it back.

      loophole: I wonder if this will actually just push people to move their code -- which at the core is/would be a direction modification to the source code - out to a separate module. That's so easy to do with Ruby, so this restriction hardly seems like it would have any effect on encouraging contributions.

    1. To give a little more context, structures like this often come up in my work when dealing with NoSQL datastores, especially ones that rely heavily on JSON, like Firebase, where a records unique ID isn't part of the record itself, just a key that points to it. I think most Ruby/Rails projects tend towards use cases where these sort of datastores aren't appropriate/necessary, so it makes sense that this wouldn't come up as quickly as other structures.
    1. The reason Reform does updating attributes and validation in the same step is because I wanna reduce public methods. This is to save users from having to remember state.

      I see what he means, but what would you call this (tag)? "have to remember state"? maybe "have to remember" is close enough

      Or maybe order is important / do things in the right order is all we need to describe the problem/need.

  5. Jan 2021
    1. Please don't thank me! ;-) If this answer did help, just click the little grey ☑ at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)

      How would you even describe this comment?

      "just doing my job"? but he is (I assume) answering to be nice not because it's his job

      "I won't take it personally"? vote my answer up or down, whichever you please

      impartial, dispassionate, and objective, perhaps? "just the facts, ma'am"


      Separately, what is the "Please don't thank me!" for? Is it that politeness? False modesty? Genuine modesty? Or is it rude? Why not allow someone to thank you??

  6. Dec 2020
    1. Some devs prefer Svelte’s minimal approach that defers problems to userland, encouraging more innovation, choice, and fragmentation, and other devs prefer a more fully integrated toolkit with a well-supported happy path.

      tag?: what scope of provided features / recommended happy path is needed?

    2. It’s worth mentioning that Svelte limits its scope to being only a UI component framework. Like React, it provides the view layer, but it has more batteries included with its component-scoped CSS and extensible stores for state management. Others like Angular and Vue provide a more all-in-one solution with official routers, opinionated state management, CLIs, and more. Sapper is Svelte’s official app framework that adds routing, server-side rendering, code splitting, and some other essential app features, but it has no opinions about state management and beyond. Some devs prefer Svelte’s minimal approach that defers problems to userland, encouraging more innovation, choice, and fragmentation, and other devs prefer a more fully integrated toolkit with a well-supported happy path.

      tag?: what scope of provided features / recommended happy path is needed?

    3. With the caveat that hero worship can be gross, distorting, and unhelpful to everyone involved, Svelte author Rich Harris (@rich_harris on Twitter) is one of my favorite open source developers. In the JS community he’s well-known among tool authors for spreading interesting ideas. He’s the creator of many open source projects including Rollup, the bundler of choice for many libraries including React and Vue.
    4. The compiler architecture moves complexity from the runtime and source code to buildtime and tools. Behind Svelte’s simple APIs sits a beefy compiler. Frontend web development has become very tool heavy in the webapp era, so in practice this adds little cost beyond what developers like myself already pay, but increased build complexity is important to acknowledge.

      tool-heavy dependence on build tools / heavy/complex build-time

  7. Nov 2020
    1. (15x) ENJOYMENT: Forgettable Outstanding(10x) DEPTH (IN RELATION TO COMPLEXITY): Lacking Meaty (5x) LUCK FACTOR: All Luck All Skill (3x) REPLAYABILITY: Nil Limitless(10x) MECHANICS: Boring Interesting (4x) PLAYER INTERACTION: Low High (4x) PLAYER COUNT PERFORMANCE: Not Balanced Balanced (2x) GAME LENGTH: Too Short/Long Just Right (2x) CLARITY OF RULES: Mud Crystal (5x) COMPONENT QUALITY: Cheap World ClassINITIAL RATING (sum(Criteria Rating x Criteria Weight)/Total Weight) = 7.7

      rating scale evaluation

  8. Oct 2020
    1. He highlights the Memex’s killer feature of associative linking and how trails of links have never been implemented in the way the Memex envisioned: It is associative indexing though, that is the essential feature of the memex, “the process of tying two items together is the important thing.” Bush describes a hypertext like mechanism at this point, but most interesting from my perspective is his emphasis on a trail as a fundamental unit — something we largely seem to have lost today. […] Documents and links we have aplenty. But where are our trails?
    1. Doing so also means adding empty import statements to guarantee correct order of evaluation of modules (in ES modules, evaluation order is determined statically by the order of import declarations, whereas in CommonJS – and environments that simulate CommonJS by shipping a module loader, i.e. Browserify and Webpack – evaluation order is determined at runtime by the order in which require statements are encountered).

      Here: dynamic loading (libraries/functions) meaning: at run time

    1. The primary motivation behind virtual-dom is to allow us to write code independent of previous state. So when our application state changes we will generate a new VTree. The diff function creates a set of DOM patches that, based on the difference between the previous VTree and the current VTree, will update the previous DOM tree to match the new VTree.

      annotation meta: may need new tag: for: "code independent of previous state."

      annotation meta: may need new tag: for: diffs other than source/text code diffs (in this case diffs between virtual DOM trees)

  9. Sep 2020
    1. Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
    2. Explicit interfaces are preferable, even if it places greater demand on library authors to design both their components and their style interfaces with these things in mind.
    1. The point of the feature is to not rely on the third-party author of the child component to add a prop for every action under the sun. Rather, they could just mark a recipient for actions on the component (assuming there is a viable target element), and then consumers of the library could extend the component using whatever actions they desire.
    1. It's fashionable to dislike CSS. There are lots of reasons why that's the case, but it boils down to this: CSS is unpredictable. If you've never had the experience of tweaking a style rule and accidentally breaking some layout that you thought was completely unrelated — usually when you're trying to ship — then you're either new at this or you're a much better programmer than the rest of us.
    1. In mapbox.js you'll see this line: const key = {};We can use anything as a key — we could do setContext('mapbox', ...) for example. The downside of using a string is that different component libraries might accidentally use the same one; using an object literal means the keys are guaranteed not to conflict in any circumstance (since an object only has referential equality to itself, i.e. {} !== {} whereas "x" === "x"), even when you have multiple different contexts operating across many component layers.
  10. Jul 2020
  11. Jun 2020
    1. Some large tech behemoths could hypothetically shoulder the enormous financial burden of handling hundreds of new lawsuits if they suddenly became responsible for the random things their users say, but it would not be possible for a small nonprofit like Signal to continue to operate within the United States. Tech companies and organizations may be forced to relocate, and new startups may choose to begin in other countries instead.
  12. May 2020
    1. Taxonomy, in a broad sense the science of classification, but more strictly the classification of living and extinct organisms—i.e., biological classification.

      I don't think the "but more strictly" part is strictly accurate.

      Wikipedia authors confirm what I already believed to be true: that the general sense of the word is just as valid/extant/used/common as the sense that is specific to biology:

      https://en.wikipedia.org/wiki/Taxonomy_(general) https://en.wikipedia.org/wiki/Taxonomy_(biology)

    1. "linked data" can and should be a very general term referring to any structured data that is interlinked/interconnected.

      It looks like most of this article describes it in that general sense, but sometimes it talks about URIs and such as if they are a necessary attribute of linked data, when that would only apply to Web-connected linked data. What about, for example, linked data that links to each other through some other convention such as just a "type" and "ID"? Maybe that shouldn't be considered linked data if it is too locally scoped? But that topic and distinction should be explored/discussed further...

      I love its application to web technologies, but I wish there were a distinct term for that application ("linked web data"?) so it could be clearer from reading the word whether you meant general case or not. May not be a problem in practice. We shall see.

      Granted/hopefully most use of linked data is in the context of the Web, so that the links are universal / globally scoped, etc.

    1. Sure, anti-spam measures such as a CAPTCHA would certainly fall under "legitimate interests". But would targeting cookies? The gotcha with reCAPTCHA is that this legitimate-interest, quite-necessary-in-today's-world feature is inextricably bundled with unwanted and unrelated Google targeting (cookiepedia.co.uk/cookies/NID) cookies (_ga, _gid for v2; NID for v3).
    1. generic-sounding term may be interpreted as something more specific than intended: I want to be able to use "data interchange" in the most general sense. But if people interpret it to mean this specific standard/protocol/whatever, I may be misunderstood.

      The definition given here

      is the concept of businesses electronically communicating information that was traditionally communicated on paper, such as purchase orders and invoices.

      limits it to things that were previously communicated on paper. But what about things for which paper was never used, like the interchange of consent and consent receipts for GDPR/privacy law compliance, etc.?

      The term should be allowed to be used just as well for newer technologies/processes that had no previous roots in paper technologies.

  13. Apr 2020
  14. Mar 2020
    1. How do you leverage browser cache when Google’s very own Analytics.js has it’s expiry time set to 2 hours? How do you minimize DNS requests when Google advices you to copy their tracking code, linking to an externally hosted Javascript file?If that isn’t bad enough already, Google’s advice is to avoid hosting the JavaScript file locally. And why? To ensure you get access to new features and product updates.
  15. Dec 2019
  16. Sep 2018
    1. BOOK 12 THE ARGUMENT The Angel Michael continues from the Flood to relate what shall succeed; then, in the mention of Abraham, comes by degrees to explain, who that Seed of the Woman shall be, which was promised Adam and Eve in the Fall; his Incarnation, Death, Resurrection, and Ascention; the state of the Church till his second Coming. Adam greatly satisfied and recomforted by these Relations and Promises descends the Hill with Michael; wakens Eve, who all this while had slept, but with gentle dreams compos'd to quietness of mind and submission. Michael in either hand leads them out of Paradise, the fiery Sword waving behind them, and the Cherubim taking thir Stations to guard the Place. AS one who in his journey bates at Noone, Though bent on speed, so heer the Archangel paus'd Betwixt the world destroy'd and world restor'd, If Adam aught perhaps might interpose; Then with transition sweet new Speech resumes. [ 5 ] Thus thou hast seen one World begin and end; And Man as from a second stock proceed. Much thou hast yet to see, but I perceave Thy mortal sight to faile; objects divine Must needs impaire and wearie human sense: [ 10 ] Henceforth what is to com I will relate, Thou therefore give due audience, and attend. This second sours of Men, while yet but few; And while the dread of judgement past remains Fresh in thir mindes, fearing the Deitie, [ 15 ] With some regard to what is just and right Shall lead thir lives and multiplie apace, Labouring the soile, and reaping plenteous crop, Corn wine and oyle; and from the herd or flock, Oft sacrificing Bullock, Lamb, or Kid, [ 20 ] With large Wine-offerings pour'd, and sacred Feast, Shal spend thir dayes in joy unblam'd, and dwell Long time in peace by Families and Tribes Under paternal rule; till one shall rise Of proud ambitious heart, who not content [ 25 ] With fair equalitie, fraternal state, Will arrogate Dominion undeserv'd Over his brethren, and quite dispossess Concord and law of Nature from the Earth, Hunting (and Men not Beasts shall be his game) [ 30 ] With Warr and hostile snare such as refuse Subjection to his Empire tyrannous: A mightie Hunter thence he shall be styl'd Before the Lord, as in despite of Heav'n, Or from Heav'n claming second Sovrantie; [ 35 ] And from Rebellion shall derive his name, Though of Rebellion others he accuse. Hee with a crew, whom like Ambition joyns With him or under him to tyrannize, Marching from Eden towards the West, shall finde [ 40 ] The Plain, wherein a black bituminous gurge Boiles out from under ground, the mouth of Hell; Of Brick, and of that stuff they cast to build A Citie and Towre, whose top may reach to Heav'n; And get themselves a name, least far disperst [ 45 ] In foraign Lands thir memorie be lost, Regardless whether good or evil fame. But God who oft descends to visit men Unseen, and through thir habitations walks To mark thir doings, them beholding soon, [ 50 ] Comes down to see thir Citie, ere the Tower Obstruct Heav'n Towrs, and in derision sets Upon thir Tongues a various Spirit to rase Quite out thir Native Language, and instead To sow a jangling noise of words unknown: [ 55 ] Forthwith a hideous gabble rises loud Among the Builders; each to other calls Not understood, till hoarse, and all in rage, As mockt they storm; great laughter was in Heav'n And looking down, to see the hubbub strange [ 60 ] And hear the din; thus was the building left Ridiculous, and the work Confusion nam'd. Whereto thus Adam fatherly displeas'd. O execrable Son so to aspire Above his Brethren, to himself assuming [ 65 ] Authoritie usurpt, from God not giv'n: He gave us onely over Beast, Fish, Fowl Dominion absolute; that right we hold By his donation; but Man over men He made not Lord; such title to himself [ 70 ] Reserving, human left from human free. But this Usurper his encroachment proud Stayes not on Man; to God his Tower intends Siege and defiance: Wretched man! what food Will he convey up thither to sustain [ 75 ] Himself and his rash Armie, where thin Aire Above the Clouds will pine his entrails gross, And famish him of Breath, if not of Bread? To whom thus Michael. Justly thou abhorr'st That Son, who on the quiet state of men [ 80 ] Such trouble brought, affecting to subdue Rational Libertie; yet know withall, Since thy original lapse, true Libertie Is lost, which alwayes with right Reason dwells Twinn'd, and from her hath no dividual being: [ 85 ] Reason in man obscur'd, or not obeyd, Immediately inordinate desires And upstart Passions catch the Government From Reason, and to servitude reduce Man till then free. Therefore since hee permits [ 90 ] Within himself unworthie Powers to reign Over free Reason, God in Judgement just Subjects him from without to violent Lords; Who oft as undeservedly enthrall

      Book XII: continues Michael's vision. Adam and Eve are comforted by hearing of the future redemption of their race. The poem ends as they wander forth out of Paradise and the door closes behind them.

    1. I’m going to assume most people in the room here have read Vannevar Bush’s 1945 essay As We May Think. If you haven’t read it yet, you need to.

      I seem to run across references to this every couple of months. Interestingly it is never in relation to information theory or Claude Shannon references which I somehow what I most closely relate it to.

  17. May 2017
    1. “I and other so-called ‘deniers’ are members of the 97 percent consensus, which refers to the following: Yes, the earth’s climate has been warming overall for more than a century. Yes, humans emit CO2, and CO2 has an overall warming effect on the climate,” Curry said. Where the consensus ends, Curry added, is “whether the dominant cause of the recent warming is humans versus natural causes, how the 21st century climate will evolve, and whether warming is dangerous.”
  18. Aug 2016
    1. VISITS

      I'm not sure exactly where this would fit in, but some way to reporting total service hours (per week or other time period) would be useful, esp as we start gauging traffic, volume, usage against number of service hours. In our reporting for the Univ of California, we have to report on services hours for all public service points.

      Likewise, it may be helpful to have a standard way to report staffing levels re: coverage of public service points? or in department? or who work on public services?

  19. Jul 2016
    1. vẫn thấy trường mình là đại học tốt nhất cả nước về Khoa học Máy tính cần tận dụng triệt để môi trường mình đang có. Vẫn có người, thậm chí cùng phòng mình, đi được Mỹ.