« first day (1488 days earlier)      last day (3471 days later) » 
00:00 - 04:0004:00 - 00:00

4:00 AM
I don't know if you've handled it or not - and I didn't assume you hadn't - I was just interested in the problem.
 
I scan for things like "if x==y {" and replace them with "if x==y:"
When that happens, I increment a counter
 
And when you find a valid } you decrement, yes?
 
AKA INDENTATION_MULTIPLIER
Yes
so I multiply INDENTATION_AMOUNT by the INDENTATION_MULTIPLIER
it starts with 4x0
or 0 spaces
The first successful match makes is 4x1
if there's another match in that match it's 4x2 and so on and so on
When it detects a closure it decrements the counter
 
That's exactly how I would do it.
In fact, on a more simple level, I did that here
 
As long as it doesn't attempt to make the multiplier <0 it's okay
@mikeserv neat!
 
4:04 AM
It's a few lines of sed that walk across input depositing an extra newline after a { and subtracting one on a }
 
And that can be checked by making sure the opening braces >= closing braces
Yeah
 
Right - that's why I was asking about quoting. Because there I definitely didn't handle anything like that.
 
I also plan to remove semicolons right before newlines but add a newline if more text is after it...

ie dostuff; domore; =
dostuff
domore
ah
And all a Bracefile is is this:
Bracefile 1.0

==STARTCONFIG==
INDENT_LEVEL: 4 <-- indentation level
INDENT_MULTI: 0 <-- initial indentation level
==ENDCONFIG==

BR:some/dir/test.pyb:another/dir/test.py <-- Brace2py test.pyb to test.py
CP:some/dir/nochange.html:another/dir/nochange.html <-- cp nochange.html to another/dir
 
So you have a list somewhere of what keywords can precede an open? Is there a similar list for those that can precede a close?
There's a trick you can do with sed...
 
So far I was just going to count closing braces, but now I want to hear the sed trick :D
 
4:14 AM
sed "s/\(^$(
    printf "\(%s{.*\)*" "${array_of_possible_matches}"
).*/\1/;/./!d"
If you do something like that and $array... contains all of the possible regexes you could want to match, when sed encounters a line and runs it then it will either save your possible match in \1 or it will match every thing else on the line in .* - and therefore remove all uninteresting data.
 
I'm not good with sed..what's it doing
Wait I get it
 
You see?
 
Neat!
 
The important thing is that whatever pattern you feed it needs to fit that ^ head of the line anchor - because sed reads left to right.
 
Ok
 
4:18 AM
That's a little broken - I forgot the outside closing \) before .* which, by the way, is very important there.
Before the last one, that is.
sed "s/\(^$(
    printf "\(%s{.*\)*" "${array_of_possible_matches}"
)\).*/\1/;/./!d"
That would be workable.
 
Thank you so much for the help..but my Mom says I have to get of the computer
Thanks again!
 
You're welcome - if it helps.
Tell your mom I'll be by later.
 
It will, okay, I'll try to be back on the morrow
 
slm
lol
 
Or whatever the cool coders are saying nowadays
 
slm
4:22 AM
there's no such thing as cool coders, that's only a figment of their imaginations 8-)
 
...don't tell his mom...
 
I'm alive
Let's all hold a K&R book burning
Darn did I miss all of the fun while doing ./homework
Oh well, 'Night for everyone in my timezone
 
 
8 hours later…
12:33 PM
Hi guys.
 
whatsup
 
Hey @Anthon
 
Hi @FaheemMitha
 
@Anthon know anything about autotools?
 
I have used them wnen compiling stuff from scratch that required them, but never for a project from the ground up.
Whatever you do, update them to the latest versions before doing anything!
 
12:45 PM
@Anthon Oh, I've already done that. :-)
They don't seem to be changing that fast these days, anyway.
The last release of autoconf was in 2012. Over 2 years ago.
 
Its been a while since I needed to use them. What are you trying to acomplish? Setting up new things or trying to get some package to work?
 
@Anthon I'm setting up a build for a project of mine.
 
That is indeed long. But the compiler development seems to have stabilized as well.
 
I already have scons, but scons is rather deficient in functionality, though pleasant to use.
Both automake and libtool do seem to be releasing more often, though.
 
I used to manage projects with recursive Makefiles, compared to that scons is heaven.
 
12:47 PM
@Anthon Well. these are all 20+ year old programs.
@Anthon Did you use to write them yourself, or just try to use them?
autotools gets really terrible press, but it doesn't seem so bad to me, for what it is trying to do. which is undeniably ambitious.
 
No like I indicated, just for projects that needed them, never from the ground up for a new project.
 
all the competitors address a subset of the functionaility, take quantities of shortcuts, and then congratulate themselves on being more user friendly.
And I say that as someone who is not really a fan of hardcore Unix tools.
 
The problem with these things is that if you start with a simple project on one platform with one compiler all of that is overkill, but once you have done a project that depends on libraries and compiles on multiple platforms with multiple options, then they are your lifesaver
 
