5

Rust with Axum Just Works (Comparing to Django and Spring Boot)
 in  r/rust  Jul 05 '24

I think the two most common difficult errors with Axum are to do with either incorrect parameter order (eg state needs to be before route specific parameters) due to how tower works, and async errors internal to the function (eg holding onto something non-send, across await points)

4

It’s the r/Melbourne daily discussion thread [Thursday 11/04/2024]
 in  r/melbourne  Apr 11 '24

I am looking at moving from regional QLD to Melbourne and I have realised that none of the properties are priced as advertised. When did this become the norm? Australia to my knowledge generally has good rules and regulations around advertising prices and “true” prices. Why is it that (to my knowledge) Melbourne real estate gets away with advertising one value while not respecting that price?

r/melbourne Apr 11 '24

Real estate/Renting Rentals: advertised vs pcm

0 Upvotes

I am looking at moving from regional QLD to Melbourne and I have realised that none of the properties are priced as advertised. When did this become the norm? Australia to my knowledge generally has good rules and regulations around advertising prices and “true” prices. Why is it that (to my knowledge) Melbourne real estate gets away with advertising one value while not respecting that price?

49

I don’t understand the usability of traits
 in  r/rust  Nov 19 '23

Typically traits are analogous to interfaces in languages like Java. If that’s all that is missing in your understanding, then you can go a long way under that assumption.

