Hi Linux power users, I was wandering how you do search for files

That applies to all software, regardless of the language used.

Felix is written in rust. Modern and forward looking and all that, but the only thing constant about rust is its name.

Terminal file managers. Not very different from just using the shell.
They save typing ls, but you have to remember a heap of key shortcuts.
Its a compromise, but I can see some may like it.
Might be able to use it in a plasmid with KDE

No. When you use Rust, you only have software bugs, due to development accidents.

When you use C, memory corruption happens all the time & the best developer might sometimes write acceptable code, which still leads to apparent failures.

C is pretty much a gambling game. You never know what you get. It’s like with JavaScript, but instead of typelessness, you have undefined behaviour, double freed memory & memory leaks.
C is the incarnation of a footgun in the form of a programming language.
To be able to write acceptable code in C, you need at least 1 year experience on heavy C programming.
The same proficiency level in other languages can be achieved within months, if not weeks.
Learning C is basically biting off small pieces of brain tissue, over time.
In the end, once one excels at C, there is only a little amount of brain left. You start calling the Windows key “Meta” key. You use C for user-facing applications, which then look uglier than a Nazi bathing in cowpat. You talk about the modern tools & wish for 80’s stuff to come back, because everything that came after the 80’s is too modern & unnecessary. Oh and everyone who does not have a masters in a variant of Theoretical Computer Science – with a focus on low-level hardware details, nobody should care about – is a worthless piece of flesh.
This is what a human transforms into, once it dives too deep into C-land.

I think, we just had an inconsistent experience with Rust here, because Goldboot is a long work in progress. There are plenty of other popular Rust projects on Github, which are absolutely bludgeoning C originals.
Meanwhile, there are plenty of C programs, which are decades old and they still suffer from memory corruption issues. It’s a travesty.

Since my journey in using felix, I know that this couldn’t be wronger. I strongly recommend you try out a file manager in the shell. Everything is much more efficient, quicker, nicer & simply better.

I’ve been using the traditional ls workflow since over a decade & trying out felix just opened my eyes as to how inefficient my workflow has been all these years. Especially, if you have to manage a lot of sub-folders at the same time. It’s a huge pain with ls as you have to constantly re-execute ls in the process of management. With felix you just see everything, can instantly peek into sub-folders & even files. It’s amazing.

As explained before, this ain’t true. Felix takes about 10 minutes of playing around & there are also other alternatives with even more generic keyboard shortcuts by default.

Try out Felix. Then, re-evaluate your evaluation regarding terminal based file managers.

That applies to any language. The C learning curve is no worse than other languages.
Yes I dont have enough coding practice in rust. Only one way to fix that.

No, that’s not true. You need a lot more experience in C to achieve barely the same results you can get with other languages after a few weeks.

Additionally, development time is always much longer, which is also one reason, why it takes so long to learn the language. You always have to do everything yourself. The language is basically a barrier in your way, you have to learn to fight.

With many other languages it is rather the case, that they help you in development, rather than blocking you with a huge wall.

Now, when we only want to compare apples to apples, let’s look at Nim & compare to C.

It can do much more than C, is evolving & has tons of features, which make life easier. Yet, the performance is roughly comparable to a lot of C use cases.

One feature, for example, is the ability to use modules, rather than just #include a file and having all the header messes.

In Nim, you have the choice to include or import. The developer can decide, what fits best.

Another huge feature is meta-programming in Nim. You can do seriously crazy stuff in Nim. In C, good luck breaking everything with its pre-processor.

An additional feature is countering a lot of supposed concerns, which C fanatics often point out. “But we have so many C/++ libraries already – if I switch, I lose those libraries”. Well, wrong. With Nim you can import C libraries, just like that. No problem at all. In fact, Nim makes it exceptionally easy. So, although some other languages allow interoperation, as well, Nim is most frictionless in that regard.

These are three examples that came to my mind first. I could go on & on.

https://nim-lang.org/docs/manual.html

This is the Nim manual. It gives a rough idea on what the language is able to do.

And remember, we are comparing apples to apples here. Nim has lots to do with C & is intended mainly for systems programming, though it can be used for anything.
Nim does the right thing by taking away C from the developer & putting it into the background, where it belongs. C shouldn’t ever be used directly by a developer, but only as a behind the scenes trick, if at all.

1 Like

I cant really argue that because I dont have experience with many langiages in large development tasks.

What I do observe is that languages are becoming more abstract. Trying to learn Julia brought back memories of my first year Uni encounter with abstract algebra… endless definitions of entities with no hint as to what they are for.

