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 all 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 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 Down Expand Up @@ -153,7 +161,6 @@ Jun: [email protected]

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)
23 changes: 16 additions & 7 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 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

5 changes: 2 additions & 3 deletions _posts/2023-09-18-code-completion-in-clang-repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ sitemap: false
author: Yuquan (Fred) Fu
permalink: blogs/gsoc23_ffu_experience_blog/
date: 2023-09-18
tags: gsoc clang llvm
---

### Overview of the Project
Expand Down Expand Up @@ -51,12 +52,11 @@ clang-repl> c.move(<tab>
If users hit the `<tab`> key at the indicated position, listing all symbols
would be distracting. It is easy to find out that among all declarations, only
`c1`, `c2` and `s` are well-typed candidates. So an ideal code completion system
should be able to filter out results using type information.
should be able to filter out results using type information.

The project leverages existing components of Clang/LLVM and aims to provides
context-aware semantic completion suggestions.


### My Approach

The project mainly consists of two patches. The first patch involves building
Expand Down Expand Up @@ -98,7 +98,6 @@ main `ASTContext` to the code completion `ASTContext`.

<img src="/images/blog/cc2.gif" width="600" />


### Future Work

**Pull Request** : [D159128](https://reviews.llvm.org/D159128)
Expand Down
Loading
Loading