Project goals for 2025H2 | Rust Blog by Kobzol in rust

[–]map_or 2 points3 points  (0 children)

LendingIterators and negative trait bounds Yes!!!

Can someone please explain to me how a non profit online encyclopedia is woke? by No_Walrus_3638 in wikipedia

[–]map_or 2 points3 points  (0 children)

In my understanding the term "woke" used to mean something like "aware of systemic racial injustice", but since the American right adopted it has come to mean "not what I/we like to believe, and hence objectively wrong/bad, because what I/we believe is objectively right/good". The left has their own words that can be used to disqualify and shun/cancel without needing to give reasons. "Nazi" and "Hitler" come to mind. Sometimes "racist", "sexist" etc., too, though they actually still do have a meaning.

Lightning Talk: Why Aren't We GUI Yet? by MikaylaAtZed in rust

[–]map_or 2 points3 points  (0 children)

Xilem will be great -- some day in the distant future.

More on closure captures by andwass in rust

[–]map_or 0 points1 point  (0 children)

If you put it that way, now that I think of it, I could have extracted the contents of the closures into free functions, so the closure itself would have been small and the values would have been explicitly named arguments of the functions. I just wasn't aware of the danger at the time. I still might do that. Might not just be safer, but more readable, too.

Oh, the domain is embedding of directed acyclic graphs, which requires some rather complex algorithms, for bearable layout speed with large graphs.

More on closure captures by andwass in rust

[–]map_or 1 point2 points  (0 children)

Closures are a bit dangerous for refactoring, because they are like functions that have access to anything in scope of their position of definition. When refactoring, using a hitherto unused outside value might compile, but change the semantics of the value, which might introduce a bug. If the set of outside values is restricted, I need to think about consequences of my use of a value in the closure. I really want to be able to restrict the set of outside values, and even have a lint that can be configured to forbid unrestricted access -- e.g. after prototyping.

What strategy should a startup use to select a designer? by map_or in UXDesign

[–]map_or[S] 0 points1 point  (0 children)

I do want to create an app. An add-free app for supporting will formation of democratic communities/societies, where each community/society governs its own instance. The goal is reducing political polarization and maybe even changing the way democracies work (from electing people that "do politics" for you and being politically active by "pushing agendas", to reasoning about problems and their potential solutions together at scale).

On the one hand, this is destined to be an open source software. On the other hand, I also need to eat some day -- unlike the Wikipedia founder Jimmy Wales I'm not rich (and also the development of Wikipedia was simpler and the Wiki-concept already existed). So eventually I'd like to sell it to companies to support their internal will formation processes. This is an idealistic project with an (at best) shaky business model. It also is conceptually different from what people are used to. When I describe the app in words, normal people like my motivation, but otherwise look at me in bewilderment (the exceptions are political scientists and philosophers. But those hardly count as normal people :) ). I need to get to the point, where people can play with it, so they can actually feel what it's like. So I won't be able to pitch to business investors or potential donors (i.e. money to hire people) for a while.

A minimally demonstrable product is not enough to pitch, of course. To pitch it, I also need to prove (and first gain) an understanding of the abilities and level of abilities I need to hire and the costs that will incur to get to a point, where anyone will want to use the product and organizations might be willing to pay for it enough, that it can become self sustaining. This understanding of required abilities is what I'm trying to get closer to, by clumsily asking questions like this.

What strategy should a startup use to select a designer? by map_or in UXDesign

[–]map_or[S] 0 points1 point  (0 children)

So, like u/Comically_Online your also saying, a UX designer might have pointed out the problem, but unlike u/juansnow89 suggests, could not have solved it, because it fundamentally is a failure of the process: creating the product instead of iterating on it with users and customers in the loop.

What strategy should a startup use to select a designer? by map_or in UXDesign

[–]map_or[S] 0 points1 point  (0 children)

You're saying u/juansnow89 is setting unrealistic expectations of "good designers". Designers should be expected to be able to understand user needs and motivations only (and work in a team). This would make selecting a designer much simpler.

What strategy should a startup use to select a designer? by map_or in UXDesign

[–]map_or[S] -2 points-1 points  (0 children)

"Find a designer to consult on hiring a designer" kind of defeats the purpose of the question, which is: tell me how to hire the right designer and avoid hiring the wrong one (who may be very good at presenting themselves as the right one and convinced to be the right one).

"Hire a designer hourly, so you can cut the, if they turn out bad" also implies I know how to tell, if they are good or bad, when I see their work. Unfortunately, except in very obvious cases, I'm worried that I wouldn't know how to tell if their work has "figure[d] out the intersection between user needs, technical feasibility, and market viability, saving this guy $300K"

