- Mar 2021
-
api.rubyonrails.org api.rubyonrails.org
-
Last configurable block to run. Called after frameworks initialize.
-
-
blog.izs.me blog.izs.me
-
Focus is better than features.
-
-
www.chevtek.io www.chevtek.io
-
Write modules that do one thing well. Write a new module rather than complicate an old one.
.
-
-
news.ycombinator.com news.ycombinator.com
-
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?
-
-
results.vote.wa.gov results.vote.wa.gov
-
results.vote.wa.gov results.vote.wa.gov
-
- Get out the city shapefile and overlay these values.
- Get the most current version of the voter registration database.
- Determine the number of voters who, according to the Spokane Journal of Business, took part in the 2018 school bond vote, but not the stadium advisory vote. (Geographically, these would be folks who live within SD81, but outside of the city limits.)
-
-
github.com github.com
-
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.
-
But yeah, I'm not sure how you would determine which was the "recommended way" really. I don't see anything in Rails docs saying either way.
-
But last I have seen comments from DHH, he considered webpack(er) recommended for JS, but Sprockets still the preferred solution for (S)CSS.
-
Is there a PR to... something? sassc-rails? That would make the patch not necessary? (I don't know if there's any good way to monkey-patch that in, I think you have to fork? So some change seems required...) Should the defaults be different somehow? This is very difficult to figure out.
-
Is there a PR to... something? sassc-rails?
Tags
- possible response/reaction to lack of maintainance / maintainer absence/silence
- is anyone even still using it anymore?
- official preferred convention / way to do something
- hard to figure out where the problem lies / how to solve the problem / where to even begin
- where (which project) do I even report this problem/bug? (whose responsibility is it?)
- switching/migrating from Sprockets to Webpack (Rails)
Annotators
URL
-
-
github.com github.com
-
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.
-
-
github.com github.com
-
we want source maps in production (like DHH)
-
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).
-
-
-
Rails still encourages you to dump all validation errors at the top of a form, which is lulzy in this age of touchy UX
-
-
css-tricks.com css-tricks.com
-
always use real <label for="correct_input"> elements. Just that alone is a UX consideration all too many forms fail on
-
-
tylergaw.com tylergaw.com
-
This is a non-exhaustive list of other things I love;
-
-
jangawolof.org jangawolof.orgPhrases2
-
Beykat yi duñu dem tool altine.
-
Noo mën a def dinga fey alamaan bi.
Quoi que tu fasses, tu paieras l'amende.
noo -- you (?)
mën v. -- power ; be stronger than 💪🏽; can, will.
a -- (?).
def v. -- do, commit, execute; to put.
dinga -- you will.
fey v. -- turn off, switch off 📴, appease; pay 💵.
alamaan bi -- (French: l'amende) fine.
bi -- the.
-
-
afarkas.github.io afarkas.github.ioWebshim1
-
Webshim is also more than a polyfill, it has become a UI component and widget library. Webshim enables a developer to also enhance HTML5 capable browsers with more highly customizable, extensible and flexible UI components and widgets.
And now that it's deprecated (presumably due to no longer needing these polyfills), not only do the polyfills go away (no longer maintained), but also these unrelated "extras" that some of us may have been depending on are now going away with no replacement ...
If those were in a separate package, then there would have been some chance of the "extras" package being updated to work without the base webshims polyfills.
In particular, I was using
$.webshims.addCustomValidityRule
which adds something that you can't do in plain HTML5 (that I can tell), so it isn't a polyfill...
-
-
www.digitalocean.com www.digitalocean.com
-
Wire this up for Brennan's website, so that I can protect the upload portal.
-
-
www.youtube.com www.youtube.com
-
-
www.lavenderandlovage.com www.lavenderandlovage.com
-
trailblazer.to trailblazer.to
-
signal.to_h[:semantic]
Why not just allow us to call
signal.semantic
? -
Hey, that’s is an imaginary complication of our example - please don’t do this with every condition you have in your app.
Tags
- extremes
- can we do even better?
- example: not how you would actually do it (does something wrong/bad/nonideal illustrating but we should overlook it because that's not the one thing the example is trying to illustrate/show us)
- artificial example
- why?
- coming up with hypothetical examples
- simplify
Annotators
URL
-
- Feb 2021
-
github.com github.com
-
URI::MailTo::EMAIL_REGEXP
First time I've seen someone create a validator by simply matching against
URI::MailTo::EMAIL_REGEXP
from std lib. More often you see people copying and pasting some really long regex that they don't understand and is probably not loose enough. It's much better, though, to simply reuse a standard one from a library — by reference, rather than copying and pasting!!
-
-
trailblazer.to trailblazer.to
-
In combination with [Track()], the :magnetic_to option allows for a neat way to spawn custom tracks outside of the conventional Railway or FastTrack schema.
Instead of
magnetic_to:
, I propose wrapping the steps that are on a separate track in something like...DefTrack do :paypal do step :charge_paypal end
or
paypal_track = RailwayTrack do :paypal do step :charge_paypal end
so we can reference it from outputs, like we can with tracks created with
Path
helper. -
For branching out a separate path in an activity, use the Path() macro. It’s a convenient, simple way to declare alternative routes
Seems like this would be a very common need: once you switch to a custom failure track, you want it to stay on that track until the end!!!
The problem is that in a Railway, everything automatically has 2 outputs. But we really only need one (which is exactly what Path gives us). And you end up fighting the defaults when there are the automatic 2 outputs, because you have to remember to explicitly/verbosely redirect all of those outputs or they may end up going somewhere you don't want them to go.
The default behavior of everything going to the next defined step is not helpful for doing that, and in fact is quite frustrating because you don't want unrelated steps to accidentally end up on one of the tasks in your custom failure track.
And you can't use
fail
for custom-track steps becase that breaksmagnetic_to
for some reason.I was finding myself very in need of something like this, and was about to write my own DSL, but then I discovered this. I still think it needs a better DSL than this, but at least they provided a way to do this. Much needed.
For this example, I might write something like this:
step :decide_type, Output(Activity::Left, :credit_card) => Track(:with_credit_card) # Create the track, which would automatically create an implicit End with the same id. Track(:with_credit_card) do step :authorize step :charge end
I guess that's not much different than theirs. Main improvement is it avoids ugly need to specify end_id/end_task.
But that wouldn't actually be enough either in this example, because you would actually want to have a failure track there and a path doesn't have one ... so it sounds like Subprocess and a new self-contained ProcessCreditCard Railway would be the best solution for this particular example... Subprocess is the ultimate in flexibility and gives us all the flexibility we need)
But what if you had a path that you needed to direct to from 2 different tasks' outputs?
Example: I came up with this, but it takes a lot of effort to keep my custom path/track hidden/"isolated" and prevent other tasks from automatically/implicitly going into those steps:
class Example::ValidationErrorTrack < Trailblazer::Activity::Railway step :validate_model, Output(:failure) => Track(:validation_error) step :save, Output(:failure) => Track(:validation_error) # Can't use fail here or the magnetic_to won't work and Track(:validation_error) won't work step :log_validation_error, magnetic_to: :validation_error, Output(:success) => End(:validation_error), Output(:failure) => End(:validation_error) end
puts Trailblazer::Developer.render o Reloading... #<Start/:default> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:success> #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Left} => #<End/:validation_error> {Trailblazer::Activity::Right} => #<End/:validation_error> #<End/:success> #<End/:validation_error> #<End/:failure>
Now attempt to do it with Path... Does the Path() have an ID we can reference? Or maybe we just keep a reference to the object and use it directly in 2 different places?
class Example::ValidationErrorTrack::VPathHelper1 < Trailblazer::Activity::Railway validation_error_path = Path(end_id: "End.validation_error", end_task: End(:validation_error)) do step :log_validation_error end step :validate_model, Output(:failure) => validation_error_path step :save, Output(:failure) => validation_error_path end
o=Example::ValidationErrorTrack::VPathHelper1; puts Trailblazer::Developer.render o Reloading... #<Start/:default> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> #<Trailblazer::Activity::TaskBuilder::Task user_proc=validate_model> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:validation_error> #<Trailblazer::Activity::TaskBuilder::Task user_proc=save> {Trailblazer::Activity::Left} => #<Trailblazer::Activity::TaskBuilder::Task user_proc=log_validation_error> {Trailblazer::Activity::Right} => #<End/:success> #<End/:success> #<End/:validation_error> #<End/:failure>
It's just too bad that:
- there's not a Railway helper in case you want multiple outputs, though we could probably create one pretty easily using Path as our template
- we can't "inline" a separate Railway acitivity (Subprocess "nests" it rather than "inlines")
-
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?
-
Patching has no implicit, magical side-effects and is strongly encouraged to customize flows for a specific case in a quick and consise way.
-
While you could nest an activity into another manually, the Subprocess macro will come in handy.
-
The macro automatically wires all of Validate’s ends to the known counter-part tracks.
Tags
- extension API: patching
- semantics
- automatic
- no magic
- tip
- powerful
- example: in order to keep example concise/focused, may not implement all best practices (illustrates one thing only)
- monkey patching
- good abstraction
- macro
- official preferred convention / way to do something
- concise
- useful
- feels wrong
- side effects
- can we do even better?
- I have a question about this
- DSL
- leverage library/tool to do something for you
- helper functions
- example: not how you would actually do it (does something wrong/bad/nonideal illustrating but we should overlook it because that's not the one thing the example is trying to illustrate/show us)
- verbose / noisy / too much boilerplate
- flexibility
- trailblazer-activity
Annotators
URL
-
-
github.com github.com
-
Sure, zero-config one-click installs are nice and all, but:
-
-
github.com github.com
-
It's recommended to configure this library by setting environment variables.
-
-
en.wikipedia.org en.wikipedia.org
-
despite initially appearing to be an appropriate and effective response to a problem, has more bad consequences than good ones
-
-
www.morozov.is www.morozov.is
-
Do notation provides an alternative to bind, which also flattens the code.
-
-
www.huffpost.com www.huffpost.com
-
They do not maintain a to-do list (mentally or physically).
-
If you ask my former students, they will tell you that as a teacher, my goal is to do nothing. I dream of the day when I can sit at my desk, feet propped up, reading a book, while the classroom bursts with activity and learning around me.
-
-
github.com github.com
-
While Trailblazer offers you abstraction layers for all aspects of Ruby On Rails, it does not missionize you. Wherever you want, you may fall back to the "Rails Way" with fat models, monolithic controllers, global helpers, etc. This is not a bad thing, but allows you to step-wise introduce Trailblazer's encapsulation in your app without having to rewrite it.
Tags
- allowing developer/user to pick and choose which pieces to use (allowing use with competing libraries; not being too opinionated; not forcing recommended way on you)
- newer/better ways of doing things
- focus on concepts/design/structure instead of specific/concrete technology/implementation
- leaving the details of implementation/integration up to you
- abstractions
- rails: the Rails way
- freedom of user to override specific decision of an authority/vendor (software)
- Trailblazer
- making changes / switching/migrating gradually/incrementally/step-wise/iteratively
- focus on what it should do, not on how it should do it (implementation details; software design)
Annotators
URL
-
-
trailblazer.to trailblazer.to
-
The new 2.1 version comes with a few necessary but reasonable changes in method signatures. As painful as that might sound to your Rails-spoiled ears, we preferred to fix design mistakes now before dragging them on forever.
Tags
- learn from your mistakes
- pointing out gaps/downsides/cons in competition/alternatives
- fix design/API mistakes as early as you can (since it will be more difficult to correct it and make a breaking change later)
- do it right/well the first time because it may be too hard to clean up/fix later if you don't
Annotators
URL
-
-
github.com github.com
-
ActiveModel provides a powerful framework for defining callbacks. ActiveInteraction hooks into that framework to allow hooking into various parts of an interaction's lifecycle.
-
account.first_name = first_name if first_name.present? account.last_name = last_name if last_name.present?
I guess this is needed so we don't reset to nil (erasing value in database) when they haven't even provided a new value as input.
But surely there's a cleaner way...
-
-
every.to every.to
-
Personal todo lists don’t depend on others using the same system (no network effects)
They don't unless you're building a wiki or commonplace book that can interact with those of others. (Roam research isn't doing this---yet, but they should.) Ideally small building block pieces will allow it to dovetail with other systems that could potentially do the same thing.
-
-
-
{a: 1, b: 2, c: 3, d: 4} => {a:, b:, **rest} # a == 1, b == 2, rest == {:c=>3, :d=>4}
equivalent in javascript:
{a, b, ...rest} = {a: 1, b: 2, c: 3, d: 4}
Not a bad replacement for that! I still find javascript's syntax a little more easily readable and natural, but given that we can't use the same syntax (probably because it would be incompatible with existing syntax rules that we can't break for compatibility reasons, unfortunately), this is a pretty good compromise/solution that they've come up with.
-
-
web.hypothes.is web.hypothes.is
-
In order to support easy reuse, revision, remixing, and redistribution, the entire Hypothesis Help knowledge base by Hypothesis is dedicated to the public domain via CC CC0 1.0. While we appreciate attribution and links back to Hypothesis from anywhere these works are published, they are not required.
-
-
github.com github.com
-
Examples of different ways of defining forms
Wow, that's a lot of different ways.
The inline_form way in particular seems interesting to me, though it's worth noting that that method is just an example, not actually part of this project's code, so it's not really a first-class option like the other options.
-
-
github.com github.com
-
The assert method is used by all the other assertions. It pushes the second parameter to the list of errors if the first parameter evaluates to false or nil.
Seems like these helper functions could be just as easily used in ActiveRecord models. Therefore, they should be in a separate gem, or at least module, that can be used in both these objects and ActiveRecord objects.
-
-
softwareengineering.stackexchange.com softwareengineering.stackexchange.com
-
The more important point comes from a program design perspective. Here, "programming to an interface" means focusing your design on what the code is doing, not how it does it. This is a vital distinction that pushes your design towards correctness and flexibility.
-
-
-
It makes me happy to see people actually think about things and not just accept a shitty API.
Tags
- describe the ideal hypothetical solution
- doing something without knowing why/how it works
- actually consider / think about how it _should_ (ideally) be
- "makes me happy when ..."
- can we do even better?
- intentional/well-considered decisions
- less than ideal / not optimal
- don't settle for/accept something that's not as good as it can be
Annotators
URL
-
-
-
I'd like to know specifically what you were aiming to achieve with this Gem as opposed to simply using https://github.com/apotonick/reform? I am happy to help contribute, but equally if there is a gem out there that already does the job well, I'd like to know why we shouldn't just use that.
-
DSLs can be problematic for the user since the user has to manage state (e.g. am I supposed to call valid? first or update_attributes?). This is exactly why the #validate is the only method to change state in Reform.
-
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.
Tags
- have to remember
- making it easy to do the right thing
- simplicity by design
- good point
- reform (Ruby)
- annotation meta: may need new tag
- do we really need another _?
- DSL
- order is important / do things in the right order
- making it easy to do the wrong thing
- reuse/leverage existing _ when possible
- state management
Annotators
URL
-
-
-
Writing the uniqueness validations yourself is easy so I felt it was better to leave this up to the developer
-
-
www.dell.com www.dell.com
-
This is what seems to be happening to me as well! It's maddening.
-
-
harriman-house.com harriman-house.com
-
p. 217:
We also keep a higher percentage of our assets in cash than most financial advisors would recommend --- something around 20% of the value of our assets outside the value of our house.
Compare this to my current allotment.
Tags
Annotators
URL
-
-
www.metacritic.com www.metacritic.com
-
Yes, you do face difficult choices (moral) but you don't care about it. All you care are the reputation bars. So... Let's kill this guy, who cares if he is innocent, but this faction needs it or I'm dead. Sounds great on paper but to be honest... you just sit there and do whatever for these reputation bars. If you won't, then you lose
-
-
hilton.org.uk hilton.org.uk
-
We could of course refactor our code to rename things any time we like, but we don’t do this enough in practice
-
-
www.youtube.com www.youtube.com
-
considering PopOS is trying to tackle Ubuntu they really need their dual-boot setup to be a lot less tedious
-
if PopOS! really wants to be what Ubuntu was 10 years ago they need to step up and make dual booting easier.
-
-
stackoverflow.com stackoverflow.com
-
that's a point, but I would say the opposite, when entering credit card data I would rathre prefer to be entirely in the Verified By Visa (Paypal) webpage (with the url easily visible in the address bar) rather that entring my credit card data in an iframe of someone's website.
-
- Jan 2021
-
www.zdnet.com www.zdnet.com
-
Systemd flies in the face of the Unix philosophy: 'do one thing and do it well,' representing a complex collection of dozens of tightly coupled binaries
-
-
stackoverflow.com stackoverflow.com
-
systemd has such huge documentation. systemd.unit Did you try searching for explanation yourself? What did you find?
-
-
blog.linuxmint.com blog.linuxmint.com
-
http://letmegooglethat.com/?q=How+to+change+the+default+search+engine+in+chromium&l=1
-
-
github.com github.com
-
I want to write my own scripts first, but may end up graduating to this.
-
-
css-tricks.com css-tricks.com
-
overflow-wrap: break-word; makes sure the long string will wrap and not bust out of the container. You might as well use word-wrap as well because as the spec says, they are literally just alternate names for each other. Some browsers support one and not the other.
-
-
askubuntu.com askubuntu.com
-
I'm very (VERY!) tempted to use that ppa, but without offense to it's maintainers... it's just some random ppa. If it had more "traction" I'd use it. Right now it has only 3 maintainers.
-
-
forums.theregister.com forums.theregister.com
-
Flatpak as a truly cross-distro application solution that works equally well and non-problematic for all
-
-
www.americanpressinstitute.org www.americanpressinstitute.org
-
The purpose of news is to inform, educate, and give us understanding and knowledge of what is going on in the world. It helps us to keep up to date with issues so we are in the know and fully aware of events taking place.
-
-
-
Moving DOM elements around made me anxious and I wanted to preserve natural tab order without resorting to setting tabindex, so I also made a flexbox version that never moves DOM elements around. I think it's the superior solution, at least for the layouts I was going for. https://github.com/wickning1/svelte-components/blob/master/src/FlexCardLayout.svelte
-
-
marketplace.visualstudio.com marketplace.visualstudio.com
-
-
github.com github.com
-
github.com github.com
-
www.donielsmith.com www.donielsmith.com
-
Depending on what other component libraries you’ve used, you may be used to handling events by passing callback functions to component properties, or using a special event syntax – Svelte supports both, though one is usually more appropriate than the other depending on your situation. This post explains both ways.
-
-
github.com github.com
-
You should default to the most permissive option imo and there really is no reason to check anything until you really need to If it were left to me I'd just use optional chaining, as it also eliminates the need for no-ops
(lazy checking)
-
-
en.wikipedia.org en.wikipedia.org
-
In other words, programs that send messages to other machines (or to other programs on the same machine) should conform completely to the specifications, but programs that receive messages should accept non-conformant input as long as the meaning is clear.
-
be conservative in what you do, be liberal in what you accept from others
-
-
atomiks.github.io atomiks.github.io
-
"Headless Tippy" refers to Tippy without any of the default element rendering or CSS. This allows you to create your own element from scratch and use Tippy for its logic only.
-
It's a generic abstraction for the logic and styling of elements that pop out from the flow of the document and float next to a reference element, overlaid on top of the UI.
-
-
github.com github.com
-
A cleaner approach could be the use:action API.
-
-
popper.js.org popper.js.orgTippy.js1
-
Popper has a sole goal: position elements. That's why we call it a "positioning engine" and not a "tooltip library".
-
-
github.com github.com
-
Popper for Svelte with actions, no wrapper components or component bindings required! Other Popper libraries for Svelte (including the official @popperjs/svelte library) use a wrapper component that takes the required DOM elements as props. Not only does this require multiple bind:this, you also have to pollute your script tag with multiple DOM references. We can do better with Svelte actions!
-
-
discourse.ubuntu.com discourse.ubuntu.com
-
Progress is made of compromises, this implies that we have to consider not only disadvantages, but also the advantages. Advantages do very clearly outweigh disadvantages. This doesn’t mean it perfect, or that work shouldn’t continue to minimize and reduce the disadvantages, but just considering disadvantages is not the correct way.
-
-
askubuntu.com askubuntu.com
-
How do you know this? I've looked all over the internet and can't find any proof that Lightdm is more "lightweight" (whatever this means) or faster.
-
-
docs.docker.com docs.docker.com
-
I'd like to spin up a couple of these, both for my personal box (
localhost
-only) and for the development network.
-
-
outline.com outline.com
-
O tucano Orlando Morando, de São Bernardo do Campo, diz que não há a menor chance de fazê-lo em um futuro próximo e que tem doado parte de seu salário correspondente a um aumento concedido na gestão anterior com o qual não concordou.
Doou para quem???
-
- Dec 2020
-
material-ui.com material-ui.com
-
Heading hierarchy. Don't skip heading levels. In order to solve this problem, you need to separate the semantics from the style.
-
-
github.com github.com
-
Dropped FFmpeg support (focus on primary functions instead)
Tags
Annotators
URL
-
-
-
Add this to my toolchain (in particular, configure Lighthouse to run in our CI/CD pipeline).
Tags
Annotators
URL
-
-
docs.microsoft.com docs.microsoft.com
-
I really want to wire this up to our heavy-duty internal apps, like CI, Disputes, and NoteRequest.
-
-
docs.microsoft.com docs.microsoft.com
-
you can set up notifications to alert you to new recommendations
-
-
github.com github.com
-
Jbuilder gives you a simple DSL for declaring JSON structures that beats manipulating giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops.
-
-
developer.mozilla.org developer.mozilla.org
-
The Web Storage API provides mechanisms by which browsers can store key/value pairs, in a much more intuitive fashion than using cookies.
-
-
github.com github.com
-
I guess it's about "preloading" and not "navigation", if it's the case, then I guess there is still no way to attach to navigation events, and this issue should be kept open.
-
No JS event is fired, so there currently isn't any clean way to do this that I can see.
-
-
github.com github.com
-
I tried leaking session and page data and indeed it's easy. Too easy. So I definitely agree that session data should not be readable from anywhere but the request itself.
-
-
github.com github.com
-
Like JSON.stringify, but handles
-
-
github.com github.com
-
it focuses on compiling non-standard language extensions: JSX, TypeScript, and Flow. Because of this smaller scope, Sucrase can get away with an architecture that is much more performant but less extensible
-
-
elearning.uab.pt elearning.uab.ptuntitled1
-
Phantom emotionsPsychological determinants of emotional experiences on the InternetAzy Barak
-
-
github.com github.com
Tags
Annotators
URL
-
-
github.com github.com
Tags
Annotators
URL
-
-
www.npmjs.com www.npmjs.com
-
You can afford to make a proper PR to upstream.
-
No more waiting around for pull requests to be merged and published. No more forking repos just to fix that one tiny thing preventing your app from working.
This could be both good and bad.
potential downside: If people only fix things locally, then they may be less inclined/likely to actually/also submit a merge request, and therefore it may be less likely that this actually (ever) gets fixed upstream. Which is kind of ironic, considering the stated goal "No more waiting around for pull requests to be merged and published." But if this obviates the need to create a pull request (does it), then this could backfire / work against that goal.
Requiring someone to fork a repo and push up a fix commit -- although a little extra work compared to just fixing locally -- is actually a good thing overall, for the community/ecosystem.
Ah, good, I see they touched on some of these points in the sections:
- Benefits of patching over forking
- When to fork instead
Tags
- maintaining a fork while waiting for upstream to merge
- pull request stalled
- limited time: not right now (maybe later)
- pull request
- proper
- irony
- taking the time to do it right/properly
- forking to add a desired missing feature/change
- making it easy to do the wrong thing
- forking (patching vs. forking)
- doing it right/properly
- when to _
Annotators
URL
-
-
github.com github.com
-
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?
-
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?
-
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.
-
-
developer.mozilla.org developer.mozilla.org
-
If you'd prefer, you can use a third-party library like Modernizr or Detect It to do this test for you.
-
-
github.com github.com
-
I think the main difference between the two are the way API are served. Some smelte components need you to input big chunk of json as props, while i prefer keep props as primitive types and in the other hand give you different components tags to compose.
-
-
implicit.harvard.edu implicit.harvard.edu
-
I'd really like to take this.
Tags
Annotators
URL
-
-
github.com github.com
-
These are sequential because build:ssr imports the public/index.html that build:dom produces.
-
-
yalebooks.yale.edu yalebooks.yale.edu
-
p. 198:
Given any five points on a sphere, show that some four of them lie on a hemisphere that includes its boundary.
I'll admit, I already looked at the hint for this problem, and yes, my initial approach did indeed consist of trying to find the 'worst' configuration.
I can think of two ways to determine whether or not two points on a sphere lie within the same hemisphere:
- First off, since any two points on a sphere may be connected by a great circle, they're in the same hemisphere if they're separated by no more than \(\frac{\tau}{2}\) radians along this shortest path.
- Equivalently, the length of the line segment connecting them must be less than or equal to \(2r\), where \(r\) is the radius of the sphere.
One other note:
- It's always possible to divide the sphere in half in such a way that any two points lie within the same hemisphere. (This is a corollary of the first point, above. Note that two antipodal points must necessarily fall on the boundary of such a division.)
So, I have a picture in my mind of the sphere divided into eight regions of equal area by way of three great circles which intersect one another at right angles. (Think the Equator, the Prime Meridian, and a third great circle drawn through the poles at 90 degrees longitude.) My thinking now tends more toward combinatorics and the pigeonhole principle than geometry proper.
-
-
register.gotowebinar.com register.gotowebinar.com
-
www.joshwcomeau.com www.joshwcomeau.com
-
- Nov 2020
-
acorwin.com acorwin.com
-
The answer should be: you write a language that compiles to Go’s IR.
-
-
stackoverflow.com stackoverflow.com
-
delete myObject.regex; // or, delete myObject['regex']; // or, var prop = "regex"; delete myObject[prop];
-
-
github.com github.com
-
dfn export for=tree
-
-
github.com github.com
-
After i've stabilized the library i can start to discuss about adding new components and features!
-
-
www.686.com www.686.com
Tags
Annotators
URL
-
-
timdeschryver.dev timdeschryver.dev
-
Svelte makes the pit of success larger because it hides all of this from us at compile time.
-
-
github.com github.com
-
-
Another difference is that context in Svelte does not insert anything into the visual component tree. There is no <Context.Provider> element like in React
Tags
- examples
- +0.9
- Svelte
- React
- component tree
- better/superior solution/way to do something
- react hooks
- port from another language
- react: context
- equivalent/analogous/alternative ways to do something between 2 libraries/languages/etc.
- port (adaptation/translation)
- comparison
- Svelte: context
Annotators
URL
-
-
nbdev.fast.ai nbdev.fast.ai
-
I'd love to take this for a spin. Maybe I could rewrite Demeter or
micdrop
using it.
-
-
-
So handling the interop upfront will avoid users writing invalid ES6 and make sure that they write ES6 that loads CommonJS in the right way.
-
-
www.youtube.com www.youtube.com
-
If everyone did this, the repair shops would be out of business.
-
-
www.styled-components.com www.styled-components.com
-
github.com github.com
-
-
github.com github.com
-
This nested if blocks seems a bit untidy and confusing to me but I've also failed to come up with a clearer way.
Tags
Annotators
URL
-
-
button.dev button.dev
-
i like working on application frameworks, compilers, interpreters, and emulators.
-
-
jimmy.schementi.com jimmy.schementi.com
-
but know I know what I don't want to do. I definitely know I want to be an Engineer now, and it makes it more clear that I should start my own business.
-
-
-
I encounter this problem in all of my Svelte projects- feels like I'm missing something. Fighting it with absolute positioning usually forces me to re-write a lot of CSS multiple times. Is there is a better way to solve this that I've overlooked?
-
-
imfeld.dev imfeld.dev
-
Converting Angular components into Svelte is largely a mechanical process. For the most part, each Angular template feature has a direct corollary in Svelte. Some things are simpler and some are more complex but overall it's pretty easy to do.
-
-
docs.microsoft.com docs.microsoft.com
-
webpack.js.org webpack.js.orgConcepts1
-
We expect a certain pattern when validate devtool name, pay attention and dont mix up the sequence of devtool string. The pattern is: [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map.
-
-
github.com github.com
-
I've only done components that need to/can be Svelte-ified. For some things, like RTL and layout grid, you can just use the MDC packages.
-
-
stackoverflow.com stackoverflow.com
-
can you not also use a .babelrc?
-
-
github.com github.com
Tags
Annotators
URL
-
-
github.com github.com
-
This is very annoying and I think there must be a better solution.
-
-
github.com github.com
-
Obviously we shouldn't rush into anything. But changes like these are best made earlier on in a project's lifecycle, so I'm eager to hear what people think so that we can start making some progress.
-
-
-
Some of the verbs implemented by systemctl are designed to provide a high-level overview in a human readable format. All that information is available over dbus, and/or journalctl, systemctl show. We could provide that information in json format, but there's a second problem. Information and format of information printed by e.g. systemctl status is not stable. Since the output is not suitable for programmatic consumption anyway, there's no need to provide it in a machine readable format.
-
In principle, this information is already available through other means, but it is actually a fair amount of work to gather it in this form, and I think it could be useful to open it up to programmatic consumption.
-
Although I agree that -o json should return proper JSON, believe the proper way for external tools like SaltStack etc. to talk to systemd is DBus. See also saltstack/salt#20392 - everything else is more or less just hack-ish and prone to break easily.
-
- Oct 2020
-
docs.microsoft.com docs.microsoft.com
-
I'll want to generate, upload, and store a certificate for publishing NuGet packages.
-
-
www.typelit.io www.typelit.io
-
-
stackoverflow.com stackoverflow.com
-
If you have a better/simpler/"more official" solution, I'd still love to see it!
The "official" solution is to use submitErrors (see Erik's answer).
-
is this solution considered a hack or is something that we can use as an approved workaround in scenarios where we need to manually trigger validations?
-
The more official way to do this would be to run the check (you could even reuse this.validate) in onSubmit.
-
-
www.basefactor.com www.basefactor.com
-
Focus on your application: forget about forms details like I'm dirty, field touched...
-
You may want to execute validations in a given specific order (this can be tricky especially when you have got asynchronous validations).
-
You can try to build a solution to tackle these issues on your own, but it will cost you time and money... why not use a battle-tested solution to handle all this complexity?
-
If you want to implement a form with a superb User Experience, you have to take care of many variables:
-
Form validation can get complex (synchronous validations, asynchronous validations, record validations, field validations, internationalization, schemas definitions...). To cope with these challenges we will leverage this into Fonk and Fonk Final Form adaptor for a React Final Form seamless integration.
-
Managing Form State (holding field information, check if a control has been touched, if the user has clicked the submit button, who owns the current focus...) can be tedious and prone to errors. We can get help from React Final Form to handle these challenges for us.
Tags
- form design
- form validation library
- integration
- form validation
- order is important / do things in the right order
- adapter
- don't write your own
- difficult/hard problem
- easy to get wrong
- complexity
- reinventing the wheel / not invented here
- tedious
- can't keep entire system in your mind at once (software development) (scope too large)
- fonk (form validation library)
- user experience
- a lot of things to consider
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- react-final-form
Annotators
URL
-
-
svelte.dev svelte.dev
-
-
english.stackexchange.com english.stackexchange.com
-
In the software industry we use "dependency" to refer to the relationship between two objects. We say "looking for dependents" for relationships to dependent things and "looking for dependencies" for relationships to prerequisite things, so it gets that connotation, but the literal meaning is the relationship itself, not the object. Finding a better word is exactly the point of the question
-
-
-
But it sounds like the library could use some way to setTouched()
-
-
graphql-dotnet.github.io graphql-dotnet.github.io
-
I highly recommend setting a higher bound on the number of returned entities by each resolve function in your code.
-
-
github.com github.com
-
-
-
Yeah I see what you're saying. In my case, I had a group of classes that relied on each other but they were all part of one conceptual "module" so I made a new file that imports and exposes all of them. In that new file I put the imports in the right order and made sure no code accesses the classes except through the new interface.
-
-
github.com github.com
-
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
-
Specifically, since Root, Rule and AtRule all extend Container, it's essential that Container is evaluated (and therefore, in the context of a Rollup bundle, included) first. In order to do this, input.js (which is the 'gateway' to all the PostCSS stuff) must import root.js, root.js must import rule.js before it imports container.js, and rule.js must import at-rule.js before it imports container.js. Having those imports ensures that container.js doesn't then try to place Root, Rule or AtRule ahead of itself in the bundle.
-
Replaced nested `require` statements with `import` declarations for the sake of a leaner bundle. This entails adding empty imports to three files to guarantee correct ordering – see https://github.com/styled-components/styled-components/pull/100
-
-
medium.com medium.com
-
Modules from the following layer can require anything from all the previous layers, but not vice versa.
-
-
-
Any software that makes HTTP requests to other sites should make it straightforward to enable the use of a cache.
-
-
m5qwxpr6o8.csb.app m5qwxpr6o8.csb.app
-
Note that the <WarningEngine/> component must be at the bottom of the form to guarantee that all the fields have registered.
-
-
final-form.org final-form.org
-
Wondering how to get field state from multiple fields at once? People coming from Redux-Form might be wondering where the equivalent of Redux Form's Fields component is, as a way to get state from several fields at once. The answer is that it's not included in the library because it's so easy to write one recursively composing Field components together.
-
-
github.com github.com
-
Use ponyfill.com for linking here.
Tags
Annotators
URL
-
-
formvalidation.io formvalidation.io
-
formvalidation: path.resolve
Why use resolve.alias to point to 'vendors/formvalidation/dist/es6'? Why not just use an npm package and have package.json name module: 'vendors/formvalidation/dist/es6'
Then (I think) the examples below like
import luhn from 'formvalidation/algorithms/luhn';
would work the same but without that workaround.
-
-
humanwhocodes.com humanwhocodes.com
-
Once again, this isn’t good or bad, it’s just the most efficient way to create something that is similar to something else
-
-
-
I'm okay with an overall design that allows people to plugin the parts they need in order to be able to generically support a compile-to-javascript language, but to bake in support for one singular solution because its popular is simply bad engineering.
-
Of all the compile-to-languages, the one that strikes me as having the least merit is JSX. It's basically a ton of added complexity for the sake of what boils down to syntax. There are no real gains in terms of language semantics in JSX.
-
Furthermore, JSX encourages bad non-dry code. Having seen a lot of JSX over the past few months, its encourages copypasta coding.
Tags
- can't support everything / all cases
- is it worth the effort?
- copy and paste programming
- not enough advantages/merits/pros to make it worthwhile
- can't do everything
- adding special cases only for certain popular things but not others
- bad engineering
- not merited
- encourages the wrong thing
- duplication
- advantages/merits/pros
- do pros outweigh/cover cons?
- making it easy to do the wrong thing
- plugins
- have a good reason
- making it easy to do the right thing
- hard to make it work in _all_ cases
- making it too easy to do the wrong thing
- special cases
- favoring/catering to the needs of … over …
- minimal benefits
- JSX
- extensibility
- copy and paste
Annotators
URL
-
-
github.com github.com
-
For event listeners we support the standard jsx naming convention onEventname (this is converted to on:eventname in svelte) as well.
-
-
developer.mozilla.org developer.mozilla.org
-
An onevent event handler property serves as a placeholder of sorts, to which a single event handler can be assigned. In order to allow multiple handlers to be installed for the same event on a given object, you can call its addEventListener() method, which manages a list of handlers for the given event on the object.
-
-
tech.ebayinc.com tech.ebayinc.com
-
However, in practice I do not think these tradeoffs are enough to justify logic-less templates.
-
-
-
Cons aren't covered by pros.
-
An alternative (maybe not good) would be to restrict {@const} to certain blocks like {#each} and {#if}. In both cases, it significantly reduces the "multiple ways to do the same thing" problem and avoids ergonomic and performance overhead of our current situation.
-
it also allows for more divergence in how people write there code and where they put their logic, making different svelte codebases potentially even more different due to fewer constraints. This last point is actually something I really value, I read a lot of Svelte code by a lot of different people and broadly speaking things look the same and are in the same places.
Tags
- uniformity
- strong conventions resulting in code from different code bases/developers looking very similar
- programming: multiple ways to do the same thing
- idiomatic code style (programming languages)
- do pros outweigh/cover cons?
- convention
- consistency
- software development: code organization: where does this code belong?
- idiomatic pattern (in library/framework)
Annotators
URL
-
-
svelte.dev svelte.dev
-
This is the Svelte version of this example: https://codesandbox.io/s/reactivity-react-responds-to-changing-props-forked-d2j44?file=/src/Label.js
-
-
nginx.org nginx.org
-
Hannah Stepanek annotated the hell out of this reference. I would do well to read what she had to say.
Tags
Annotators
URL
-
-
github.com github.com
-
They even named the main file
react.js
so when converting/migrating components from React you could (at least some of the time, perhaps) simply leave some of the imports as-is:import {createHooks, useRef} from './react';
-
-
dylanvann.com dylanvann.com
-
Svelte should make something like useEffect part of the framework so that this could work better and be less verbose.
-
I do like the direction Svelte is heading but I think this is one area that could be improved.
-
-
github.com github.com
-
I'm suggesting there should be a way to write lifecycle related code that also responds to changing props, like how useEffect works. I think how React handles this could be a good source of inspiration.
-
I think it just needs a few changes, possibly non-breaking additions, to be as powerful as hooks, when it comes to abstracting lifecycle related logic, and making it easy to keep effects in sync with props.
-
I'm not sure I understand the problem, everything you are describing is already possible.
-
If Svelte came up with some kind of hooks like API maybe it could solve both these issues at once.
Tags
- excellent writing
- investing time to really understand something
- copying/doing the same as how another project/library did it
- Dylan Vann
- can we do even better?
- issues: discuss more before closing
- issues: not taking the time to really understand the issue before closing
- inspiration
- learning by studying/emulating/copying others who do it well
- learning from others
- too quick to dismiss
- use as inspiration
- feature proposal
- copying ideas from another project
Annotators
URL
-
-
github.com github.com
-
It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
-
-
recoiljs.org recoiljs.org
-
For reasons of compatibility and simplicity, it's best to use React's built-in state management capabilities rather than external global state.
-
-
dylanvann.com dylanvann.com
-
I’d still be interested in Svelte making things easier so I’ve opened a feature request for Reactive statement cleanup functions.
-