Hacker Newsnew | past | comments | ask | show | jobs | submit | rscnt's commentslogin

The president doesn't care about the issues that concern his position.

There was an intiative by the treasury to try and have people use a single document to deal with taxes, where we previously used two, this is something important for most people, the guy hasn't even mentioned on his social networks.

They also build a public vet that was supposedly financed with the earnings of BTC - when the price dropped the president mentioned that he hasn't sold any meaning all the money spent to promoto chivo or crypto has come from our tax dollars.


Most people in my circle that pay taxes and hold crypto disapprove this.

People are overall indifferent or disappointed with the decision.

We don't know who or whom holds the BTC that was bought with tax money.

It just takes a couple day of rain to have the capital flooded and our president is busy talking about crypto.

Web services build by the government are a disaster, can't handle a decent volume of requests or are simply too buggy.

With our taxes we've financed "chivo", the entire thing has been a disaster they spent an awful amount of dollars to have basically nobody use it.

Not even crypto bros use the chivo apps, most transactions can be attributed to people doing "scalping".


It's great to see a perspective from the ground on this.

I'm originally from an "emerging market" (aka 3rd world country) and I don't share the enthusiasm crypto bros do about emerging markets interacting with crypto.

It's rarely from a beneficial place. Crypto is absolutely perfect to allow a corrupt government to quietly siphon the nation. No planes full of dollar bills, no heavy gold bricks. Just a movement from one digital address to another.

Sure in a pinch it might be a lifeline, but it's a flimsy lifeline and these countries need a lot more than a glorified remittance system to recover. It's fun to laugh at NFT bros trying to buy overpriced restaurant food, but last few months have likely been disastrous for a lot of very poor people.


I can't reach "https://www.matchacha.ro/"

ping: matchacha.ro: No address associated with hostname


Article is almost 3 years old.


do you know alternatives to that? I assume PowerShell but don't know if there's anything beyond that.


You can always setup some named pipes. E.g.:

mkfifo named_pipe

echo "Hi" > named_pipe &

cat named_pipe

I used to do this in bash scripts to keep them cleaner and the lines simpler.


Named pipes and tee (or gnu parallel, depending on the problem) make this semantically much clearer. It's so much better than bracket-and-sed-hell spread out over different lines.


Where does sed come into this?


It doesn't necessarily -- I just meant that if you have <(<(...) <(...)) type structures then adding a punctuation-jumble like command in the middle of each subsubshell is a good way to murder readability quickly. Sed, and to a lesser extent, awk, tend to be good examples of tools that (can) use a _lot_ of brackets and symbols...


How does error handling together with this work? Can pipefail catch this or does one explicitly need to ‘wait’ for the background processes and check them there?


Guessing that pipefail cares 0% of which filedescriptors are used and only the exit codes of processes


I remember seeing some academic work on extending shell sematics to more complicated pipe networks, but nothing particularly promising. In industry, I think that is generally the point where people pick up "real" programming language instead of trying to work in shell; on top of my head I imagine golang with its channels and goroutines to be particularly well suited for these sort of problems. I can't say if there is something in golang that shells could adapt somehow.


But of course you can do the same thing in 30 seconds that Go would take 30 minutes for. Especially if you’re trying to process-substitute a shell pipeline, not just one command.


this looks dangerous.


Because everyone will go to Bulgaria?


anyone else having problems reaching arxiv.org?


It's working for me.


weird right? I don't know what ripgrep has, maybe it's just the name? the fact that you call `ag` but it's called `the_silver_searcher`?


