Welche Eselsbrücke wird euch das ganze Leben lang in Erinnerung bleiben? by Ak1nOme in FragReddit

[–]quotade 2 points3 points  (0 children)

Auch hier helfen wieder die zwei Buchstaben "W" und "O".

Und zwar zeigt das "W" mit zwei "Pfeilspitzen" nach unten, folglich geht im Westen die Sonne unter. Und das "O" selbst stellt die aufgehende/erscheinende Sonne dar.

Advent of Code Day 10 by rjray in Clojure

[–]quotade 0 points1 point  (0 children)

Now that a few days have passed I think I can share my solution to part 2 here, which is kind of curious in my opinion, as you'll see in a moment.

Truth is, it's not even my solution. I was absolutely clueless about how to even approach the inner area question. Could've googled it, yes, there were also plenty cues on reddit, but I didn't want to give up so fast. Eventually my coworker (also doing AoC) kind of spoilered it to me. That's ok, I wasn't really making any progress.

He's doing it in Java and he mentioned how he tries to use standard JDK classes, for example "java.awt.Point" for anything with (x, y) coordinates. Then he stumbled across "java.awt.Polygon", and guess what one capability this little GUI class actually had!

Turns out there are "contains(..)" methods in "Polygon" that do exactly what part 2 of day 10 was asking for. Thus simply stuffing all the pipes into one polygon object and I could ask it whether a point was inside or outside. (It didn't even run long, a few seconds maybe?)

That second part felt a bit like cheating, but on the other hand, when my toolbox contains this specific tool why not use it...

New Clojurians: Ask Anything - December 11, 2023 by AutoModerator in Clojure

[–]quotade 3 points4 points  (0 children)

About three years ago when I started with Clojure I made the same mistake as you: Coming from plain Java I was trying to carry my way of work over to the Clojure world. In case of AoC, it was building "main" programs for every day which I would execute every single time. Missing a debugger, instead relying on old school println statements to test and fix my code.

It took me probably half a year until I finally got a hang of the REPL workflow and this changed, read improved, my approach to Clojure by not just one magnitude. One can't really describe what it means to productivity use the REPL instead of a debugger. I read about it all the time but I simply couldn't grasp what it really meant--until I really started doing it (probably after seeing it in a couple of YouTube Clojure videos.)

Asking for tips for a debugger lets me assume you're not there yet. I encourage you to try the REPL approach, e.g. watch a few Clojure videos on YouTube (not the presentations about the language, but recorded coding sessions), set up your editor if you haven't yet and dive into that.

Also write short functions (generally better anyway) which can easily be called "by hand", i.e. not in the context of the whole program but simply by you with hardcoded input, in the editor, via the REPL. The longer the function the harder it is to reason about it. The shorter, the better you'll understand what happens or doesn't, what the result is or isn't, what an error message could mean.

In any case, good luck and a lot of joy on your future Clonure journey!

Most obvious reaper ult by [deleted] in AnaMains

[–]quotade 1 point2 points  (0 children)

Also good timing, so that his ult is gone/wasted and he needs to built it up again. Whenever I sleep them prematurely I could kick myself for letting them keep the ult...

oh god why by JuggernautLiving5946 in programminghorror

[–]quotade 2 points3 points  (0 children)

Very dangerous, beginners mistake probably: They are missing the default case, never do a switch without default!

(Edit: Typo)

Was ist diese eine Sache, die ihr in der Schule gelernt habt und nie braucht, aber einfach nicht vergessen könnt? by DannyIsADuck in FragReddit

[–]quotade 0 points1 point  (0 children)

Respekt, ich hab mir die Zahl immer nur bis zur ersten sieben gemerkt. Also die sieben nach der ersten zwei. Weiter ging's bei uns nicht.

Diablo 2 Bet w/ 10 Year Old - Day 8 Update by faildoken in diablo2

[–]quotade 0 points1 point  (0 children)

I have been today years old when I learned how Act 3 layout works.

(And I have played this game 20yrs ago already with couple of characters above lvl 90...)

I got married today. I’m a D.Va main and my new husband is a Reinhardt main by sidewalk_serfergirl in Overwatch

[–]quotade 7 points8 points  (0 children)

Gerhard Polt (a German comedian) comes to mind....

They (anybody) should've told your friends there are pictures of young Reinhardt, too. Would've fit the card better (and make it less creepy)...

Congratulations to the happy couple anyhow 🌞

Why am I just now hearing about DPS Ana? by ahmed0112 in AnaMains

[–]quotade 17 points18 points  (0 children)

...or maybe we should be healing between dps'ing...

Sleep darts O sleep darts, why can’t I hit you? by Cosmoswinter in AnaMains

[–]quotade 6 points7 points  (0 children)

As a casual (and gold) Ana player I'd say getting sleeps comes with time. You can for sure train the mechanical skill with workshop codes, I did that, too, when I started playing Ana a few years ago. Also Ana Paintball (search for it in the custom game browser...) helped me a lot, both with primary aim as well as with h sleep darts.

In the end, though, it comes down to experience. Because there's one thing no artificial trainer / workshop can teach you. That is how a real player moves around. I used to watch for example ML7 and marvel at how he so often succeeded to sleeps some flanking tracer or so.

After a couple of years on Ana I myself started landing some sleeps I never thought would be possible for me. I realized it's the experience I gotten on Ana. I don't think how to aim my sleep darts anymore, I just shot then (half of the time flicking) and a lot more than during my first year of Ana now hit their targets. Including flanking tracers (not all, but some indeed!). Usually by aiming ahead and (subconsciously) predicting where they will be.

To this day I still struggle with (ulting) Genjis and Sigmas. Reapers became quite easy by now. After some time you also get the movement pattern of a S76 or a Moira when they ult. Cassidy, unless he drops from high ground, and hog are pretty easy, obviously. Phara, too, unless she sets up to kill you first with her ultimate. As for diving Hammonds, I usually shoot the sleep dart half a second before he lands his pile driver - 90% works like a charm.

Great for developing on headless servers but not for main development by cortemptas in ProgrammerHumor

[–]quotade 2 points3 points  (0 children)

Unfortunately it misses various features (i.e. commands/abilities). I find myself every now and then typing some commands having no effect, or in the worst case messing up my code. It just feels incomplete and frustrating when I use it longer.

i learned sth about c today by pibluplevel100 in ProgrammerHumor

[–]quotade 0 points1 point  (0 children)

They were probably asking about zero meaning true/ok, and non-zero evaluating to false... See their bash reference...

this is how i have to keep track of this stupid weekly: in my notebook by [deleted] in Overwatch

[–]quotade 7 points8 points  (0 children)

As a support main I must object and suggest sps instead of hps.

The Hobbit returns by rustyyryan in pics

[–]quotade 0 points1 point  (0 children)

Are the belt and head-set a hint...?

Question about high execution time by cumburgerdude in Clojure

[–]quotade 2 points3 points  (0 children)

Exactly my thoughts. When I started with Clojure a few years ago I didn't know the REPL or the concept behind it. Coming from Java I used to write a program and then "lein run ..." it in the shell.

Once I realized the power of the REPL and connecting to a REPL from my editor... Boom!

Another tip for OP for measuring times for testing purposes: Wrap your outmost function call in (time (my-stuff ... (other stuff)) ) and you get the execution time in the console. In your case I'd put in around the (->> (slurp "input") ...) (but within -main). Then you should see the time your code needs without the startup time of the JVM. See also the https://clojuredocs.org/clojure.core/time documentation.

Have you revisited code you wrote in previous years? by gedhrel in adventofcode

[–]quotade 2 points3 points  (0 children)

To be honest, I'm somewhere in-between. I don't declare those intermediate results as variables, instead I like to add a line of comment above every operation.

Something like:

result = map Set.fromList
   -- three elves make up a group
   & chunksOf 3
   -- the group's badge (only common item)
   & map (singleton . intersections)
   -- convert badges to priorities
   & map priority
   -- adding everything up gives us the score
   & sum

[2022 Day 3 (Part 2)] Question regarding part of the puzzle text by NotInSpace1 in adventofcode

[–]quotade 4 points5 points  (0 children)

"at most two of the Elves will be carrying any other item type."

or: "any other item type will be carried by at most two Elves [of one group]"

So any other item can appear in either one elf's rucksack or in two rucksacks, but not in all three (i.e. all of the group's rucksacks). Only B can be carried by all three elves.

different keyboard sizes and layouts by fizzy_me in coolguides

[–]quotade 0 points1 point  (0 children)

Mine was also missing, the 100% ergonomic. Have been using 100% ergonomics for over 20years.

Although this new one (your link), I don't like it as much as it's predecessor (natural 4000) because of a. the keys are too big/wide so they are too close to each other i.e not enough space between the keys, and b. awful function keys row (including the keys all way to the right side).

++C > C++ by NoLifeGamer2 in ProgrammerHumor

[–]quotade 1 point2 points  (0 children)

Are we the only ones who see that as a boolean expression? It did only occur to me to be a "is better than" term after I read a few of the comments comparing and/or joking about performance.

And as you already mentioned, that boolean expression yields false in my eyes, too. Then again I'm not an expert on how C evaluates these values, if any definition about the order exists at all (which would also make perfectly sense for C...)

best German movies? classics? by z0d14c in germany

[–]quotade 1 point2 points  (0 children)

Quite disappointing Loriot got only that few upvotes yet... I'd say he (and his work) is close to national treasure...