HNHacker News
TopNewBestAskShowJobs

tmtvl

3,829 karma · joined September 11, 2022

Mantis fist practitioner living in Belgium. Daily driving GNU/Linux since 2012. Interested in C, Scheme, Lisp, Perl, and Java.

Reach me at tmt_vdl@gmx.com.

submissionscomments
tmtvl··on Show HN: I wrote a C++ ray tracer from scratch without AI
'Have you considered rewriting it without AI' seems like something I could see myself saying.
tmtvl··on Lisp's Influence on Ruby
Have you checked out dieggsy's Whisper (<https://sr.ht/~dieggsy/whisper/>) yet? It's based on Arne Bab's Wisp (SRFI 119).
tmtvl··on Lisp's Influence on Ruby
It could just be written like:

  (~> orders
    (filter (lambda (order)
              (timestamp> (order-date order)
                          (timestamp- (now) 7 :days))))
    (group-by #'order-customer-id)
    (mapcar (lambda (group)
              (reduce #'+ group :key #'order-total)))
But I prefer the typical Lisp code where I get the sums of the totals of the orders with the same customer ID which were placed in the past week, instead of the orders made the past week grouped by customer ID their totals summed together.
tmtvl··on Swiss voters reject proposal to cap population at ten million
I think what GP means is 'attack those companies for not paying decent wages', not 'attack those companies for hiring immigrants'.
tmtvl··on Arch Linux Now Believes Malware Incident Under Control: More Than 1,500 Packages
I'd expect no more than a fraction of a percent of Arch users compile the kernel and userland from scratch.

Gentoo may not have the highest percentage of users who compile from source because there's binary packages available now. Maybe Exherbo, Source Mage, or Lunar may have the highest percentage outside of LFS.

tmtvl··on Leaving Mozilla
Of all the forks I think Waterfox is the one with the strongest case that they can continue on even if they have to fully decouple from Mozilla Firefox.
tmtvl··on Mouseless – keyboard-driven control of macOS/Linux/Windows
Have you tried Ratpoison? It's got a bunch of features to manipulate the rat with the keyboard.
tmtvl··on Stop Killing Games
Just yesterday when I saw the Leonhart French video about the NVIDIA piracy case.
tmtvl··on Preparing for KDE Plasma's Last X11-Supported Release
I only used it on bare metal, worked fine.
tmtvl··on Preparing for KDE Plasma's Last X11-Supported Release
Have you tried LXQt? It made things easy for me when Plasma 6 broke a KWin script I was using to improve the multihead experience.
tmtvl··on My thoughts after using Clojure for about a month
I don't recall the exact name, but I believe it's forward-up-sexp which allows you to jump forward past the next closing delimiter. Though if I'm not mistaken only the backwards one has a default binding.
tmtvl··on Gmail thinks I'm stupid, so I left
And yet Heineken had a €23 billion revenue in 2019.
tmtvl··on Preparing for KDE Plasma's Last X11-Supported Release
As someone who likes games from various periods (from Ultima IV to WH40K: Rogue Trader), I haven't ran into many games which do work on X11 and don't work on Wayland. Though I don't really have any of the old Loki games (I believe there was a port of Unreal Tournament?), so I might be missing out on the specific games which really lean into certain X11 features which XWayland doesn't support well.
tmtvl··on Why Janet? (2023)
> If there's one thing that I sometimes wish Lisp had, it's types.

Let's write some very silly code to turn an integer into a list of digits in Common Lisp:

  (deftype Digit ()
    "A non-negative integer smaller than 10."
    '(Mod 10))

  (defun integer->digits (integer)
    "Turns a given INTEGER into a list of digits."
    (declare (type Integer integer))
    (labels ((digit-loop (integer digits)
                (declare (type Integer integer)
                         (type List digits))
                (if (< integer 10)
                    (list* integer digits)
                    (multiple-value-bind (quotient remainder)
                        (truncate integer 10)
                      (declare (type Integer quotient)
                               (type Digit remainder))
                      (digit-loop quotient
                                  (list* remainder digits))))))
      (declare (ftype (Function (Integer List) List) digit-loop))
      (digit-loop (abs integer)
                  nil)))

  (digit-loop 2026) ; => (2 0 2 6)

  (digit-loop "2026")
  ; The value
  ;     "2026"
  ; is not of type
  ;     INTEGER
  ; when binding INTEGER
  ;
  ; Type HELP for debugger help, or (SB-EXIT:EXIT) to exit from SBCL.
  ;
  ; Restarts:
  ;   0: [ABORT] Exit debugger, returning to top level.
tmtvl··on Why Janet? (2023)
All programming languages have horrible syntax (except maybe Forth). Some examples:

Statements are terminated by either a dedicated graphical character, in which case it's easy to forget the character and have a problem, or by a newline (or maybe a different white space character, but I haven't encountered that yet) in which case decent formatting of code may require a dedicated graphical character to indicate that the newline DOESN'T terminate the statement, in which case we have the same problem. Having newline-terminated statements without continuation character would be consistent, but would hamper readability because identifiers would need to be strictly limited in length to keep certain lines from exceeding available screen space (or alternatively readability would suffer from lines only being partially readable).

And that's before getting into the weeds of how mathematical notation is tricky (most people have learned infix notation at maths class in school, so they mightn't appreciate how horrible it is), how different types of brackets (round, square, curly) can have inconsistent semantics, the downsides to the various ways of indicating lexical blocks (brackets, white space, keywords,...), et cetera.

The ideal programming language would probably be one which allows switching between different syntaxes based on what works best for the user (for example, someone could write code in S-expressions, another person could have that code automatically translated into SRFI-119 Wisp expressions and work with it like that, a third person could then have it rendered into something more Lua-like,...). Which is something I think the Racket people are working on, but I may be mistaken.

tmtvl··on Windows GOG DOS Games on M-Series Macs
Apparently (<https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher...>) Heroic supports launching games with DOSBox Staging or ScummVM.
tmtvl··on KDE at 30
Before I upgraded to my new PC (managed to get it just before AI sent prices into the stratosphere), I was using an older PC (2016~ish) without discrete GPU. It ran Plasma Wayland without any problems. My new PC (has an RX 7600) also runs it without any problems. I don't know what's wrong with your PC (I mean, AlienWare does make atrocious garbage, so it could be anything), but I expect it to run better on your lesser PC's/laptops.
tmtvl··on Don't Build Your Own Lisp
The idea was probably that anyone reading the review would already be familiar with Build Your Own Lisp (<https://www.buildyourownlisp.com/>).
tmtvl··on Why Gentoo?
If emerge were Rewritten In Rust, it could be called 'remerge'.
tmtvl··on Blue Origin's New Glenn blows up during static fire test
No one should ever be that close, but it's a worst case scenario within the realm of possibility (people do get themselves into danger sometimes, for example by wandering onto a railroad track when there's a train approaching). I don't think it's unreasonable to reserve the 10 on the 1-10 scale for 'loss of human life'.
tmtvl··on Gradle Is Javamaxxing
I'm by-and-large fine with XML, having used it for many a year; however I really like working with XML when I can use Guile's SXML layer. For Maven it's not that important because POMs are simple enough, but for more complex things it's nice having a useful tool.

I actually don't mind Ant very much, but I haven't had good luck using Ivy for dependency management. Maven's been very nice in the decade and a half I've used it, Gradle's always felt off to me. I think there was also another Java build tool written in like Ruby or something, but I'm blanking on the name at the moment.

tmtvl··on YouTube to automatically label AI-generated videos
I'm now reminded of a game one of my friends came up with (or found somewhere, I dunno): write a text and try to get 100% on an 'is this text AI-generated' website. Could be neat to do the same with videos and the YT AI label.
tmtvl··on Iran's Internet is partially restored, Cloudflare Radar data shows
Someone who trains in the same kung fu club as I was born and raised in Iran, but moved to Belgium around the turn of the millennium. I hope this will make it easier for them to contact their family in Iran.
tmtvl··on I am not a black belt
Not having practised Aikido, but somewhat familiar with Lisp:

> it's considered very beautiful

Funny, I've heard it described as 'porridge with fingernail clippings', which doesn't seem to me like a description evoking a 'very beautiful' image.

> it takes a long time to become fluent in it

Not more so than many other programming languages. Of course, most people don't start with Lisp, so their frame of reference is off.

> it "expands your mind"

A fairly meaningless statement which is claimed of a great many things. Is Lisp any more or less mind-expanding than, say, marijuana?

> in theory it can "work on the street" but in practice people reach for other tools

What do you mean, 'in theory'? Lisp has been used, in practise, by NASA, for running a robot on Mars: <https://www.corecursive.com/lisp-in-space-with-ron-garret/>. If that isn't 'working on the street', then, by golly, that's a mean street you've got there.

tmtvl··on Valve raises Steam Deck prices
You're right, my reading comprehension failed me, my apologies.
tmtvl··on Valve raises Steam Deck prices
It very specifically says:

> The 1TB OLED model

That said, I thought HN was annoyed at Valve for taking a 30% cut, so that's probably how they can keep the Deck under 1k.

tmtvl··on you_can::turn_off_the_borrow_checker
I would go for a Rust version of Acme::Bleach.
tmtvl··on I keep bouncing off the Scheme language
> The only way to know strcat, puts, and strlen exist is…to know that they exist.

Yes, and the only way to know that Vector and Hashtable exist is... to know that they exist.

> I also wanted compile-time attributes à la Rust/C# and there’s no clean way to add those to Lisp’s syntax without seriously cluttering it up

That's what declarations are for, a Lisp could have something like:

  (declare (type Foo bar)
           (derive Clone bar))
  (define bar
    (bar:from-string "Hello, World!"))
Or something like:

  (db:with-connection (con (db:get-connection my-database))
    (declare (db:read-only con))
    (db:query con
              :table "students"
              :where (> "score" 80)
              :sort-by "name"))
> Lisp is neat but it just doesn’t fit in the future of programming that Rust and C# have shown us.

C♯ and Rust are dead languages, you make a change and you have to recompile the entire program and restart it from scratch. You can't ask a running program things like 'how many users are connected at the moment?'. That isn't a future I would like to see.

tmtvl··on I keep bouncing off the Scheme language
Prog with a bunch of labels and jumps, using the bindings like ASM registers.
tmtvl··on I keep bouncing off the Scheme language
There's something very ironic about an article about bouncing off Scheme on a website called 'SICPers'. OT: I think I'm pretty decent at thinking in Scheme, although I don't quite have the hang of continuations. That said, because I like type declarations I use Common Lisp, which allows me to bounce between a more Scheme-like style and a more Assembly-like style however I see fit.
← PreviousPage 5 of 34Next →