<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: dannymi</title><link>https://news.ycombinator.com/user?id=dannymi</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 19 Apr 2026 08:38:19 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=dannymi" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by dannymi in "Don't trust AI agents"]]></title><description><![CDATA[
<p>I'm only using NanoClaw, but I like that I could (and did) just review the code it has, and that it uses containers for each agent (so I can have different WhatsApp groups working on different things and they can't interfere with each other), and that I could (and did) just swap those containers out easily for guix shell containers.<p>I am pretty confident that I know how the agent containerization works.  In general there's really not a lot of complexity there at all.<p>If one wants, one can just (ask Claude to) add whatever functionality, or (and that's what I did) just use Claude skills (without adapting NanoClaw any further) and be done with.<p>What is annoying is that their policy is instead of integrating extra functionality upstream, they prefer you to keep it for yourself.  That means I have to either not update from upstream or I am the king of the (useless so far--just rearranging the deck chairs) merge conflicts every single time.  So one of the main reasons for contributing to upstream is gone and you keep having to re-integrate stuff into your fork.</p>
]]></description><pubDate>Sat, 28 Feb 2026 18:53:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=47198873</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=47198873</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47198873</guid></item><item><title><![CDATA[New comment by dannymi in "Org Mode syntax is one of the most reasonable markup languages for text (2017)"]]></title><description><![CDATA[
<p>For what it's worth, there is this vscode extension <a href="https://github.com/realDestroyer/org-vscode/" rel="nofollow">https://github.com/realDestroyer/org-vscode/</a> which is pretty neat and can do org-mode task tracking, calendar and agenda view--and HTML preview.</p>
]]></description><pubDate>Sat, 10 Jan 2026 17:04:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=46567492</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=46567492</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46567492</guid></item><item><title><![CDATA[New comment by dannymi in "Chen-Ning Yang, Nobel laureate, dies at 103"]]></title><description><![CDATA[
<p>Just as you can select whatever railroad gauge as a country (if you also build compatible trains, obviously) and have it work just fine no matter what you select--until you try to connect it to another country and then you need to have converters--, some physical theories have gauges like this that you can choose however you want and it will work fine (and be equivalent to a theory in any other gauge)--but if you want the theory to work with the next guy's theory you have to have converters.</p>
]]></description><pubDate>Tue, 21 Oct 2025 18:41:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=45659849</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=45659849</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45659849</guid></item><item><title><![CDATA[New comment by dannymi in "Switching to Claude Code and VSCode Inside Docker"]]></title><description><![CDATA[
<p>>Is this level of fear typical or reasonable?<p>Of course.  Also with regular customer projects.  Even without AI--but of course having an idiot be able to execute commands on your PC makes the risk higher.<p>> If so, why doesn’t Anthropic / AI code gen providers offer this type of service?<p>Why?  Separate the concerns.  Isolation is a concern depending on my own risk appetite.  I do not want stuff to decide on my behalf what's inside the container and what's outside.  That said, they do have devcontainer support (like the article says).<p>>Hard to believe Anthropic is not secure in some sense — like what if Claude Code is already inside some container-like thing?<p>It's a node program.  It does ask you about every command it's gonna execute before it does it, though.<p>>Is it actually true that Claude cannot bust out of the container?<p>There are (sporadic) container escape exploits--but it's much harder than not having a container.<p>You can also use a qemu vm.  Good luck escaping that.<p>Or an extra user account--I'm thinking of doing that next.</p>
]]></description><pubDate>Sun, 13 Jul 2025 10:44:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=44549267</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=44549267</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44549267</guid></item><item><title><![CDATA[New comment by dannymi in "Chromium Switching from Ninja to Siso"]]></title><description><![CDATA[
<p>It stops at GNU Mes and hex0.<p>Bootstrapping everything is exactly how it's done correctly--and how it's actually done in practice in Guix.<p>I mean sure if you have a business to run you outsource this part to someone else--but you seem to think it's not done at all.<p>Supply chain attacks have been happening pretty much non-stop the past years.  Think it's a good idea to use binary artifacts you don't know how they were made (and thus what's in them)?  Especially for build tools, compilers and interpreters.<p>>And why is that location more valid of a decision than the one that doesn't require building the build system from source?<p>Because you only have to review a 250 Byte binary (implementing an assembler) manually.  Everything else is indeed built from source, including make, all the way up to Pypy, Go, Java and .NET (and indeed Chromium).</p>
]]></description><pubDate>Sat, 21 Jun 2025 11:51:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=44336804</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=44336804</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44336804</guid></item><item><title><![CDATA[New comment by dannymi in "Hacker News now runs on top of Common Lisp"]]></title><description><![CDATA[
<p>>It has a lambda there. In many programming languages, and the way human beings read this, say that "when there is a lambda, whatever is inside is evaluated only when you call it".<p>What is inside the lambda is to the right of the ":".  That is indeed evaluated only when you call it.<p>>But it is good that people are aware that it is an error in design, so new programming languages don't fall into the same error.<p>Python didn't "fall" into that "error".  That was a deliberate design decision and in my opinion it is correct.  Scheme is the same way, too.<p>Note that you only have a "problem" if you mutate the list (instead of functional programming) which would be weird to do in 2025.<p>>For an equivalent error that did get fixed, many Lisps used to have dynamic scoping for variables instead of lexical scoping. It was people critizing that decision that lead to pretty much all modern programming languages to use lexical scoping, including python.<p>Both are pretty useful (and both are still there, especially in Python and Lisp!).  I see what you mean, though: lexical scoping is a better default <i>for local variables</i>.<p>But having weird lazy-sometimes evaluation would NOT be a better default.<p>If you had it, when exactly would it force the lazy evaluation?<p><pre><code>    def g():
        print('HA')
        return 7

    def f(x=lazy: [g()]):
        pass
</code></pre>
^ Does that call g?<p><pre><code>    def f(x=lazy: [g()]):
        print(x)
</code></pre>
^ How about now?<p><pre><code>    def f(x=lazy: [g()]):
        if False:
            print(x)
</code></pre>
^ How about now?<p><pre><code>    def f(x=lazy: [g()]):
        if random() > 42: # If random() returns a value from 0 to 1
            print(x)
</code></pre>
^ How about now?<p><pre><code>    def f(x=lazy: [g()]):
        if random() > 42:
            print(x)
        else:
            print(x)
            print(x)
</code></pre>
^ How about now?  And how often?<p><pre><code>    def f(x=lazy: [g()]):
        x = 3
        if random() > 42:
            print(x)
</code></pre>
^ How about now?<p>Think about the implications of what you are suggesting.<p>Thankfully, we do have "lazy" and it's called "lambda" and it does what you would expect:<p>If you absolutely need it (you don't :P) you can do it explicitly:<p><pre><code>    def f(x=None, x_defaulter=lambda: []):
        x = x if x is not None else x_defaulter()
</code></pre>
Or do it like a normal person:<p><pre><code>    def f(x=None):
        x = x if x is not None else []
</code></pre>
Explicit is better than implicit.<p>Guido van Rossum would (correctly) veto anything that hid control flow from the user like having a function call sometimes evaluate the defaulter and sometimes not.</p>
]]></description><pubDate>Tue, 27 May 2025 11:54:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=44106028</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=44106028</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44106028</guid></item><item><title><![CDATA[New comment by dannymi in "Hacker News now runs on top of Common Lisp"]]></title><description><![CDATA[
<p>There's always tension between language simplicity (and thus cognitive load of the programmers) and features.  Compare Scheme with Common Lisp.<p>The idea in Python is:<p>1. Statements are executed line by line in order (statement by statement).<p>2. One of the statements is "def", which executes a definition.<p>3. Whatever arguments you have are strictly evaluated.
   For example f(g(h([]))), it evaluates [] (yielding a new empty list), then evaluates h([]) (always, no matter whether g uses it), then evaluates g(...), then evaluates f(...).<p>So if you have<p>def foo(x = []):
   ...<p>that immediately defines<p>foo = (lambda x = []: ...)<p>For that, it has to immediately evaluate [] (like it always does anywhere!).  So how is this not exactly what it should do?<p>Some people complain about the following:<p><pre><code>    class A:
        x = 3
        y = x + 2
</code></pre>
That now, x is a class variable (NOT an instance variable).  And so is y.  And the latter's value is 5.  It doesn't try to second-guess whether you maybe mean any later value of x.  No.  The value of y is 5.<p>For example:<p><pre><code>    a = A()
    assert a.__class__.x == 3
    assert a.x == 3
    a.__class__.x = 10
    b = A()
    assert b.x == 10
</code></pre>
succeeds.<p>But it just evaluates each line in the class definition statement by statement when defining the class.  Simple!<p>Complicating the Python evaluation model (that's in effect what you are implying) is not worth doing.  And in any case, changing the <i>evaluation model</i> of the world's most used programming language (and in production in all countries of the world) in 2025 or any later date is a no go right there.<p>If you want a complicated (more featureful) evaluation model, just use C++ or Ruby.  Sometimes they are the right choice.</p>
]]></description><pubDate>Mon, 26 May 2025 20:22:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=44101307</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=44101307</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44101307</guid></item><item><title><![CDATA[New comment by dannymi in "Git Bug: Distributed, Offline-First Bug Tracker Embedded in Git, with Bridges"]]></title><description><![CDATA[
<p>There's also <a href="https://github.com/dspinellis/git-issue">https://github.com/dspinellis/git-issue</a> which has much fewer dependencies.</p>
]]></description><pubDate>Wed, 14 May 2025 19:56:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=43988552</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=43988552</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43988552</guid></item><item><title><![CDATA[New comment by dannymi in "Make Ubuntu packages 90% faster by rebuilding them"]]></title><description><![CDATA[
<p><p><pre><code>    guix build --with-configure-flag="jq=CFLAGS=-O3" jq
</code></pre>
If you want it to be permanent, then you can use a guix home profile (that's a declarative configuration of your home directory) with a patch function in the package list there:<p><pre><code>    (define llama-tune
      (options->transformation `((tune . "znver3")))) ; Zen 3

    (home-environment
     (packages (list (llama-tune (specification->package "llama")))))
</code></pre>
or:<p><pre><code>    (define jq-patch
      (options->transformation `((with-configure-flag . "jq=CFLAGS=-O3"))))
</code></pre>
[...]<p><pre><code>    (jq-patch (specification->package "jq"))
</code></pre>
[...]<p>You can also write a 10 line guile script to automatically do it for all dependencies (I sometimes do--for example for emacs).  That would cause a massive rebuild, though.<p>>The most pain-free option I can think of is the --tune flag (which is similar to applying -march=native), but<p>> packages have to be defined as tunable for it to work (and not many are).<p>We did it that way on purpose--from prior experience, otherwise, you would get a combinatorial explosion of different package combinations.<p>If it does help for some package X, please email us a 2 line patch adding (tunable? . #t) to that one package.<p>If you do use --tune, it will tune everything that is tuneable in the dependency graph.  But at least all dependents (not dependencies) will be just grafted--not be rebuilt.</p>
]]></description><pubDate>Fri, 21 Mar 2025 02:31:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=43431269</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=43431269</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43431269</guid></item><item><title><![CDATA[New comment by dannymi in "I stopped everything and started writing C again"]]></title><description><![CDATA[
<p>I agree.<p>But: If you are LUCKY!  The worse case is if you DON'T segfault by dereferencing invalid pointer.</p>
]]></description><pubDate>Thu, 13 Mar 2025 19:19:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=43356422</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=43356422</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43356422</guid></item><item><title><![CDATA[New comment by dannymi in "Greg K-H: "Writing new code in Rust is a win for all of us""]]></title><description><![CDATA[
<p>Then use the GCC backend. <a href="https://github.com/rust-lang/rustc_codegen_gcc">https://github.com/rust-lang/rustc_codegen_gcc</a></p>
]]></description><pubDate>Sat, 22 Feb 2025 15:01:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=43139494</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=43139494</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43139494</guid></item><item><title><![CDATA[New comment by dannymi in "Great things about Rust that aren't just performance"]]></title><description><![CDATA[
<p>I would suggest you read the source code of Mutex <<a href="https://doc.rust-lang.org/src/std/sync/mutex.rs.html#178-182" rel="nofollow">https://doc.rust-lang.org/src/std/sync/mutex.rs.html#178-182</a>> and then of UnsafeCell <<a href="https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html" rel="nofollow">https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html</a>>.<p>So, the layout of Mutex<T> is the same as T and then some lock (well, obviously).<p>>Rust introduces an extra layer of pointer indirection with Mutex, which can hurt performance significantly with cache misses.<p>Why would there be an extra pointer dereference? There isn't.</p>
]]></description><pubDate>Sun, 12 Jan 2025 20:11:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=42676475</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=42676475</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42676475</guid></item><item><title><![CDATA[New comment by dannymi in "Why I Chose Common Lisp"]]></title><description><![CDATA[
<p>Thanks, but no thanks.<p>I don't like vscode extensions advertising to me every 5 seconds, auto-downgrading the free versions of extensions, auto-installing aux tools every 5 seconds, having a 400 MB RSS chromium runtime (remember Eight Megabytes And Constantly Swapping? VS code is much worse; and it's <i>also</i> just a plain text editor); nerfing the .net debugger and breaking hot reload on purpose in VSCodium; telemetry, .... it's so noisy all the time.  You are using this? On purpose?!<p>VS code is basically the same idea as emacs, just the MVP variant and with a lot of questionable technology choices (Javascript? Electron? Then emulate terminal cells anyway and manually copy cell contents? uhhh. What is this? Retrofuturism?) and done with the usual Microsoft Embrace-Extend-Extinguish tactics (nerfing pylance, funny license terms on some extensions that the extensions are only allowed to be used in <i>their</i> vscode etc).<p>So if you didn't like emacs you probably wouldn't like vscode either.<p>Also, if you use anything BUT emacs for Lisp development, what do you use that doesn't have a jarring break between the Lisp image and you? vim seems weird for that use case :)<p>emacs is very very good for Lisp development.<p>On the other hand, VSCode for Lisp is very flaky and VSCode regularily breaks your Lisp projects.  Did you try it?<p>Because of your comment I tried VSCode again and now about 20 extensions (one of them "Alive", a Lisp extension for vscode) complain about now missing<p><pre><code>  "Dev container: Docker from Docker Compose"
</code></pre>
(keep in mind they worked before and I didn't change anything in vscode--I hadn't even run VSCode for 8 months or so) and when I try to fix that by clicking on the message in the extension manager the message immediately disappears from all 20 extensions in the manager (WTF?) and I get:<p>>>./logs/20250112T181356/window1/exthost/ms-vscode-remote.remote-containers/remoteContainers-2025-01-12T17-13-58.234Z.log:
>>>> Executing external compose provider "/home/dannym/.guix-home/profile/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<
>a239310d8b933dc85cc7671d2c90a75580fc57a309905298170eac4e7618d0c1
>Error: statfs /var/run/docker.sock: no such file or directory
>Error: no container with name or ID "serverdevcontainer_app_1" found: no such container<p>... because it's using podman (I didn't configure that--vscode did that on its own, incompletely. Also, it thinks that means having a docker/podman service running as root has to be a thing then (instead of rootless podman). Funny thing is I use podman extensively. I don't wanna know how bad it would be if I HADN'T set podman up already).<p>So it didn't actually fix anything, but it removed the error message. I see.
And there's no REPL for the editor--so I can't actually find out details, let alone fix anything.<p>I had thought emacs DX was bad--but I've revised my opinion now: compared to vscode DX, emacs DX is great. You live with VSCode if you want to.<p>And note, vscode was made <i>after</i> emacs was made. There's no excuse for this.<p>I think this now was about all the time that I want to waste on this thing, again.<p>How is this a problem in 2025? <i>shakes head</i><p>>VS Code managed to by-pass the qualitiy and amount of extensions/plugins in a fraction of time Emacs took decades.<p>Yeah? Seems to me these vscode extensions are written in crayon. Bad quality like that would never make it into emacs mainline. And it's not even strictly about that! I wonder who would write a <i>developer tool</i> that the developer can't easily debug its own extensions in (yes, I know about Ctrl-Shift-P). That flies about as well as a lead balloon.<p>For comparison, there's emacs bufferenv that does dev containerization like this and it works just fine. Configuration: 1 line--the names of the containerfiles one wants it to pick up. Also, if I wanted to debug what it did (which is rare) I could just evaluate any expression whatsoever in emacs. ("Alt-ESC : «expression»" anywhere)<p>PS. manually running "podman-compose up" in an example project as a regular user works just fine--starts up the project and everything needed. So what are they overcomplicating here? Pipes too hard?<p>PPS. I've read some blog article to make socket activation work for rootless podman[1] but it's not really talking about vscode. Instead, it talks how one would set up "linger" so that the container stays there when I'm logged out. So that's not for dev containers (why would I possibly want that there? I'm not ensuring Heisenbugs myself :P).<p>[1] <a href="https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md">https://github.com/containers/podman/blob/main/docs/tutorial...</a></p>
]]></description><pubDate>Sun, 12 Jan 2025 18:55:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=42675820</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=42675820</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42675820</guid></item><item><title><![CDATA[New comment by dannymi in "Ask HN: What Process/Applications Do You Use for Todo/Knowledge Management?"]]></title><description><![CDATA[
<p>I use emacs org mode (and emacs org node and emacs org agenda), and Orgzly Revived on Android (the latter can do DAV sync). It's quite nice and can do integration, search and quick capture, TODOs.  It's also endlessly customizable--but I almost don't customize it.</p>
]]></description><pubDate>Sat, 11 Jan 2025 20:55:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=42668854</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=42668854</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42668854</guid></item><item><title><![CDATA[New comment by dannymi in "What would it take to add refinement types to Rust?"]]></title><description><![CDATA[
<p><p><pre><code>  $ cat a.pp
  {$R+}
  var
    a: 1..12;
    b: 1..12;
    c: 1..12;
  begin
    a := 10;
    b := 11;
    c := a + b;
    Writeln(c)
  end.
  $ fpc a.pp
  Free Pascal Compiler version 3.2.2 [2021/05/19] for x86_64
  Copyright (c) 1993-2021 by Florian Klaempfl and others
  Target OS: Linux for x86-64
  Compiling a.pp
  Linking a
  12 lines compiled, 0.1 sec
  $ ./a
  Runtime error 201 at $00000000004010D8
    $00000000004010D8
    $0000000000422EEC</code></pre></p>
]]></description><pubDate>Thu, 26 Dec 2024 17:11:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=42516345</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=42516345</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42516345</guid></item><item><title><![CDATA[New comment by dannymi in "Visual Basic 6 rebuilt in C# – complete with form designer and IDE in browser"]]></title><description><![CDATA[
<p>There are 1.46 billion iphones, 3.3 billion Android phones and tablets, 1.5 billion Windows computers in the world. About 100 million people use MacOS.<p>I'd say with the (few 100 million) Chromebooks it's an equal number of Windows devices to the sum of the other ones you listed.<p>P.S. What happened to Android in your list? That is like leaving out the 500 pound gorilla :)</p>
]]></description><pubDate>Mon, 11 Nov 2024 23:04:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=42111225</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=42111225</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42111225</guid></item><item><title><![CDATA[New comment by dannymi in "Embedded Rust in Production?"]]></title><description><![CDATA[
<p>>If your Rust project leans heavily on unsafe code and/or many libraries that use lots of unsafe, then aren’t you fooling yourself to some degree; i.e. trusting that the unsafe code you write or that written by the 10 other people who wrote the unsafe libs you’re using is ok? Seems like that tosses some cold water on the warm afterglow.<p>It's true is that you have to trust your dependencies (unsafe or not).  Not needing to trust at all that developers know what they are doing was never a thing a programming language could provide. We can only carve out some specific properties that we can machine-check in a limited way.<p>There are limits on what a type system can do (Rice's theorem, Gödel's incompleteness theorem), and in addition there are limits on what a non-dependent type system can do.<p>Therefore, you either need unsafe (something that adds operations that the type system doesn't model) or you can't write some perfectly OK programs.<p>Basically, the Rust type system is a toy model of your computer's abilities and the domain you want to model. And so is any other type system. The type systems of systems languages at least have some inkling of the actual machine--which is not necessarily the case in non-systems languages.<p>Ask a computer engineer what he thinks about this toy model's misconceptions, like that reading and writing from the same location via the memory bus affect the same thing, or reading the same memory location twice in a row when there's only one cpu is guaranteed to give you the same value, or that reading a memory location can't change it, or that writing to some memory location can't automatically change some other aliased memory location, or that writing some memory location from cpu 1 means cpu 2 can immediately read that new value out etcetc. I could go on (memory barriers, cache coherency, paging, ...).<p>This is not specific to Rust.<p>I'm not sure why we are having new "unsafe" discussions lately.  Java and .NET have unsafe as well. Didn't we have that discussion already in ca. year 2000 and everyone arranged themselves with it? 
  What changed? Are there new arguments?<p>If you want to have some empirical tests if the unsafe blocks are broken, run your program under miri.<p>Now you could say that you could just make better and better type systems that encompass everything as it really is. To that I say (1) you can't do that in principle and (2) if you could, humans wouldn't be able to practically use it anymore and (3) It would be too much effort for something that only a tiny minority of programs need in some places. The toy model is pretty good 95% of the time!</p>
]]></description><pubDate>Tue, 15 Oct 2024 09:49:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=41846831</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=41846831</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41846831</guid></item><item><title><![CDATA[New comment by dannymi in "Show HN: Ki Editor – Multicursor syntactical editor"]]></title><description><![CDATA[
<p>Does it?<p>I've set it (emacs 29.4) up like that (LSP mode (including rust), DAP mode, 160 emacs packages, daemon mode) and it works very fast for me. It can do project tree, intellisense, refactoring, macro-expansion and auto-implementation that way.<p>Opening a new document takes about 75ms for me.<p>Modern emacs has native compilation via gccjit.<p>package specification: <a href="https://github.com/daym/guix-config/">https://github.com/daym/guix-config/</a><p>emacs config: <a href="https://github.com/daym/emacs-config/">https://github.com/daym/emacs-config/</a></p>
]]></description><pubDate>Mon, 09 Sep 2024 17:22:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=41490928</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=41490928</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41490928</guid></item><item><title><![CDATA[New comment by dannymi in "Tensors, the geometric tool that solved Einstein's relativity problem"]]></title><description><![CDATA[
<p>In the first example on <a href="https://www.tensorflow.org/api_docs/python/tf/math/multiply" rel="nofollow">https://www.tensorflow.org/api_docs/python/tf/math/multiply</a> you can see that they use the Hadamard product (not the matrix product):<p><pre><code>    x = tf.constant(([1, 2, 3, 4]))
    tf.math.multiply(x, x)
    <tf.Tensor: shape=(4,), dtype=..., numpy=array([ 1,  4,  9, 16], dtype=int32)>
</code></pre>
I could stop right here since it's a counterexample to x being a matrix (with a matrix product defined on it; P.S. try tf.matmul(x, x)--it will fail; there's no .transpose either). But that's only technically correct :)<p>So let's look at tensorflow some more:<p>The tensorflow tensors should transform like vectors would under change of coordinate system.<p>In order to see that, let's do a change of coordinate system. To summarize the stuff below: If L1 and W12 are indeed tensors, it should be true that A L1 W12 A^-1 = L1 W12.<p>Try it (in tensorflow) and see whether the new tensor obeys the tensor laws after the transformation. Interpret the changes to the nodes as covariant and the changes to the weights as contravariant:<p><pre><code>    import tensorflow as tf
    # Initial outputs of one layer of nodes in your neural network
    L1 = tf.constant([2.5, 4, 1.2], dtype=tf.float32)
    # Our evil transformation matrix (coordinate system change)
    A = tf.constant([[2, 0, 0], [0, 1, 0], [0, 0, 0.2]], dtype=tf.float32)
    # Weights (no particular values; "random")
    W12 = tf.constant(
        [[-1, 0.4, 1.5],
         [0.8, 0.5, 0.75],
         [0.2, -0.3, 1]], dtype=tf.float32
    )
    # Covariant tensor nature; varying with the nodes
    L1_covariant = tf.matmul(A, tf.reshape(L1, [3, 1]))
    A_inverse = tf.linalg.inv(A)
    # Contravariant tensor nature; varying against the nodes
    W12_contravariant = tf.matmul(W12, A_inverse)
    # Now derive the inputs for the next layer using the transformed node outputs and weights
    L2 = tf.matmul(W12_contravariant, L1_covariant)
    # Compare to the direct way
    L2s = tf.matmul(W12, tf.reshape(L1, [3, 1]))
    #assert L2 == L2s
</code></pre>
A tensor (like a vector) is actually a very low-level object from the standpoint of linear algebra. It's not hard at all to make something a tensor. Think of it like geometric "assembly language".<p>In comparison, a matrix is rank 2 (and not all matrices represent tensors). That's it. No rank 3, rank 4, rank 1 (!!). So what does a matrix help you, really?<p>If you mean that the operations in tensorflow (and numpy before it) aren't beautiful or natural, I agree. It still works, though. If you want to stick to ascii and have no indices on names, you can't do much better (otherwise, use Cadabra[1]--which is great). For example, it was really difficult to write the stuff above without using indices and it's really not beautiful this way :(<p>More detail on <a href="https://medium.com/@quantumsteinke/whats-the-difference-between-a-matrix-and-a-tensor-4505fbdc576c" rel="nofollow">https://medium.com/@quantumsteinke/whats-the-difference-betw...</a><p>See also <a href="http://singhal.info/ieee2001.pdf" rel="nofollow">http://singhal.info/ieee2001.pdf</a> for a primer on information science, including its references, for vector spaces with an inner product that are usually used in ML. The latter are definitely geometry.<p>[1] <a href="https://cadabra.science/" rel="nofollow">https://cadabra.science/</a> (also in mogan or texmacs) - Einstein field equations also work there and are beautiful</p>
]]></description><pubDate>Mon, 12 Aug 2024 17:29:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=41227070</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=41227070</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41227070</guid></item><item><title><![CDATA[New comment by dannymi in "Algebraic Data Types for C99"]]></title><description><![CDATA[
<p>When you have natural numbers and a multiplication operation (product) would you say that those form an algebra? (ADT means algebraic data type)</p>
]]></description><pubDate>Thu, 09 May 2024 22:16:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=40313483</link><dc:creator>dannymi</dc:creator><comments>https://news.ycombinator.com/item?id=40313483</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40313483</guid></item></channel></rss>