« first day (2012 days earlier)      last day (2829 days later) » 

9:00 PM
@MartinEnder I'm planning to do a few more /// experiments. It's such a clever (but complicated) language. So I made a little interpreter, which allows me to step through the ///-commands. Also it can limit the number of substitutions. This kills the program and shows the already printed chars and the current /// command. You can find it here: github.com/jakobkogler/slashes
 
9:13 PM
I'm very disappointed that ruby doesn't allow functions to take function arguments :(
 
ಠ_ಠ
 
I guess I'll have to fake it with a proc :(
Proc.new { |t| function t}
that is beyond ugly ಠ_ಠ
 
ruby is weird ಠ_ಠ
 
yes it is.
I don't know if I'm attracted to strange languages, or if strange languages are attracted to me.
 
Compose+d+l is my shortcut to type ಠ_ಠ
 
9:16 PM
Oh, I see. I have a custom keyboard, so for me it's (windows key)+(space * 3) + z + (windows key) + (space)
ಠ_ಠ
 
What even
 
you must do a konami code-like to type ಠ_ಠ
@DrGreenEggsandIronMan 40 errors when building VsVim :/
 
@TùxCräftîñg it's not that bad. windows key + space changes the keyboard layout.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ with a compose key it's simpler
i use WinCompose
 
so ι ψαν τypε ɐ ℓoτ °f characters
without the need of a custom layout
 
really really really important question: what actually happens (to your hardware) if you allocate more memory in an array then you have memory in your computer? For example, computer with 8 gb and I acciddently allocate a 2d float[5000000][5000000]
 
@AshwinGupta segfault
 
Segmentation fault (core dumped)
 
9:21 PM
is that gonna do something to the hardware?
 
Ah ninja'd
 
@AshwinGupta no
 
thank god.
 
9:21 PM
on dos you hae a chance to bork everything with this
 
An array allocation of that size would cause an explosion equivalent to roughly 12 kilotons of TNT.
 
but now with paging no problem
 
it was an accident
sort of...
 
It's what happened to Japan
 
9:22 PM
it was an accident that happened because my brain stop working. So I didn't think before I allocated.
 
they tried to allocate a array
 
@AshwinGupta your brain have segfaulted in advance
 
^^
exactlyyyy....
 
Oh i tried to compile a large array, gcc said too large
 
9:23 PM
really?
wish visual studio did that...
 
@betseg try assembly ¯\_(ツ)_/¯
 
I might have wanted to start learning Pyth with a simple example, but I'm too far gone to turn back now...
 
@TùxCräftîñg I shouldn't be trusted with any low level languages.
 
@MartinEnder in hexagony, does a hexagon wrap up and to the left, or up and to the right??
 
9:24 PM
@betseg cool, did you make that app?
 
  a b c
 d e f g
h i j k l
 m n o p
  q r s
 
try to abuse the preprocessor ¯\_(ツ)_/¯
it always work
 
is "a" adjacent to "q" and "r", or "q" and "s"
 
Name 1 time thats worked for you.
@NathanMerrill neither...
 
@AshwinGupta found on google play lel
@AshwinGupta CppDroid
 
9:25 PM
a is adjacent too b and s isnt it?
cool
 
@NathanMerrill k and l?
 
@AshwinGupta gcc havent crashed, i have putted it in a infinite loop
 
"a" is not adjacent to "k"
 
yeah exactly...
 
İ think a is adjacent to L
 
9:26 PM
oh, then the better question is if "a" is adjaent to "r"
your right, its not adjacent to "s"
 
whose right?
 
@NathanMerrill both, methinks
 
@TùxCräftîñg I "putted" eclipse into an infinite loop and it activated loop protection on me. Bad eclipse.
 
@betseg holy crap. That looks more painful then brainf*ck
 
9:28 PM
@AshwinGupta huh if putted is incorrect, sorry, my english is very bad, and eclipse is evil
 
@AshwinGupta actually brainfuck is quite simple. Hexagony is an agony.
 
wait, this grid makes no sense:
 
   . . . .          . a . .          . . k .          . g . .
  a b c d e        . . b . .        . . j . .        . h . . a
 . . . . . .      g . . c . .      . . i . . e      . i . . b .
. . . . . . .    . h . . d . .    . . h . . d .    . j . . c . .
 f g h i j k      . i . . e .      . g . . c .      k . . d . .
  . . . . .        . j . . f        f . . b .        . . e . .
   . . . .          . k . .          . . a .          . f . .
 
Eclipse isn't evil!
 
9:29 PM
I gave up learning hexagony.
 
@NathanMerrill why so?
 
notice how "a" and "k" are on top of each other
 
eclipse is downright sweet compared to visual studio.
 
AND how "g" and "f" are on top of each other
 
@AshwinGupta i agree with this point
 
9:29 PM
xD
I'm not a huge fan of netbeans or intelliJ. But i haven't really given them a fair chance TBH
 
@NathanMerrill It's kind of toroidal, Martin linked a post earlier today that describes it, gimme a set to find it
 
there are two directions going on here (up/left and up/right)
however, both of the directions are leading to the same point
@FryAmTheEggman I know what you are talking about. I'm not talking about the whole 3d shape, but how the wrapping is inconsistent
let me ask it another way. on the second hexagon, if I move up/left from the "a", where do I end up?
and if I move up/left from the "g" on the 4th hexagon, where do I end up?
 
You end up on the k
 
@NathanMerrill k
@NathanMerrill i can't see on ma phoen
 
and on the 4th hexagon, is the "f" that I end up on ?
 
9:33 PM
@NathanMerrill You end up on a the f
 
because the "f" and the "k" are in the same spot
@FryAmTheEggman what if I move up/right on the 4th hexagon?
because that's the direction of the line
 
@TùxCräftîñg haha, that's funny. But why are you building it? You can install it directly through VS.
 
@DrGreenEggsandIronMan ಠ_ಠ
 
You'll also end up on the f
 
> The edges of the hexagon wrap around to the opposite edge. In all of the following grids, if an IP starts out on the a moving towards the b, the letters will be executed in alphabetical order before returning to a:
 
9:34 PM
@FryAmTheEggman so, there are two directions that lead to the same spot?
so, its not a true hexagonal tiling
 
Yeah, why is that surprising?
It's not a tiling, it's a torus
 
@NathanMerrill it's a bit trickier than that
 
@DrGreenEggsandIronMan so how i install it?
 
  a b c
 d e f g
h i j k l
 m n o p
  q r s
  a b c
 d e f g
h i j k l
 m n o p
  q r s
@MartinEnder the source!
 
@NathanMerrill yeah it's not
 
ven
9:36 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ ... Yes it does
 
40
A: What programming languages have been created by PPCG users?

Martin EnderHexagony Hexagony was created by me, Martin Büttner, in September 2015. As far as I know it is the first two-dimensional programming language which operates on a hexagonal grid (instead of the usual rectangular grid). To make matters worse, opposite edges of the grid wrap around, making the top...

> To make matters worse, opposite edges of the grid wrap around, making the topology of the source code a weird twisted torus.
 
@MartinEnder you are really evil
 
thank you >:)
 
ven
You might be looking for ->{}?
 
@MartinEnder so is the tiling I showed above the correct tiling?
 
9:37 PM
well like you said it's not really a tiling
the edges kinda overlap
 
Shit there is a cockroach near my bed
 
ven
@CᴏɴᴏʀO'Bʀɪᴇɴ also, a { b } and a({ b }) don't mean the same thing
Unless I'm drunk. But I think I'm not
 
@MartinEnder that looks like a tiling to me. Its not a pure hexagonal one
 
if you wanted to draw the full periodic plane such that all trajectories are straight lines, you'd have to draw opposite edges on top of each other, and the two commands both get executed
which has some funny implications for mirrors on the edge
if you start on the a going right in this code it executes abcddefg:
  . g .
 / . f .
. . . e .
 a b c d
  . . .
 
this language is truly weird
 
9:40 PM
right, I'm abandoning straight trajectories
but its in essence:
  a b c
 d e f g
h i j k l
 m n o p a b c
  q r s d e f g
       h i j k l
  a b c m n o p
 d e f g q r s
h i j k l
 m n o p
  q r s
 
that doesn't really work though
because q r s should lead into h i j k l
as should a b c
 
ven
How absurd.
 
it actually kinda makes sense when you draw it with overlap
 
@MartinEnder then...bfabc...?
 
