News for hackers. Stuff that matters.

stassats

Re:Scheme on Java on Common Lisp on Wednesday February 25, 2026 @09:56AM (#47152370)
I did that to write simd routines for sbcl: https://github.com/sbcl/sbcl/blob/master/src/code/arm64-simd... Probably the best way of writing assembly, can evaluate the function immediately, use macros and any other code to emit instructions, even can print register values (instruction-level stepping would be even better, but too much work).
Re:Steel Bank Common Lisp on Wednesday February 25, 2026 @09:28AM (#47151941)
Still 40 years to go.
Re:Steel Bank Common Lisp on Wednesday February 25, 2026 @09:28AM (#47151935)
I have also seen some outright crashes on the new GC.
Re:Addressing the adding situation on Tuesday December 02, 2025 @03:54PM (#46126726)
The tricks to avoid multiplication (and division) are probably worth a whole post.

  x * 6:
  lea eax, [rdi+rdi*2]
  add eax, eax

  x * 7:
  lea eax, [0+rdi*8]
  sub eax, edi
  
  x * 11:
  lea eax, [rdi+rdi*4]
  lea eax, [rdi+rax*2]
But with -Os you get imul eax, edi, 6

And on modern CPUs multiplication might not be actually all that slow (but there may be fewer multiply units).

Re:Addressing the adding situation on Tuesday December 02, 2025 @09:53AM (#46121781)
The text mentions that it can also do multiplication but doesn't expand on that.

E.g. for x * 5 gcc issues lea eax, [rdi+rdi*4].

Re:ECL Runs Maxima in a Browser on Monday November 03, 2025 @05:24AM (#45797612)
ABCL is really slow.
Re:Finding and Understanding Bugs in C Compilers (2011) [pdf] on Tuesday September 30, 2025 @08:18PM (#45432906)
A good strategy if you don't care about fixing bugs.
Re:Walking Around the Compiler on Friday September 26, 2025 @10:59AM (#45387289)
That shouldn't mean that it doesn't return a NaN. Things are generally not optimized away because of NaNs. E.g. in GCC, abs(c) > -1.0 is not folded, unless building with -ffast-math
Re:Walking Around the Compiler on Friday September 26, 2025 @08:08AM (#45385550)
That fix has limited applicability. x * x is also a non-negative float. But abs(x * x) is not optimized. Or abs(abs(x)+1). GCC, for example, does know that.
Re:Quirks of Common Lisp Types on Tuesday September 02, 2025 @07:10PM (#45110309)
(+ 2 (id "2")) may also produce a compile time warning. Nothing precludes from having a special rule for that. Like (+ 2 (print "2")) does warn.
> changes in the Qt project made the technique used by the Qt4 bindings impractical for Qt5 or Qt6 - at least that was my understanding when I looked into it.

It was hard to do reasonably with qt4 already. The best solution would be to support the C++ ABI natively, but that's never going to happen.

Re:Notes on Graham's ANSI Common Lisp on Monday July 14, 2025 @10:46AM (#44560898)
> Why does SBCL not use LLVM?

Why doesn't GCC use LLVM? Why is Zig writing their own backend?

Re:Web Embeddable Common Lisp on Wednesday June 25, 2025 @05:55PM (#44382157)
> lack of tail-call elimination

But lisp doesn't need TCO.

Re:Beware of Fast-Math on Saturday May 31, 2025 @06:45AM (#44143364)
You can turn them back into rationals, (rational (sqrt 2d0)) => 6369051672525773/4503599627370496

Or write your own operations that compute to the precision you want.

Re:A Common Lisp jq replacement on Friday May 02, 2025 @09:35AM (#43869560)
>(safety 0)

Please, don't do that!

>any system that relies on information that was typed into a REPL three-months ago and is now only stored in the binary state of that REPL and nowhere else is totally insane as a production product.

Nobody does that.

Re:Nvidia's Project Digits is a 'personal AI supercomputer' on Tuesday January 07, 2025 @03:34PM (#42627111)
> roadrunner is petaflops of FP32

Isn't it actually FP64?

Re:The Alder Lake SHLX Anomaly on Friday January 03, 2025 @01:01PM (#42587931)
Using EAX is one byte shorter, so it might be doing that inadvertently.
Re:Mark–Scavenge: Waiting for Trash to Take Itself Out on Monday November 25, 2024 @11:01PM (#42242483)
Common Lisp. The dynamic-extent declaration allows for stack allocation.
Re:Bit-twiddling optimizations in Zed's Rope on Wednesday November 20, 2024 @06:59PM (#42199491)
> because 64-bit ARMv8.0 lacks a POPCNT instruction

It does have this: https://developer.arm.com/documentation/ddi0596/2021-09/SIMD...

And GCC happily uses it https://godbolt.org/z/dTW46f9Kf

Re:Leaving Neovim for Zed on Monday August 19, 2024 @02:13PM (#41293326)
There's M-:
CNT on arm64 counts 8 or 16-bit elements too.
Re:Steel Bank Common Lisp 2.3.5 released on Sunday May 28, 2023 @09:14PM (#36109504)
SYS:WITHOUT-GCING is better but is still fraught with danger (that's why I didn't mention it).
Re:Steel Bank Common Lisp 2.3.5 released on Sunday May 28, 2023 @08:33PM (#36109260)
That's not related to garbage collection.
Re:Steel Bank Common Lisp 2.3.5 released on Sunday May 28, 2023 @08:31PM (#36109244)
That's a recipe for disaster. Never do that.
Re:Learn Lisp the Hard Way on Tuesday January 10, 2023 @12:18PM (#34328155)
What drives people to attempt to persuade others that Lisp is not practical?
Re:The Empty List on Saturday December 17, 2022 @12:55PM (#34030272)
> it's different enough than other languages it confuses people.

And javascript integers (or lack thereof) don't match CL integers. So if you want to interoperate between distinct languages you do have to consider the differences anyway.

Re:Reader Macros in Common Lisp (2014) on Sunday November 20, 2022 @07:10AM (#33680318)
It's not. Reader macros don't take s-expressions, they take characters.
Re:Reader Macros in Common Lisp (2014) on Sunday November 20, 2022 @07:08AM (#33680303)
Sure, what's so special about it?

(get-macro-character #\() => SB-IMPL::READ-LIST

(get-macro-character #\)) => SB-IMPL::READ-RIGHT-PAREN (that one just signals an error, the read-list one picks up the closing #\))

Re:SBCL: New in Version 2.2.1 on Sunday January 30, 2022 @02:50PM (#30140445)
Ok, I added the dates.

Older »