Skip to content

Add Tags to blog posts #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions _includes/blog-post-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

<div class="well">
<h3>{{ post.title }}</h3>
<p>
{% if post.author %}
{% for author_name in post.author %}
{% assign author = site.data.contributors | where: "name", author_name | first %}
{% if author %}
<a href="{{ author.name | replace: " ", "" | prepend: "/team/" }}">
<img
src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
alt="{{ author.name }}" style="
width: 30px;
height: 30px;
border-radius: 50%;
margin: 0;
margin-top: 4px;
margin-bottom: 4px;
" />
{{ author.name }}
</a>
{% if forloop.last == false %}, {% endif %}
{% else %}
{{ author_name }}
{% endif %}
{% endfor %}
{% endif %}
<span class="text-muted">
• {{ post.date | date: "%b %d, %Y" }} • {{ post.content | number_of_words | divided_by: 200 | ceil }} min read
</span>
</p>
<p>{{ post.excerpt | truncatewords: 50 }}</p>


{% if post.tags and post.tags.size > 0 %}
<p>
{% for tag in post.tags %}
<a href="{{ site.baseurl }}/tags#{{ tag | downcase | slugify }}" class="badge" style="background-color: #999999; padding: 0.5rem">{{ tag }}</a>
{% endfor %}
</p>
{% endif %}

<p>
<button class="btn btn-primary" onclick="window.location.href='{{ post.url }}'">Read More</button>
</p>
</div>
34 changes: 1 addition & 33 deletions _layouts/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,5 @@
<h2>Latest Posts</h2>

<div>
{% for post in site.posts %}
<div class="well">
<h3>{{ post.title }}</h3>
<p>
{% assign author = site.data.contributors | where: "name", post.author | first %}
{% if author %}
<a href="{{ author.name | replace: " ", "" | prepend: " /team/" }}">
<img
src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
alt="{{ author.name }}" style="
width: 30px;
height: 30px;
border-radius: 50%;
/* vertical-align: middle; */
margin: 0;
margin-top: 4px;
margin-bottom: 4px;
" />
{{ author.name }}
</a>
{% else %}
{{ post.author }}
{% endif %}
<span class="text-muted">
• {{ post.date | date: "%b %d, %Y" }} • {{ post.content | number_of_words | divided_by: 200 | ceil }} min read
</span>
</p>
<p>{{ post.excerpt | truncatewords: 50 }}</p>
<p>
<button class="btn btn-primary" onclick="window.location.href='{{ post.url }}'">Read More</button>
</p>
</div>
{% endfor %}
{% for post in site.posts %} {% include blog-post-card.html %} {% endfor %}
</div>
17 changes: 17 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,21 @@ <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
</header>

<div class="post-content" itemprop="articleBody">{{ content }}</div>

{% if page.tags and page.tags.size > 0 %}
<hr />
<footer class="post-footer">
<p>
<h4>Tags:</h4>
{% for tag in page.tags %}
<a
href="{{ site.baseurl }}/tag#{{ tag | downcase | slugify }}"
class="badge badge-secondary"
style="background-color: #999999; padding: 0.5rem"
>{{ tag }}</a
>
{% endfor %}
</p>
</footer>
{% endif %}
</article>
19 changes: 19 additions & 0 deletions _layouts/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: default
title: Tags
---

<h2>Tags</h2>

<div>
{% for tag in site.tags %} {% assign t = tag | first %} {% assign posts = tag
| last %}

<h3 id="{{ t | downcase }}">{{ t | downcase }}</h3>
<div>
{% for post in posts %} {% if post.tags contains t %} {% include
blog-post-card.html post=post %} {% endif %} {% endfor %}
</div>
<hr />
{% endfor %}
</div>
11 changes: 11 additions & 0 deletions _pages/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Tags"
layout: tags
excerpt: "Tags"
sitemap: false
permalink: /tags/
---

<div id="textid" class="col-sm-12">
{{ content }}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ sitemap: false
author: Matheus Izvekov
permalink: blogs/gsoc22_izvekov_experience_blog/
date: 2022-11-30
tags: gsoc clang llvm
---

### Overview of the Project
Expand Down Expand Up @@ -61,7 +62,6 @@ naming context, without the need of tracking the template context. This
approach, although more efficient, required some intrusive modifications on the
way substitutions are represented in the AST.


### Contributions