9:42 PM
yes
 
@MartinEnder so, I could start at q, going right, and end up at c?
 
@Zgarb oh they do, I was making a different mistake
@NathanMerrill yes, although that depends on a conditional
 
right
I was reading that
 
whether you wrap from l to a or q is a branch
 
what a unique language where the most "Readable" thing u can say about it is it "kinda" makes sense.
I love it!
 
9:45 PM
Then there is Shakespeare.
 
@Jakube amazing! earlier today I thought about making exactly that :D
 
@MartinEnder do you care if I quote your github page?
 
what is this even for?
 
er... your upcoming challenge
 
oh okay
sure, quote it if it helps :D
 
9:47 PM
thanks :)
 
@MartinEnder was there a 5th invalid answer?
 
there's a fifth answer but I haven't checked its validity yet. it seems that mbomb fixed his though
 
@MartinEnder just out of curiosity, is there a policy against mentioning politc figures on the stack exchange network?
 
  a b c
 d e f g
h i j k l
 m n o p
  q r s
@Martin what happens if I go down/left from m?
 
9:50 PM
g
 
@RohanJhunjhunwala y u always ninja
 
so, both left and down/left lead to g"
 
9:51 PM
if it's a toroidal thing, l is at the left
 
oppsite sides wra
its a toroid with an indian burn
 
Left-left g-f, bottomleft-bottomleft g-k i think
 
m always leads to g if you wrap
 
this language hurt my brain
 
@NathanMerrill yes, both directions lead to g and the direction is preserved
 
9:52 PM
>_>
 
that's why the mirror example above worked
 
hmmm, gotcha
 
@RohanJhunjhunwala I don't think there's an official policy but that doesn't mean it's a good idea.
 
whoops
ok let me fix it
 
I didn't realize that a mirror reflected right back, which is why the example went over my head
 
I thought it was like a 90 degree mirror
 
even multiplication is hard
 
@Martin Ender ok thanks
 
@NathanMerrill it's a 60 degree mirror
 
@TùxCräftîñg i love that repo
 
9:54 PM
(since you can't move vertically)
 
6
Q: Wrapped hexagon topology

whoplispWhen a square is wrapped at the edges, obtains a torus. Is it possible to do the same for a hexagon? What is the shape/topology of wrapping a hexagon? Note: I was just reading this https://github.com/aichallenge/aichallenge/wiki/Ants-Problem-Description and came up with this question. I'm a ...

if that helps
@NathanMerrill ^
 
@RohanJhunjhunwala technically, martin's hexagon doesn't wrap like that
 
oh it doesnt
im an idiot :(
whoops ignore me xD
 
its a bit more convoluted
 
9:55 PM
oh of course
hexAGONY
@Martin Ender do you have a graphic to explain your topology of the hexagons?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ what are you talking about
 
@NathanMerrill unless you draw the edge of the hexagon through the characters on the outermost rows
does that maybe help make it clearer?
@RohanJhunjhunwala only the ASCII thingies in the docs
 
@MartinEnder then technically, "a" and "q" are the same spot
 
@NathanMerrill right, and when you cross the boundary, both get executed
 
9:58 PM
I just discovered something amazing. "rpn is a command-line Reverse-Polish Notation calculator" written in Python. Give this guy some views. The number of built-ins is so astounding. I bet it could rival some golfing languages for certain tasks. It's like Mathematica.
4
 
@Zgarb this kinda works: jellyfish.tryitonline.net/… but as soon as I try to use J to make it work with arbitrary strings things blow up (even without all the recursion. PJ1 crashes with infinite recursion)
 
> 1,006 commits
and 0 stars ಠ_ಠ
poor guy :/
 
Do you think i5-3450s and gtx970 would get along well?
 
I gave the poor guy a star @TùxCräftîñg
 
@TùxCräftîñg 4 stars=)
 
10:01 PM
=)
trying to clone it
but the repo is huge
 
