77 karma · joined May 4, 2011
But then I stopped abruptly when realized Helix misses a key feature of Vim: swap files. I can just start editing and have not have to worry about losing my work, may whichever of computer panic, computer running off charge, environment (desktop env or tmux) crash, etc. occur.
So edit semantics is cool, but fundamentals like recovery should be got right before being a serious contender.
(I did a quick search to see if there is any news on this front, but what I found is all about "recovery hooks for panic", which is far more less than what's needed - it's about an emergency saving of the work if something goes awry with the editor. I need to be protected from loss if something goes awry with the environment too...)
(OK, OPML is not utterly human friendly as such; actually when I needed to access it locally, I parsed it and used it in an interactive programming environment.)
This was a nice hybrid workflow.
DateTimeFns.add_minutes(DateTimeFns.add_hours(DateTime.current, 1), 1)
Sure thing, but the syntax can be improved without restorting to refactor into instance methods: DateTime.current.then {
DateTimeFns.add_hours(_1, 1)
}.then {
DateTimeFns.add_minutes(_1, 1)
}Red Hat bases its model on dwelling in the grey zone.
So if Rocky aspires to be a Red Hat clone... they can adopt this bit, too :)
Update: Ah, sorry, "iOS", "Firefox", I missed that. I leave it here still, to honor the pain it took me to dig it up.
Then in the last few months... I noticed I do not notice these anymore. Using Firefox is pleasant and decent both on desktop and mobile now. They got their shit together, or my browsing habits have changed? Dunno... needs more time to decide.
Anyways, the deal maker for me is that still Firefox is the only browser that allows to export data from it in a tolerable manner. Sync data is accessible via the "About Sync" extension, and the ability to share multiple tabs on Android is golden. (As of Brave: Brave sync is great, but a third-party client or extension to explore its data does not yet exist [at least, it's hard to search for it, because "Brave sync extension" will bring up ways to sync your extensions in Brave, not extensions that interact with Brave sync].)
Condiser the following task: take /proc/kallsyms in Linux, that lists symbols in kernel, in an '<address> <type> <name>' format, like:
0000000000000000 A fixed_percpu_data
0000000000000000 A __per_cpu_start
0000000000001000 A cpu_debug_store
0000000000002000 A irq_stack_backing_store
0000000000006000 A cpu_tss_rw
000000000000b000 A gdt_page
...
let's make stats on it -- how much of each type is present? Wanna get the result ordered by number of occurrence.In Ruby:
# ruby -rset -e '$<.readlines.to_set.classify { |l| l.split[1] }.transform_values(&:size).sort_by { |_,v| v }.to_h.tap { pp _1 }' /proc/kallsyms
{"V"=>1,
"w"=>2,
"a"=>14,
"R"=>98,
"W"=>154,
"A"=>328,
"B"=>655,
"D"=>2910,
"b"=>3097,
"T"=>22289,
"d"=>34424,
"r"=>49904,
"t"=>55346}
Of this method call chain, first and last are impure (as they do I/O), the intermediate ones are pure.In Python you'll have to grind through it procedurally. (Unless you use reach out to some advanced libs... https://gist.github.com/richardbann/5b363096de6b3de2e8178cce...)
Indeed, can you write a program for CLISP that works like this:
- takes one command line argument (a file name)
- reads in the given file, interprets it as Common Lisp code, expecting it to deliver a definition for the add2 macro
- then runs
(let ((a 1)) (dotimes (i 4) (add2 a))) Segmentation violation (core dumped)
when this thing fires?Actually "violation" sounds much clearer to me. It's telling me that the code I'm running does something that was not part of the contract. With "fault"... well, it's someone's fault... probably someone else's fault... who knows what happened... ¯\_(ツ)_/¯
I wouldn't be surprised if it was found out to sound smoother to managerial ears.
Deno directly use standard URIs to import packages. Go imports syntactically appear as schemeless paths, which boils down to the semantics of importing URIs from an implicit private go:// scheme.
And that catches two fishes at once:
1) the go:// namespace is isomorphic to the https:// namespace, so the default resolution strategy is just to pipe through this isomorphism. This is convenient, makes sense right away and avoids the a priori need of a central registry.
2) Whenever it's needed, the resolution can be instructed to do some custom thing instead of casting to https://.
The exemplar instance of 2) is the usage of sibling packages. They wanted to make it possible to have several packages within a single module, whereby the module serves as a compilation unit. So when an import path is a subpath of the module path, then the package is looked up locally, relative from the root of the current module. There is no way you could get away with such a bending of a https:// URI. But go:// being a private scheme gives the freedom to proceed so.
(The go:// scheme is just my own literary device, but this semantics is explained clearly in simple terms at https://golang.org/doc/code.html.)
Thus http://deno.land/x/ is the de facto central registry. I'm yet to see how it makes a difference whether the logic of resolving a package name to a concrete version of the package is baked into command line tooling or a web service.
Indeed.
> What would that decision algorithm be for this particular function (odd_perfect_number)?
Either of
() => True
or () => False
where '()' represents the empty input.> And what is its answer?
I'd be a Fields medal candidate if I knew ;)
An instance of the halting problem asks, given (a partial recursive) function F, whether there is an decision algorithm A (aka. Boolean valued algorithm) on the universe of inputs U of F that calculates the domain of F (those inputs where F takes a value, ie. halts; ie, A(x) <=> F halts on x, where x in U).
For any finite subset S = {s_1, ..., s_n} of U, there is a trivial decision algorithm on U that calculates S:
def A_S(x):
for s in (s_1, ..., s_n):
if x == s:
return True
return False
Therefore if the domain D of F is finite, the answer to the halting problem of F is trivially yes: A_D is a decision algorithm for F. (This has noting to do with the question whether we know D or not!)If U is finite, then D is finite, so the answer to the halting problem of F is trivially yes.
If F is a thunk (nullary function), then U is finite, ie. the singleton set of "no input", so the answer to the halting problem of F is trivially yes.
odd_perfect_number is a thunk.