And I think languages are becoming careless with English. Keywords need to be chosen carefully. I know what read and write mean, and I can even comprehend getchar() and putchar(), so why do we now have print and scan? I know what a record is in data processing… so why call it a structure or a type. Just because something exists only inside the computer does not mean we should give it an unreal name.

I dont really care about program structure. All one blob of code, or every function a separate file, or includes or libraries or modules just doesnt matter. I need it all in front of me somehow. Julias idea of libraries and packages remote on Github doesnt appeal. I know most new languages are becoming internet dependent… so the programming environment is going offshore. I want it all local and accessible.

There is not much point having masses of usefull library functions if their documentation is substandard. What used to be a book has turned into either html or pdf docs or inline help pages. I find html docs irritatingly dissected into little pages. You do need an index and a search facility.

I do wonder about the proliferation of computer languages. It represents progress (I hope) but also becomes a burden. Where does it all end?

Most practical people dismiss languages as just a tool. The real important part of computing is the end not the means, they say.
I have to confess to having been addicted to the means, but I did reach a few ends along the way.

If you are solely referring to abstractions in math, then I agree.

However, if you are referring to programming abstractions, then that’s like saying:

“Why is this verse from a poem saved as a string in my program?! This is so abstract & too much uncharted waters! The text should be displayed in bits. Only ones & zeroes are without all this abstraction crap, which everyone will understand.”

The whole point of abstractions is, that it makes understanding & using plain better.
For example, most of the time declarative programming styles are basically made out of abstractions. When you think declaratively, then you only ask the question “what result do I want?” rather than “how do I go the right way?”.
This way, you cannot do too much wrong, if the goals & the associated results are clear. If you know exactly, what you want to achieve, then your program is already 50% finished.

However, with languages like C, the opposite of declarative programming, you are artificially put back into the pre stone age.

“How me make string? Me want string. How me string? I want string!!! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGHGHGHGHGGH!!!”

In C, you don’t even have strings, by default. It literally makes you re-invent fire in every single program.

Being a C programmer is basically being a cave man in the computer world. Instead of solving high level real world problems, you are stuck with bits & pieces of stuff, we have solved in the 1930’s or even earlier than that.

This guy invented a computer in 1938.

Before that, there was already plenty of theoretical thinking done, to make computers possible.

So, C programmers essentially travel back in time before the 1930’s & make cave men out of themselves for no reason but to talk about performance, even if all the domains, which do not & should not care about nanoseconds of performance.

That is actually one huge point I forgot mentioning in my previous post about how Nim is better than C.

Culture with programming languages is a huge thing, too. It creates a de facto difference.

For example, the culture in C is: do not give ANY meaningful symbol names to ANYTHING!
Just use single characters for variable names and extremely abbreviated character sequences for procedure names.
It’s a travesty.

However, with more modern languages, the culture is telling you to be sane & use real words with real meanings, that most programmers can understand.

So, even if you are theoretically able to use better symbol names in C, it does not happen, because that simply does not fit C culture. C culture is basically about being & behaving like a cave man.

That approach is extremely limited, because it only works, if you are working alone.
As soon as you start collaborating with others, especially if it crosses the 5 collaborator line, then your approach will be the downfall for every project.

Today, code, especially in a growing open source world, is mostly a multi-developer effort. Making things understandable, maintainable, approachable & discussable is absolutely crucial. If your code is a wart on a pig’s ass, nobody would want to work with you.

Indeed, that is correct.

https://nim-lang.org/docs/manual.html

The Nim manual has a search function.

There’s also an explicit index, where you can find everything from the core language & its standard library, just by using CTRL+F, the old school way.

https://nim-lang.org/docs/theindex.html

Most of the time though, using the standard library page is enough.

https://nim-lang.org/docs/lib.html

I think, the overview is very helpful and most of the time leads me to where I wanted to go.

It never ends. It always improves. There is no static software. Static software is a euphemism for unmaintained, abandoned software.

Yes, but then you agree with what I’m saying. All I am saying is, that people should stop using C for everything, because it is only suited for extremely specific niché use cases. It is not suited for anything else.
Still, people use it all the time everywhere, because they are addicted to cave men. Maybe it’s a hormone thing, I don’t know.

I am advocating for changing languages, if another one fits better.

I advocate for Rust. That is true. But if a language, which is much better than Rust, as in being more performant & even easier to write, is released in 20 years, I will immediately start advocating for that one and plead for dropping Rust. Simple as that.

A lot of good advice here so I won’t repeat them again.

You may also want to install tldr as your cheat sheet.

1 Like

Yeah, just math abstractions. Julia is addicted to them
Programs are abstractions… we have to allow that

