This gist
is designed to explain how to configure a project where you have your test code separated from your codebase. The project file structure looks a bit like this:
project
├─┬ lib # could be src
│ ├── globals.d.ts # source code specific type declarations
│ └── index.ts
├─┬ tests
Apparently my account is somehow shadow-banned on reddit (no one's fault, never really used it).
The thread this reply was posted to is: https://www.reddit.com/r/typescript/comments/o2sn3p/which_is_the_best_functional_programming_library/h40l3iu/?utm_source=share&utm_medium=web2x&context=3
Disclaimer: I am the author of effect-ts.
Effect-ts has been developed from the experience of having both used fp-ts in production and having extended fp-ts to support patterns inspired by zio in Scala.
this is a rough draft and may be updated with more examples
GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?
Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to
#!/bin/bash | |
## Change following to '0' for output to be like ls and '1' for eza features | |
# Don't list implied . and .. by default with -a | |
dot=0 | |
# Show human readable file sizes by default | |
hru=1 | |
# Show file sizes in decimal (1KB=1000 bytes) as opposed to binary units (1KiB=1024 bytes) | |
meb=0 | |
# Don't show group column |
As far as I can tell, you can't do it conveniently. That is, git-rebase
does not give you an option to preserve the committer date. Unless you give the --ignore-date
(or its alias, --reset-author-date
) option, it will always preserve the author date. However, there is no way to make git-rebase
preserve the committer date, unless some manual script is crafted.
The best you can do is to make the committer date equal to the author date. Recently (in 2020 Q4), git-rebase --interactive
has gained the ability to use the --committer-date-is-author-date
flag with the interactive rebase. Before that, there was no way of influencing the committer date at all with the interactive rebase. Note that this flag does not preserve the committer date. It merely makes the committer date equal to the author date.
You might be thinking "well, isn't that effectively preserving the committer date, since normally the committer date is always equal to the author date?". Normally, you would be correct. However, there
We've been deadlocked for a while on the pipeline operator proposal, for a few reasons. Partially it's just low implementor interest, as this is fundamentally just syntactic sugar, but also because there are three competing proposals and the proponents of each haven't been convinced by the others yet.
In this essay I hope to briefly outline the problem space, summarize the three proposals, and talk about what's gained/lost by each of them. (Spoiler: they're all nearly identical; we're arguing over very small potatoes.)
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
- Programming using a series of transformations and aggregations, something I've been doing for years, is known as programming in the map/reduce style.
- The more abstract the type is, the greater its cardinality, and the smaller the set of operations it supports. So make use of universal quantifiers, particularly by implementing fully parametric functions. They guide you on how to implement their term-level definitions by narrowing down the number of possible implementations. In other words, the type system of Scala (or Haskell, for that matter) is not only great for capturing compile-time errors, but is also capable of leading you to the correct solution.
- You can encode union types by combining different Scala features such as type constructors, subtyping and implicits, and by taking advantage of the Curry-Howard Isomorphism and De Morgan's Laws for neg