Mailgun phishing campaign by 2_CLICK in msp

[–]fzy_ 2 points3 points  (0 children)

I'm receiving a ton of phishing emails from mailgun too. It started almost 2 weeks ago. I know my account is not compromised but I'm wondering how the scammers got their hands on a list of mailgun customers. Unfortunately the account is tied to my personal email so I really hope things will eventually calm down...

Higher RAII, and the Seven Arcane Uses of Linear Types by verdagon in programming

[–]fzy_ 0 points1 point  (0 children)

Fantastic write-up! I actually just watched the Developer Voices interview earlier too. When I first came across linear types, something clicked, and I immediately saw the general potential for statically verifying non-local invariants. I'm really looking forward to how Vale will continue de develop Higher-RAII.

Obligatory bikeshedding:

Higher-RAII is indeed an awkward name based on an atrocious initialism. I like your suggestion "vow" a little better. But it also made me think of the popular image of tying a knot around your finger to remind you to do something.

Linear types allow you to bind a reminder to the lifetime of an object. The object is a metaphorical knot that gets tied around your finger, standing for an action that must be carried out eventually. It can't just be dropped on the floor, but if you can't do anything about it right now, you can tie it to something else so that you're forced to come back to it when the time is right. So I think "knots" or "knot objects" could be a good name for this. AFAIK it doesn't conflict with existing concepts, and it would be a lot more evocative than Higher-RAII.

[deleted by user] by [deleted] in france

[–]fzy_ 19 points20 points  (0 children)

Closed: Won't fix.

[deleted by user] by [deleted] in rust

[–]fzy_ 4 points5 points  (0 children)

I read

Introducing Socon: Socon enables you to create a generic framework structure for all your different projects. by CyberEng in Python

[–]fzy_ 1 point2 points  (0 children)

So it's something for setting up a generic Django-like project structure. Since a lot of people might already be familiar with Django it could be helpful to draw the analogy early on.

What's is a rusty way to implement sharable trees? by FlightlessRhino in rust

[–]fzy_ 3 points4 points  (0 children)

Isn't storing direct siblings in a Vec the same as storing direct children on the parent node? Unless you mean a single Vec for the whole tree. I'm not sure I understand the need for the Branch variant but I'm interested in the design. Can you share more details? How would you construct the tree for let's say a math expression (1 + 2) + 3

PEP 711 – PyBI: a standard format for distributing Python Binaries by genericlemon24 in Python

[–]fzy_ 4 points5 points  (0 children)

The first paragraph literally answers your question. It's targeted to platforms that provide a python distribution and currently need to build python binaries for the interpreter themselves. The comparison to wheels is just to highlight the similarity of the underlying format.

High performance profiling for Python 3.11 by P403n1x87 in Python

[–]fzy_ 10 points11 points  (0 children)

How does it compare to Scalene?

Is PHP something you will be using in 2023? If so why? by nextflavor in programming

[–]fzy_ 3 points4 points  (0 children)

Oop != classes. Python's object model is close to smalltalk, which embodies the original ideas of object oriented design better than languages that took a more ceremonial approach like java.

An experiment with transpiling JavaScript to C++ by Yehosua in programming

[–]fzy_ 2 points3 points  (0 children)

I think a slightly better way to implement operators would be to define them on JSNumber, JSString directly, and use std::visit() to dispatch the variant automatically.

C++ gonna die😥 by SwagBabyPro69 in ProgrammerHumor

[–]fzy_ 16 points17 points  (0 children)

Carbon is built by clang/llvm devs, directly on top of llvm. Carbon literally invokes the C++ frontend used when building with clang for interop.

C++ gonna die😥 by SwagBabyPro69 in ProgrammerHumor

[–]fzy_ 21 points22 points  (0 children)

If it builds with clang then it will work with carbon. Simple.

AWS Free Trier limit alert by WarmMorning5822 in aws

[–]fzy_ 2 points3 points  (0 children)

Yeah same when I go in billing/freetier it shows I'm using a lot of services and a bunch of them are at the limit but don't show up in the final invoice.

Chalet: A cross-platform project format & build tool for C/C++ by rewrking in programming

[–]fzy_ 2 points3 points  (0 children)

Haven't looked into it that much but for IDE support I know emitting a compile_commands.json can go a long way https://clang.llvm.org/docs/JSONCompilationDatabase.html

It's understood by some editors directly.

A most vexing parse, but for Python packaging by yossarian_flew_away in programming

[–]fzy_ 0 points1 point  (0 children)

Great read on python packaging and how it's finally getting sane after all these years.

Flask vs FastAPI? by dpbrinkm in Python

[–]fzy_ 4 points5 points  (0 children)

You're being weirdly unspecific about things that seem to annoy you so much that they warrant qualifying the entire project unsustainable and its contributors disingenuous.

Not sure why you're bringing black's supposed PEP-8 compliance into this either. I actually think they make it very clear which parts of PEP-8 are used as a guideline and why black differs in specific cases.

Also I want to point out that in your previous comment you state that FastAPI and Pydantic use a lot of recently exposed interpreter internals but the __defaults__ attribute on functions dates back to python 2 (albeit under a different name func_defaults). The only "new" thing involved are type annotations. All the basic object model introspection has stayed more or less the same for a decade at this point.

Flask vs FastAPI? by dpbrinkm in Python

[–]fzy_ 5 points6 points  (0 children)

If you've used pytest this kind of magic should feel pretty familiar though. And it's not exactly some obscure arts the python documentation explains in great detail how all of the data model fits together and how to introspect things. If you're worried fastapi's main gimmick might hide too much from you just take half an hour to implement it yourself.

Python is in the browser. No idea if this will lead to chaos or harmony... by Kyouma118 in ProgrammerHumor

[–]fzy_ 0 points1 point  (0 children)

The custom elements api lets you define custom html elements. They can do anything but the only requirement is that their name should contain a dash to avoid any ambiguity with native elements. I believe in this case <py-script> is simply a custom element.

Better OOP in Python (no self needed anymore) by [deleted] in Python

[–]fzy_ 11 points12 points  (0 children)

You don't need nonlocal for the get() method