Earlier quoted context omitted.
> Sadly, multithreading is an afterthought for Emacs It is, but it's usable. I'm actually amazed that, even after three major versions, the built-in threading is not used by the community. Yes, the threads currently are not usable for number crunching in the background. And yes, there are bugs, and trying to do many things from the background thread doesn't work, sometimes in unexpected ways. You can still block the…
> It is, but it's usable. I'm actually amazed that, even after three major versions, the built-in threading is not used by the community. I'd say inertia. Emacs is large enough for people not to be aware of "simple" things, so the new threading primitives.. might take a few more years.
Steel – An embeddable and extensible Scheme dialect
171–180 of 192 posts
Re: Steel – An embeddable and extensible Scheme dialect
#172This is a surprise! Steel is my project, happy to answer any questions anyone might have
What are the immutable hash maps based on? How do you use functions or other maps as keys in them?
Functions generate a hash based on a unique id generated for the function, plus the hash of any captured variables, and a hash of the pointer address to the function). That is off the top of my head though so I could be missing some details.
Hashing maps is tricky! With a sufficiently deep hash map you can run into problems since that invokes an equality check as well - at least how I handle it, is that you just attempt to naively hash the keys and values of the hash map, to create a hash code for that object. If the equality check ends up with a sufficiently large depth, eq returns false so we don't stack overflow.
Re: Steel – An embeddable and extensible Scheme dialect
#173Earlier quoted context omitted.
You're clearly the exception though. It's almost always just ignorance in my experience. That's why I used the word probably. I assume if someone asked you what you thought about Lisp, you'd have a lot more interesting stuff to say than just "ew, parentheses", right? That's my point, is all. As for readability, I don't think it's trivial at all. I just don't think syntax has all that much to do with it. It plays a ro…
No, the horrible syntax of lisp is pretty much all I have to say on it, honestly. I don’t care for lisp for the same reason I don’t care for perl: write-only languages are a bigger hinderence to software maintenance than whatever advantage might be obtained. And the advantages of lisp have long since been obtained by other languages.
Lisps are not write-only. They're easy to read precisely because there is no inscrutable syntax. Every pair of parentheses has a first element, which tells you what they're doing. The parentheses denote a scope in which to look for arguments.
Conventional style guides also make the readability practically a trivial issue because you end up indenting arguments such that the structure of the program is reflected in the indentation, because each S-expression within a parenthesized S-expression is itself an AST node. Writing readable Lisp is just a matter of reflecting the AST's structure in the indentation, which most people do in other languages anyway (to some degree).
> the advantages of lisp have long since been obtained by other languages.
Clearly not, since most other languages are still not S-expression-based. (Though, admittedly, some other advantages have been copied in other languages.)
Re: Steel – An embeddable and extensible Scheme dialect
#174It sounds great but what is it exactly and what can I use it for? Is there an equivalent of this in other languages?
Hopefully the linked README provides a general overview (I know I need to write some more documentation!), but Steel is an implementation of the scheme programming language (not entirely compliant yet, but aiming for R5RS and R7RS compliance). It can be used as a standalone language via the interpreter/repl (like Python or Racket), or it can be embedded inside applications, like Lua. There are hundreds (thousands, pr…
Re: Steel – An embeddable and extensible Scheme dialect
#175Earlier quoted context omitted.
Any chance of seeing the things I miss the most from Racket in other langs? 1. Parameters and Syntax Parameters (Syntax parameters make macros more powerful) 2. Turing complete macros (not just syntax-case) 3. Typed Racket I almost used https://gamelisp.rs/ for a project but the nightly feature it needs broke and it's no longer maintained, glad to see something similar arise! You might want to consider adopting their…
To answer each of these: 1. I do support parameters now, syntax parameters not yet. I would like to! But Racket has a pretty hefty head start on me so it'll take some time. 2. Right now I have syntax-rules macros, I also have defmacro style macros that get used internally in the kernel during expansion, but haven't yet opened them up for user space yet. Syntax case will be coming soon hopefully. 3. The odds of me bei…
Just in case you haven't come across it:
There is a portable implementation of `syntax-case` by R. Kent Dybvig and Oscar Waddell ready to plug into your expander.
Re: Steel – An embeddable and extensible Scheme dialect
#176This is a surprise! Steel is my project, happy to answer any questions anyone might have
Any chance of seeing the things I miss the most from Racket in other langs? 1. Parameters and Syntax Parameters (Syntax parameters make macros more powerful) 2. Turing complete macros (not just syntax-case) 3. Typed Racket I almost used https://gamelisp.rs/ for a project but the nightly feature it needs broke and it's no longer maintained, glad to see something similar arise! You might want to consider adopting their…
I assume, you mean `syntax-rules` here.
If I understand correctly, it's pretty easy to simulate a paper tape with `syntax-rules` macro - that is `syntax-rules` macros are already "Turing complete".
https://okmij.org/ftp/Scheme/macros.html#turing-completeness...
But ... I know what you mean - in practise `syntax-case` or `syntax-parse` would be lovely to have.
Re: Steel – An embeddable and extensible Scheme dialect
#177Earlier quoted context omitted.
To answer each of these: 1. I do support parameters now, syntax parameters not yet. I would like to! But Racket has a pretty hefty head start on me so it'll take some time. 2. Right now I have syntax-rules macros, I also have defmacro style macros that get used internally in the kernel during expansion, but haven't yet opened them up for user space yet. Syntax case will be coming soon hopefully. 3. The odds of me bei…
@mattparas Just in case you haven't come across it: There is a portable implementation of `syntax-case` by R. Kent Dybvig and Oscar Waddell ready to plug into your expander. https://www.scheme.com/syntax-case/old-psyntax.html
Re: Steel – An embeddable and extensible Scheme dialect
#178When I tried to introduce s-expressions to a DSL my co-workers nearly lynched me. The parenthesis were so violently hated I sunk into a deep hole and still haven’t came back out of it.
Maybe: https://srfi.schemers.org/srfi-49/srfi-49.html https://www.draketo.de/software/wisp
Re: Steel – An embeddable and extensible Scheme dialect
#179Earlier quoted context omitted.
So, if I use an editor config off the Internet, I need to inspect it for malware, because it's code, not configuration? Yes, there are languages for configuration - Jsonnet, Starlark, Dhall, which are execution safe - unlike Lisp and Lua!
Why would you use an entire config off the internet?
I think the real problem is around being able to trust your entire system. It'd help much more to have a better capability system so my rouge text editor can't upload my photos or credit card info from my browser profile to the internet, but today things kind of work because of tons of well intended and behaved people collaborating.
Re: Steel – An embeddable and extensible Scheme dialect
#180Can someone explain these scheme and lisp languages to me? Every time I look at these languages, I can't grasp what you can use them for. And why one would use them. I always feel like I'm missing something. In the example scripts and code snippets, I can see that you can define functions, that you can use lists, mathematical operations, you can build some algorithms, you can print text, but it never goes further tha…
Would strongly recommend watching the SICP video lectures: https://ocw.mit.edu/courses/6-001-structure-and-interpretati...