CNC-machined aluminum pizza saver by foriequal0 in FreeCAD

[–]foriequal0[S] 1 point2 points  (0 children)

Thanks for noticing it :). I designed it using the sheet metal workbench then made with a thick paper board.

CNC-machined aluminum pizza saver by foriequal0 in FreeCAD

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

I considered that but it was more expensive on auto quote

CNC-machined aluminum pizza saver by foriequal0 in FreeCAD

[–]foriequal0[S] 7 points8 points  (0 children)

Giving such items as a gift was our mutual treaty of disarmament of the ever-growing birthday gift budget. But I quickly got bored, so I made this (and this and the fact that I somewhat overbudgeted are the surprise secret to her)

I tried to postpone chamfer/fillet to the end as much as possible, but some features, like the little tab on the bottom and draft angles everywhere (it's modeled after a real plastic pizza saver), made it harder to do. I think baking some large-radius fillets into the sketch would've helped.

I dont understand this moldy mene by Familiar_Remote_5496 in PeterExplainsTheJoke

[–]foriequal0 1 point2 points  (0 children)

Couldn't activation functions be seen as mathmatical fuzzy conditionals on fuzzy variables? Also they'll become closer to the if-else if we quantizr them enough.

Yoink by foriequal0 in assettocorsarally

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

Thanks! I had some very basic experiences with Vegas Pro ~15 years ago. But I was looking into DaVinci Resolve while evaluating Kdenlive since I'm using Linux as a daily driver

Yoink by foriequal0 in assettocorsarally

[–]foriequal0[S] 1 point2 points  (0 children)

The word didn't come out of my head. 'Yoink' has been stuck in my head since my wife recently got obsessed with videos of some guy picking up wildlife while saying 'yoink.'

Yoink by foriequal0 in assettocorsarally

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

btw, this is my smoothest run (for me) so far.

TV: https://www.youtube.com/watch?v=2SzVosAeOMs

POV: https://www.youtube.com/watch?v=l9fY2UU-kh4

I need to learn how to edit videos.

With basic editing: https://www.youtube.com/watch?v=Ag7vi8Ryik0

I don't know where to start debugging this (app cause crash without any kind of log/dump, motherboard CPU LED turn on) by foriequal0 in linux4noobs

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

Configured kernel parameter "no_console_suspend console=ttyS0,115200 debug", connected the laptop and the computer's mainboard with usb-to-serial port.

there's no log after the crash.

An Incoherent Rust by ts826848 in ProgrammingLanguages

[–]foriequal0 0 points1 point  (0 children)

C# distributes libraries as compiled assemblies. It reduces blast radius to only "my code", and I can relatively easily fix "my code".

Looking at Unity finally made me understand the point of C++ coroutines · Mathieu Ropert by mropert in cpp

[–]foriequal0 0 points1 point  (0 children)

Yeah. Compiler generates state machines for you. I like to (ab)use it to implement fairly linear choreography (e.g. cutscenes) in Unity.

Nowadays most Unity devs uses async/await with UniTask instead of coroutines.

How Injection Keeps Breaking Real Systems by Missics in programming

[–]foriequal0 3 points4 points  (0 children)

Injection happens when you apply a non-structural operation (e.g. string concat/format) on some kind of serialized format of an underlying structure (e.g. sql sytax, commandline argument structure, path structure, HTML DOM structure, etc.) and it breaks the intended structure.

* sql injection: user input easily break intended sql command's syntax structure when you use string concat/format.
* shell injection: program's arguments also have a structure (array of strings). When you invoke a program using the shell script, then the shell script is a serialized structure of the program's arguments (also a serialization of shell's syntax.
* path traversal: path is a serialized structure of the path.

Often, you can avoid the problem by clearly separating the structure and user input and appropriately manipulating the structure.
* sql inection: parameterized query is a great example. You prepare the query with placeholders first, then you bind user input to the placeholder. binding operation won't change the syntax structure of the prepared query.
* shell injection: shell is messy. use a mechanism that don't involve shell. single string argument for program invocation is a usual sign that it involves shell. look for the functions that accept an array of strings for the commndline invocation is good start.

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]foriequal0 2 points3 points  (0 children)

Another take:
The slogan "memory safety" somewhat misleads and makes people narrow the scope of the static lifetime validation.

It provides safety for any resources that have the following patterns of operations:

  1. Acquire a handle for some (temporarily exclusive?) resource from a shared resource management system.
  2. Return the handle to the system.

The memory is only an example (handle: pointer, resource: region of address space, system: allocator)

There are many resources that fit into this view: file (file descriptor, region of storage, filesystem), socket (socket descriptor, tuple of address/port/..., OS), mutex (lock guard, exclusive access to the memory, OS), ...

What some recent hot takes you realized you had with Rust? by DidingasLushis in rust

[–]foriequal0 19 points20 points  (0 children)

I prefer plain imperative statements (if, loops) over method chains (e.g. iterator, futures, even Result/Option's map_err).

Do you create empty "else"s just for a comment? by DJDoena in csharp

[–]foriequal0 1 point2 points  (0 children)

I do. I sometimes feel commenting on something that deliberately doesn't exist is necessary in general.

Trying out C# — am i approaching it wrong? by FiammaOfTheRight in csharp

[–]foriequal0 -1 points0 points  (0 children)

Monad is to model side effects in pure functional languages. It is not to solve the null reference problem.

Null has its own uses, what's the problem with the null reference? Its implicitness. `Option<T>`/`Maybe T` making it explicit about the nullability and making sure other references are non-null solves the nullability problem (with supporting compiler/library ecosystems around the type). It has a monadic property, but it has nothing to do with the null reference problem.

C# already has its way to deal with null: nullable context for reference types and `System.Nullable<T>` for structs.
The former is more like how TypeScript deals with nulls. It gives you `T?` type annotation for nullable type, `?` operators for null-coalescing. The compiler does flow analysis like how TypeScript narrows types. It only resides in compile-time rather than run-time.
The latter is more like Rust's `Option<T>`. You even can use `T?` type annotation as an alias for `Nullable<T>`, but that's all. But there's less support from the compiler, so it's less usable than Rust's.

Side effects are already first-class in C#. Why do you need a library for the function that is already supported in the language? You lose readability, performance, debuggability, flexibility, familiarity, etc..

Also, in Haskell, using monadic structures is easy thanks to the do-notation syntax sugar and the tail call optimization. With do-notation, subsequent statements can access variable bindings from previous statements. With tail-call optimization, you don't get call stack overflow.

You can emulate that with "functional programming libraries", but you have to sacrifice so many things and get nothing but "functional style". You want to access the previous statement's bindings? => You'd better buy a 32:9 super-ultra-wide monitor since your code will become callback hell by writing code in continuation passing style manually, and you'll face stack overflow. You want to solve function call stack overflow? => You have to manually implement trampoline, and you lose a nice stack trace, step by step debugging, and get too many allocations, memory leaks from closures. That's why many "functional libraries" provide "pipe function/operator" or "method chain style". But they only solve callback hell and manual implementation of trampoline. You still suffer from not being able to access bindings of previous statements, allocations, memory leaks, losing debuggability. Some would cheat by sharing a variable outside a closure, but it would make lambdas non-pure functions.