HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
fusiongyro
dailyprogrammer
Prolog2018–2018
fusiongyro / dailyprogrammer

dailyprogrammer

Discover this repository through its Hacker News conversations.

2Distinct people
2Mentions
0Explicit recommenders
4GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A public description has not been verified.

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week2 dated mentions

Observed mentions: 2018-08-02 20:52:54 UTC to 2018-09-14 02:46:46 UTC. Weeks start Monday, UTC.

012018-07-30 00:00:00 UTC to 2018-08-06 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 302018-08-06 00:00:00 UTC to 2018-08-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-08-13 00:00:00 UTC to 2018-08-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-08-20 00:00:00 UTC to 2018-08-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 202018-08-27 00:00:00 UTC to 2018-09-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-09-03 00:00:00 UTC to 2018-09-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-09-10 00:00:00 UTC to 2018-09-17 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsSep 10

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 302018-07-30 00:00:00 UTC2018-08-06 00:00:00 UTC101
Aug 62018-08-06 00:00:00 UTC2018-08-13 00:00:00 UTC000
Aug 132018-08-13 00:00:00 UTC2018-08-20 00:00:00 UTC000
Aug 202018-08-20 00:00:00 UTC2018-08-27 00:00:00 UTC000
Aug 272018-08-27 00:00:00 UTC2018-09-03 00:00:00 UTC000
Sep 32018-09-03 00:00:00 UTC2018-09-10 00:00:00 UTC000
Sep 102018-09-10 00:00:00 UTC2018-09-17 00:00:00 UTC101

What Hacker News says

2 sources
This is going to sound "out of left field" perhaps, but use Prolog. I've been exploring exactly this, compiling with Prolog, this past month or so and I'm simply blown away. It's so simple, elegant, and easy. It will be faster and easier for you to learn the basics of Prolog and then learn how to write compilers using it, than to learn to write compilers in another language (even a language you already know.) Prolog is an extremely simple language despite its incredible power. It's very different from imperative/functional languages so it might take a minute to wrap your head around it, but then you're operating on a higher plane. Read "Logic Programming and Compiler Writing " by David Warren http://sovietov.com/tmp/warren1980.pdf But beware: it's dated. Or, if you can get a copy of "The Art of Prolog" you can read Chapter 24, which
Read the rest
covers the same concepts but has more modern code. Specifically, you're going to want to use Definite Clause Grammars (DCG): https://en.wikipedia.org/wiki/Definite_clause_grammar http://www.pathwayslms.com/swipltuts/dcg/index.html https://www.metalevel.at/prolog/dcg http://www.amzi.com/manuals/amzi/pro/ref_dcg.htm Study "Toy compiler in Prolog" http://faculty.cooper.edu/smyth/cs225/ch7/prolog.htm And maybe this: https://github.com/fusiongyro/dailyprogrammer/tree/master/20... I can vouch for this. I wrote a parser for Oberon in two days. I wrote an assembler for the RISC CPU used in Project Oberon in another two days. Both of them are no longer than two pages and the code is essentially just grammar rules. I haven't (yet) written the bit in-between that translates the AST from the parser into assembly code for the chip, but only because I have other fish to fry. But I can see how to do it and it would be very easy. The compiler is described in the Project Oberon book if you want to attempt that language. I'm implementing a compiler for Joy on top of the assembler and it's been like a dream. Because the code is so simple, and the editor I'm using has an extension that uses the Prolog interpreter to lint as I go, it's actually hard to introduce bugs. I write the asm code then abstract patterns into the compiler to refactor and (lightly) abstract the raw asm into what are effectively AST nodes. But there is no language above this. I think I have to write a blog post called "Compiler for No Language" or something. Eventually, I am going to abstract my way to "atomic" nodes that represent Joy functions and then I'll have a Joy compiler. But in the meantime, I'm floating around in a semantic sea between parsing and assembly, and it's warm and tropical and you would not believe the fish I've seen. I have to conclude that anyone who is writing any sort of compiler and NOT using Prolog is working way too hard. I've been programming in Python for twenty years, happy as a clam, and now you couldn't pay me enough to NOT use Prolog. "These are the words of VAL. They are true. Hear them."
In Ask HN: What's a starting point for learning how to write programming languages?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.