News for hackers. Stuff that matters.

bicarbonato

Re:Apt Rust requirement raises questions on Tuesday November 25, 2025 @11:01AM (#46047099)
What do people actually mean when they say "the syntax is janky"?

I often see comparisons to languages like Python and Kotlin, but both encode far less information on their syntax because they don't have the same features as Rust, so there's no way for them to express the same semantics as rust.

Sure, you can make Rust look simpler by removing information, but at that point you're not just changing syntax, you're changing the language's semantics.

Is there any language that preserves the same level of type information while using a less "janky" syntax?

Re:(On | No) Syntactic Support for Error Handling on Tuesday June 03, 2025 @05:33PM (#44174986)
> I love inaction as a default decision

The thing is, inaction is not simply "not taking an action"; Inaction is taking active action of accepting the current solution.

> I doubt that the best proposals are so horrible for some people that they’d hold a grudge and leave Go.

But people may leave go if they constantly avoid fixing any of problems with the language. The more time passes, the more unhappy people become with the language. It will be a death by a thousand cuts.

I love go. But their constant denial do fix obvious problems is tiring.

Re:F-strings for C++26 proposal [pdf] on Wednesday February 05, 2025 @07:38PM (#42957485)
> How are concepts fixing a problem created by previous features to the langue?

Concepts fix implicit template requirements

> What about ranges?

Fix the bad iterators

> Auto

Fix the the overly long type names

> Move semantics

This is mostly necessary because of excessive copies that cpp does

> Consteval

Fix cases where constexpr couldn't do it at comptime

Re:Pornhub Blocked in Texas on Thursday March 14, 2024 @06:33PM (#39709731)
Some news websites conduct A/B testing for titles. Maybe it was one of the options.
Re:Fiber in C++: Understanding the Basics on Sunday September 24, 2023 @08:49AM (#37632658)
Setting aside certain implementation details, here's the basics:

Kernel Threads (aka threads): OS-Level and preemptive.

Green Threads (aka lightweight threads, virtual threads or goroutines): User-level and preemptive.

Fibers: User-level (sometimes OS-level or offered as a OS library, like in Windows) and cooperative.

Coroutines: User-level and cooperative.

Re:I made a guitar tuner app using Flutter and Rust on Monday October 10, 2022 @10:44AM (#33152020)
Is the app the same as the desktop version feature wise?
It might not be a great language to create compilers, but python also has a pretty good structured pattern matching as of version 3.10:

  class BinOp:
     def __init__(self, left, right, operator):
         self.left = left
         self.right = right
         self.operator = operator

  sum_of_ints = BinOp(left=1, right=1, operator='+')

  match sum_of_ints:
     case BinOp(left=int(left), right=int(right), operator='+'):
         print(f'Summing int {left} + {right}')
     case BinOp(left=str(left), right=str(right), operator='+'):
         print(f'Concateneting strings {left} + {right}')
     case _:
         print('Don\'t know how to sum this')
Re:A Shader Trick on Wednesday February 23, 2022 @11:54AM (#30443156)
I believe that every game have this problem if you are far enough away from the origin. 3kliksphilip did a great video on this subject: https://www.youtube.com/watch?v=eK7eNgiQfhk