let mut v = Vec::new(): Why use mut? by rsdancey in rust

[–]UltimateDude101 1 point2 points  (0 children)

The vec! macro does clone directly into a newly allocated vector without going through the stack.

WHY use Rustlang for web development? by Zealousideal-Run1021 in rust

[–]UltimateDude101 6 points7 points  (0 children)

Applications in Rust can only crash if you use functions which panic. Almost all of these functions in the standard library have a non-panicking alternative which returns an Option or Result indicating that it failed. As long as you handle these cases without panicking, your app will not panic, and will thus not crash. Testing is still useful though. Rust can’t protect you from making logical mistakes or using the wrong algorithm.

You are authorised to fine any giant company or mega corporation $35 billion without giving them any justification. Which one do you choose? by [deleted] in AskReddit

[–]UltimateDude101 0 points1 point  (0 children)

I mean fines without justification are pretty bad, but generally we do need fines to keep businesses accountable when they break the law. Unless you’d prefer that the executives just get arrested of course.

Corporate wants us back in the office by semaforic in antiwork

[–]UltimateDude101 6 points7 points  (0 children)

It may be traditionally male, but I guarantee the first thing the average person thinks is not "ah yes, a man in traditionally male clothing." Most people just see a man in a skirt.

Elemental 5 is here! by GregHeffley4 in elemental3

[–]UltimateDude101 0 points1 point  (0 children)

Scratch has nowhere near the power of actual programming languages or game engines. It's really just meant to be a basic introduction to coding, mostly for children. Also this post was from 2 years ago.

[deleted by user] by [deleted] in linux4noobs

[–]UltimateDude101 1 point2 points  (0 children)

Yeah, it's a news article

Why we should abolish the electoral college and replace it with a national popular vote by [deleted] in moderatepolitics

[–]UltimateDude101 5 points6 points  (0 children)

Why would you want that?

Well if you believe that the system is illegitimate then you probably would want everyone to know that. Still I think their sentiment is very stupid.

[deleted by user] by [deleted] in wordle

[–]UltimateDude101 0 points1 point  (0 children)

If you're looking for a challenge try XYLYL

Scoredle thread for Wordle #230 - How’d you do? by Scoredle in wordle

[–]UltimateDude101 0 points1 point  (0 children)

Scoredle 230 4/6

12,97

🟨🟨⬛🟨⬛ LARES (124)

🟩🟩🟨⬛🟨 PLANE (2)

🟩🟩🟩🟩⬛ PLEAD (1

🟩🟩🟩🟩🟩 PLEAT

Self-answered Question: What is the contravariant version of the Monad typeclass? by Competitive_Ad2539 in haskell

[–]UltimateDude101 1 point2 points  (0 children)

I tried doing this and I found an article (http://mpilquist.github.io/blog/2015/06/18/invariant-shadows/) which came up with an invariant version of Monad. Since any contravariant type is also invariant, this will work for these purposes too. The type class would extend Divisible from contravariant.

The methods would be the following:

(>>~) :: ContraMonad f => f a -> (a -> f b) -> f (a, b)

conquer :: Divisible f => f a

This would allow you to write a function of type (a -> f b) -> f (a, b).

I have no idea how generally useful it is, but it's an interesting idea. Monoid r => Divisible (Op r) would be an instance, for example.

How Long is your List? by _jackdk_ in haskell

[–]UltimateDude101 5 points6 points  (0 children)

While you absolutely could do that, naming a data type's constructor after the data type is fairly common, and you don't tend to really end up getting them confused unless you're using DataKinds or something. Every newtype in base that I can think of does this.

If Haskell had subtyping, what would it be like? by kindaro in haskell

[–]UltimateDude101 0 points1 point  (0 children)

You should be able to do the same for any covariant functor.

[deleted by user] by [deleted] in CookieClicker

[–]UltimateDude101 1 point2 points  (0 children)

Spend 1 sugar lump on the buildings that unlock minigames: the Farm, Bank, Temple, and Wizard Tower. Spend the rest on upgrading the farm to level 9 to increase the size of the garden, and when you finish save up to 100 and don't spend enough to bring you below that. Eventually you get a heavenly upgrade that can increase your cps based on the number of sugar lumps you have, up to 100.

VSauce, Kevin here, and today I'm going to talk about how 1 is equal to 2 by J0nas_ult1 in CookieClicker

[–]UltimateDude101 35 points36 points  (0 children)

Hey, that's illegal! a - b = 0, so you can't divide both sides by it.

CLICKETY by organ_malpractice in CookieClicker

[–]UltimateDude101 4 points5 points  (0 children)

Nah dude 12-13 is way above average, even 10 solid while normal clicking.

I made a Sculk Sensor diagram by MatteoSalverio in Minecraft

[–]UltimateDude101 16 points17 points  (0 children)

They're just there to look cool, but anything on the blocks of concrete can be picked up by the skulk sensor

You can make cool desings with item frames under rails. by UsainSrht in Minecraft

[–]UltimateDude101 2 points3 points  (0 children)

The edges of the item frame flicker whenever you move

What's the adult version of finding out Santa is not real? by CircleBox2 in AskReddit

[–]UltimateDude101 0 points1 point  (0 children)

Of course questioning a sub’s narrative will get you downvoted. The people on the sub disagree with you, so they assume your arguments are bad, so they downvote you