this post was submitted on 05 Jul 2024
13 points (93.3% liked)

Programmer Humor

35334 readers
1 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 
top 39 comments
sorted by: hot top controversial new old
[–] lurch@sh.itjust.works 5 points 1 year ago (2 children)

all lines not terminated by a single space are comments

[–] tabarnaski@sh.itjust.works 3 points 1 year ago

There's a special place in hell for you

[–] Ziglin@lemmy.world 2 points 1 year ago (1 children)

Also each line starts with a semicolon and you have to escape spaces in strings using a double forward slash

[–] turbowafflz@lemmy.world 2 points 1 year ago (2 children)

I realized a while ago that there's nothing stopping me from writing rust like this

;println!("This is great")
;println!("I think everyone should write rust like this")
;println!("Probably works in most languages that use semicolons")
;
[–] miningforrocks@lemmy.ml 1 points 1 year ago (1 children)

Also a spicial place in hell for you

[–] rovingnothing29@lemmy.world 2 points 1 year ago

Can we add the comefrom function too?

[–] Ziglin@lemmy.world 1 points 1 year ago

Nasm programmers probably think that is old code that you commented out.

[–] manucode@infosec.pub 4 points 1 year ago (5 children)

It uses XML-like syntax:

<fun>
  <name>sum</name>
  <in>
    <int>foo</int>
    <int>bar=0</int>
  </in>
  <out><int>foo+bar</int></out>
</fun>
[–] JackbyDev@programming.dev 2 points 1 year ago (1 children)

Make sure to make ample use of mixed content elements.

<statement><var>bar</var> = <int>0</int></statement>
[–] aphlamingphoenix@lemm.ee 2 points 1 year ago (1 children)
statement: 
  comparison:
    - kind: libcompare.EQUALS
      comparators:
        - foo
        - bar
      whentrue:
        statement: 
          streaming: 
            - kind: libstreams.PRINT
               content: foo equals bar
      whenfalse:
        statement: 
          streaming: 
            - kind: libstreams.PRINT
               content: foo does not equal bar
[–] JackbyDev@programming.dev 0 points 1 year ago (1 children)
[–] aphlamingphoenix@lemm.ee 0 points 1 year ago (1 children)
[–] JackbyDev@programming.dev 1 points 1 year ago

Don't apologize, it's beautiful in its horribleness

[–] VitaminF@feddit.org 2 points 1 year ago (1 children)
<fun>
  <name>sum</name>
  <in>
    <int>
      <name>foo</name>
    </int>
    <int>
      <name>bar</name>
      <default_value>
        <int>0</int>
      </default_value>
    </int>
  </in>
  <out>
    <int>
      <calculation>
        <numerical_operation>
          <operator_plus>
            <operand>
              <var>foo</var>
            </operand>
            <operand>
              <var>bar</var>
            </operand>
          </operator_plus>
        </numerical_operation>
      </calculation>
    </int>
  </out>
</fun>
[–] manucode@infosec.pub 0 points 1 year ago (2 children)

How did you come up with such a ****ingly stupid syntax?!

[–] hedgehog@ttrpg.network 1 points 1 year ago

They probably have experience with Spring

[–] Pilon23@feddit.dk 1 points 1 year ago

Can you please link to a medium article on how this will help utilize AI blockchain so i can show it to management on Monday?

[–] notabot@lemm.ee 1 points 1 year ago

I like it, this is clearly very enterprisey and solution focused, but I would like to suggest a couple of amendments if I may?

  • Namespaces We should make full use of namespaces. Make the structural tags be in a language specific namespace (to be referenced in every function spec, obviously) but change the in an out params to use the parameter name as the tag, namespaced to the function they're for, with a type attribute.

  • In memory message queues Have all function invocations be marshaled as xml documents posted to an in memory message queue. Said documents should use a schema that validates the structure and a function specific schema to validate the types of arguments being passed. Namespace everything.

I reckon we could power a medium sided country if we could generate energy from the programmers despair.

[–] _stranger_@lemmy.world 1 points 1 year ago

The whitespace is not only required, but it must be tabs and spaces.

[–] bottleofchips@lemmy.blahaj.zone 2 points 1 year ago (1 children)
[–] qaz@lemmy.world 1 points 1 year ago (1 children)

...to an intermediate set of instructions for a virtual machine...

...called the brainfuck interpreter

[–] enleeten@discuss.online 1 points 1 year ago

Brainfuck.NET Interpreter that uses modified Java bytecode instructions.

[–] Ghostalmedia@lemmy.world 1 points 1 year ago

Make a UX or Project management tool with “Java” in the name so newbie recruiters look for people in the wrong department.

They already do this, but this would make them do it even more.

[–] MIDItheKID@lemmy.world 1 points 1 year ago (1 children)

Confusion like this got me my current job. They were looking for somebody with experience in "Microsoft Endpoint Configuration Manager", and I look that up and I'm like "Oh, that's SCCM, I do that". Go through the interview process they keep asking me if I know Endpoint Configuration Manager and I'm like "yeah, for sure". I get the job. Day one, the other systems engineer is like "here is the link to our Endpoint Manager Tenant", and I'm like "oh... Shit I have never ever used this"

Well... Ends up Endpoint Configuration Manager and Endpoint Manager are two different things. Fortunately for me they are pretty similar in function and rely on knowledge of Windows and Powershell, which I know.

So my first 2 weeks of work was taking a shitload of courses in Endpoint Manager and watching a lot of videos and learning it inside and out.

2 years later and I'm an Endpoint Manager/Intune pro.

[–] BambiDiego@lemmy.world 1 points 1 year ago

90% of IT and software jobs are "I have common sense, know how to look up information, and my boss is intimidated by my work so they don't question it."

[–] Mio@feddit.nu 1 points 1 year ago

Just call it Script.

[–] Colonel_Panic_@lemm.ee 1 points 1 year ago

PythonSharp Script Java Edition

[–] sunoc@sh.itjust.works 1 points 1 year ago (1 children)

Make it purely functional, lisp based with reversed Polish notation and APL symboles, I dare you mf

[–] AkatsukiLevi@lemmy.world 1 points 1 year ago

Make it completely ignore indentation

[–] bitfucker@programming.dev 1 points 1 year ago

Make CScript, an interpreted, duck-typed language

[–] mogoh@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)
[–] DumbAceDragon@sh.itjust.works 1 points 1 year ago (1 children)

Make it completely untyped. Everything's just a string.

[–] AdamEatsAss@lemmy.world 1 points 1 year ago

I think white space should be used to represent basic functions too. For example 3 spaces can be used to sum two values while 4 spaces can be used to subtract.

[–] muntedcrocodile@lemm.ee 0 points 1 year ago (1 children)

So the matlab thing where all lines not terminated by semi colon are printed except use Greek question marks instead of semi colons.

[–] AdamEatsAss@lemmy.world 0 points 1 year ago (1 children)

I like this but to make the code more readable the Greek question mark should also be placed upsidedown at the start of every line that needs to not be printed.

[–] muntedcrocodile@lemm.ee 0 points 1 year ago (1 children)

Should it raise an error of treat it as a comment for lines with neither? Im leaning towards treat it as a comment will make debugging harder.

[–] AdamEatsAss@lemmy.world 1 points 1 year ago

I agree. If there is no Greek question mark at all it should be code that is printed to console. If there is an upside down at the start and upside right at the end it is just normal code. If upside right at the end only, it is a comment. Only upside down at the start it will be treated as debug specific code and will not be run in production compilations.