A few hours spent with Perl in order to write a simple text server. It does just that: it serves text, and it allows you to change text because I think the read/write web is important. In a way it's a bit like without menus. You can have link extraction in the client, I think!

As this is basically just text files, and since @solderpunk's gopher client VF-1 allows us to extract URLs in text files in order to create a temporary menu, we can already use VF-1 to navigate site consisting of nothing but interlinked, simple text files. For now, the only URL scheme we can use is the Gopher URLs with a prepended 0 item type (for text files), but who cares? At least for now, this is good enough.

So now I’m thinking: I should get a better client for my mobile devices. Then I think I could write my own. Hm, the simplest would be a wrapper for some JavaScript, perhaps? Then again, I could just prototype it as a web page? And now I’m thinking: for this phone, I’m going to run a native app that runs a browser that runs a web app to look at crummy gopher text files. This is what’s wrong with us, today! This is in fact easier than building a native iOS app. πŸ˜­πŸ™ˆπŸ’©πŸ˜ž


Oh no, now I'm thinking about finding a cool language that compiles to Javascript in order to write a Gopher client for the web! But what to use? I like Emacs Lisp, if that's any help. πŸ˜„ I wasn't too happy with Clojure an ClojureScript when I tried it. Too much engineering required to get it to work, horrible error messages. Perhaps it got better.
Anyway, do you have recommendations, experiences?

Β· Web Β· 10 Β· 1 Β· 1

I was shown a tutorial for implementing something in Rust and generating WebAssembly. rustwasm.github.io/book/game-o
Now I'm looking at this "list of languages that currently compile to or have their VMs in WebAssembly(wasm)"
Intriguing! And I feel sad for the many unpopular languages with descriptions like "… is a general-purpose programming language designed for robustness, optimality, and maintainability." Like all of them, initially, hopefully.

Why did it take me a lunch break to realize that writing a Gopher client as a client-side web app cannot work? All these apps run inside the browser sandbox: Javascript, WebAssembly, and any other language that compiles to them – same limitation. All you have are WebSockets, and they are not the same as TCP sockets. And thus, no connecting from browsers to regular gopher servers! 😭
So now that I know this will require server-side code, I might as well use Perl 5. 😜

OK, here's a simple web app in Perl 5. πŸ˜ƒ
This is not a full gopher client. You could say it's "only gopher text files" plus some Markdown and link processing. Thus, as long as there are URLs in those text files, these links should work. If those links go to a Gopher menu, however, it doesn't work any more. Only text files!

Yikes, I had to take it down! And I have no time to fix is, as I need to prepare some *very important sewers* for my RPG friends… some other day!


Biwascheme is fun to toy with but is extremely slow. (Not a super useful info but that's all I know! :-)

@kensanata If you like lisp and want to do a web thing... have you considered writing WASM directly? :)
The "readable" form is lispy.

@cathal Hahaha, now there's a thought! Perhaps I should just write in whatever and find a to-wasm thing!

@kensanata what's the point of using gopher if it's still in a JS-ridden web browser?

@Wolf480pl I want to read gopher on my iOS devies. What's the quickest way to get anything done on a phone? I think it's a web app. What would you do?

@kensanata I'd stop m having an iOS device, or stop wanting to read gopher on a defective device like that. But I guess I'm weird.

@kensanata coffeescript is pretty fun, but a bit "magical" language. If you like elisp, why not trying commonlisp for a change? I've heard they are pretty close :D

@alexcleac Remember that I need a programming language that produces a web app at the end. Are you recommending EdgeLisp, Parenscript, or JSCL?


@kensanata you want to have a server-side web app or a client-side web app?

@alexcleac I would prefer a client-side web app in order to avoid my server acting as a proxy for all requests.

@kensanata yeah, then commonlisp and much others are not applicable to you.

I would recommend you trying Kotlin/scala.js if you want it to be statically typed and possible to place on server as productive as possible too. Otherwise, I strongly recommend you to use the javascript itself, because most of things coffescript gives to you is already inside js.

@kensanata I have used Scheme2js in the past. See www-sop.inria.fr/indes/scheme2 for old versions. Newer versions have been integrated into HOP hop.inria.fr/. Needs a JDK to run, though.

@alexshendi Sadly, Java and JDK are a no-go for me because it reminds me of my day job! πŸ˜†

@kensanata Actually you don't need a JDK, just an JRE for the binary version. Alternatively you can try to compile it to machine code via C, but you will have to tinker with the source code to make it work with current versions of bigloo.

@kensanata Chicken Scheme with Spock looks cool, I never tried it myself though wiki.call-cc.org/eggref/4/spoc

Or something with WebAssembly?

@julienxx "something with WebAssembly" sounds intriguing, but I wonder where I'd learn more.

@kensanata #clojure error messages have gotten a lot better recently.

Re: the engineering part, I guess this was mostly #cljs related. I'm not writing any Clojurescript these days, so I don't know whether the situation has improved.

@schaueho @kensanata error messages are a lot better for both nowadays, with ClojureScript you'll get a pop up right in the browser with the line that caused the error. Getting up and running is very straight forward as well github.com/ClojureTO/JS-Worksh

@kensanata AFAIK #fennel can be trasnpiled to JS... It's a fun Lisp dialect with Clojure flavour syntax based on Lua: fennel-lang.org/

@mdallastella I am interested in this! So write fennel code, fennel --compile to lua, and use fengari to run lua in the browser?
It sounds like hell: very hot! πŸ˜ƒ

@mdallastella I tried for a while to get things going but I realized that I don't understand how I'm supposed to write the web app using fennel, lua, and fengari. All I managed to do was print stuff to the console. πŸ˜”

@kensanata Fennel community is pretty small and there's not a lot of documentation at the moment... I agree that is hard to start something with it today... πŸ˜”

@kensanata @mdallastella you can precompile the Fennel to Lua but you don't have to; you can also run the Fennel compiler in Fengari.

But it might be easier to do a Fennel web app by doing it server-side in OpenResty instead.

@kensanata for the horrific thing I was working on I was planning on using electron. It can do tcp sockets in theory

@tomasino Haha! Well, for my laptop I'd probably be writing either some Python command-line tool like VF-1 (using some other Macross-themed name, I guess), or an Emacs mode… But for my phone, I need something that I can access with a browser. :sadglasses:


Sign in to participate in the conversation

Octodon is a nice general purpose instance. more