« first day (2295 days earlier)      last day (2642 days later) » 

12:43 AM
absorbs all of it's employees
xD
"that governs the new world"
^^
 
 
7 hours later…
8:01 AM
Someone asked for an explanation of a very simple sed command, so I decided to practice explaining things. :)
1
A: Deleting the second to last character in each line - with sed

WildcardTo FULLY explain the portable command (since someone asked) so that ANYONE may understand this: sed 's/.\(.\)$/\1/' file.txt Firstly, the "obvious": This line consists of a command name (sed) and two separate arguments which are passed to that command by the shell. The single quotes are strip...

 
8:42 AM
@Wildcard Very in-depth, slightly on the verbose.
I'm thinking whether I should try to keep a consistent format for my replies. Something like: pre-comments ("this is what you're doing wrong"), solution, verification ("it works!"), explanation (short), comments and thoughts.
 
8:58 AM
@Kusalananda Only if it makes your life easier. Since you're just one of dozens of regular answerers, it won't do much in terms of making the site consistent. So completely up to you.
 
@Wildcard Wow, that's comprehensive.
 
@terdon That's what I was thinking.
I had a few lectures at uni in the 90s about presentation techniques, especially in regards to giving lectures (I was a PhD student, and PhD students in Sweden are usually employed by the university to do teaching. I did 20% teaching (C and C++) and 80% research). I was told that giving the students the result first was good, and then work backwards from there. That way they were motivated to pay attention.
So this relates (at least in my head) to @Wildcard's answer.
Start off with "this is what this does, in plain english"
 
@Kusalananda Was that your downvote, then?
@FaheemMitha Thanks.
 
No. I upvoted!
It's good.
 
@Kusalananda Cool. I wonder why...oh well. :)
 
9:07 AM
I'm just sorting out for myself how I would have presented the same text.
And I think I would have done it backwards from you.
 
@Kusalananda Backwards how?
@Kusalananda The key is really just to define new words before or as you use them, rather than later on.
 
Well, starting with the plain English description of what needs to be done, then looking at how to do that.
... describing the needed bits as and when they get used.
... possibly arriving at intermediate solutions that don't quite work, and explaining why and what to add, like $ to anchor.
@Wildcard Anyway, I thought it was good, so I upvoted. The only critique I have is that it was a bit verbose. That's all.
 
@Kusalananda Cool, gotcha.
@Kusalananda I like that approach too. In this case someone posted a non-answer saying essentially, "Can someone please explain this command (that's in the top answer)?" and I just felt obliging.
In other news....
 
@Wildcard Fair enough
 
Relational theory is really good stuff.
 
9:28 AM
@Wildcard What is relational theory?
 
@FaheemMitha What me and my girlfriend are supposed to be doing, but don't ;-)
Oh, that's "relations theory".
 
@Kusalananda I don't follow.
 
Good, that was a joke.
@FaheemMitha "In physics and philosophy, a relational theory is a framework to understand reality or a physical system in such a way that the positions and other properties of objects are only meaningful relative to other objects."
 
@Kusalananda Ok. But the question still remains.
 
10:16 AM
@FaheemMitha It's what should be, but mostly isn't, the theoretical foundation for modern database systems.
 
@Wildcard If db systems have a theoretical foundation, it isn't very visible.
 
@FaheemMitha Well, SQL is so non-relational that it's kind of sad.
Nulls, duplicate rows, duplicate column names, significance of column sequence....
 
@Wildcard I read that there were better alternatives to SQL, including some language that was fast and predictable (I don't remember details). But SQL won out for some reason.
 
@FaheemMitha Yeah. It implements enough of relational theory to become wildly popular over the totally unstructured, "stone age" databases that existed before relational theory was invented.
But it's not relational.
I wrote an analogy about this, and I really should do a blog post about it....
 
@Wildcard although knowing relational theory helps to write better SQL queries
 
10:22 AM
@StephenKitt Damn right.
 
@Wildcard and the optimisers love it generally ;-)
 