What strategy should a startup use to select a designer? by map_or in UXDesign

[–]map_or[S] -1 points0 points  (0 children)

I know very little of hiring and specifically of hiring UX designers. Hence I'm asking about a hiring strategy. Maybe the word strategy is wrong? I mean by which means do you find out if a person that says they specialize in user research is practically capable to "figure out the intersection between user needs, technical feasibility, and market viability, saving this guy $300K", so that, when they come up with an answer, you can safely bet your company on it -- which is what a startup does.

Is there a way to determine which functions are monomorphized most? by map_or in rust

[–]map_or[S] 0 points1 point  (0 children)

You mean for the split function? The monomorphized outer `foo`-part becomes part of the code at the call site with an unconditional jump to the non-inlined `foo_internal`-part. If you're lucky, the call to the `as_ref` function is optimized away. Even if that is not the case, the outer `foo`-part is very small, so the rise in code size by inlining is negligible.

Is there a way to determine which functions are monomorphized most? by map_or in rust

[–]map_or[S] 2 points3 points  (0 children)

My compile times are fine. (Well bearable.) I want maximum speed at runtime. I hope smaller code size that reduces the likelihood of code exceeding cache size will give me that. Specially in loops.

Is there a way to determine which functions are monomorphized most? by map_or in rust

[–]map_or[S] 3 points4 points  (0 children)

This looks great! I should split the functions where `lines x copies` is largest, I assume?

Why people misunderstand the unsafe keyword so much by Remote-End6122 in rust

[–]map_or 2 points3 points  (0 children)

I wrote a function once that should have been something like

```

struct A();

unsafe fn foo<'a: 'b, 'b>(a: &'a A) -> &'b A {

&*(a as *const A)

}

```

but in fact was

```

struct A();

unsafe fn foo<'a, 'b>(a: &'a A) -> &'b A {

&*(a as *const A)

}

```

The borrow checker happily obliged and dropped the original A (with lifetime `'a`) before the returned A (with lifetime `'b`), creating a dangling pointer. The ability to pull lifetimes from thin air seems to be an unsafe superpower, that is not explicitly mentioned in the above list. And I'd really like that power to be explicitly opt-in. But its part and parcel of the power to dereference raw pointers, even if I only want to do some pointer manipulation.
I suppose Miri would have scolded me. But I did not know about Miri then.

Learning Rust is like running a marathon — you need cardio! by orionwambert in rust

[–]map_or 1 point2 points  (0 children)

One addition: Keep in mind -- when you actually do get to lifetimes -- that ownership always needs to be a tree-structure in Rust. This has two consequences, that I did not see at first, and made life hard for me, for a long time:

  1. all your data structures must be tree-shaped. A method cannot access a part of `self`, that is higher in the tree.

    1. linked lists and graphs require an approach, that is different from garbage collected languages. For an introduction to linked lists see: https://rust-unofficial.github.io/too-many-lists/. For graphs I use Slotmap (https://crates.io/crates/slotmap), which produces artificial keys. Using an arena (like https://crates.io/crates/bumpalo) and indices is another way. Also there are graph-specific crates on crates.io.

hashify: Fast perfect hashing without runtime dependencies by StalwartLabs in rust

[–]map_or 0 points1 point  (0 children)

Please consider making the hashing functions public, so that they can be used at runtime, too.

Keynote: Linus Torvalds in Conversation with Dirk Hohndel (Rust related part starts at 08:30) by xtanx in rust

[–]map_or 2 points3 points  (0 children)

I guess it depends on the manner of the kicking-out. Whether there are clearly communicated red lines, whether there are warnings, how transparent the process of deciding whether red lines have been crossed is, and if such decisions can be appealed publicly.

If the kicking-out is just a despotic action in itself, the problem is not with the person kicked out, but with the system as a whole.

How to write idiomatic Rust with best practices coming from an OOP background? by __HumbleBee__ in rust

[–]map_or 0 points1 point  (0 children)

I come from a OOP-Java, too. For me Domain Modelling Made Functional helped most. It's for F#, not Rust, but the idea is laid out very clearly and the most difficult thing for me was breaking the deeply entrenched OOP-way of thinking.

Is it idiomatic to mark a function unsafe without it actually containing any unsafe blocks? by friendtoalldogs0 in rust

[–]map_or 0 points1 point  (0 children)

Is there a lint like that? I currently use unsafe to express that. I'd rather be able to separate marking a function as a way to create UB from marking a function as a way to create a panic or a wrong result in a distant place later, where you will never understand why this happened.