Nowadays heavily discouraged, and would probably be deleted as unconstructive; that one still exists because of historical significance/was grandfathered in.
The answers are ridiculing the OP for asking a totally reasonable question.
The question doesn't specify if the file to match against is unique/one-shot or if it's a general case. Without that info you can largely assume it has to handle any input. The regex will get unwieldy since you have to account for corner cases like:
<!-- <a href="foo"> -->
<div bar='<a href="foo">'></div>In any case, how would you use xpath or CSS to identity self-closing tags? They operate on the parsed tree, not on the token level, and the question is about identifying specific tokens.
That said, this answer frequently gets linked in discussions even where using regular expressions is an entirely valid approach.
A technically fair answer would be to point out that the regex would have to take other tokens like comments, CData etc. into consideration, so it is more like a five-line regex than a one-line regex. If someone recommended a XHTML tokenizer or other tool which could solve the OP's task, that would also be a great answer.
Yes, but that you can tokenize XHTML using regular expressions is not the same thing as being able to use a single regular expression to extract XHTML tokens. Remember that context free languages are a superset of regular expressions. I don't personally know enough about the XHTML syntax to say off the bat whether the syntax can be described with a regular expression, but generally a recursive definition of valid syntax is not possible to express with regular expressions.
> You cannot use a parser, since a parser does not emit tokens but emit the element tree and abstracts away syntactic details like the difference between <x></x> and <x />.
You can use a parser, just not any XHTML parser. The parser would need to be constructed with the objectives in mind, to parse into a data structure that doesn't abstract these details away.
That said, maybe an even simpler solution exists, such as to use several regular expressions to first remove comment and CDATA before matching. I'm not immediately aware of any other cases that would cause problems for the trivial match suggested in the question post.
This is completely wrong. One can also just write their own tokenizer reading one character at a time with a state machine. It's trivial compared to the complexity of the rest of the parser.
Regex is a family of languages each of which can have various implementations. You could have a regex implementation that instead uses mutually recursive functions etc.
What is true is that regexes are typically not turing complete and can be represented with simple state machines.
Isn't this fairly common for stackoverflow nowadays?
I was ridiculed for posting a query about a C++ concept I was trying to learn from one of the authoritative books on the subject - I just couldn't 'get' the syntax being explained.
I persevered and then someone chimed in that, hey, there was a typo in the book's example!
It's kind of the same as here on HN. If unconstructive comments weren't discouraged here, the comments section here would look like on Reddit.
If unconstructive answers weren't discouraged on SO, I'm quite sure the more popular questions would be full of flippant half-answers trying to be funny or people posting memes to grab attention.
In the Good Old Days, you were weird simply by being on the internet, so as an internet user you found it a bit more easily. That's unlikely to return. Improvise, adapt, be weird.
Thankfully due to the efforts of the longer-standing community this stuff ends up languishing at the bottom of the comment threads but it seems like it's only a matter of time. It's certainly become a lot more prevalent over the course of the 5 years that I've been here.
It's sort of a social web of trust, similar to HN/Reddit but about as different from those two as HN/Reddit are from each other. The way the site works is interesting: There is no moderation or downvoting, but if you do something lame, you'll be filtered out, at which point that person won't see anything you post anymore. In practice, it works very well. The content on it seems to be an order of magnitude more intelligent and interesting than HN or Reddit, but lacking in volume and discussion because there are so few people.
I am not worried about it being flooded with noise because of the way it is set up. It lends itself well to creating isolated subcommunities, and tends to reward thoughfulness rather than lowest common denominator content. When the Reddit community was looking for alternatives several years ago, a lot of people ended up at Hubski. But Hubski never became vile like a lot of other alternatives ended up.
Posts are tagged, and you follow tags and people you are interested in. It's possible to follow only people. When they post something or vote on something, it shows up in your feed. The frontpage when not logged in is fairly boring: it's all the stories voted above a certain amount.
If you go there, be nice. Talk to people like they're real people.
Ahhh, the busker economy. I have an opinion about this, much to the astonishment of the assembled intelligentsia.
Patreon, Indiegogo, Kickstarter, GoFundMe, the lot of them are basically ePaydayLoans. They charge an absurd amount for basically acting as a payments processor. We've developed a Kabuki whereby the supplicant does the Kickstarter Dance so that their friends and relatives are cajoled into giving you money through the sheen of legitimacy. It also allows the supplicant to disregard the nonmonetary help of any and all comers - no less than four asshole directors I've worked with have turned down my assistance as a creative in favor of begging for my money so they can "afford" to do the work themselves.
And really - who uses these services? Generally people who do not have a product viable enough to stand up on its own. I really enjoy John Dolan's commentary but no, I'm not going to pay $5 per podcast to hear him ramble. 2,681 people do, though. That makes him one of the 1%.
Kickstarter is basically a business loan that charges you 20%. That's pretty fuckin' horrible terms. But if you can't find better because your idea is shit, go for it I guess. And I say this having underwritten three Kickstarters. In all three cases, they were ideas that would have been underwritten by conventional financing if only their creators had looked a little harder. Patreon? Patreon is a tip jar for people too introverted to sit on a street corner with an open guitar case... and I say that having supported a couple Patreons.
But it's shit, and it makes the world worse, and I hate it."
For many people "the internet" is fbook. To some the net is what google says it is.
With F and B decided that some things should not exist at all, and other things should be downranked to basically never be seen, while promoting certain sets of sites -
I think the problem is more than the individual not really looking. It's more of an education problem where people don't understand the amount of censorship and how the down ranking and upranking is actually affecting the way most are using 'the internet' - which of course has the network effects of people only sharing what they (have been allowed to) see (and allowed to share) - sadly.
The time of web rings, less spam and less censorship made it more fun finding random things imho.
Times when tumblrs and torrents and geocities and others showed up in search results, along with click at the bottom to do a similar search with alta vista, lycos, etc..
was in some ways less weird, but more fun to surf and discover. at least for me.
https://www.engadget.com/2019/01/31/sex-censorship-killed-in...
Titled: How sex censorship killed the internet we love
I enjoyed here headings including: When was the last time the internet made you feel good? When was the last time the internet gave you hope? When was the last time you felt free on the internet? When was the last time you thought of the internet as a weird and wonderful place?
Glad to see others thinking of these issues. I worry that most people who connect online don't even realize the homogenized over pasteurized censored endless scroll publication is hiding stuff that multiple groups don't want to show - making so much basically not exist.
Why is that? Basically: because not everyone had access. So if you were there, you belonged to some sort of minority (privileged artsy, IT student, etc).
The Internet nowadays is a commonplace thing. Billions more are online. It's not surprising that the stuff you used to trip over everywhere is now not as prominent - that just reflects the ratio of like-minded individuals in the real world better.
But that doesn't mean weird/funny doesn't exist anymore. It just means that - just like in the real world - you'll need to know where to go to find it.
But I think expecting the internet to only be one way is not only naive but also unrealistic. You may enjoy it being that way, but not everyone does, and the internet is for everyone. There's something for anyone, you just need to find your corner of the web.
However, some of that weirdness has moved a level of abstraction "up" into mass platforms like YouTube, Reddit or Minecraft which some people might accuse of not being that under the radar.. yet the oddest subcommunities exist on such sites that few people are aware of. Amusingly, there are actually subreddits dedicated to unearthing such things on other sites, e.g. https://www.reddit.com/r/DeepIntoYouTube/ :-)
Most of our experience is controlled by an all-knowing black-box algorithms. The game is to converge all experience into a small set of patterns
An Example - youtube Earlier I could spend hours on youtube and discover everything from new music to weird funny videos. Today you literally get boxed into a list comprising of your history and recommendations that have hardly 1 degree of separation from your history
Getting lost in the weird side of the internet, outside your usual AI-generated recommendations is wonderful.
Human generated viralness >> machine learning recommendations.
--
A machine learning algorithm walks into a bar. The waiter asks: "What'll you have?", the algorithm responds: "What everyone else is having."
It is not a good community, jacoblambda.
Also, on your comment that it's just a cyberpunk focused /g/, well ya that's kind of the point. It's a cyberpunk board. It's centred around a lot of the themes from its namesake. As for the value of the threads on /λ/, most of them are either fairly focused discussions of various topics in Computer Science or language discussions. There's obviously some noise in the posts but the moderation results in fairly reasonable quality levels compared to the larger chans.
As for your final comment, I respectfully disagree. It's not for everyone but that's expected.
Also in case there was a misconception, I am not threwawasy1228 and they are not me.
> This website is a wiki. All School of Art grad students, faculty, staff, and alums have the ability to change most of this site’s content (with some exceptions); and to add new content and pages.
Kids these days have significantly stronger design aesthetic and coding ability so it's less haphazard; though it still has a very personal style.
see: http://soda-slosher.tumblr.com/ http://forcomfort.tumblr.com/ http://undeveloped-future.tumblr.com/
Like a browser that records every page you see, exactly as you saw it.
Unfortunately it's probably just too difficult with Web 2.0 and its dynamically generated pages and needless flashing lights.
```saveAs(window.title+".html","<html>"+document.head.outerHTML+document.body.outerHTML+"</html>")```
Add something to the above so that it inlines referenced files in base64, and you're basically done (I tend not to bother as I'm only after the text content). For actually interactive files, it gets more complicated; you'll need to save the current JavaScript state as well as the page resources.
NeoCities is an attempt to revive the GeoCities days
There are still many jaw dropping demos and I recommend that people check them out and give some appreciation and respect to those absolutely l33t guyz
So, you need to search for it. Be active about your intetests and seek them out.
And the work-safe boards remain "work-safe" with a huge amount of quotation marks :)
For me it is more psychological--there is a fair amount of decent content there, but being one click away from /b/ and /pol/ can be a detriment if I want to share a link or show something to my girlfriend. "Here's a bread recipe that sounds tasty or some /diy/ project--but don't use your work computer and you might want to fire up VPN."
All this fun and weird stuff lives on separate disconnected islands from a practical point of view. Maybe it really has to do with coding becoming more elite - although by all rational means it got easier. On the other hand hardly anyone would dare to upload static html websites anymore without non-trivial css/js. That's a shame.
Maybe this also has to do with the general obsession for super clean and lean code. This design has to be like that as well, same goes for the whole gist of the endeavor.
FWIW shitty forums always have been there, but there used to be a lot actually useful forums. Now those have been eaten up by streamlined and polished high quality web or native apps.
Wow. That's one of the funniest things I've seen on the Internet. Do you have any more like this?
And I agree you could work hard to try and somehow verify their code, but I doubt it's possible to let them do something useful and at the same time prevent any possible attack.
Where once we had Lycos, Hotbot, Dogpile, Excite, Yahoo, et. al., we have a fraction of the various search engines today and most people just know and use the big-G.
Reddit use to have all sorts of communities. Then they started banning everything, a CEO edited comments and didn't step down and now it's all 'safe' and single opinionated (Even /r/unpopularopinions went away).
This is a cute project and I hope it's self-hostable, because I might give it a shot. So far it doesn't seem like there's any code released.
I think the future of the Internet needs to be distributed. We need more things like Sandstorm, PeerTube, Pixelfed; thinks that make it easier for people to pay to host their own content and have control over it.
https://pouet.net is the unofficial home of the demoscene, even though it's much weirder than the demoscene itself.
https://dwitter.net needs no comment
Stack Overflow has answers like: https://stackoverflow.com/a/1732454
Half of tumblr is totally out there.
I personally wouldn't call 4chan and its relatives fun, but they sure are weird.
There's dedicated, active, shitty phpbb forums for every single weird sexual fetish you can imagine.
And that's just the fun and weird patches of the internet that I happen to know about. There must be 3 orders of magnitude more. I'd wager that if you think the internet isn't fun and weird anymore, then you're just looking in the wrong places. The problem is with you and not the internet.