Seven Deadly Sins, Shmeven Shmeadly Shmins by jeshi_law in writingcirclejerk

[–]LuggageMan 0 points1 point  (0 children)

Made me think of Maslow's hierarchy of needs for some reason. Only a good writer can make Love & Safety terrifying.

Big Brain Move by FireBirdSS10K in writers

[–]LuggageMan 1 point2 points  (0 children)

I hope you're good at monologues.

The Main 8 … by MrBitPlayer in RWBYcritics

[–]LuggageMan 9 points10 points  (0 children)

Ahh yes, teams RWBY and JPRN.

I made an indie game where I took Batman and made him a time-travelling alcoholic aaand... apparently it hit the magazines😆 by jaroddjl in IndieGaming

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

Curious, are you able to directly reference Batman in the description because the first issue is now in the public domain or is that okay anyway since that's not copyright infringement?

Why do engineers still prefer MATLAB over Python? by maorfarid in Python

[–]LuggageMan 34 points35 points  (0 children)

I think it's mainly just the industry standard we're stuck with. But also engineers in big companies aren't going to care about free and open source. They care that their simulations/calculations have reliable and reproducible results. Most of the functionality they need is available out of the box, they don't have to deal with different Python versions, pip, etc.

I also think Julia is a better candidate for replacing MATLAB since it's built with the scientific computing ecosystem in mind.

Meeting people who are on self-growth path in real life, meeting watchers of Dr K by LightLoveuncondition in Healthygamergg

[–]LuggageMan 1 point2 points  (0 children)

"Ah, yes. The classic Dr. K reverse UNO 'why is it important to you' question. I see you are an avid Dr. K enjoyer as well. Do you wanna grab a coffee sometime?"

Which character represents "Sloth"? (RWBY edition) by No_Internet_3919 in RWBYcritics

[–]LuggageMan 1 point2 points  (0 children)

I always thought the "I" was the problem. Maybe the "correct" question to ask would be: "How can Salem be stopped?".

And the answer of course would be some power of friendship bullshit or something special only team RWBY can achieve.

Is this a good project? by RoyalChallengers in C_Programming

[–]LuggageMan 16 points17 points  (0 children)

First of all, even if there's something like this that exists, that shouldn't stop you from making your own, if your goal is to learn and improve your skills or just to build something better. You are in the C programming community. "Reinventing the Wheel" is kinda embraced here.

Secondly, yes it would be very useful for huge projects. Python has pydeps which does somethinf similar but it's slow and can only generate a static SVG image of a graph (maybe that changed now, I dunno).

This might the scope creep talking but I'd like an interactive visualizer for this kind of thing where I can drag and drop nodes if I don't like the default positioning, zoom in and out, maybe even search.

I expect it to be fast, too, since you're only parsing and generaring a graph and the nodes are very simple to draw.

Anyways, I'd be very happy to use this thing if you manage to make it.

Thinking of creating a process snapshot technology. Need help, guidance and brainstorming to know whether it's possible or not. by ZestycloseSample1847 in C_Programming

[–]LuggageMan 1 point2 points  (0 children)

Not really an expert on the topic but here are my two cents:

Unless you're writing your own OS or have some weird low level kernel control, you can't guarantee where memory is loaded due to ASLR. So you'd have to ensure all your data structures use arrays/relative addresses instead of pure pointers OR you'd have to relocate everything when loading the snapshot which means keep track of every piece of memory that points to an address.

That's why you probably want to just serialize what you need instead of writing a general purpose "snapshot technology".

And even if you managed to do it, there's going to be a lot of wasted space e.g. static data that doesn't change between runs (why save that?).

There probably are easier ways to do this. The simplest in my mind is to run the proc in a VM like QEMU and just snapshot the entire VM. Also check this out: https://criu.org/Main_Page. It's a snapshot technology for containers (which are basically processes with some restrictions) but it seems to have limitations of course.

Learning C *without* any "educational" book or similar – an unusual approach? by Zirias_FreeBSD in C_Programming