The main contributions to this project are listed here.
Expand All @@ -79,7 +79,6 @@ Pull Requests:
7. [D131858 - Track the templated entity in type substitution](https://reviews.llvm.org/D131858)
8. [D127695 - Implement Template Specialization Resugaring](https://reviews.llvm.org/D127695)


### Contributions

1. Syntactic resugar of Non Type Template Parameters (NTTPs) is still under
Expand All @@ -99,7 +98,6 @@ type rules for syntactic sugar in STL will reduce the generation of errors in
terms of desugared code, improving the relationship between the user's source
program and the program evaluation.


### Acknowledgements

I thank my mentors Richard Smith and Vassil Vasilev for their excellent
Expand All @@ -120,7 +118,7 @@ increase my confidence as a developer in the LLVM open community!

**Contact me!**

Email: [email protected]
Email: [[email protected]](/team/MatheusIzvekov)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that we should use the email as is without extra punctuation. In the blog-post-card.html or where the rendering happens we can turn it into a link.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eg you want to move the email to the page header? This seems like it is a free text field currently

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I do not want to have markdown style links or any other decoration around the email because that field is used (and will be used) as a unique ID for the people. Based on that we can make more advanced queries in the text files. That is why we should not decorate with more. Instead, we could move the decoration where it is needed - that is the blog post visualization...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eg, something is grepping the markdown for the word Email?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, something makes a selection based on the email and/or author name across yml files. Or something could if we have a unique id. Pretty much how any relational database works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense.. but this is just some free text. So I don't understand the point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is that this free text can be used as a unique id.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you need to parse free text for that (so I guess the comment above is incorrect)...

Should not use the header information for that? (which does not make the life of the interested person viewing the page more difficult and could be used to make a contact form standard across posts..)

well it seems the correct action is to remove the part of the blog that is being discussed. The contact information is already at the top of the post. No need to repeat it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, dammit.... I thought my comment was under the yaml file. Please ignore, now I can understand why what I was saying does not make any sense...


Github Username: [mizvekov](https://github.com/mizvekov)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ author:
- Purva Chaudhari
permalink: blogs/gsoc22_zhang_chaudhari_experience_blog/
date: 2022-12-02
tags: gsoc clang llvm
---

### Overview of the Project
Expand Down Expand Up @@ -57,6 +58,7 @@ clang-repl: /home/purva/llvm-project/clang/include/clang/Sema/Sema.h:9406: clang
Aborted
(core dumped)
```

and

```cpp
Expand All @@ -74,12 +76,10 @@ clang-repl> %undo
clang-repl> float x = 24 // not an error
```


### Contributions

The main contributions to this project are listed here.


Pull Requests:

1. [D123674 - Clang-Repl Error Recovery Bug Fix](https://reviews.llvm.org/D123674)
Expand All @@ -101,29 +101,37 @@ Pull Requests:
extends the functionality used to recover from errors and adds functionality to
recover the low-level execution infrastructure. Now you can do below in
clang-repl:

```cpp
clang-repl> int x = 42;
clang-repl> %undo
clang-repl> float x = 24; // not an error
```

2. We fixed a bunch of bugs in Clang-Repl, by upstreamed ready-made patches in
cling: Fix inline function in Clang-Repl. Take the example below:

```cpp
inline int foo() { return 42; }
int r3 = foo(); // This fails before my fix.
```

More context: [cd64a427](https://github.com/llvm/llvm-project/commit/cd64a427efa0baaf1bb7ae624d4301908afc07f7)
3. Partially fix incorrect return code in Clang-Repl. Take the example below:

```cpp
clang-repl> BOOM!
clang-repl> int x = 42;
// This previously passed in the LLVM lit tests incorrectly
```

4. Partially fix weak attribute usage in Clang-Repl. Take the example below:

```cpp
int __attribute__((weak)) bar() { return 42; }
auto r4 = printf("bar() = %d\n", bar()); // This fails before my patch. Note this is not supported in Windows yet.
```

5. We fixed some issues in lambda usage in Clang-Repl.

### Conclusion
Expand All @@ -149,11 +157,10 @@ In the future, I'll continue my journey into the world of open source, and bring

**Contact us!**

Jun: [email protected]
Jun: [[email protected]](/team/JunZhang/)

GitHub username: [junaire](https://github.com/junaire)


Purva: [Webpage](https://purva-chaudhari.github.io/My-Portfolio/)

GitHub username: [Purva-Chaudhari](https://github.com/Purva-Chaudhari)
25 changes: 17 additions & 8 deletions _posts/2022-12-07-shared-memory-based-jitlink-memory-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ sitemap: false
author: Anubhab Ghosh
permalink: blogs/gsoc22_ghosh_experience_blog/
date: 2022-12-07
tags: gsoc llvm jitlink memory-manager
---

### Overview of the Project

LLVM JIT APIs include JITLink, a just-in-time linker that links together objects
code units directly in memory and executes them. It uses the
JITLinkMemoryManager interface to allocate and manage memory for the generated
Expand All @@ -28,13 +30,15 @@ memory and then when the code is generated, all the section contents are
transferred through finalize calls.

#### Shared Memory

The main problem was that EPC runs on top of file descriptor streams like Unix
pipes or TCP sockets. As all the generated code and data bytes are transferred
over the EPC this has some overhead that could be avoided by using shared
memory. If the two processes share the same physical memory pages then we can
completely avoid extra memory copying.

#### Small code model

While we are at it, another goal was to introduce a simple slab-based memory
manager. It would allocate a large chunk of memory in the beginning from the
executor process and allocate smaller blocks from that entirely at the
Expand All @@ -53,16 +57,20 @@ int main() {
return value + 1;
}
```

**Small code model**

```asm
0000000000001119 <main>:
1119: 55 push rbp
111a: 48 89 e5 mov rbp,rsp
111d: 8b 05 ed 2e 00 00 mov eax,DWORD PTR [rip+0x2eed] # 4010 <value>
1123: 5d pop rbp
1124: c3 ret
1119: 55 push rbp
111a: 48 89 e5 mov rbp,rsp
111d: 8b 05 ed 2e 00 00 mov eax,DWORD PTR [rip+0x2eed] # 4010 <value>
1123: 5d pop rbp
1124: c3 ret
```

**Large code model**

```asm
0000000000001119 <main>:
1119: 55 push rbp
Expand All @@ -81,10 +89,10 @@ int main() {
Small code model is the default for most compilations so this is actually
required to load ordinary precompiled code, e.g., from existing static archives.


### My Approach

#### Memory Mappers

I introduced a new `MemoryMapper` abstraction for interacting with OS APIs at
different situations. It has separate implementations based on whether the code
will be executed in the same or different process. The `InProcessMemoryMapper`
Expand All @@ -102,6 +110,7 @@ now already in place in the executor processes so finalization is just a matter
of sending the memory protections.

#### Slab-based allocator

Furthermore, I developed a slab-based memory allocator for JITLink, reserving a
large region of memory in the address space of the target process on the first
allocation. All subsequent allocations result in sub-regions of that to be
Expand All @@ -111,6 +120,7 @@ region, it also guarantees that JIT’d memory satisfies the layout constraints
required by the small code model.

#### Concurrency problems

After the implmentation, I tried JIT linking the CPython interpreter to
benchmark the implementation. We discovered that our overall CPU execution time
decreased by 45% but somewhat paradoxically clock time increased by 45%. In
Expand All @@ -133,7 +143,6 @@ this to access memory at runtime.
For a more detailed description and all the patches, please consult my
[GSoC final report](https://compiler-research.org/assets/docs/Anubhab_Ghosh_GSoC2022_Report.pdf).


### Acknowledgements

I would like to share my gratitude for the LLVM community members and my mentors
Expand All @@ -157,7 +166,7 @@ many applications.

**Contact me!**

Email: [email protected]
Email: [[email protected]](/team/AnubhabGhosh)

Github Username: [argentite](https://github.com/argentite)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ sitemap: false
author: QuillPusher
permalink: blogs/gsod23_quillpusher_experience_blog/
date: 2023-05-10
tags: gsod documentation llvm root clang-repl cppyy
---

### How we got started
Expand Down Expand Up @@ -76,8 +77,6 @@ an effort. This project has set me off on a trajectory of self-improvement and
learning, helping me identify how large, distributed communities work and what
skills I need to acquire to advance in my career.” – [@QuillPusher] (Saqib)



[Student Success Stories]: https://compiler-research.org/stories/

[GSoD 2023 Case Study]: https://github.com/compiler-research/compiler-research.github.io/blob/master/assets/docs/gsod_casestudy_2023.pdf
Expand All @@ -97,4 +96,3 @@ skills I need to acquire to advance in my career.” – [@QuillPusher] (Saqib)
[cppyy Enhancements]: https://github.com/compiler-research/CppInterOp/pull/160

[Numba Enhancements]: https://github.com/wlav/cppyy/pull/199

Loading
Loading