Discuss Scratch

mybearworld
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

Socialix
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

Chiroyce wrote:

// this is a comment
# this is a comment
laughs in lua…

– this is a comment that is not by chiroyce

Last edited by Socialix (May 9, 2021 07:28:10)

Vaibhs11
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

Socialix wrote:

Chiroyce wrote:

// this is a comment
# this is a comment
laughs in lua…

– this is a comment
laughs in brainf***
this is a comment that is not by socialix and chiroyce and is in bf

Last edited by Vaibhs11 (May 9, 2021 07:32:02)

fdreerf
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

Chiroyce wrote:

fdreerf wrote:

Chiroyce wrote:

# this is a comment
No, that's checkmate.
Is this some sorta joke that only a Chess Pro would get?
Not really, you can lose a game too
mbarto2
Scratcher
36 posts

What are some funny programming/mathematical jokes?

what did the computer say to the other computer?
‘now we can talk? we can take over the world’

lol it makes zero sense
Jonathan50
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

Chiroyce wrote:

fdreerf wrote:

Chiroyce wrote:

# this is a comment
No, that's checkmate.
Is this some sorta joke that only a Chess Pro would get?
No, though it would look something like “Qe6#”. So the comment is empty. (I can lose ten games in a row on Chess.com.)
gosoccerboy5
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

(the lambda expression (hopefully) is relatively language neutral)
mybearworld
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

Lambda is a concept I just don't get in javascript
PkmnQ
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

mybearworld wrote:

Lambda is a concept I just don't get in javascript
Basically the way I know it right now it's function but small
gosoccerboy5
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

PkmnQ wrote:

mybearworld wrote:

Lambda is a concept I just don't get in javascript
Basically the way I know it right now it's function but small
It can be any size
gosoccerboy5
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

mybearworld wrote:

Lambda is a concept I just don't get in javascript
Yea, cause python lambda is limited to one line
mybearworld
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

gosoccerboy5 wrote:

[View post]

mybearworld wrote:

Lambda is a concept I just don't get in javascript
Yea, cause python lambda is limited to one line
That's the point. Why use lambda when it's the same thing as just using “normal” functions?
PkmnQ
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

mybearworld wrote:

gosoccerboy5 wrote:

[View post]

mybearworld wrote:

Lambda is a concept I just don't get in javascript
Yea, cause python lambda is limited to one line
That's the point. Why use lambda when it's the same thing as just using “normal” functions?
If you want to put a quick function like in .sort or .reduce, so you don't have to write function(){}.
gosoccerboy5
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

mybearworld wrote:

That's the point. Why use lambda when it's the same thing as just using “normal” functions?
-replied in other topic to avoid cluttering-
MagiYT
Scratcher
42 posts

What are some funny programming/mathematical jokes?

*wavy stop sine*
mybearworld
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

gosoccerboy5 wrote:

[View post]

mybearworld wrote:

That's the point. Why use lambda when it's the same thing as just using “normal” functions?
-replied in other topic to avoid cluttering-
I see, combining it with let could especially have some uses (for me at least)
FirecubeT
Scratcher
100+ posts

What are some funny programming/mathematical jokes?

BookOwl wrote:

LISP - Lots of Infuriating Superfluous Parentheses
That’s pretty funny lol
Raihan142857
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool that is insufficiently sophisticated to understand the constructs employed by HTML. HTML is not a regular language and hence cannot be parsed by regular expressions. Regex queries are not equipped to break down HTML into its meaningful parts. so many times but it is not getting to me. Even enhanced irregular regular expressions as used by Perl are not up to the task of parsing HTML. You will never make me crack. HTML is a language of sufficient complexity that it cannot be parsed by regular expressions. Even Jon Skeet cannot parse HTML using regular expressions. Every time you attempt to parse HTML with regular expressions, the unholy child weeps the blood of virgins, and Russian hackers pwn your webapp. Parsing HTML with regex summons tainted souls into the realm of the living. HTML and regex go together like love, marriage, and ritual infanticide. The <center> cannot hold it is too late. The force of regex and HTML together in the same conceptual space will destroy your mind like so much watery putty. If you parse HTML with regex you are giving in to Them and their blasphemous ways which doom us all to inhuman toil for the One whose Name cannot be expressed in the Basic Multilingual Plane, he comes. HTML-plus-regexp will liquify the n​erves of the sentient whilst you observe, your psyche withering in the onslaught of horror. Rege̿̔̉x-based HTML parsers are the cancer that is killing StackOverflow it is too late it is too late we cannot be saved the trangression of a chi͡ld ensures regex will consume all living tissue (except for HTML which it cannot, as previously prophesied) dear lord help us how can anyone survive this scourge using regex to parse HTML has doomed humanity to an eternity of dread torture and security holes using regex as a tool to process HTML establishes a breach between this world and the dread realm of c͒ͪo͛ͫrrupt entities (like SGML entities, but more corrupt) a mere glimpse of the world of reg​ex parsers for HTML will ins​tantly transport a programmer's consciousness into a world of ceaseless screaming, he comes, the pestilent slithy regex-infection wil​l devour your HT​ML parser, application and existence for all time like Visual Basic only worse he comes he comes do not fi​ght he com̡e̶s, ̕h̵i​s un̨ho͞ly radiańcé destro҉ying all enli̍̈́̂̈́ghtenment, HTML tags lea͠ki̧n͘g fr̶ǫm ̡yo​͟ur eye͢s̸ ̛l̕ik͏e liq​uid pain, the song of re̸gular exp​ression parsing will extinguish the voices of mor​tal man from the sp​here I can see it can you see ̲͚̖͔̙î̩́t̲͎̩̱͔́̋̀ it is beautiful t​he final snuffing of the lie​s of Man ALL IS LOŚ͖̩͇̗̪̏̈́T ALL I​S LOST the pon̷y he comes he c̶̮omes he comes the ich​or permeat<i>es all MY FACE MY FACE ᵒh god n<b>o NO NOO̼O​O NΘ stop the an​*̶͑̾̾​̅ͫ͏̙̤g͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨe̠̅s ͎a̧͈͖r̽̾̈́͒͑e n​ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ

Last edited by Raihan142857 (May 10, 2021 22:26:43)

fdreerf
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

Raihan142857
Scratcher
1000+ posts

What are some funny programming/mathematical jokes?

fdreerf wrote:

-snip-
programming in c is lame, real gamers code in asm
Hello world
global main
section .text
extern printf
main:
  mov        rsi, message          ; sets parameters to print
  mov        rdi, fmt
  sub        rsp, 8
  call       printf                ; calls printf
  add        rsp, 8 
  mov        rbx, 0                ; exit status 0
  mov        rax, 1
  int 0x80                         ; make a request to the os kernel
  ret                              ; return
section .data                      ;
  message: db "Hello, World!", 10, 0
  fmt: db "%s", 0
Factorial
global main
section .text
extern printf
extern scanf
main:
  mov        rsi, query             ; sets "Enter number: " as the second parameter
  mov        rdi, fmt               ; sets "%s" as the first parameter
  sub        rsp, 8                 ; makes space in the stack for the parameters
  call       printf                 ; calls printf on the parameters
  add        rsp, 8                 ; to prevent a segfault, reverses line 12
  mov        rsi, input             ; sets 8 empty bytes as the second parameter (64 bit int)
  mov        rdi, fmt2              ; sets "%i" as the first param
  sub        rsp, 8
  call       scanf                  ; calls scanf on the parameters
  add        rsp, 8
  mov        rsi, qword [start]     ; counter for the factorial calculation, starts at 1
  mov        rax, qword [start]     ; product for the factorial calculation, starts at 1
  mov        rcx, qword [input]     ; how long the loop will stay intact
  factorial:                        ; defines the loop
    mul        rsi                  ; multiplies the product by the counter
    inc        rsi                  ; increments the counter
    loop       factorial
  mov        rsi, rax               ; sets parameters to print the result
  mov        rdi, fmt3
  sub        rsp, 8
  call       printf                 ;  calls printf again
  add        rsp, 8
  mov        rbx, 0                 ; exit status 0
  mov        rax, 1
  int        0x80                   ; make a request to the os kernel
  ret                               ; return
section .data                       ; all the parameters used in the calculation
  query:     db "Enter number: " , 0
  input:     times 8 dq 0
  start:     dq 1
  fmt:       db "%s", 0
  fmt2:      db "%ld", 0
  fmt3:      db "%ld", 10, 0 
Primality test
global main
section .text
extern printf
extern scanf
main:
  mov        rsi, query             ; sets "Enter number: " as the second parameter
  mov        rdi, fmt               ; sets "%s" as the first parameter
  sub        rsp, 8                 ; makes space in the stack for the parameters
  call       printf                 ; calls printf on the parameters
  add        rsp, 8                 ; to prevent a segfault, reverses line 12
  mov        rsi, input             ; sets 8 empty bytes as the second parameter (64 bit int)
  mov        rdi, fmt2              ; sets "%i" as the first param
  sub        rsp, 8
  call       scanf                  ; calls scanf on the parameters
  add        rsp, 8
  mov        rsi, qword [start]     ; counter for the primality test, starts at 1
  mov        rcx, qword [input]     ; how long the loop will stay intact
  prime_test:                       ; defines the loop
    mov        rax, qword [input]   ; restore the rax register
    xor        rdx, rdx             ; empty the rdx register
    div        rsi                  ; divide the input by the counter
    test       rdx, rdx
    jz         prime_end            ; if the input is divisible by the counter, the number is not prime, so jump to the end
    inc        rsi                  ; increments the counter
    loop       prime_test
  prime_end:
    cmp        rsi, qword [input]
    je         is_prime             ; if no factors are found besides the number itself, jump to is_prime
    mov        rsi, not_prime
    jmp        print_result
    is_prime:
      mov        rsi, prime
    print_result:
      mov        rdi, fmt
      sub        rsp, 8
      call       printf             ; calls printf again
      add        rsp, 8 
      mov        rbx, 0             ; exit status 0
      mov        rax, 1
      int        0x80               ; make a request to the os kernel
      ret                           ; return
section .data                       ; all the parameters used in the calculation
  query:     db "Enter number: " , 0
  input:     times 8 dq 0
  start:     dq 2
  fmt:       db "%s", 0
  fmt2:      db "%i", 0
  prime:     db "Prime", 10, 0
  not_prime: db "Not prime", 10, 0
as you can see I put the “pro” in “programmer” and I definitely dont hate myself for spending hours writing this code

Powered by DjangoBB