[-] [email protected] 6 points 2 years ago* (last edited 2 years ago)

Edge is stuff tacked on Chromium. How can it be better?!

6
submitted 2 years ago by [email protected] to c/[email protected]

One can boot into the command from grub by editing kernel parameters.

Another way is edition the grub configuration and setting GRUB_CMDLINE_LINUX_DEFAULT="text". But now it's not possible to boot into a graphical env.

So is there way to create menu entry just for command line so it will be one of the ways to log into the system?

[-] [email protected] 3 points 2 years ago

This, .clangd, file in the root of the project directory worked:

CompileFlags:
  Add: [-std=c++20]

Thank you!

8
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]

I use Helix Editor and by default it uses clangd as LSP server.

But when I use "newer" C++20 features I get warning messages in the editor that they are only available in "later" C++ versions or I get straight up error messages.

So how do I tell clangd that I am writing C++20 code? I am guessing passing an argument (-std=c++20) or creating a "project properties" file...

This is the Helix Editor configuration file, languages.toml:

[[language]]
name = "cpp"
language-server = { command = "clangd", args = [] }
auto-format = true

Please let me know the right way to do it.

[-] [email protected] 4 points 2 years ago

JS simply does not care.

[-] [email protected] 6 points 2 years ago* (last edited 2 years ago)

Aren't we past that point?

VS Code is Electron based and it can even be deployed in the cloud. We are talking about one of the most popular IDEs.

[-] [email protected] 3 points 2 years ago

What about maintainability of large code bases? JS even with TS tacked isn't so great or at least not as good as Rust.

[-] [email protected] 4 points 2 years ago

compose into some crazy one-liner piped chains of commands

Why not something that is completely redesigned from the ground up:

[-] [email protected] 4 points 2 years ago* (last edited 2 years ago)

IIRC a startup tried to exactly that... It's wasn't any faster and is actually harder to develop.

EDIT:

Sorry ignore these videos. I don't remember which YouTube video it is. But more importantly Rust + WASM got really better than JS these days.

[-] [email protected] 4 points 2 years ago

Nobody:

Google: Software Morghulis

[-] [email protected] 3 points 2 years ago

Yeah, C# and Rust, in their own ways, pretty much covered what D lang set out to do.

[-] [email protected] 3 points 2 years ago

Just curious why is "reproducing the setup" important to you? You need to install it on a lot of systems?

[-] [email protected] 6 points 2 years ago

reference compiler closed source

Is it still closed source? What is the reason?!

[-] [email protected] 9 points 2 years ago

FYI: There is a Linux distro that bets heavily on D Lang, Serpent OS.

5
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]

The documentation uses is in the example for "declaration patterns" but the book I am reading uses a switch statement. But when I try to run the code I run into errors.

using System;

public class Program
{
  public static void Main()
  {
    var o = 42;

    switch (o) {
      case string s:
        Console.WriteLine($"A piece of string is {s.Length} long");
        break;

      case int i:
        Console.WriteLine($"That's numberwang! {i}");
        break;
    }
  }
}

Error:

Compilation error (line 7, col 6): An expression of type 'int' cannot be handled by a pattern of type 'string'.

EDIT

Changing from

var o = 42;

to

object o = 42;

worked.

Full code: https://github.com/idg10/prog-cs-10-examples/blob/main/Ch02/BasicCoding/BasicCoding/Patterns.cs

5
submitted 2 years ago by [email protected] to c/[email protected]

What does "control falls through a switch statement" mean in this context? Control just moves on to the next statement?

I thought if there is no match and a default case doesn't exist it will raise an exception. Is it not true?

view more: next ›

jim_stark

0 post score
0 comment score
joined 2 years ago