Does anyone else want to use Rust generics to do dependency injection, particularly for testing, but find that Rust's compiler bug with handling async types stops them? It's been months, but it still bugs me.
How US #Tariffs Stand to Impact Prescription Drugs
The biggest impact will be on #generics - the backbone of #Medicare & #Medicaid - 80% of which are made in #China or #India, making many Rx unaffordable for many, eg the 60% of #Seniors that rely on Medicaid.
https://hbr.org/2025/05/how-u-s-tariffs-stand-to-impact-prescription-drugs
Nice website to play a bit with and learn typescript generics
“Zig-Style Generics Are Not Well-Suited For Most Languages” [2022], Varun Gandhi (https://typesanitizer.com/blog/zig-generics.html).
On HN: https://news.ycombinator.com/item?id=33142751
On Lobsters: https://lobste.rs/s/jktewn/zig_style_generics_are_not_well_suited_for
On /r/programming: https://old.reddit.com/r/programming/comments/xzqxu6/zigstyle_generics_are_not_wellsuited_for_most/
Medicine’s over-generalization problem — and how AI might make things worse
#AI #DeepSeek #ChatGPT #AIInMedicine #MedicalResearch #Generics #HealthCommunication #LLMs #MedicalEthics #ScienceCommunication #AIBias #CognitiveBias #Tech #Health #Medicine
https://the-14.com/medicines-over-generalization-problem-and-how-ai-might-make-things-worse/
The new tariffs imposed include a 26% tariff on India. Half of all generic medicines in the US are from India. This will impact 9 out of 10 prescriptions. #prescriptions #tariffs #generics
Sitting in PhpStorm and trying to get type hinting to work for calling generic functions.
I assume `$result` should get the type `T` and `$x` should be parsed as `int`, but the editor gives me no hint at all.
Is this even supposed to work?
```
/**
* @template T
* @param callable(): T $fun
* @return T
*/
function call(callable $fun) {
$result = $fun();
return $result;
}
$x = call(fn() => 1);
```
https://phpstan.org/r/76b4d50f-dd91-4e39-993a-458b26c321cf
#php #phpStorm #generics #phpDoc
Bayer to run glyphosate as a ‘separate business’ https://www.euractiv.com/section/agriculture-food/news/bayer-to-run-glyphosate-as-a-separate-business/?utm_source=mastodon&utm_medium=dlvr.it #agrifoodsector #Bayer #generics #glyphosate #Monsanto
Me: I love the possibilities of generics in Typescript.
Also me: I hate the possibilities of generics in Typescript.
Day 20 of PHP Generics.
This looks at the extends annotation. We also see how multiple things we've learnt can be used together.
but at least i got pinned down the syntax for "pass through all the #lifetimes and #generics and just implement me this here #trait"
[Перевод] Дженерики в Go
Это первая часть статьи, посвященной дженерикам в Go, из четырех. Одна из последних и наиболее интересных фич в Golang — поддержка дженериков. Эта серия туториалов будет посвящена тому, что это такое, какую пользу приносит, когда их стоит использовать и как они меняют процесс написания приложений на Golang. Начнем же!
This paragraph from "Effective Rust" book made me do "huh". It explains the difference in use cases between associated types and generics.
As a technical aside, it's worth understanding why the
Deref
traits can't be generic (Deref<Target>
) for the destination type. If they were, then it would be possible for some typeConfusedPtr
to implement bothDeref<TypeA>
andDeref<TypeB>
, and that would leave the compiler unable to deduce a single unique type for an expression like*x
. So instead, the destination type is encoded as the associated type named Target.
Clever rust. In that last screenshot it shows the maximum value that can be factored with that table of data (last value squared). In previous screnshots it showed as Max::Overflow, because in 32-bits it did. Now that we're in 64-bit territory it's showing the max for the last 32-bit table, near the top of the 64-bit range. Of course the very first entry above 32-bits will overflow 64 when squared - as the lower table shows in the max field. (It gets used a lot and square root calcs are expensive in the main loop - another gain of the 30-at-a-time - do it once for the topmost one only, and use the squared value instead while under overflow conditions.).
The takeaway? Note the Dr's replies (dates between my outgoing). You are correct. There are none.
If nothing else, maybe BOOST it?
This is my attempt to communicate important life changing information to my primary care physician, of the Geisinger Family Health Network, in State College, Pennsylvania, 16803. In JULY 2024.
I'm still waiting for his reply.
#Lyrica #Pregabalin #Gabapentin
#Civilrights #CivilProtection #medicalmalpractice
#FBI #Fraud #Pfizer #generics #phamaceutical #pharmacy #braindamage
SQLAlchemy 2.0 + Python Generic, или как создать универсальный репозиторий для работы с БД
Доброго времени суток, товарищи, эта статья, так скажем, продолжение предыдущей статьи об SQLAlchemy 2.0 для новичков , в этой статье мы узнаем что такое Python Generic и как его можно использовать в наших целях при взаимодействии с БД.
https://habr.com/ru/articles/853326/
#python #python3 #sqlalchemy_20 #sqlalchemy #generic #generics #типизация #пайтон #дженерики
"Small" things that I highly appreciate about Kotlin coming from Java - Chapter 1
Inline functions with reified type parameters:
𝚒𝚗𝚕𝚒𝚗𝚎 𝚏𝚞𝚗 <𝚛𝚎𝚒𝚏𝚒𝚎𝚍 𝚃> 𝚍𝚘𝚂𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐(𝚟𝚊𝚕𝚞𝚎: 𝚃)
https://kotlinlang.org/docs/inline-functions.html#reified-type-parameters
No more passing classes as parameters. No more super type tokens. It just works.
#Kotlin #Java #JVM #Generics #TypeErasure #Reification #SoftwareDevelopment
It's getting late and I should go to bed, but I wanted to play with #ctran.
I thought I'd see how much faster it is to convert my `array of TToken` to a `TList<TToken>`.
Turns out, twice as fast!
Basically, when you concat() an array, the entire array is copied every time. With a TList.Add(), it just adds a pointer to the end.
The DOS executable is slightly larger (438KB vs 446KB), but the it's worth it for better efficiency and code readability.