HNHacker News
TopNewBestAskShowJobs

graboid

131 karma · joined May 23, 2022

submissionscomments
graboid··on GPT-4
I mean, if it is a genuinely good book, I don't care about authorship. Death of the author etc.

"I want <my favorite novel> rewritten in the style of <favorite author> but please focus more on <interesting theme>." I see so many possibilities. Passionate readers could become more like curators, sharing interesting prompts and creations.

Because someone mentioned Kafka: I'd like to know what Kafka's The Trial written in the style of a PKD novel would be like.

graboid··on GPT-4
Do you think this will be enough context to allow the model to generate novel-length, coherent stories?

I expect you could summarize the preceding, already generated story within that context, and then just prompt for the next chapter, until you reach a desired length. Just speculating here.

The one thing I truly cannot wait for is LLM's reaching the ability to generate (prose) books.

graboid··on Ask HN: What software are you dogfooding?
I have a Markdown note-taking app. Written in Rust+Javascript (Tauri + Preact). I took some inspiration from Obsidian, and added the stuff I most want/need (but of course it has much less features overall, Obsidian is a pretty nice piece of software).

I keep adding features or improving the code on a weekly basis. It can read .md and .pdf files, has a canvas-like feature where you can freely arrange folders, pdf and md files and work with them.

I also implemented Anki's SM2 SRS algo for it, so I can write question-answer pairs inside my notes and study them inside the app. I use the app on a daily basis for all my notes and studying.

graboid··on Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)
Does anyone know of any guide/tutorials/books about how to avoid common Rust performance issues. Like real world examples, "instead of doing X, do Y". I am maybe beginner to intermediate in Rust, but I think I'm still very susceptible to those things.
graboid··on The Hundred-Year Programming Language
I am curious, why do you think C# is less general-purpose than Java?
graboid··on Over the past 21 months I’ve written a code editor from the ground up
Is developing a software "from scratch" defined somewhere?

Seems like you arbitrarily draw the line. rustc but not cargo?

Even if you don't use any libraries, cargo is a useful tool. And if you reject tools, what editor/IDE would you code in?

graboid··on Over the past 21 months I’ve written a code editor from the ground up
Very cool project! The AST mode is super interesting. I also code an editor, and using it from the beginning is really the key.
graboid··on Practical Scheme
Never used any Scheme, so I wanted to make sure I interpret that site correctly.

It provides packages written in any Scheme, which you can use from any other Scheme (which works because they follow the same specification (R6RS/R7RS))?

That's pretty cool.

graboid··on What server-side language/framework do you recommend for toy projects in 2023?
That is very difficult to answer without knowing more of your programming background: what languages are you familiar with, and would you be willing to learn a new language?

I have used web frameworks in Java, C# and Rust, and if I had time and a use-case, I would learn https://www.phoenixframework.org/. I saw it mentioned a lot and people who use it seem extremely happy.

graboid··on Emacs Is Not Enough
I an curious about the CL part. Can you elaborate why the REPL input and output should be in different buffers?
graboid··on Memory loss: Expert advice for improving memory and concentration
Anyone here that uses a strategy like Memory Palaces (also sometimes called "Method of Loci" I think)?

I would be especially interested in whether people apply this technique to stuff different from memorizing lists/sequences.

graboid··on Ask HN: Htmx or SPA
Since you mentioned little interaction and reactiveness, I would say go for htmx. At work, we have a large MPA in ASP.NET. If a page is simple enough, it is done in Htmx. If it requires lots of interactivity, we use Vue. But I tend to push the boundary on what counts as enough interactivity to warrant the use of Vue very far, and I prefer to do most stuff in htmx these days.
graboid··on Ask HN: What programming languages are you excited about?
Common Lisp, because that's what I am learning right now.

Rust, because I finally made it from beginner to intermediate level (at least I think).

https://flix.dev/ looks very cool.

Also, recently someone posted this here on HN: https://github.com/coalton-lang/coalton

It's a statically-typed, functional language embedded in Lisp, with many of the FP goodies.

graboid··on Coalton is an efficient, statically typed functional programming language
So this is just a macro? That is really amazing.
graboid··on JavaScript hydration is a workaround, not a solution
Yes, no hyperscript, and yes, all interactive actions do a roundtrip.

