HackerTrans
TopNewTrendsCommentsPastAskShowJobs

needlesslygrim

no profile record

Submissions

Sony Proposes Changing LLVM Clang Default to C++20 Mode

phoronix.com
13 points·by needlesslygrim·2 yıl önce·0 comments

comments

needlesslygrim
·4 ay önce·discuss
While Swift now has the `borrowing` and `consuming` keywords, support for storing references is nonexistent, and the only way to return/store `Span`s, etc, is only possible through using experimental `@lifetime` annotations.

Swift is a nice language, and it's new support for the bare necessity of affine types is a good step forward, but it's not at all comparable with Rust.
needlesslygrim
·8 ay önce·discuss
> extremely inefficient strings (erlang)

Doesn't most modern Erlang code use binaries instead of charlists? Elixir and Gleam certainly do.
needlesslygrim
·9 ay önce·discuss
> Rust has some support for zero-runtime, but a lot of it's features is either useless of outright in the way when you are not using a heap.

Could you give some examples?
needlesslygrim
·11 ay önce·discuss
That's good to hear, I guess it's possible a thicker module could be made in the future with more cooling potential?
needlesslygrim
·11 ay önce·discuss
I'm very impressed you managed to get nvidia to give you access to the 5070! I have one queetion though, is the 5070 limited to 100W because of the docking connector, or for cooling reasons?
needlesslygrim
·geçen yıl·discuss
That makes sense, and it's interesting that both you and Linus Torvalds maintain your own versions of Micro Emacs. Sign of greatness perhaps :)
needlesslygrim
·geçen yıl·discuss
I'm curious, why don't you use GNU Emacs?
needlesslygrim
·geçen yıl·discuss
Oh I see. I assumed being able to explicitly yield unit meant statements were essentially just syntax sugar for unit. Thanks for the correction.
needlesslygrim
·geçen yıl·discuss
Well, Rust barely has statements [1]. Nearly everything in Rust is an expression, and AFAIK statements /are/ essentially expressions that yield `()` [2].

[1]: https://doc.rust-lang.org/reference/statements.html

[2]: https://play.rust-lang.org/?version=stable&mode=debug&editio...
needlesslygrim
·geçen yıl·discuss
In China WeChat is the dominant messaging platform, SMS is only used for delivery notifications, spam, etc.
needlesslygrim
·geçen yıl·discuss
That's probably fair.
needlesslygrim
·geçen yıl·discuss
> Async Rust is painful

On the other hand, I've found normal threading in Rust quite simple (generally using a thread pool).
needlesslygrim
·geçen yıl·discuss
Well if you're going to eat crow, I may as well eat pigeon, for I didn't realise that paper wasn't showing real source.

Thanks for the link to the LCF text though :^)
needlesslygrim
·geçen yıl·discuss
I think this criticism is silly. Here's what your first example would look like in a language with keywords (where reasonable, perhaps like C#) instead:

  pub fn play<lifetime p>(in out self, player: mut ref AnimationPlayer lifetime p, new_animation: AnimationNodeIndex, transition_duration: Duration) -> mut ref AnimationPlayer lifetime p
But, this is still confusing! Let's remove even more symbols, and make the syntax more obvious by removing abbreviations:

  PUBLIC FUNCTION Play
  LIFETIMES
    P
  PARAMETERS
    IN OUT Self
  Player AS MUTABLE REFERENCE TO AnimationPlayer WITH LIFETIME P
  NewAnimation AS AnimationNodeIndex
  TransititionDuration AS Duration
  RETURNS MUTABLE REFERENCE TO ActiveAnimation
  BEGIN
  ...
  END
IMO, using keywords instead of symbols for references, lifetimes, etc, would just make Rust overly verbose, and there's a reason BCPL used braces instead of BEGIN/END :^)
needlesslygrim
·geçen yıl·discuss
Well, ML (or at least the first versions of it) used a λx • x syntax [1] for λ-abstractions, the same (excluding the use of • over .) notation as used with the Lambda Calculus, and I've always assumed \ was an ASCII stand in.

[1]: https://homepages.inf.ed.ac.uk/wadler/papers/papers-we-love/... (can be spotted on page 353)
needlesslygrim
·geçen yıl·discuss
Unfortunately, while `dynamic` is used for dynamic typing in C#, `var` is just type inferenfe like `auto` in C++.
needlesslygrim
·2 yıl önce·discuss
This is interesting because these semantics seems to be a direct(ish) clone of Rust's. I wonder if this moves Swift's performance ceiling closer to Rust's?
needlesslygrim
·2 yıl önce·discuss
I'm also interested in why the MIT license was chosen. I guess it's because of the plan to create 'libghostty'?
needlesslygrim
·2 yıl önce·discuss
I agree, this doesn't seem to be much better than adding `throws Throwable` to all your methods that can fail in Java. The reason sum types are so useful for error handling is that all possible cases can be exhaustively checked against at compile time.
needlesslygrim
·2 yıl önce·discuss
There are, at least in my opinion, many more reasons to use Kotlin than null-safety and data-classes/records, especially on Android (Jetpack Compose).