Search
Thursday, 22nd of September 2022, 6:56:01 UTC
12:36:23
hamza
There are constant power outages every few hours where I live.
12:36:37
hamza
What became of: http://ix.io/4b3D ?
12:37:51
hamza
I wanted to call a lisp function on a click of a button.
12:37:56
hamza
However I wasn't able to do that.
12:38:30
hamza
I tried using define-api, lquery and r-clip too.
12:41:29
Colleen
<shinmera> https://irclog.tymoon.eu/libera/#shirakumo?around=1663778258#1663778258
12:42:02
hamza
It says: "The Site Could Not Be Found
12:42:03
hamza
We don't know what to deliver on this page. Are you sure the URL is correct and up-to-date?"
12:42:34
Colleen
<shinmera> oh. what the heck
12:42:41
Colleen
<shinmera> oohh. cause it didn't encode the #
12:42:41
hamza
Also, Your paste website works now.
12:42:52
hamza
https://plaster.tymoon.eu/view/3441#3441
12:42:52
Colleen
<shinmera> https://irclog.tymoon.eu/libera/shirakumo?around=1663778258#1663778258
12:45:18
hamza
Is there a good frontend framework like Vue or Svelte in Common Lisp?
12:45:40
Colleen
<shinmera> common lisp does not run in the browser, so there cannot be by definition.
12:45:46
hamza
For Context: Svelte is a lot like Vue, however it compiles to raw HTML CSS and JS
12:46:08
Colleen
<shinmera> there is parenscript, which compiles a subset of common lisp to javascript, but I have never used it.
12:46:32
hamza
Would you suggest I just stick to javascript :()
12:47:10
Colleen
<shinmera> i don't know what you want to do, so I can't say. I always write my things without any javascript first, and then add whatever flavour or conveniencie with js on top.
12:47:45
hamza
Okay, This is a really big project, the back and front is going to be very huge (atleast from what I planned)
12:48:03
hamza
And It is going to be a Learning Management System for Schools
12:48:45
hamza
Since I am mostly going to write this alone. I would want to use something I am quicker at using and have motivation to code in...
12:49:37
Colleen
<shinmera> I've written a lot of webapps with radiance is all I can say.
12:49:37
hamza
My alternate plan is to use the compiled svelte code, and use those html and css files as input to Radiance.
12:49:58
hamza
Shinmera: I WILL use Radiance for the backend
12:50:04
hamza
There is no doubt in that.
12:50:44
hamza
However, I want to search for a good frontend framework, you told me that there are compilers for Common Lisp to JS
12:50:59
hamza
So I am just asking you for advice.
12:51:04
Colleen
<shinmera> I haven't used any. I've only ever written plain ole js.
12:51:37
Colleen
<shinmera> well, I did use Vue for the chat client thingy, since that didn't have a backend. I enjoyed some of that
12:52:13
hamza
You think I should do the project in Svelte/Vue + Radiance then?
12:52:22
Colleen
<shinmera> I have no idea.
12:52:45
Colleen
<shinmera> As I said, I typically think about JS after I've done everything else.
12:53:23
hamza
However, you do still need to think of JS at some point right?
12:53:37
Colleen
<shinmera> eh. a lot of the apps do fine without any.
12:54:14
hamza
Okay, so let's suppose I want to make that button example:
12:54:24
hamza
https://codesandbox.io/s/svelte?file=/Button.svelte
12:54:38
hamza
How would I do that without JS?
12:55:09
Colleen
<shinmera> you send the counter to the server with a get/post parameter.
12:55:19
Colleen
<shinmera> server renders new page using new counter value
12:55:38
Colleen
<shinmera> optionally server stores counter so it persists
12:56:01
hamza
So, on click it would auto update without refresh?
12:56:14
Colleen
<shinmera> it would not, no. to do that you would need js.
12:57:04
hamza
Thanks a lot Shinmera! Will look at a few more things and will get back to you on what I have decided!
12:57:22
Colleen
<shinmera> have a look at the lengthy tutorial linked from the radiance docs.
12:57:31
Colleen
<shinmera> that shows the typical development cycle intended for the framework.
12:57:39
hamza
Yeah, I was following that.
12:57:51
hamza
I made the plaster website till annotations and all that.
12:58:19
hamza
It was very cool. However something is bugging me about using JQuery, or LQuery.
12:58:33
hamza
I know 80% of websites still use it.
12:59:42
Colleen
<shinmera> it doesn't use any jquery
13:00:01
hamza
Isn't LQuery like JQuery?
13:00:13
Colleen
<shinmera> it's modelled after jquery but it's a server side thing.
13:00:29
Colleen
<shinmera> it works fine for what it's meant to do, which is to modify a DOM quickly.
13:00:34
hamza
So it's still pure HTML and CSS?
13:00:58
Colleen
<shinmera> in part 6 you add some js to add syntax highlighting to the editor.
13:01:28
hamza
I mean, you know what I mean.
13:01:38
hamza
Like the project, not you.
13:01:50
Colleen
<shinmera> Nothing wrong either way.
13:02:53
hamza
I was wondering How I would go about combining the Server side with the Frontend.
13:03:01
hamza
You seem to do it with LQuery.
13:03:26
hamza
However, If I am using let's suppose, Vue or React. How would I send an api request?
13:03:49
Colleen
<shinmera> lquery doesn't do anything on the frontend. it's used on the server when the page is rendered.
13:03:50
hamza
Or Fetch data from a database which is handled by the backend.
13:04:22
hamza
shinmera: Oh yeah, sorry, however, my question still stands.
13:04:27
Colleen
<shinmera> you get the data using a standard ajax request to an API endpoint you define.
13:04:51
Colleen
<shinmera> for instance Studio has an infinite scroll implementation.
13:05:39
Colleen
<shinmera> https://github.com/Shirakumo/studio
13:07:49
hamza
Okay, this is interesting.
13:08:00
hamza
That was probably a newbie question since I am a newbie in Web Dev
13:08:38
Colleen
<shinmera> I think the proliferation of JS in general has confused things greatly.
13:09:10
Colleen
<shinmera> back when I started out JS was still seen as one of those things you can't rely on because people might have it blocked or use a browser that doesn't support it well.
13:09:28
hamza
Wow. No concept of that anymore.
13:09:52
Colleen
<shinmera> yeah. I still write my sites so they're completely usable without js though. It's a fun challenge :)
13:10:01
hamza
I wish we could just reinvent the web to be more simple.
13:10:02
Colleen
<shinmera> (and I don't particularly enjoy writing js, so all fine by me)
13:10:15
hamza
Shinmera: Wow, that's quite a challenge.
13:11:13
hamza
You think it is possible to have an alternate stripped down site for No JS?
13:11:21
hamza
Or is that just a waste of time
13:11:57
Colleen
<shinmera> well as I said, all of my sites work that way. JS is just a layer of convenience on top. Like fetching stuff automatically instead of requiring a button click. Making some of the visualisations more nice. things like that.
13:11:59
hamza
Since 99% of my target audience doesn't even know what JS ...
13:13:17
hamza
What about things like GraphQL?
13:13:44
Colleen
<shinmera> graphql is an over-engineered mess. I tried to write a client/server library for that like five times and gave up every time
13:14:19
Colleen
<shinmera> REST apis also suck because they're not standardised nor discoverable
13:14:26
Colleen
<shinmera> but at least they're simple to interface with.
13:15:23
hamza
I never really understood what a REST API even is.
13:15:53
Colleen
<shinmera> A REST api is just "here are some urls and parameters for the urls that'll do some stuff when you request it."
13:16:25
Colleen
<shinmera> typically it'll also return data encoded in json or something instead of an html website.
13:17:17
hamza
Isn't that basically Radiance?
13:17:26
Colleen
<shinmera> it's part of what radiance does
13:17:29
Colleen
<shinmera> with define-api
13:17:47
hamza
So then why don't you like them?
13:17:59
Colleen
<shinmera> well as I said, it's not a standard
13:18:08
Colleen
<shinmera> naming conventions across the web differ wildly
13:18:25
Colleen
<shinmera> there's no way to programmatically "discover" what endpoints there are, what parameters and types it requires, etc.
13:18:28
hamza
by standardized you mean like /api/random/bs or /random/bs/api/endpoint/lolcat
13:18:55
Colleen
<shinmera> so writing a client for a REST service is always a lot of manual work of reading their docs, hoping they're accurat, and manually writing the endpoint wrappers.
13:19:01
hamza
I was thinking about that a day or two ago.
13:19:26
hamza
shinmera: What is your solution to that non-standardization?
13:19:32
Colleen
<shinmera> I don't have one
13:19:49
Colleen
<shinmera> I think there's some attempts at standardising the discovery part at least but I've never bothered to look into it.
13:20:16
hamza
Atleast you have a naming convention \_:)_/
13:20:29
Colleen
<shinmera> I guess, yeah.
13:23:33
hamza
Yeah, I think Common Lisp to Javscript Compilers are just a mess. I think I will stick to the more organized and well-known JS frontend frameworks with Radiance and interact with them with endpoints. After all, how much JS can it be? It's just a frontend.
13:24:16
Colleen
<shinmera> sounds good to me :)
13:24:42
hamza
You always solve any problems I am facing.
13:25:03
Colleen
<shinmera> I feel like you're forgetting a lot of problems there
13:25:06
hamza
And I am grateful for that.
13:25:20
hamza
However, It was the big one
13:25:33
hamza
It's not like I can't come here again, right?
13:25:42
Colleen
<shinmera> it's an open channel
13:25:53
Colleen
<shinmera> can also just stick around :shrug:
13:26:20
hamza
That would be Ideal, but you know, power outages and all that.
13:26:29
hamza
You must be wondering where I live.e
13:26:30
Colleen
<shinmera> where are you at?
13:26:48
Colleen
<shinmera> Ah, I see. Best of luck.
13:27:14
hamza
Until then, I am here with you.
13:27:39
hamza
Also, what problems did you have in mind when you said that I was forgetting a lot of problems.
13:27:58
Colleen
<shinmera> I mean, in general I'm sure you must have a lot of other things to deal with that aren't related to web frameworks :^)
13:28:04
Colleen
<shinmera> like taxes, exams, money
13:28:34
hamza
I am lucky I have'nt grown up yet.
13:29:00
hamza
Although, I will probably have to worry about all that in 1-2 years.
13:29:07
Colleen
<shinmera> I wrote a lotta web stuff around that age, though back then it was with PHP.
13:29:14
hamza
Until then, I want to complete these projects.
13:29:55
hamza
It's crazy how fast things start seeming old, especially with technology.
13:29:57
Colleen
<shinmera> says the person wanting to use Lisp? :)
13:30:57
hamza
Now that I think about it I am using Svelte which was made 2 years ago or something, and Lisp which was like one of the first languages ever.
13:31:18
Colleen
<shinmera> Mh, Common Lisp is very different from the first lisps
13:31:22
hamza
And I am trying to combine them. Only works in this scenario with Common Lisp
13:33:40
Colleen
<shinmera> Hmm. Doesn't look like I'm getting any work done today. Oh well.
13:33:57
Colleen
<shinmera> |3b|: I did at least finally add outlining into Alloy
13:34:05
Colleen
<shinmera> badly, though. Needs a cleaner impl later
13:34:49
Colleen
<shinmera> guh, alloy/renderers/opengl/msdf.lisp is not a pretty sight
13:34:53
Colleen
<shinmera> just a mess all over
13:35:18
Colleen
<shinmera> I really wish I had the time/motivation to rewrite the layouter from first principles and make it cleas
13:35:29
Colleen
<shinmera> but somehow I get the feeling I wouldn't be able to get it done
14:02:41
hamza
Nice! I look forward to Alloy
14:02:50
hamza
Eh, you will get it done shinmera.
14:03:07
hamza
You have already made so many things.
14:09:48
hamza
Shinmera, What is this dm:hull thing?
14:10:01
hamza
Why was there a need for a datamodel?
14:10:30
hamza
I get the database abstraction.
14:11:08
hamza
I looked at the code and only understood that it creates a datamodel.
14:19:50
hamza
Also, why does there have to be a:
14:19:55
hamza
<html xmlns="http://www.w3.org/1999/xhtml">
14:56:42
Colleen
<shinmera> a "hull" is an empty record
14:56:51
Colleen
<shinmera> you need to put the data you want to insert somewhere, so that's where you put it.
14:57:06
Colleen
<shinmera> the xmlns tag is to make this an XHTML document.
Thursday, 22nd of September 2022, 18:56:01 UTC