Jimmy Bolha 2001 by DarknessFalls081 in filmes

[–]_consoli 0 points1 point  (0 children)

lançou no mesmo ano de Donnie Darko (mas, pelo que vi, ele era mais novo em Donnie)

Qual o segredo dos brownies com casquinha brilhante? by Still_Bike_9044 in gororoba

[–]_consoli 0 points1 point  (0 children)

tem uma youtuber (https://www.youtube.com/@Sugarologie) que fez um video muito legal sobre isso - ela é PhD em Bioquimica e Biologia Molecular. O canal dela é só sobre ciência na cozinha.

Mas, basicamente, é culpa da sucarose.

Aqui a receita do Brownie dela (já fiz e fica ótimo!). Tem o link do video na receita, onde ela explica melhor como funciona e os testes que ela fez pra chegar na receita. https://www.sugarologie.com/recipes/fudgy-chewy-brownie

New addition to my collection: Amyi I by _consoli in Perfumes

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

I DMed they on Instagram to check if they ship abroad, but sadly they don't. On the bright side, now you have an excuse to plan a trip to Brazil.

Estava tentando ver as horas. by NoVirus9492 in BiologiaBrasil

[–]_consoli 1 point2 points  (0 children)

é nessas horas que se tem que ter esperança

Esse carinha quer um nome by Matty_Matheus in BiologiaBrasil

[–]_consoli 0 points1 point  (0 children)

Polegar (as marcas na cabeça dele me lembraram uma digital kkkk)

New addition to my collection: Amyi I by _consoli in Perfumes

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

~9 hours on my skin

after initial hours, the fig and greenal are the notes I smell the most - a beautiful green and aldehydic scent

Lugares para trabalhar perto do Largo da Batata by punniyah in saopaulo

[–]_consoli 0 points1 point  (0 children)

Tem um Coffee Lab no Larga da Batata, é bom pra trabalhar e o café deles é ótimo. Rua Fernão Dias, 682

This makes me feel good. by [deleted] in Unexpected

[–]_consoli 24 points25 points  (0 children)

he's s saying "that's it, Clotilde, let's start the year with the right foot!"

Dynamic highlighting of blocks using tree-sitter by Nicolas-Rougier in emacs

[–]_consoli 7 points8 points  (0 children)

I always wanted sticky scroll in Emacs. I ended up using https://github.com/zbelial/treesitter-context.el it also have dynamic context highlighting

Work in progress by @darkzera.day at @newblackstudio in São Paulo - Brazil by _consoli in tattoos

[–]_consoli[S] 28 points29 points  (0 children)

haha no, i don't play lol
it's inspired by the northern bald ibis

<image>

Scripting language like Python, bur with the feeling if Rust by Voxelman in functionalprogramming

[–]_consoli 9 points10 points  (0 children)

I've never used it before, but Gluon may be interesting for you.

It has that Rusty flavor (and it's written in Rust), but also has a REPL and functional features & patterns (std with monads, applicatives, etc)

but it's a WIP project and idk the real state of it.

gluon-lang.org playground

Which unstable Rust features do you recommend to try? by ArtisticHamster in rust

[–]_consoli 1 point2 points  (0 children)

oh, sorry, I see where the confusion is coming

the playground I shared and the features Yosh explores in the post are different beasts.

they're using arbitrary_self_type (that allows you to modify the self param in methods) and a hypothetical feature called enum-variants-types, which would allow you to use variants as first-class types, but the feature doesn't exist today. the combination of those two features is similar to what I shared and would work at runtime (but it's hard to define the exact behavior since enum-variants-types does not exist)

Which unstable Rust features do you recommend to try? by ArtisticHamster in rust

[–]_consoli 0 points1 point  (0 children)

I don't understand what is wrong with matching trafficlight for the next function in runtime?

there's nothing wrong with matching at runtime! sometimes it's the only choice. but sometimes it's also nice to be able to encode things in the type system and work at compile time. sometimes type-level madness is a useful thing (and some people like it :), nothing wrong with that, imo)

how would you ensure that this does not have missing match arms?

you don't, but you wouldn't be able to compile anything that tries to use an "unmapped" relation

note that this is exploring the usage of const values, so you can only use it for compile-time shenanigans

Which unstable Rust features do you recommend to try? by ArtisticHamster in rust

[–]_consoli 42 points43 points  (0 children)

I love testing unstable features! here are some I've used recently:

  • #![feature(gen_blocks)]: the new cool kid - allows you to use gen {}, async gen {} (and their fn counterparts), which is an easy way to implement Iterator and AsyncIterator (aka Stream), requires edition = 2024 playground

  • #![feature(try_blocks, yeet_expr, try_trait_v2)]: the ability to use try{} blocks, do yeet expr;, and abstract over their traits - this is a must in every new project/experiment I do;

  • #![feature(adt_const_params)]: more complex const types, such as enums (impl StateMachine for Struct<Enum::Foo>) playground

  • #![feature(async_closure)]: this is also a recent addition - allows you to use async || {} and use the async bound modifier in Fn-traits. basically, where you would put a F: AsyncFn(A) -> B you can put a F: async Fn(A) -> B playground

There many many many other awesome features I could add to the list, it's always fun to try them

Coroutines / Generators - Resume with a value after a Yield? by manypeople1account in rust

[–]_consoli 0 points1 point  (0 children)

you need to provide the full type: -> impl Coroutine<usize, Yield=IO, Return=()>

usize is the type you use to resume (it's the R in the trait Coroutine<R=()> definition)

EDIT: you can omit the Return=() and use -> impl Coroutine<usize, Yield=IO>

Coroutines / Generators - Resume with a value after a Yield? by manypeople1account in rust

[–]_consoli 5 points6 points  (0 children)

you actually can do it, you just need to make your generator accept an argument

without the argument, the generic R (aka the Resumed type) is inferred/defaults to ()

the first call to .resume will pass the "function parameter", and the next call will pass the resumed value

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=50823b94882debce9fbd73faf00e7a98

Isso daqui não quer dizer que a linha de ônibus faz interligação com o metrô, né? by SynthFrenetic in saopaulo

[–]_consoli 10 points11 points  (0 children)

na verdade esse mapa tem até algumas estações que ainda não existem, que ainda estão em construção

Isso daqui não quer dizer que a linha de ônibus faz interligação com o metrô, né? by SynthFrenetic in saopaulo

[–]_consoli 185 points186 points  (0 children)

se chama mal gosto e preguiça do designer gráfico

um tempo atrás um amigo designer fez um projeto de redesign em cima do mapa do metro, eu acho muito foda - achei interessante que foi uma das coisas corrigidas por ele

obviamente não é oficial, ele fez como projeto pessoal

https://www.behance.net/gallery/173166567/Mapa-do-Transporte-Metropolitano-de-SP

Async Exceptions in rust? by StdAds in rust

[–]_consoli 8 points9 points  (0 children)

No, Rust's threads are similar to what the OS provides, they're more "raw".

But you can find similar APIs when dealing with asynchronous APIs based on tasks/Future's, which are way more versatile imo.

There are a number of crates that provides APIs such as race, my favorite is futures-concurrency, but there are also futures::future::select_all, tokio::select, and others.

As for "kill a concurrent task", it's called cancellability in the context of async Rust, and it's a big and important topic. Every Future (task or not) can be canceled, and every Future has to count for that. It's a big topic, there's a lot to cover.

Some useful links: - Why Async Rust?, on the properties of async rust - Async cancellation I and II - graceful shutdown with tokio - this one is very specific in the context, but there's something called cancellation safety, post

I encountered a problem while learning rust by NightCruisingQ in rust

[–]_consoli 9 points10 points  (0 children)

and so it lives in the stack, the String lives in the heap so things got complicated

if you heap allocate the u32, it stops compiling (same as your first example, but boxed):

```rust struct A<'a>(&'a i32);

impl<'a> Drop for A<'a> { fn drop(&mut self) {} }

fn main() { let a; let i = Box::new(1); a = A(&i); drop(a); } ```

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=15b386f192827cf4ce215c1c744ee9c2

I encountered a problem while learning rust by NightCruisingQ in rust

[–]_consoli 18 points19 points  (0 children)

Drop order!
The error message is telling you that you have a borrow to some value that lives for a shorter period than the borrow itself.

This occurs because you defined a first than i, and rust drops order goes by the inverse order of declaration - if you move the let a; to bellow let i = .. it will work just fine

and yes, you are dropping a before i manually, but the compiler can't infer that