Kazinator, to random

Here is an idea for #Lisp .

When a file is being loaded by load, there should be an anonymous block named nil. The file being loaded should be able to execute a (return <value>) which will stop the load and cause the (load ...) call to return that value.

I'm also thinking it would be useful to pass arguments to load, which turn into a list bound to the dynamic variable load-args, so that loaded files can have arguments.

Kazinator,

Implementation of this concept in working stages:

This is the TXR #Lisp interactive listener of TXR 286.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
Apply today for a TXR credit card, and get 1MB off your next allocation.
1> (file-get-string "add.tl") ;; what is in add.tl?
"(return-from load [apply + load-args])\n"
2> (load "add")
0
3> (load "add" 3 5)
8
4> (load "add" 3 5 7)
15
5>

We can use a loaded file as a function. It will be useful in tool-related scripting.

daviwil, to random
@daviwil@fosstodon.org avatar

I don't care if "Scheme is not a Lisp", the only thing that matters to me is that Scheme is beautiful and fascinating.

ramin_hal9001,
@ramin_hal9001@emacs.ch avatar

@dekkzz76 @daviwil

  • S-expressions, macros, DSLs
  • inspired by Lamdba Calculus
  • tail recursion
  • minimal specification
  • developed by iterating on the programs image in memory

That makes a pretty solid language in my book.

fosskers,

@daviwil Jesus if #Scheme isn't a #Lisp then nothing is.

ksaj,

@fosskers @daviwil The next argument is "Well akshwully, #Lisp isn't really a Lisp either."

amszmidt, to random
@amszmidt@mastodon.social avatar

Scheme is not Lisp. Bite me.

rml,

@amszmidt @louis @ramin_hal9001

Common #Lisp folks: "scheme isn't fully featured"

Also CL folks: "I developed an entire #Haskell-like programming language in Common Lisp only to realize its lack of features found in its 50-page standard cousin #Scheme is holding the whole project back"

rml, to internet

What other #distro includes a system service for blocking #facebook out of the box?

#guix

rml,

@akater
I did it y'all. I turned #scheme into a proper #lisp

(we already have defmacro, loop [ala (let loop () ...)], defmethod (as define-method), defun is simple function definitions iirc, so all is thats left is unwind-protect, which trivially defined using dynamic-wind)

optimal, to random

i switched to #emacs. before you get your pitchforks ready, i'm ready for a Q&A

optimal,

@ramin_hal9001 @publicvoit yup, same rationale. Shell wasn't too bad, but I was fed up with configuring #Neovim and #tmux. They just never felt... complete. Then it got to the point where my Neovim config kept falling apart because all the plugin updates kept deprecating things, and #Fennel just wasn't lispy enough. For reference - I used #Nix, so adding/removing plugins was a breeze.

It also felt like a lot of Neovim plugins and apps were trying to add to or hack into Neovim what Emacs already did well. #Neovide and #GNvim, #Conjure, Vim Table Mode, #Aniseed and Hotpot.nvim, I could go on. These are all excellent plugins, but Emacs just does them so much better.

#Vimscript was a very simple command language made to do things it never should have. Tmux's scripting language is an even uglier copy, mixed with shell syntax. And scripting in Fennel is somewhat okay until you have to start mixing in Vimscript via strings.

It just all felt... hacky. Puzzle pieces that were never supposed to go together.

#Emacs just feels so much more coherent, or at least #DoomEmacs. Doom gives you the finished puzzle, and detailed, simple instructions on how to rearrange it to make it your own, or even tack on more pieces. It's a wonderful experience. And I just love #Lisp.

schmudde, to random
@schmudde@mastodon.social avatar

Richard Gabriel's "Worse Is Better" (1991) is always worth a re-visit.

It's a fairly succinct and technical reflection on why worse design design decisions often win. It also encapsulates why we're all using Unix and Windows running C code rather than more advanced and elegant #Lisp machines.

https://www.dreamsongs.com/RiseOfWorseIsBetter.html

#computerscience

mousebot,
@mousebot@todon.nl avatar

@schmudde @evanwolf "Lisp, face it, is used for advanced research and development in AI and other esoteric areas. It has weird syntax, and almost all other computer languages share a non-Lispy syntax. Syntax, folks, is religion, and Lisp is the wrong one. Lisp is used by weirdos who do weirdo science."

that's extremely dogmatic (literally so), for someone who is attacking someone else for being dogmatic. otherwise i was finding it ok.

#lisp

simon_brooke,
@simon_brooke@mastodon.scot avatar

@mousebot @schmudde @evanwolf

I'm a wierdo. I don't have a problem with that. And yes, I think that most of us who discover #Lisp and fall deeply in love with it are weirdos.

You only need to look at a fern, or a cloud, or a tree, or a human hand, or water curling in vortices off a rock, to know that God is a wierdo too: the universe is written in recursive functions.

ADHDefy, to random
@ADHDefy@easymode.im avatar

Each new day brings with it another reminder that everything I do is an ADHD trait.

simon_brooke,
@simon_brooke@mastodon.scot avatar

@ADHDefy this is why all #Lisp hackers have #ADHD.

RL_Dane, to rust
@RL_Dane@fosstodon.org avatar

Why is it that people's reaction to #Rust is either cult-level positive or Ted Cruz-level disgust?

I don't think I've heard more than a single person basically say, "Yeah, Rust is ok, but I like X better because Y." ;)

RL_Dane,
@RL_Dane@fosstodon.org avatar

@aja @jbowen

Ah, true that.

#Lisp folks are almost preternaturally enthusiastic about lisp ;)

abcdw, to random
@abcdw@fosstodon.org avatar

Arghhh, guile-commonmark doesn't support raw html
https://github.com/OrangeShark/guile-commonmark/issues/8

abcdw,
@abcdw@fosstodon.org avatar

Do someone with Guile FFI experience want to help me to get started with guile-tree-sitter? (:

Just share some FFI best practices and/or highlight overall direction/approach will be enough.

#guile #lisp #treesitter #ffi

walkerb, to programming

I'm playing with #python just now (never done anything serious in it) and I had setup my #java environment recently as well (playing with different options for a linux/windows GUI that didn't need different code for each).

I saw a language speed comparison chart that listed a formula used to calculate Pi to a given accuracy. It showed a 10x difference in speed in favor of Java.

As a little end of work day jolly I thought I'd recreate that on my local machine and see.

I wasn't familiar with the formula so I used #chatgpt to get the formula. That took some clarification to get the correct formula out, but it got there in the end ( -1 to the power and not -1 times).

I wrote the Python version first, and then wrote the same thing in Java.

Running the test I came up with a 5x difference in Javas favor (24s for Python, 5s for Java).

Fun end to a sunday.

Part of the conversation with chatgpt to get the forumla used. Took a little back and forth to clarify the top term
Python taking about 24 seconds for 100M iterations
Java taking about 5 seconds for 100M iterations

julioj,

@walkerb this is pretty cool, and I like seeing how other languages measured up, especially Common #Lisp.

rml, to random

imperative #lisp programmers are setqanoners, bite me

rml, to random

#Lisp(s) are the only programming environments that enable a prototype-to-production development cycle for non-trivial projects in a way that is predictable.

#clojure #commonlisp #janet #guile #scheme

rml, to random

great lecture on first-class continuations from Kristopher Micinski
https://www.youtube.com/watch?v=DW3TEyAScsY

#scheme #lisp #racket

abcdw, to random
@abcdw@fosstodon.org avatar

Preparing the last stream in the series related to scheme static sites generators:

https://youtu.be/W123JMNwXqU
https://trop.in/stream

#scheme #guile #lisp #haunt

rml, to random

some good sibling rivalry going down on the tl today :popcorn:

#lisp #scheme

dthompson, to gamedev

The Lisp Game Jam starts on Friday! Would be real cool if we got 50+ parenthetical jammers! At 49 now, just need one more. https://itch.io/jam/spring-lisp-game-jam-2023 #lisp #scheme #gamejam #gamedev

rml, to random

Computer scientists: The free monoid on E

Compute avant-gardist: Cons the magnificent

#scheme #lisp #fp

abcdw, to random
@abcdw@fosstodon.org avatar

G-exps, derivations, creating your own file-like objects and much more. Another great post from unmatched-paren. If you into , I highly recommend this series for better understanding of internals.

https://guix.gnu.org/en/blog/2023/dissecting-guix-part-3-g-expressions/

rml, to random

The Binary #Lambda Calculus: The Smallest Programming Language

John Tromp @ #Lisp NYC
https://www.youtube.com/watch?v=ejhfJScuViY

rml, to random

Ok, found my favorite new channel: Meta[circular] interpreters in #prolog
https://www.youtube.com/watch?v=nmBkU-l1zyc

#lisp #scheme

glitzersachen, to random German

Romulan - my declarative interface to the clingon command line parser - now also supports declaring simple command line interfaces (without subcommand, only options and positional arguments).
https://www.glitzersachen.de/blog/2023-04-30_romulan-1.1.1.html
https://gitlab.com/m-e-leypold/romulan/-/tree/main
#lisp #CommonLisp #Scripting #CommandLineParser

rml, to random

If #Mallarme were alive today, he'd be hacking #Lisp

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • ethstaker
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • tacticalgear
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines