a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
bfv's comments
activity:
user-inactivated  ·  1558 days ago  ·  link  ·    ·  parent  ·  post: GNU Guile 3.0.0 released

Guile 3 is interesting because of the JIT. They've been working towards it for over 10 years. Guile is made for embedding in applications written in other languages, particularly C, the way emacs lisp is embedded in emacs. It wants to integrate more tightly with the application its embedded in than Python or Lua do, and that imposes constraints that have historically made it very slow.

But you're asking about lisp in general. I'll talk about Common Lisp instead of Scheme, because I know it better.

So every dynamic language has a thing called a repl, but it's not the same thing as the lisp repl. It's only a little facitious to say this is a complete Common Lisp implementation (that only works with sbcl):

    (sb-ext:save-lisp-and-die "dumblisp" :toplevel #'(lambda () (loop (print (eval (read)))) :executable t)

read with no arguments reads the next lisp object from standard input. Type (+ 2 2) and you get a list containing the symbol '+', the integer 2, and the integer 2.

eval takes a lisp object and, well, evaluates it. The language isn't defined in terms of text, it's defined in terms of how eval interprets its argument. (eval (list '+ 2 2)) is equivalent to typing (+ 2 2) at the repl, (eval "(+ 2 2)") is not.

A corollary of that is transforming programs is just manipulating lists, and you can teach eval new transformations. So, if you really miss while loops from some other language, you can write

    (defmacro while (test &body body) `(do () ((not ,test)) ,@body))

And now

    (let ((i 0)) (while (< i 10) (incf i) (format t "~a~%" i)))

works like while in C. You've added while loops to your lisp. That's how most control structures are implemented. If you expand that expression all the way (unfortunately there's no builtin function to do it in CL) you'll get something involving TAGBODY, which is equivalent to a set of labels and gotos in C and translates straightforwardly into jump instructions when passed to the compiler.

Common Lisp's support for object oriented programming, the Common Lisp Object System, was originally implemented as a library using the same mechanism, and in fact most implementations just incorporated the library with minor optimizations rather than modifying their compilers when it was incorporated into the standard. Here's an implementation of Prolog in around 400 lines.

There's other stuff of course. A lot of us just like the syntax. For greybeards it's synonymous with functional programming. Image-based persistence is really cool. A high-level language that can be about as efficient as C if you care enough to give it hints is handy for projects where that matters. Convenient metaprogramming is the feature that really distinguishes lisps from other languages now though, things like garbage collection and strong but dynamic typing started with lisp but have since become ubiquitous.

If you're interested, Practical Common Lisp and Paradigms of Artificial Intelligence Programming (in that order!) are both great books to start with.

user-inactivated  ·  1972 days ago  ·  link  ·    ·  parent  ·  post: Google employees: We no longer believe the company places values over profits

"Guys, this Kool-Aid tastes funny...."

user-inactivated  ·  2158 days ago  ·  link  ·    ·  parent  ·  post: I was Jordan Peterson’s strongest supporter. Now I think he’s dangerous

From the outside, there is way to much ressentiment in Peterson's following for Nietzsche to be a good substitute. You're never going to sell those guys on Nietzschean affirmation.

Plus Angry Young Men tend to take all the wrong lessons from Nietzsche.

user-inactivated  ·  2444 days ago  ·  link  ·    ·  parent  ·  post: Meet The Neo-Nazis Who Organized the Klan-like Charlottesville, VA Rally - It's Going Down

https://www.nytimes.com/2015/06/25/us/tally-of-attacks-in-us-challenges-perceptions-of-top-terror-threat.html

    On several occasions since President Obama took office, efforts by government agencies to conduct research on right-wing extremism have run into resistance from Republicans, who suspected an attempt to smear conservatives.

    A 2009 report by the Department of Homeland Security, which warned that an ailing economy and the election of the first black president might prompt a violent reaction from white supremacists, was withdrawn in the face of conservative criticism. Its main author, Daryl Johnson, later accused the department of “gutting” its staffing for such research.

fast forward

http://www.reuters.com/article/us-usa-trump-extremists-program-exclusiv-idUSKBN15G5VO

user-inactivated  ·  2444 days ago  ·  link  ·    ·  parent  ·  post: Meet The Neo-Nazis Who Organized the Klan-like Charlottesville, VA Rally - It's Going Down

The Alt-Right isn't the Klan. The Klan was civil war veterans, then people whose parents and grandparents were civil war veterans and who had been taught the lost cause in school, and then people trying to revive it to oppose the civil rights movement. They got big because they were preaching to the choir. The Alt-Right is a few people who are really into European far right movements and a lot who feel daring cosplaying nazis and making racist jokes. They're Boyd Rice and Michael Moynihan except with /pol/ and twitter they can convince themselves they have an actual movement instead of just trolling. They don't have a choir to preach to, they just have idiot hangers-on who will move on when they stop looking cool and start looking pathetic. Hell, they've already managed to alienate the militia nuts.

They can be laughed out of existence.

user-inactivated  ·  2566 days ago  ·  link  ·    ·  parent  ·  post: U.S. Drops Largest Non-Nuclear Bomb on ISIS Target in Afghanistan

It's not like that at all. You don't hope the infant will shoot itself.

user-inactivated  ·  2587 days ago  ·  link  ·    ·  parent  ·  post: Piketty’s Crumbs

    Don't overthink it.

Or oversimply. Deontology is about rules. You've got your 10 commandments or your categorical imperative or your wiccan rede or... and if you do what your rules say to do you're doing the right thing. This can get silly. Consequentialism is about results, but isn't quite the same as utilitarianism; the Libertarian what's-good-for-me-is-good school of ethics is consequentialist as well. This gets silly too, but I'm not linking to trolly problems or Ayn Rand because I like you guys.

user-inactivated  ·  2637 days ago  ·  link  ·    ·  parent  ·  post: Why Liberals Should Back Neil Gorsuch For Supreme Court

Nah, make them fight for every inch. If we can't stop confusing economics with politics, we can at least remember our game theory.

user-inactivated  ·  2718 days ago  ·  link  ·    ·  parent  ·  post: Bl00s Reviews #10: Hillbilly Elegy by JD Vance

I think you probably hit on the real purpose of the book at

    Also he moved to Berkeley and got a job with Peter Thiel so… okay. Whatever.

VCland is all about "personal brands". Hillbilly who pulled himself up by his bootstraps and became a conservative intellectual is a pretty good one if it's Peter Thiel and the wingnuts that cluster around him you want to impress.

user-inactivated  ·  2726 days ago  ·  link  ·    ·  parent  ·  post: The "era of the bitch" is coming

    women as top executives still prompt an extra shot of public scrutiny. (Just ask Marissa Mayer or Sheryl Sandberg or Carly Fiorina.)

I'd let it pass if it wasn't my industry and people I know hadn't suffered working for companies they were running, but being women is pretty low on the list of reasons people hate Marissa Mayer and Carly Fiorina.

This in no way detracts from the main thrust of the article.

user-inactivated  ·  2765 days ago  ·  link  ·    ·  parent  ·  post: Presidential Debate Thread

Someone confirm I'm not hallucinating and that

    Trump: Stop and frisk was great! Let's have more of that!

    Moderator: You know New York doesn't do stop and frisk anymore because it was obviously really really racist, right?

exchange happened. The moderator of the presidential debate had to shut down a racist rant like he was moderating a subreddit and not a presidential debate? That was a thing that happened?

user-inactivated  ·  2779 days ago  ·  link  ·    ·  parent  ·  post: Jeff Kunzler: Against Minimalism A Plea for Cyberpunk

But it does work right from the perspective of the manufacturer; you keep buying new phones.