It's not weird because ripgrep has had more features than ag for a long time. Originally ripgrep didn't have multi-line support or support for fancy regex features like look-around, but it has both of those now. It also has support for automatic UTF-16 transcoding, preprocessors for searching non-text files and overall less buggy support for gitignore. (Look at ag's issue tracker.)

And then there's also the fact that ag isn't that great as a general purpose grep tool. It really falls over in terms of speed when searching, say, bigger files:

    $ time rg 'Sherlock Holmes' OpenSubtitles2018.raw.en | wc -l
    7673

    real    1.475
    user    1.115
    sys     0.356
    maxmem  12511 MB
    faults  0

    $ time ag 'Sherlock Holmes' OpenSubtitles2018.raw.en | wc -l
    7673

    real    20.276
    user    19.850
    sys     0.413
    maxmem  12508 MB
    faults  0
A lot of people like to comment and say, "well ag is fast enough for me." Well, OK, that's fine. But if you're wondering about why other people might mention ripgrep more, well, maybe it isn't just about the way you use the tools. For example, if you only ever search tiny repositories of code, then you aren't going to care that ripgrep is faster than ag. Which is perfectly reasonable, but it should also be reasonable to be aware that others might actually search bigger corpora than you.


ripgrep regexp has lookaround? The linked docs still doesn't say that.

https://docs.rs/regex/1.5.4/regex/#syntax

> This crate provides a library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a few features like look around and backreferences.

Edit: I see. It can use pcre2 but it's a build time option which of course Ubuntu has off.


> Edit: I see. It can use pcre2 but it's a build time option which of course Ubuntu has off.

That's unfortunate. Perhaps a bug report to the packagers is in order? Archlinux enabled it: https://github.com/archlinux/svntogit-community/blob/0dc033f...



From my side, I knew about both `ripgrep` and `the_silver_searcher` but I will openly admit I've lost faith in C and C++'s abilities to protect against memory safety errors.

Thus, Rust tools get a priority, at least for myself. There are probably other memory-safe languages but I haven't had the chance to give them a spin like I did with Rust. If I found out about them then I'll also prefer tools written in them if there's no Rust port and if the alternatives are C/C++ tools.


Ag is shorthand for argentum which in turn means silver.

https://en.wikipedia.org/wiki/Silver


Code search on your own codebase is generally not a place where memory safety shines.


When it's about security, I try not to pick and choose.

Plus a memory error might lead to scary consequences (like a random script getting elevated privileges).

Finally, and last I checked, `rg` is quite featureful and I've never felt constrained by it. So for me it's a win all around.


This is kind of my point: security requires a threat model, and you don't really have one. Rust has a lot going for it, and it does hold promise in improving the security of a lot of critical software. But in this case, it's not really doing that, so it's kind of misleading to say it is meaningfully doing anything for security.


I agree that in the case of grep-ing in the terminal the odds of covering your butt well enough by using a Rust tool are super slim.

That being said, there are powerful adversaries of anonymity and the right to personal data out there -- and security in depth is what works best against them. There's no one UltimateSecuritySolution™; there are many small ones that we layer on top of each other so we don't allow even a smidgen of air to pass between the cracks.

But yeah, I am paranoid. I am gradually preparing myself to move from macOS to Linux and even though I am not a criminal and never will be, I'll still make a heroic effort to make the odds of any foul play against me practically zero. (And that's why I will start using the userland Rust tools alternatives as well.)

I'll concede that in my case the biggest impact would probably come from running Chrome in a jail, and not from using `rg` vs. `ag`. That much is true, yep.


Yeah, it's kind of a shame in this case. There's tons to talk about in the area of where Rust shines here ("makes concurrency easy", "provides easy access to fast algorithm libraries", etc.) but security is just not really one of those points.


I don't disagree. I am just happy to point out that Rust increases security (since most security vulnerabilities I see reported are buffer over/under-flows or other memory safety mishaps). Rust definitely does not solve everything in security. You can still open yourself up for an elementary replay attack if you're not careful -- like I did just a few days ago.


This is what I suspected: Rust zealotry. We are searching for a string. Language matters to the guy writing it but the user? Nah. There's no security hole here.


Who's the zealot here? The guy who doesn't want to risk and openly states so, or the guy proclaiming there's no risk, even with ample historical evidence for the opposite?

I don't accept your labeling, especially when it's so egregiously misguided.

Also, you're clearly seeing what you want to see.


ripgrep is noticeably faster than ag. I'm not sure what features you mention that ripgrep is missing, but I've been plenty happy with it for basic grepping around. I'm sure it's also partly because BurntSushi, the author of ripgrep, is reasonably active here.

Some fun benchmarks, and a fair description of how text search works, can be found in this 2016 post https://blog.burntsushi.net/ripgrep/


> ripgrep is noticeably faster than ag.

Since both are instant on every codebase I care about, not so sure about that. These tools were always chiefly I/O bound , SSDs have torn that down especially now.

But for features: there's no lookaround in the regex.


They are only I/O bound when searching data that isn't in cache. It's often the case that you're searching, for example, a repository of code repeatedly.

> Since both are instant on every codebase I care about, not so sure about that.

It is very possible that there is no performance difference between ripgrep and ag for your use cases, but that does not mean there isn't a performance difference between ripgrep and ag. For example, in my checkout of the chromium repository:

    $ time rg -c Openbox
    testing/xvfb.py:2
    tools/metrics/histograms/enums.xml:1
    ui/base/x/x11_util.cc:1

    real    0.448
    user    2.593
    sys     2.490
    maxmem  77 MB
    faults  0

    $ time ag -c Openbox
    ui/base/x/x11_util.cc:1
    tools/metrics/histograms/enums.xml:1
    testing/xvfb.py:2

    real    2.302
    user    2.996
    sys     10.462
    maxmem  15 MB
    faults  0
> But for features: there's no lookaround in the regex.

That's not true and hasn't been true for a long time. ripgrep supports PCRE2 with the -P/--pcre2 flag. You can even put `--engine auto` in an alias or ripgreprc file and have ripgrep automatically select the regex engine based on whether you're using "fancy" features or not.

In general, I also claim that ripgrep has far fewer bugs than ag. ag doesn't really get gitignore support correct, although if you only have simple gitignores, its support might be good enough.


These tools are I/o bound, but not disk bound. I often perform multiple searches in a row, and all but the first will hit the disk cache.


Do you have sources for this? Here in El Salvador we have highways without lamps, streets that drivers treat as highways, crosswalk where you cannot longer see the painting.

I guess you're referring to the U.S., right?


On OSTEP, there's a course in educative.io from the authors of the book:

- https://www.educative.io/courses/operating-systems-virtualiz...

Which is worth checking as an introductory course.


Bitwarden login page throws a GitHub page's 404


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: