Hacker Newsnew | past | comments | ask | show | jobs | submit | jxy's commentslogin

> No support for first class continuations

I'm not sure about how people would feel about this. I have mixed feelings. It feels like a loss of many things. What are the gains from ditching continuations?


First-class continuations remains the hardest nut to crack to implement any full specification of Scheme, especially if performance and/or compactness and/or simplicity of implementation and/or integration with other languages (C, C++, Java, etc.) is a priority. Scheme--, a subset with only downward continuations, i.e. continuations that could be implemented using only C setjmp and longjmp or equivalent, would still be an extremely useful language, but it is much harder to gather a community for such a project.


From the article:

> What is needed is a small, portable compiler that generates more or less "natural" C code with minimal dependencies and runtime system that supports at least the basic constructs of the language and that puts an emphasis on producing efficient code, even if some of the more powerful features of Scheme are not available.

Since C doesn't support continuations, it is not possible to have continuations and at the same time generate "natural" C code.

Consider how you would implement first class continuations. It's not possible to do CPS transformation (given the goal of natural code generation) - since that's a whole program transformation.


> Since C doesn't support continuations, it is not possible to have continuations and at the same time generate "natural" C code.

Since CHICKEN actually does this, I'll add the proviso of "without a GC or costly runtime".


I would call the code CHICKEN generates for "direct style" not "natural". (I know - it is a cop-out to use "natural" in quotes)

Regardless of what we call the style, it isn't simple any more.

For people interested in the internals of Chicken Scheme (I suspect sctb already knows):

https://www.more-magic.net/posts/internals-gc.html


Given the intent to have relatively straightforward C code and a tiny runtime, you pretty much have to ditch them or you're not going to get anywhere at all.

Plus honestly most of the uses of continuations that would make sense in the sort of relatively low level code this is aimed at can be built out of a few special purpose macros (and possibly a small amount of crying) - scheme code tends to lean on first class continuations for a lot of things that don't really need them, Because It Can.

e.g. Paul Graham's On Lisp shows how to build (a subset of) continuations out of macros, and getting something like clojure's 'recur' out of that would probably give you simpler macros than pg's code uses.


It's fine because this is a static subset of Scheme that you could use to, say, implement a runtime for a full Scheme. As a Scheme programmer, it feels nice to be able to implement your Scheme in something very close to Scheme instead of having to use C.



The HTML version is quite nice. Do you know how they did the LaTeX to html conversion?


No idea. Ask the folks who manage that page?



mouse or keyboard is really just a preference. you could do mouse 1 sweep-select 2-3 in one window, and move to another mouse 1-3, and move to another do mouse 1-3, ... Or you could do, in case of vi, y$ (or other movements), ^w w (or other way to select other window), (move your cursor) p, ^w w, (move your cursor) p, ... Though I'm biased, because I feel it's much easier to move my mouse than do one of wWbBeE^$fFtThjkl to move my cursor, even though it is a lot faster and efficient to only move a few of my fingers than my whole arm.

the font is likely Go Font, the proportional one


Aha, right, cursor movement across large distances is indeed more comfortable with the mouse. This is usually awkward with the keyboard, and requires plugins like EasyMotion, or just holding keys or repeating key combos. I think these movements are rarer than small cursor movements, like jumping to the next character, word, line, etc., or jumping to the matching brace, etc. In these cases using the keyboard is still faster and more precise.

But I was more thinking about controlling the editor itself. Creating new buffers/panes and switching between them is all much faster with a keyboard. For example, I bind `=` and `-` to switch to the previous/next buffer, and Tab to switch to the next pane. I do these actions hundreds of times a day, and they're just a keystroke away. I couldn't imagine having to use the mouse for this. It would be unbearably slow and tedious.

The best part of key bindings is that they can be easily modified to suit any workflow. Whereas with mouse movements you really can't customize them beyond which of the few buttons to click. The movements themselves can't be optimized, unless you go into gesture territory, which has a lot of drawbacks as well.

No, it doesn't look like the Go font, but thanks.


> Aha, right, cursor movement across large distances is indeed more comfortable with the mouse. This is usually awkward with the keyboard, and requires plugins like EasyMotion, or just holding keys or repeating key combos

Embrace search based navigation. And if you’re using Vim or Emacs, do whatever that can popup a new window with the result of your search and links to their location in the main buffer. And extend that to search in all files of the $PROJECT.


I do use search often as well, but it's not great. You may mistype and land somewhere unintended. Or have to iterate over the results if they're not a unique match, etc. Whereas if the location is visible on screen, it's much easier to go to it with a point and click.


Nature's evolution algorithm took millions of years to find the architecture and the base model, which then takes decades to be fine tuned to be able to form this opinion.


from OED:

the modern sense of "meme"

> 2. An image, video, piece of text, etc., typically humorous in nature, that is copied and spread rapidly by internet users, often with slight variations. Also with modifying word, as internet meme, etc.

> 1998

> The next thing you know, his friends have forwarded it [sc. an animation of a dancing baby] on and it's become a net meme.

> Sci. & Technol. Week (transcript of CNN TV programme) (Nexis) 24 January

the modern sense of "viral"

> Chiefly Marketing. Of, designating, or involving the rapid spread of information (esp. about a product or service) amongst customers by word of mouth, e-mail, etc. to go viral: to propagate in such a manner; to (be) spread widely and rapidly.

> 1989

> The staff almost unanimously voted with their feet as long waiting lists developed for use of the Macintoshes... ‘It's viral marketing. You get one or two in and they spread throughout the company.’

> PC User (Nexis) 27 September 31

Edit: format


interesting

    % /usr/bin/jq --version
    jq-1.6-159-apple-gcff5336-dirty


I can't know what "-dirty" implies, but https://github.com/jqlang/jq/commit/cff5336 is a pretty random commit from 2022 :-(

https://github.com/apple-oss-distributions/distribution-macO... hasn't been updated with a "jq" directory yet


"dirty" usually means that the commit doesn't correspond to any specific version tag in the repo (or whatever other mechanism is used to map commits to versions).


Incorrect: https://git-scm.com/docs/git-describe#Documentation/git-desc...

> If the working tree has local modification "-dirty" is appended to it.

and one can see their invocation of --dirty here: https://github.com/jqlang/jq/blob/cff5336ec71b6fee396a95bb0e...


1.6? Wonder why they went with an outdated version.


If you think this is bad then don’t check the version of bash it ships with.


so it wouldn't require a shell that supports job control?


That's a pretty low bar. What's the Venn diagram of (systems which can run this) & (systems with only terrible shells)?


How does taskwarrior deal with recurring tasks now? Like tasks that have a due date recur every two weeks, or tasks that have a due date always two weeks after done.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: