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.

AProfessional , in single binary executable and dlls

Shared libraries are not a theoretical good, they have been the backbone of computers for decades and many vendors have successfully maintained ABIs for decades.

Modern languages do the statically compiled solution and it has its own downsides. Makes language bindings hard, no stable ABI means no binary platforms exist (other than awkward C wrappers), rebuilds are slow and OS wide results in a lot of churn, reasoning about security fixes is very hard.

Ullallulloo , (edited ) in “Hire me”
@Ullallulloo@civilloquy.com avatar

<span style="font-weight:bold;color:#a71d5d;">import </span><span style="color:#323232;">React </span><span style="font-weight:bold;color:#a71d5d;">from </span><span style="color:#183691;">'react'</span><span style="color:#323232;">;
</span><span style="font-weight:bold;color:#a71d5d;">import </span><span style="color:#323232;">ReactDOM </span><span style="font-weight:bold;color:#a71d5d;">from </span><span style="color:#183691;">'react-dom'</span><span style="color:#323232;">;
</span><span style="color:#323232;">
</span><span style="color:#323232;">ReactDOM.render(
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;"><</span><span style="color:#323232;">div</span><span style="font-weight:bold;color:#a71d5d;">>
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;"><</span><span style="color:#323232;">h1</span><span style="font-weight:bold;color:#a71d5d;">></span><span style="color:#323232;">My Site</span><span style="font-weight:bold;color:#a71d5d;"><</span><span style="color:#183691;">/h1>
</span><span style="color:#183691;">		<p>Welcome to my cool site</span><span style="color:#0086b3;">.</span><span style="color:#183691;"> 😎</</span><span style="color:#323232;">p</span><span style="font-weight:bold;color:#a71d5d;">>
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;"><</span><span style="color:#183691;">/div>,
</span><span style="color:#183691;">	document</span><span style="color:#0086b3;">.</span><span style="color:#183691;">getElementById('root')
</span><span style="color:#183691;">);
</span>

Me too. I’ll take my salary now, please.

