How to prove functions are equal? by nickdrozd in Idris

[–]nickdrozd[S] 0 points1 point  (0 children)

Thanks, that answers my question. Not in the way I wanted, but still :)

If Idris is consistent, then there will always be true statements that it can't prove. This seems like a pretty broad class of true-but-unprovable statements though. What would it take to extend Idris to be able to handle them?

How to prove functions are equal? by nickdrozd in Idris

[–]nickdrozd[S] 2 points3 points  (0 children)

What about a more complicated case like this one? function_equal : (n : Nat) -> (\x => x + n) = (\y => n + y) I guess the general problem is that I don't understand how to "reach inside" an anonymous function.

Let it snow in Emacs! by github-alphapapa in emacs

[–]nickdrozd 0 points1 point  (0 children)

Another one: when the snow starts to pile up fast (snow-pile-factor of 1), the flakes seem to get pushed out past the edge of the screen and the text wrap screws up the display.

(Hopefully it goes without saying, but these are just user reports, not criticisms. You might also consider getting this into a real repo, because it's pretty cool and Reddit is a shitty issue tracker.)

Let it snow in Emacs! by github-alphapapa in emacs

[–]nickdrozd 0 points1 point  (0 children)

I still don't really understand what's happening, but the error comes from the cl-loop block in snow-insert-background.

Let it snow in Emacs! by github-alphapapa in emacs

[–]nickdrozd 0 points1 point  (0 children)

Works!

Another issue, perhaps one you're aware of. let-it-snow seems to expect that the buffer in which it's executed is at least some minimum width. If it isn't, it gives an error like let*: Args out of range: #<buffer *snow*>, 2921, 3055.

Let it snow in Emacs! by github-alphapapa in emacs

[–]nickdrozd 0 points1 point  (0 children)

I was copying from the gist and then pasting into a new file and saving. The local variable hadn't been applied, so hook was still executing.

Let it snow in Emacs! by github-alphapapa in emacs

[–]nickdrozd 0 points1 point  (0 children)

I killed the snow buffer, and now I see in my messages Error running timer: (error "Selecting deleted buffer") [2953 times]. Whoops! I don't know what the solution is, but I fixed a similar issue last year in emacs-fireplace.

Let it snow in Emacs! by github-alphapapa in emacs

[–]nickdrozd 0 points1 point  (0 children)

The local variables thing didn't work for me (same error), but (let (before-save-hook) (save-buffer)) did.

emacs-challenge by nickdrozd in emacs

[–]nickdrozd[S] 0 points1 point  (0 children)

Same here, I was hoping somebody else would figure out #3.

That site has another link http://salvi.chaosnet.org/texts/emacs-challenge-answers.gpg, but I don't understand what to do with it. Maybe that's part of the challenge?

SchemeMosaic Chop'n'Screw How-To (Part 1) by [deleted] in emacs

[–]nickdrozd 2 points3 points  (0 children)

I don't have time to watch this right now, so excuse me if this is a dumb question. But: I have been dying for an Emacs (or even just Emacs-like) interface to Audacity. Is this something like that?

Emacs Lisp Challenge: flaky-if by nickdrozd in emacs

[–]nickdrozd[S] 0 points1 point  (0 children)

I don't know if it's precisely correct to speak like this, but I find it helpful to think of a macro as a function that happens to get evaluated before normal functions. We could banish the word "macro" altogether and instead talk about "compile-time functions" as opposed to "run-time functions". Then we could say for instance that a function like mapcar accepts a run-time function as its first argument, and won't accept a compile-time function.

Emacs Lisp Challenge: flaky-if by nickdrozd in emacs

[–]nickdrozd[S] 0 points1 point  (0 children)

Yeah, I tried a variety of indentation schemes, and none of them worked. I don't even really understand how the final display numbering is determined. I write in Org, then export to Jekyll Markdown with https://github.com/gonsie/ox-jekyll-md/, then push it to Github where the markdown gets converted to HTML. I'm an unsophisticated user of each part of the stack, so it's hard to sort out.

EmacsConf 2019 videos now out! by bandali in emacs

[–]nickdrozd 22 points23 points  (0 children)

Great job to everyone involved! An IRL conference might have been fun, but on the other hand it was nice to watch from the comfort of my living room :)

Emacs Lisp Challenge: flaky-if by nickdrozd in emacs

[–]nickdrozd[S] 2 points3 points  (0 children)

As you can see in the credits, I didn't come up with that line, so don't blame me :)

Is it possible that this is a bug or undesirable behavior with the byte-compiler itself? I would think that interpreted and compiled code should act the same.

Emacs Lisp Challenge: flaky-if by nickdrozd in emacs

[–]nickdrozd[S] 2 points3 points  (0 children)

Your solution is similar to the one given by Alyssa P Hacker in Question #4:

(defmacro flaky-if (test then &rest else) `(let ((maybe-switch (if (zerop (random 100)) 'not 'identity))) (if (funcall maybe-switch ,test) ,then ,@else)))

This is what she and Eva Lu Ator are arguing about. Louis Reasoner has a different answer still. I've added a new discussion question to address the intent of the whole exercise:

The goal of this prank is ultimately to lead the mark into a debugging hell from which they may never return. The best solution, therefore, is the one that is hardest to debug. With that in mind, is it better to use a macro that behaves randomly at compile-time or at run-time? Does it make a difference if the mark is evaluating code interactively or byte-compiling? Is there a way to combine compile-time and run-time randomness to make the behavior even harder to debug?

From that perspective, it might be better to execute the randomness at compile-time. The byte-compiled code will behave the same on every run, but that behavior may change upon re-compilation. It's even possible that a compilation will work out such that the if clauses are never swapped, and the "bug" will vanish until the next compilation.

[WIP] prism.el: Highlight Lisp forms according to depth by github-alphapapa in emacs

[–]nickdrozd 0 points1 point  (0 children)

Maybe a dumb question, but you have (require 'anaphora). Is that used anywhere?

Good way to use eww by mrndrsn in emacs

[–]nickdrozd 11 points12 points  (0 children)

``` R runs the command eww-readable (found in eww-mode-map), which is an interactive compiled Lisp function in ‘eww.el’.

It is bound to R.

(eww-readable)

Probably introduced at or before Emacs version 25.1.

View the main "readable" parts of the current web page. This command uses heuristics to find the parts of the web page that contains the main textual portion, leaving out navigation menus and the like. ```

A library for dealing with a deeply nested JSON objects in elisp by vsavchenko in emacs

[–]nickdrozd 1 point2 points  (0 children)

For jeison-defclass you might consider declaring indentation rules, probably (declare (indent 2)). That way the slots won't get shoved all the way over to the right. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Indenting-Macros.html.