Better HN
topnewbestaskshowjobs
Log inSign up

phforms

644 karma · joined Apr 29, 2022 (4y ago) · 152 submissions

Submissions

comment 12mo ago · link · parent

Maybe the structure and operation in LLMs is a somewhat accurate model of the structure and operation of our brains and maybe the actual representation of “thought” is different between the human brain and LLMs. Then it might be the case that what makes the LLM “feel human” depends not so much on the actual thinking stuff but how that stuff is related and how this process of thought unfolds.

I personally believe that our thinking is fundamentally grounded/embodied in abstract/generalized representations of our actions and experiences. These representations are diagrammatic in nature, because only diagrams allow us to act on general objects in (almost) the same way to how we act on real-world objects. With “diagrams” I mean not necessarily visual or static artefacts, they can be much more elusive, kinaesthetic and dynamic. Sometimes I am conscious of them when I think, sometimes they are more “hidden” underneath a symbolic/language layer.

comment 12mo ago · link · parent

In the past few years I have seen some serious efforts from the Clojure community to make Clojure more attractive for data science. Check out the Scicloj[1] group and their data science stack/toolkit Noj[2] (still in beta) as well as the high-performance tabular data processing library tech.ml.dataset (TMD)[3].

- [1] https://scicloj.github.io

- [2] https://scicloj.github.io/noj

- [3] https://github.com/techascent/tech.ml.dataset

comment 1y ago · link · parent

You might have forgotten the language but I bet it must have had some influence on how you think or write programs today. I don’t think the value of learning Prolog is necessarily that you can then write programs in Prolog, but that it shifts your perspective and adds another dimension to how you approach problems. At least this is what it has done for me and I find that still valuable today.

comment 1y ago · link · parent

It is unfortunate, but I can absolutely understand it. Keeping up such open-ended, time-consuming projects year after year while the person doing it changes inevitably – their personal life, habits, job, interests, etc. – must feel like a burden at some point, even if it is out of love and passion (I know that from personal experience with my voluntary work, from which I had to take a break after 10+ years).

I am truly thankful for all of Eric Wastls work on Advent of Code, no matter how much time he can invest and how much puzzles we get. I already look forward to the challenge at the start of autumn and consider what programming language I will choose (this year it’ll be Uiua :)). I am very slow at these puzzles, so I mostly quit at around puzzle 12 anyway, but I learn so much from them and they are a lot of fun.

comment 1y ago · link · parent

As an autodidact who never learned this stuff at school/uni, his lectures are what made linear algebra really click for me. I can only recommend them to anyone who wants to get a visual intuition on the fundamentals of LA.

What also helped me as a visual learner was to program/setup tiny experiments in Processing[1] and GeoGebra Classic[2].

- [1] https://processing.org - [2] https://www.geogebra.org/classic

comment 1y ago · link · parent

Years ago when I was reading this (just a couple of chapters, not all of it), it opened my eyes to the power of diagrammatic representation in formal reasoning unlike anything before. I never did anything useful with string diagrams, but it was so fun to see what is possible with this system!

comment 1y ago · link · parent

Okay, I can see the issue now, maybe I haven’t really used dired intensely enough for it to bother me. I just tried your snippet and having the cursor remain on the dired buffer for a quick preview is a feature I didn’t know I needed. Thanks for sharing!

comment 1y ago · link · parent

I guess you already know the command `dired-find-file-other-window` (bound to `o` by default), which reuses the right split window, if already there and opens a new window if there is none. Horizontal splits do not seem to be reused though (they often don’t have enough vertical space for dired anyway, which is why I guess they designed it this way).

comment 1y ago · link · parent

Processing is what ignited my passion for programming and Quil has become my favorite way of writing it. It is amazing that you can re-evaluate the draw/update function in a running sketch and immediately see the changes, without having to reload the whole thing. And on top of it you have the beauty of the whole Clojure Stdlib with its immutable datastructures.

I just learned that there is now a tweak mode in Processing that lets you tweak certain parameters in the code (via draggable values, etc.) while the sketch is running, which is pretty awesome for experimenting with values. However, you still have to reload the whole sketch when you want to change other parts of the code, you can’t just eval a function in the editor and get immediate feedback like in Quil.

comment 1y ago · link · parent

I am not sure if this is what you mean, but the original UCBLogo (which I think is used in the Turtle Geometry book) is still alive and maintained[1] (not by the original authors, but Brian Harvey seems to chime in every now and then) and it does run well on modern computers.

Now that I think about it, Logo seems to be pretty much a livecoding environment (not surprising given that it is a Lisp, but with less parentheses). You can define and edit functions from the REPL while the program continues with the same state, the same canvas. You can even pause e.g. a running procedure that draws a polygon, rotate and move the turtle and then continue the polygon procedure with that new state (at least this is possible with UCBLogo).

[1]: https://github.com/jrincayc/ucblogo-code

comment 1y ago · link · parent

My Emacs wouldn’t be the same without Prots modus themes[1], which I found to be a great foundation to build my own theme on top of. I am grateful for all the work he did for the Emacs community.