Imagine a calculator (analogous to a DBMS) being designed and implemented which actually implemented multiplication as repeated addition, so that multiplying 230 x 570 would take ten times longer than multiplying 23 x 57.
Now imagine that a language is written for giving instructions to this calculator (analogous to SQL) in which there is no notation whatsoever for expressing fractional numbers.
So 53.27 + 93.4 has to be written as:
(53 + (27 / 100)) + (934 / 10)
or something similar.
And let's say that the language designers arbitrarily decided that division by zero is going to be equivalent to multiplying by -(1/2).
 
@Wildcard You should wander over to db SE and ask and answer a question there. :-)
It's the 21st century. We do SE instead of blog posts.
 
@FaheemMitha Nah. Blogs aren't going away.
 
@Wildcard Maybe not. But I think SE provides a good alternative.
 
10:25 AM
You don't own the content of your SE posts. Sometimes you want to have authorial voice. And an analogy doesn't really answer a finite question.
I agree.
@FaheemMitha I agree.
 
@Wildcard Fair points.
@Wildcard Not a SQL fan, huh? I suppose this is yet another example of network effects. Or whatever they call it when enough people know a language so that we're stuck with it.
 
Oh, and also the language designers decided that the exponentiation operator should only accept positive integer expressions, because "it's just too complex and performance impacting to allow arbitrary expressions, and besides, we're not convinced fractional exponents really exist."
So there would be no way at all to express the square root of 25.
Now imagine that people talk about "moving away from the arithmetical model in our calculator designs" because it's "outdated" and "riddled with performance problems" and "is too clunky to deal with fractional numbers because of the performance hit involved (in the arithmetical model) with having to express all fractions through division."
But no one even mentions the problems with division by zero.
So they make a new, fancy "non-arithmetical" calculator, that "avoids the performance problems of the arithmetical model" and you can divide by zero and the answer is fish. And they have a button for units but you're allowed to add yards and gallons. And they're convinced that "non-arithmetical" calculators are the future of calculation.
Then you have a correct picture of the state of the database industry today.
@FaheemMitha yeah, pretty much. Like PHP.
 
@Wildcard Do you work professionally with databases?
@Wildcard Yes, that's the example from Hell.
 
@FaheemMitha :D
 
@Wildcard And of politics.
 
10:35 AM
@FaheemMitha I'm a sysadmin, not a DBA, but yes. And I also deliver training.
@Kusalananda Eh, politics doesn't have an underlying mathematically rigorous model, nor should it have. Mine is a pretty pointed analogy. But, yeah.... Ever read much Heinlein? He had a point in his "future history" timeline marked, "The Crazy Years."
@FaheemMitha Why do you ask?
 
@Wildcard <Shrug.> No particular reason. I've used DBs a bit myself. And it's always seemed to me it should be possible to do better than SQL. And I've visited dba SE occasionally. They're helpful folks.
And PG might be the best (free) alternative out there, but it clearly has lots of problems, particularly when it comes to query optimization. But that might come back to SQL again.
 
@FaheemMitha Yeah. Perversely, I get happier with SQL the more I know about Relational Theory—not because it follows the model, but because I can work around its faults better, predict outcomes better (including faulty outcomes), and in general get work done better.
I really like Postgres, by the way.
 
@Wildcard Ok.
@Wildcard I like it too.
 
As a sysadmin I am mostly dealing with manual queries when I need data, so I haven't run into much hurt from query (non-)optimization.
 
Do better alternatives to SQL exist?
 
10:42 AM
@FaheemMitha for some specific use-cases yes, e.g. Neo4J's Cypher (opencypher.org)
 
@FaheemMitha <shrug> Define "better." More relational? Yes. Enterprise-grade? No.
"The Third Manifesto" (by C. J. Date and Hugh Darwen) is the guidelines for what a DBMS or language would have to implement in order to truly follow the relational model.
There are some projects linked to from that site, but none really seem mature or even likely to mature soon.
 
@Wildcard Well, SQL seems kinda sucky. So something less sucky.
 
