Post 9hXlJQg5BCaJCKm0Ke by amz3@framapiaf.org
(DIR) More posts by amz3@framapiaf.org
(DIR) Post #9hX53ktM3o4zBNpCTI by codesections@fosstodon.org
2019-04-06T13:54:46Z
3 likes, 3 repeats
I have a horrified admiration for how much *faith* (some) lisp folks put in their language. I was reading a post where the author mentions, in passing, that too many projects have rolled their own DSL instead of using a proper language like lisp. Their examples include (among *many* others):TOMLJSONSQLBashHTMLhtml! As a limited, domain specific language that people shouldn't use! I understand the logic but still… wow :Dhttps://ambrevar.xyz/guix-advance/index.html
(DIR) Post #9hX5hRYtLezgoaB6kS by alana@the.giant.horse
2019-04-06T14:02:04Z
0 likes, 0 repeats
@codesections *rubs eyes* granted, i haven’t been awake that long yet. but what the holy heck are they talking about
(DIR) Post #9hX7BUFO1pOJmjwcAy by mansr@society.oftrolls.com
2019-04-06T14:18:49Z
0 likes, 2 repeats
@codesections HTML really should have used s-expressions. So much madness (missing/mismatched closing tags) would have been simply impossible. That obviously wouldn't make it Lisp, though. S-expressions are just a data representation. Lisp uses specific meanings of such data to create a programming language.
(DIR) Post #9hX7errzHNH5Rn0ef2 by johnbessa@fosstodon.org
2019-04-06T14:24:02Z
0 likes, 0 repeats
@codesections (about LISP) I grew up in the a perl-only world, java had not yet stolen the server spot - Perl is strong in complex structures (hashes of hashes) so imagined what LISP would look like and wrote some (from my imagination) NOT SO!!!! ** nor JASON nor the rest you mention! ** (I fought XML successfully, for a while)
(DIR) Post #9hX7heBmbHJBszatOa by johnbessa@fosstodon.org
2019-04-06T14:24:31Z
0 likes, 0 repeats
@codesections wait, why is BASH on the list but not say SH or KSH?
(DIR) Post #9hX8iclvSDuLjcWsk4 by clacke@libranet.de
2019-04-06T14:30:00Z
1 likes, 0 repeats
@johnbessa @codesections Because people use bash.
(DIR) Post #9hX8sp8SLHSAyVvnbU by penguin42@mastodon.org.uk
2019-04-06T14:37:49Z
0 likes, 0 repeats
@mansr @codesections I've never liked lisp, but there again I hate json as well, so an argument against having invented it seems OK..
(DIR) Post #9hX9d81eROuMsnpP5k by clacke@libranet.de
2019-04-06T14:40:25Z
0 likes, 1 repeats
@codesections Well, that post is simply incorrect. One example:> Regular expressions (better ideas: Emacs’ rx, Racket’s PEG, etc.)One great thing about Racket's peg package is that it supports actual PEG syntax, including the regular expressions.This is one of the, or possibly *the*, greatest thing about the Racket community. They/we know that s-expressions are not the ultimate syntax for any and every occasion. Packages like peg, brag and datalog offer a library, an s-expr syntax and a native syntax, depending on what balance of flexibility and expressiveness you require.I'm implementing a native FBP syntax for Racket right now.
(DIR) Post #9hXA29ZzngxQwSpESO by clacke@libranet.de
2019-04-06T14:47:16Z
0 likes, 1 repeats
@codesections By "incorrect" I was even more thinking of this bit, and regexes are just one instance of it, forgot to quote it:> self-rolled DSLs or too-limiting programming languagesWe have a problem with too-capable languages. Too many things are Turing equivalent. When it comes to reasoning about your code's correctness and optimization opportunities, less power is more power.Regular expressions are great, and even though there are many variations, they pop up in many full programming languages, and if you know them in one language you mostly know them in another. If you use them to express actual regexes (rather than extended regexes with back-references and stuff), they usually compile to a state machine tighter than what you could reasonably express, or express at all, in the host language.
(DIR) Post #9hXA2BqjMRX3ywfcoq by mansr@society.oftrolls.com
2019-04-06T14:50:45Z
0 likes, 0 repeats
@codesections Why can't people separate the notions of data representation (syntax) and programming language (semantics)?
(DIR) Post #9hXAQiy5sUApeEoTxo by johnbessa@fosstodon.org
2019-04-06T14:43:42Z
0 likes, 0 repeats
@clacke your server won't let me connect - tried everything I could think of
(DIR) Post #9hXAQjFSpu4IW6wM2S by clacke@libranet.de
2019-04-06T14:49:56Z
0 likes, 0 repeats
@johnbessa You mean to follow me? Maybe it was too busy and slow due to libranet.de/display/0b6b25a8-2… . Try again?
(DIR) Post #9hXAb66qh6EiJar3Ng by amz3@framapiaf.org
2019-04-06T14:56:50Z
1 likes, 0 repeats
@codesections I agree that html in lisp is much nicer.
(DIR) Post #9hXAphAhh83TJccPXE by endomain@hackers.town
2019-04-06T14:59:33Z
0 likes, 0 repeats
@codesectionsNix is the root of a tree of very weird thought and GUIX is no exception as a member of that tree.I do think they made the right choice ditching the Nix language. It's fairly incomprehensible.
(DIR) Post #9hXCIk1KHXiKVEe88m by clacke@libranet.de
2019-04-06T15:10:51Z
1 likes, 1 repeats
@endomain @codesections The Nix language may be a bit unusual, but it is minimalist. You can learn all of it and how to use it productively in a few tutorial exercises.The library and conventions in nixpkgs on the other hand are pretty difficult to find a single good source on, and will mostly have to be learned by reading other people's code and experimenting.I should write a tutorial and best practices reference at some point, based on my experiences with buildRacket and other language-specific package build infrastructure.
(DIR) Post #9hXDSepoW6xtGmYOlE by a_breakin_glass@cybre.space
2019-04-06T15:28:57Z
0 likes, 1 repeats
@codesections SQL always is and has been a mistake :')
(DIR) Post #9hXHCWGmzcurtCjQ3c by clacke@libranet.de
2019-04-06T15:59:54Z
0 likes, 0 repeats
@a_breakin_glass @codesections Creating a language for it was not a mistake. The language that was created was.
(DIR) Post #9hXL1ilQbDTLGqAXWC by grainloom@cybre.space
2019-04-06T16:53:54Z
0 likes, 0 repeats
@codesections ok, but what do they actually say?> XML, HTML (better idea: S-XML)and yeah, imho, sexps make for a better DSL base than XML
(DIR) Post #9hXLeUrEEkWjQzN7Jo by grainloom@cybre.space
2019-04-06T17:00:50Z
0 likes, 0 repeats
@clacke @codesections using an EDSL is different than writing a new language, one can use Lua to very effectively sandbox a script and then they get the full power of Lua for processing the results of the script.that is imho a MUCH better alternative than inventing new syntaxes, especially ones that are hard to parse and no one can reimplement correctly.
(DIR) Post #9hXLv4VTShwedD6G8G by grainloom@cybre.space
2019-04-06T17:03:55Z
0 likes, 0 repeats
@clacke @codesections I'm no expert in Scheme or Guile, but the code I've seen so far has been quite understandable. The example I've seen brought up is that while yes, you _can_ generate Nix expressions if the language isn't powerful enough for you, but then you lose a lot of information about why it was generated the way it was. It seems similar to the difference between having a hello.c and hello.c after preprocessing, with all of stdio.h pulled in.
(DIR) Post #9hXM7tj6qyE8xiasG8 by endomain@hackers.town
2019-04-06T15:57:31Z
0 likes, 1 repeats
@clacke @codesections I don't think it's particularly minimal, but I agree that the bigger challenge of NixOS and Nix as a package manager is the expectation that you're fluent in a massive stdlib that houses many different opinions about how to manage subpackages.You simply cannot use nix effectively without being comfortable doing significant nix hacking, and it's quite frustrating. I tried for 9 months and all I learned was that I basically need to spend as much time as most nix comitters do to understand how to write a non-trivial package, and the whole while having folks yell at me for being unfair to nix.It was quite off putting.
(DIR) Post #9hXOlidHifgC2wz8pE by besserwisser@chaos.social
2019-04-06T17:35:43Z
0 likes, 0 repeats
@codesections Kinda wanna make a Lisp as an alternative to SQL now, since they don't mention any comparable projects in the post.
(DIR) Post #9hXPVwWeOjIeSJvJNw by njha@fosstodon.org
2019-04-06T17:44:04Z
0 likes, 0 repeats
@codesections Elm does this (replaces HTML with itself) too, which is why I decided to just render serverside templates instead.
(DIR) Post #9hXQA8THP5J35VVo6i by codesections@fosstodon.org
2019-04-06T17:51:21Z
0 likes, 0 repeats
@amz3 > I agree that html in lisp is much nicer.Do you mean something like #skribe?http://www.nongnu.org/skribilo/doc/user-3.html#skribe-syntax
(DIR) Post #9hXQTQ3mEXY58kmKP2 by koenaro@fediverse.initialization.tech
2019-04-06T17:54:47Z
0 likes, 0 repeats
@codesections the level of nerd in the replies to this...
(DIR) Post #9hXQaS9spVUrfwzMS8 by codesections@fosstodon.org
2019-04-06T17:56:06Z
1 likes, 0 repeats
@koenaro Isn't it great? Very much what I'm here for
(DIR) Post #9hXRLhHcPj2qC88Oem by besserwisser@chaos.social
2019-04-06T18:04:39Z
1 likes, 0 repeats
@codesections I once had a talk with a fellow student about programming languages, a topic he didn't know much about. He was pretty perplexed about the sheer number of them and I think he had the right idea.
(DIR) Post #9hXRn6888pyH4hlJFQ by codesections@fosstodon.org
2019-04-06T18:09:36Z
0 likes, 0 repeats
@besserwisser > He was pretty perplexed about the sheer number of them and I think he had the right idea.Well, maybe, but they sure are fun!
(DIR) Post #9hXRrtXEOhWPSYn36e by besserwisser@chaos.social
2019-04-06T18:10:28Z
0 likes, 0 repeats
@codesections I know. I especially like Lisp for the promise of easily making your own, though I still have to learn more about it.
(DIR) Post #9hXcbj8oNB1w5OrSQC by amz3@framapiaf.org
2019-04-06T20:10:31Z
0 likes, 0 repeats
@codesections Yes, I use something LIKE skribe but not skribe exactly.
(DIR) Post #9hXfIm2XfcxnRAaC3s by codesections@fosstodon.org
2019-04-06T20:40:55Z
0 likes, 0 repeats
@amz3 are the exact details confidential?
(DIR) Post #9hXk1O00IgaliuvKqW by amz3@framapiaf.org
2019-04-06T21:33:54Z
0 likes, 0 repeats
@codesections What I use is mix of skribe with guile sxml for instance:(html (head (title [qadom is a peer-to-peer social network])) (body (@ (class "index)) [welcome]))The (@ (class "index")) describe element/node/xml attributes.That is I don't use #:keywords I only use the square brackets to delimit string and ,(bold [scheme]) to include inline tags in strings for instance:[Another ,(bold "text") sample]
(DIR) Post #9hXkhkRRFYrPURxKBk by amz3@framapiaf.org
2019-04-06T21:38:24Z
0 likes, 0 repeats
@codesections you can do it without skribe but then the last example becomes:(p "Another " (bold "text") " sample")With odd space before and after the bold expression. It is a detail but when you write lot of html you might find it handy.That said, my implementation of skribe is poor and is not supported by text editors...
(DIR) Post #9hXkhkmLznagXJk1my by codesections@fosstodon.org
2019-04-06T21:41:31Z
0 likes, 0 repeats
@amz3 That all looks really clean and interesting. This is getting me pretty excited
(DIR) Post #9hXlJQg5BCaJCKm0Ke by amz3@framapiaf.org
2019-04-06T21:48:20Z
0 likes, 0 repeats
@codesections neat! To come back to the original post topic about DSL. I find regular expression neat, like xpath is neat too. But, say XSLT is overkill. I still have mixed feeling about the programming programming language ala racket.
(DIR) Post #9hXlVUprXyr9ZH6NQO by codesections@fosstodon.org
2019-04-06T21:50:30Z
0 likes, 0 repeats
@amz3 Yeah, the rabbit hole this has led me down is Pollen, a static site generator written in Racket. I'm reading about it now, and it seems like it could be very interesting
(DIR) Post #9hXlcmi1UZ9j1quUxU by amz3@framapiaf.org
2019-04-06T21:51:49Z
0 likes, 0 repeats
@codesections FWIW, I don't like the syntax of pollen. I use the skribe syntax I was talking about even for documenting my scheme project.
(DIR) Post #9hXlyPjpZsOu9n4NSC by codesections@fosstodon.org
2019-04-06T21:55:45Z
0 likes, 0 repeats
@amz3 Fair enough. What is it that you dislike about Pollen's syntax? I'm still just reading about it, but it looked pretty similar (at least for the template files—maybe you were saying you don't like the content syntax?)
(DIR) Post #9hXmbOGJ03vEs8qQUq by amz3@framapiaf.org
2019-04-06T22:02:47Z
0 likes, 0 repeats
@codesections I dislike that syntax ◊(define metal "Plutonium")Even if my skribe syntax (called sfx) is not production ready, I find it's much easier to grasp. Also I like the document to be flat without logic. That is a feeling I have. Markdown doesn't have a logic, you can not define a variable, you can not loop like skribillo.
(DIR) Post #9hXnnw57BZHZBt9kkS by codesections@fosstodon.org
2019-04-06T22:16:15Z
0 likes, 0 repeats
@amz3 > I dislike that syntax ◊(define metal "Plutonium")Oh, I see what you mean as I read more about Pollen. Do you happen to know of any publicly available static site generators that use a syntax more like sxml/sfx? (I take it from what you said that you haven't released sfx publicly yet?)
(DIR) Post #9hYIUQCGbZCpNZg012 by clacke@libranet.de
2019-04-07T03:59:55Z
0 likes, 0 repeats
@endomain @codesectionsWhat I meant is that Nix really is just a lambda, a handful of primitive types, a handful of operators and two dozen builtin functions. That's it. Fits on an A4 page. You can call it ugly if you like, but it is minimalist.As a comparison, the minimalist language Scheme comes in a PDF of 88 pages.The second paragraph all fair criticism, and I agree that nixpkgs is inconsistent and confusing. I suppose if you count nixpkgs as part of Nix-the-language, as it's what you use to actually be productive with Nix, it's fair to not call it minimalist anymore, especially if minimalist means consistent, orthogonal, etc.Having crossed the threshold, I still find it pretty neat. But welcoming, it is not.
(DIR) Post #9hYJGudqiNNjhbhTLU by clacke@libranet.de
2019-04-07T04:07:45Z
0 likes, 0 repeats
@besserwisser @codesections The number of programming languages isn't a problem as such, it's great if they are so easy to make that many people make them, the problem is when there are many programming languages *in productive use*, and the choices of languages in use aren't really thought through all that well but mostly incidental, historical accident.A canonical set of languages, each designed to fulfill a niche, would probably make humanity more productive and dare I say happier. I'm not sure we know enough about how we use languages to define the requirements for a decent set though. Give it a few more decades of evolution and experimenting.
(DIR) Post #9hYVsxRbwSieqfsqS8 by charlag@birb.site
2019-04-07T06:07:27Z
0 likes, 0 repeats
@clacke @codesections @endomain fwiw you're probably mentioning revision 6 which not even all implementations fully support. Core Scheme is just as tiny. There are just standards that expand it. And most of the stuff from them has nothing to do with simple code in packaging.
(DIR) Post #9hYVsxl6lyJbp90PqK by clacke@libranet.de
2019-04-07T06:27:20Z
0 likes, 0 repeats
@charlag @codesections @endomain I'm questioning the challenge to my claim that Nix is a minimalist language.The 88 pages PDF is r7rs-small, and I do consider it minimalist, including the stdlib. Most general-purpose Schemes support 99% of it.For comparison, dlang.org/dlangspec.pdf is 659 pages.If one includes nixpkgs in the assessment, I do agree that it doesn't quite live up to minimalist ideals. It's not huge, and it is built on a minimalist base language, but it's more accidentally/organically grown than designed, and it's a bit of a mess in places.I disagree that Nix + nixpkgs is incomprehensible.
(DIR) Post #9hYXWp2qgpliKssFjk by clacke@libranet.de
2019-04-07T06:47:28Z
1 likes, 2 repeats
@charlag @codesections @endomain The difference in size between Schemes is not huge when looking at the core languages: - R4RS: 55 pages - R5RS: 50 pages - R6RS: core 90 pages, stdlib 70 pages - R7RS: small 88 pages, large red edition 182 pagesA Scheme implementer said during lunch as FOSDEM: "R6RS actually isn't a bad language" 😀From what some people are saying, one might get the impression that R6RS was hundreds of pages, like D or ECMAScript 9th ed.
(DIR) Post #9hYYKj5f6SQ4LZzBg0 by charlag@birb.site
2019-04-07T06:53:02Z
0 likes, 0 repeats
@clacke @codesections @endomain guix is working on Guile which doesn't even implement R6RS completely afaik because it doesn't make sense for some things.The core Scheme is as well binding and lambda plus couple of special forms like "if".
(DIR) Post #9hYYKjlUavscRJYasS by clacke@libranet.de
2019-04-07T06:56:25Z
0 likes, 0 repeats
@charlag @codesections @endomain Guile claims to support most of R6RS. What it doesn't support yet is R7RS, but it is officially in the documentation that it should.
(DIR) Post #9hZ4k70EX0WOHbayX2 by amz3@framapiaf.org
2019-04-07T13:00:24Z
0 likes, 0 repeats
@codesections yes guile-haunt support skribe syntax see https://dthompson.us/projects/haunt.htmlHave a good day!
(DIR) Post #9hZIKW680LnJwX2fQG by endomain@hackers.town
2019-04-07T14:45:12Z
0 likes, 0 repeats
@charlag@clackeThis idea that having a complete spec makes Scheme "not minimalist" is a ridiculous non-sequitur designed to make the conversation "about how everyone should be using Nix" rather than exploring a relatively new design space.Language communities shouldn't be based around the premise that you rhetorically browbeat people into using your tools.I strongly recommend that you not fall for this trap. There is no value in debating with this Nix proponent the nebulous property of "minimalism" when it's unclear why it matters or even if the argument was made in good faith.
(DIR) Post #9hZIKWOusUp6snpfhw by clacke@libranet.de
2019-04-07T15:32:48Z
0 likes, 0 repeats
@endomain @charlag The only trap I fell into was #xkcd386 . I'm not saying everyone should be using Nix, I'm not rhetorically browbeating anyone, I'm even agreeing that nixpkgs is an inconsistent and undocumented mess. I'm happy that Guix is trying a different tack. Their service definition language is already superior to that of Nix, IIUC.I don't know who is saying that Scheme isn't minimalist. I'm saying it is.I'm just saying that the core Nix language is minimalist simply because it is and saying that it isn't is just ignorant. Nix is odd-looking, even ugly, but the grammar is no bigger than that of say Tcl.I have said everything I wanted to say.
(DIR) Post #9hZIh9x8VOplvDdJKa by endomain@hackers.town
2019-04-07T14:39:46Z
0 likes, 0 repeats
@clacke@charlag @codesectionsIt is pretty wild that now "having a spec that is increasingly more complete and useful" is now a bad thing. Whereas, "Not having a spec and doing whatever you damn well please with behavior subtly changing between unnumbered releases" is now positive because it's minimalist. The page count difference between R5 and R6, which didn't change *that* much, should be a hint as to what's going on there.To me, this is an example of how Nix advocates will go to great cognitive lengths to avoid any criticism of Nix & language. And now, even the idea that nixpkgs is large and complex system that is hardly documented at all is unutterable even though it's obviously true. To me this attitude, even more than the technical challenges, is an example of how unwelcoming and uncompromising the Nix community is.
(DIR) Post #9hZIhAC1c2kAfObCXQ by clacke@libranet.de
2019-04-07T15:36:54Z
0 likes, 0 repeats
@endomain @charlag @codesections Who are you even talking to?I'm saying that R6RS caught an unfairly bad reputation despite it not actually being a huge leap from R5RS, that actual implementers say it's not at all bad, and that everyone's new favorite R7RS is actually about the same size as the much maligned R6RS. This is a side-thread that no longer has anything to do with Nix.
(DIR) Post #9hZJ7NZGVXsdg2yCrw by endomain@hackers.town
2019-04-07T15:37:53Z
0 likes, 0 repeats
@clacke @charlag @codesections That's sure not what it looks like from here.
(DIR) Post #9hZJ7NvFBpSemDFl7w by charlag@birb.site
2019-04-07T15:39:28Z
0 likes, 0 repeats
@endomain @clacke @codesections can u unsubscribe me pls thx
(DIR) Post #9hZJ7O80QNfZPnDx1E by codesections@fosstodon.org
2019-04-07T15:41:48Z
0 likes, 0 repeats
@charlag @endomain @clacke (tip: you can use the `mute` feature to unsubscribe yourself from a thread without needing anyone else to remember to do so. Nothing wrong with asking, but it can save time:) )
(DIR) Post #9hZJ9Ct1Bxp78254qW by endomain@hackers.town
2019-04-07T15:39:24Z
0 likes, 0 repeats
@clacke @charlagYou certainly set a tone with this:
(DIR) Post #9hZJ9D5QRpkRkVszBY by clacke@libranet.de
2019-04-07T15:41:18Z
0 likes, 0 repeats
@endomain Literally called Scheme minimalist. No scare quotes. But it doesn't matter. This conversation is entirely beyond rescue.
(DIR) Post #9hZJI52Fke0jNwdDbE by charlag@birb.site
2019-04-07T15:43:47Z
0 likes, 0 repeats
@codesections @endomain @clacke I know about this but it always seems wrong to me because nor participants nor observers know I that I don't look at it anymore