News for hackers. Stuff that matters.

cospaia

Re:Why Common Lisp Is Now the Best Programming Language on Wednesday October 07, 2026 @09:23AM (#49992479)
Clojure can to some extent help you get a full/true REPL into Java and any JVM language, but only to some extent. You'll have to use Clojure to get the full observability and program runtime-mutability.

Show HN: Epupp – Live, REPL-driven, browser tampering

https://github.com/PEZ/epupp

Epupp has two modes of operation:1. *Live REPL connection from your editor to the web page*, letting you inspect and modify the page on the fly, with or without the assistance of an AI agent.2. *Userscripts*: Somewhat Tampermonkey style (I love Tampermonkey!).The two form a powerful pair. The live REPL connection, while happily supporting one-off changes or data extractions, is also a very...

( Read More... | no comments | 2 points | on HN )

Show HN: A data oriented TodoMVC using Replicant

https://github.com/anteoas/replicant-todomvc

Data oriented. It's been a theme throughout my rather long career. Especially the last five or so years, when I've been using Clojure in anger. But even with Clojure there are a lot of not fully data oriented ways of doing things. Building frontends (which I do for a living) has been particularly tricky to keep as data oriented as I wish. Enter Replicant...

( Read More... | no comments | on HN )
Re:Try Clojure on Friday May 24, 2024 @08:59AM (#40465765)
Wow. I'm the creator of Calva and I can tell you that I do not have an opinion on how to use it. I would never say something like that, and now I wonder what I could have said that was interpreted this way...

By default Calva Paredit overrides three or so keyboard shortcuts. This is to help the users to not accidentally delete brackets, which in turn keeps the support questions down about broken Clojure code. I have tried to make it super easy to disable these overrides. There's a command for it. There's a button in the toolbar for it, and there's a setting for it.

There's also a setting for removing all Paredit bindings, even those that are not overriding any default ones. (This setting is for people who use Paredit, but want to provide their own shortcuts entirely.)

Re:Try Clojure on Thursday May 23, 2024 @02:57AM (#40451377)
As a Clojure editor tool smith it pains me that this is the case. Especially for ClojureScript where I spend most of my time. I really want to fix this.

For JVM interop, I think Cursive (IntelliJ Clojure plugin) is smart enough to help with autocompleting Java libraries.

Thanks! Even though I am not super familiar with Ports & Adapters, this article made Polylith click in a way that no other article or video I've so far encountered has succeeded with. Composable mini-cores. Brilliant!
Re: on Saturday February 25, 2023 @05:38AM (#34935571)
I am a member of the Interactive Programming cult, being dogmatic around one thing in particular: I demand that programming is joyful, Else it is not for me.
Re:Clojure Turns 15 panel discussion video on Tuesday February 14, 2023 @09:35AM (#34789861)
Clojure changed my life. It made me realize how fun it is to code and switch back to being a programmer. This makes me a much happier person and thus a better husband and father. Never looking back. The Clojure Way just fits me perfectly.
Re:Learn Clojure with Shapes on Tuesday November 15, 2022 @03:03AM (#33606536)
Thanks for sharing this! It is a quite wonderful way to learn. Reminds me about Racket, which was my tool for following along the Land of LISP book.
Re: on Tuesday November 15, 2022 @02:58AM (#33606490)
I made a video about some of the benefits of using ClojureScript for developing VS Code Extensions. It's a short (9 minutes) demo of me hacking on an extension of mine, trying to relay what it is we Clojure peeps mean when we speak of Interactive Programming (aka REPL Driven Development). I find it super powerful when hacking on extensions, since restarting the Dev Extension Host can be pretty disruptive. And having to halt the program in the debugger to inspect it often does does not fit when searching for the cause of a problem.

This article on LISP interactivity inspired me: http://blog.fogus.me/2022/11/10/the-one-about-lisp-interacti...

Thanks! Please consider filing your suggestion as an idea on the Joyride discussions section: https://github.com/BetterThanTomorrow/joyride/discussions
Ah, so it's the editor war we are fighting here? =)
=)

Writing that made me challenge it. What if it is possible? https://github.com/BetterThanTomorrow/joyride/discussions/14

Which fine steak would that be?
It is definitely true that Joyride can't make VS Code as fully extensible as Emacs is. VS Code is not designed this way. And also some extensibility from an extension need to come from an extension manifest when an extension loads, so Joyride can't declare new commands for instance. I'm guessing that is the simplest thing in Emacs.

Having, draw a rendom number out of a hat, 50% of Emacs extensibility at your REPL is fantastic, and worth pursuing. Joyride can do everything a VS Code extension can do, except the things i mentioned above, and anyone who has used some VS Code extensions knows that that is a lot.

However, the self documenting part described above is not out of reach. Most of the code building up the VS Code API is open source. Same goes for many of the extensions. Looking up and navigating to any of that code is possible. Perhaps a lot of work would need to be put in, but it is possible.

Tbh, the last nights have been less about sleep and more about hacking on Joyride. =)

But usually I do get sleep. The question we should ask is if borkdude sleeps? He's doing about 100X as much as I do. Maybe there are hundreds of borkdudes.

As the co-creator here I'd like to add that Joyride is taking the very first baby steps here. We hope a lot of people want to try it and provide feedback to inform our next steps.

NB: The video has a target audience of people who know Clojure and its strengths. Especially how the REPL is used. I hope HN will see beyond the parens. =) It should make some sense anyway. Especially if you have some Emacs scripting experience, because that is where most of the inspiration to Joyride comes from.

Re:Be aware of NUMA when your application needs to run fast on Wednesday February 09, 2022 @08:50AM (#30272574)
Thanks Hacker News for helping me solve that mystery with performance in my Java program. Now I only have the problem left to solve. (And some of you might learn a thing or two about deployment of programs where performance is of utter importance.)
Re:Java BitSet performance-flicker mystery on Tuesday February 08, 2022 @04:08PM (#30264730)
Thanks! It does and it does not. Here's 100 rounds where it does: https://github.com/PEZ/ghost-chase-condition/tree/master/tes...

But in other cases I have it seems to not help that much. Not sure how to minimize those, but will try figure it out.

Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @06:49PM (#30238363)
I had this issue using JDK17 and 18 as well, so at least by default things are not better. =)

I wonder if there is a way that does not involve using `numactl`. It needs the container to run in privileged mode and that is not how the containers are run in the drag-racing benchmark...

Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @04:37PM (#30237268)
I can't bind cpu and memory different.

  $ numactl --hardware
    available: 1 nodes (0)
  node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  node 0 size: 15395 MB
  node 0 free: 2542 MB
  node distances:
  node   0 
    0:  10 


  $ numactl --cpunodebind=0 --membind=1 java PrimeSieve
  libnuma: Warning: node argument 1 is out of range
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @04:07PM (#30237005)
I love the detail with which you describe the experiments. Let's see what I get running this on my Linux box!
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @12:51PM (#30234927)
It was indeed this.
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @12:31PM (#30234696)
UPDATING again with that the solution is found, thanks to user CraigJPerry. The blog post is updated with some details: https://blog.agical.se/en/posts/java-bitset-performance-myst...
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @11:43AM (#30234141)
What is meant by that the runs are passed through a different core?
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @11:42AM (#30234131)
That's some pretty impressive results. Not seen the sieve perform on that level before.
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @11:41AM (#30234118)
No, I haven't seen this particular thing happening without Docker. It seems to be a NUMA issue, btw, see https://news.ycombinator.com/item?id=30231945
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @11:25AM (#30233963)
This seems to be the issue. Running it 10 times gives me quite consistent performance near the top.

    0 - Passes: 5876, count: 78498, Valid: true
    1 - Passes: 5870, count: 78498, Valid: true
    2 - Passes: 5944, count: 78498, Valid: true
    3 - Passes: 5903, count: 78498, Valid: true
    4 - Passes: 6051, count: 78498, Valid: true
    5 - Passes: 5874, count: 78498, Valid: true
    6 - Passes: 5902, count: 78498, Valid: true
    7 - Passes: 6041, count: 78498, Valid: true
    8 - Passes: 5906, count: 78498, Valid: true
    9 - Passes: 5889, count: 78498, Valid: true
Will run it 100 times now to lower the risk that this is just a coincidence.
Re:Java BitSet performance-flicker mystery on Sunday February 06, 2022 @08:26AM (#30232292)
Updating this to thank you all for this amazing help!

I've been mostly afk, and haven't been able to act on all the clues yet, but I have conducted some of the experiments and tried to summarize them in a reproducible way here: https://github.com/PEZ/ghost-chase-condition/tree/master/tes...

Older »