I don't think hexagony is truly a toroidal topology. It is heavily twisted even cut up xD
 
Gah. Initial setup of AppEngine is a pain in the ass.
 
@RohanJhunjhunwala Could be a projective plane topology.
 
@NathanMerrill I'm heading off but ping me if you have any other questions.
 
?? whats that?
 
10:04 PM
@MartinEnder I'm good, thanks. If you come back in a couple of hours, I should have your challenge ready :)
 
alright, looking forward to it :)
 
@El'endiaStarman I also thought so first, but it isn't
 
4 stars and 3 forks ಠ_ಠ
 
@TùxCräftîñg describing a restaurant?
3
 
@El'endiaStarman It is torroidal, I just found a nice illustration via topological "gluing"
 
10:06 PM
@HelkaHomba ಠ¯ಠ
good night
 
0
Q: King of the Torus!

Rohan JhunjhunwalaKing of the Torus! Your job is to conquer the torus, but wait, there are multiple other players banded together in teams facing you! You will need to use your wit's to conquer the torus. There are three teams: red, blue and green. Teams are self-assigned arbitrarily. If the teams are even you m...

 
Do you think i5-3450s and gtx970 would get along well?
 
@Zgarb I think I figured out a primality test: jellyfish.tryitonline.net/…
 
0
A: Sandbox for Proposed Challenges

Luis Mendocode-golf number number-theory math integer Is this number Loeschian? A positive integer k is a Loeschian number if k can be expressed as i^2 + j^2 + i*j for i, j integers. For example, the first positive Loeschian numbers are: 3 (i=j=1); 4 (i=2, j=0); 7 (i=2, j=1); 9 (i=-3, j=3); ... Note...

0
A: Sandbox for Proposed Challenges

Eamon OliveOnly Even Bytes The scenario Lately you have been noticing some strange behavior with your favorite text editor. At first it seemed that it couldn't write anything to file. However after a few tests you realized that it could write even bytes but when it attemps to write an odd byte it fails. ...

 
10:22 PM
@betseg Seems mostly good. Although the CPU is slightly underpowered for a good GPU, and you could get a much better GPU since the pascal series is out.
You could get a GTX 1060 for the same price.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ On Linux it should be Compose + - + - + -
@quartata But that's almost essential for golfing in JS :(
 
get an 20 core intel xeon at the minimum
:D
 
@RohanJhunjhunwala it's about 20*minimum wage in my country
 
> Not good for golfing I'll admit
 
10:30 PM
@quartata Whoops, didn't read
But I use it sometimes in while (foo = expresssion)
 
As someone who has no experience with Pyth, I would appreciate some help with fixing this codegolf.stackexchange.com/a/87479/55696
 
