frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Ask HN: What toolchains are people using for desktop app development in 2025?

45•lincoln20xx•4h ago•52 comments

ChatGPT 5 is slow and no better than 4

26•iwontberude•3h ago•22 comments

Ask HN: How can ChatGPT serve 700M users when I can't run one GPT-4 locally?

494•superasn•1d ago•322 comments

Ask HN: OpenAI GPT-5 API seems to be significantly slower – is this expected?

4•tlogan•2h ago•3 comments

Ask HN: In which programming language is it better to make your own language?

7•Forgret•6h ago•15 comments

Why Boring Businesses Outlast AI Hype Cycles

3•Taikhoom10•4h ago•1 comments

Ask HN: How do you find honest tech reviews?

7•bjourne•4h ago•4 comments

Ask HN: What trick of the trade took you too long to learn?

373•unsupp0rted•5d ago•647 comments

Exposing Satcom in the Sky: Aircraft Systems Vulnerable to Remote Attacks

2•hacker_might•8h ago•0 comments

Countries with most GPT-5 users, esp. in advanced computation and reasoning?

2•mzk_pi•8h ago•1 comments

Tell HN: Chrome and Spotify dropping support for macOS11

8•Kalanos•8h ago•6 comments

Ask HN: Has any of the Pivotal Tracker replacement attempts succeeded?

44•admissionsguy•5d ago•34 comments

Tell HN: Anthropic expires paid credits after a year

270•maytc•4d ago•135 comments

Ask HN: Claude Code vs. Codex vs. GitHub Coding Agent?

2•endorphine•11h ago•1 comments

Ask HN: How would you build second brain in the AI era?

8•divan•1d ago•4 comments

ChatGPT-5 Can't Do Basic Math

14•MarcellusDrum•1d ago•11 comments

GPT-5 streaming requires submission of biometric data

29•binarymax•1d ago•7 comments

Ask HN: Are you running local LLMs? What are your key use cases?

12•briansun•1d ago•12 comments

Ask HN: What do you dislike about ChatGPT and what needs improving?

32•zyruh•3d ago•123 comments

Ask HN: What are you working on this weekend?

10•lagniappe•12h ago•15 comments

Tell HN: Charles Irby has passed away

30•steven123•2d ago•4 comments

Ask HN: Should brain implants be available for everyone as a productivity boost?

2•amichail•23h ago•4 comments

Ask HN: Which processor to pick for learning assembly?

8•shivajikobardan•1d ago•7 comments

White Paper: Contribution-Based Governance for Developer Communities

4•ff12wq111•1d ago•2 comments

Ask HN: Recommendations for specification management software?

7•gusmally•1d ago•1 comments

What's Your Favorite LLM –and Why?

5•zyruh•22h ago•3 comments

