There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

mvirts , in This one goes out to the sysadmins in the crowd.

I loath memory reservation based scheduling. it’s always a lie, always. Looking at you, Hadoop.

huginn , in This one goes out to the sysadmins in the crowd.

Meanwhile I’m given a 16gb of ram laptop to compile Gradle projects on.

My swap file is regularly 10+ gigs. Pain.

lemmyvore ,

That reminded me about trying to compile a rust application (Pika Backup) on a laptop with 4 GB of RAM (because AUR).

That was a fun couple of attempts. Eventually I just gave up and installed a flatpak.

huginn ,

God bless flatpack in times of need

nieceandtows , in This one goes out to the sysadmins in the crowd.

Flip side of the coin, I had a sysadmin who wouldn’t increase the tmp size from 1gb because ‘I don’t need more than that recommended size’. I deploy tons of etl jobs, and they download gbs of files for processing to this globally known temp storage. I got it changed for one server successfully after much back and forth, but the other one I just overrode it in my config files for every script.

stevecrox ,
@stevecrox@kbin.social avatar

This is why Java rocks with ETL, the language is built to access files via input/output streams.

It means you don't need to download a local copy of a file, you can drop it into a data lake (S3, HDFS, etc..) and pass around a URI reference.

Considering the size of Large Language Models I really am surprised at how poor streaming is handled within Python.

nieceandtows ,

Yeah python does lack in such things. Half a decade ago, I setup an ml model for tableau using python, and things were fine until one day it just wouldn’t finish anymore. Turns out the model got bigger and python filled out the ram and the swap trying to load the whole model in memory.

stevecrox ,
@stevecrox@kbin.social avatar

During the pandemic I had some unoccupied python graduates I wanted to teach data engineering to.

Initially I had them implement REST wrappers around Apache OpenNLP and SpaCy and then compare the results of random data sets (project Gutenberg, sharepoint, etc..).

I ended up stealing a grad data scientist because we couldn't find a difference (while there was a difference in confidence, the actual matches were identical).

SpaCy required 1vCPU and 12GiB of RAM to produce the same result as OpenNLP that was running on 0.5 vCPU and 4.5 GiB of RAM.

2 grads were assigned a Spring Boot/Camel/OpenNLP stack and 2 a Spacy/Flask application. It took both groups 4 weeks to get a working result.

The team slowly acquired lockdown staff so I introduced Minio/RabbitMQ/Nifi/Hadoop/Express/React and then different file types (not raw UTF-8, but what about doc, pdf, etc..) for NLP pipelines. They built a fairly complex NLP processing system with a data exploration UI.

I figured I had a group to help me figure out Python best approach in the space, but Python limitations just lead to stuff like needing a Kubernetes volume to host data.

Conversely none of the data scientists we acquired were willing to code in anything but Python.

