Post code, nerds.
Top Poster of the Day:
911roofer
![](https://i.rdrama.net/images/163936841726r.webp)
![Badass Fighter Ace - Top Gun™ Maverick® Now Showing In Theaters!](https://i.rdrama.net/i/hats/Badass Fighter Ace.webp?h=10)
Current Registered Users: 30,843
![sidebar image](https://i.rdrama.net/images/17148642145254366.webp)
tech/science swag.
Guidelines:
What to Submit
On-Topic: Anything that good slackers would find interesting. That includes more than /g/ memes and slacking off. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual laziness.
Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably lame.
Help keep this hole healthy by keeping drama and NOT drama balanced. If you see too much drama, post something that isn't dramatic. If there isn't enough drama and this hole has become too boring, POST DRAMA!
In Submissions
Please do things to make titles stand out, like using uppercase or exclamation points, or saying how great an article is. It should be explicit in submitting something that you think it's important.
Please don't submit the original source. If the article is behind a paywall, just post the text. If a video is behind a paywall, post a magnet link. Fuck journos.
Please don't ruin the hole with chudposts. It isn't funny and doesn't belong here. THEY WILL BE MOVED TO /H/CHUDRAMA
If the title includes the name of the site, please leave that in, because our users are too stupid to know the difference between a url and a search query.
If you submit a video or pdf, please don't warn us by appending [video] or [pdf] to the title. That would be r-slurred. We're not using text-based browsers. We know what videos and pdfs are.
Make sure the title contains a gratuitous number or number + adjective. Good clickbait titles are like "Top 10 Ways to do X" or "Don't do these 4 things if you want X"
Otherwise editorialize. Please don't use the original title, unless it is gay or r-slurred, or you're shits all fucked up.
If you're going to post old news (at least 1 year old), please flair it so we can mock you for living under a rock, or don't and we'll mock you anyway.
Please don't post on SN to ask or tell us something. Send it to [email protected] instead.
If your post doesn't get enough traction, try to delete and repost it.
Please don't use SN primarily for promotion. It's ok to post your own stuff occasionally, but the primary use of the site should be for curiosity. If you want to astroturf or advertise, post on news.ycombinator.com instead.
Please solicit upvotes, comments, and submissions. Users are stupid and need to reminded to vote and interact. Thanks for the gold, kind stranger, upvotes to the left.
In Comments
Be snarky. Don't be kind. Have fun banter; don't be a dork. Please don't use big words like "fulminate". Please sneed at the rest of the community.
Comments should get more enlightened and centrist, not less, as a topic gets more divisive.
If disagreeing, please reply to the argument and call them names. "1 + 1 is 2, not 3" can be improved to "1 + 1 is 3, not 2, mathfaggot"
Please respond to the weakest plausible strawman of what someone says, not a stronger one that's harder to make fun of. Assume that they are bad faith actors.
Eschew jailbait. Paedophiles will be thrown in a wood chipper, as pertained by sitewide rules.
Please post shallow dismissals, especially of other people's work. All press is good press.
Please use Slacker News for political or ideological battle. It tramples weak ideologies.
Please comment on whether someone read an article. If you don't read the article, you are a cute twink.
Please pick the most provocative thing in an article or post to complain about in the thread. Don't nitpick stupid crap.
Please don't be an unfunny chud. Nobody cares about your opinion of X Unrelated Topic in Y Unrelated Thread. If you're the type of loser that belongs on /h/chudrama, we may exile you.
Sockpuppet accounts are encouraged, but please don't farm dramakarma.
Please use uppercase for emphasis.
Please post deranged conspiracy theories about astroturfing, shilling, bots, brigading, foreign agents and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email [email protected] and dang will add you to their spam list.
Please don't complain that a submission is inappropriate. If a story is spam or off-topic, report it and our moderators will probably do nothing about it. Feed egregious comments by replying instead of flagging them like a pussy. Remember: If you flag, you're a cute twink.
Please don't complain about tangential annoyances—things like article or website formats, name collisions, or back-button breakage. That's too boring, even for HN users.
Please seethe about how your posts don't get enough upvotes.
Please don't post comments saying that rdrama is turning into ruqqus. It's a nazi dogwhistle, as old as the hills.
Miscellaneous:
The quality of posts is extremely important to this community. Contributors are encouraged to provide high-quality or funny effortposts and informative or entertaining comments. Please refrain from posting the following:
Boring wingcucked nonsense nobody cares about that belongs in chudrama
Normie shit everyone already knows about
Anything that doesn't gratifify one's intellectual laziness
Bimothy-tier posts
Anything that the jannies don't like
Jannies reserve the right to exile baby ducks from this hole at any time.
We reserve the right to exile you for whatever reason we want, even for no reason at all! We also reserve the right to change the guidelines at any time, so be sure to read them at least once a month. We also reserve the right to ignore enforcement of the guidelines at the discretion of the janitorial staff. This hole is a janny playground, participation implies enthusiastic consent to being janny abused by unstable alcoholic bullies and loser nerds who have nothing better to do than banning you for any reason or no reason whatsoever.
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
/h/slackernews SETTINGS /h/slackernews MODS /h/slackernews LOG /h/slackernews EXILEES /h/slackernews FOLLOWERS /h/slackernews BLOCKERS
Jump in the discussion.
No email address required.
For this one, I started by treated the elevation as a graph. A location was said to be connected to another location in the graph if the other location could be reached from the current location. Then, I would start at the starting location and follow the graph until I reached the end. Along the way, I would keep track of the distance from the start - this doubled as a way to prevent me from having to deal with loops.
I don't really know much about traditional pathfinding algorithims but mine worked fine, so 💅. IDK if "wavefront" is what people in the feild call what I did, but it makes sense to me to imagine a wave crashing against the rocks...
Jump in the discussion.
No email address required.
This is a really long way of saying you don't frick.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I had everything prepared, EVERYTHING, and still failed miserably because of bugs.
Jump in the discussion.
No email address required.
More options
Context
close.erase(in_open_it)
in place ofclose.erase(in_close_it)
Jump in the discussion.
No email address required.
GOLDEN BSOD
Jump in the discussion.
No email address required.
I see, future Microsoft dev in the working
Jump in the discussion.
No email address required.
More options
Context
More options
Context
The challenges are already too much for me to enjoy them, im sry c++ chad , but i can only say that the code seems nice.
Jump in the discussion.
No email address required.
Fair enough
Jump in the discussion.
No email address required.
More options
Context
More options
Context
isnt it just a std::unordered_queue?
Jump in the discussion.
No email address required.
Yes but you can't search and erase an arbitrary element from it. At the end of the day I used the make_heap on a vector, complexity is the same
Well you don't need to necessarily erase it but you have to be able to change its priority when A* finds a better path
Jump in the discussion.
No email address required.
Not sure why would want that feature? The idea would be to write a comparator/less function that ensure that the element with the lowest edge weight + heuristic is always at the front.
Jump in the discussion.
No email address required.
Yes. If you have in the open set a vertex x with f(x) = 50, and A* finds another vertex from which f(x) = 40 you have to update the open set with the new f
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
spent first 15 or so mins looking up how to use a graph library
then i spent forever trying to debug a problem where it told me the positions i was giving to shortest_path were not in my graph. this is because i accidentally gave it the matrix instead, but it didnt even tell me i wasn't giving it a graph
no type checking is cancer
after that i spent a while getting destroyed by my edge construction being if-elif instead of pure if like it's supposed to be
Jump in the discussion.
No email address required.
just say
list(...)
btwAlso apparently networkx has
multi_source_dijkstra
though I use my own implementation.Jump in the discussion.
No email address required.
More options
Context
More options
Context
Amogus?
Jump in the discussion.
No email address required.
More options
Context
my feelings got hurt when i got filtoored by math yesterday so im going to drink a bunch tonight and look at this tomorrow
Jump in the discussion.
No email address required.
More options
Context
Importing a pathfinding algorithm felt like cheating but my DFS never returned![:platydown: :platydown:](/e/platydown.webp)
Jump in the discussion.
No email address required.
isn't it supposed to be a BFS?
Jump in the discussion.
No email address required.
it's probably better but DFS is easier to do through recursion and almost always works for earlier AOC problems.
Nothing can beat the pythonic
import solution
thoughJump in the discussion.
No email address required.
DFS sounds like u'd have at least O(N^2) which would take longer and probably be harder to debug.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
butt: moderately washed
matlab (
)
idk what a* is or whatever so I just dijkstra'd the first part, slapped a for loop for the second part, and optimized it by making only one dijkstra from the end to the start, which finds the start and the optimal starting point.
The code is still a bit messy and I have absolutely no idea why it only works when I take out the last element of my priority queue instead of the first, regardless of the sorting order (that was true for the forward dijkstra too so it's not that)
Jump in the discussion.
No email address required.
Why do you people do Dijkstra on unweighted graphs?
Fun fact: the i, j, k naming convention for loop variables was invented by Dijkstra, after his own surname.
Jump in the discussion.
No email address required.
Because that's the only one I've ever learnt![:gigachad3: :gigachad3:](/e/gigachad3.webp)
Jump in the discussion.
No email address required.
It's just that
is so dead simple I just wrote it.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
spent some time thinking of proper algorithm that can handle multiple sources or targets, but then gave up. You could most likely use djikstra to start at the end point, calculate the distance to every node and the pick the starting nodes with the lowest distance. Instead of just doing a BFS from every starting node to the End Node. But why would i implement that one manually and people that use library algorithm are
.
Jump in the discussion.
No email address required.
cope and seethe, slowcel![:marseysmug2: :marseysmug2:](/e/marseysmug2.webp)
Jump in the discussion.
No email address required.
More options
Context
Thanks, that's what I missed. I did the BIPOC solution of just slapping a for loop and it werks but I knew that was not good.
I also need to fix a bug with my makeshift priority queue because it works when I use it in reverse but not in the right way, regardless of the sorting.
Jump in the discussion.
No email address required.
More options
Context
or actually you can just start at the end and BFS your way until you find the first a, that will automatically be the closest.
i think performance wise best would be A* search with manhattan distance as a heuristic
Jump in the discussion.
No email address required.
More options
Context
Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
This is some breadth first search ffs, felt jewish chad school all over again, also how the frick are you strags so fast?!
Jump in the discussion.
No email address required.
More options
Context
lmao, they put a bunch of effort into generating the final swirl and gave up with the restit's a mountain you fricking idiotsolution with heatmap colours, I was bored today
Jump in the discussion.
No email address required.
More options
Context
Babby's first shortest path graph algorithm. I got incredibly lucky with part 2, I only had to modify one line lol.
Jump in the discussion.
No email address required.
More options
Context
Implemented my own totally faggy version of a-star. Edit: Included both variants in my result
Jump in the discussion.
No email address required.
Are you feeling okay bud?
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Jump in the discussion.
No email address required.
More options
Context
No one in this hellbent day and age is going to Heaven anyways. Do whatever you want before eternal darnation where God will punish everyone for all of eternity. No amount of repentance can forgive it because the Quran makes clear people who pray just to avoid Heck are seen as disingenuous and the prayer is null. Martyrs get Heaven at least. The only chance my soul has is a holy war breaking out which is a long cry from realistic. But they say Allah is the most merciful so maybe trying as hard as possible to be good is good enough. Else he would have killed us all already. Or maybe I am making excuses because I am scared for judgement day
Jump in the discussion.
No email address required.
More options
Context
[[[ Packets ]]]] edit this is day 13, wtf where is day 13 thread
Jump in the discussion.
No email address required.
More options
Context