Edit: Lemmy stripped out my rickroll. :(

WackyTabbacy42069 ,

Sucks that your rick roll got taken from you. I understand how hard it must feel, so please know that I’m never gonna give you up, never gonna let you down, never gonna run around and desert you

milkjug , in “Hire me”
@milkjug@lemmy.world avatar

Dude’s training for his spelling bee. Let’s not over_react_.

rem26_art , in Error 502:
@rem26_art@kbin.social avatar

thats an ancient version of nginx lol

Untitled_Pribor ,

OP should follow this guide

Sanctus , in Brace Style
@Sanctus@lemmy.world avatar
the_tab_key ,

I forgot Moses was in Tron

blackn1ght , in blahaj

TIL blahaj refers to a soft toy shark sold by IKEA.

mindbleach ,

Would the association with the transgender community be news to you, or is that how you first heard the term?

blackn1ght ,

No that’s new to me too, based off me searching the word and seeing the Wiki article on the toy. I’d seen the word because of one of the instances (blahaj zone), but I literally never see the word outside of Lemmy.

mindbleach ,

Well, heads-up: it’s called that for a reason.

carrylex OP , in Implementing RFC 3339 shouldn't really be that hard...
@carrylex@lemmy.world avatar

So just for additional context:

This meme was brought to you by the following API response scheme:


<span style="color:#323232;">{
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#183691;">"time"</span><span style="color:#323232;">: "2007-12-24 18:12",
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#183691;">"servertimezone"</span><span style="color:#323232;">: "Europe/Vienna",
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#183691;">"timezoneoffset"</span><span style="color:#323232;">: </span><span style="color:#0086b3;">-8
</span><span style="color:#323232;">}
</span>

when it could have just been


<span style="color:#323232;">{
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#183691;">"date"</span><span style="color:#323232;">: "2007-12-24T18:21:00-07:00"
</span><span style="color:#323232;">}
</span>
Amir ,
@Amir@lemmy.ml avatar

It should’ve been unix timestamp

gjoel ,

To be fair, returning the actual timezone (as defined by tz.db) is useful if you don’t just want the current time since you’ll be able to take DST into account. Not sure how Vienna is -8 though, it should be +1 (or 2 depending on DST).

el_abuelo ,

Your comment is a full throated endorsement of just working in UTC up until the presentation layer. Whether you intended that or not is another question.

gjoel ,

It is? Without even mentioning it?

To be clear I believe it makes sense to do a lot of things in UTC, but future events should almost always be local time + timezone to make scheduling predictable and consistent to humans.

el_abuelo ,

Yes. Not intentionally of course. But yes.

I don’t see how your way is any more predictable or consistent than using UTC. What even is “local time”? Are you assuming they haven’t changed timezone since they created the data? Say…DST happened, or they drove over a border…?

Storing and manipulating in UTC is the most predictable and consistent because it is universal and unchanging. You only need to worry about “local time” at the point of displaying it.

gjoel ,

We have slackbots that post, for instance, who has vecation every day. Because it is configured to post this using UTC, the time of day this is posted changes twice a year.

I might have a recurring appointment for lunch in my calendar every day at noon. Now DST happened, so I have to wait until one to eat. That is inconsistent to me.

Timezones change. If I have to go to the theatre on half a year at 18:00, I don’t want to be there at 19:00 because someone decided local time would be better if we moved it an hour. The show time certainly won’t be moved.

What is local time? It’s spacetime. When did it happen and if relevant (eg. a photo) what was the offset (because I would like to know the time of day)? When will it happen, and where? Online meetings across timezones are tricky, of course, but excluding the timezone won’t improve that.

ruk_n_rul ,

Notice the common problem here? DST. Get rid of it and you get rid of the inconsistency that happens parts of the year, and you reduce fatality rates that resulted from moving time twice a year.

gjoel ,

I agree! Can we also get rid of politicians, mosquitoes and people who use their phone at the cinema?

carrylex OP , (edited )
@carrylex@lemmy.world avatar

Just for further clarification, the API works like this:

  • time is the local (client) time (in this case UTC-7)
  • servertimezone is the time zone where the server is located
  • timezoneoffset is the offset of the local time relative to the servertimezone (offset from the servers PoV)

To get the UTC date you have to do something like this:


<span style="color:#323232;">time.minusHours(timezoneoffset).atZone(servertimezone).toUTC()
</span>
9point6 , in Average CSS

Not allowed to credit the site in your text editor?

Is the owner in the room with you now?

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

This screenshot is not mine, it was sent to me via Matrix

Natanael ,

You get used to it. I don’t even see the code

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

Do you have a built-in browser in your brain that renders it?

dohpaz42 ,
@dohpaz42@lemmy.world avatar

All I see is blonde, brunette, redhead. Hey uh, you want a drink?

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

Free drink? Absolutely

dohpaz42 ,
@dohpaz42@lemmy.world avatar

It’s good for two things: De-greasing engines and killing brain cells.

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar
GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

It’s only now that I realise that I understood that reference so late

roguetrick ,

Took ya a bit Keanu, but you got there.

nifty ,
@nifty@lemmy.world avatar

…it was sent to me via Matrix

That’s how they do pull requests there

jaaake , in I Will Fucking Piledrive You If You Mention AI Again

Pasting the same thing I commented last time this was posted:

After reading that entire post, I wish I had used AI to summarize it.

I am not in the equally unserious camp that generative AI does not have the potential to drastically change the world. It clearly does. When I saw the early demos of GPT-2, while I was still at university, I was half-convinced that they were faked somehow. I remember being wrong about that, and that is why I’m no longer as confident that I know what’s going on.

This pull quote feels like it’s antithetical to their entire argument and makes me feel like all they’re doing is whinging about the fact that people who don’t know what they’re talking about have loud voices. Which has always been true and has little to do with AI.

Carighan ,
@Carighan@lemmy.world avatar

Yeah, parts of this article feel like they’ve been written by a GenAI. Which… might have been the point, I suppose.

steventhedev OP ,

So to be clear: you didn’t laugh?

Modva ,

I thought it was hilarious

BehindTheBarrier ,

I kinda get where he is coming for though. AI is being crammed into everything, and especially in things where they are not currently suited to be.

After learning about Machine learning, you kind realize that unlike “regular programs” that ML gives you “roughly what you want” answers. Approximations really. This is all fine and good for generating images for example, because minor details being off of what you wanted probably isn’t too bad. A chat bot itself isn’t wrong here, because there are many ways to say the same thing. The important thing is that there is a definite step after that where you evaluate the result. In simpler ML you can even figure out the specifics of the process, but for the most part we evaluate what the LLM said or if the image is accurate to our expectations. But we can’t control or constrain the output to exactly our needs, because our restrictions largely are just input in a almost finished approximation engine.

The problem is, that companies take these approximation engines, put them in their product and consider their output fact. Like Ai chatbots doing customer support, and make up facts like the user that was told about rules that didn’t exist for an airline, or the search engines that parrot jokes or harmful advice. Sure you and I might realize that these things come from a machine that doesn’t actually think about it’s answers, but others don’t. And throwing a “*this might be wrong because its AI” on it is not an acceptable waiver of accountability.

Despite this, I use chatgpt and gemini a lot to help me program, they get a lot of things wrong but also do great. It’s a great tool, exactly because I step in after the approximation step, review and decide. I’m aware of the limits. But putting these things in front of “users” without a review step means you are advertising that you are either unaware of this flaw, or just see the cost-benefit analysis and see that if noting else it’ll generate interest during the hype.

There is a huge potential, but throwing AI into a situation where facts are needed when it’s only making rough guesses, is the wrong way about it.

nxdefiant ,

There’s an earlier bit that complements that nicely:

“it turns out that the core competency of smiling and promising people things that you can’t actually deliver is highly transferable.”

repungnant_canary , in Sysadmin comes out of the goon cave. And he is not happy in the slightest.

Relevant XKCD for the OP xkcd.com/1053

FuglyDuck ,
@FuglyDuck@lemmy.world avatar

Do I need to click? (Nope), Congrats OP!

missphant , in It's easier to remember the IPs of good DNSes, too.
@missphant@lemmy.blahaj.zone avatar

Ha I can remember the ipv6 of cloudflare DNS just fine! It’s uh… something : something : something :: 1111

Morphit , (edited )
@Morphit@feddit.uk avatar

2606:4700:4700::1111

Hmm, maybe Google is easier:
2001:4860:4860::8888

Quad9 is 2620:fe::fe or 2620:fe::9

I don’t understand why they can’t get better addresses than that. Like surely 1::1 would be valid?

Edit: So IANA only control addresses 2001:: and up and there are quite a few IETF reservations within that. I don’t know why they picked such a high number to start at. Everything else seems IETF reserved with a little space allocated for special purposes (link-local, multicast, etc.).

Thiakil ,

Address space is so huge that iirc the only global addresses in use are 2xxx::

Its so huge that it’s not needed to use anything else is the goal as far as I see. If it starts with 2, it’s global.

Thiakil ,

Also for routing table reasons. Ipv6 needs to use prefixes to do link aggregation or it just gets too bjg

Morphit ,
@Morphit@feddit.uk avatar

I can see that, but surely there wouldn’t be much difference matching the first 4bits (0x2XXX, 0xfXXX) vs the first 16 (0x0001)?
0:: is presumably all for loopback-type stuff, but I don’t see a reason not to use 1:: through 1fff:: and they would be much easier to type/remember/validate for public DNS servers which are needed before name resolution is available.

Thiakil ,

Not sure on the history of that. It would make things like that easier

JohnEdwa ,

IPv6 is big enough to give 10 billion unique addresses for every grain of sand on earth and still have some left over. Just in case we need to, I guess.

dan ,
@dan@upvote.au avatar

It’s great that the address space is so large. When designing a new system, you want to make sure it’ll hopefully never encounter the same issue as the old system, to ensure you don’t have to migrate yet again.

JohnEdwa ,

Sure. But the IPv6 implementation is a bit like if we went “you know the y2038 problem of 32 bit numbers, and how goin under 1970 is sometimes hard? Lets solve it by making it start from the big bang and store time as a 256 bit integer so we don’t run out until year 3.1 x 10^69”.

IPv6 is big enough for 340,282,366,920,938,463,463,374,607,431,768,211,456 unique addresses. Are we expecting to create an universe consuming army of exponentially replicating paper clip converting robots that each need an IPv6 address or something?

dan ,
@dan@upvote.au avatar

Having a large range has a number of benefits though. Companies that have dozens of IPv4 ranges may be fine with a single IPv6 range, which simplifies routing rules.

A lot of features in IPv6 take advantage of the fact that networks have at least a /64 range (at least if they’re built correctly according to RFC4291 and newer specs). SLAAC is a major one: Devices can auto-configure IP addresses without having to use something like a stateful DHCP server.

Morphit ,
@Morphit@feddit.uk avatar

Why start at 0x2001 though? Why not 0x0001? Then we could have addresses like 1:1:1::1 or 1:2:3::4.

lambalicious OP ,

1.1.1.1? :p

bigredcar , in Roses are red, violets are blue, everyone is using IPv6, why aren't you?

Just remember we got rid of TLS 1.0 the same thing can be done with IPv4. It’s time for browser makers to put “deprecated technology” warnings on ipv4 sites.

NocturnalEngineer ,

IPv4 isn’t depreciated, it’s exhausted. It’s still a key cornerstone of our current internet today.

We still have “modern” hardware being deployed with piss-poor IPv6 support (if any at all). Until that gets fixed, adoption rates will continue to be low. Adding warnings will only result in annoying people, not driving for improvement.

gamermanh ,
@gamermanh@lemmy.dbzer0.com avatar

Adding warnings will only result in annoying people, not driving for improvement.

Given how poorly adoption has gone so far this might be the only way to get actual fast support rolled out. Piss people off, get change

KillingTimeItself ,

IPv4 isn’t depreciated, it’s exhausted.

exhaustion probably also constitutes as “deprecated” once the utility of a system designed to be, well, useful no longer meets the usefulness quotient that it previously provided. Suddenly It’s “deprecated technology”

Hammerheart ,

IPv4 should be deprecated, but it’s not

KillingTimeItself ,

genuine question, any reason not to just actually deprecate it then? Like just stop producing hardware that routes IPV4. Chances are there’s enough that’ll already do IPV4 it won’t be a problem, and im sure if you really needed to, you could figure something out.

MajorHavoc , in std::underflow_error

This is quite accurate.

Source: I’ve been in this journey.

erp , in C++

C++: C with blackjack and 40 year old hookers. Anyway, only the rich can inherit diamonds or something. Or perhaps not, my memory is corrupted. I’m open to any pointers though…

OpenStars , in C++
@OpenStars@discuss.online avatar

Compared to Assembly language, C++ is fantastic! :-P

scrion ,

It’s actually a lot worse than ASM, there are far more ambiguities in C++. And yet here I am, still developing with it some 30+ years later.

Don’t worry, I’m using Rust were it makes sense.

Kakaofruchttafel ,

Where does using Rust not make sense?

GlitchyDigiBun ,
@GlitchyDigiBun@lemmy.world avatar

Just got a Commodore 64 and been having fun with ASM. I’m also weird. Don’t be like me.

OpenStars ,
@OpenStars@discuss.online avatar

Assembly was my first language after BASIC - I know I’m weird, and I’m okay with that:-). Tbf it was for a calculator, so simplified. Any language ofc can go off the deep end in terms of complexity, or if you stick to the shallows it can be fairly simple to write a hello world program (though it took me a month to successfully do that for my calculator, learning on my own and with limited time spent on that task:-).

MajorHavoc ,

Don’t be like me.

Too late!

Valmond ,

32 = JMP

96 = JMP Subroutine

Or is my memory defect 😁

nobleshift ,
@nobleshift@lemmy.world avatar

deleted_by_author

  • Loading...
  • OpenStars ,
    @OpenStars@discuss.online avatar

    Okay so they are both quite “fun” :-)

    C++ is a bit easier to use on a daily basis though, and a scripting language easier still:-D.

    Damn asm was fun though…

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