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

Don't charge $1 first? API-wise you can attach a card to a customer without charging it.

Maybe the $1500 thing still fails anyways but it won't look as much like fraud?

Or, y'know, just send the $1500 invoice after the fact and have that involve the client put in the card details there as a first shot. You _should_ (IIRC) be able to charge + capture the card in one go.


I believe you got that wrong.

Here's some extra context [0]: https://github.com/pypi/warehouse/issues/20927. Loooots of links to click in.

the point here being small service providers are _also_ able to get into this system, but I think there's an expectation of success.

The bar for trusted publishers is very high though. I don't think it's high "on purpose" to leave out certain platforms for being too small, but in effect if (for example) your provider doesn't have a security contact point then that's going to rule them out here.


I’d like to see support for trusted publisher signing and manual upload. Think of it as two step auth for artifact publishing. Pipeline generated artifacts and human upload of those verifiable artifacts. The current reality of trusted publishing, is devoid of trust, except it was triggered by a pipeline that pypi trusted. That pypi is now able to call out such trust is great btw, but as a project that currently does this two step generation, it feels like we are penalized for trying to introduce additional steps out of abundance of caution… separately, what mechanism does a client installer have to verify a pkg install was cryptographically attested to wrt to production?

sans client verification of signatures by default, install is still roulette, and I’m glad package managers have introduced package publication date based cool off options now.


Yeah that's not the worst idea, since in theory signing is about tamper prevention.

(Personally I think that we just shouldn't have automated releases via CI, full stop. There should "always" be a person pressing a button to release things. So I'm in a bit of a big tent with manual upload support. At least some second factor for releases!)

I think generally though the idea is that trusted publisher signing + upload is about simplifying .... something. But given how attacks have been happening in the past 24 months I fear that this might not help as much as we want.


If you were twice as productive then (Glibly) that "just" means you got two years of work done in one.

You wouldn't see that much difference, or feel it.


C++ lets you do this kind of stuff as well.

Primitive types and composite types having the same capabilities is a bit of a value statement for C++ and Rust IMO, and it's missing in a lot of languages downstream (IMO) of the "every variable is a reference to a slot/pointer" philosophy taken by most every managed language


C++ doesn't have methods/ "member functions" on the primitive types.

One reason is that C++ doesn't know where to put them, for user defined class, struct or union types these "member functions" as their name suggests live inside the class/ struct/ union definition but for a primitive where would these live?

In Rust they're just impl blocks, for example the method we're discussing here is:

    impl bool {    
        pub const fn toggle(&mut self) {
            *self = !*self;
        }
    }

Only because Unified Call Syntax is yet to land into the language, after several failed attempts.

And I think there's a decent chance that it never will, at least in the form it has been proposed in in the past (i.e., member function syntax being effectively turned into free function calls). P3027 "UFCS is a breaking change, of the absolutely worst kind" [0] argues quite strongly that that particular form of UFCS is basically completely broken.

[0]: https://isocpp.org/files/papers/P3027R0.html


As WG21 goes, it is a matter of advocacy, persistency, and getting the required votes in the room, at least if the process doesn't change even with how C++26 contracts turned out to be.

I mean, sure, but that's basically a tautology since that's how everything made it into the standard into the first place. Those are necessary but not sufficient conditions.

I'm with you on this and would point at std::hive as an example of the results.

Not really, in first place it was basically CFront 2.0, alongside C++ARM akin to the K&R C book, with last minute addition of HP STL implementation.

The only piece that wasn't really available and was made in a waterfall design approach was export templates, with the known outcome that no one other than EDG has even bothered implementing it.

Post C++98 is when we got into the "advocacy, persistency, and votes" strategy.


You still needed "advocacy, persistency, and votes" to get stuff into C++98. It's just that some things need a lot more of the former to get the latter than others.

"This Singapore client wants a bazillion H200s".

Not really that complicated of a scheme! The main thing is that the sales people... they "know" this is likely export control circumvention but choose to not make a stink about it. Willful ignorance.

Often times these export control issues play out like:

- big deals made with shell companies

- most people involved are incentivised to play along and pretend to not notice the shell-ness of the company

- one person doesn't get the memo and is like "uhh... wait isn't this bad?"

- now that the phrase has been uttered, either cover ups happen or a bunch of other nasty shit happens


Reality, I suppose that most procuments is played along the line : this Singapore company claimed it was for their local legal entity, and here the certificate/contract they signed.

At this stage, there is no reason to not sign the contract to provide whatever they ask. DD done, risk management done, risk but acceptable etc.

So yes everyone is playing the game.


You are pattern matching on the "AI" part and reacting to it, but I think you should re-read the original post. The main thing seems to be some people taking this code and then reusing it without attribution (and, incidentally, trying to use AI to obfuscate this fact)

There never needed to be attribution according to their own license, which they picked without any outside influence. Where exactly is the issue?

I guess they picked a license that didn’t require attribution and then decided “actually this sucks” and are changing their judgement downstream of that

Sometimes some people change their mind.


Sure, they can change their mind. But it’s childish to call that “exploit[ing] our permissive licensing to hijack our work” or to call the people who took the license at it’s word “bad faith actors”.

Once you choose a license you just cannot get mad at people who read the license and then do what it says.


the term "bad faith actors" exists for cases where people use the text of the license rather than the spirit of the license. It's _for_ when people are doing things that one might describe as anti-social! Very subjective, of course.

