Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ogoffart
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
211.
▲
by
ogoffart
6y ago
Hello HN! SixtyFPS founders here. We're two engineers who started this project ~6 months ago because we love good APIs and good toolkits that boost overall productivity. We'll be around here to answer questions. At this point, the
212.
▲
Show HN: SixtyFPS – multi-language GUI toolkit made in Rust (alpha)
(github.com)
18 points
by
ogoffart
6y ago
|
5 comments
213.
▲
by
ogoffart
6y ago
The cpp and cxx crates are two different crates with different goal. The cpp crate is about convenience, but require the use of unsafe within the rust code. The cxx crate do extra checks making the rust code safer but needs more boilerplate
214.
▲
by
ogoffart
6y ago
> The ubiquitous kmalloc() function, for instance, is defined as __always_inline, meaning that it is inlined into all of its callers and no kmalloc() symbol exists in the kernel symbol table for Rust to link against. This problem can b
215.
▲
by
ogoffart
6y ago
> Ok, let's try: Do SQL without the SQL syntax. Select(`my_table`, [`column_A`, `column_B`]) .Filter(`column_C` > 53 && `column_D` == $varA) .Sort_by(`column_C`) There you go: you have the exac
216.
▲
by
ogoffart
6y ago
I'm using this to write Qt bindings: https://github.com/woboq/qmetaobject-rs/ > Is it just about convenience so you don't need to bother with putting your C++ code in a different file? Yes, mostly.
217.
▲
by
ogoffart
7y ago
I am the one who contributed Span::source_text to rust. My motivation for doing that was exactly the same as the author of the blog post, and was to help implementing the cpp! macro which embeds C++ within rust just like this python! macro.
218.
▲
by
ogoffart
7y ago
Ask yourself if his criteria applies to you: > Reliability While C is indeed a winner for obscure platforms, many language gets you perfectly covered for a "cross-platform" game. > Performance You can get equally good perfor
219.
▲
by
ogoffart
7y ago
No, it is no longer a tech demo. > not sure what binary compatibility has to do with it ... Because the meta object generated by the verdigris macro will continue to work with newer version of Qt. But in Qt6, the binary format will chang
220.
▲
by
ogoffart
7y ago
Gtk uses GLib which basically re-invent object oriented programming with "complex preprocessor-macr-ridden c code" boilerplate. I find moc approach much superior to that as it just help the programmer concentrate on what to progr
221.
▲
by
ogoffart
7y ago
It started out as a tech demo. Then people started using it and reported bugs and features request. So support for MSVC was added, and version 1.0 was released. It is relatively low maintenance given that Qt maintain binary compatibility an
222.
▲
by
ogoffart
7y ago
I've read another article related to this about a year ago: "The unbelievable tale of a fake hitman, a kill list, a darknet vigilante... and a murder": https://www.wired.co.uk/article/kill-list-dark-web-h
223.
▲
by
ogoffart
7y ago
Depends on the (not-yet-implemented) implementation of async functions in traits. But currently, with the async_trait macro, there is only one version of Foo::foo, and it returns a Box<...>. But it is true we could imagine the compil
224.
▲
by
ogoffart
7y ago
> A language can't be "faster than C". Why not? For instance, with current hardware, the good use of SIMD is critical. If you can't write vectorized code in (standard) C while you can do it in another Language, that w
225.
▲
by
ogoffart
7y ago
> I think the biggest pain in hosting your own mail server is getting your outbound mail delivered into the mailboxes of the large providers without being marked as spam Why do you think that? The article mention exactly this could jus
226.
▲
by
ogoffart
7y ago
No they are not. When your program invoke UB, it is a bug in your program, and not in the compiler. The compiler author are helping you with things like -fsanitize=undefined. Or even lets you define some behavior which is normaly undefined
227.
▲
by
ogoffart
7y ago
This is not possible. void foo(int x) { if (x) do_something(); else do_something_else(); } void fn1() { foo(0); } void fn2() { foo(1); } When the code is inlined, the compiler can propagate constant and opt
228.
▲
by
ogoffart
7y ago
It looks like the `fluent` library is to blame for the bloat here. I have myself made another localization library that use a simpler model and compiles quite fast when using the rust `gettext` backend: https://github.com/w
229.
▲
by
ogoffart
7y ago
It has been done already: https://github.com/woboq/qmetaobject-rs
230.
▲
by
ogoffart
7y ago
Using QML from rust: https://github.com/woboq/qmetaobject-rs
231.
▲
by
ogoffart
7y ago
You are absolutely right, but my point is that when you do modern C++, in the application code, it is very unlikely that you need to use reinterpret_cast in your code, and therefore you don't need to know all the subtlety about it. So
232.
▲
by
ogoffart
7y ago
And that's why people claiming that C++ is more complicated than C because it has an even bigger specification miss the point. What counts is how easy to use in practice. You can get along just fine in C++ without knowing the exact ali
233.
▲
by
ogoffart
7y ago
It does not matter if there are any architectures like that. Relying on that fact is still an undefined behavior. The compiler is allowed to produce any code it wants. If you use memset to initialize structure with pointers with 0 and then
234.
▲
by
ogoffart
8y ago
Yeah, i know you can even do it without providing the type: #define wl_container_of(ptr, sample, member) \ (void*)((char *)(ptr) + ((char*)(sample) - (char*)(&(sample)->member)))
235.
▲
by
ogoffart
8y ago
> Maybe that’s the reason people who use the C language love it so much. You can’t do that in any other language. But you can't do it in C. __typeof__ is a GNU extension. > Note that wl_list is not a very safe data structure, in
236.
▲
by
ogoffart
9y ago
Only if they are tainted with the same "tag". What if one of the theft is only recognized in one jurisdiction? What if Alice and Bob separatly track their coins?
237.
▲
by
ogoffart
9y ago
Also: 1. steal n coins from Bob 2. steal n coins from Alice 3. move these 2*n coins to the same addresse. 4. give n coins to Charlie: these are stolen from both Alice and Bob. 5. the remaining n coins are clean.
238.
▲
by
ogoffart
9y ago
Actually, we've had to add "Mozilla" in the user agent of one of our program because users have been complaining being blocked by some proxy.
239.
▲
by
ogoffart
9y ago
Speculating here: Maybe developers are testing/debugging on some VM with older Windows, without that machine be their development machine.
240.
▲
by
ogoffart
9y ago
But the C++20 concepts is only concept lite. It does not check the implementation of the template function that it only uses operations available for the conceps. suppose you have a concept Hashable that is only enabled for type with a hash
More ›