HN user

tincholio

1,046 karma
Posts3
Comments635
View on HN

My take on this is that when outsourcing the code writing, you miss out on building a mental model of how it works that you do develop when doing it yourself. The degree to which that is a problem is probably variable, I suppose.

Jeena's Hyprland Demo 11 months ago

I've been experimenting with this (it's in Babashka, which is for scripting Clojure, but you can do it with just bash, if your bash-fu is stronger than mine :D ):

    #!/bin/env bb
    
    (ns switch
      (:require [clojure.java.shell :as sh]
                [babashka.process :refer [pipeline pb shell process]]
                [clojure.string :as str]))
    
    (def workspace-ids
      (-> (pipeline (pb "hyprctl workspaces")
                    (pb "grep 'workspace ID'")
                    (pb "awk '{print $3}'"))
          last
          :out
          slurp
          (str/split #"\n")
          (->> (reduce (fn[acc e]
                         (try (let [ee (Integer/parseInt e)]
                                (conj acc ee))
                              (catch Exception e acc))) [])
               (filter #(and (pos? %)
                             (not= 10 %))))))
    
    
    
    (doseq [w workspace-ids]
      (-> (process (str "hyprctl dispatch moveworkspacetomonitor " w " 1"))
          deref
          :exit
          println))
    
    (process "hyprctl dispatch workspace 8")

It basically just moves all workspaces with positive IDs (so not the special workspace) to the external monitor, which seems to have a consistent ID of 1.
Jeena's Hyprland Demo 11 months ago

I have been having some issues with X/i3 (using i3 as a WM for Plasma), mostly with multiple screen setups (windows getting all screwy when connecting/disconnecting, lots of flickering, etc.), and also with my trackpoint's middle button scrolling randomly going away, and needing to use xinput incantations to fix it. I tried Hyprland with QuickShell, and after some QS-related pains, I just dropped to plain Hyprland. It's been working quite nicely so far. There was a lot of trial and error, and there's still some bits that could use improvement, but overall things just work nicely. The main sticking point for me now is that the screen-sharing and using Flameshot is a bit convoluted, and that the workspaces configuration does not support multiple external monitors (as in, the one in my office, and the one home, it needs some resetting each time I change those, or at least I haven't found the way to configure it properly as I had on i3).

So far, it has been a moderately positive change.

the ones that like to think everything up-front before doing anything.

I don't think that's the case. If they were really thinking up-front, they'd be doing proper req analysis and design work, rather than interactively growing a ball of mud that "does the minimal thing to pass a test". To me, it seems like TDD is sold as this "foolproof" design / dev approach, which is anything but.

Not the parent poster, but I suspect he's thinking of stuff like Lighttable, or Liquid. Editors that were written in Clojure, or specifically for Clojure, and had cool features that were not available elsewhere at the time. (I'm boring myself, and pretty much only ever used Emacs with Cider)

Mixing can work pretty well. I'm using Plasma with i3 as a WM, and it hits the perfect spot for me. Not sure if the same thing can be done on Wayland, though?

Nil punning in Clojure gives you that kind of experience, for example. Things that would break in other languages, just "work as you'd expect them" in Clojure (except when you drop down to host primitives, and then nils don't behave nicely anymore). In general, it makes for a really pleasant dev experience, I find.

I've also used it fairly extensively, both in academia and in industry jobs (using Emacs org-mode, with several target languages, often combined). I found it very useful when thinking through a problem, and as documentation for myself later on. At some point it starts to become a bit unwieldy. Nowadays, most of my work is in Clojure, and I find that the literate workflow gets in the way of REPL-driven development, so I haven't been using it as much lately.

Overall, I'd highly recommend it.