RelDB looks interesting, though.
 
I don't know what "better" would look like, sorry.
 
@FaheemMitha In terms of design, yes. Implementation, no.
 
10:45 AM
@Wildcard What's lacking in the implementation? Not fast enough?
 
@FaheemMitha The language exists (is defined, described), but there isn't a complete implementation for it yet.
D is a set of prescriptions for what Christopher J. Date and Hugh Darwen believe a relational database management system ought to be like. It is proposed in their paper The Third Manifesto, first published in 1994 and elaborated on in several books since then. == Overview == D by itself is an abstract language specification. It does not specify language syntax. Instead, it specifies desirable and undesirable language characteristics in terms of prescriptions and proscriptions. Thus, D is not a language but a family of both implemented and future languages. A "valid D" must have a certain set of...
"D" isn't a specific language; it's a class of (currently hypothetical) languages. Any language which followed the prescriptions (and thus followed relational theory) would be a "D."
But there's a specific example of D called "Tutorial D" which is used in Chris Date's books on Relational Theory.
RelDB is apparently a relatively complete implementation of Tutorial D. I haven't played with it yet.
 
@Wildcard I see.
@Wildcard So is RelDb relatively new?
And has anyone used it for actual work?
 
I don't really know.
I'm reading C. J. Date's books and really enjoying it.
But this is all new to me within the last six months.
 
ok.
One problem with computer languages is that all the old horrible things hang around and keep mindshare even when better alternatives exist.
And progress is glacial.
 
Project started (at least on GitHub) in October 2014.
@FaheemMitha Yep. :( Ah, well.
I gotta go, but nice chatting with you. :)
 
10:54 AM
We all know it's not a perfect world.
@Wildcard Likewise.
 
 
3 hours later…
1:58 PM
@Gilles can we see the history of polling unix.stackexchange.com/polls/2/…?
 
2:47 PM
@Pandya I think it's on a blog post somewhere announcing that the vote was against merging
I remember they grouped votes by sites but users who were on both sites only voted once and I never figured out how they decided to count us against one site or another
 
@Gilles I noticed recently that AU is older than U&L, but I always thought it was the other way around. Do you remember which came first? They were both active when I joined SE.
 
3:22 PM
I thought U&L was older.
 
@terdon AU was a couple of weeks older
 
I wonder why I always thought U&L came first. . .
 
or go check the area 51 pages
they were both proposed in the very early days of Area 51 and AU reached commitment a little before
 
3:58 PM
9
A: Why is Ask Ubuntu separate from Unix and Linux?

GillesIt's a very rare case of a site being a subset of another. In this case, part of the justification is that there is a wide community of people who self-identify much more as Ubuntu users than as Linux users. Furthermore, even if the questions asked on AU can be asked on U&L, they would tend to ga...

> Historically, the Ubuntu site was born a few weeks before the Unix site.
^^ /cc @FaheemMitha @terdon
 
@Pandya Yes, I see.
 
Hello I need some Help. I am triying to kill a tomcat process running in localhost:8080 I tried ./shutdown from the folder /bin of tomcat and sudo kill -9 PID but tomcat restarin another PID someone can help me ?
I am using Kubuntu 14.04 LTS
 
@Gilles ^^ yes, found.
 
@Mariano Is it restarting or just not dying? Does the PID change?
What does sudo service tomcat stop do?
 
4:06 PM
the PID change
You are a genuios
It works !!!
thanks a lot!
 
:) You're welcome
 
I do not undestand Why when I run
kill -9 pid
 
Generally, when trying to control system services, you want the service command, don't try and manipulate them yourself.
 
tomcat restart in another pid
ahhhh
ok
 
@Mariano That works, but apparently there's a daemon running in the background that automatically restarts it in case it crashes.
Probably a little script called "comoJoderaMariano.sh" :P
 
4:09 PM
It stanger for me this daemon, I never see something like that
jejeje
 
Have a look at the tomcat service script. That's probably where the relevant code is.
 
