« first day (3643 days earlier)      last day (1316 days later) » 

11:30 AM
hmmm.... can i use systemd-resolve as a DNS server?
or am i doing something wrong...
ive been using bind to manage my house's computers, but its really overkill. i just want basically a single hosts file
i thought dnsmasq was going to be better for me. but then i found that when i killed bind another process called systemd-resolve took over for some reason. and looking it up it seems to do everything i want
 
@Nacht I've never used it, but this seems relevant: unix.stackexchange.com/questions/445782/…
 
hm yeah
damn
but it looks like you can configure its ip in /etc/resolv.conf
surely i can just change that to 0.0.0.0
oh i guess that answer actually answers that
 
11:56 AM
@Nacht I have been using dnsmasq for some time and I didn't find it too hard to setup.
 
Tim
I was wondering if any emacs user has some clue
1
Q: Why did I get the U+2019 right single quotation mark not plain ASCII single quote in C mode?

TimIn Emacs under C mode, why did the single quote key give me a U+2019 right single quotation mark, not a plain ASCII single quote? (That was corrected by a bot https://stackoverflow.com/posts/64104679/revisions) Does the U+2019 right single quotation mark not work in C code? In emacs: How can I t...

Do people use Visual Studio Code or other modern editors/IDEs for C instead?
(I temporarily reread part of CSAPP, The book is based on C, so I revisit C temporarily)
(I reread CSAPP to revise my knowledge of levels of abstractions in a computer system, and read some part which I guess is useful at software levels, such as program optimization)
The character problem in C mode is potentially bad, I think.
(IMHO, CSAPP's way of organizing topics is very confusing, which caused difficulty to my self learning at first time a few years ago. Nissan's The Elements of Computer Systems seems better although doesn't have some details. Tanenbaum's Computer System Organization may also give a better picture)
 
12:49 PM
beautiful, i can just use dnsmasq and the expand-hosts option
then just use my hosts entry
great! thanks @fra-san
 
1:33 PM
@jesse_b (moving here so as not to clutter the comments)
@terdon: Apparently it wasn't because OPs issue went away when they removed root. Also I don't necessarily recommend it but if /bin/sh is bash it will most likely accept bashisms. Additionally this doesn't provide an alternative. — jesse_b 11 mins ago
Fair point about not providing an alternative. But the OP's problem didn't go away, they've already deleted their answer.
And yes, bash called as sh should still understand [[ but I don't know if RH uses bash for sh. If it's dash or something else, the [[ will fail so it is generally a good idea not to use them .
 
sh on RHEL is bash
 
Ah. Then I guess @jesse_b is quite right and the [[ in the crontab aren't the problem.
 
2:04 PM
Yeah op definitely had multiple problems, Kusalananda pointed one out as well
 
Tim
2:46 PM
Do people programming in higher level languages than C consider necessary to optimize their programs? Are the strategies the same across different languages?
0
Q: What optimization strategies for C programs can be applied to what kinds of other languages?

TimIn Computer Systems: a Programmer's Perspective: We have described a number of basic strategies for optimizing program performance: Basic coding principles. Avoid optimization blockers so that a compiler can generate efficient code. Eliminate excessive function calls. Move computations out of l...

 
Yes, and some are, but not all.
 
Tim
can you elaborate?
 
3:01 PM
@Tim higher-level languages don’t mean you can stop paying attention to optimisation; some optimisation techniques are universal (e.g. using better algorithms, more appropriate data structures), others are language-specific
 
Tim
3:15 PM
Ch 5 and 6 of the book are about optimization at assembly level and at microarchitecture level
Ch5 is mentioned in the post. Ch6 has a section about using cache to improve program's efficiency
programmers can make changes manually to C programs, and/or rely on compilers, so that the translated assembly programs or their execution at microarchitecture level will be more efficient
Design with choosing algorithms and data structures is at a higher level than these. A whole different level.
 
@Tim not really, in my experience
From that question, and what you’ve been writing elsewhere, I get the impression that CSAPP is a pretty awful book...
 
@StephenKitt Tell that to most of the applications on the market
Microsoft Office 363
 
3:30 PM
@jesse_b yup, many software development don’t reward optimisation and clean-up
 
@StephenKitt Heh, I'm just joking mostly. I know it's a lot more complicated problem
 
@jesse_b right, it’s complicated, but in many cases nowadays devs don’t even start because there’s no upside for them
 
Tim
@StephenKitt I don't know other alternatives except those I mentioned. Do you know some good ones?
What is awful specifically? Does it not use standard terminology e.g. "partially linked executable"?
 
@StephenKitt My current company used to be extremely focused on debugging issues and optimizing code
 
Tim
@StephenKitt What is "not really" about algorithms and data structures being different level than ch5 and 6?
 
3:35 PM
It’s badly structured, it recommends things which were long-obsolete the last time it was updated, and it causes you to ask loads of questions which suggests that it’s not that good at explaining things.
For general development, I like The Pragmatic Programmer and Code Complete.
 
Tim
somehow I agree on your opinion on CSAPP. But what do I know? I sometimes think that it is me not the book.
 
@Tim considering development in a layered approach is too limiting; if you hit performance problems, there are “low-level” techniques that are useful, but you need to take a holistic approach.
Like I’ve said before too, when it comes to learning to program, nothing beats practice, and reading other people’s code.
So Code Reading and Code Quality are also high up on my recommended lists, along with Beautiful Code and Beautiful Architecture.
But then, spend time reviewing code, following a project’s development (without butting in), and writing your own code.
@jesse_b which one’s that, if you don’t mind saying?
 
Tim
I don't know what code to read
@StephenKitt joyent
 
1 min ago, by Stephen Kitt
So Code Reading and Code Quality are also high up on my recommended lists, along with Beautiful Code and Beautiful Architecture.
 
@StephenKitt Joyent, I'm sure its listed on some of my public profiles somewhere
 
3:40 PM
Those four books are all about good code to read.
@jesse_b ah right, I wondered if you’d moved
 
Tim
@StephenKitt Yes, there might be some big change
 
When Bryan Cantrill was our CTO he really seemed to put a big focus on upkeep
I don't want to speak for him though and I'm not in the engineering team so I can't say for sure
 
yeah lots of former Sun engineers are like that
 
Tim
@StephenKitt I didn't recognize them as book titles. Thanks.
 
Tim
3:55 PM
Are there still companies with engineers like former Sun engineers?
@jesse_b It was listed in many links in your comments
 
@Tim A lot of the ones from Joyent, including Cantrill went and started "Oxide"
 
@Tim Oracle still has a few, we (Red Hat) have a few (along with a lot of DEC engineers)
 
Tim
How about the engineers in those high profiled companies?
I wish I could work with and learn from engineers like those mentioned. I have never met one.
 
@jesse_b wow, I see Allison Randal and Laura Abbott ended up there too
Jon Masters was there for a while but he’s back at Red Hat
 
4:37 PM
@Tim In my experience, the choice of algorithms and data structures are as important as anything, and more important than most. It's perfectly possible to write C or C++ or Fortran code that is slow as molasses, and conversely it's also possible to write fast Python code.
The bottom line - you need to know what you are doing. It also helps to understand the underying implementations. And of course, you have to be willing to experiment.
Mercurial is actually a good example of a Python code base which is still (mostly) fast.
Though some of the more time-critical stuff is in C. Though now being rewritten in Rust, for some reason. Apparently C isn't good enough.
And if you look at Mercurial's development, there is tons of micro-optimization, as befits an interactive tool with many code paths, like version control.
In my experience, fast data structures mostly reduce to using a simple contiguous slab of memory. Like a C array, and adapting one's algorithms to that.
 
Tim
@FaheemMitha Yes, you are correct. I was not saying which one is more important than which. I noticed something that was not algorithms and data structures and that was not heard of as often
 
Anything more complex tends to slow things down noticeably, even in C. Of course, that assumes that one is writing performance sensitive code, which isn't always the case.
Actually, C and C++ (and maybe Fortan), tend to use rather less memory than most other things, which is probably at least as important.
At least the standard implementations of things like strings.
Basically because a Python string is a much more complicated and larger object than a C string.
Though under the hood, they're both C structures.
 
5:24 PM
apparently the turing test was much more simple than we thought
 
5:55 PM
until the robots click the box ... or the robots complain in chat about the complicated captcha tests
 
He's on to me, quick degauss the drives
How you been @JeffSchaller?
 
6:39 PM
@jesse_b POST reports systems nominal; 100% battery life.
otherwise, figuring things out as I go!
 
I've got memory failures and a severely fragmented hard drive
 
 
2 hours later…
9:05 PM
So, apparently 2020-09-29 is the recommended data format, per ISO 8601, but I still find it aesthetically lacking.
Personally, I prefer months as words, but apparently that's not good enough.
 

« first day (3643 days earlier)      last day (1316 days later) »