@betseg personally i love my i7 monster i think the xeon is a bit overkill
@betseg where do you live (if you don;'t mind disclosing the country)
 
Any feedback on this newly proposed challenge of mine as part 2 to my last challenge?
0
A: Sandbox for Proposed Challenges

R. KapHow many Unique Rectangles are There? code-golf So, in my last challenge, you were asked to find all rectangles given a m x n grid of them. However, it turned out to be very trivial as there actually was a mathematical formula to solve the problem that I did not even know about! So now, for a li...

 
@RohanJhunjhunwala Turkey
It's on my profile
@RohanJhunjhunwala i7 is about 1,5×minimum wage
 
@NathanMerrill So, what do you think?
0
A: Sandbox for Proposed Challenges

R. KapCount the Unique Rectangles! code-golf So, in my last challenge, you were asked to find all rectangles given a m x n grid of them. However, it turned out to be very trivial as there actually was a mathematical formula to solve the problem that I did not even know about! So now, for a little bit ...

 
10:38 PM
@R.Kap once again, it depends on the image size
 
@NathanMerrill I defined it based on a 500 x 500 pixel image.
 
right, but its simpler simply to add a line at -250 and 250
(for both X and Y)
 
@NathanMerrill Are you saying the inputs should be 4 item tuples defining each line?
 
you'd have 8 lines total
basically a list of X lines
and a list of Y lines
 
10:40 PM
That's what I'm saying the input will be.
@NathanMerrill Equations corresponding to each horizontal or vertical line.
 
[-250, -70, 70, 250] and [-250, 50, 50, 250]
should be the input
eh, it doesn't actually matter
the problems actually the same even if you switch them
 
@NathanMerrill Yeah, that's what the illustration tells you, but again, I'm looking for unique rectangles.
 
right, but, if I switch my X and Y coordinates (for my solution), I'll always end up with the same number of unique rectangles
 
So some other x lines and y lines can still result in a 3 x 3 grid, but with more unique rectangles than in the illustration shown because of different segment lengths.
 
f = -> (g) { -> (a) { g.call(a, a) } }
add = -> (a, b) { a + b }
puts f(add)(3)
test.rb:4: syntax error, unexpected '(', expecting end-of-input
puts f(add)(3)
            ^
@ven
 
10:44 PM
@NathanMerrill It will all depend on the length of segments this time. That's why I want the input to be the way it is, so it will be easier to judge segment lengths.
 
if [1,5,8,23] is my X, and [10,50,200] is my y
 
by function arguments, I mean arguments that are functions
 
0
A: Sandbox for Proposed Challenges

R. KapCount the Unique Rectangles! code-golf So, in my last challenge, you were asked to find all rectangles given a m x n grid of them. However, it turned out to be very trivial as there actually was a mathematical formula to solve the problem that I did not even know about! So now, for a little bit ...

 
I'll have N unique rectangles
however, if [10,50,200] is x, and [1,5,8,23] is y
then, I'll still have N unique rectangles
when you switch x/y coordinates your only flipping the entire rectangle, nothing more
 
@NathanMerrill But then again, if you want me to change it, then I will.
 
10:46 PM
I really think you should change it
its a weird input format, you're going to get complaints
:)
 
@NathanMerrill I see your point now. So your saying that the input should be 1 array of X lines, and another of Y lines?
 
Okay then. Be right back.
 
2
Q: Tips for golfing in Trumpscript

Rohan JhunjhunwalaDoes anyone have any tips for golfing in Trumpscript? Post one tip specific to trumpscript per answer. Note that tips that can apply generally to all languages "remove unnecessary whitespace" are discouraged. I do blieve this is not a duplicate of golfing in javascript as trumpscript is not very ...

 
Make PPCG PP again!
 
10:53 PM
@NathanMerrill What do you think now?
0
A: Sandbox for Proposed Challenges

R. KapCount the Unique Rectangles! code-golf So, in my last challenge, you were asked to find all rectangles given a m x n grid of them. However, it turned out to be very trivial as there actually was a mathematical formula to solve the problem that I did not even know about! So now, for a little bit ...

 
@NewMainPosts ಠ_ಠ No matter where I go, I see annoying politics.
2
 
@R.Kap I'd still recommend including the -250 and 250 in both of the arrays
 
@NathanMerrill Why? It seems unneeded, as we know that they are lines, so they will have infinite length.
 
because its a bit arbitrary that the square ends at those points
aka, don't have a "bounding square"
 
@NathanMerrill What do you mean? There will either be vertical or horizontal lines spanning the entire 500 by 500 pixel plane.
 
10:55 PM
define "plane"
is it the 500x500 square you've given?
 
@NathanMerrill Yes.
 
that's the arbitrary part
instead, you don't have a square, but an infinite plane
and lines at -250 and 250
 