I tried arguing in my company of the time there was a huge unsolved bit of market there (e.g. MLOP's)

Alas unless you can show profit on the first customer no business would invest. Which is why I am trying to start a business.

abbadon420 , in This one goes out to the sysadmins in the crowd.

64! is a whole lot more than 64 though. It’s a number with 90 digits.

Dfy ,

Hmm is unexpected factorial a sub here yet?

xigoi ,
@xigoi@lemmy.sdf.org avatar

They’re called “communities”, not “subs”.

JTheDoc , (edited )

deleted_by_author

  • Loading...
  • xigoi ,
    @xigoi@lemmy.sdf.org avatar

    Most communities are not on lemmy.world (the one we’re on is on programming.dev), and even those that are there are not on their own subdomains:

    Hexarei ,
    @Hexarei@programming.dev avatar

    Corrections:

    1. They are not subdomains, they are just paths.

      A subdomain would be like programmer_humor.lemmy.world.

    2. Communities exist on many instances, not just Lemmy.world

    vox ,
    @vox@sopuli.xyz avatar

    subfeddit

    nx2 ,

    Yeah it feels like “sub” has become something like “to google something”

    abbadon420 ,

    Yeah, but it feels dirty.

    ReversalHatchery ,

    We need to come up with a shorthand for that

    ericbomb , in This one goes out to the sysadmins in the crowd.

    narrows eyes

    Look I don’t “think” that was me this last few weeks. I’m pretty sure my support engineer butt was smart enough to check resources before blaming RAM…

    But it totally could have been me, and in that case I blame dev.

    MooseBoys , in This one goes out to the sysadmins in the crowd.

    What kind of apps are we talking about here?

    WhiskyTangoFoxtrot ,

    Major ones.

    1984 , in This one goes out to the sysadmins in the crowd.
    @1984@lemmy.today avatar

    This happens all the time. Companies are bleeding money into the air every second to aws, but they have enough money to not care much.

    AWS really was brilliant in how they built a cloud and how they marketed everything as “pay only for what you use”.

    MonkderZweite ,

    That this is deemed brilliant is the sad part.

    1984 ,
    @1984@lemmy.today avatar

    I mean, I would put brilliant in quotes in the way that it’s brilliant for their profits. Not brilliant in the way of making the world a better place.

    Oderus ,

    Companies hate OpEx and love CapEx. That’s the main driver as companies loathe hardware life cycle costs and prefer a pay as you go model. It is more expensive but it’s more budget friendly as you avoid sticker shock every 3-4 years.

    coloredgrayscale ,

    There’s more than just hardware and power cost to servers.

    Primarily cost of employees taking care of the servers.

    MonkderZweite ,

    Replacing hardware only every 6 to 8 years, makes it better.

    Aceticon ,

    Lawful Evil is still evil.

    brennesel ,
    @brennesel@feddit.de avatar

    Do you mean that it’s still the case that more resources are allocated than actually used or that the code does not need to be optimized anymore due to elastic compute?

    1984 ,
    @1984@lemmy.today avatar

    I think both are consequences of the cloud.

    It’s cheaper for companies to just add more compute than to pay devs to optimize the code.

    And it’s also not so important to overpay for server capacity they don’t use.

    Both of these things leads to AWS making more money.

    It’s also really good for aws that once these things are built, they just keep bringing in money on their own 24 hours per day.

    brennesel ,
    @brennesel@feddit.de avatar

    If I remember correctly, that was the original idea of AWS, to offer their free capacity to paying customers.

    Do you think that AWS in particular has this problem or Azure and GCP as well? I have mainly worked with DWHs in Snowflake, where you can adjust the compute capacity within seconds. So you pay almost exactly for the capacity you really need.
    Not having to optimize queries is a good selling point for cloud-based databases, too.

    It is certainly still cheaper than self-hosted on-premises infrastructure.

    sunbeam60 ,

    We worked with a business unit to predict how many people they would migrate on to their new system week 1-2 … they controlled the migration through some complicated salesforce code they had written.

    We were told “half a million first week”. We reserved capacity to be ready to handle the onslaught.

    8000 appeared week 1.

    MrGerrit , in This one goes out to the sysadmins in the crowd.
    PipedLinkBot ,

    Here is an alternative Piped link(s): piped.video/pFlcqWQVVuU?si=E7XxLW64539jGqL3

    Piped is a privacy-respecting open-source alternative frontend to YouTube.

    I’m open-source, check me out at GitHub.

    RandomVideos , in This one goes out to the sysadmins in the crowd.

    Why did it change from 64 gb of ram to 1.268869321 E+89(64!) gb of ram

    Also, 2.092278988 E+13(16!) gb is a lot more than 64 gb

    AeonFelis ,

    Said app is Chrome

    stoicmaverick ,

    Came here to say this. Nerd…

    Hupf ,

    What you said makes 0! sense

    RandomVideos ,

    What does 1(0!) sense mean?

    TehPers ,

    It means it made 100% sense.

    yum13241 , in This one goes out to the sysadmins in the crowd.

    The second guy is the exact same type of person as my Dad.

    marcos , in This one goes out to the sysadmins in the crowd.

    Yeah, almost certainly the software only uses 4GB because it limits itself to what memory it has available.

    I have seen this conversation pan out a few times already. It has always been because of that, and once expanded things work much better. (Personally I have never took party at one, I guess that’s luck.)

    yum13241 ,

    Does the OS really eat up 7GB RAM?

    marcos ,

    Oh, ok, I overlooked it has space to grow. This is one conversation I’ve never seen.

    ptz OP ,
    @ptz@dubvee.org avatar

    I phrased that panel poorly. App in question always had 16 GB and still never used above 4.

    lorez , in This one goes out to the sysadmins in the crowd.

    For some reason I love this meme.

    kamen , in What could possibly go wrong

    Left pad is a good example of why you shouldn’t.

    Caboose12000 ,

    can you elaborate

    v1605 ,
    johannes ,

    That was a rather nice read :) thank you!

    milkjug ,
    @milkjug@lemmy.world avatar

    Thank you for sharing this. I learn something new everyday, much appreciated.

    Feirdro ,

    This was excellent, but conveniently left off any discussion that npm can “un-un-publish” a programmer’s code against their wishes, and apparently without repercussions?

    Fuck npm, I guess.

    mexicancartel ,

    Absolutely they can un-unpublish since the programmer has given everyone the rights to use his code wherever they want, with its open license. Npm can actually use the older version of the code and give it to everyone. Its actually a good thing

    Feirdro ,

    Right, the “open” part of open source.

    DarkenLM ,

    Thank fuck for that, cause if they didn't faker.js and node-ipc would have caused a lot of trouble, with the developers adding malware to a new version and later deleting the entire packages, breaking tons of projects. And those were everything but small packages.

    Anonymousllama ,

    All for the greater good, especially if it’s the choice between one guy’s desire to nuke their own code VS tens / hundreds of thousands of projects that depend on it.

    magic_lobster_party ,

    Event stream as well. TL;DR: popular npm library get infested with Bitcoin stealing code.

    https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident

    phorq , in Zero to Hero in 1 hour

    I count 13 steps, so it just means you’re gonna trip up on 3 of them…

    db2 ,

    15 steps. You’re not counting the top, and the bottom is step 0 and we all know counting starts there.

    jerome ,
    @jerome@kbin.social avatar

    Both of you are nerds.

    GuybrushThreepwo0d ,

    We are on a programming sub of a federated and open source reddit clone. We are all nerds.

    ripcord ,
    @ripcord@kbin.social avatar

    I assume it was meant as a compliment.

    jerome ,
    @jerome@kbin.social avatar

    (i said it with love)

    UnRelatedBurner ,

    sometimes i start my iterator with = -1. As I only +=1 it with a condition and I know that it will return true on the first cycle. I’ll chuck array[iterator] and need it to be 0 to start with ofc.

    I just have no idea how to not do this, but it looks so bad, i need a i8 instead of a u8 at least because of this

    Kache ,

    What? My intuition is there’s always gotta be some equivalent nicer refactor that could do away with such an awkward construct.

    In what kind of situation would that be totally unavoidable?

    UnRelatedBurner ,

    I could tell you my recent cenario, but it wouldn’t get us anywhere. because I know that it’s avoidable, but it’d take for me to run a different logic for only first element of my array. which is doable, but it’d make the code like 5 extra lines longer, harder to read/follow. But I just simply choose to put -1 and boom it’s fixed, just works.

    another solution would be (without context) is to add one more variable and one more check to my foreach, but that takes more memory and cpu, I usually choose the i = -1, it’s ugly but not as ugly as other solutions would be

    KIM_JONG ,

    I hope I never have to see this code.

    UnRelatedBurner ,

    sending it asap (when I get home)

    UnRelatedBurner ,

    lucky, I forgot it

    darcy ,
    @darcy@sh.itjust.works avatar

    thats great unless you want i to be an unsigned integer

    edit: oops u already mentioned that

    pec ,

    That’s accurate. There’s always a few steps not included in the tutorial

    beckerist , in The lengths we have to go to

    spaces or tabs

    GandarfDeGrape ,

    Tabs. But really with modern IDE it’s irrelevant. Whatever the tech lead says I guess.

    GBU_28 ,

    With things like black, flake 8 and Isort I can code however I want, list/format however I want, and commit team compliant content. The dream is real

    theneverfox ,
    @theneverfox@pawb.social avatar

    Wait wait wait, what is this black magic and how have I not heard of it?

    GBU_28 ,

    So you can have a local, and a team config. So at time of commit the code rules your team has selected are enforced. So if I looked at my code, on GitHub, it would look as expected by the team.

    If I load it locally, it formats as I like.

    Check out the cicd stuff on PRs for github

    CoderKat ,

    I love such formatters and wish they were even more widespread. In many cases, I really want consistency above all and it’s so dang hard to achieve that without an opinionated formatter. If the formatters isn’t opinionated enough, it just leads to countless human enforced rules that waste time (and lead to an understandable chorus of “why can’t the formatter just do that for meeeee”).

    RogueBanana ,

    Yeah but outside of that where the code is implemented or in a documentation, tabs are still easier to look through. And it does look pretty as long as there aren’t too many nested functions.

    mexicancartel ,

    Even with nested functions tabs are neat.

    Does you app have too many nested functions?

    Use tab width = 2

    Do your app have too less nested functions?

    Use tab width = 8

    Is your app having average number of nested fns?

    Use tab width = 4(mostly default)

    And all theese can happen without modifying a single byte in the source file, unlike spaces!

    reflex ,
    @reflex@kbin.social avatar

    Doesn't PEP 8 say spaces somewheres?

    UlrikHD ,
    @UlrikHD@programming.dev avatar

    4 spaces, although I’ll die on the hill that tabs should always be used instead of space for indentation. Not just in python.

    Ocelot ,

    Questions like that are likely to start a war

    TheBananaKing ,

    semicolons

    Agent641 ,

    Full colons

    Jakylla ,
    @Jakylla@sh.itjust.works avatar

    4 Spaces, then one tab, then 3 spaces, then 2 tabs, then 2 spaces, then 3 tabs…

    Python supports that (and I hate this)

    realaether ,

    Please elaborate (eg which standard is this defined in?)

    Jakylla , (edited )
    @Jakylla@sh.itjust.works avatar

    Not any standard (and actually not at all something to do for real), but try it, it works

    
    <span style="color:#323232;">def magic(a, b, c):
    </span><span style="color:#323232;">    if a > 0:
    </span><span style="color:#323232;">    	if b > 0:
    </span><span style="color:#323232;">    	   		if c > 0:
    </span><span style="color:#323232;">    	   		  return 'All positive'
    </span><span style="color:#323232;">    
    </span><span style="color:#323232;">    return 'Not all positive'
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">print(magic(1,2,3))
    </span><span style="color:#323232;">print(magic(-1,1,2))
    </span><span style="color:#323232;">print(magic(1,-1,0))
    </span><span style="color:#323232;">print(magic(-1,-1,-2))
    </span>
    

    (you should be able to verify I used both tab and spaces f*cking bad way in this example, like I described)

    Output:

    
    <span style="color:#323232;">All positive
    </span><span style="color:#323232;">Not all positive
    </span><span style="color:#323232;">Not all positive
    </span><span style="color:#323232;">Not all positive
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">
    </span><span style="color:#323232;">** Process exited - Return Code: 0 **
    </span><span style="color:#323232;">Press Enter to exit terminal
    </span>
    
    realaether ,

    That’s really interesting. So does that mean the interpreter just checks whether the current line is more indented, less indented, or equal vs. the preceding, without caring by how much?

    grozzle ,

    “indentation is indentation!” (mr_incredible_cereal.jpg)

    it may look messy, but would you actually rather Python didn’t support some inconsistency when the intent is clear?

    being exact just for the sake of being pedantic isn’t useful.

    kevincox ,
    @kevincox@lemmy.ml avatar
    1. Use tabs.
    2. Enable visible whitespace.

    Tada, your indentation level is nicely visible.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines