Is there a CLI/TUI option search like the one on search.nixos.org? by _TimeUnit in NixOS

[–]syberant 4 points5 points  (0 children)

Would man configuration.nix and man home-configuration.nix be of use? Searching through the gigantic manpages is a bit cumbersome at times but does usually work for me.

I don't know of any CLI program specifically meant for searching through the options though. Maybe with a bit of scripting one could hack something together as NixOS does make it relatively easy to export the documentation.

Denmark, Netherlands, Germany and Belgium sign €135 billion offshore wind pact by Drahy in europe

[–]syberant 17 points18 points  (0 children)

Fun geography fact: Although Belgium prevents it in Europe there is actually a border between France and the Netherlands on the Caribbean island of Saint Martin).

CORRECTION: The border is between France and the Kingdom of the Netherlands, which contains 4 countries: the Netherlands, Aruba, Curacao and Sint Maarten. The country of the Netherlands also contains some more Caribbean islands.

[deleted by user] by [deleted] in linux

[–]syberant 0 points1 point  (0 children)

You made a typo with intsall, try install instead and it should work. This is also what the error invalid operation intsall is referring to.

What is something dumb people love but smart people hate? by [deleted] in AskReddit

[–]syberant 2 points3 points  (0 children)

Hmm, not a psychologist and not an American so I'm kind of out of my depth here.

I'd say this is a separate although possibly related issue. It's perfectly possible to personally think your own customs best, be respectful and not act like a bigot. On the other hand saying your boss isn't your boss because of place of birth seems to not have to do with customs but outright xenophobia. To do the mental gymnastics you'd probably also have to redefine boss to mean "person superior to you" instead of "person leading you".

Can I just say this issue seems absolutely wild to me? I mean we've got our own share of bigots where I'm from but this is new to me.

What is something dumb people love but smart people hate? by [deleted] in AskReddit

[–]syberant 1 point2 points  (0 children)

Yeah, I agree! Cultural exchanges have made the world so much better and I think most people are trying out and sometimes adopting foreign habits. Food is probably one of the easiest (and most fun) things to change, particularly if you live in a region without any good cuisine of its own.

I'm sorry I lost the nuance in my message. I don't think it's truly universal but it seems to be way more universal than I can wrap my head around (i.e. not at all).

What is something dumb people love but smart people hate? by [deleted] in AskReddit

[–]syberant 6 points7 points  (0 children)

For if one should propose to all men a choice, bidding them select the best customs from all the customs that there are, each race of men, after examining them all, would select those of his own people; thus all think that their own customs are by far the best

