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.

ptz , in Bad!
@ptz@dubvee.org avatar

That’s a very old version of Nginx. Bad admin for not updating at least once in a while.

nieceandtows , in White House weighing in on the big issues

Waiting for an executive order on vim vs neovim.

TheBananaKing , in PHP Moment

I don’t care that it’s outdated, everyone still needs to read eev.ee/blog/2012/…/php-a-fractal-of-bad-design/

SendMePhotos , (edited ) in wait what

But like… Correct me if I’m wrong but in my experience tab does not always equal 4 spaces.

E: thanks all. I didn’t fully understand.

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

You’re misunderstanding. In this case it means “one tab character” instead of “four space characters”.

dan ,
@dan@upvote.au avatar

That’s one of the benefits of using tabs. Some people might like 4 spaces for indentation, whereas others like 2 spaces. If you use tabs, you can configure your editor to use whatever tab size you want, and they’re just stored as tab characters in the file.

Tabs for indentation, spaces for alignment (eg for ASCII art).

gitamar ,

That’s why it’s also a big accessibility feature. With big font sizes, four spaces are distracting but you can configure tabs to show up as one character, which is way more reasonable with font sizes larger than usual

Waraugh ,

I had a colleague that is legally blind in my second real job. The dude is brilliant (and hilarious) but these things would significantly enable or screw up his productivity. I have always felt fortunate to have had direct butt in seat exposure to the importance of accessibility at such a young age.

MadBob ,

Four? Uh oh…

mke , in PHP Moment

Php also graced us with Unexpected T_PAAMAYIM_NEKUDOTAYIM

MonkderZweite ,

Neku dota yim?

isVeryLoud ,

It’s Hebrew for double colon apparently, it came from the Israeli Zend framework PHP was based on. Some dev thought it would be funny to add an error in a language other than English.

Illecors , in C++ Moment

But it returned 139! That’s a start even without a debugger!

NoLifeKing , in wait what

I will just write everything in one line to fuck them up.

fsr1967 ,

MUMPS has entered the chat.

model_tar_gz , in Positive Affirmations for Site Reliability Engineers

You were born to deploy K8s clusters.

OMG my sides. kubectl delete --all --all-namespaces

Psythik , in Stop using floats

While we’re at it, what the hell is -0 and how does it differ from 0?

Reddfugee42 ,

It’s the negative version

ShepherdPie ,

So it’s just like 0 but with an evil goatee?

Knock_Knock_Lemmy_In ,

Look at the graph of y=tan(x)+ⲡ/2

-0 and +0 are completely different.

computerscientistI ,

For integers it really doesn’t exist. An algorithm for multiplying an integer with -1 is: Invert all bits and add 1 to the right-most bit. You can do that for 0 of course, it won’t hurt.

Magnetar , in Stop using floats

Call me when you found a way to encode transcendental numbers.

ytg ,

Perhaps you can encode them as computation (i.e. a function of arbitrary precision)

Magnetar ,

Hard to do as those functions are often limits and need infinite function applications. I’m telling you, math.PI is a finite lie!

Chadus_Maximus , (edited )

May I propose a dedicated circuit (analog because you can only ever approximate their value) that stores and returns transcendental/irrational numbers exclusively? We can just assume they’re going to be whatever value we need whenever we need them.

frezik ,

Wouldn’t noise in the circuit mean it’d only be reliable to certain level of precision, anyway?

Chadus_Maximus ,

I mean, every irrational number used in computation is reliable to a certain level of precision. Just because the current (heh) methods aren’t precise enough doesn’t mean they’ll never be.

anton ,

You can always increase the precision of a computation, analog signals are limited by quantum physics.

smeg ,

Do we even have a good way of encoding them in real life without computers?

fossphi ,

Just think about them real hard

Magnetar ,

\pi

Knock_Knock_Lemmy_In ,

Here you go

ICastFist , in Shiiieeettt....
@ICastFist@programming.dev avatar

At least our programmer had the decency to comment that bit as being disabled for debugging :D

Eyck_of_denesle , in STOP USING GITHUB

I used to think github invented git when I was new to programming 😓

random9 ,

Fun fact, Linus has said that he has named both of the major pieces of software he has authored after himself - Linux and Git.

Git is a somewhat old British slang insult for someone stupid/childish.

So GitHub is then … a hub of gits.

marcos ,

If you look at the issues discussion of any popular project there…

I guess it’s the right name.

linux2647 , in Every language has its niche

Shopify is built on Ruby on Rails

SpaceNoodle ,

That explains a lot

idunnololz ,
@idunnololz@lemmy.world avatar

So is square IIRC

naught , (edited )

Yeah but Shopify also runs on GraphQL and Remix which are way more modern. This is like saying Twitter is RoR

edit: no it’s not

caleb ,

I worked at Shopify up until a year ago. github.com/shopify/shopify repo powers almost every inch of Shopify’s infrastructure and is entirely a rails monolith. It is not the same as saying Twitter is still rails.

naught , (edited )

Thanks for the insight! I’ve seen so many gql queries in the UI and remix is blowing up so I figured it was at least similar.

Edit: Shopify engineering publishes some neat articles, particularly on scaling rails + other systems. E.g shopify.engineering/horizontally-scaling-the-rail…

Z4rK , in I had to design a simple general purpose language for university, so I tried creating "ZoomerScript" with Jetbrains MPS

It’s really cool, but the example doesn’t produce any sensible output? If you have created something like this, why wouldn’t you have your demo output something sensible like Fibonacci or 1337 or whatever.

prof OP ,
@prof@infosec.pub avatar

Great idea if I have to extend it

neatchee ,

I’m opening an issue on your ticket tracker to add file i/o. Let the nightmare commence

blotz , in I had to design a simple general purpose language for university, so I tried creating "ZoomerScript" with Jetbrains MPS
@blotz@lemmy.world avatar

Oh metaprogramming! I’m doing a dissertation on this.

prof OP ,
@prof@infosec.pub avatar

Very cool, I’d be interested in your publications once you’re done. I like metaprogramming, but once you realise you might have needed it, you’re already knee deep in fresh legacy code.

blotz ,
@blotz@lemmy.world avatar

You essential have a compiler written through metaprogramming. For your implementation, did you use a find and replace or did you define and parse a grammar like a true compiler.

prof OP ,
@prof@infosec.pub avatar

MPS uses projectional editing. Which means for the user that everything you do is free from concrete syntax, and you basically edit a graphical representation of that abstract syntax tree directly, while it looks like you’re in a textual editor.

So I define abstract nodes that may have certain relationships with each other and then give them a representation in the editor (which is what you see in the screenshot). These nodes may also have generators assigned to them, which use map/reduce operations to generate whatever source code I desire. It usually includes its own bit of code, and triggers code generation of its children as well.

I hope that was somehow clear 😄

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