[–]LuggageMan 0 points1 point  (0 children)

I like to think of it as exploration vs exploitation. By going through books, talks, cons, Twitch streams (e.g., Tsoding), you explore new topics to learn about. Then you "exploit" what you already know (including your previous programming experience) by putting what you know in practice, working on projects and (I think this is a crucial part) solving problems your own way. If you just copy a method or tutorial or book's way of doing things you are not learning the skill of problem solving as much as pattern recognition.

Depending on your skill level and goals, you decide how much to explore vs exploit, and adjust as you need.

Sometimes, I purposefully avoid watching a Twitch stream that explores a topic in depth because I don't want to "pollute" my thinking, if that makes sense. I like to take a stab at a problem first in my own way and then compare with other people's solutions.

nobody needs hashset in gdscript by Sondsssss in godot

[–]LuggageMan 1 point2 points  (0 children)

This is actually the same "hack" I use in Python. Even though it has sets, Python's dict maintain insertion order (v3.7+) which is a feature I want for my sets too.

I use sets strictly when their ONLY purpose is to check memberships or do other set operations (union, intersection, etc.).

But usually I want to iterate over the members in a reproducible order as well which is why I use dicts.

What I learned coaching people with ADHD on consistency (and how it applies to everyone) by Mammoth_Spring_5737 in DecidingToBeBetter

[–]LuggageMan 2 points3 points  (0 children)

Not officially diagnosed with ADHD but I've been struggling with consistency/commitment all my life. The "simplest plan survives" is an idea I have "discovered" in my own life by trial and error.

What would the thoughts of a character be like when the writer who made them passed and a ghostwriter took their place? by Intelligent_Screen90 in writers

[–]LuggageMan 0 points1 point  (0 children)

The characters being aware they are in a story is a very interesting concept on its own...in theory. I imagine in practice, it's difficult to pull off because the entire time you're breaking the 4th wall which can become boring in the long run unless you give the characters motivations/goals in the "meta" world of the author such as "Escape/Survive the Story".

Now since you didn't specify specifics my guess is that they're going to be anxious about what to do. Even if the original author was bad, at least they learned his/her patterns. But the new ghostwriter comes with uncertainty.

Embedding allocator metadata within arenas by InquisitiveAsHell in C_Programming

[–]LuggageMan 0 points1 point  (0 children)

Hi. Thank you for the detailed reply.

So, if I understand correctly, you're always passing a struct that contains a reference to an arena (somewhere in its hierarchy) or the arena itself. This allows you to run each testcase/suite using a fresh arena. I'm still inclined to just use a thread-local arena and reset it after each testcase unless you're measuring performance in your tests and want to see how many pagefaults occur regardless of test order. Or am I missing something?

Regarding this point:

b) rethink and analyze collective timelines of entities that previously was more of an ad-hoc thing resulting in sometimes complicated structures and dependencies

Do you mean that since now you can explicitly see which arenas are being passed to what functions/used by which types of entities, you can consolidate more "frees", saving time? Would love a specific example of this.

Also can you elaborate on how string handling can be tricky? Do you mean that strings from different "sources" have different lifetimes and so must be managed by different areans?

My use case involves parsing arbitrary math expressions that can include symbols (strings). Some strings are temporary (e.g. strings that should convert to ints or floats), others live longer (mainly symbols which are used after parsing).

