jim_stark

joined 1 year ago
[–] jim_stark@programming.dev 1 points 1 month ago* (last edited 1 month ago)

UK has left the chat.

[–] jim_stark@programming.dev 5 points 1 year ago* (last edited 1 year ago) (3 children)

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

[–] jim_stark@programming.dev 1 points 1 year ago

Thanks.

The link suggests it might be undone after GRUB updates. Maybe I will just edit the line and at the init level at the boot menu.

Ah, yes. I felt a bit uncomfortable posting here, glad to know linux4noobs exits here; subscribed.

 

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?

[–] jim_stark@programming.dev 3 points 1 year ago

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

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

Thank you!

 

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.

[–] jim_stark@programming.dev 1 points 1 year ago

Interesting take!

[–] jim_stark@programming.dev 1 points 1 year ago

Yep, that's a good reason. I guess dot files should also be downloaded from github just like extensions. Makes this stuff a lot easier.

[–] jim_stark@programming.dev 2 points 1 year ago (2 children)

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

[–] jim_stark@programming.dev 1 points 1 year ago

My bad. I can't find the actually video but there exits a startup that shutdown because Rust/WASM performance wasn't any better on top of that it's was harder to develop with Rust. But as my edit to my previous comment shows things got better for Rust. It's no longer the case.

[–] jim_stark@programming.dev 4 points 1 year ago (1 children)

compose into some crazy one-liner piped chains of commands

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

[–] jim_stark@programming.dev 4 points 1 year ago* (last edited 1 year ago) (2 children)

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.

[–] jim_stark@programming.dev 1 points 1 year ago (2 children)

Is Linux officially supported by Apple on their desktops and laptops?

 

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

 

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 ›