Hacker Newsnew | past | comments | ask | show | jobs | submit | more kjqgqkejbfefn's commentslogin

I've been using tacit programming intensively to the extent I get rid of most variables. I use both syntactic threading macros and functional combinators to achieve this. It is a double-edged sword in that it can make code as ugly as the original code it is trying to improve upon, but working without variables isn't that difficult nor does it lead me to intense clusterfucks. Composing lambdas contribute to this a lot more though.

As for making things clearer for everyone, well, this is code I work on solo (hobby), but I think providing example inputs as well as debugging macros can help a lot. Consider the following:

    (defn parse-it [dependencies]
      (pp->> dependencies
             str
             str/split-lines
             (keep (|| re-matches #"- (\d+(?:\.\d+)?) -> \[((?:\d+(?:\.\d+)?(?:, ?)?)+)\]"))
             (>>- (map-> (juxt-> second
                                 (->> third (re-seq #"(?:\d+(?:\.\d+)?)")))))))
    
    (parse-it (str "- 4 -> [1, 2, 3]\n"
                   "- 5 -> [4, 2]\n"
                   "- 6 -> [1, 2, 5]"))
    
    ;; The use of pp->> will lead to this getting printed
    ;; ->> dependencies                              : "- 4 -> [1, 2, 3]
    ;;                                                  - 5 -> [4, 2]
    ;;                                                  - 6 -> [1, 2, 5]"
    ;;     str/split-lines                           : ["- 4 -> [1, 2, 3]"
    ;;                                                  "- 5 -> [4, 2]"
    ;;                                                  "- 6 -> [1, 2, 5]"]
    ;;     (keep (|| re-matches #"- (\d+(?:\.\d+)... : (["- 4 -> [1, 2, 3]" "4" "1, 2, 3"]
    ;;                                                  ["- 5 -> [4, 2]" "5" "4, 2"]
    ;;                                                  ["- 6 -> [1, 2, 5]" "6" "1, 2, 5"])
    ;;     (>>- (map-> (juxt-> second (->> third ... : (("4" ("1" "2" "3"))
    ;;                                                  ("5" ("4" "2"))
    ;;                                                  ("6" ("1" "2" "5")))
In the end I think it doesn't really bring a lot, but it's especially useful in making short piece of code more readable:

    (->> [1 2 3 4]
         (map (when| odd? inc)))
    ;; vs
    (->> [1 2 3 4]
         (map (fn [x]
                (if (odd? x)
                  (inc x)
                  x))))
    ;; result (2 2 4 4)
Or this:

    (-> k-or-ks (when-not-> coll? list)
        (map-> ...do-something))
    ;;vs
    (let [ks (if (coll? k-or-ks)
               k-or-ks
               (list k-or-ks))]
      (map ...do-something
           ks))
Or even this:

    (-> 1 (juxtm-> :incd inc :decd dec))
    ;; vs
    (let [n    1]
      {:incd (inc n)
       :decd (dec n)})
Granted I have insane shits like this teleport arrow (very useful though):

    (-> '(1 2)
        (•- (conj (-• first dec)))) ;; => (0 1 2)
Or this >-args "fletching"

    (-> {:a 1 :b 2}
        (•- (-> (>-args (-> (/ (-> :a) (-> :b))))
                (->> (assoc (-•) :result))))) ;; => {:a 1, :b 2, :result 1/2}
I actually write this kind of stuff in my code ahahaha (the right move is to implement assoc-> of course hahahaha). Now there are combinators I wrote I never use, like departializers, unappliers, argument shifters, etc


Could you share the code for some of the custom threading macros you created? Looks very useful.


will do when I share with you the streaming string library I talked about on your discord. I use these arrows in every single namespace I write so this is already part of the plan.

Sometimes, the repetition of encounters is just as meaningful as the people we meet.

https://en.wikipedia.org/wiki/Small-world_network https://www.quantamagazine.org/new-proof-shows-that-expander... https://telecom-paris.hal.science/hal-03814119/document


>Ask Google Gemini to “make an image of a viking” and you’ll get black vikings. But it doesn’t work both ways. It has an explanation when challenged: “white Zulu warriors” would erase “the true historical identity” of black people.

https://twitter.com/ThuglasMac/status/1760287880054759594


There are plenty of issues like this in Lapce (no support beyond qwerty layout for instance). Just go for Zed instead.

https://github.com/lapce/lapce/issues/945#issuecomment-12853...


Isn't keyboard layout a function of the operating system? How is a usermode application supposed to support (or not support) different keyboard layouts?


How are they going to run Zed on Windows?


Do you have a list ?


I don't, I just seem to have this moment of "oh, him as well" regularly.

And I get it, I went to the valley as well for some times, the money is better, the taxes are lower, you get more opportunities, meet more talented people and projects are way cooler.


Indeed @0:15, the right leg goes to the left and vice versa.


Look at your own obsessive posts.

"what’s surprising is that physicists seem to be O.K. with not understanding the most important theory they have."

Sean Carroll (2019): https://www.nytimes.com/2019/09/07/opinion/sunday/quantum-ph...

I don't think the guy you are at war with deserves so much attention and energy on your part. Not only is the point he's making not that different from what I linked above, although I reckon he gave it an arrogant spin, but the way you react somehow vindicates the parallels he established between science and religion. Not sure how Q-Anon is related to all of this.


Maybe try asking your questions on phind.com. It does RAG on top of GPT4 so it might be able to base its answers on the paper or github issue you mentioned.


>doesn't invalidate the appearance that the fundamental constants of the universe were fine tuned for the production of complexity/life.

I think it's the other way around, it's because we are complex reasoning forms of life that we must observe fine tuning of physical constants, necessary for the emergence of complexity.

See: https://en.wikipedia.org/wiki/Anthropic_Bias

I also came up with my own variation of the anthropic principle:

- 1. Extend the anthropic principle beyond physical connstant. Include factors such as the goldilock zone from planetology, the symbiogenetic origin of eukaryotic cells, the presence of the moon, etc ...

- 2. Rethink the "anthropic situation" as a collection of coincidences. It doesn't directly "select for" observers, but for the right coincidences that allow them to exists.

Two paths open for us from here:

- 3.1. Either God (or whatever phenomenon can explain the presence of the right coincidences) exists and we were dealt with the right set of coincidences.

- 3.2. Or alternatively, this collection of coincidences was built up by a random sampling process. If this is the case, then we should expect this collection to contain *superfluous* coincidences that have no impact on the existence of observers. Imagine you lost the key to your house and someone cuts a key at random from a bit of metal, which luckily turns out to unlock your door. This key has more chances to feature superfluous, redundant notches, than to be an exact copy of the original key.

----

This brings a counterpoint to the cognitive perspective on pattern recognition and could be used to challenge or refine our understanding of why we perceive certain phenomena as 'coincidences' (for instance why the Moon/Sun ratios are the same for both their diameters and distances to the Earth, which allows us to observe quasi-perfect eclipses). This superfluous anthropic principle, in this case, suggests that these perceived coincidences might have an actual basis in the physical properties and probabilistic events of the universe. In other words, it is because God doesn't exist that we can see 'meaningful' coincidences "hinting" at its existence (from the perspective of magical thought).


>He was once swatted four times in one day.


>But his wife Julie said: 'I am absolutely sick to death at the sight of a matchstick but I think there is still more to come unfortunately.

>'But at least I know where he is and what he's doing, so I'd rather have him there than down the pub.'


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: