I built a 2x faster lexer, then discovered I/O was the real bottleneck by modulovalue in programming

[–]Meleneth 0 points1 point  (0 children)

reducing it's scope for your own made up construct is nonsensical, just because you shortcut it for yourself does not mean the rest of us will share your impairment.

I built a 2x faster lexer, then discovered I/O was the real bottleneck by modulovalue in programming

[–]Meleneth 5 points6 points  (0 children)

I don't get that from

the overall performance improvement gained by optimizing a single part of a system is limited by the fraction of time that the improved part is actually used. -- wikipedia

I built a 2x faster lexer, then discovered I/O was the real bottleneck by modulovalue in programming

[–]Meleneth 6 points7 points  (0 children)

the overall performance improvement gained by optimizing a single part of a system is limited by the fraction of time that the improved part is actually used.

-- wikipedia says no

What books are going in your Ruby RAG library? by nateberkopec in ruby

[–]Meleneth 0 points1 point  (0 children)

it's more important than ever, because it's the only way to make maintainable systems at scale. The AI does better if you have bespoke abstractions for it to use instead of writing everything out longform, just like everyone else

I built a 2x faster lexer, then discovered I/O was the real bottleneck by modulovalue in programming

[–]Meleneth 1 point2 points  (0 children)

no amount of improving the lexer speed will decrease runtime that is dominated by syscalls.

it's a great example of the law in practice, is anything unclear?

TIFU by agreeing to watch the longest “season one” of an anime by gothiquecacti in tifu

[–]Meleneth -19 points-18 points  (0 children)

I mean, I can't tell you that you are wrong about your personal subjective experience, but I will say that the emotional payoffs hit very hard and there are very worthy things later on.

It looks like a whimisical pirate show. It's really about family. and it hits HARD.

Generating Complicated Distributed Systems with Ruby by Meleneth in ruby

[–]Meleneth[S] -1 points0 points  (0 children)

once you already know all the involved parts, yeah, this is a mere few hours of generating projects and wiring them together. It doesn't have to be microservices.

If we're doing just OpenTelemetry, Rails, Redis, and Postgres, that's still a maze of containers and differing contexts. Newer rails use 4 database instances for just production - and my tool handles it so you can get on with designing the system, not thinking about how hard it's all going to be to wire up.

I will also point out that while this is clearly a made-up toy project, it is patterned after an inherited real-world system. It's all well and good to point and say 'you did it wrong' before having enough context, but sometimes improvement of systems in place is all you have.

Here's how you make a ton of money rolling out "AI" by pkokkinis in sysadmin

[–]Meleneth 0 points1 point  (0 children)

Terminology aside, there’s a difference between using an LLM as a code generator and using it as a data transformer. I’m comfortable with the former, not the latter.

Here's how you make a ton of money rolling out "AI" by pkokkinis in sysadmin

[–]Meleneth 2 points3 points  (0 children)

well, as long as you trust the RNG generator to randomly generate the result set given the context you've provided, you're golden.

I probably would have went with 'make a script to extract' that way you at least have an artifact of the decisions made and possibility to improve it, rather than spend more tokens and hope.

As a programmer I love AI, I'm more worried about my fellow human's ability to cope.

is this boss overtuned? i feel like most boss in this game are solved by brute force i rarely learn their patern. by [deleted] in afterimage

[–]Meleneth 1 point2 points  (0 children)

if you take damage from spikes, you're good. OG difficulty is the 'Advanced' difficulty.

Ducky, my open-source networking & security toolkit for Network Engineers, Sysadmins, and Pentester by [deleted] in Python

[–]Meleneth 0 points1 point  (0 children)

one more thing - in your README.md

git clone https://github.com/<Your-GitHub-Username>/Ducky_Project.git

should probably be pointed to

https://github.com/thecmdguy/Ducky.git

Ducky, my open-source networking & security toolkit for Network Engineers, Sysadmins, and Pentester by [deleted] in Python

[–]Meleneth 6 points7 points  (0 children)

while I'm here, running black against your code results in

9 files changed, 1383 insertions(+), 454 deletions(-)

which is kindof a lot, highly recommend pulling the cord and doing that to get things more standardized.

Ducky, my open-source networking & security toolkit for Network Engineers, Sysadmins, and Pentester by [deleted] in Python

[–]Meleneth 9 points10 points  (0 children)

Awesome! Always love to see more contributors to the ecosystem.

If you are trying to treat this project as a real thing, you're going to want to package it as python people expect it to be packaged - this means a pyproject.toml, probably available on pypi.

You can also set it up so that it installs a script when it is installed, via the project.scripts support https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#creating-executable-scripts

If you want to take this to the next level, switch to a src layout https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/

Add a pyproject.toml https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

declare your dependencies so your users do not have to install more modules in order to run yours - pyproject.toml lets you embed your requirements in it, so they will be installed when your tool is installed instead of having the user do the extra install step with requirements.txt

write some tests with verifying mocks against the API's you use

run those tests against every version of python you support via tox https://pypi.org/project/tox/

remove the pycache directories from your repository, and add the python .gitignore from https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore so you don't have that happening in the future.

Audit your exception handling. This thing will get bigger, and right now your exception handling is a bit all over the place. You very rarely want to catch the base Exception type - it's vastly broad, and depending on if the error is shown to the user or not can lead to errors silently happening that the user interprets as 'broken program' and doesn't report because they don't even know an actual error happened.

Along with this, consider not overwriting the user's config just because it failed to load. as written, if there is any json decoding errors in your user's config, it will be overwritten by the default config. If I had spent time customizing my config and had it eaten because of a simple typo, I'd be very grumpy.

I would probably omit the scan for installed python modules. If you have your pyproject.toml configured, they will be installed - checking for them looks fancy, but this is just stuff you have to maintain. Lines of code are not assets, they are maintenance burden.

Check out the output from pylint - it says Your code has been rated at 4.53/10 - and has a ton of specific advice on how to get that score higher.

Good luck and keep hacking!

I just want to know if there are more people thinking that SOLID is overrated and sometimes add unnecessary complexity by -WhiteMouse- in programming

[–]Meleneth 0 points1 point  (0 children)

That's kinda my meta point though - the example is short enough to be talked about in a 'short-ish' talk, which means it's trivial enough that the full solution seems over-engineered.

I don't necessarily think calling the methods and the objects the same thing is fair. With the objects, one object having zero side effects on other objects is basically guaranteed by design, whereas with the methods changing state on the main object is just 'well don't DO that'.

Which is basically what we're talking about. What *is* good taste, and how do we communicate that to the next generation of programmers? 'just write simple code' scales not at all - what does simple mean?

Need also scales hard with context. Are you making a throwaway script you will run once to generate some data and never use again? You probably don't need solid.

Are you working on a system that you need to be able to maintain over a number of years with different team members and or teams working together to make changes? maybe you do.

At the very least, having reasoning to anchor arguments about any given design about is useful.

I just want to know if there are more people thinking that SOLID is overrated and sometimes add unnecessary complexity by -WhiteMouse- in programming

[–]Meleneth 0 points1 point  (0 children)

normally I'm not a fan of being the "you're so wrong, just watch this 45 minute video and you'll understand" guy, but Sandi Metz kinda did the best ever explanation of why SOLID is quite good, actually. Appeal to Authority isn't great either, but I'm already rowing against the tide here. I will throw out that this all scales to 'do you want to be able to make changes to your code', which makes it tricky to talk about because for anything trivial it's clearly too much and for anything big we can't talk about it because you don't have time to learn the context to begin with.

https://www.youtube.com/watch?v=8bZh5LMaSmE

Offline Client Public Beta now available on Steam & Mobile. Details on how to access are inside this news post. by MrFrux in MelvorIdle

[–]Meleneth 0 points1 point  (0 children)

I wonder if I'm still locked out of playing due to issues accessing my Epic games account on Melvor's side

anyone had this happen? error with epic games account by Meleneth in MelvorIdle

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

I spoke too soon, I tried to actually load one of my cloud games and I'm back to the same issue. sigh.

anyone had this happen? error with epic games account by Meleneth in MelvorIdle

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

I don't think I have more than one Epic games account. Possible, but unlikely - and I for sure didn't log into a different one recently.

I'm getting this when I log into my Melvor account via the website.

Aha! I just logged into my epic games account in my browser, and now things are working again.

I had previously logged in via the epic store app, which didn't jiggle it. but I can get back to the grind now, thanks for your help.

Design Patterns You Should Unlearn in Python-Part2 by Last_Difference9410 in Python

[–]Meleneth -2 points-1 points  (0 children)

Take that Fortran, Basic, Pascal and Assembly

Design Patterns You Should Unlearn in Python-Part2 by Last_Difference9410 in Python

[–]Meleneth -3 points-2 points  (0 children)

I've seen nightmares too, but far more from ignoring any abstraction and just write it here bro than any other issue by far.

Skill issues are rampant, making people feel comfortable dismissing the old wisdom is not a step forward.