12:33 AM
0

Advent calendar Let's build an advent Calendar for this Christmas! Many Advent calendars for children take the form of a large rectangular card with numbered windows for each day of December staeting from 1 and leading up to and including Christmas Eve (25). Windows are distributed across the c...

0

Let's build an advent Calendar for this Christmas! Many Advent calendars for children take the form of a large rectangular card with numbered windows for each day of December staeting from 1 and leading up to and including Christmas Eve (25). Windows are distributed across the calendar at a rand...

3 hours later…
3:47 AM
1

Sandbox What is Hexagonification™? Hexagonification™ is a transformation that creates a hexagon with 3 copies of a rectangle block, each skewed to the right by 30 degrees and then rotated by 0, 120 and 240 degrees respectively, as shown in the following image. A triangle hole may appear in the ...

4 hours later…
8:09 AM
0

Make an APL parser code-golf arithmetic string In this task, given an infix expression, fill in all of the implicit inputs. (You only need to deal with (+, -, and ().) Expressions are only allowed to be dyadic and not monadic. If an operator is monadic, prepend an input. What do I do? The rul...

7 hours later…
2:43 PM
92

This is a code golf challenge I thought of with a mathematical bent. The challenge is to write the shortest code possible such that it is an open question whether or not the code terminates. An example of what I mean could be the following piece of python code, adapted from an anwser to this cs s...

1 hour later…
3:50 PM
in Primes and Squares, 1 hour ago, by flawr
Is there any food that uses (popped) pop corn as an ingredient? (where you don't just eat the popcorn by itself)

4:14 PM
A good rule of thumb is "can you make it into flour?" – if so, you can make it into bread.

@wizzwizz4 hm interesting
What about a dish that does not including blending the popcorn? :)

Mix with melted chocolate, put in cupcake cases and freeze?

@flawr there's a commercial product called Snack-A-Jacks that's like a popped rice cake but includes popcorn as well?

haha, that sounds fun:)
@Neil oh also interesting!

2 hours later…
6:52 PM
Oh hi @DJMcMayhem. I ha a question
How does one go about creating a programming language? I assume you'd need one to create one.
I program too, but I don't understand this

By and large, the vast majority of programming languages do three things: 1) parse instructions, 2) store data in memory, and 3) modify that data by following the instructions.

@ThePuzzlingPlatypus I'm not DJ, but I have made more languages than most people here :P Not that all of them are very interesting :P

@cairdcoinheringaahing More than me certainly

I don't care who answers, but I've never understood this

Wait, have you done any of this year's Advent of Code problems?

6:55 PM
Basically, you write a program which reads a file and uses the data in that file to manipulate a memory model

@ThePuzzlingPlatypus It helps if you simplify what you think of as "a language". Like, you could make a language where there's a bunch of semicolons in a row, and then you print that number

@DJMcMayhem that probably exists

@DJMcMayhem That rings a bell :P

For sure

I saw this video that made a primitive computer out of a Magic the Gathering deck
google "Magic the Gathering is Turing Complete"

6:58 PM
Anyway, writing an interpreter for a very simple language (brain-flak or brainfuck are perfect) is a good starting point

How are those simple?
WEren't that they called that for a reason?

Like caird and El said, it's mostly parsing instructions that modify a data model
@ThePuzzlingPlatypus Simple to code, difficult to code in

@ThePuzzlingPlatypus They are hard to program in, not hard to interpret.
Ninja'd

I haven't been programming as long as you guys. A little in college, and now it's my job
My original plan was physics
2 years professionally so far

@ThePuzzlingPlatypus Which language(s) do you use now?

7:00 PM
Brainflak is surprisingly difficult to make an interpreter for

VBA, I'm doing database stuff

Although they're not really necessarily hard to code in either. They're just hard to to write something non-trivial

I used MATLAB in college, but forgot how to use it

Which is directly because they're easier to interpret. Less instructions

I know a little Java though

7:01 PM
Choose the language you find the easiest to code in

I didn't say I wanted to create my own language; I just wanted to know how that worked

It's harder when it comes to "real" languages. Things like lexers are hard for me to understand.
I can understand what they accomplish of course, it's just hard to understand the right way to make one

lexers? I don't know what that means

In computer science, lexical analysis, lexing or tokenization is the process of converting a sequence of characters (such as in a computer program or web page) into a sequence of tokens (strings with an assigned and thus identified meaning). A program that performs lexical analysis may be termed a lexer, tokenizer, or scanner, though scanner is also a term for the first stage of a lexer. A lexer is generally combined with a parser, which together analyze the syntax of programming languages, web pages, and so forth. == Applications == A lexer forms the first phase of a compiler frontend in modern...

7:09 PM
if you do decide to make a language, I'd recommend single character tokens/commands the first time

I probably won't
You up for codenames, @DJMcMayhem

Could just write an interpreter for BF. Shouldn't take more than an hour or so.

Gotta go, playing codenames

Why write a Hello, World! program when you can write a BF interpreter? :P

@ThePuzzlingPlatypus not right now

7:20 PM
that's fine

2 hours later…
9:34 PM
0

Output the von Neumann Ordinal The task is simple: given a number, output its von Neumann ordinal in the following format: 0 -> {} 1 -> {{}} 2 -> {{},{{}}} 3 -> {{},{{}},{{},{{}}}} ... I'm sure this must have been asked before, but I can't seem to find the challenge - maybe I'm using the w...