I also enjoy watching his videos where he talks about various philosophical topics from a very clear, pragmatic and down-to-earth perspective. My impression is that he is a really kind and humble person and that he lives by his philosophical insights, without bragging about his lifestyle or judging about how other people live their lifes.

[1]: https://protesilaos.com/emacs/modus-themes

comment 1y ago · link · parent

I like using LLMs more as coding assistents than have them write the actual code. When I am thinking through problems of code organization, API design, naming things, performance optimization, etc., I found that Claude 3.7 often gives me great suggestions, points me in the right direction and helps me to weigh up pros and cons of different approaches.

Sometimes I have it write functions that are very boilerplate to save time, but I mostly like to use it as a tool to think through problems, among other tools like writing in a notebook or drawing diagrams. I enjoy programming too much that I’d want an AI to do it all for me (it also helps that I don’t do it as a job though).

comment 1y ago · link · parent

I’ve been considering Parinfer, but my issue was that it is a bit unpredictable where parens end up and I have to be careful to not mess up my code structure. Maybe I should give it another try for a longer time period.

My favourite structural editing tool for about a year now is symex[1], which is an Emacs package (and unfortunately not that well known compared to paredit, lispy, etc.). It takes some getting used to at first but after a while you only move around and think in terms of s-expressions, you don’t even see parentheses anymore. It really feels like you are a squirrel climbing trees (hence the image on the repo, I guess). I just hope the dev(s) will be able to get rid of the heavy dependencies on other packages soon.

[1]: https://github.com/drym-org/symex.el/

comment 1y ago · link · parent

Apparently, it is set to false by default in Zen Browser. In my Firefox it was still true.

comment 1y ago · link · parent

I believe convenience and actually wanting to give something back to the creators would have many people pay for pro features, since it’s actually “Pay once, use for life”, which is a rare and welcome sight in this subscription-flooded world. And it still leaves people with low income the option to (legally?) circumvent payment. Not sure how sustainable this is as a business model, but I think it’s pretty nice compared to being forced into continuous payment.

comment 1y ago · link · parent

It seems like they borrowed heavily from Notion, Obsidian and RemNote, as far as I can tell (wouldn’t call it a knock-off though, since there are sooo many apps in this space that you don’t really know who came up with what anymore). But the app doesn’t feel janky to me at first glance, it definitely feels more responsive than Notion and less “slippy” than RemNote. Although it is quite noisy with all the tooltips popping up immediately.

My first impression is that they really wanted to include everything (even RemNote-like spaced-repetition flashcards, Notion-like Databases and of course there has to be AI too) and it seems like they did a pretty decent job at that. I also appreciate that there are so many export options, even for Org-Mode (preserving internal links, images, code-blocks, etc.).

I like that it provides a solid, feature-rich alternative to all the cloud-first, closed-source apps in this space. But it may be too distracting/overwhelming for my use-cases with all the advanced layout capabilities and features though. Tana is a similar all-in-one solution that is really well done (and more innovative than this one), but I always seem to gravitate toward more focussed apps.

comment 2y ago · link · parent

Good idea to update the radio targets along with the wrapping. Also, I didn’t know `insert-pair` exists, could have saved me some typing. :)

comment 2y ago · link · parent

To quickly link to bullet points, just use [[*My bullet point]] (if you omit the *, it may still work but Org also finds non-heading elements like table names with the same text).

Personally, I like to create custom ids for bullet points so that I can easily change the text in the bullet point later without breaking my links:

  * My bullet point
  :PROPERTIES:
  :CUSTOM_ID: foo
  :END:
This is easier with C-c C-x p (org-set-property).

Elsewhere, I can just write [[#foo]] to create a link to that bullet.

comment 2y ago · link · parent

I couldn’t find the command you mentioned “org-insert-radio-target-brackets” in my Emacs and it doesn’t appear to be in the manual[1] either. But of course it is very trivial to write, in case anyone else needs this:

  (defun org-insert-radio-target-brackets (start end)
    "Wraps a region with angular brackets to create a radio target."
    (interactive "r")
    (save-excursion
      (goto-char end)
      (insert ">>>")
      (goto-char start)
      (insert "<<<")))

  (keymap-set org-mode-map "C-c n r" #'org-insert-radio-target-brackets)

[1]: https://orgmode.org/manual/Radio-Targets.html

comment 2y ago · link · parent

Clojure developers also often make use of single-letter variable names, following conventions in `clojure.core`: https://guide.clojure.style/#idiomatic-names

My rule of thumb is to only use short names in the local scope of a function and have them follow conventions within the language community. Constrained like this, I see no harm in using them, since their meaning is clear within the context of their usage and there is usually no need to search for them. Of course, if the variable has a more specific meaning, I choose a more specific name.

comment 2y ago · link · parent

In case anyone finds this who is also interested: I just stumbled upon an implementation of shadcn/ui components with css modules that looks pretty solid: https://github.com/qwalker8408/shadcn-css/tree/main

Hopefully something like this will be made official - at least there is some discussion going on in the shadcn/ui repo: https://github.com/shadcn-ui/ui/discussions/2832

comment 2y ago · link · parent

I love the approach of shadcn and the fact that they use Radix primitives, which have a focus on accessibility. But I wish they would have a pure CSS option without tailwind style classes. It took me some time to translate the classes shadcn uses from tailwind to CSS (which sometimes require more research) and the variables for colors, sizes, etc. into the CSS-to-js system I use (which is stitches - yes, its deprecated, but still the best one I know).

Tailwind is nice for prototyping and simple projects, but often I find that it obscures things too much and when I need more control over the CSS it is too abstract and awkward to use.

comment 2y ago · link · parent

I second that. One of my favourite things to do when I’m bored is to flip through the INFO manuals and see what functionality of Emacs (or some of the often equally-well documented packages) I haven’t explored yet. It is so pleasent to navigate them from within Emacs once you get used to the info mode keybindings.

In general, I like how it is easy to access any kind of information about Emacs (keybindings, commands, variable values, active modes, text/face styles, etc.) from anywhere within Emacs through the C-h shortcuts or via “Help” in the menubar. Contrast that with what is usually offered as “Help” in most other applications and how hard it is to find just some basic piece of information.

comment 2y ago · link · parent

Would also love to see v2 finally get released, since I'm a big fan of Berkeley Mono and would like more weights and widths to make my Emacs look nicer.

From their update in february[1] this year it seems like it is basically complete but personal things got in the way and maybe they struggle to set up the systems for custom builds, ecommerce, etc. to ship it. People are constantly asking for the release, so I think it will eventually arrive, but good things often take longer than expected. :)

[1]: https://x.com/usgraphics/status/1762128387483824160

comment 2y ago · link · parent

As an aside for Clojure users, there is a nice “declarative, functional and extensible” wrapper for JavaFX called cljfx[1] that has been around for some years now. When I tried it last time to prototype a desktop app, I found it really pleasent and simple to work with, it felt like a more modern way to build JavaFX GUIs.

[1]: https://github.com/cljfx/cljfx

comment 2y ago · link · parent

Without any solutions or even problems to begin with and without having a teacher by your side, I found that LLMs can be a good-enough learning assistant. Of course, you cannot rely on their answers and they sometimes lead you astray, but what works for me is to:

- throughout the text, use the LLM to ask questions, generate problems (I haven’t tried this yet, so it might not work very well) and give you hints on how to close the gaps in your understanding

- reduce a given problem to the simplest possible case and ask how to solve that (if you want to check if your solution seems plausible) or if it can give you hints on how to approach the problem (when you are stuck)

- vary the problem description to see if different approaches are suggested

- critically ask questions about the (steps to the) solution or any provided hints (does something seem odd or logically inconsistent?)

- other LLMs sometimes give you better answers (or contradict each other), so, if possible, try asking different LLMs the same questions

Having this “conversation” with the LLM where you need to critically check everything it says has the added benefit of being more actively engaged with the material as opposed to simply looking up the solution. It may be a huge waste of time if you’re not careful, but I think if you use it intelligently to guide your own thinking, it can be very helpful.

comment 2y ago · link · parent

As an autodidact without an “official” CS degree, discrete Mathematics seemed to me like a key area to open up more advanced topics and solve many practical problems in programming. And indeed it helped me on many such occasions (although I am still studying).

I really like the book “A Primer of Discrete Mathematics”[1] by Finkbeiner II and Lindstrom from 1987. It’s a bit old and unfortunately not free but still holds up pretty well and has many good exercises with selected answers.

I will absolutely check out this book though, looks like a more modern approach with interactive exercises and it even is completely free!

[1]: https://archive.org/details/isbn_0716718154

comment 2y ago · link · parent

I was trying out Arc and almost forgot about it, but now knowing about this feature changes everything, thanks for pointing it out! Very often I need to see two or more pages side by side and I just hate making a mess in my browser with multiple windows open. They just tend to get lost and I have to move them out of the way or close them one by one, it is just annoying.

You can even have more than two splits, which I did not expect. Also, holding the option/alt key when clicking on a link opens it in a new split which is super convenient.

comment 2y ago · link · parent

I think you can get away without learning grids, but flexbox is a must - given its convenience over the old “float-hacks” and its omnipresence in modern CSS.

Besides the already mentioned css-tricks articles, I recommend checking out the guide to flexbox from mdn[1] (in the side menu there is also one for grids) as well as the reference to “CSS flexible box layout”[2]. These helped me get a deeper understanding about the concepts behind flexbox and how the properties and their shorthands actually work.

[1]: https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layou...

[2]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexibl...

comment 2y ago · link · parent

I am also a big fan of hydras, but I use them more for workflow things like window movement, editing org tables or quicker navigation in org headings/trees and it complements my keybinding system in `meow`[1] (similar to Evil or the Kakoune/Helix text editing scheme).

[1]: https://github.com/meow-edit/meow

123456