I tried not to get too detailed with the updates, so e.g. when you are in the filter builder dialog, and change the value of a select (and now the other selects have to change their data accordingly), the whole dialog is fetched again from server, instead of just the other selects. I felt that, while more selectively updating the UI would be more performant (htmx has to switch out less elements and the request payload is smaller), I don't want to cluster up my server with lots of small endpoints that return bits of HTML. All in all it was like 10 new endpoints returning HTML for that site, which was okay in my book. Could probably have been less if I had been more clever.

What I learned was to really pay more attention to make my HTML "leaner" than normal, because I noticed that if I don't pay attention to that, payloads can get big quite faster than when using JSON.

graboid··on JavaScript hydration is a workaround, not a solution
I just had to do a site which involved a fair amount of interactivity. A sidebar with different types of filters, a search bar at the top, and a complex boolean filter builder inside a modal (think like infinitely-nestable AND/OR filters, where each filter involved 5 dropdowns interacting with each other). Then some area to collect the results and do some operations on them. I was feeling brave and decided to skip Vue which we otherwise use for complex UIs and do the whole page with HTMX and nothing else. And it worked.

It took me longer, thats for sure, but also because I had to get a feeling for how to approach many things I would have just routinely plumbed together with Vue. And the feeling at the end was really satisfying, a fast-loading, complex interactive page, powered by ~10kb of Javascript, with all filtering logic, validation etc. completely server-side (we use ASP.net). And I have confidence it will work exactly as it is years from now. With our Javascript tooling, I expect things to break by that time.

That said, I certainly pushed the library in parts, and the vote is still out on how easy it will be to understand the flow of interaction if some time has passed.

graboid··on Choose a Programming Language and Stick with It
I think nobody would term it as being "revolutionized". But like many others, I would definitely say that I improved and became a more knowledgeable programmer by learning languages that were different enough from what I am used to writing. Even if I ended up not using them.

Also I find the article's assumption weird that people pick up new languages just because they want to do a new project they feel the language would fit better with. In my experience that applies more to frameworks/technologies, but not to languages.

graboid··on Ask HN: Any tips for staying focused on side projects?
I keep really fine-grained and extensive todo lists. I helps staying motivated if you can just pick something small, do it in 10-30mins, and while checking your todo item, you get the satisfying feeling that your project just got a tiny bit better/a tiny step closer to completion. This works for me even on days in which I don't have much energy or time to spare.

Also, try to not let your project rest for too long, even if you just do the above-mentioned baby steps. I found that the longer I am out of it, the harder it is to bring back the motivation.

graboid··on Ask HN: What is something you built but never marketed?
Nicely done! I love the design. And now I learned about the Tenkile in Papua New Guinea :-).
graboid··on Ask HN: What is something you built but never marketed?
I would be super interested to see it.

The aspect of text adventures or MUDs [0] that attracts me the most is the fact that you can actually move through a "textual landscape". Sorry, I have no better words to express it. Ditch all the quests and puzzles and fighting. Just immerse myself in a landscape evoked by words, that maybe adds some surreal elements, or other stuff that you couldn't express in a graphical way.

[1] https://en.wikipedia.org/wiki/MUD

graboid··on Tauri – Creating Tiny Desktop Apps With React/Vue
I am using Tauri + Preact [0] for a private project. It's wonderful. With Preact + htm [1], I can have a really complex UI, that still feels snappy, without having to deal with webpack or any other build pipeline (after all, it is a hobby project and therefore should spark joy).

The backend is entirely written in Rust.

I did some electron apps before, and I have to say, Tauri really feels snappier.

[0] https://preactjs.com/

[1] https://github.com/developit/htm

graboid··on Ask HN: One curved monitor vs. 2 or 3 non-curved for software development
I mostly only use one 27", which is not curved. I am fine with only using one as I don't like to constantly turn my head. As for the size, I have never used a larger screen, so I cannot tell if I would like that better or not. I don't even use virtual desktops that often, I am just constantly switching opened windows with alt+tab and very fast with that.
graboid··on Htmx – high power tools for HTML
I is really well-suited for a broad range of scenarios where your needs are somewhere between a fully static page and a really complex web app. Although you theoretically can also do the latter, it will get painful very soon, and in that case, my advice would be to combine it with Alpine.js [0]. It can bring some client-side interactivity to your UI and pairs really well with htmx. Recently, someone described their experience using these two here: https://news.ycombinator.com/item?id=29319034