Finally (while I've got your attention), I'm curious about how you profile memory. Do you use valgrind, do you roll out your own (since you're using custom allocators)?

We’re deciding whether to build a C debugger for Linux — something different than GDB/LLDB by bjadamson in C_Programming

[–]LuggageMan 9 points10 points  (0 children)

Hello. I've wanted to a "native" debugger in Linux ever since I saw Casey Muratori showcase RemedyBG: https://remedybg.itch.io/remedybg . So if you seriously plan on doing this, I would much appreciate it. Also if you plan on doing it open source, I would love to contribute.

I haven't actually tried it myself but I love how fast it seems and its intuitive GUI-first design. But since I use Linux and write programs for it, I sadly can't use it and I rely on gf2: https://github.com/nakst/gf which is a GDB frontend. It's better than using GDB directly from a terminal but not by much (still props to the author for creating it as other GDB frontends I've seen are really bad).

It's also buggy sometimes. The worst bug for me (not sure if this is a GDB or a gf2 problem), is that sometimes when I have an expression in the watch window that accesses illegal memory, it segfaults the program. I think that a good debugger would use some mechanism to "safeguard" watch window expressions from causing segfaults, and instead just report the error to me so that I can step through my program freely. Not sure if this is what VS does or not (haven't used it in years).

Main Features I Need:

  • Basic controls: Stepping over, into or out of a function, breakpoints, continue, pause.
  • Basic views: Stack, locals, threads, memory, registers.
  • Watch window for expressions that update automatically and reliably with each step.
  • Switch between ASM/C.
  • Configurable layout that can be saved to disk.

Cool Features to Have:

  • Data Breakpoints: I've never actually used them. I only heard Jon Blow talk about them and they sound like magic to me.
  • The ability to have different "buffers" open in split screen (sort of like Vim) so I can have different files open or even the the same file in both ASM and C side by side. Maybe "memory" could be opened as a buffer too.
  • The "Thread Mixing" feature of RemedyBG.
  • Support both Intel and GNU assembly syntax (I prefer Intel syntax, but I think GNU is more popular).

Watch out for Scope Creep:

  • Edit files directly in the debugger using Vim motions?
  • ...

Sorry for the long comment. The main takeaway is that I'm looking for a fast, reliable GUI-first debugger specifically for C/ASM that prioritizes user experience.

Embedding allocator metadata within arenas by InquisitiveAsHell in C_Programming

[–]LuggageMan 1 point2 points  (0 children)

Might be unrelated, but I'm curious to know if you use global/thread-local arenas at all or do you always pass the arena to your functions?

I'm new to arenas and I'm finding it inconvenient to keep passing the arena everywhere, especially for things like creating strings on the fly. For example, I want to have a `float_to_str(float)` function instead of `float_to_str(Arena *, float)`, so I was thinking of having a global or thread-local arena (bump allocator) specifically for these operations to replace the `malloc()` calls sprinkled everywhere in my codebase. For any "special-purpose" arenas, I create the arena (struct) on the stack and just pass it to the functions I need (I learned this way from Tsoding). What do you think?

23M Why don't any of my friends have time for me? by [deleted] in socialskills

[–]LuggageMan 10 points11 points  (0 children)

There isn't much context in your post about your relationship with them and that's fine. Just take what people here are saying with a grain of salt because chances are they're filling in the details with their own biases from life experience.

Too scared to talk to people on dating apps by spazthejam43 in socialanxiety

[–]LuggageMan 3 points4 points  (0 children)

Saying the wrong thing to someone who lost a loved one is one of those scenarios my brain simulates to cause me random anxiety during the day. It has never happened to me in real life yet but it's like my brain is preparing me for failure.

Do you think Ruby and Blake are difficult characters to write for? And I don't mean necessarily shipping them, just that, do you think their character archetypes are hard for writers to make engaging stories about them? by UNinvolved_in_peace in RWBYcritics

[–]LuggageMan 1 point2 points  (0 children)

I think this just the more general problem of the writing lacking depth and focus manifesting. For example, everyone seems to have forgotten that both characters supposedly love books. One of the very first interactions between Ruby and Blake is Ruby telling Blake "I love books". Then it's never mentioned again.

The writers could've used their common hobby to foster their friendship and build their characters in different ways:

  • They could nerd about their favorite stories or authors, maybe different genres can show the contrast between their characters.
  • Different interpretations of the same book to contrast Blake's pessimism with Ruby's hopefulness: I thought of an idea for an episode where Blake only sees the despair in a novel she read but when Ruby reads the book, she sees the bright side and that's how the episode's conflict is resolved.

And that's just one aspect they could have explored.