Skip to content

Commit

Permalink
Fix rss validator warning.
Browse files Browse the repository at this point in the history
They were due to missing blank line before code block and unescaped & in li and youtube link.
  • Loading branch information
skydread1 committed Aug 30, 2024
1 parent d2c4527 commit 05f7011
Showing 10 changed files with 25 additions and 13 deletions.
4 changes: 4 additions & 0 deletions src/loicb/server/content/blog/clj-in-unity.md
Original file line number Diff line number Diff line change
@@ -307,13 +307,17 @@ Finally, You can add Magic.Unity (runtime for magic inside Unity) in the manifes

Once you have the proper required config files ready, you can use `Nostrand` to
Build your dlls:

```
nos dotnet/build
```

Pack your dlls in a nuget package and push to a remote host:

```
nos dotnet/nuget-push
```

Import your packages in Unity:
```
nuget restore
2 changes: 1 addition & 1 deletion src/loicb/server/content/blog/datomic-setup.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ While working on [flybot.sg](http://flybot.sg) , I experimented with `datomic-fr

You can read the rationale of Datomic from their [on-prem documentation](https://docs.datomic.com/on-prem/getting-started/brief-overview.html)

Stuart Sierra explained very well how datomic works in the video [Intro to Datomic](https://www.youtube.com/watch?v=R6ObrDWTlYA&t=2776s).
Stuart Sierra explained very well how datomic works in the video [Intro to Datomic](https://www.youtube.com/watch?v=R6ObrDWTlYA).

Basically, Datomic works as a layer on top of your underlying storage (in this case, we will use Cassandra db).

1 change: 1 addition & 0 deletions src/loicb/server/content/blog/deploy-clj-app-to-aws.md
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@ Example of jibbit config to just create a local docker image:
```

Then we can run the container:

```
docker run \
--rm \
1 change: 0 additions & 1 deletion src/loicb/server/content/blog/deploy-django-beanstalk.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@ python -m venv blog_venv

# activate env (mac)
source blog_venv/bin/activate

```

### Install Django
1 change: 0 additions & 1 deletion src/loicb/server/content/blog/fun-map.md
Original file line number Diff line number Diff line change
@@ -175,7 +175,6 @@ As explained above, we could add some more diverse values, it wouldn’t be perc

m
;=> {:numbers [3 4] :cnt 2 :multiply 12 :average 7/2}

```

### System
5 changes: 5 additions & 0 deletions src/loicb/server/content/blog/juxt-tick-lib.md
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ The obvious advantage is the universal simplicity of representing time. The disa
The local time is the time in a specific time zone, usually represented using a date and time-of-day without any time zone information. In java it is called `java.time.LocalDateTime`. However, `tick` mentioned that when you asked someone the time, it is always going to be "local", so they prefer to call it `date-time` as the local part is implicit.

So if we ask Alice for the time and date, she will reply:

```clojure
(-> (t/time "12:00")
(t/on "2024-01-20"))
@@ -95,6 +96,7 @@ So far we have the following components to define a time:
However, counter-intuitively, the UTC offset for Alice is not the same all year long. Sometimes it is `UTC+0` (`Z`) in winter (as we saw earlier) but sometimes it is `UTC+1` in summer.

Let me prove it to you:

```clojure
;; time for Alice in winter
(-> (t/time "12:00")
@@ -136,6 +138,7 @@ So we now have a complete way to describe the time:
- a zone (that includes the location and the UTC encapsulating the DST)

So the time for Bob is:

```clojure
(-> (t/time "12:00")
(t/on "2024-01-20")
@@ -176,6 +179,7 @@ We can see in the example above, that since Singapore is 8 hours ahead of London
The `instant` is the human-friendly time representation of the timestamp (time since epoch). You can then store that format in your DB or do operation on it such as adding/substituting duration or period to it (more on this later).

The `epoch` in time-since-epoch is equivalent to #time/instant "1970-01-01T00:00:00Z":

```clojure
(t/epoch)
;=> #time/instant "1970-01-01T00:00:00Z"
@@ -236,6 +240,7 @@ We now know that we need to use `instant` to perform operations on time. However
```

They are not interchangeable:

```clojure
(t/new-period 10 :seconds)
; Execution error (IllegalArgumentException) at tick.core/new-period (core.cljc:649).
20 changes: 10 additions & 10 deletions src/loicb/server/content/blog/lasagna-pull-flybot.md
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ In our backend, we have a structure representing all our endpoints:

This resembles a REST API structure.

Since the API route information is contained within the pattern keys themselves, all the http requests with a pattern as params can hit the same backend URI.
Since the API "route" information is contained within the pattern keys themselves, all the http requests with a pattern as params can hit the same backend URI.

So we have a single route for all pattern http request:

@@ -76,7 +76,7 @@ Therefore the pull pattern:

## Example: pull a post

For instance, getting a specific post, meaning with the route: `:posts :post`, can be done this way:
For instance, getting a specific post, meaning with the "route": `:posts :post`, can be done this way:

```clojure
((pull/qfn
@@ -151,10 +151,10 @@ We decided to fetch all the information of the post in our pattern but we could
{:post/id '?
:post/page '?}}}
'&?))
=> {:posts
{:post
{:post/id #uuid "64cda032-b4e4-431e-bd85-0dbe34a8feeb"
:post/page :home}}}
;=> {:posts
{:post
{:post/id #uuid "64cda032-b4e4-431e-bd85-0dbe34a8feeb"
:post/page :home}}}
```

The function `(fn [post-id] (get-post db post-id))` returned **all** the post keys but we only select the `post/id` and `post/page`.
@@ -242,9 +242,9 @@ It corresponds to the pattern part:
(list :post :with [s/post-1-id])
```

And `lasagna-pull` provides validation of the functions params which is very good to be sure the proper data is sent to the server!
And `lasagna-pull` provides validation of the function's params which is very good to be sure the proper data is sent to the server!

Plus, in case the params given to one of the routes are not valid, the function wont even be executed.
Plus, in case the params given to one of the routes are not valid, the function won't even be executed.

So now we have a way to do post request to our backend providing a pull-pattern as the request body and our server can validate this pattern format and content as the data is being pulled.

@@ -331,7 +331,7 @@ In our case, we have a `mk-query` function that uses a `modifier` and `finalizer

### Example of post creation

Lets have a look at an example:
Let's have a look at an example:

We want to add a new post. When we make a request for a new post, if everything works fine, the pullable-data function at the route `:new-post` returns a map such as:

@@ -371,7 +371,7 @@ Running this pattern with the pattern **context** above returns:
:context/sessions {}}
```

- the response has been returned from the :with function to the pattern in the ‘&? key
- the response has been returned from the :with function to the pattern in the `'&?` key
- the effects have been accumulated and assoc in `:context/effects`
- there was no data to be added to the session

1 change: 1 addition & 0 deletions src/loicb/server/content/blog/lasagna-pull.md
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@ Let’s compare datomic pull and lasagna pull query with a simple example:
```

- Lasagna pull

```clojure
((pull/query '[{:a ? :b {:b1 ?}}])
sample-data)
2 changes: 2 additions & 0 deletions src/loicb/server/content/blog/port-clj-lib-to-clr.md
Original file line number Diff line number Diff line change
@@ -238,6 +238,7 @@ Note the vector required with the **splicing** reader conditional `#?@`.
Since magic was created before `tools.deps` or `leiningen`, it has its own deps management system and the dedicated file for it is `project.edn`.

Here is an example of a project.edn:

```clojure
{:name "My project"
:source-paths ["src" "test"]
@@ -273,6 +274,7 @@ In my case I named my nostrand namespace `dotnet.clj`.
You cna have a look at the [clr.test.check/dotnet.clj](https://github.com/skydread1/clr.test.check/blob/magic/dotnet.clj), it is a port of clojure/test.check that compiles in both JVM and CLR.

We have the following require:

```clojure
(:require [clojure.test :refer [run-all-tests]]
[magic.flags :as mflags])
1 change: 1 addition & 0 deletions src/loicb/server/content/blog/testing-in-clojure.md
Original file line number Diff line number Diff line change
@@ -151,6 +151,7 @@ After I `jack-in` using my *dev* alias form the `deps.edn` file, I can load the
3. *ctrl+alt+c* *t* (in the `fib-test` namespace): run the tests

In the REPL, we see:

```clojure
clj꞉user꞉>
; Evaluating file: fib_test.clj

0 comments on commit 05f7011

Please sign in to comment.