5,079 Matching Annotations
  1. Oct 2020
    1. This reactive statement is just used to have the store automatically subscribed and unsubscribed.
    2. I'm not sure I understand the problem, everything you are describing is already possible.
    3. Svelte right now has a lot of opportunities to have component state become out of sync with props.
    4. I'm suggesting this is a problem generally. Users will not think of being out of sync with props
    5. Svelte doesn't re-render, so you need to respond to component mount/dismount and prop changes separately as they are distinct concepts and never tied together, unlike in React.
    1. the code is a bit verbose/convoluted
    2. To fix our Svelte version you might think we could use beforeUpdate or afterUpdate, but these lifecycle functions are related to the DOM being updated, not to prop updates. We only want to rerun our fetching when the album prop is changed.
    3. When using React hooks there is no concept of onMount because the idea of only running some code on mount leads to writing non-resilient components, components that do one thing when they mount, and then don’t take prop changes into account.
    4. Beautiful, except that switching albums does not update the PhotoGrid. This is not the automatic reactivity we were promised by Svelte.
    1. A “solution” to GR is more like a model in logic: it may satisfy a theory’s axioms but have other properties that are contingent (unless the theory is categorical, meaning that all of its models are isomorphic).
    1. Safiya Noble, Algorithms of Oppression (New York: New York University Press, 2018). See also Mozilla’s 2019 Internet Health Report at https://internethealthreport.org/2019/lets-ask-more-of-ai/.
    1. So that’s already a huge advantage over other platforms due the basic design. And in my opinion it’s got advantages over the other extreme, too, a pure peer-to-peer design, where everyone would have to fend for themselves, without the pooled resources.

      Definitely something the IndieWeb may have to solve for.

    1. “INFORMATION RULES”—published in 1999 but still one of the best books on digital economics—Carl Shapiro and Hal Varian, two economists, popularised the term “network effects”,

      I want to get a copy of this book.

    1. In the Ars memorandi noua secretissima, published in 1500 or 1501,20 Jodocus Weczdorff de Triptis (Weimar) inserted an alphabetical list of words, similar to that of Celtis, but he simply suggested that it could be used as a memory house without any scope for our private associations. Moreover, the alphabetic table of Celtis was included in the famous Margarita philosophica nova of Gregor Reisch, which was probably the most popular handbook of the artes scholars in the fi rst two decades of the 16th century.

      Books on memory that used Celtes' trick

    2. “The Art of Memory in Late Medieval East Central Europe (Bohemia, Hungary, Poland): An Anthology,” co-written by Lucie Doležalová, Rafał Wójcik and myself.

    Tags

    Annotators

    1. In 1945 Jacques S. Hadamard surveyed mathematicians to determine their mental processes at work by posing a series of questions to them and later published his results in An Essay on the Psychology of Invention in the Mathematical Field.

      I suspect this might be an interesting read.

    1. In April of 2019, at a digital learning conference, Manuel Espinoza spoke with educators, technologists, and annotation enthusiasts about R2L.d-undefined, .lh-undefined { background-color: rgba(0, 0, 0, 0.2) !important; }.d-undefined, .lh-undefined { background-color: rgba(0, 0, 0, 0.5) !important; }1Nate Angell and “the role that Hypothesis plays in human rights work.”

      Manuel Espinoza, “Keynote,” AnnotatED Summit, April 2, 2018, https://youtu.be/5LNmSjDHipM.

    1. Horwitz argued a fairly radical point, which I think never received wide enough recognition due to the subject matter and his extremely difficult (dense and dry) style.  He said, “I seek to show that one of the crucial choices made during the antebellum period was to promote economic growth primarily through the legal, not the tax, system, a choice which had major consequences for the distribution of wealth and power in American society”

      I'll have to add this book to my to read stack.

    1. Universal Design for Learning: Theory and Practice by Meyer, Rose, and Gordon (a book recognized as the core statement about UDL, which you can read for free) walks us through how educators actively change their practice to become more inclusive and helps us weigh choices in terms of how we create unnecessary barriers:
    1. Unfortunately people lack the the time to invest to really understand those things
    2. If there was a place I thought reactivity would be weak, I embraced it and I worked on it until I was happy with the results.
    3. It was clear no one was interested in what I was working towards.
    4. but everything they were doing started to make sense
    5. I kept on wanting them to work like Fine-Grained reactivity, since it was much more intuitive.
    6. Vue was always felt contrived for me.
    7. I couldn't land on how I wanted to box primitives. Should I use a getter/setter, or function form like Knockout, or explicit get/set like MobX? These were all ugly.
    8. Over time Adam, Surplus' creator, had less and less time to spend on the project and I decided to take my own shot.
    9. I started Solid years ago before I thought anyone would be interested in using it. I only started promoting it because it had already achieved the goals I had set out for it.
    1. Note that if you are calling reset() and not specify new initial values, you must call it with no arguments. Be careful to avoid things like promise.catch(reset) or onChange={form.reset} in React, as they will get arguments passed to them and reinitialize your form.
    1. If a part of the content deserves its own heading, and that heading would be listed in a theoretical or actual table of contents, it should be placed in a <section>. The key exception is where the content may be syndicated; in this case, use <article> element instead.
    1. Confidence to express ignorance is a super power. One good way I hone this skill is by saying “Nothing to add” when I have nothing to add, instead of repeating what other people said.
    1. How To Write This Poem

      begin here …with TIME

      where words

      are layered with text

      where the pen

      etches into screen …

      then go here …

      (https://www.vialogues.com/vialogues/play/61205)

      … only to leap from one place

      to another,

      where my mind goes

      I hardly every know,

      only that it ventures forward …

      (https://paper.dropbox.com/doc/How-to-Read-a-Poem-by-me--A9AH3OSbHZqKqxia0PQOSa1~Ag-pHyO4XNCl1aIq4KoX22Be)

      … heard by hearts,​​

      and scattered stars,

      ​​where I see the sky fall,​​

      you find the debris …

      our thoughts.

      (https://nowcomment.com/documents/234044)

      Might we be permitted them?

      The dragonfly

      rarely yields her ground

      to the critics among

      us.

    2. Kevin's Response

      How To Write This Poem

      begin here …with TIME

      where words

      are layered with text

      where the pen

      etches into screen …

      then go here … https://www.vialogues.com/vialogues/play/61205

      ... only to leap from one place to another, where my mind goes I hardly every know, only that it ventures forward ...

      https://paper.dropbox.com/doc/How-to-Read-a-Poem-by-me--A9AH3OSbHZqKqxia0PQOSa1~Ag-pHyO4XNCl1aIq4KoX22Be

      … heard by hearts, ​​and scattered stars, ​​where I see the sky fall, ​​you find the debris …. ​​https://nowcomment.com/documents/234044

      Your thoughts?

    1. r self-r

      This paragraph discuses the use of the word "bullshit" as it is used in every day life. Decide whether this is arguement, structure or both.

    2. A Kind Word for Bullshit: The Problem of Academic Writin

      Add MLA citation

    1. The Indian government is pushing a bold proposal that would make scholarly literature accessible for free to everyone in the country

      "... accessible for free ..."

      open access sampai hari ini memang hanya diartikan sebagai membuat artikel ilmiah dapat diunduh dengan membayar APC atau dikenal sebagai modus Gold OA.

      Artikel oleh Peter Suber ini menjelaskan bahwa OA tidak hanya bisa dilakukan melalui jurnal Gold OA.

    1. be quick to start books, quicker to stop them, and read the best ones again right after you finish

      farnam street blog tips on reading

    1. He says that he sees the combination of long form pieces and Q&A as a new level of support. “We used to have level one, which was sending a ticket to the help desk, and it was something we could easily resolve for you. Level two was a more complex problem that maybe required an engineer or specialist from a certain team to figure out. I look at this new system as a level zero.” Before sending us a ticket, folks can search Teams. If they find a question that solves the problem, great. If they need more details, they can follow links to in-depth articles or collections that bring together Q&A and article with the same tags.“
  2. leanprover.github.io leanprover.github.io
  3. Sep 2020
    1. Why the obfuscation of remaining to r and callbacks to c? This is fine for function-local variables but in this instance makes the code significantly harder to reason about? There is no notion of what c and r mean.
    1. The problem I have with this approach to state and prop variables is that the difference between them is very blurry. In React you can clearly see that a prop is an input to component (because of clear function notation), and that state is something internal. In Svelte they are both just variables, with the exception that props use export keyword.

      This is something I've seen before: people noticing that Svelte is missing some kind of naming convention.

      React has use___ convention, for example. Without that, it makes it hard to see the difference between and know just from the name that a function is an (mentioned in the other article I read) action and not a event handler or even component, for example.

    1. /node_modules/

      This might be better than explicitly listing all external modules...?

    1. Modules using code that doesn’t exist in browsers such as process.env.NODE_ENV and forcing you to convert or polyfill it.
    2. The benefit of this approach is that rather than having these defaults and fighting against them, it’s fully up to you to decide how to handle everything.
    3. Instead, rather than trying to implement what it thinks is the best way to bundle different type of assets, it leaves that entirely up to the developer to decide.
    4. Personally for me, this is incredibly hard to read. Regex everywhere, nested objects with different rules and configurations that are very intuitive, multiple loaders that resolve backwards, built in loaders having obscure issues that require using third party loaders in between, separation of plugins and loaders, and so on.
    5. In my opinion, because Webpack was one of the first bundlers, is heavily packed with features, and has to support swathes of legacy code and legacy module systems, it can make configuring Webpack cumbersome and challenging to use. Over the years, I’ve written package managers, compilers, and bundlers, and I still find configuring Webpack to be messy and unintuitive.
    6. Unfortunately, many third party libraries, even though they are written in ESM, are published to npm as CJS modules, so we still need to concatenate them.
    1. Did you know that you can create a Svelte component and with almost no extra steps distribute- and use it like any classic old Javascript library through a global constructor (let myComponent = new MyComponent())?
    1. So I guess what @Rich-Harris is trying to say is that (sorry, I'm just logging it here for my own benefit)
    2. we've learned why you might want to use external but not globals: libraries. We've started to factor some of our client-side JS as libraries to share between projects. These libraries import $ from 'jquery'. However they don't want to presume how that import might be "fulfilled". In most projects it's fulfilled from a global i.e. a script loaded from a CDN. However in one project it's fulfilled from a local copy of jQuery for reasons I won't get into. So when these libraries bundle themselves for distribution, as ES6 modules, they mark 'jquery' as an external and not as a global. This leaves the import statements in the bundle. (Warning: Don't bundle as an IIFE or UMD, or Rollup will guess at fulfilling the import from a global, as @Rich-Harris mentions above.)
    1. Luckily, there is absolutely no good reason not to use strict mode for everything — so the solution to this problem is to lobby the authors of those modules to update them.
    1. small modules allow library authors to become lazy. Why include that six-line helper function when you can do a one-line `require`?
    2. These are all things that make your life as a library author easier.
    3. This happens because npm makes it ridiculously easy for people to release their half-baked experiments into the wild. The only barrier to entry is the difficulty of finding an unused package name. I’m all in favour of enabling creators, but npm lowers the barriers right to the floor, with predictable results.
    4. I think I know why: it’s because the small modules philosophy favours library authors (like Sindre) at the ultimate expense of library users.
    1. DX: start sapper project; configure eslint; eslint say that svelt should be dep; update package.json; build fails with crypt error; try to figure what the hell; google it; come here (if you have luck); revert package.json; add ignore error to eslint; Maybe we should offer better solution for this.
    2. When the message say function was called outside component initialization first will look at my code and last at my configuration.
    1. Most simple example: <script> import ChildComponent from './Child.svelte'; </script> <style> .class-to-add { background-color: tomato; } </style> <ChildComponent class="class-to-add" /> ...compiles to CSS without the class-to-add declaration, as svelte currently does not recognize the class name as being used. I'd expect class-to-add is bundled with all nested style declarations class-to-add is passed to ChildComponent as class-to-add svelte-HASH This looks like a bug / missing feature to me.
    2. Also Svelte is so great because developer do not need to worry about class names conflict, except of passing (global) classes to component (sic!).
    3. I wrote hundreds of Rect components and what I learned is that Componets should be able to be styled by developer who is using it.
    4. Just throwing in <div class="{$$props.class || ''} otherChildClass"></div> seems the easiest, and it'll avoid undefined classes. I feel like many aren't noticing the undefined values getting inserted in their classes.
    5. color: red; //doesn't apply this rule, because scoping doesn't extend to children
    6. Say I want to style this javascript routing anchor tag on various pages (some may be buttons, plain links, images) it makes it incredibly difficult. Eg:
    7. TBH It is a bit disheartening to see this issue closed when all proposed solutions do not sufficiently solve the issue at hand, I really like svelte but if this is how feature requests are handled I am probably not going to use it in the future.
    1. Explicitly exposing any attributes that might get overridden by a parent seems impractical to me.
    2. feel like there needs to be an easy way to style sub-components without their cooperation
    3. There's no way to change style incapsulation method without patching the compiler, and this means maintaing a fork, which is not desirable.
    4. The problem with working around the current limitations of Svelte style (:global, svelte:head, external styles or various wild card selectors) is that the API is uglier, bigger, harder to explain AND it loses one of the best features of Svelte IMO - contextual style encapsulation. I can understand that CSS classes are a bit uncontrollable, but this type of blocking will just push developers to work around it and create worse solutions.
    1. There is a good amount of properties that should mostly be applied from a parent's point of view. We're talking stuff like grid-area in grid layouts, margin and flex in flex layouts. Even properties like position and and the top/right/left/bottom following it in some cases.
    2. 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.
    3. 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.
    4. If you want this control then wrap them in a DOM node that the parent controls. If you want to pass in values then use props and if you want to pass in values from higher up the tree, the new style RFC may be able to help.
    5. new style RFC
    6. This allows passing classes to child components with svelte-{hash} through the class prop and prevents removing such classes from css.
    1. This has already forced me to forgo Svelte Material because I would like to add some actions to their components but I cannot and it does not make sense for them to cater to my specific use-case by baking random stuff into the library used by everyone.
    2. 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.
    3. For my simple tooltip example, I could create a TooltipHitbox component with a <slot/> inside a <div use:myTooltip={tooltipProp}> and then wrap MatButton instances with that component.
    4. I think Svelte's approach where it replaces component instances with the component markup is vastly superior to Angular and the other frameworks. It gives the developer more control over what the DOM structure looks like at runtime—which means better performance and fewer CSS headaches, and also allows the developer to create very powerful recursive components.
    1. Lets not extend the framework with yet another syntax
    2. Your LazyLoad image is now inextensible. What if you want to add a class? Perhaps the author of LazyLoad thought of that and sets className onto the <img>. But will the author consider everything? Perhaps if we get {...state} attributes.
    3. I totally get not wanting to extend the syntax. I tried doing these things and in practice it was not easy or pretty. Actions provide a much cleaner and easier way to accomplish a certain set of functionality that would be much more difficult without it.
    1. <LazyLoad component="img" data-src="giant-photo.jpg" class="my-cool-image" />
    2. Why not just do something like this?
    3. I'm still confused about the need for this, so at the expense of continuing to be that obnoxious kid at the playground, I'm going to stick my neck out again.
    4. Devil's advocate: I'm not convinced the functionalities you list can't already be done within the JS of the component. Example: autofocus can simply be done w/ a method or oncreate.
    5. Actions aren't necessary, otherwise they would have been implemented from the start. But they do allow for easier code-reuse and better shared libraries without exploding/complicating the ecosystem.
    6. You'll have to create a new component that brings in the functionality of both. TooltipButton, TooltipLink, Link, and TooltipRoutedLink. We're starting to get a lot of components to handle a bit of added functionality.
    7. For the tooltip example, if you had a whole bunch of tooltips on different elements, it would be annoying to have different event listeners and "should it be shown" variables for each one.
    8. I'm just pushing on the "is this really a good idea" front
    9. If this was tied into Svelte's flow with hooks this would not be necessary since it would know when it was being removed from the DOM.
    10. You must: reference each element you are extending using refs or an id add code in your oncreate and ondestroy for each element you are extending, which could become quite a lot if you have a lot of elements needing extension (anchors, form inputs, etc.)
    11. This is where hooks/behaviors are a good idea. They clean up your component code a lot. Also, it helps a ton since you don't get create/destroy events for elements that are inside {{#if}} and {{#each}}. That could become very burdensome to try and add/remove functionality with elements as they are added/removed within a component.
    12. I would be willing to take a stab at it if you think it would be a task within reach.
    13. This can and should be done with other components, IMHO.
    14. the ability to pass around element names as strings in place of components
    15. I'm a lot softer on this feature now - I'm starting to believe that every single use case that you would use a hook for, you could/should use a component for.
    1. Perhaps at that point we're better off settling on a way to pass components through as parameters? <!-- App.html --> <Outer contents={Inner}/> <!-- Outer.html --> <div> <div>Something</div> <[contents] foo='bar'/> </div>
    2. But some sort of official way to do that in the language would make this nicer - and would mean I would have to worry less about destroying components when their parent is destroyed, which I'm certainly not being vigilant about in my code.
    3. I would hope for it to come with React-like behavior where I could pass in a string (like div or a) and have it show up as a normal div/a element when the child component used it.
    1. The more I think about this, the more I think that maybe React already has the right solution to this particular issue, and we're tying ourselves in knots trying to avoid unnecessary re-rendering. Basically, this JSX... <Foo {...a} b={1} {...c} d={2}/> ...translates to this JS: React.createElement(Foo, _extends({}, a, { b: 1 }, c, { d: 2 })); If we did the same thing (i.e. bail out of the optimisation allowed by knowing the attribute names ahead of time), our lives would get a lot simpler, and the performance characteristics would be pretty similar in all but somewhat contrived scenarios, I think. (It'll still be faster than React, anyway!)
    2. Also, I'm starting to wonder if maybe it's okay to have multiple spreads? If the alternative to <Foo {...a} {...b} {...c} d={42}> is that people will write <Foo {...Object.assign({}, a, b, c)} d={42}> anyway, then do we gain anything with the constraint?
    3. I'll work on a preliminary PR (which I expect will need some love from maintainers, sorry!)
    4. The lack of spread continues to be a big pain for me, adding lots of difficult-to-maintain cruft in my components. Having to maintain a list of all possible attributes that I might ever need to pass through a component is causing me a lot of friction in my most composable components.
    5. No worries, I was just thinking that this issue should probably get necro'd back to open.
    1. The value of dotAll is a Boolean and true if the "s" flag was used; otherwise, false. The "s" flag indicates that the dot special character (".") should additionally match the following line terminator ("newline") characters in a string, which it would not match otherwise: U+000A LINE FEED (LF) ("\n") U+000D CARRIAGE RETURN (CR) ("\r") U+2028 LINE SEPARATOR U+2029 PARAGRAPH SEPARATOR This effectively means the dot will match any character on the Unicode Basic Multilingual Plane (BMP). To allow it to match astral characters, the "u" (unicode) flag should be used. Using both flags in conjunction allows the dot to match any Unicode character, without exceptions.
    1. Part of the functionality that is returned are event handlers. I'd like to avoid needing to manually copy the events over one by one so the hook implementation details are hidden.
    1. Three tests to prove a small piece of behavior. Although it might seem overkill for such a small feature, these tests are quick to write—that is, once you know how to write them