[0]: https://alpinejs.dev/

graboid··on The Case for C# and .NET
Its funny, after considering Blazor serverside and WASM, I also opted for HTMX + Alpine.js (when needed) + ViewComponents. Considering how nice server-side rendering story is in ASP.NET, I feel like this is a setup that really works well in a lot of situations, from low-interactivity pages to really complex UIs. It is lightweight on the client side (just load the small htmx and alpine scripts), lets me do much of rendering server-side in .cshtml views, and which needs no JS build pipeline of any kind.
graboid··on The Case for C# and .NET
> Blazor is in development and will only get better.

How good can it get though? Blazor WASM suffers from the huge initial, multi-megabyte download of the .NET runtime. How is that expected to come down to something in the range of 50-500kb what we have with most JS frameworks now? I just cannot do that on public-facing parts of an application. It is unusable when accessed from a slow mobile network. Company-internal stuff sure, who cares.

I really wanted to love Blazor, and evaluated replacing some of the complex frontend UIs at work which are a JS nightmare with either Blazor Serverside or WASM. But serverside seems like an afterthought to me. I recently learned about Phoenix Liveview here on HN, and according to what I read, it seems like a much better option if you want that server-side rendering stream model. With Blazor-server, I get the feeling it is only a makeshift-solution until WASM takes off, and that makes me even more reluctant to use it.

graboid··on Ask HN: What is a sustainable methodology for taking notes of your learning?
In recent years, many tools have been created in the note-taking space. They often market themselves as something like "personal knowledge management tools", "Zettelkasten" or "second brain". There are just so many solutions now (and it seems like every week someone develops a new one). I keep a list where I note down solutions I see mentioned. In case you are still in search of a tool, here is a short extract containing some of the more popular tools from my note:

  Obsidian, logseq, roam, foam, org mode, notion, remnote, evernote, dendron, zettlr, tiddlywiki, joplin, devonthink, thebrain, heptabase, scrintal, ...
Now I don't know what you are referring to with "sustainable", if you mean finding a note-taking workflow that is easy to keep up for you, then of course that highly depends on your personal needs (method of input, type of content, multi-platform requirements etc.).

My advice would be:

1. pick something that works outside the browser

2. pick something that you can sync, and that has a mobile solution for quick notes on-the-go

3. pick something that works on a "future-proof" plain-text format, e.g. .txt files or .md

4. some tools offer spaced repetition integration, either as core functionality, as plugin, or by syncing to a dedicated SRS app like Anki. If you find a way to frictionlessly create SR cards in your notes, that can be a nice way of keeping some knowledge "cached"

5. keep it simple in general, don't rely too much on specific tools or workflows. they will all cease to work/go out of business at some point.

6. If you are going with any solution that operates on a local folder of .md/.txt/.org files, a nice goodie is that you can actually version your notes with git.

graboid··on Roguelike Tutorial in Rust (2019)
Holy cow, that's amazing. And it is so extensive. Thanks a lot for the link.
graboid··on Ask HN: What's is your go to toolset for simple front end development?
This is really cool and makes me want to learn Elixir.

Staying in one language for frontend and backend is just so appealing. To my knowledge, the other option to achieve that would be having something like Blazor WASM or Rust Yew that compiles to WebAssembly to have a client-side app a la React/Vue/Svelte.

I wonder which of these approaches will end up be more prevalent in the future. To me it seems like compiling something React-like to WASM might be more attractive, because you can stay in your backend language, but ditch the permanent websocket connection.

graboid··on Ask HN: What's is your go to toolset for simple front end development?
Preact [0] + htm [1]

Why? Preact is small, fast, and reasonably easy to use. But the main selling point for me was that, together with htm, I don't need any build system a la webpack. No node_modules folder. I just have to load one script (preact + htm bundled), define my components in plain javascript files and import them. Bliss for me.

[0] https://preactjs.com/

[1] https://github.com/developit/htm

Edit: Just read that you want drag & drop style UI building, so this might not be for you.

graboid··on Show HN: The Amalgam Engine – Easily create isometric virtual worlds
Nice work! I like this isometric perspective, it is so simple yet looks so good. I like also that I can understand and implement its rendering without knowing much about computer graphics. I don't have time to test it out myself right now, but as a suggestion, maybe you could include some more picture in the repository description (I would be especially interested in the sprite editor).
← PreviousPage 3 of 4Next →