The cynical argument is that the spirit of the MIT license was kicking in, but most people would prefer for the spirit of the MIT license to not be like the way it is.

Here I think the Asahi Linux team came to some realization of this variety and made a change. I don't think there's much to argue over here.

They didn't even name the people in the announcement! This is fairly muted when it comes to re-licensing announcements.

Perhaps childish is right, but... hey, they are within their rights to re-license.


Uh, no, there is just the text. A license is a contract, and its terms are spelled out in black and white. There is no hidden subtext or “spirit” that you can hold anyone to.

I’m not saying that the GPL is a bad choice, or that they shouldn’t switch. I actually prefer for software to use the GPL over the MIT license!

But it is wrong to complain when someone sees your license and takes advantage of it. The whole point of a copyleft license is to give people extra advantages for using your software, so calling anyone who relies on those advantages a “bad faith actor” is pretty outrageous. In fact I think it is Asahi Linux who are acting in bad faith now.


You have the diffing, but you also just have the various random bits of churn from building up the thing to diff etc.

Say what you will about "plain" COM models they don't cause a bunch of random memory allocations when you drag-n-drop an element in a list down two spots


I mean he should just not have an affair, independent of whether the other person is a spy or not.

React isn't immediate mode by my understanding.

In my head it's retained mode + the diffing layer, which sounds the same but if you try to write an "immediate-mode" API (say, using hooks) in React you'll find yourself churning a lot.

At least unless you use the magic React compiler that memo-izes everything correctly.


> Is it just me or does anyone else feel that 200 MB is a lot for a native chat app written in Rust, that's essentially a remote interface for the WhatsApp on your phone?

> I remember back in the day, apps like Miranda IM (and early versions of Trillian) used only digits of RAM, even when you had multiple plugins talking several protocols at the same time

I think what's happening in the second one is that because you're using the native OS toolkits a bunch of stuff is shared, whereas with these "self-contained" "native"-y apps you end up having to load up the whole world and aren't sharing things with everything else

I'd love to be proven wrong but I feel like if you use e.g. Qt you're gonna have to hold onto a bunch of stuff that you wouldn't if you were "just" using OS-native stuff (though maybe that gets shared if you're using the exact same version? Is there something that can be done in this space?)


As an additional data point, I recently vibed an egui wrapper around a library I wrote for mod management for a game, and testing it out now, it idles at 92 MB. This implies to me that at least half of the overhead is probably not from the gui framework, but I also don't know how much effort they spent trying to optimize it; I didn't try to optimize my vibed GUI app at all, but I did hand-write the library that it uses for file management, state tracking, etc., and I tend to go out of my way to try to avoid unnecessary allocation in my Rust code. I don't know how much of the memory usage is essentially required overhead or from other dependencies for non-GUI parts of the app, but my instinct is that there's probably a bit of optimization that can be done. I don't think it's crazy for them not to have spent the effort on trying to do that yet though (or potentially even at all, if it's efficient enough for their own personal use).

With Qt, on my KDE Linux, a simple app usually stays well below 60 to 100 MB.

Just tested, mine is 400MiB RSS. I was expecting less :-/

I just tested a simple Qt app on my Linux KDE Neon and it consumes just ~32.3 MB RSS. Simple Qml app memory consumption is ~120.4 MB RSS.

$ ps -o pid,rss,command -p $(pgrep -f SimpleQtApp)

PID RSS COMMAND

1471929 33052 ./SimpleQtApp

$ ps -o pid,rss,command -p $(pgrep -f SimpleQmlApp)

PID RSS COMMAND

1478335 123260 ./SimpleQmlApp

// Following is the simple Qt app code.

#include <QApplication>

#include <QWidget>

#include <QLabel>

#include <QPushButton>

#include <QVBoxLayout>

int main(int argc, char argv[]) {

    QApplication app(argc, argv);
    QWidget window;
    window.setWindowTitle("Qt Simple App (CMake)");
    window.resize(300, 150);

    QLabel *label = new QLabel("Hello, World!", &window);
    label->setAlignment(Qt::AlignCenter);

    QPushButton *button = new QPushButton("Click Me", &window);

    QVBoxLayout *layout = new QVBoxLayout(&window);
    layout->addWidget(label);
    layout->addWidget(button);

    QObject::connect(button, &QPushButton::clicked, [label]() {
        label->setText("You clicked the button!");
    });

    window.show();
    return app.exec();
}

// Following is the QML app code

#include <QGuiApplication>

#include <QQmlApplicationEngine>

int main(int argc, char *argv[]) {

    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;

    const QUrl url(QStringLiteral("qrc:/Main.qml"));

    QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection);

    engine.load(url);

    return app.exec();
}

// Main.qml

import QtQuick

import QtQuick.Controls

Window {

    width: 320
    height: 200
    visible: true
    title: "Simple QML Application"

    Column {
        anchors.centerIn: parent
        spacing: 20

        Label {
            id: statusLabel
            text: "Hello, QML World!"
            font.pointSize: 16
            anchors.horizontalCenter: parent.horizontalCenter
        }

        Button {
            text: "Click Me"
            anchors.horizontalCenter: parent.horizontalCenter
            
            // Handle click event inline
            onClicked: {
                statusLabel.text = "You clicked the QML button!"
            }
        }
    }
}

Sure. Sorry it wasn't clear; I meant I just tested the Telegram desktop app for Linux.

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

Search: