Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

WEEKLY CHALLENGE

Name: Anonymous 2010-08-25 18:17

/prog/'s weekly challenge

Write a solution to Project Euler's first problem (http://projecteuler.net/index.php?section=problems&id=1)
using the befunge93 language (http://catseye.tc/projects/befunge93/doc/befunge93.html).

Name: Anonymous 2010-08-25 18:25

Translation: Do this semi-obscure thing I just heard of with this other semi-obscure thing I just heard of. Welcome to fucking years ago son.

Name: Anonymous 2010-08-25 18:49

82*94+*92*1+*427**3+*.@

Name: Anonymous 2010-08-25 18:49

>>2
years ago
so what is contemporary?

Name: ???????????????????????? !Ep8pui8Vw2 2010-08-25 19:28

>>2
Go fuck yourself, you wannabe-elitist cunt.

Name: Anonymous 2010-08-25 20:02

>>5
So a priest, a rabbi and a used car salesman walk into a bar. They sit down and order drinks. The priest orders a tall milk. The rabbi orders a Shirley Temple. The used car salesman orders a double shot of Jack.

The priest and rabbi quickly get into pedantry over the finer points of a certain passage in the Torah, however they're discussing it amicably enough. The used car salemsan is bored by this and turns to start a conversation with the patron on his left. The man is scribbling notes in a notebook, which catches the salesman's eye. It reminds him something from his time spent in college. After a moment, he musters his wit and says "HAVE YOU READ YOUR SICP TODAY?" It is apparent the other patron recognizes the meaning, but he says nothing, only shaking his head in disappointment.

Put off by his fellow patron's attitude, the salesman calls him out as a wannabe elitist and storms off.

And that is why I do not talk to used car salesmen in bars.
             -- Gerald GJS Jay Süßmann Sussman

Name: Anonymous 2010-08-25 20:12

>>5
Congratulations on finding the Mathematical Alphanumeric Symbols block.

Name: 2 2010-08-25 20:31

>>5
YOU WANNA FIGHT HUH

WELL LET ME TELL YOU

I'LL INDENT YOU LIKE PYTHON

I'LL SLAP YOU LIKE MY MOM

Name: Anonymous 2010-08-25 20:32

000pv
v0  <                     >v
>00g+00g3+00p00g5558***1-`|
^                         <
v                          >000p
                          >  v
>00g+00g5+00p00g5558***1-`|
^                         <
v                            >000p
                            >.@
>00g-00g35*+00p00g5558***1-`|
^                           <

Name: Anonymous 2010-08-25 21:06

main = print $ sum $ filter (\x -> x `mod` 3 == 0 || x `mod` 5 == 0) [1 .. 1000]

HASKAL > BEFUNGE LOL

Name: Anonymous 2010-08-25 21:18

Not befunge, but here's one simple CL solution:
(loop for i from 1 to 1000 when (or (zerop (mod i 3)) (zerop (mod i 5))) sum i)

Name: Anonymous 2010-08-25 21:44

Fine then, Perl 6 confirmed for toy language:
[+] ( for ^1000 { $^a %% any(3,5) ?? $a !! 0 } )

My fist stab at golfing this made it return (and sum) junctions, which is a not so subtle clue to stop. In other news, Rakudo Star will happily reduce junctions in the least-efficient-yet-technically-correct manner plausible.

Name: >>5 2010-08-26 1:24

>>6
You've got way too much time to spare. Maybe you should try getting a job.

>>7
Thanks!

>>8
You should really reconsider the normality of your relationship with your mother.

Name: Anonymous 2010-08-26 4:01

It's odd that there's a "challenge" that involves finding multiples of 5 and 3.

Name: 9 2010-08-26 5:55

>>10-14
I'm the only one who won without cheating so far and all you people care about is non-Befunge solutions and shitposts?

Actually, here's some more esolangs, this is sorta fun.

Golfscript:
1000,.3%\5%|{+}*

J:
+/t#~+./0=3 5|,:~t=.i.1000

FALSE:
0a:
0s:[s;3+ 999>~][s;3+s: a;s;+a:]#
0s:[s;5+ 999>~][s;5+s: a;s;+a:]#
0s:[s;15+999>~][s;15+s:a;s;-a:]#a;.


Codan (haven't tested this, same pseudocode though):
0 ← 0
1 ← 0
«
    2 ← 3
    Α ← 1 Β ← 2 + → α
    Α ← 0 Β ← 1 + → α
    β < 1000
»
1 ← 0
«
    2 ← 5
    Α ← 1 Β ← 2 + → α
    Α ← 0 Β ← 1 + → α
    β < 1000
»
1 ← 0
«
    2 ← 15
    Α ← 1 Β ← 2 + → α
    Α ← 0 Β ← 1 - → Α
    β < 1000
»
α → Λ

Name: Anonymous 2010-08-26 13:55

>>15
I'm the only one who won without cheating
Yeah, it's weird how everyone didn't jump on such a tough challenge, right?  Congratulations.

Name: Anonymous 2010-08-26 14:53

>>15,16
Personally I only ever post Befunge code when it's unexpected/undesired.

Name: Anonymous 2010-08-26 16:41

LISP

Name: ​​​​​​​​​​ 2010-09-10 4:53

Name: Anonymous 2010-12-06 1:39

Why is everyone so angry?
Do they not know how to do the problem so they lash out at others?

Don't change these.
Name: Email:
Entire Thread Thread List