For example, the culture in C is: do not give ANY meaningful symbol names to ANYTHING!
Just use single characters for variable names and extremely abbreviated character sequences for procedure names.

It depends . If you think in math, you think in symbols, so you write programs with single letter symbols. That is OK… the program reads like the math, and is understandable by referring to the math.
If you program some non- math problem, use appropriate symbols that mean something in relation to the problem. I agree with you on that.
Issue is some languages, especially Fortran , have a math inheritance , so math symbols tend to become part of the culture. Less so for C… its inheritance is more hardware related, but it was adopted by the maths crowd and thats where a lot of the single character symbols arise.


[quote="Akito, post:26, topic:10009"]
That approach is extremely limited, because it only works, if you are working alone.
As soon as you start collaborating with others, especially if it crosses the 5 collaborator line, then your approach will be the downfall for **every** project.
[/quote]

Thats probably why I work mostly alone. Most maths is a one person effort. It carries over into writing maths programs. Most of the time you are dealing with a single algorithm implemented as a function.
Large collaborative efforts are rare.
I can see your point, collaboration requires more organised material, but creativity is the opposite.


[quote="Akito, post:26, topic:10009"]
Being a C programmer is basically being a cave man in the computer world. Instead of solving high level real world problems, you are stuck with bits & pieces of stuff, we have solved in the 1930’s or even earlier than that.
[/quote]

You are linking C to early computing. It is much later than that.
Some of the C practices, like the way people use pointers to pass structures around between routines, are not found in earlier languages.
It did make a contribution when it first arrived. For example it made it possible to write an OS in a higher level portable language.

Relax, I am not going to start a large C project. I moved on to R ages ago. Next move, if there is one, could be anything.

You rightfully complained about abstract math & now you are saying it is supposedly “OK”.
The reason it is always barely readable is precisely due to these indistinguishable symbols.

Giving those symbols meaning by giving them proper names would allow for much higher accessibility.

I hope, people use math for real world problems. If they do, then there’s always a meaning behind a symbol, which in turn means, one can always have better symbol names, than single letters or extreme abbreviations.

& that is atrocious. Terrible. Absolutely disgusting.

Yes. Absolutely unbearable. Shame on them for not thinking straight with their shrinked math destroyed brains.

Even then, you are making it tough on people who want to read your work in 50 years. Why do you want to torture them? :smiley:

Early computing is a million times more evolved, than C. Why? How?
Because early computing happened so many decades ago. C happens now. In the context of presence, C is cave man language.
In the context of the far past, early computing is appropriate, because it happened so long ago.
If early computing would be continued today, then we would have a problem with this one, as well.

Yes, in the context of the 80’s and 90’s C was appropriate. The same way it was appropriate to go into the world trade center.

However, going into the world trade center from 2002 upwards is not appropriate. It does not belong in that timeframe.
The same way, C does not belong in this timeframe. Yet, people keep using it for no reason other than those elitists have.

I did not expect you to use C. I am just trying to make a publicly visible point about how the cave man language should not be used.
There are too many elitists out there, poisoning the minds of young learners into thinking, that C is in any way viable, still today.

1 Like

Its not C you dislike its math.

You need a trip back in time. Try fitting a line of code into 80 columns of a punched card. Try using a Fortran compiler that only permits 6-character symbols , and upper case only.
These thing arose out of necessity. They die hard in some quarters.

Nobody programs in math.

Saying that is like saying one does not like cement, because the same person does not like a specific house built with that material.

No. The opposite is the case. C shrink heads need to let go & start living today.

Nothing of this has any relevance in 2022.

In exactly this same way, the QWERTY layout does not make any sense today, with keyboards.

Being stuck in the past is the problem.

1 Like

Back to the original question. I found a replacement for ‘find’ and others.

I use ‘exa’ sometimes. It looks a bit nicer than just ‘ls’.

There is a difference between ‘find’ and ‘locate’. Locate uses a database of files it searches. Find just searches the disk. Right?

@Akito Thanks for recommending Nim, I looked at Nim a bit and it looks interesting. I like the Python influence on it but have not gotten to the point of any execution to see the speed. I assume since it is compiled C in the end it’ll be quick. Too bad we can’t use all the Python libraries from PyPi or something similar. We’ll have to rewrite those in Nim. Some of them are C or Rust though, so that could be difficult.

I come from a COBOL background, and it isn’t easy to unlearn some of the old ways when using new languages. My Python probably looks COBOL-ish. :slight_smile:

2 Likes

Same here. I also did some coding in ALC.

2 Likes

Yes you cant blot out the past.
My C and R look like Fortran
It is not necessarily a bad thing.
Some of the lessons of our history are worth keeping