@NathanMerrill So what would the integer limits be?
 
there aren't any
 
An what do you mean "have lines at -250 and 250"?
 
10:57 PM
ok, lets pretend that the lines go on forever, and you still have the 4 lines
(at -70, 70, -50 and 50)
you'll end up with a single square
 
@NathanMerrill Yeah, that makes sense.
 
from -70, -50 to 70,50
 
@NathanMerrill But then, what would the length of each segment be, as I show it in my illustration?
 
now, if you add additional Y lines at -250 and 250, and X lines at -250 and 250
@R.Kap there would only be 4 segments of length 140 and 100
 
@NathanMerrill Ah, I see what you mean. The input should define the bonding box.
 
10:59 PM
basically
 
So along with the lines as input, I could also input the dimensions of the bounding box.
 
no, the lines are the bounding box
(at least the outermost ones)
 
@NathanMerrill Could you propose an edit on my challenge so I can make sure I see what you mean?
@NathanMerrill Okay, I get it now. The center rectangle should define the length of all the other segments.
Basically, the center rectangle will define which rectangles are smaller than the others.
An infinite plane. I see your point.
 
@R.Kap I edited your challenge
oh, you need to define "unique"
two rectangles are considered identical if they have the same dimensions
 
@NathanMerrill I'm confused. How does -250,-70,70,250 result in 2 horizontal lines?
 
11:10 PM
er, 4 horizontal lines
and 4 vertical
my bad :)
 
@NathanMerrill So do you think it's good now?
 
yeah. I think you need more test cases
 
@NathanMerrill I'm adding some more as we speak. But the input format is better now, right?
 
oh yeah
 
@ven is there something better than array.map.with_index(0).map { |el, index| ... }?
 
11:19 PM
I'd change "find all the rectangles that are only of different lengths" to "find all the rectangles that are only of different dimensions"
 
@betseg nice avatar.
 
@ven nevermind, I found a better solution.
 
@NathanMerrill I honestly feel like my other input format was better, as it squally imposed some sort of limit on the input values. Now, the input values can be seemingly endless, which I think does not really make much sense.
Anyone else have any feedback?
0
A: Sandbox for Proposed Challenges

R. KapCount the Unique Rectangles! code-golf In my last challenge, you were asked to find all rectangles given a m x n grid of them. However, it turned out to be very trivial as there actually was a mathematical formula to solve the problem that I did not even know about! So now, for a little bit more...

 
@R.Kap you mean that you could have a line at -50000?
 
@NathanMerrill Yeah, with the way it is right now. I feel like there should be a plane of finite dimensions, so that you actually have a way to tell different segments apart from one another.
 
11:29 PM
you're right. We often indicate that numbers will fit in your language's integer
so, you can inform them of that assumption
but it makes more sense to me on an infinite plane
 
@NathanMerrill How about set the dimensions of that plane the the maximum value of the language's integer?
 
planes are, from a mathematical standpoint, infinite
I mean, you could set bounds on it, but I think you're going to confuse more people that way
but putting bounds on where the lines will occur makes sense to me
 
Actually, now that I think about it even more, it makes sense that an infinite plane is used.
 
two challenges in one day!
I think that's a record for me
 
11:44 PM
@NathanMerrill top notch challenge
 
@EᴀsᴛᴇʀʟʏIʀᴋ thanks...i guess?
 
@NathanMerrill "Retina generates hexagons from a string of text using the following steps" s/Retina/Hexagony/ or am I misunderstanding?
 
er, thanks
 
3
Q: HexaRegex: A Tribute to Martin Ender

Nathan MerrillMartin Ender recently hit 100K, and has come up with some pretty awesome languages. We're going to have a bit of fun with one of them, Hexagony (and a bit of regex for Retina) As a brief overview, you need to write a program that inputs a Hexagony grid and determines if there is a path on that ...

5
 
@MartinEnder happy 100K! ^
2
 

« first day (2012 days earlier)      last day (2829 days later) »