[HN Gopher] Porth, It's Like Forth but in Python
___________________________________________________________________
Porth, It's Like Forth but in Python
Author : Alifatisk
Score : 89 points
Date : 2023-01-15 12:45 UTC (10 hours ago)
(HTM) web link (gitlab.com)
(TXT) w3m dump (gitlab.com)
| [deleted]
| jammycrisp wrote:
| There's also https://github.com/llllllllll/phorth, an
| implementation of forth that compiles to cpython bytecode
| [deleted]
| rabf wrote:
| https://youtube.com/playlist?list=PLpM-Dvs8t0VbMZA7wW9aR3EtB...
|
| Playlist of this being created.
| [deleted]
| ZiiS wrote:
| I am missing the python? This seems self hosting,
| throwaway17_17 wrote:
| In Tsoding's streams Porth started out hosted via Python before
| he eventually wrote Porth in Porth.
| oh_sigh wrote:
| I'd like to know more about "certain individuals trying to
| disrupt the language design process" alluded to in the readme.
| cfuendev wrote:
| I think it was basically this dude building an LLVM compiler
| for Porth, which made Porth's creator (Tsoding Daily)
| uncomfortable because he felt like he was on a race to see who
| made his own unfinished language better. He says individuals
| with an "s", so I'm not sure who else he might be talking
| about, but I remember this LLVM person being the big shocking
| reason why he initially closed the source code.
|
| As far as I remember, the LLVM dude apologized in a public
| comment on the same video where Tsoding complained about this,
| claiming he was closing the LLVM repo and explaining it was
| just a toy project he made to understand LLVM better that got
| some attention.
| stjo wrote:
| This is quite stupid in my opinion. I don't see how you
| "help" the language discouraging others from
| forking/improving the project.
| gaetgu wrote:
| While I agree, I can also see where the creator is coming
| from here. He is working on making his _very_ unfinished
| language, and someone else comes and starts making an
| optimized LLVM version of it. The creator certainly doesn
| 't want the language to always look like it does today--
| after all, he is still actively working on it, adding new
| features every week. But he is afraid that the LLVM version
| will be so much better that people will use that instead of
| his work-in-progress compiler, and so they will be stuck
| with an old version of his language.
|
| I think he should have handled it better. Maybe explaining
| _why_ he didn 't want a fork (he may have done this, I
| haven't watched his porth series specifically), and maybe
| asking the guy to put out something in his README.
| mshockwave wrote:
| I don't agree at all. Unless the author enforces it with
| license or some legal means and/or the LLVM version
| author was rude, this is how competition works in a good
| way. And to be fair, performance is not the only reason
| people pick between different implementations. A good
| example being CPython: there are plenty of JIT-enabled
| python in the wild but I don't see people turn away from
| CPython
| jrochkind1 wrote:
| Freezing the public version while continuing to work on
| it in private but not allowing anyone to see what you're
| working on... doesn't seem to me _less_ likely to create
| a fork...
|
| Either people are going to stop paying attention to it
| entirely (is that a desired outcome?), or they're going
| to mess with what's public, right?
| avgcorrection wrote:
| This is what can happen when you design and implement
| things in the open. And it's completely fair for it to
| happen as long as the design is open source. (Can it even
| be closed source...?)
|
| But the author responded by temporarily closing it to the
| public. Which is also OK. He clearly didn't want to deal
| with the consequences of openness.
| IshKebab wrote:
| I don't think you can say "completely fair" just because
| it's legal. Fairness invokes morality which is often
| something stricter than the law.
| avgcorrection wrote:
| Yes. I guess I am talking about moral fairness as well.
|
| When you design something in the open then it is... out
| in the open. That's the default in our software culture.
| canadianfella wrote:
| [dead]
| Alifatisk wrote:
| Yeah that stuck with me as well.
| omgmajk wrote:
| The youtube series is quite good for this, especially the first
| few episodes where he uses NASM to compile from Python instead of
| compiling Porth with Porth.
| guessbest wrote:
| I like this HN pivot from rust to forth.
| [deleted]
| DonHopkins wrote:
| Not to be confused with Forthon.
| timbit42 wrote:
| So a Python interpreter implemented in Forth?
|
| That reminds me of some code I came across one time which was a
| BASIC implemented in Forth. It was less than 100 lines of code,
| which I thought was impressive.
| lebuffon wrote:
| I believe the first version of that interpreter was written
| by Charles Moore himself. "Lines" in Forth are rather fluid
| but I have a version here that is 154 lines when formatted as
| a text file rather than 1K disk blocks.
| [deleted]
| 6177c40f wrote:
| I read that initially as "Forthtran" and I can't tell if that
| sounds like a good idea or an awful one
| throwaway17_17 wrote:
| A compiled, number crunching dialect of Forth with a very
| good vocabulary (and the accompanying semantics) for
| n-dimensions matrix calculations sounds pretty neat. I'm
| surprised no one jumped in with a an APL reference, however
| there are some significant differences between an array
| processing language and a concatenative language with Fortran
| semantics.
| Alifatisk wrote:
| He moved the development from Github to Gitlab
___________________________________________________________________
(page generated 2023-01-15 23:01 UTC)