I'm very interested in (and a total novice in) cross platform GUI application development. Hadn't heard of GPUI, though I had heard of Tauri. I looked at the GPUI front page and saw this mess of almost-CSS method chaining... Surely there's a better way? This seems horrible to me.
IMHO Rust isn't a great language for describing UIs because it is too explicit in places that doesn't need to be for coding a UI.
Which is why in Slint (another Rust UI framework) we opted for a DSL. The application logic stays in Rust, but the UI is described in a language designed for it.
> Rust isn't a great language for describing UIs because it is too explicit in places that doesn't need to be for coding a UI.
That's is not about just Rust ... Any domain has its own optimal or sub-optimal language describing it. Criteria of optimality is a bit subjective of course. Like: INI, TOML, YAML, etc. are better (YMMV, again) for user facing configs than JSON or XML and so on.
I think that HTML is better for defining hierarchical UI structures and CSS and CSS selectors are (arguably again) better to define UI styling.
My Sciter[1] was initially using .FRM alike inputs (VisualBasic forms, good for IDE but bad for a human) but I quickly discovered that having styles, structure and code-behind-UI in single PL makes non-manageable mess. So Sciter uses HTML, CSS and JS we all familiar with. Not 100% match of course but good enough.
My experience has been that DSLs don't scale well. For simple things they provide a veneer of ease-of-use but eventually they were an albatross with Chef just as they were with QML and Slint. With both Slint and various Qt bindings for Rust marshalling data between Rust and the UI is painful. With Slint you get the added bonus of things just not yet existing in the DSL. That's a result of both immaturity and a strong focus on mobile at the expense of desktop. But the result is same. gpui has a killer dock widget, QML has the primitives to approximate one, and it's pretty much a no-go with Slint (though there's a third-party dock widget for Slint it's written in C++).
Here's a more idiomatic version of the previous example. IME gpui (and iced) is a lot easier to extend than something with a DSL, and if you check out the gpui example you'll see that gpui provides convenient methods to get consistent styles vs the Slint example where you hardcode widths and sizes. Those hex color abbreviations give me a facial tic every single time.
Slint is proprietary though, so that’s a dead end. I’m not going to use something which will inevitably be rug-pulled when you sell to private capital.
Slint is an open source, free software. The whole framework is on GitHub. A rug pull can't take back what's already released, and one could always fork if needed.
Btw, a rug pull can happen under even the most permissive licenses. As we've seen in the past with some project changing license or direction. That's more or less already happened with GPUI when Zed refocused development on its own needs rather than other GPUI users resulting in several forks.
I'm not sure it matters anymore unfortunately. I've vibe coded a few apps using gpui-kit and it works well. It helps that gpui-kit provides a number of high quality components (e.g. the data table is especially good). But even where it doesn't (e.g. log output) Opus 5.5 was able to easily write one that worked perfectly.
It even added ANSI colour support... which I am still on the fence about but it did make the very good point that it means the logging is exactly the same in GUI and CLI mode.
I'd like to know it. I don't think that it can be substantially better. You have to compromise between the amount of customization you are allowed to do and the amount of options you have to pick values for.
I can't vouch for GPUI, I don't know how good its compromise is, but it bears enough similarities to other modern UI-toolkits. I don't think there is a better way, but if you know one, I'd like to know about it.
And, well, don't forget, it is a front-page example, that is not necessarily an example how one should compose their code, it demonstrates what you can do with GPUI. In real life code you'd probably move those children's construction into separate named functions, maybe you'd use some predefined styles to apply to individual elements, instead of picking fg/bg/text-colors, maybe sizes and some other attributes for each one explicitly, and maybe some other tricks.
All a language needs to be good at expressing UIs is some sort of tail lambda syntax like Swift and Kotlin. It's the perfect way to express a tree structure (which is essentially all UI) while also being in a true programming language (as opposed to a markup language like XML).
Well, keep in mind that you’re not expected to have the entire UI in one statement. You’re supposed to break this up into functions. That’s why stuff like Flutter and SwiftUI work.
Also, this is basically what Tailwind code looks like.
That's a result of the borrow checker meeting dev ergonomics. Method chaining/functional style ks extremely common. GPUI is also fairly low level, it lets you do a ton of things!
I would hardly draw that conclusion from this paper. It's a meta analysis of a handful of studies with fairly low sample sizes, and it wasn't immediately clear that there was any controlling factor wrt amount consumed. There are also a lot of statements pointing out there was no statistically significant difference for various metrics...
The EE/IC Design part of me loves this for trying to build a community around what is typically a very opaque and secretive industry. The social justice / millenial part of me hates this for being funded by high frequency trading, of all things. What a colossal waste of resources.
>>The social justice / millenial part of me hates this for being funded by high frequency trading, of all things. What a colossal waste of resources.
It's more efficient now than it used to be - by which I mean the total taken by HFTs is lower than what people used to pay in spreads and commisions. Price discovery is better (you get closer to a fair price if you trade) and spreads are lower. The whole industry that used to prey on spreads and ignorance of retail investors is gone. What not to like about HFT?
The HFT industry creates an investment opportunity that's somewhat detached from business fundamentals. If you can trade on the volatility alone, you no longer need to pick investments based on their future prospects and behaviour.
Last I checked, Apple makes arguably useful products like smartphones and laptops.
Though admittedly the former have turned into pocket attention black holes (and enragement/slot machines) and Apple itself created the scourge of public Facetime calls.
I know some people don't see these as benefits (compared to "useful products like smartphones"), but we do cause instrument pricing to be more accurate and a thinner buy/sell spread and greatly increase liquidity.
It might be helpful to explain in plain language what you mean by increasing liquidity. As I understand it, marginal spread reductions only marginally improve your ability to sell at or near a particular price, and they provide no benefit to you if no one is buying near your sell price, or if there aren't enough buyers available overall.
But it would be interesting to see some quantitative data on the effect.
Increasing volatility and enabling fast algorithmic trading may not be good things overall, even if some traders benefit.
And as I noted, if you care about fairness in an online game, usually you try to remove the penalty effects from long ping times (or the bonus effects from short ping.)
>>The social justice / millenial part of me hates this for being funded by high frequency trading, of all things. What a colossal waste of resources.
HFT makes the market more efficient, just like the AI eliminating jobs makes business more efficient. It's been numbing watching HN gladly sacrifice it's own to the altar of AI over and over. There is no moral high ground.
Personally as a retail quant, it's really rewarding to build models that extract edge from the market using the very AI tools that have eliminated all hope of ever re-entering the tech-field absent being an entrepreneurial founder.
i remember trading a us stock twenty years ago, i don't live in the us, i used a discount broker, the flat commission was something like $20+percentage of trade. this was significantly after there had apparently a massive drop in costs.
there is some kind of amnesia that exists with things that used to cost massive amounts but are now close to free. it is just not possible to explain to someone that in the recent past, most people were just unable to own stocks because of costs.
HFT isn't necessary for cheap online trading. You can have bulk transactions execute once per day for very low cost and that's good enough for an efficient market. Companies spending billions to beat other bidders by milliseconds is just rent extraction with computers.
it isn't good enough for an efficient market. this is a common idea amongst people who have never traded. if it was possible to trade this way, it would happen already. this is how some non-equity markets trade. equities do not trade this way because people do not want it. the system we already have has ludicrously low costs.
No, it's because people who stand to make money off it want it.
Society is full of examples of things that people want and that would save money and make a lot of sense that are blocked by people rent seeking off the status quo. Free tax filing provided by the government is one particularly obvious example.
"Do it better" doesn't work for monopolies. A company offering trades at lower intervals doesn't work when the NYSE etc. controls the actual platform, the minimum fees, the granularity of transactions, etc.
The core problem is that large numbers of people trade for effectively no good reason. Because of HFT, these people are now less screwed than they were previously. The "house" is competitive.
Yes, it's a profitable business for HFT. I'm not too bothered by that.
If you want to direct your ire somewhere, direct it at companies like Robinhood that are gamifying financial markets.
Things are a bit cheaper. It's pretty diffuse, but then so are the supposed harms they perpetrate as well. HFT is realistically a tiny part of modern finance. Huge numbers of professional traders made in total much more money doing the same job before it was automated.
Strong disagree. Liquidity at the level of milliseconds means insider trading and other information disparity is more profitable and encourages people to make rash decisions on incomplete information rather than well informed decision.
I'd love go see any information that proves that trades at the millisecond level lead to measurable improvements over, say, trades executing once per hour.
They seem to lead to measurable improvements for HFT companies, who seem to benefit from incrementally faster information and execution, and high volume (which might be reduced if trades were hourly.)
It might be harder for HFT to make money if trades were processed in random order on the hour, though they would probably still have an edge.
Online games that care about fairness try not to turn into a competition for the lowest ping time.
Good outcomes for HFT companies doesn't mean good outcomes for the market.
The government abandoning free tax filing software is GREAT for Intuit - they make a lot of money off it. It's awful for the rest of the population and the country as a whole.
As I understand it, liquidity requires buyers, so middlemen (HFT) with a smaller spread than traditional brokers (because of speed and volume) might increase the number of buyers slightly. I'd like to see quantification for this oft-repeated claim of "increased liquidity", which seems fairly marginal at this point.
They group dozens to hundreds of designs on one chip. The end result is that even hobbyists can afford to have their small ASIC on real silicon. It's still expensive but it's within reach of a serious enthusiast with a steady job.
this reply isn't in good faith. OP is being self critical examining contradictions of living in complex interdependent societies. why are your queries so aggressively factional?
There is a very vocal minority of folks that when they come across a comment that at all looks like an opponent of ancap [1], they become unhinged, even in this case where the GP was being internally reflective about their own beliefs.
The irony has most likely circled their drain (which just goes into a creek anyways).
Which is especially ironic when they bring up an example like Cuba, where at least today, you can’t really say whether the policies or de facto sanctioning it receives are at fault for the current economic state.
they just said a planned economy where people's judgements of what is "valuable" allocate resources would not be a good idea, i dont see how that is "ancap" nor really all that wrong?
I don’t think Jane Street does high frequency trading. I think you might be thinking of Citadel or HRT. Jane Street is more of an old-school quant hedge fund, no?
Their bread and butter was, and as far as I know still is, trading in ETFs and ADRs. These things have a mechanism to create and redeem in exchange with underlying securities. This means one can make some money arbitraging differences between the bundle and components.
As this game got more competitive they seem to have branched out into other kinds of business including HFT.
It's even worse than just the same flight number. Both were at PHX, one landing, one taking off at the same time. Kudos to a clever ATC for preventing what could've been a catastrophe: https://youtu.be/93lLXNsWp9Q
The YouTube video you link to is actually about a separate incident from the one described in the article. The video is about an incident involving two AAL2482s near Phoenix; the article is about an incident involving two AA5083s near Providence.
It's the same idea though; one was inbound, the other outbound, and ATC had to distinguish between the two.
Not to mention the huge WTF factor of them being in different parts of their flight and the instant issues that would cause when the ATCs try to do anything with them.
"Hey why did you just tell a flight that's on approach to taxi"
I very much dislike this extension because it uses a built-in ssh client that is far from feature complete and does a lot of reinventing the wheel. Microsoft's extension uses the system ssh binary, as does https://open-vsx.org/extension/aergic/zygos-vscodium which I much prefer. After discovering the latter, I uninstalled VSCode and have fully moved to VSCodium.
> div() .flex() .flex_col() .gap_3() .bg(rgb(0x505050)) .size(px(500.0)) .justify_center() .items_center() .shadow_lg() .border_1() .border_color(rgb(0x0000ff)) .text_xl() .text_color(rgb(0xffffff)) .child(format!("Hello, {}!", &self.text)) .child( div() .flex() .gap_2() .child(div().size_8().bg(gpui::red())) .child(div().size_8().bg(gpui::green())) .child(div().size_8().bg(gpui::blue())) .child(div().size_8().bg(gpui::yellow())) .child(div().size_8().bg(gpui::black())) .child(div().size_8().bg(gpui::white())), )
reply