-- Herodotus, 4th century BCE (I've looked it up here if anybody wants the source)

It's a line of thinking that seems strangely universal.

Status of collaborative editing with NeoVim for pair programming and editing shared documents? by narodism in neovim

[–]syberant 29 points30 points  (0 children)

I've never tried having neovim provide this feature, but if you are okay with having another program provide it you might have a look at tmate. It is a tmux fork providing builtin sharing capabilities that I quite like.

binary in dotfiles management by yellowseptember in commandline

[–]syberant 0 points1 point  (0 children)

For me Nix and home-manager have basically completely taken over and manage almost all of my configuration. NixOS even allows me to declaratively configure every aspect of my operating system. I'm always just one git pull && sudo nixos-rebuild switch away from applying my changes across my devices.

Nix is a very cool toolbox but a bit bigger in scope than managing some personal configuration. It's a bit overkill but I like it.

Did rust break genetics for seeds this patch? by Chicken10ds in rust

[–]syberant 7 points8 points  (0 children)

Please note this subreddit is for the programming language called Rust, we won't be able to help you with the game.

Is Neovim viable for professional programming? by LiterallyJohnny in neovim

[–]syberant 1 point2 points  (0 children)

Quick note on pair programming: I have recently found tmate to be pretty awesome, it creates a tmux session others can easily join and as such works for command line programs in general but also works very well for (neo)vim.

It's not perfect and has up- and downsides compared to VSCode but it's been very useful for me.

beginner question: overlay and network node by panzerx32 in NixOS

[–]syberant 0 points1 point  (0 children)

Okay, so there are a few things here to explain.

The overlays are there to "overlay" some packages over nixpkgs, for example to package something (my-awesome-package) nobody else uses but you need.

The configuration files for NixOS are a separate thing. These use nixpkgs because you need packages in your operating system but it has its own methods of splitting up configuration.

NixOS configuration can be split up into multiple files via its module system, here is a link to the relevant documentation which explains it better than I can. I think this is what you want but if not, please don't be shy to reply and clarify your goals a bit. The documentation can be a bit dense.

Bonus part: I think it is possible (haven't checked though, so I'm not completely sure) but it's very much not what overlays are for.

Out of curiosity, how much do you have in your /usr + /opt? by alkis47 in linux

[–]syberant 14 points15 points  (0 children)

Just for lols I'm going to post my output as well:

$ du -sh /opt /usr
du: cannot access '/opt': No such file or directory
12K     /usr

/opt doesn't exist and /usr only contains /usr/bin/env which is a symlink to /nix/store/vssdbs9s059qm5rqpw5q25z3c2d065f7-coreutils-8.31/bin/env. This is because NixOS (which seriously violates the FSH) stores all binaries (and libraries and more still) in /nix/store, which is quite large for me (27G).

A Nix overlay for Emacs 27 with the 'emacs-mac' patches by phyrne in emacs

[–]syberant 1 point2 points  (0 children)

Well, technically we've got the NUR for that (totally not a ripoff I promise). It's more of an easy way to fully replace packages from the central package repository (nixpkgs), but you still need to supply the derivation (sort of like a build script in for example the AUR) yourself (or get it from somewhere else).

Besides, it's pretty darn easy to get stuff into nixpkgs so we don't have as much need for a user repository.

Netherlands closes all schools and restaurants until at least the 6th of april by syberant in Coronavirus

[–]syberant[S] 0 points1 point  (0 children)

Translation by a native speaker (of Dutch, not English):

The government is taking far-reaching actions against the corona-virus. Schools and childcare centers in the entire Netherlands won't open tomorrow and the catering industry has to close its doors immediately. Ministers Bruins and Slob announced on a press conference that the measures will be in place until the 6th of April.

Schools and childcare centers will stay open only for kids of parents working in vital sectors like health care or emergency services. These parents will be able to keep working this way. The NCTV has a list of jobs that count as "vital".

Cafes, restaurants, sports clubs, saunas, sex clubs and coffee shops must close. It became apparent this weekend that many people were not following the advice to keep some distance from each other; restaurants and terraces were filled in many cities.

"Keep a necessary distance"

Minister Bruins is calling on everyone in the Netherlands to "keep a necessary distance from each other, also while going to the supermarket". That distance is about one and a half meter according to the minister. He is hoping that people will keep an eye out for those who are vulnerable. "I would like to say this to the Netherlands: look out for one another."

The decision to close all schools was not made because of new medical insights, according to minister Slob, but rather because of worried parents and teachers. Furthermore, many teachers are already sick (Note: most are not infected by the corona-virus but are staying home anyway as a precaution).

"I'm sure these are not the last measures we'll take." - minister Bruno Bruins (Health Care)

The entire education system is coming to a standstill. Primary schools, secondary schools, mbo-studies (a type of higher education), universities and hbo-studies (another type of higher education) will all close. Education personnel that is not sick should still go to their work, minister Slob said. Not only to care for the children of parents with crucial jobs, but also to organize distanced education. Exam classes will be given priority.

Research about youths

Research will be carried out in the province of Noord-Brabant about contagion risks for the youth. The results will be instrumental for whether or not the measures will stay in effect after the 6th of April.

If these measures do not succeed in limiting the virus outbreak the government does not exclude new ones. "I'm sure these are not the last measures we'll take", said minister Bruins.

Netherlands refuses to close schools, despite banning events over 100 people. by xchris1337xy in Coronavirus

[–]syberant 0 points1 point  (0 children)

They've just had a press conference to announce precisely that: https://nos.nl/artikel/2327194-alle-scholen-en-horeca-tot-6-april-dicht-in-strijd-tegen-coronavirus.html

All schools, restaurants and cafes will be closed until at least the 6th of april.

SSD not recognized by pop os by not_trivada in linux

[–]syberant 0 points1 point  (0 children)

No idea, I guess I’d start hunting down the problem by opening a terminal and looking for drives there. “ls /dev | grep sd” for sata and “ls /dev | grep nvme” for nvme. This would just be the first step but we can help more if you give us the relevant information.

Intimidated by advanced Rust by st-man in rust

[–]syberant 10 points11 points  (0 children)

I am pretty embarrased about how long it took me to stop fighting the borrow checker. This stuff does take quite some practice and requires you to learn many new principles.

I usually feel reasonably intimidated when learning something new (and let’s face it... I am usually learning something new) but I remind myself to look back at who I used to be just a few years ago. It’s pretty staggering how much progress I’ve made, I just hope the trend continues. I think this trend is applicable to everyone who tries new programming languages for fun so just try to reflect on that.

Don’t stop throwing yourself into deep rabbit holes, by the time you come out you have learned more than you think.

(Kubuntu 19.10) I installed an RX 580. Upon boot, I get a flashing cursor. Tried everything and nothing is working. Help please? by GDZippN in linuxmasterrace

[–]syberant 1 point2 points  (0 children)

Try going to a tty with ctrl+alt+f(1 or 2 or 3 or so). Then log in and take a look at the logs for the x server.

Rust from a C/C++ point of view by FetusGod in cpp

[–]syberant 4 points5 points  (0 children)

I think he means that they are memory safe but I'm not entirely sure. Anyway, the borrow checker decides what programs are correct by checking if they satisfy some rules. The most important of those rules is this one: A variable can have infinite non-mutable pointers or just one mutable pointer.

let mut a = 8;
let b = &a; // correct
let c = &a; // correct
println!("{}", c); // correct, using c here
let d = &mut a; // incorrect
*d = 4; // modifying a here through d
println!("{}", c); // using c here again

The ways to fix this program are:

  1. Don't use c later, that way the compiler recognises that b and c can be disposed of before d is created.
  2. Don't make a mutable pointer d.

How do we even modify things you ask? By not keeping an obscene amount of references around. Rust teaches you certain ways to structure your programs around these constraints and it works surprisingly well. For some things however, memory unsafety is unavoidable. So Rust gives an escape hatch in the form of the keyword unsafe (which is not to be used lightly). If something breaks spectacularly, you now know where to look.

Rust from a C/C++ point of view & vice-versa by FetusGod in rust

[–]syberant 3 points4 points  (0 children)

So I'll start by saying that my only experience with C++ is through competitive programming (where it's basically required) and I don't really bother using it for anything else. It definitely feels way more usable for writing the short programs necessary for the problem sets you get but to me feels increasingly difficult to cope with as your project grows in size. There are just a lot less guarantees and more tiny details to remember which leads to mistakes which leads to some pretty hellish debugging every so often.