@Anthon Right. Well, I think there are a lot of poorly set up build systems out there. Did you feel the experience was the general awfulness of autotools, or user misuse?
@Anthon Very true.
Incidentally, does anyone have experience setting up FreeBSD on Linux? In some virtual environment, I assume.
 
No, I guess there were about 15 projects over the last 20 years
 
12:52 PM
@Anthon Don't follow.
What were you responding to there?
 
I get the impression that once people got stuck trying to do what the autotools did themselves they invested the time to do it properly using the tools
(that was part of the response to the quesiton about experience with oor autotools use
)
 
@Anthon Ah, Ok.
But my basic point is - do you think that autotools is all messed up, or did the people who set up your projects mess up? Since apparently working with these build systems was not a positive experience.
With 15 projects, you must know it pretty well.
Hey @terdon
What's happening?
I actually was able to set up a basic build surprisingly fast. It only took a few hours. Partily because so many people use autotools that there is a ton of documentation out there. Kind of how MS users must feel, I imagine.
 
I don't think the projects were so mixed up. But more than 2/3 of those times I had to go and download the latest source of automake or one of the other tools, because my distribution would not install the latest version (or a new enough version)
 
I don't often have the experience of being part of the complacent minority.
@Anthon Ah yes. I've heard that is a pain point. Having the wrong version, I mean. And if you do, stuff breaks all over the place.
 
1:07 PM
I notice this site doesn't get a lot of questions about software, for some reason. Including build system questions. I expect I've remarked on this before.
 
+--+
/-
 
The whole building, and problems with buildsystems is more a StackOverflow issue
 
Hi @mikeserv. Cryptic much?
@Anthon Autotools would be on topic here. Though in practice nobody asks these questions here. It's very much a Unix thing.
 
Unix yes, administration no.
 
2:02 PM
@Anthon no, your name did not expand but at least I could indeed contact you since you had edited the post. As far as I know, had I left you a comment on a post you had not edited, the message would not have reached you.
 
@terdon I had already bothered slm while trying that from my own post. You seem to be able to call in anyone who's name you know how to write.
 
@Anthon No, only those who have somehow touched the post I think. Editors, commenters and the OP. If you try to call someone who hasn't come near the post, I don't think it works.
 
supposedly you are able to ping: the moderator that closed your question, any of the commenter, any of the editors.
 
2:23 PM
^^ That
 
2:47 PM
@terdon Hmm, I tried slm so I should have probably tried a non-mod.
 
3:14 PM
Yes, mods might be different.
 
@Anthon This site isn't exclusively adminstration.
 
No, but this tends IMO too much to StackOverflow, just like detailed questions about mercurial or git would.
 
@Anthon I'd incline to disagree, but I don't think this would come up in practice. Since basically nobody asks autotool questions here.
 
3:29 PM
The disappointment of getting the green +10 rep notice, only to realize when hovering over it, that it was for a year old answer on SO.
20K. So close and yet so far away ....
 
3:44 PM
@Anthon This gaming thing really works on you, huh?
 
4:11 PM
@FaheemMitha Yeah, too much. Maybe I should just take up playing MsPacMan again, that at least gets boring after a while.
 
@Anthon I'm not familar with that game.
 
4:26 PM
How can I ask a question on linux.stackexchange.com?
nvm, found it..
 
@Slav it's unix.stackexchange
 
@FaheemMitha You're probably to young. I remember when it first came out....
 
@Anthon Not really a game player.
 
5:20 PM
@FaheemMitha my bad. fell asleep on the keyboard.
 
@mikeserv I'm disappointed. I thought maybe you were signalling to aliens.
 
that's a different code.
they prefer flag-waving.
my face hurts
2
 
hello @mikeserv
long time no see
 
hi
 
5:42 PM
@mikeserv alien flags, presumably
 
 
3 hours later…
8:40 PM
oops
0
Q: Show different txt file on different server

Lucy WeatherfordI have a .txt file, say robots.txt When I upload my code to my web server (on heroku), I want to deploy the same code to another web server (also heroku server). BUT I want the content of my robots.txt file to be different, depending on the server I'm on - I want the file shown to be another o...

ah there we go
delete this question
 
@TylerMaginnis Why's that?
 
it's way off topic
@Anthon it's wayyyyyy off topic
that's about a specific product that relates to Amazon EC2 Elastic Cloud
this is U&L, not EC2 Elastic Cloud
 
9:00 PM
@TylerMaginnis then just vote to close it or flag it if you are not allowed to close vote it yet.
 
 
3 hours later…
11:52 PM
How should this be tagged?
3
Q: How do I construct a list with numbers like this?

DisplayNameHow do I construct a list like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Where I run command 15 or something. Or if i specify 100 it would make it with 100 numbers or 10000 and it would make it like this but 10000 numbers. It should be five numbers on each line (as seen above).

I had tagged it as but it isn't really. It's not as such either.
 
00:00 - 04:0004:00 - 00:00

« first day (1488 days earlier)      last day (3471 days later) »