tomcat 8 starsts when the machine starts
but I dont like it
service.bat ?
 
.bat?
No, it should be somewhere in the systemd config. I don't know how it works these days.
 
where is the tomcat service script ?
 
@Mariano What do you get for locate tomcat | grep systemd ?
But if you just want to disable it as a service, try sudo systemctl disable tomcat.service
That should work.
 
4:14 PM
it returns nothing
 
Oh, WOAH! Ubuntu 14!?
 
I would like to start it manually
yes
Kubuntu 14.04 LTS
 
OK, then it isn't systemd.
Try locate tomcat | grep init
 
it returns /etc/init/tomcat.conf
 
It might be there then, but if all you want is to disable it as a service (so it doesn't start automatically) you don't need that.
 
I think I have an answer about that somewhere.
 
I put the file in the pastebin up
 
@Mariano if you just want to disable it, use sysv-rc-conf
Oh damn, is 14.04 using upstart or sysv?
 
I dont know
 
Upstart I think. OK, so you probably need this:
echo manual | sudo tee /etc/init/tomcat.override
See here for more:
559
A: How to enable or disable services?

Luis AlvaradoThere are services that can be enabled/disabled using the GUI (like the startup application) or the terminal. For the Terminal you have several options. First, open a terminal (Type "terminal" in the dash, for example, and open it). Then: Enabling / Disabling a service To toggle a service from...

 
4:22 PM
it returns
manual
terdon You are a Genius very good explanation of services !!!!
 
@Mariano That wasn't me! That's Luis's post.
 
Yes but You share it with me
and you know it
 
@Mariano yes, but it also creates the file /etc/init/tomcat.override which, according to Luis, is what you need to do. Now test: restart and see if tomcat starts again.
 
I will put down the service and restar the machie
I will give you some points
like stackoverflow points
it is possible here?
 
Just think, if the AU poll had returned a majority for merging, we'd have all the AU people over here now.
 
4:31 PM
but why people dont want to join ? I see the results
I dont know a lot of linux/Unix
 
@Mariano Not directly, no. But don't worry, I have enough, thanks :)
Next time though, please post a question instead of (or as well as) asking in chat. That way, everyone can benefit from the answer and you can also give points as you want.
@FaheemMitha No, we'd be AU.
 
@terdon No, we're the superset, remember?
 
Yes you are right I chat here before I couldn believe that it was someone
whit the same problem
I dont undestand about we're the superset, remember?
 
@FaheemMitha Yes, but we're also a minority.
@Mariano He means that Ubuntu is a part of Linux and Unix. It's like saying that women are a superset of mothers. All mothers are women, but not all women are mothers.
 
@terdon Possibly. Meaning that the AU people would have dominated?
Fortunately, we didn't have to find out.
 
4:39 PM
Yep
 
Funny, though, that most people here voted to merge. I wonder if they would do that today.
 
Let's merge with kali.stackexchange.com
 
@terdon thanks for the explanation... I will restart now thanks a lot !!!
 
@StephenKitt Someone really should propose that site.
 
@Mariano Good luck!
@FaheemMitha There's Hinduism already.
 
4:43 PM
@terdon excellent, we should just migrate all Kali questions there
 
@terdon That might be a different topic though.
 
that would produce some interesting reactions
 
@StephenKitt Oh yes! That would be brilliant!
 
@FaheemMitha certainly, that's what creates the potential for comic effect
 
I'm game for anything that gets Kali questions off this site.
3
 
4:53 PM
@terdon I arrived here just for says it works perfectly I have a port 8080 free now. And if you want I write the ask in stackoveflow or unix.stackexchange or askubuntu and you can put the answer
and it helps another like me!
 
@Mariano Thanks, but that's not needed. There's already that answer on the Ubuntu site :)
And this is very specific to that version of Ubuntu. It won't work on newer one or on older ones so. . .
 
Ok I understand !
thanks a lot!
 
@Mariano You're welcome :)
 

« first day (2295 days earlier)      last day (2642 days later) »