Ask HN: Why Did Mercurial Die?:(

29•sergiotapia•4d ago•32 comments

Tell HN: Thing I learned this year was keeping a work journal

11•Muromec•1d ago•7 comments

Flycrypto – Book Flights and Hotels with Bitcoin and Crypto

3•flycrypto•1d ago•3 comments

Ask HN: What change enabled you to consistently finish your side projects?

49•pillefitz•5d ago•39 comments
Open in hackernews

Ask HN: In which programming language is it better to make your own language?

7•Forgret•6h ago
I decided to create my own programming language but I don't know which one to use, some say Python, others say C.

Please help me decide.

Comments

thesuperbigfrog•6h ago
Prototype in Python with PLY (https://github.com/dabeaz/ply) or you could try Raku (https://raku.org/) which has nice functionality for building grammars.

After you know what you want to build, you could convert it to C, C++, or Rust to make it fast.

Forgret•6h ago
Thanks, that sounds interesting, I'll try to find out more information about it, and maybe use your advice.
wslh•5h ago
Well, ANTLR[0] includes many programming language targets. I can also recommend OMeta [1] for quick prototyping. Other developers has implemented it in JS, .NET, etc. I just found Panini[2] in Rust but I am sure you can find others[3].

[0] https://www.antlr.org/

[1] https://en.wikipedia.org/wiki/OMeta

[2] https://github.com/pczarn/panini

[3] https://github.com/topics/parser

Forgret•4h ago
Thank you, for these materials you have helped me a lot to understand everything better.
sloaken•21m ago
A number of years ago I tried Antlr and could not get it to work. Now I see the have a 'Hello world' equivalence. So I am excited to try it again.

Thanks for posting.

john-h-k•4h ago
OCaml
ForceBru•4h ago
Some years ago I used the Python library Lark (https://github.com/lark-parser/lark) to parse my programming language. It lets you write your grammar in basically EBNF, builds parse trees (that you can automatically reduce by removing leaves for parentheses, for example) and generates standalone pure-Python LALR(1) parsers for your grammar. Back then, I had a blast with it, it was fast, super easy to use and just worked. Now it's got 5k stars and seems to be a mature and production-ready library.

Thus, I vote Python: it has this amazing parser library, it's garbage-collected (no need to fiddle with memory allocations, like in C), it's dynamically typed (so you basically don't need to think about types at all), it now has a `match` statement (!) that makes it super easy to dissect your parse trees and abstract syntax trees.

Forgret•4h ago
Hmm, sounds appealing, and I agree, C is still pretty complicated and the slow speed of the program is not that critical, in exchange for this wonderful library that will save me a lot of time, unlike C.
stargrazer•4h ago
Use C++ with one of the following:

Boost.Spirit https://www.boost.org/library/latest/spirit/ Boost.Parser https://www.boost.org/library/latest/parser/ (which I think succeeds Boost.Spirit Boost.Metaparse: https://www.boost.org/doc/libs/latest/doc/html/metaparse.htm...

All of these allow you to build a parser using C++ syntax and then add semantic or composed actions.

jokoon•3h ago
I used lexy, which is a great C++ parser combinator.

I then used python match syntax to convert my ast to C.

twosdai•3h ago
This doesn't answer your question. But it would be an interesting project to try and make a programming language where you as the dev only and solely use an llm to do all the work.

So then you could say it was programmed in english*

*Or whatever human language you want.

mikewarot•3h ago
If you're doing a compiled language, you'll end up having to interface to LLVM, or write your own output in assembler or ELF or Win32 EXE files. LLVM has been hooked up to almost every compiled language you'll need. They're even figuring out how to hook it up to Free Pascal.

If you're doing an interpreted language, things get a lot looser. If you've done any programming in the past, it's likely the language you're most familiar with will work ok.

Jtsummers•2h ago
The language mostly doesn't matter. There may be some benefits to some over others, but none are definitively better than all the others. The ML family languages with their rich type system and pattern matching can make some parts of interpreter/compiler building very straightforward, for instance, but they aren't the only languages with those features and other languages have comparable features or idioms. Some languages are going to force you to do more bookkeeping, like C, so you have to decide if it's worth the trouble for your circumstances.

I'd recommend selecting a language you already know well, a language you also want to learn, or a language with libraries (or good bindings to libraries) that you want to take advantage of. If you want to make a compiler but don't want to do code generation (to machine code) yourself you may want to use a language with good LLVM bindings to get support for a lot of target platforms. If you're interested in making an interpreter, you may want to consider the libraries available to the host language. An interpreter implemented in Python gives you a chance to use Python libraries in your new language (same argument for other languages, the decision would be based on what libraries you might want to use).

tompark•1h ago
As mentioned elsewhere here, Ocaml and the ML family are often cited as easy to implement other languages, due to pattern matching, enum variants, sum types, etc. Since newer languages like Rust and Swift copied those features, you might be more interested in them since they're more popular than older ones like Ocaml and Haskell. Personally I like the syntax sugar in Swift.

Also I found it useful to compare other people's implementations to get a feel for different approaches. See this suggestion: https://news.ycombinator.com/item?id=28479120

markus_zhang•58m ago
Just use the one you are most familiar with. All of them are OK unless it is something very esoteric.