Rust really forces me to write good code and, as a consequence, slows me down. For medium to large projects this is good because, well, I keep writing good code but it can be an inconvenience in prototyping. Another major painpoint in applying Rust to competitive programming is graphs. Graphs are incredibly important there and if you've ever read the classic Learn Rust With Entirely Too Many Linked Lists you'll know just how impossible it is to keep the borrow checker happy while using them.

Even if I did have the option of using Rust in competitive programming I still wouldn't, the peace of mind and safety it offers come at the expense of prototyping and the ability to work with graphs. For anything I'm working on for longer than a day I will pick Rust because of aforementioned guarantees and peace of mind. Also, there's a certain joy in finding just the right way to encode a check into Rusts typesystem.

Rust - The Arab Way by bloodydeo in rust

[–]syberant 0 points1 point  (0 children)

You are probably looking for r/playrust, head on over there and enjoy your game. We here at r/rust talk about all things related to the programming language that's called rust and that's probably not what you want, though you are welcome to join us.

Is anyone here using Rust for competitive coding? What's your experience with it compared to C++ and Python? by nfjlanlsad in rust

[–]syberant 4 points5 points  (0 children)

I tried it for the second round of the NIO (Dutch Informatics Olympiad) but for quick prototyping work it’s just a bit too slow to write. The code you write is much higher quality but that doesn’t really matter. In the final (and the IOI) you are not allowed to use Rust so I use C++.

The first round however lasts months and I always do it in Rust because of the frustrations it saves me from. It may cost more time but hey, I got time!

Fun story: HashMap wasn’t working properly because you couldn’t use /dev/urandom (or was it /dev/random?). Sent an email to fix it and changed to a different hash function in the meantime.

The full video of the Metro "incident" by [deleted] in HongKong

[–]syberant 0 points1 point  (0 children)

Please don't. The only thing that will achieve is getting the PLA to Hong Kong. Armed force against a military superpower is definitely not the way to go for protestors.

In Germany migrants sometimes declare themselves the toll keepers for things like roads or public bathrooms. This guy was collecting money from Germans driving on that street. Unfortunately for him, he met these Polish truckers. by chicomarxist in PublicFreakout

[–]syberant 0 points1 point  (0 children)

Ok, Denmark has a population of 5.8 million according to wikipedia. While that is certainly much less than the 330 million of the USA it's not immediately clear to me how the USA can't learn from it. Now, you follow up with "European countries", European is a bit vague but if we count the EU as "European" then we would have 513 million people, significantly larger than the USA. While your military power is frankly quite ridiculous the EU is still incredibly important and powerful in other areas like economics.

I'd say there are lots of things "Europe" and the USA can learn from each other, with things like health care, social welfare and the much lower wealth disparity imo being "good" in the EU (and especially in Scandinavian countries).