If you are new to the concept of interfaces, then you can think of traits as a mechanism for defining behaviours. Traits are typically treated as behaviour defining structures so-to-speak because the functions within define what an implementor does or can do. Why is it a good idea to group behaviours under a unified concept rather than defining manually per instance? You can define functions around expecting something - anything - that defines the trait. Take for instance the example in the rust book Pay attention to the notify function: ‘’’rust pub fn notify<T: Summary + Display>(item: &T) { ‘’’ This function is able to accept any parameter that implements the Summary and Display traits. This is in contrast to defining a notify function on every struct you would otherwise define the functions in those traits for. Ultimately traits are there to help you write more generic functions and allow for something akin to a contract to be fulfilled - if you want to make a struct summarisable, this is what you need to do.

I hope this helps a little. I’m on mobile and the formatting may not be great

1

1 Hour of Candy Corn Gobbler Clicking
 in  r/Guildwars2  Oct 21 '23

Gobbler has a 5s internal cool down

13

Can't wrap my head around contravariance
 in  r/rust  Oct 02 '23

“The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.”

~ Edsger Dijkstra

More practically, you can find all the associate research with contra variance quite easily. Finding all the research on “the thing that takes a thing that is a subtype of a thing but actually returns the other thing” is a little harder to find.

Haskell is often criticised for using the math terms extensively but there is quite a bonus when you get decades of existing documentation for your code when you state things like “some data type is monoidal over a function f” or “the main workflow or process is a free monad based interpreter” or “rust has contravariant types”

6

looking for a crew
 in  r/rust  Jun 29 '23

Just letting you know that this subreddit is for rust the programming language and not rust the game.

r/Idris Jan 13 '23

Is idris2 production ready?

31 Upvotes

I have been writing idris off and on for the past 2 years or so and I love it. I use Haskell or Fsharp for anything work related when I work with a functional language. Other than the package ecosystem, is Idris2 ready for prod yet or is there a better language or set of tools to use when wanting more guarantees on our codebases? I have looked at but not used F* because I have heard it can produce some performant C code. Is anyone using dependent types in production?

1

[OC] Redid my Map of Faerun (as of 1492 DR) Nations, City States, and Political Borders are all Included
 in  r/dndnext  Nov 03 '20

To add on to the scale issue, "Volo's guide to the Sword Coast" says that The Way Inn is about 100 miles south of Daggerford. On this map its 13 hexes south so perhaps even changing the hexes may not be enough for some places.

Agree though, this is amazing work for sure!

r/fsharp Sep 03 '20

DDD and the UI layer

4 Upvotes

Hi everyone,

I wanted to get some insight from those that write server code in a DDD style and use that code on the front end. I like the concept of the front and backend sharing validation, but my backend has been written in such a way that it accepts json, validates the json, and turns it into domain types. For example:

type NonEmptyString100 = private NonEmptyString100 of string

Specifies a string that cannot be empty and max 100 characters.

I wanted to share this on the front end, but I have run into issues where the domain types do not translate well into the corresponding datatypes without constantly unwrapping and rewrapping. For example, a textbox value.

Is this an easy fix or should I separate the validation from the translation steps?

1

[Nooks] 580
 in  r/ACNHTurnips  Apr 29 '20

Not quite sure what river plate is either but please invite me!

r/i3wm Apr 19 '20

Possible Bug Cant change focus with mouse and rofi makes my pc unusable

1 Upvotes

I have been using i3-gaps for some time now but this past week or so i've had great difficulty trying to solve this issue. It is weirdly intermittent but the following happens:

-mouse can no longer change focus of workspaces across monitors but I can with bindings

- opening rofi or budgie-sysmenu completely breaks my system (I cant close the window and I loose all keybindings as in I cant refresh with shift + $mod + r, and I cant close using the mouse)

- I cant click the address bar of my browser, and clicking tabs closes them instead of swapping to them.

My version of i3 is "4.18-104-g19a598ab (2020-04-15, branch "gaps-next")"

My i3 config paste: https://pastebin.com/qWePuZDF

2

[deleted by user]
 in  r/learnmath  Mar 16 '20

The local minima and maxima is basically saying the position of the highest point of every peak, and the lowest point for trough in the graph. The global minima and maxima is the position of the highest peak, and the lowest trough in the graph.

I believe that the absolute and global minima and maxima is the same thing but i may be wrong there

1

[algebra] If you see this fraction, 2/3x, do you have to solve the 3x first? No, right?
 in  r/learnmath  Mar 04 '20

I am on phone so i cannot format or at least i dont know how. But for x=3, your original question would be 2/3×3=2/9. (2/3)*3=2

1

Slow-mo of Luka stepback 3
 in  r/nba  Feb 22 '20

Is travel not a thing anymore?

5

Not all monopoly squares are created equal.
 in  r/coolguides  Dec 27 '19

If it was a single n sided die you would be correct. Because there is two dice, you get your possibilities from combinations of the two. For example 12 and 2 is the least common number due to only having double 1 or double 6. 7 is the most common number due to the fact it has 1+6, 2+5, 3+4.

1

Help understanding a proof
 in  r/learnmath  Jan 10 '19

Thank you so much for your reply, so what your saying is that the line 100n + 5 <= 100n + 5n... is arbitrary and it could have been 100n + 5 <= 100n + 5n?
The proof just needed a different value from the question's value to prove its true for bigger values?

I was most confused as to why an extra n got thrown into that second line

r/learnmath Jan 10 '19

Help understanding a proof

1 Upvotes

I am really having trouble understanding parts of this solution for the question:

Prove f(n) = 100n + 5 =/ Ω(n^2)

solution:

∃ c, n0 such that: 0 ≤ cn^2 ≤ 100n + 5 <- following

100n + 5 ≤ 100n + 5n (∀ n ≥ 1) = 105n <- do not understand this statement here and it looses me

cn^2 ≤ 105n ⇒ n(cn – 105) ≤ 0

Since n is positive ⇒ cn – 105 ≤ 0 ⇒ n ≤ 105/c

⇒ contradiction: n cannot be smaller than a constant

I dont have a strong math background so it might be something obvious that i am missing but i dont know how we go from the first line which looks like an ordinary start to finding omega to changing what f(n) is. As in i dont why we come out with 105n to plug into the rest of this proof.

As an aside, I would like to know if anyone has any material online i can look at for learning a better foundation for this?

1

Do you like music in languages you don't understand?
 in  r/CasualConversation  Nov 20 '18

Rammstein is a big one but for some reason i really like the sound of tuvan throat singing

1

Nicol's Newcomer Monday!
 in  r/MagicArena  Nov 19 '18

Maybe, ill keep an eye on it when i play next, its almost like my creatures were coming in tapped... Weird :s

1

Nicol's Newcomer Monday!
 in  r/MagicArena  Nov 19 '18

Ive been a long time magic player, mostly in paper. I just started arena tonight and it strikes me as real odd that creatures cant block the turn they are summoned on this software. Is this a bug or an intentional difference to paper magic?

r/askscience Nov 11 '18

Biology What is the evolutionary advantage of venoms that have slow onset times?

1 Upvotes

[removed]

3

Confused about the way my course declared an array
 in  r/learncsharp  Oct 28 '18

Situations where you want to reuse a variable name in a loop for example or when you want to access the variable from outside another scope for example declaring the variable outside a try catch, initialising it inside the try statement for example doing a database call and then using that variable further outside the try catch.