We program math problems
Fortran was invented just for that.
I repeat
It is perfectly reasonable to use math symbols when programming a math problem
In Julia you can even use Greek letters. I like that.

I wish I could learn any kind of coding, but I am afraid that day has come and gone .

Can you do shell scripts. That is a simple place to start

1 Like
  1. Math is not a natural science. It is something born out of human mind, which is good enough for usage as a tool in a scientific context. Therefore, it is useful for science, but math in itself is not scientific; it is an imagination.
  2. Therefore, math has no problems. It is imagined. It may have “problems” which arise from the context of imagination. Just like Harry Potter has trouble with some spells.
  3. Math is an imagination, but we use it for scientific or real world purposes, because it is useful in that way and helps a lot in many scenarios, where we want to measure & understand our real world better.
  4. Therefore, we never program math problems, ever. The only math “problems” we program are solving prime number, pi & other similar infinite calculations. All other use cases are real world use cases, where math is perhaps used internally as a tool, but the project’s subject is never about math itself.

Note:
When I say “imagination”, I am not saying it’s wrong, I am just saying, it’s all in our head. There is no natural thing in the world that has a math equation written on it. We just deduce & interpret certain things as mathematically measurable things.
For example, ten stones represent a mathematical number to humans. But to nature, ten stones are just stones, which randomly ended up in one spot. There is no math involved in nature. Only with humans, there is a way to interpret stuff as mathematical, even though it is not there, from nature’s perspective.

I referred to single letter constants, rather than actual math symbols.
As explained above, we never solve math problems. We just sometimes solve math “problems” out of curiousity, for fun.

Every modern language I am familiar with allows for Unicode symbol names.

It’s not about blotting out the past. It’s about basing something better on what has been achieved in the past.

For example, Napoleon has advanced political systems. Our modern systems in the west are based on many of those ideas. However, nobody is still living in the exact same system Napoleon created. We have a much more advanced version of it.

Same thing with C, Fortran or whatever you take.

C was fine in the 80’s. C++ was fine in the 90’s.
Now, we are in 2022. In fact, almost 2023.
Now, we have other languages, which supersede the aforementioned.
Therefore, people who use those languages for no other purpose than just to keep using the same crap forever, are doing it wrong.

It is a bad thing to not evolve & stand still.

Absolutely. However, we should keep the lessons, not the results from a specific time.


I had used that one quite a while ago for a short time. Though, when I think about it after my experience with felix, I realise that I don’t see a point in using something like exa. This tool is basically a fancy ls. But, in most cases, ls is enough. Though, if I really want to improve my file browsing experience, I need a file manager like felix. So, exa is pretty much in the middle, where it’s neither low level nor high level enough. It fills a void that probably doesn’t need filling.

Additionally, since I started using Nu as my daily driver, there is no need for exa anymore, anyway.

The default ls in Nushell is already super powerful.

The Foreign Function Interface in Nim is actually very powerful & versatile. It supports a lot of outside stuff, not only because of its “native” support for C.

As for Python, it is naturally not a too straightforward job, as implementing something from C/++, but there are always ways to do anything in Nim.

These are three examples I picked.

https://nimble.directory/search?query=python

This is the result of Python related packages you get, when querying the Nim package manager’s browser.

As is evident, there are plenty of Python related packages, of which a lot are dealing with making Python work with Nim, in general.

& that’s fine. COBOL is not an issue, because everyone today understands, naturally, that it is an old language and it is treated like one.
My problem is, when there is an ancient language like C & people keep using it today. That’s my problem.

Once people stop using C & see it as what it is – a language of the past, from which we already learnt our lessons – then C won’t be an issue anymore.

Something like keeping the old habits very often happens when developers switch from Java to Kotlin. At first, their code always looks like plain old ugly Java. Then, they have to learn, that everything is now simpler, better & easier to understand.
So, over time, they become accustomed to how Kotlin works and things start to look nice.


This is only true, if you keep believing what you just said.

Once you stop believing in that untruth, you can learn anything you want.
It’s just that too many people tell themselves, they cannot do it, because they are afraid to try.

Lose the blind faith in that sentence & you will start learning & understanding.

I have played with some shell scripting, but really did not know what I was doing. All the tutorials I read are way over my expertise.

Most programmers feel that way with any language, at first. The experience is giving you lessons over time & then at some point you get the point.

For example, all the Bash I personally know is 100% what I taught myself. Nobody was there to tell me anything about it.

Now, after all these years, there is barely anything I don’t know about Bash. & most things I don’t know are just what I forgot over time, because they are tough to remember & rarely used.

2 Likes