Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
phoe-krk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
78 ms
·
931.
▲
by
phoe-krk
6y ago
Let me answer by posting an introduction to the condition system by Kent M. Pitman. It is the first subchapter of the book. ------ There have been many attempts to declare the Lisp family of languages dead, and yet it continues on in many
932.
▲
by
phoe-krk
6y ago
Christmas comes early for you this year. :D See https://github.com/svetlyak40wt/python-cl-conditions
933.
▲
by
phoe-krk
6y ago
> All of those can be handled without unwinding the stack to the point where the code for handling them was defined. Nitpick: the only thing that cannot be handled by winding the stack is when you run out of stack to wind. But, luckily
934.
▲
by
phoe-krk
6y ago
I think that'll be possible. As long as you can persist all the state (which is easy if you are programming in a functional manner), then you will know exactly what sort of input caused a crash in your program. And when you have the
935.
▲
by
phoe-krk
6y ago
I haven't explored Clojure. If it allows one to customize the means in which errors are signaled (read: force the language to not immediately throw a Java exception on an error, and instead execute some code), then one should be able
936.
▲
by
phoe-krk
6y ago
None, other than for sheer performance. (THROW will perform worse than GO and RETURN since the list of catch tag will need to be traversed on each throw.) As you mentioned, one can implement both GO and RETURN via THROW plus gensyms - see
937.
▲
by
phoe-krk
6y ago
I think that it's possible. Immediately returning a HTTP 500 is easily doable, and you should be able to fork the Lisp process, continue serving requests in the parent, and save stack information (such as function parameters, etc..) an
938.
▲
by
phoe-krk
6y ago
I'll daringly say that it is. The book explicitly contains a tutorial section that describes dynamic variables, non-local transfers of control, and lexical closures - the three building blocks that allow for construction of a condition
939.
▲
by
phoe-krk
6y ago
If the server decides to escalate the issue to the programmer, e.g. by invoking the debugger, then yes, it would most likely hang until the programmer interactively resolves the problem (e.g. by issuing a proper restart), and only then exec
940.
▲
by
phoe-krk
6y ago
Samples should be available later; the book has only gone to production several days ago, so there's nothing properly formatted for a sample section yet. As for ToC, hold on, give me a few minutes - I'll extract it for you from th
941.
▲
by
phoe-krk
6y ago
Smalltalk and Common Lisp are both image-based programming languages where the compiler and debugger are always available. I think debugger-oriented programming is much more common in Smalltalk than in Lisp (at least I prefer to leave the d
942.
▲
by
phoe-krk
6y ago
> In practical terms, this system, while very impressive, it isn't widely understood or used in CL. I agree and wholeheartedly hope that my book mends that issue, even if just partially.
943.
▲
by
phoe-krk
6y ago
> With traditional exceptions, the stack unwind all the way to the "catch" block which has full responsibility of handling the exception. With CL conditions, you can implement multiple handlers which do not catch the exception
944.
▲
by
phoe-krk
6y ago
Thanks. Hope that it indeed is interesting, and that it doesn't contain sizeable errors anymore. The Lisp community has been a great help when it came to reviewing and editing the hell out of the manuscript, both language- and content-
945.
▲
by
phoe-krk
6y ago
Yes, all that without leaving the debugger. The debugger is left only when we want to continue execution of the program.
946.
▲
by
phoe-krk
6y ago
Additionally, one of the most tasty facts about it is that the Common Lisp condition system is written in Common Lisp itself. It's literally a Lisp plugin that only needs to be integrated with the rest of the system at its end points:
947.
▲
by
phoe-krk
6y ago
Author here. The book has just gone to production and will be available at the end of the year in dead-tree and electronic formats. The book happened because I got annoyed at the fact that there is no good reference that shows how the condi
948.
▲
The Common Lisp Condition System – Upcoming Book
(apress.com)
183 points
by
phoe-krk
6y ago
|
144 comments
949.
▲
by
phoe-krk
6y ago
I fully understood his point and at the same time disagree with it - "open source" should not be considered a generic term, and the reasons are purely practical. OSI has taken this term two decades ago and coined its widely known
950.
▲
by
phoe-krk
6y ago
> open-source means literally the source code is open to anyone to view You mean the term "source available", which has been a well-defined term for years as well.
951.
▲
by
phoe-krk
6y ago
I'll copypaste my comment that I've left at the HN discussion of that blogpost, https://news.ycombinator.com/item?id=23333853 : This is a PEBKAC, not a problem with REPL-driven development. He had all the test bodi
952.
▲
by
phoe-krk
6y ago
You likely misread the sentence. It doesn't say "To learn more, download and install the free browser extension:" - it says, "To learn more, or to download and install the free browser extension:" and then provides
953.
▲
by
phoe-krk
6y ago
Now that is an interesting backstory. I doubt I will ever see any proof for it due to its nature, but it's a curious anecdote nonetheless!
954.
▲
by
phoe-krk
6y ago
What does this have in common with the Qt framework? Asking because the project name follows the naming convention for Qt classes and widget.
955.
▲
by
phoe-krk
6y ago
These sounds are likely chosen at random from a predefined list of sounds along a given musical scale; possibly the background drones also have a say in the matter. You can read the source at https://github.audio/static/
956.
▲
by
phoe-krk
6y ago
You can follow whatever terms you desire for your application as long as you fulfill the requirements of the licenses of all modules that you use. In case of MIT, it is attribution; in case of LGPL3, you need to make the source of the LGPL3
957.
▲
by
phoe-krk
6y ago
AFAIK a library that uses LGPL3 modules without any modification is allowed to be licensed differently, provided that the final product allows the LGPL3 modules to be recompiled and/or swapped for others and that the source for the LGP
958.
▲
by
phoe-krk
6y ago
> which only has an compiler Nitpick: SBCL ships with an interpreter, but yes, it is turned off by default in favor of the native code compiler. See http://www.sbcl.org/manual/#Interpreter for details.
959.
▲
by
phoe-krk
6y ago
Sorry, but I strongly disagree. It's possible to write unreadable code in any language, and Lisp is readable once you've spent a basic amount of time with the language to get to know the forms and when your code is indented proper
960.
▲
by
phoe-krk
6y ago
Clash of Kings? That online game? Why?
More ›