diff --git a/blog/.backup.tar.gz b/blog/.backup.tar.gz new file mode 100644 index 0000000..d672844 Binary files /dev/null and b/blog/.backup.tar.gz differ diff --git a/blog/.config b/blog/.config new file mode 100755 index 0000000..24e04ba --- /dev/null +++ b/blog/.config @@ -0,0 +1,41 @@ +global_software_name="BashBlog" +global_software_version="2.9" + +# Blog title +global_title="GRU's blog" +# The typical subtitle for each blog +global_description="GRU's blog" +# The public base URL for this blog +global_url="https://gru.codeberg.page/blog" + +# Your name +global_author="G1n" +# You can use twitter or facebook or anything for global_author_url +#global_author_url="http://twitter.com/example" +# Your email +global_email="g1n@ttm.sh" + +# CC by-nc-nd is a good starting point, you can change this to "©" for Copyright +global_license="CC by-nc-nd" + +# If you have a Google Analytics ID (UA-XXXXX) and wish to use the standard +# embedding code, put it on global_analytics +# If you have custom analytics code (i.e. non-google) or want to use the Universal +# code, leave global_analytics empty and specify a global_analytics_file +#global_analytics="" +#global_analytics_file="" + +# Leave this empty (i.e. "") if you don't want to use feedburner, +# or change it to your own URL +global_feedburner="https://gru.codeberg.page/blog/feed.xml" + +# Change this to your username if you want to use twitter for comments +#global_twitter_username="" +# Set this to false for a Twitter button with share count. The cookieless version +# is just a link. +global_twitter_cookieless="true" +# Default search page, where tweets more than a week old are hidden +#global_twitter_search="twitter" + +# Change this to your disqus username to use disqus for comments +#global_disqus_username="" diff --git a/blog/.yesterday.tar.gz b/blog/.yesterday.tar.gz new file mode 100644 index 0000000..279b319 Binary files /dev/null and b/blog/.yesterday.tar.gz differ diff --git a/blog/all_posts.html b/blog/all_posts.html new file mode 100644 index 0000000..a2ce6fa --- /dev/null +++ b/blog/all_posts.html @@ -0,0 +1,61 @@ + + + + + + + +GRU's blog — all posts + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

all posts

+

December 2021

+ +

November 2021

+ +

October 2021

+ +

September 2021

+ +

August 2021

+ +

July 2021

+ + +
+ +
+ diff --git a/blog/all_tags.html b/blog/all_tags.html new file mode 100644 index 0000000..c346586 --- /dev/null +++ b/blog/all_tags.html @@ -0,0 +1,62 @@ + + + + + + + +GRU's blog — all tags + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

all tags

+ + +
+ +
+ diff --git a/blog/bb-backup.sh b/blog/bb-backup.sh new file mode 100755 index 0000000..e253d1f --- /dev/null +++ b/blog/bb-backup.sh @@ -0,0 +1,1174 @@ +#!/usr/bin/env bash + +# BashBlog, a simple blog system written in a single bash script +# (C) Carlos Fenollosa , 2011-2016 and contributors +# https://github.com/carlesfe/bashblog/contributors +# Check out README.md for more details + +# Global variables +# It is recommended to perform a 'rebuild' after changing any of this in the code + +# Config file. Any settings "key=value" written there will override the +# global_variables defaults. Useful to avoid editing bb.sh and having to deal +# with merges in VCS +global_config=".config" + +# This function will load all the variables defined here. They might be overridden +# by the 'global_config' file contents +global_variables() { + global_software_name="bashblog" + global_software_version="2.8" + + # Blog title + global_title="my tildelog" + # The typical subtitle for each blog + global_description="a blog about tildes" + # The public base URL for this blog + global_url="https://gru.codeberg.page/blog" + + # Your name + global_author="g1n" + # You can use twitter or facebook or anything for global_author_url + global_author_url="https://gru.codeberg.page/" + # Your email + global_email="g1n@ttm.sh" + + # CC by-nc-nd is a good starting point, you can change this to "©" for Copyright + global_license="CC by-nc-nd" + + + # Leave this empty (i.e. "") if you don't want to use feedburner, + # or change it to your own URL + global_feedburner="" + + # Change this to your username if you want to use twitter for comments + global_twitter_username="" + # Set this to false for a Twitter button with share count. The cookieless version + # is just a link. + global_twitter_cookieless="true" + # Default search page, where tweets more than a week old are hidden + global_twitter_search="twitter" + + # Blog generated files + # index page of blog (it is usually good to use "index.html" here) + index_file="index.html" + number_of_index_articles="10" + # global archive + archive_index="all_posts.html" + tags_index="all_tags.html" + + # ignore gophermap file + gophermap="gophermap" + + # ignore gemini generation script and gemini index + gemini_index="index.gmi" + + # Non blogpost files. Bashblog will ignore these. Useful for static pages and custom content + # Add them as a bash array, e.g. non_blogpost_files=("news.html" "test.html") + non_blogpost_files=() + + # feed file (rss in this case) + blog_feed="feed.rss" + number_of_feed_articles="50" + # "cut" blog entry when putting it to index page. Leave blank for full articles in front page + # i.e. include only up to first '
', or '----' in markdown + cut_do="cut" + # When cutting, cut also tags? If "no", tags will appear in index page for cut articles + cut_tags="yes" + # Regexp matching the HTML line where to do the cut + # note that slash is regexp separator so you need to prepend it with backslash + cut_line='
' + # save markdown file when posting with "bb post -m". Leave blank to discard it. + save_markdown="yes" + # prefix for tags/categories files + # please make sure that no other html file starts with this prefix + prefix_tags="tag_" + # personalized header and footer (only if you know what you're doing) + # DO NOT name them .header.html, .footer.html or they will be overwritten + # leave blank to generate them, recommended + header_file="" + footer_file="" + # extra content to add just after we open the tag + # and before the actual blog content + body_begin_file="" + # extra content to add just before we cloese ) + body_end_file="" + # CSS files to include on every page, f.ex. css_include=('main.css' 'blog.css') + # leave empty to use generated + css_include=() + # HTML files to exclude from index, f.ex. post_exclude=('imprint.html 'aboutme.html') + html_exclude=() + + # Localization and i18n + # "Comments?" (used in twitter link after every post) + template_comments="comments?" + # "Read more..." (link under cut article on index page) + template_read_more="read more..." + # "View more posts" (used on bottom of index page as link to archive) + template_archive="archive" + # "All posts" (title of archive page) + template_archive_title="all posts" + # "All tags" + template_tags_title="all tags" + # "posts" (on "All tags" page, text at the end of each tag line, like "2. Music - 15 posts") + template_tags_posts="posts" + template_tags_posts_2_4="posts" # Some slavic languages use a different plural form for 2-4 items + template_tags_posts_singular="post" + # "Posts tagged" (text on a title of a page with index of one tag, like "My Blog - Posts tagged "Music"") + template_tag_title="posts tagged" + # "Tags:" (beginning of line in HTML file with list of all tags for this article) + template_tags_line_header="tags:" + # "Back to the index page" (used on archive page, it is link to blog index) + template_archive_index_page="back home" + # "Subscribe" (used on bottom of index page, it is link to RSS feed) + template_subscribe="rss" + # "Subscribe to this page..." (used as text for browser feed button that is embedded to html) + template_subscribe_browser_button="subscribe to this page..." + # "Tweet" (used as twitter text button for posting to twitter) + template_twitter_button="tweet" + template_twitter_comment="<type your comment here but please leave the URL so that other people can follow the comments>" + + # The locale to use for the dates displayed on screen + date_format="%B %d, %Y" + date_locale="C" + date_inpost="bashblog_timestamp" + # Don't change these dates + date_format_full="%a, %d %b %Y %H:%M:%S %z" + date_format_timestamp="%Y%m%d%H%M.%S" + date_allposts_header="%B %Y" + + # Perform the post title -> filename conversion + # Experts only. You may need to tune the locales too + # Leave empty for no conversion, which is not recommended + # This default filter respects backwards compatibility + convert_filename="iconv -f utf-8 -t ascii//translit | sed 's/^-*//' | tr [:upper:] [:lower:] | tr ' ' '-' | tr -dc '[:alnum:]-'" + + # URL where you can view the post while it's being edited + # same as global_url by default + # You can change it to path on your computer, if you write posts locally + # before copying them to the server + preview_url="" + + # Markdown location. Trying to autodetect by default. + # The invocation must support the signature 'markdown_bin in.md > out.html' + [[ -f Markdown.pl ]] && markdown_bin=./Markdown.pl || markdown_bin=$(which Markdown.pl 2>/dev/null || which markdown 2>/dev/null) +} + +# Check for the validity of some variables +# DO NOT EDIT THIS FUNCTION unless you know what you're doing +global_variables_check() { + [[ $header_file == .header.html ]] && + echo "Please check your configuration. '.header.html' is not a valid value for the setting 'header_file'" && + exit + [[ $footer_file == .footer.html ]] && + echo "Please check your configuration. '.footer.html' is not a valid value for the setting 'footer_file'" && + exit +} + + +# Test if the markdown script is working correctly +test_markdown() { + [[ -n $markdown_bin ]] && + ( + [[ $("$markdown_bin" <<< $'line 1\n\nline 2') == $'

line 1

\n\n

line 2

' ]] || + [[ $("$markdown_bin" <<< $'line 1\n\nline 2') == $'

line 1

\n

line 2

' ]] + ) +} + + +# Parse a Markdown file into HTML and return the generated file +markdown() { + out=${1%.md}.html + while [[ -f $out ]]; do out=${out%.html}.$RANDOM.html; done + $markdown_bin "$1" > "$out" + echo "$out" +} + +# Reads HTML file from stdin, prints its content to stdout +# $1 where to start ("text" or "entry") +# $2 where to stop ("text" or "entry") +# $3 "cut" to remove text from
to +# note that this does not remove
line itself, +# so you can see if text was cut or not +get_html_file_content() { + awk "//, //{ + if (!// && !//) print + if (\"$3\" == \"cut\" && /$cut_line/){ + if (\"$2\" == \"text\") exit # no need to read further + while (getline > 0 && !//) { + if (\"$cut_tags\" == \"no\" && /^

$template_tags_line_header/ ) print + } + } + }" +} + +# Edit an existing, published .html file while keeping its original timestamp +# Please note that this function does not automatically republish anything, as +# it is usually called from 'main'. +# +# Note that it edits HTML file, even if you wrote the post as markdown originally +# Note that if you edit title then filename might also change +# +# $1 the file to edit +# $2 (optional) edit mode: +# "keep" to keep old filename +# "full" to edit full HTML, and not only text part (keeps old filename) +# leave empty for default behavior (edit only text part and change name) +edit() { + [[ ! -f "${1%%.*}.html" ]] && echo "Can't edit post "${1%%.*}.html", did you mean to use \"bb.sh post \"?" && exit -1 + # Original post timestamp + edit_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +"$date_format_full" ) + touch_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +"$date_format_timestamp") + tags_before=$(tags_in_post "${1%%.*}.html") + if [[ $2 == full ]]; then + $EDITOR "$1" + filename=$1 + else + if [[ ${1##*.} == md ]]; then + test_markdown + if (($? != 0)); then + echo "Markdown is not working, please edit HTML file directly." + exit + fi + # editing markdown file + $EDITOR "$1" + TMPFILE=$(markdown "$1") + filename=${1%%.*}.html + else + # Create the content file + TMPFILE=$(basename "$1").$RANDOM.html + # Title + get_post_title "$1" > "$TMPFILE" + # Post text with plaintext tags + get_html_file_content 'text' 'text' <"$1" | sed "/^

$template_tags_line_header/s|\\1|\\1|g" >> "$TMPFILE" + $EDITOR "$TMPFILE" + filename=$1 + fi + rm "$filename" + if [[ $2 == keep ]]; then + parse_file "$TMPFILE" "$edit_timestamp" "$filename" + else + parse_file "$TMPFILE" "$edit_timestamp" # this command sets $filename as the html processed file + [[ ${1##*.} == md ]] && mv "$1" "${filename%%.*}.md" 2>/dev/null + fi + rm "$TMPFILE" + fi + touch -t "$touch_timestamp" "$filename" + touch -t "$touch_timestamp" "$1" + chmod 644 "$filename" + echo "Posted $filename" + tags_after=$(tags_in_post "$filename") + relevant_tags=$(echo "$tags_before $tags_after" | tr ',' ' ' | tr ' ' '\n' | sort -u | tr '\n' ' ') + if [[ ! -z $relevant_tags ]]; then + relevant_posts="$(posts_with_tags $relevant_tags) $filename" + rebuild_tags "$relevant_posts" "$relevant_tags" + fi +} + +# Create a Twitter summary (twitter "card") for the post +# +# $1 the post file +# $2 the title +twitter_card() { + [[ -z $global_twitter_username ]] && return + + echo "" + echo "" + echo "" # Twitter truncates at 70 char + description=$(grep -v "^

$template_tags_line_header" "$1" | sed -e 's/<[^>]*>//g' | head -c 250 | tr '\n' ' ' | sed "s/\"/'/g") + echo "" + image=$(sed -n 's/.*" +} + +# Adds the code needed by the twitter button +# +# $1 the post URL +twitter() { + [[ -z $global_twitter_username ]] && return + + if [[ $global_twitter_cookieless == true ]]; then + id=$RANDOM + + search_engine="https://twitter.com/search?q=" + + echo "

$template_comments $template_twitter_button " + echo " 

" + return; + else + echo "

$template_comments "; + fi + + echo "$template_twitter_button " + echo "

" +} + +# Check if the file is a 'boilerplate' (i.e. not a post) +# The return values are designed to be used like this inside a loop: +# is_boilerplate_file && continue +# +# $1 the file +# +# Return 0 (bash return value 'true') if the input file is an index, feed, etc +# or 1 (bash return value 'false') if it is a blogpost +is_boilerplate_file() { + name=${1#./} + # First check against user-defined non-blogpost pages + for item in "${non_blogpost_files[@]}"; do + [[ "$name" == "$item" ]] && return 0 + done + + case $name in + ( "$index_file" | "$archive_index" | "$gophermap" | "$gemini_index" | "$tags_index" | "$footer_file" | "$header_file" | "$global_analytics_file" | "$prefix_tags"* ) + return 0 ;; + ( * ) # Check for excluded + for excl in "${html_exclude[@]}"; do + [[ $name == "$excl" ]] && return 0 + done + return 1 ;; + esac +} + +# Adds all the bells and whistles to format the html page +# Every blog post is marked with a and +# which is parsed afterwards in the other functions. There is also a marker +# to determine just the beginning of the text body of the post +# +# $1 a file with the body of the content +# $2 the output file +# $3 "yes" if we want to generate the index.html, +# "no" to insert new blog posts +# $4 title for the html header +# $5 original blog timestamp +# $6 post author +create_html_page() { + content=$1 + filename=$2 + index=$3 + title=$4 + timestamp=$5 + author=$6 + + # Create the actual blog post + # html, head + { + cat ".header.html" + echo "$title" + twitter_card "$content" "$title" + echo "" + # stuff to add before the actual body content + [[ -n $body_begin_file ]] && cat "$body_begin_file" + # body divs + echo '
' + echo '
' + # blog title + echo '
' + cat .title.html + echo '
' # title, header, headerholder + echo '
' + + file_url=${filename#./} + file_url=${file_url%.rebuilt} # Get the correct URL when rebuilding + # one blog entry + if [[ $index == no ]]; then + echo '' # marks the beginning of the whole post + echo "

" + # remove possible

's on the title because of markdown conversion + title=${title//

/} + title=${title//<\/p>/} + echo "$title" + echo '

' + if [[ -z $timestamp ]]; then + echo "" + else + echo "" + fi + if [[ -z $timestamp ]]; then + echo -n "
$(LC_ALL=$date_locale date +"$date_format")" + else + echo -n "
$(LC_ALL=$date_locale date +"$date_format" --date="$timestamp")" + fi + [[ -n $author ]] && echo -e " — \n$author" + echo "
" + echo '' # This marks the text body, after the title, date... + fi + cat "$content" # Actual content + if [[ $index == no ]]; then + echo -e '\n' + + twitter "$global_url/$file_url" + + echo '' # absolute end of the post + fi + + echo '
' # content + + # page footer + cat .footer.html + # close divs + echo '
' # divbody and divbodyholder + [[ -n $body_end_file ]] && cat "$body_end_file" + echo '' + } > "$filename" +} + +# Parse the plain text file into an html file +# +# $1 source file name +# $2 (optional) timestamp for the file +# $3 (optional) destination file name +# note that although timestamp is optional, something must be provided at its +# place if destination file name is provided, i.e: +# parse_file source.txt "" destination.html +parse_file() { + # Read for the title and check that the filename is ok + title="" + while IFS='' read -r line; do + if [[ -z $title ]]; then + # remove extra

and

added by markdown + title=$(echo "$line" | sed 's/<\/*p>//g') + if [[ -n $3 ]]; then + filename=$3 + else + filename=$title + [[ -n $convert_filename ]] && + filename=$(echo "$title" | eval "$convert_filename") + [[ -n $filename ]] || + filename=$RANDOM # don't allow empty filenames + + filename=$filename.html + + # Check for duplicate file names + while [[ -f $filename ]]; do + filename=${filename%.html}$RANDOM.html + done + fi + content=$filename.tmp + # Parse possible tags + elif [[ $line == "

$template_tags_line_header"* ]]; then + tags=$(echo "$line" | cut -d ":" -f 2- | sed -e 's/<\/p>//g' -e 's/^ *//' -e 's/ *$//' -e 's/, /,/g') + IFS=, read -r -a array <<< "$tags" + + echo -n "

$template_tags_line_header " >> "$content" + for item in "${array[@]}"; do + echo -n "$item, " + done | sed 's/, $/<\/p>/g' >> "$content" + else + echo "$line" >> "$content" + fi + done < "$1" + + # Create the actual html page + create_html_page "$content" "$filename" no "$title" "$2" "$global_author" + rm "$content" +} + +# Manages the creation of the text file and the parsing to html file +# also the drafts +write_entry() { + test_markdown && fmt=md || fmt=html + f=$2 + [[ $2 == -html ]] && fmt=html && f=$3 + + if [[ -n $f ]]; then + TMPFILE=$f + if [[ ! -f $TMPFILE ]]; then + echo "The file doesn't exist" + delete_includes + exit + fi + # guess format from TMPFILE + extension=${TMPFILE##*.} + [[ $extension == md || $extension == html ]] && fmt=$extension + # but let user override it (`bb.sh post -html file.md`) + [[ $2 == -html ]] && fmt=html + # Test if Markdown is working before re-posting a .md file + if [[ $extension == md ]]; then + test_markdown + if (($? != 0)); then + echo "Markdown is not working, please edit HTML file directly." + exit + fi + fi + else + TMPFILE=.entry-$RANDOM.$fmt + echo -e "Title on this line\n" >> "$TMPFILE" + + [[ $fmt == html ]] && cat << EOF >> "$TMPFILE" +

The rest of the text file is an html blog post. The process will continue as soon +as you exit your editor.

+ +

$template_tags_line_header keep-this-tag-format, tags-are-optional, example

+EOF + [[ $fmt == md ]] && cat << EOF >> "$TMPFILE" +The rest of the text file is a **Markdown** blog post. The process will continue +as soon as you exit your editor. + +$template_tags_line_header keep-this-tag-format, tags-are-optional, beware-with-underscores-in-markdown, example +EOF + fi + chmod 600 "$TMPFILE" + + post_status="E" + filename="" + while [[ $post_status != "p" && $post_status != "P" ]]; do + [[ -n $filename ]] && rm "$filename" # Delete the generated html file, if any + $EDITOR "$TMPFILE" + if [[ $fmt == md ]]; then + html_from_md=$(markdown "$TMPFILE") + parse_file "$html_from_md" + rm "$html_from_md" + else + parse_file "$TMPFILE" # this command sets $filename as the html processed file + fi + + chmod 644 "$filename" + [[ -n $preview_url ]] || preview_url=$global_url + echo "To preview the entry, open $preview_url/$filename in your browser" + + echo -n "[P]ost this entry, [E]dit again, [D]raft for later? (p/E/d) " + read -r post_status + if [[ $post_status == d || $post_status == D ]]; then + mkdir -p "drafts/" + chmod 700 "drafts/" + + title=$(head -n 1 $TMPFILE) + [[ -n $convert_filename ]] && title=$(echo "$title" | eval "$convert_filename") + [[ -n $title ]] || title=$RANDOM + + draft=drafts/$title.$fmt + mv "$TMPFILE" "$draft" + chmod 600 "$draft" + rm "$filename" + delete_includes + echo "Saved your draft as '$draft'" + exit + fi + done + + if [[ $fmt == md && -n $save_markdown ]]; then + mv "$TMPFILE" "${filename%%.*}.md" + else + rm "$TMPFILE" + fi + chmod 644 "$filename" + echo "Posted $filename" + relevant_tags=$(tags_in_post $filename) + if [[ -n $relevant_tags ]]; then + relevant_posts="$(posts_with_tags $relevant_tags) $filename" + rebuild_tags "$relevant_posts" "$relevant_tags" + fi +} + +# Create an index page with all the posts +all_posts() { + echo -n "Creating an index page with all the posts " + contentfile=$archive_index.$RANDOM + while [[ -f $contentfile ]]; do + contentfile=$archive_index.$RANDOM + done + + { + echo "

$template_archive_title

" + prev_month="" + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue + echo -n "." 1>&3 + # Month headers + month=$(LC_ALL=$date_locale date -r "$i" +"$date_allposts_header") + if [[ $month != "$prev_month" ]]; then + [[ -n $prev_month ]] && echo "" # Don't close ul before first header + echo "

$month

" + echo "
    " + prev_month=$month + fi + # Title + title=$(get_post_title "$i") + echo -n "
  • $title —" + # Date + date=$(LC_ALL=$date_locale date -r "$i" +"$date_format") + echo " $date
  • " + done < <(ls -t ./*.html) + echo "" 1>&3 + echo "
" + echo "" + } 3>&1 >"$contentfile" + + create_html_page "$contentfile" "$archive_index.tmp" yes "$global_title — $template_archive_title" "$global_author" + mv "$archive_index.tmp" "$archive_index" + chmod 644 "$archive_index" + rm "$contentfile" +} + +# Create an index page with all the tags +all_tags() { + echo -n "Creating an index page with all the tags " + contentfile=$tags_index.$RANDOM + while [[ -f $contentfile ]]; do + contentfile=$tags_index.$RANDOM + done + + { + echo "

$template_tags_title

" + echo "
    " + for i in $prefix_tags*.html; do + [[ -f "$i" ]] || break + echo -n "." 1>&3 + nposts=$(grep -c "<\!-- text begin -->" "$i") + tagname=${i#"$prefix_tags"} + tagname=${tagname%.html} + case $nposts in + 1) word=$template_tags_posts_singular;; + 2|3|4) word=$template_tags_posts_2_4;; + *) word=$template_tags_posts;; + esac + echo "
  • $tagname — $nposts $word
  • " + done + echo "" 1>&3 + echo "
" + echo "" + } 3>&1 > "$contentfile" + + create_html_page "$contentfile" "$tags_index.tmp" yes "$global_title — $template_tags_title" "$global_author" + mv "$tags_index.tmp" "$tags_index" + chmod 644 "$tags_index" + rm "$contentfile" +} + +# Generate the index.html with the content of the latest posts +rebuild_index() { + echo -n "Rebuilding the index " + newindexfile=$index_file.$RANDOM + contentfile=$newindexfile.content + while [[ -f $newindexfile ]]; do + newindexfile=$index_file.$RANDOM + contentfile=$newindexfile.content + done + + # Create the content file + { + n=0 + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue; + if ((n >= number_of_index_articles)); then break; fi + if [[ -n $cut_do ]]; then + get_html_file_content 'entry' 'entry' 'cut' <"$i" | awk "/$cut_line/ { print \"

$template_read_more

\" ; next } 1" + else + get_html_file_content 'entry' 'entry' <"$i" + fi + echo -n "." 1>&3 + n=$(( n + 1 )) + done < <(ls -t ./*.html) # sort by date, newest first + + feed=$blog_feed + if [[ -n $global_feedburner ]]; then feed=$global_feedburner; fi + echo "" + } 3>&1 >"$contentfile" + + echo "" + + create_html_page "$contentfile" "$newindexfile" yes "$global_title" "$global_author" + rm "$contentfile" + mv "$newindexfile" "$index_file" + chmod 644 "$index_file" +} + +# Finds all tags referenced in one post. +# Accepts either filename as first argument, or post content at stdin +# Prints one line with space-separated tags to stdout +tags_in_post() { + sed -n "/^

$template_tags_line_header/{s/^

$template_tags_line_header//;s/<[^>]*>//g;s/[ ,]\+/ /g;p;}" "$1" | tr ', ' ' ' +} + +# Finds all posts referenced in a number of tags. +# Arguments are tags +# Prints one line with space-separated tags to stdout +posts_with_tags() { + (($# < 1)) && return + set -- "${@/#/$prefix_tags}" + set -- "${@/%/.html}" + sed -n '/^

/{s/.*href="\([^"]*\)">.*/\1/;p;}' "$@" 2> /dev/null +} + +# Rebuilds tag_*.html files +# if no arguments given, rebuilds all of them +# if arguments given, they should have this format: +# "FILE1 [FILE2 [...]]" "TAG1 [TAG2 [...]]" +# where FILEn are files with posts which should be used for rebuilding tags, +# and TAGn are names of tags which should be rebuilt. +# example: +# rebuild_tags "one_post.html another_article.html" "example-tag another-tag" +# mind the quotes! +rebuild_tags() { + if (($# < 2)); then + # will process all files and tags + files=$(ls -t ./*.html) + all_tags=yes + else + # will process only given files and tags + files=$(printf '%s\n' $1 | sort -u) + files=$(ls -t $files) + tags=$2 + fi + echo -n "Rebuilding tag pages " + n=0 + if [[ -n $all_tags ]]; then + rm ./"$prefix_tags"*.html &> /dev/null + else + for i in $tags; do + rm "./$prefix_tags$i.html" &> /dev/null + done + fi + # First we will process all files and create temporal tag files + # with just the content of the posts + tmpfile=tmp.$RANDOM + while [[ -f $tmpfile ]]; do tmpfile=tmp.$RANDOM; done + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue; + echo -n "." + if [[ -n $cut_do ]]; then + get_html_file_content 'entry' 'entry' 'cut' <"$i" | awk "/$cut_line/ { print \"

$template_read_more

\" ; next } 1" + else + get_html_file_content 'entry' 'entry' <"$i" + fi >"$tmpfile" + for tag in $(tags_in_post "$i"); do + if [[ -n $all_tags || " $tags " == *" $tag "* ]]; then + cat "$tmpfile" >> "$prefix_tags$tag".tmp.html + fi + done + done <<< "$files" + rm "$tmpfile" + # Now generate the tag files with headers, footers, etc + while IFS='' read -r i; do + tagname=${i#./"$prefix_tags"} + tagname=${tagname%.tmp.html} + create_html_page "$i" "$prefix_tags$tagname.html" yes "$global_title — $template_tag_title \"$tagname\"" "$global_author" + rm "$i" + done < <(ls -t ./"$prefix_tags"*.tmp.html 2>/dev/null) + echo +} + +# Return the post title +# +# $1 the html file +get_post_title() { + awk '/

/, /<\/a><\/h3>/{if (!/

/ && !/<\/a><\/h3>/) print}' "$1" +} + +# Return the post author +# +# $1 the html file +get_post_author() { + awk '/
.+/, //{if (!/
.+/ && !//) print}' "$1" | sed 's/<\/div>//g' +} + +# Displays a list of the tags +# +# $2 if "-n", tags will be sorted by number of posts +list_tags() { + if [[ $2 == -n ]]; then do_sort=1; else do_sort=0; fi + + ls ./$prefix_tags*.html &> /dev/null + (($? != 0)) && echo "No posts yet. Use 'bb.sh post' to create one" && return + + lines="" + for i in $prefix_tags*.html; do + [[ -f "$i" ]] || break + nposts=$(grep -c "<\!-- text begin -->" "$i") + tagname=${i#"$prefix_tags"} + tagname=${tagname#.html} + ((nposts > 1)) && word=$template_tags_posts || word=$template_tags_posts_singular + line="$tagname # $nposts # $word" + lines+=$line\\n + done + + if (( do_sort == 1 )); then + echo -e "$lines" | column -t -s "#" | sort -nrk 2 + else + echo -e "$lines" | column -t -s "#" + fi +} + +# Displays a list of the posts +list_posts() { + ls ./*.html &> /dev/null + (($? != 0)) && echo "No posts yet. Use 'bb.sh post' to create one" && return + + lines="" + n=1 + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue + line="$n # $(get_post_title "$i") # $(LC_ALL=$date_locale date -r "$i" +"$date_format")" + lines+=$line\\n + n=$(( n + 1 )) + done < <(ls -t ./*.html) + + echo -e "$lines" | column -t -s "#" +} + +# Generate the feed file +make_rss() { + echo -n "Making RSS " + + rssfile=$blog_feed.$RANDOM + while [[ -f $rssfile ]]; do rssfile=$blog_feed.$RANDOM; done + + { + pubdate=$(LC_ALL=C date +"$date_format_full") + echo '' + echo '' + echo "$global_title$global_url/$index_file" + echo "$global_descriptionen" + echo "$pubdate" + echo "$pubdate" + echo "" + + n=0 + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue + ((n >= number_of_feed_articles)) && break # max 10 items + echo -n "." 1>&3 + echo '' + get_post_title "$i" + echo '$global_url/${i#./}" + echo "$global_url/$i" + echo "$(get_post_author "$i")" + echo "$(LC_ALL=C date -r "$i" +"$date_format_full")" + + n=$(( n + 1 )) + done < <(ls -t ./*.html) + + echo '' + } 3>&1 >"$rssfile" + echo "" + + mv "$rssfile" "$blog_feed" + chmod 644 "$blog_feed" +} + +make_gophermap() { + if [ ! -d "${HOME}/public_gopher" ]; then + printf "Creating gopher hole\\n" + mkdir "${HOME}/public_gopher" + fi + + if [ ! -L "${HOME}/public_gopher/blog" ]; then + ln -sf "${HOME}/public_html/blog/" "${HOME}/public_gopher/blog" + fi + + if [ ! -f "${HOME}/public_gopher/blog/$gophermap" ]; then + cat <<- 'EOF' > $HOME/public_html/blog/$gophermap + #!/usr/bin/env sh + printf "my bashblog posts\n" + user=$(stat -c '%U' .) + for post in $(ls -t *.md); do + post=$(basename $post) + printf "0$post\t/~$user/blog/$post\ttilde.team\t70\n" + done + EOF + chmod +x $HOME/public_html/blog/$gophermap + fi + chmod 644 *.md +} + +make_gemini() { + if [ ! -d "${HOME}/public_gemini" ]; then + printf "Creating ~/public_gemini\\n" + mkdir "${HOME}/public_gemini" + fi + + if [ ! -L "${HOME}/public_gemini/blog" ]; then + ln -sf "${HOME}/public_html/blog/" "${HOME}/public_gemini/blog" + fi + + if [ ! -f "${HOME}/public_gemini/blog/$gemini_index" ]; then + cat <<- 'EOF' > $HOME/public_gemini/blog/$gemini_index + #!/usr/bin/env sh + printf "20 text/gemini\r\n" + printf "my bashblog posts\r\n" + user=$(stat -c '%U' $0) + for post in $(ls -t /home/$user/public_gemini/blog/*.md); do + post=$(basename $post) + printf "=> /~$user/blog/$post $post\r\n" + done + EOF + chmod +x ${HOME}/public_gemini/blog/$gemini_index + fi +} + +# generate headers, footers, etc +create_includes() { + { + echo "

$global_title

" + echo "
$global_description
" + } > ".title.html" + + if [[ -f $header_file ]]; then cp "$header_file" .header.html + else { + echo '' + echo '' + echo '' + echo '' + printf '\n' "${css_include[@]}" + if [[ -z $global_feedburner ]]; then + echo "" + else + echo "" + fi + } > ".header.html" + fi + + if [[ -f $footer_file ]]; then cp "$footer_file" .footer.html + else { + protected_mail=${global_email//@/@} + protected_mail=${protected_mail//./.} + echo "
$global_license $global_author$protected_mail
" + echo 'generated with bashblog, a single bash script to easily create blogs like this one
' + } >> ".footer.html" + fi +} + +# Delete the temporarily generated include files +delete_includes() { + rm ".title.html" ".footer.html" ".header.html" +} + +# Create the css file from scratch +create_css() { + # To avoid overwriting manual changes. However it is recommended that + # this function is modified if the user changes the blog.css file + (( ${#css_include[@]} > 0 )) && return || css_include=('main.css' 'blog.css') + if [[ ! -f blog.css ]]; then + # blog.css directives will be loaded after main.css and thus will prevail + echo '#title{font-size: x-large;} + a.ablack{color:black !important;} + li{margin-bottom:8px;} + ul,ol{margin-left:24px;margin-right:24px;} + #all_posts{margin-top:24px;text-align:center;} + .subtitle{font-size:small;margin:12px 0px;} + .content p{margin-left:24px;margin-right:24px;} + h1{margin-bottom:12px !important;} + #description{font-size:large;margin-bottom:12px;} + h3{margin-top:42px;margin-bottom:8px;} + h4{margin-left:24px;margin-right:24px;} + img{max-width:100%;} + #twitter{line-height:20px;vertical-align:top;text-align:right;font-style:italic;color:#333;margin-top:24px;font-size:14px;}' > blog.css + fi + + # If there is a style.css from the parent page (i.e. some landing page) + # then use it. This directive is here for compatibility with my own + # home page. Feel free to edit it out, though it doesn't hurt + if [[ -f ../style.css ]] && [[ ! -f main.css ]]; then + ln -s "../style.css" "main.css" + elif [[ ! -f main.css ]]; then + echo 'body{font-family:Georgia,"Times New Roman",Times,serif;margin:0;padding:0;background-color:#F3F3F3;} + #divbodyholder{padding:5px;background-color:#DDD;width:100%;max-width:874px;margin:24px auto;} + #divbody{border:solid 1px #ccc;background-color:#fff;padding:0px 48px 24px 48px;top:0;} + .headerholder{background-color:#f9f9f9;border-top:solid 1px #ccc;border-left:solid 1px #ccc;border-right:solid 1px #ccc;} + .header{width:100%;max-width:800px;margin:0px auto;padding-top:24px;padding-bottom:8px;} + .content{margin-bottom:5%;} + .nomargin{margin:0;} + .description{margin-top:10px;border-top:solid 1px #666;padding:10px 0;} + h3{font-size:20pt;width:100%;font-weight:bold;margin-top:32px;margin-bottom:0;} + .clear{clear:both;} + #footer{padding-top:10px;border-top:solid 1px #666;color:#333333;text-align:center;font-size:small;font-family:"Courier New","Courier",monospace;} + a{text-decoration:none;color:#003366 !important;} + a:visited{text-decoration:none;color:#336699 !important;} + blockquote{background-color:#f9f9f9;border-left:solid 4px #e9e9e9;margin-left:12px;padding:12px 12px 12px 24px;} + blockquote img{margin:12px 0px;} + blockquote iframe{margin:12px 0px;}' > main.css + fi +} + +# Regenerates all the single post entries, keeping the post content but modifying +# the title, html structure, etc +rebuild_all_entries() { + echo -n "Rebuilding all entries " + + for i in ./*.html; do + is_boilerplate_file "$i" && continue; + contentfile=.tmp.$RANDOM + while [[ -f $contentfile ]]; do contentfile=.tmp.$RANDOM; done + + echo -n "." + # Get the title and entry, and rebuild the html structure from scratch (divs, title, description...) + title=$(get_post_title "$i") + + get_html_file_content 'text' 'text' <"$i" >> "$contentfile" + + # Read timestamp from post, if present, and sync file timestamp + timestamp=$(awk '// { print }' "$i" | cut -d '#' -f 2) + [[ -n $timestamp ]] && touch -t "$timestamp" "$i" + # Read timestamp from file in correct format for 'create_html_page' + timestamp=$(LC_ALL=C date -r "$i" +"$date_format_full") + + create_html_page "$contentfile" "$i.rebuilt" no "$title" "$timestamp" "$(get_post_author "$i")" + # keep the original timestamp! + timestamp=$(LC_ALL=C date -r "$i" +"$date_format_timestamp") + mv "$i.rebuilt" "$i" + chmod 644 "$i" + touch -t "$timestamp" "$i" + rm "$contentfile" + done + echo "" +} + +# Displays the help +usage() { + echo "$global_software_name v$global_software_version" + echo "usage: bb command [filename]" + echo "" + echo "Commands:" + echo " post [-html] [filename] insert a new blog post, or the filename of a draft to continue editing it" + echo " it tries to use markdown by default, and falls back to HTML if it's not available." + echo " use '-html' to override it and edit the post as HTML even when markdown is available" + echo " edit [-n|-f] [filename] edit an already published .html or .md file. **NEVER** edit manually a published .html file," + echo " always use this function as it keeps internal data and rebuilds the blog" + echo " use '-n' to give the file a new name, if title was changed" + echo " use '-f' to edit full html file, instead of just text part (also preserves name)" + echo " delete [filename] deletes the post and rebuilds the blog" + echo " rebuild regenerates all the pages and posts, preserving the content of the entries" + echo " reset deletes everything except this script. Use with a lot of caution and back up first!" + echo " list list all posts" + echo " tags [-n] list all tags in alphabetical order" + echo " use '-n' to sort list by number of posts" + echo "" + echo "for more information please see https://tilde.team/wiki/?page=tildeblogs" + echo "source here: https://tildegit.org/team/bashblog" +} + +# Delete all generated content, leaving only this script +reset() { + echo "Are you sure you want to delete all blog entries? Please write \"Yes, I am!\" " + read -r line + if [[ $line == "Yes, I am!" ]]; then + rm .*.html ./*.html ./*.css ./*.rss &> /dev/null + echo + echo "Deleted all posts, stylesheets and feeds." + echo "Kept your old '.backup.tar.gz' just in case, please delete it manually if needed." + else + echo "Phew! You dodged a bullet there. Nothing was modified." + fi +} + +# Detects if GNU date is installed +date_version_detect() { + date --version >/dev/null 2>&1 + if (($? != 0)); then + # date utility is BSD. Test if gdate is installed + if gdate --version >/dev/null 2>&1 ; then + date() { + gdate "$@" + } + else + # BSD date + date() { + if [[ $1 == -r ]]; then + # Fall back to using stat for 'date -r' + format=${3//+/} + stat -f "%Sm" -t "$format" "$2" + elif [[ $2 == --date* ]]; then + # convert between dates using BSD date syntax + command date -j -f "$date_format_full" "${2#--date=}" "$1" + else + # acceptable format for BSD date + command date -j "$@" + fi + } + fi + fi +} + +# Main function +# Encapsulated on its own function for readability purposes +# +# $1 command to run +# $2 file name of a draft to continue editing (optional) +do_main() { + # make sure we're in the right directory + #[ $(pwd) != $HOME/public_html/blog ] && + # echo "you're not in your blog directory. moving you there now" && mkdir -p $HOME/public_html/blog && cd $HOME/public_html/blog + + # Detect if using BSD date or GNU date + date_version_detect + # Load default configuration, then override settings with the config file + global_variables + [[ -f $global_config ]] && source "$global_config" &> /dev/null + global_variables_check + + # Check for $EDITOR + [[ -z $EDITOR ]] && + echo "Please set your \$EDITOR environment variable. For example, to use nano, add the line 'export EDITOR=nano' to your \$HOME/.bashrc file" && exit + + # Check for validity of argument + [[ $1 != "reset" && $1 != "post" && $1 != "rebuild" && $1 != "list" && $1 != "edit" && $1 != "delete" && $1 != "tags" ]] && + usage && exit + + [[ $1 == list ]] && + list_posts && exit + + [[ $1 == tags ]] && + list_tags "$@" && exit + + if [[ $1 == edit ]]; then + if (($# < 2)) || [[ ! -f ${!#} ]]; then + echo "Please enter a valid .md or .html file to edit" + exit + fi + fi + + # Test for existing html files + if ls ./*.html &> /dev/null; then + # We're going to back up just in case + tar -c -z -f ".backup.tar.gz" -- *.html && + chmod 600 ".backup.tar.gz" + elif [[ $1 == rebuild ]]; then + echo "Can't find any html files, nothing to rebuild" + exit + fi + + # Keep first backup of this day containing yesterday's version of the blog + [[ ! -f .yesterday.tar.gz || $(date -r .yesterday.tar.gz +'%d') != "$(date +'%d')" ]] && + cp .backup.tar.gz .yesterday.tar.gz &> /dev/null + + [[ $1 == reset ]] && + reset && exit + + create_css + create_includes + [[ $1 == post ]] && write_entry "$@" + [[ $1 == rebuild ]] && rebuild_all_entries && rebuild_tags + [[ $1 == delete ]] && rm "$2" &> /dev/null && rebuild_tags + if [[ $1 == edit ]]; then + if [[ $2 == -n ]]; then + edit "$3" + elif [[ $2 == -f ]]; then + edit "$3" full + else + edit "$2" keep + fi + fi + rebuild_index + all_posts + all_tags + make_rss + #make_gophermap + #make_gemini + delete_includes +} + + +# +# MAIN +# Do not change anything here. If you want to modify the code, edit do_main() +# +do_main "$@" + +# vim: set shiftwidth=4 tabstop=4 expandtab: diff --git a/blog/bb.sh b/blog/bb.sh new file mode 100755 index 0000000..ac72d6e --- /dev/null +++ b/blog/bb.sh @@ -0,0 +1,1122 @@ +#!/usr/bin/env bash + +# BashBlog, a simple blog system written in a single bash script +# (C) Carlos Fenollosa , 2011-2016 and contributors +# https://github.com/carlesfe/bashblog/contributors +# Check out README.md for more details + +# Global variables +# It is recommended to perform a 'rebuild' after changing any of this in the code + +# Config file. Any settings "key=value" written there will override the +# global_variables defaults. Useful to avoid editing bb.sh and having to deal +# with merges in VCS +global_config=".config" + +# This function will load all the variables defined here. They might be overridden +# by the 'global_config' file contents +global_variables() { + global_software_name="bashblog" + global_software_version="2.8" + + # Blog title + global_title="my tildelog" + # The typical subtitle for each blog + global_description="a blog about tildes" + # The public base URL for this blog + global_url="https://gru.codeberg.page/blog" + + # Your name + global_author="g1n" + # You can use twitter or facebook or anything for global_author_url + global_author_url="https://gru.codeberg.page/" + # Your email + global_email="g1n@ttm.sh" + + # CC by-nc-nd is a good starting point, you can change this to "©" for Copyright + global_license="CC by-nc-nd" + + + # Leave this empty (i.e. "") if you don't want to use feedburner, + # or change it to your own URL + global_feedburner="" + + # Change this to your username if you want to use twitter for comments + global_twitter_username="" + # Set this to false for a Twitter button with share count. The cookieless version + # is just a link. + global_twitter_cookieless="true" + # Default search page, where tweets more than a week old are hidden + global_twitter_search="twitter" + + # Blog generated files + # index page of blog (it is usually good to use "index.html" here) + index_file="index.html" + number_of_index_articles="10" + # global archive + archive_index="all_posts.html" + tags_index="all_tags.html" + + # ignore gophermap file + gophermap="gophermap" + + # ignore gemini generation script and gemini index + gemini_index="index.gmi" + + # Non blogpost files. Bashblog will ignore these. Useful for static pages and custom content + # Add them as a bash array, e.g. non_blogpost_files=("news.html" "test.html") + non_blogpost_files=() + + # feed file (rss in this case) + blog_feed="feed.rss" + number_of_feed_articles="50" + # "cut" blog entry when putting it to index page. Leave blank for full articles in front page + # i.e. include only up to first '
', or '----' in markdown + cut_do="cut" + # When cutting, cut also tags? If "no", tags will appear in index page for cut articles + cut_tags="yes" + # Regexp matching the HTML line where to do the cut + # note that slash is regexp separator so you need to prepend it with backslash + cut_line='
' + # save markdown file when posting with "bb post -m". Leave blank to discard it. + save_markdown="yes" + # prefix for tags/categories files + # please make sure that no other html file starts with this prefix + prefix_tags="tag_" + # personalized header and footer (only if you know what you're doing) + # DO NOT name them .header.html, .footer.html or they will be overwritten + # leave blank to generate them, recommended + header_file="" + footer_file="" + # extra content to add just after we open the tag + # and before the actual blog content + body_begin_file="" + # extra content to add just before we cloese ) + body_end_file="" + # CSS files to include on every page, f.ex. css_include=('main.css' 'blog.css') + # leave empty to use generated + css_include=() + # HTML files to exclude from index, f.ex. post_exclude=('imprint.html 'aboutme.html') + html_exclude=() + + # Localization and i18n + # "Comments?" (used in twitter link after every post) + template_comments="comments?" + # "Read more..." (link under cut article on index page) + template_read_more="read more..." + # "View more posts" (used on bottom of index page as link to archive) + template_archive="archive" + # "All posts" (title of archive page) + template_archive_title="all posts" + # "All tags" + template_tags_title="all tags" + # "posts" (on "All tags" page, text at the end of each tag line, like "2. Music - 15 posts") + template_tags_posts="posts" + template_tags_posts_2_4="posts" # Some slavic languages use a different plural form for 2-4 items + template_tags_posts_singular="post" + # "Posts tagged" (text on a title of a page with index of one tag, like "My Blog - Posts tagged "Music"") + template_tag_title="posts tagged" + # "Tags:" (beginning of line in HTML file with list of all tags for this article) + template_tags_line_header="tags:" + # "Back to the index page" (used on archive page, it is link to blog index) + template_archive_index_page="back home" + # "Subscribe" (used on bottom of index page, it is link to RSS feed) + template_subscribe="rss" + # "Subscribe to this page..." (used as text for browser feed button that is embedded to html) + template_subscribe_browser_button="subscribe to this page..." + # "Tweet" (used as twitter text button for posting to twitter) + template_twitter_button="tweet" + template_twitter_comment="<type your comment here but please leave the URL so that other people can follow the comments>" + + # The locale to use for the dates displayed on screen + date_format="%B %d, %Y" + date_locale="C" + date_inpost="bashblog_timestamp" + # Don't change these dates + date_format_full="%a, %d %b %Y %H:%M:%S %z" + date_format_timestamp="%Y%m%d%H%M.%S" + date_allposts_header="%B %Y" + + # Perform the post title -> filename conversion + # Experts only. You may need to tune the locales too + # Leave empty for no conversion, which is not recommended + # This default filter respects backwards compatibility + convert_filename="iconv -f utf-8 -t ascii//translit | sed 's/^-*//' | tr [:upper:] [:lower:] | tr ' ' '-' | tr -dc '[:alnum:]-'" + + # URL where you can view the post while it's being edited + # same as global_url by default + # You can change it to path on your computer, if you write posts locally + # before copying them to the server + preview_url="" + + # Markdown location. Trying to autodetect by default. + # The invocation must support the signature 'markdown_bin in.md > out.html' + [[ -f Markdown.pl ]] && markdown_bin=./Markdown.pl || markdown_bin=$(which Markdown.pl 2>/dev/null || which markdown 2>/dev/null) +} + +# Check for the validity of some variables +# DO NOT EDIT THIS FUNCTION unless you know what you're doing +global_variables_check() { + [[ $header_file == .header.html ]] && + echo "Please check your configuration. '.header.html' is not a valid value for the setting 'header_file'" && + exit + [[ $footer_file == .footer.html ]] && + echo "Please check your configuration. '.footer.html' is not a valid value for the setting 'footer_file'" && + exit +} + + +# Test if the markdown script is working correctly +test_markdown() { + [[ -n $markdown_bin ]] && + ( + [[ $("$markdown_bin" <<< $'line 1\n\nline 2') == $'

line 1

\n\n

line 2

' ]] || + [[ $("$markdown_bin" <<< $'line 1\n\nline 2') == $'

line 1

\n

line 2

' ]] + ) +} + + +# Parse a Markdown file into HTML and return the generated file +markdown() { + out=${1%.md}.html + while [[ -f $out ]]; do out=${out%.html}.$RANDOM.html; done + $markdown_bin "$1" > "$out" + echo "$out" +} + +# Reads HTML file from stdin, prints its content to stdout +# $1 where to start ("text" or "entry") +# $2 where to stop ("text" or "entry") +# $3 "cut" to remove text from
to +# note that this does not remove
line itself, +# so you can see if text was cut or not +get_html_file_content() { + awk "//, //{ + if (!// && !//) print + if (\"$3\" == \"cut\" && /$cut_line/){ + if (\"$2\" == \"text\") exit # no need to read further + while (getline > 0 && !//) { + if (\"$cut_tags\" == \"no\" && /^

$template_tags_line_header/ ) print + } + } + }" +} + +# Edit an existing, published .html file while keeping its original timestamp +# Please note that this function does not automatically republish anything, as +# it is usually called from 'main'. +# +# Note that it edits HTML file, even if you wrote the post as markdown originally +# Note that if you edit title then filename might also change +# +# $1 the file to edit +# $2 (optional) edit mode: +# "keep" to keep old filename +# "full" to edit full HTML, and not only text part (keeps old filename) +# leave empty for default behavior (edit only text part and change name) +edit() { + [[ ! -f "${1%%.*}.html" ]] && echo "Can't edit post "${1%%.*}.html", did you mean to use \"bb.sh post \"?" && exit -1 + # Original post timestamp + edit_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +"$date_format_full" ) + touch_timestamp=$(LC_ALL=C date -r "${1%%.*}.html" +"$date_format_timestamp") + tags_before=$(tags_in_post "${1%%.*}.html") + if [[ $2 == full ]]; then + $EDITOR "$1" + filename=$1 + else + if [[ ${1##*.} == md ]]; then + test_markdown + if (($? != 0)); then + echo "Markdown is not working, please edit HTML file directly." + exit + fi + # editing markdown file + $EDITOR "$1" + TMPFILE=$(markdown "$1") + filename=${1%%.*}.html + else + # Create the content file + TMPFILE=$(basename "$1").$RANDOM.html + # Title + get_post_title "$1" > "$TMPFILE" + # Post text with plaintext tags + get_html_file_content 'text' 'text' <"$1" | sed "/^

$template_tags_line_header/s|\\1|\\1|g" >> "$TMPFILE" + $EDITOR "$TMPFILE" + filename=$1 + fi + rm "$filename" + if [[ $2 == keep ]]; then + parse_file "$TMPFILE" "$edit_timestamp" "$filename" + else + parse_file "$TMPFILE" "$edit_timestamp" # this command sets $filename as the html processed file + [[ ${1##*.} == md ]] && mv "$1" "${filename%%.*}.md" 2>/dev/null + fi + rm "$TMPFILE" + fi + touch -t "$touch_timestamp" "$filename" + touch -t "$touch_timestamp" "$1" + chmod 644 "$filename" + echo "Posted $filename" + tags_after=$(tags_in_post "$filename") + relevant_tags=$(echo "$tags_before $tags_after" | tr ',' ' ' | tr ' ' '\n' | sort -u | tr '\n' ' ') + if [[ ! -z $relevant_tags ]]; then + relevant_posts="$(posts_with_tags $relevant_tags) $filename" + rebuild_tags "$relevant_posts" "$relevant_tags" + fi +} + +# Create a Twitter summary (twitter "card") for the post +# +# $1 the post file +# $2 the title +twitter_card() { + [[ -z $global_twitter_username ]] && return + + echo "" + echo "" + echo "" # Twitter truncates at 70 char + description=$(grep -v "^

$template_tags_line_header" "$1" | sed -e 's/<[^>]*>//g' | head -c 250 | tr '\n' ' ' | sed "s/\"/'/g") + echo "" + image=$(sed -n 's/.*" +} + +# Adds the code needed by the twitter button +# +# $1 the post URL +twitter() { + [[ -z $global_twitter_username ]] && return + + if [[ $global_twitter_cookieless == true ]]; then + id=$RANDOM + + search_engine="https://twitter.com/search?q=" + + echo "

$template_comments $template_twitter_button " + echo " 

" + return; + else + echo "

$template_comments "; + fi + + echo "$template_twitter_button " + echo "

" +} + +# Check if the file is a 'boilerplate' (i.e. not a post) +# The return values are designed to be used like this inside a loop: +# is_boilerplate_file && continue +# +# $1 the file +# +# Return 0 (bash return value 'true') if the input file is an index, feed, etc +# or 1 (bash return value 'false') if it is a blogpost +is_boilerplate_file() { + name=${1#./} + # First check against user-defined non-blogpost pages + for item in "${non_blogpost_files[@]}"; do + [[ "$name" == "$item" ]] && return 0 + done + + case $name in + ( "$index_file" | "$archive_index" | "$tags_index" | "$footer_file" | "$header_file" | "$global_analytics_file" | "$prefix_tags"* ) + return 0 ;; + ( * ) # Check for excluded + for excl in "${html_exclude[@]}"; do + [[ $name == "$excl" ]] && return 0 + done + return 1 ;; + esac +} + +# Adds all the bells and whistles to format the html page +# Every blog post is marked with a and +# which is parsed afterwards in the other functions. There is also a marker +# to determine just the beginning of the text body of the post +# +# $1 a file with the body of the content +# $2 the output file +# $3 "yes" if we want to generate the index.html, +# "no" to insert new blog posts +# $4 title for the html header +# $5 original blog timestamp +# $6 post author +create_html_page() { + content=$1 + filename=$2 + index=$3 + title=$4 + timestamp=$5 + author=$6 + + # Create the actual blog post + # html, head + { + cat ".header.html" + echo "$title" + twitter_card "$content" "$title" + echo "" + # stuff to add before the actual body content + [[ -n $body_begin_file ]] && cat "$body_begin_file" + # body divs + echo '
' + echo '
' + # blog title + echo '
' + cat .title.html + echo '
' # title, header, headerholder + echo '
' + + file_url=${filename#./} + file_url=${file_url%.rebuilt} # Get the correct URL when rebuilding + # one blog entry + if [[ $index == no ]]; then + echo '' # marks the beginning of the whole post + echo "

" + # remove possible

's on the title because of markdown conversion + title=${title//

/} + title=${title//<\/p>/} + echo "$title" + echo '

' + if [[ -z $timestamp ]]; then + echo "" + else + echo "" + fi + if [[ -z $timestamp ]]; then + echo -n "
$(LC_ALL=$date_locale date +"$date_format")" + else + echo -n "
$(LC_ALL=$date_locale date +"$date_format" --date="$timestamp")" + fi + [[ -n $author ]] && echo -e " — \n$author" + echo "
" + echo '' # This marks the text body, after the title, date... + fi + cat "$content" # Actual content + if [[ $index == no ]]; then + echo -e '\n' + + twitter "$global_url/$file_url" + + echo '' # absolute end of the post + fi + + echo '
' # content + + # page footer + cat .footer.html + # close divs + echo '
' # divbody and divbodyholder + [[ -n $body_end_file ]] && cat "$body_end_file" + echo '' + } > "$filename" +} + +# Parse the plain text file into an html file +# +# $1 source file name +# $2 (optional) timestamp for the file +# $3 (optional) destination file name +# note that although timestamp is optional, something must be provided at its +# place if destination file name is provided, i.e: +# parse_file source.txt "" destination.html +parse_file() { + # Read for the title and check that the filename is ok + title="" + while IFS='' read -r line; do + if [[ -z $title ]]; then + # remove extra

and

added by markdown + title=$(echo "$line" | sed 's/<\/*p>//g') + if [[ -n $3 ]]; then + filename=$3 + else + filename=$title + [[ -n $convert_filename ]] && + filename=$(echo "$title" | eval "$convert_filename") + [[ -n $filename ]] || + filename=$RANDOM # don't allow empty filenames + + filename=$filename.html + + # Check for duplicate file names + while [[ -f $filename ]]; do + filename=${filename%.html}$RANDOM.html + done + fi + content=$filename.tmp + # Parse possible tags + elif [[ $line == "

$template_tags_line_header"* ]]; then + tags=$(echo "$line" | cut -d ":" -f 2- | sed -e 's/<\/p>//g' -e 's/^ *//' -e 's/ *$//' -e 's/, /,/g') + IFS=, read -r -a array <<< "$tags" + + echo -n "

$template_tags_line_header " >> "$content" + for item in "${array[@]}"; do + echo -n "$item, " + done | sed 's/, $/<\/p>/g' >> "$content" + else + echo "$line" >> "$content" + fi + done < "$1" + + # Create the actual html page + create_html_page "$content" "$filename" no "$title" "$2" "$global_author" + rm "$content" +} + +# Manages the creation of the text file and the parsing to html file +# also the drafts +write_entry() { + test_markdown && fmt=md || fmt=html + f=$2 + [[ $2 == -html ]] && fmt=html && f=$3 + + if [[ -n $f ]]; then + TMPFILE=$f + if [[ ! -f $TMPFILE ]]; then + echo "The file doesn't exist" + delete_includes + exit + fi + # guess format from TMPFILE + extension=${TMPFILE##*.} + [[ $extension == md || $extension == html ]] && fmt=$extension + # but let user override it (`bb.sh post -html file.md`) + [[ $2 == -html ]] && fmt=html + # Test if Markdown is working before re-posting a .md file + if [[ $extension == md ]]; then + test_markdown + if (($? != 0)); then + echo "Markdown is not working, please edit HTML file directly." + exit + fi + fi + else + TMPFILE=.entry-$RANDOM.$fmt + echo -e "Title on this line\n" >> "$TMPFILE" + + [[ $fmt == html ]] && cat << EOF >> "$TMPFILE" +

The rest of the text file is an html blog post. The process will continue as soon +as you exit your editor.

+ +

$template_tags_line_header keep-this-tag-format, tags-are-optional, example

+EOF + [[ $fmt == md ]] && cat << EOF >> "$TMPFILE" +The rest of the text file is a **Markdown** blog post. The process will continue +as soon as you exit your editor. + +$template_tags_line_header keep-this-tag-format, tags-are-optional, beware-with-underscores-in-markdown, example +EOF + fi + chmod 600 "$TMPFILE" + + post_status="E" + filename="" + while [[ $post_status != "p" && $post_status != "P" ]]; do + [[ -n $filename ]] && rm "$filename" # Delete the generated html file, if any + $EDITOR "$TMPFILE" + if [[ $fmt == md ]]; then + html_from_md=$(markdown "$TMPFILE") + parse_file "$html_from_md" + rm "$html_from_md" + else + parse_file "$TMPFILE" # this command sets $filename as the html processed file + fi + + chmod 644 "$filename" + [[ -n $preview_url ]] || preview_url=$global_url + echo "To preview the entry, open $preview_url/$filename in your browser" + + echo -n "[P]ost this entry, [E]dit again, [D]raft for later? (p/E/d) " + read -r post_status + if [[ $post_status == d || $post_status == D ]]; then + mkdir -p "drafts/" + chmod 700 "drafts/" + + title=$(head -n 1 $TMPFILE) + [[ -n $convert_filename ]] && title=$(echo "$title" | eval "$convert_filename") + [[ -n $title ]] || title=$RANDOM + + draft=drafts/$title.$fmt + mv "$TMPFILE" "$draft" + chmod 600 "$draft" + rm "$filename" + delete_includes + echo "Saved your draft as '$draft'" + exit + fi + done + + if [[ $fmt == md && -n $save_markdown ]]; then + mv "$TMPFILE" "${filename%%.*}.md" + else + rm "$TMPFILE" + fi + chmod 644 "$filename" + echo "Posted $filename" + relevant_tags=$(tags_in_post $filename) + if [[ -n $relevant_tags ]]; then + relevant_posts="$(posts_with_tags $relevant_tags) $filename" + rebuild_tags "$relevant_posts" "$relevant_tags" + fi +} + +# Create an index page with all the posts +all_posts() { + echo -n "Creating an index page with all the posts " + contentfile=$archive_index.$RANDOM + while [[ -f $contentfile ]]; do + contentfile=$archive_index.$RANDOM + done + + { + echo "

$template_archive_title

" + prev_month="" + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue + echo -n "." 1>&3 + # Month headers + month=$(LC_ALL=$date_locale date -r "$i" +"$date_allposts_header") + if [[ $month != "$prev_month" ]]; then + [[ -n $prev_month ]] && echo "" # Don't close ul before first header + echo "

$month

" + echo "
    " + prev_month=$month + fi + # Title + title=$(get_post_title "$i") + echo -n "
  • $title —" + # Date + date=$(LC_ALL=$date_locale date -r "$i" +"$date_format") + echo " $date
  • " + done < <(ls -t ./*.html) + echo "" 1>&3 + echo "
" + echo "" + } 3>&1 >"$contentfile" + + create_html_page "$contentfile" "$archive_index.tmp" yes "$global_title — $template_archive_title" "$global_author" + mv "$archive_index.tmp" "$archive_index" + chmod 644 "$archive_index" + rm "$contentfile" +} + +# Create an index page with all the tags +all_tags() { + echo -n "Creating an index page with all the tags " + contentfile=$tags_index.$RANDOM + while [[ -f $contentfile ]]; do + contentfile=$tags_index.$RANDOM + done + + { + echo "

$template_tags_title

" + echo "
    " + for i in $prefix_tags*.html; do + [[ -f "$i" ]] || break + echo -n "." 1>&3 + nposts=$(grep -c "<\!-- text begin -->" "$i") + tagname=${i#"$prefix_tags"} + tagname=${tagname%.html} + case $nposts in + 1) word=$template_tags_posts_singular;; + 2|3|4) word=$template_tags_posts_2_4;; + *) word=$template_tags_posts;; + esac + echo "
  • $tagname — $nposts $word
  • " + done + echo "" 1>&3 + echo "
" + echo "" + } 3>&1 > "$contentfile" + + create_html_page "$contentfile" "$tags_index.tmp" yes "$global_title — $template_tags_title" "$global_author" + mv "$tags_index.tmp" "$tags_index" + chmod 644 "$tags_index" + rm "$contentfile" +} + +# Generate the index.html with the content of the latest posts +rebuild_index() { + echo -n "Rebuilding the index " + newindexfile=$index_file.$RANDOM + contentfile=$newindexfile.content + while [[ -f $newindexfile ]]; do + newindexfile=$index_file.$RANDOM + contentfile=$newindexfile.content + done + + # Create the content file + { + n=0 + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue; + if ((n >= number_of_index_articles)); then break; fi + if [[ -n $cut_do ]]; then + get_html_file_content 'entry' 'entry' 'cut' <"$i" | awk "/$cut_line/ { print \"

$template_read_more

\" ; next } 1" + else + get_html_file_content 'entry' 'entry' <"$i" + fi + echo -n "." 1>&3 + n=$(( n + 1 )) + done < <(ls -t ./*.html) # sort by date, newest first + + feed=$blog_feed + if [[ -n $global_feedburner ]]; then feed=$global_feedburner; fi + echo "" + } 3>&1 >"$contentfile" + + echo "" + + create_html_page "$contentfile" "$newindexfile" yes "$global_title" "$global_author" + rm "$contentfile" + mv "$newindexfile" "$index_file" + chmod 644 "$index_file" +} + +# Finds all tags referenced in one post. +# Accepts either filename as first argument, or post content at stdin +# Prints one line with space-separated tags to stdout +tags_in_post() { + sed -n "/^

$template_tags_line_header/{s/^

$template_tags_line_header//;s/<[^>]*>//g;s/[ ,]\+/ /g;p;}" "$1" | tr ', ' ' ' +} + +# Finds all posts referenced in a number of tags. +# Arguments are tags +# Prints one line with space-separated tags to stdout +posts_with_tags() { + (($# < 1)) && return + set -- "${@/#/$prefix_tags}" + set -- "${@/%/.html}" + sed -n '/^

/{s/.*href="\([^"]*\)">.*/\1/;p;}' "$@" 2> /dev/null +} + +# Rebuilds tag_*.html files +# if no arguments given, rebuilds all of them +# if arguments given, they should have this format: +# "FILE1 [FILE2 [...]]" "TAG1 [TAG2 [...]]" +# where FILEn are files with posts which should be used for rebuilding tags, +# and TAGn are names of tags which should be rebuilt. +# example: +# rebuild_tags "one_post.html another_article.html" "example-tag another-tag" +# mind the quotes! +rebuild_tags() { + if (($# < 2)); then + # will process all files and tags + files=$(ls -t ./*.html) + all_tags=yes + else + # will process only given files and tags + files=$(printf '%s\n' $1 | sort -u) + files=$(ls -t $files) + tags=$2 + fi + echo -n "Rebuilding tag pages " + n=0 + if [[ -n $all_tags ]]; then + rm ./"$prefix_tags"*.html &> /dev/null + else + for i in $tags; do + rm "./$prefix_tags$i.html" &> /dev/null + done + fi + # First we will process all files and create temporal tag files + # with just the content of the posts + tmpfile=tmp.$RANDOM + while [[ -f $tmpfile ]]; do tmpfile=tmp.$RANDOM; done + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue; + echo -n "." + if [[ -n $cut_do ]]; then + get_html_file_content 'entry' 'entry' 'cut' <"$i" | awk "/$cut_line/ { print \"

$template_read_more

\" ; next } 1" + else + get_html_file_content 'entry' 'entry' <"$i" + fi >"$tmpfile" + for tag in $(tags_in_post "$i"); do + if [[ -n $all_tags || " $tags " == *" $tag "* ]]; then + cat "$tmpfile" >> "$prefix_tags$tag".tmp.html + fi + done + done <<< "$files" + rm "$tmpfile" + # Now generate the tag files with headers, footers, etc + while IFS='' read -r i; do + tagname=${i#./"$prefix_tags"} + tagname=${tagname%.tmp.html} + create_html_page "$i" "$prefix_tags$tagname.html" yes "$global_title — $template_tag_title \"$tagname\"" "$global_author" + rm "$i" + done < <(ls -t ./"$prefix_tags"*.tmp.html 2>/dev/null) + echo +} + +# Return the post title +# +# $1 the html file +get_post_title() { + awk '/

/, /<\/a><\/h3>/{if (!/

/ && !/<\/a><\/h3>/) print}' "$1" +} + +# Return the post author +# +# $1 the html file +get_post_author() { + awk '/
.+/, //{if (!/
.+/ && !//) print}' "$1" | sed 's/<\/div>//g' +} + +# Displays a list of the tags +# +# $2 if "-n", tags will be sorted by number of posts +list_tags() { + if [[ $2 == -n ]]; then do_sort=1; else do_sort=0; fi + + ls ./$prefix_tags*.html &> /dev/null + (($? != 0)) && echo "No posts yet. Use 'bb.sh post' to create one" && return + + lines="" + for i in $prefix_tags*.html; do + [[ -f "$i" ]] || break + nposts=$(grep -c "<\!-- text begin -->" "$i") + tagname=${i#"$prefix_tags"} + tagname=${tagname#.html} + ((nposts > 1)) && word=$template_tags_posts || word=$template_tags_posts_singular + line="$tagname # $nposts # $word" + lines+=$line\\n + done + + if (( do_sort == 1 )); then + echo -e "$lines" | column -t -s "#" | sort -nrk 2 + else + echo -e "$lines" | column -t -s "#" + fi +} + +# Displays a list of the posts +list_posts() { + ls ./*.html &> /dev/null + (($? != 0)) && echo "No posts yet. Use 'bb.sh post' to create one" && return + + lines="" + n=1 + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue + line="$n # $(get_post_title "$i") # $(LC_ALL=$date_locale date -r "$i" +"$date_format")" + lines+=$line\\n + n=$(( n + 1 )) + done < <(ls -t ./*.html) + + echo -e "$lines" | column -t -s "#" +} + +# Generate the feed file +make_rss() { + echo -n "Making RSS " + + rssfile=$blog_feed.$RANDOM + while [[ -f $rssfile ]]; do rssfile=$blog_feed.$RANDOM; done + + { + pubdate=$(LC_ALL=C date +"$date_format_full") + echo '' + echo '' + echo "$global_title$global_url/$index_file" + echo "$global_descriptionen" + echo "$pubdate" + echo "$pubdate" + echo "" + + n=0 + while IFS='' read -r i; do + is_boilerplate_file "$i" && continue + ((n >= number_of_feed_articles)) && break # max 10 items + echo -n "." 1>&3 + echo '' + get_post_title "$i" + echo '$global_url/${i#./}" + echo "$global_url/$i" + echo "$(get_post_author "$i")" + echo "$(LC_ALL=C date -r "$i" +"$date_format_full")" + + n=$(( n + 1 )) + done < <(ls -t ./*.html) + + echo '' + } 3>&1 >"$rssfile" + echo "" + + mv "$rssfile" "$blog_feed" + chmod 644 "$blog_feed" +} + +# generate headers, footers, etc +create_includes() { + { + echo "

$global_title

" + echo "
$global_description
" + } > ".title.html" + + if [[ -f $header_file ]]; then cp "$header_file" .header.html + else { + echo '' + echo '' + echo '' + echo '' + printf '\n' "${css_include[@]}" + if [[ -z $global_feedburner ]]; then + echo "" + else + echo "" + fi + } > ".header.html" + fi + + if [[ -f $footer_file ]]; then cp "$footer_file" .footer.html + else { + protected_mail=${global_email//@/@} + protected_mail=${protected_mail//./.} + echo "
$global_license $global_author$protected_mail
" + echo 'generated with bashblog, a single bash script to easily create blogs like this one
' + } >> ".footer.html" + fi +} + +# Delete the temporarily generated include files +delete_includes() { + rm ".title.html" ".footer.html" ".header.html" +} + +# Create the css file from scratch +create_css() { + # To avoid overwriting manual changes. However it is recommended that + # this function is modified if the user changes the blog.css file + (( ${#css_include[@]} > 0 )) && return || css_include=('main.css' 'blog.css') + if [[ ! -f blog.css ]]; then + # blog.css directives will be loaded after main.css and thus will prevail + echo '#title{font-size: x-large;} + a.ablack{color:black !important;} + li{margin-bottom:8px;} + ul,ol{margin-left:24px;margin-right:24px;} + #all_posts{margin-top:24px;text-align:center;} + .subtitle{font-size:small;margin:12px 0px;} + .content p{margin-left:24px;margin-right:24px;} + h1{margin-bottom:12px !important;} + #description{font-size:large;margin-bottom:12px;} + h3{margin-top:42px;margin-bottom:8px;} + h4{margin-left:24px;margin-right:24px;} + img{max-width:100%;} + #twitter{line-height:20px;vertical-align:top;text-align:right;font-style:italic;color:#333;margin-top:24px;font-size:14px;}' > blog.css + fi + + # If there is a style.css from the parent page (i.e. some landing page) + # then use it. This directive is here for compatibility with my own + # home page. Feel free to edit it out, though it doesn't hurt + if [[ -f ../style.css ]] && [[ ! -f main.css ]]; then + ln -s "../style.css" "main.css" + elif [[ ! -f main.css ]]; then + echo 'body{font-family:Georgia,"Times New Roman",Times,serif;margin:0;padding:0;background-color:#F3F3F3;} + #divbodyholder{padding:5px;background-color:#DDD;width:100%;max-width:874px;margin:24px auto;} + #divbody{border:solid 1px #ccc;background-color:#fff;padding:0px 48px 24px 48px;top:0;} + .headerholder{background-color:#f9f9f9;border-top:solid 1px #ccc;border-left:solid 1px #ccc;border-right:solid 1px #ccc;} + .header{width:100%;max-width:800px;margin:0px auto;padding-top:24px;padding-bottom:8px;} + .content{margin-bottom:5%;} + .nomargin{margin:0;} + .description{margin-top:10px;border-top:solid 1px #666;padding:10px 0;} + h3{font-size:20pt;width:100%;font-weight:bold;margin-top:32px;margin-bottom:0;} + .clear{clear:both;} + #footer{padding-top:10px;border-top:solid 1px #666;color:#333333;text-align:center;font-size:small;font-family:"Courier New","Courier",monospace;} + a{text-decoration:none;color:#003366 !important;} + a:visited{text-decoration:none;color:#336699 !important;} + blockquote{background-color:#f9f9f9;border-left:solid 4px #e9e9e9;margin-left:12px;padding:12px 12px 12px 24px;} + blockquote img{margin:12px 0px;} + blockquote iframe{margin:12px 0px;}' > main.css + fi +} + +# Regenerates all the single post entries, keeping the post content but modifying +# the title, html structure, etc +rebuild_all_entries() { + echo -n "Rebuilding all entries " + + for i in ./*.html; do + is_boilerplate_file "$i" && continue; + contentfile=.tmp.$RANDOM + while [[ -f $contentfile ]]; do contentfile=.tmp.$RANDOM; done + + echo -n "." + # Get the title and entry, and rebuild the html structure from scratch (divs, title, description...) + title=$(get_post_title "$i") + + get_html_file_content 'text' 'text' <"$i" >> "$contentfile" + + # Read timestamp from post, if present, and sync file timestamp + timestamp=$(awk '// { print }' "$i" | cut -d '#' -f 2) + [[ -n $timestamp ]] && touch -t "$timestamp" "$i" + # Read timestamp from file in correct format for 'create_html_page' + timestamp=$(LC_ALL=C date -r "$i" +"$date_format_full") + + create_html_page "$contentfile" "$i.rebuilt" no "$title" "$timestamp" "$(get_post_author "$i")" + # keep the original timestamp! + timestamp=$(LC_ALL=C date -r "$i" +"$date_format_timestamp") + mv "$i.rebuilt" "$i" + chmod 644 "$i" + touch -t "$timestamp" "$i" + rm "$contentfile" + done + echo "" +} + +# Displays the help +usage() { + echo "$global_software_name v$global_software_version" + echo "usage: bb command [filename]" + echo "" + echo "Commands:" + echo " post [-html] [filename] insert a new blog post, or the filename of a draft to continue editing it" + echo " it tries to use markdown by default, and falls back to HTML if it's not available." + echo " use '-html' to override it and edit the post as HTML even when markdown is available" + echo " edit [-n|-f] [filename] edit an already published .html or .md file. **NEVER** edit manually a published .html file," + echo " always use this function as it keeps internal data and rebuilds the blog" + echo " use '-n' to give the file a new name, if title was changed" + echo " use '-f' to edit full html file, instead of just text part (also preserves name)" + echo " delete [filename] deletes the post and rebuilds the blog" + echo " rebuild regenerates all the pages and posts, preserving the content of the entries" + echo " reset deletes everything except this script. Use with a lot of caution and back up first!" + echo " list list all posts" + echo " tags [-n] list all tags in alphabetical order" + echo " use '-n' to sort list by number of posts" + echo "" + echo "for more information please see https://tilde.team/wiki/?page=tildeblogs" + echo "source here: https://tildegit.org/team/bashblog" +} + +# Delete all generated content, leaving only this script +reset() { + echo "Are you sure you want to delete all blog entries? Please write \"Yes, I am!\" " + read -r line + if [[ $line == "Yes, I am!" ]]; then + rm .*.html ./*.html ./*.css ./*.rss &> /dev/null + echo + echo "Deleted all posts, stylesheets and feeds." + echo "Kept your old '.backup.tar.gz' just in case, please delete it manually if needed." + else + echo "Phew! You dodged a bullet there. Nothing was modified." + fi +} + +# Detects if GNU date is installed +date_version_detect() { + date --version >/dev/null 2>&1 + if (($? != 0)); then + # date utility is BSD. Test if gdate is installed + if gdate --version >/dev/null 2>&1 ; then + date() { + gdate "$@" + } + else + # BSD date + date() { + if [[ $1 == -r ]]; then + # Fall back to using stat for 'date -r' + format=${3//+/} + stat -f "%Sm" -t "$format" "$2" + elif [[ $2 == --date* ]]; then + # convert between dates using BSD date syntax + command date -j -f "$date_format_full" "${2#--date=}" "$1" + else + # acceptable format for BSD date + command date -j "$@" + fi + } + fi + fi +} + +# Main function +# Encapsulated on its own function for readability purposes +# +# $1 command to run +# $2 file name of a draft to continue editing (optional) +do_main() { + # make sure we're in the right directory + #[ $(pwd) != $HOME/public_html/blog ] && + # echo "you're not in your blog directory. moving you there now" && mkdir -p $HOME/public_html/blog && cd $HOME/public_html/blog + + # Detect if using BSD date or GNU date + date_version_detect + # Load default configuration, then override settings with the config file + global_variables + [[ -f $global_config ]] && source "$global_config" &> /dev/null + global_variables_check + + # Check for $EDITOR + [[ -z $EDITOR ]] && + echo "Please set your \$EDITOR environment variable. For example, to use nano, add the line 'export EDITOR=nano' to your \$HOME/.bashrc file" && exit + + # Check for validity of argument + [[ $1 != "reset" && $1 != "post" && $1 != "rebuild" && $1 != "list" && $1 != "edit" && $1 != "delete" && $1 != "tags" ]] && + usage && exit + + [[ $1 == list ]] && + list_posts && exit + + [[ $1 == tags ]] && + list_tags "$@" && exit + + if [[ $1 == edit ]]; then + if (($# < 2)) || [[ ! -f ${!#} ]]; then + echo "Please enter a valid .md or .html file to edit" + exit + fi + fi + + # Test for existing html files + if ls ./*.html &> /dev/null; then + # We're going to back up just in case + tar -c -z -f ".backup.tar.gz" -- *.html && + chmod 600 ".backup.tar.gz" + elif [[ $1 == rebuild ]]; then + echo "Can't find any html files, nothing to rebuild" + exit + fi + + # Keep first backup of this day containing yesterday's version of the blog + [[ ! -f .yesterday.tar.gz || $(date -r .yesterday.tar.gz +'%d') != "$(date +'%d')" ]] && + cp .backup.tar.gz .yesterday.tar.gz &> /dev/null + + [[ $1 == reset ]] && + reset && exit + + create_css + create_includes + [[ $1 == post ]] && write_entry "$@" + [[ $1 == rebuild ]] && rebuild_all_entries && rebuild_tags + [[ $1 == delete ]] && rm "$2" &> /dev/null && rebuild_tags + if [[ $1 == edit ]]; then + if [[ $2 == -n ]]; then + edit "$3" + elif [[ $2 == -f ]]; then + edit "$3" full + else + edit "$2" keep + fi + fi + rebuild_index + all_posts + all_tags + make_rss + delete_includes +} + + +# +# MAIN +# Do not change anything here. If you want to modify the code, edit do_main() +# +do_main "$@" + +# vim: set shiftwidth=4 tabstop=4 expandtab: diff --git a/blog/blog.css b/blog/blog.css new file mode 100644 index 0000000..c01e7f6 --- /dev/null +++ b/blog/blog.css @@ -0,0 +1,29 @@ +body { + background:#1c1c1c; + color:#a7d129; + margin:0; + padding:0; +} +hr{ + color:#32302f; +} +ul{ + list-style: none; +} +li{ + color:#81b214; +} +a{ + text-decoration:none; + color:#9ede73; +} +h1,h2,h3,h4,h5,h6{color:#9ede73;} +h1{margin-bottom:12px !important;} +h4{margin-left:24px;margin-right:24px;} +img{max-width:100%;} +h3{font-size:20pt;width:100%;font-weight:bold;margin-top:32px;margin-bottom:0;} +header{width:100%;max-width:800px;margin:0px auto;padding-top:24px;padding-bottom:8px;} +#footer{padding-top:10px;border-top:solid 1px #666;text-align:center;font-size:small;font-family:"Courier New","Courier",monospace;} +#all_posts{margin-top:24px;margin-bottom:24px;text-align:center;} +.subtitle{font-size:small;margin:12px 0px;} +.content p{margin-left:24px;margin-right:24px;} diff --git a/blog/feed.rss b/blog/feed.rss new file mode 100644 index 0000000..d2cc86a --- /dev/null +++ b/blog/feed.rss @@ -0,0 +1,629 @@ + + +GRU's bloghttps://gru.codeberg.page/blog/index.html +GRU's blogen +Tue, 14 Dec 2021 13:57:36 +0000 +Tue, 14 Dec 2021 13:57:36 +0000 + + +GRU Devlog 20 - olibc +This week I was making olibc. I was implementing <string.h>. Also I was fixing liblinux to +be able to include it without need to use full path in #include. I had several other issues +with it and also fixed them.

+ +

My current goal is to implement <string.h> and after that I am planning to publish it. +Currently most of funcs are implemented. Making strtok now but all other functions need +locale.h and I don’t know yet how I will be implemented. But it is already cool that we +have most of functions that should be in <string.h>!

+ +

Also we now have gru webpage on codeberg! Maybe next week I +will move all devlogs to gru webpage so it will be easier to move.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, olibc, liblinux

+ + + +]]>
https://gru.codeberg.page/blog/gru-devlog-20---olibc.html +https://gru.codeberg.page/blog/./gru-devlog-20---olibc.html +G1n +Sun, 12 Dec 2021 17:46:18 +0000
+ +GRU Devlog 19 - gic and several libs +This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-19---gic-and-several-libs.html +https://gru.codeberg.page/blog/./gru-devlog-19---gic-and-several-libs.html +G1n +Sun, 05 Dec 2021 16:57:11 +0000
+ +GRU Devlog 17-18 - coreutils, EGG and ideas +Last week I didn’t make devlog because was busy and haven’t done anything useful except +mkdir for coreutils.

+ +

This week I started from try to make something in framebuffer but currently nothing, because +I can’t even understand why my code can’t see size of my display. I think E will require making +something like Elib for easier communicating with E (but it will be in very far future…)

+ +

Then I made echo and very simple ls for coreutils. I am going to add more flags to ls next week. +This week I also have made simple irc bot in python, so I will try to make simple clone of suckless ii +on C (i think name gic is now really good so if you have ideas please suggest them to me). +Currently I don’t reallly understand how to work with sockets but I will try to do something.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, coreutils, egg

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-17-18---coreutils-egg-and-ideas.html +https://gru.codeberg.page/blog/./gru-devlog-17-18---coreutils-egg-and-ideas.html +G1n +Sun, 28 Nov 2021 17:06:52 +0000
+ +GRU Devlog 16 - ormp and EGG +This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-16---ormp-and-egg.html +https://gru.codeberg.page/blog/./gru-devlog-16---ormp-and-egg.html +G1n +Sun, 14 Nov 2021 17:03:05 +0000
+ +GRU Devlog 15 - ocpu, yemu and licenses +This week wasn’t very productive. I was working on one of my personal projects.

+ +

I have added ADD for registers, INC, DEC and NOP instructions.

+ +

Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, ocpu, yemu, license

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-15---ocpu-yemu-and-licenses.html +https://gru.codeberg.page/blog/./gru-devlog-15---ocpu-yemu-and-licenses.html +G1n +Sun, 07 Nov 2021 17:00:07 +0000
+ +GRU Devlog 14 - ocpu and yemu +This week I was working on ocpu emulator. So using it we can know if specifications can be implemented. +It helps me adding some description to it.

+ +

First I made yemu a bit modular, so you need to add several lines to main file and then building your emulator +based on template (that should be placed in docs one day). Now if someone would like to add some architecture to +our emulator they won’t need to rewrite it from scratch.

+ +

I also added –system flag to yemu so architecture can be choosen more user-friendly way.

+ +

Currently in ocpu emulator only mov and add instructions are implemented. +We also added some description to commands in specifications, so it is easier to understand what it should do

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, ocpu

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-14---ocpu-and-yemu.html +https://gru.codeberg.page/blog/./gru-devlog-14---ocpu-and-yemu.html +G1n +Sun, 31 Oct 2021 17:14:06 +0000
+ +GRU Devlog 13 - ocpu thoughts and some elecronics +This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-13---ocpu-thoughts-and-some-elecronics.html +https://gru.codeberg.page/blog/./gru-devlog-13---ocpu-thoughts-and-some-elecronics.html +G1n +Sun, 24 Oct 2021 16:05:58 +0000
+ +GRU Devlog 12 - yemu, gasm and ocpu +This week I have done several new instructions for yemu. For example all transfer instructions.

+ +

Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start.

+ +

But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it here. +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it.

+ +

Also smlckz’s idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino!

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, gasm, ocpu

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-13---yemu-gasm-and-ocpu.html +https://gru.codeberg.page/blog/./gru-devlog-13---yemu-gasm-and-ocpu.html +G1n +Sun, 17 Oct 2021 17:10:17 +0000
+ +GRU Devlog 11 - yemu and channel on libera.chat +I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-11---yemu-and-channel-on-liberachat.html +https://gru.codeberg.page/blog/./gru-devlog-11---yemu-and-channel-on-liberachat.html +G1n +Fri, 08 Oct 2021 15:18:16 +0000
+ +GRU Devlog 10 - orsh now like proper shell and gasm +Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-10---orsh-now-like-proper-shell-and-gasm.html +https://gru.codeberg.page/blog/./gru-devlog-10---orsh-now-like-proper-shell-and-gasm.html +G1n +Sun, 03 Oct 2021 15:54:01 +0000
+ +GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.html +https://gru.codeberg.page/blog/./gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.html +G1n +Sun, 26 Sep 2021 16:59:17 +0000
+ +GRU Devlog 8 - orsh and published initrd +This week I have published initrd, but it is not working as expected.

+ +

Also I have started one more project - orsh. It is one more shell, but now in C. +Maybe it will be easier to port to Orion. It already supports ; but they are working a bit weird.

+ +

Also in orsh you can work with environment variables. +From today’s morning I am trying to replace bash with it, but still a lot need to be done.

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orsh, orion

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-8---orsh-and-published-initrd.html +https://gru.codeberg.page/blog/./gru-devlog-8---orsh-and-published-initrd.html +G1n +Sun, 19 Sep 2021 16:18:12 +0000
+ +GRU Devlog 7 - keyboard, paging and WIP initrd in Orion +This week I was improving Orion. First I made keyboard working, next day paging! +Also I have added several new LibC functions. +Today I have made scrolling working.

+ +

Last few days I was trying to make initrd working +(this required heap implementing so I also did that but I don’t know if it works correctly). +Currently it can only output /dev directory.

+ +

But I made something wrong with %x in printf and it can display weird chars first +and then contents of files!

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.html +https://gru.codeberg.page/blog/./gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.html +G1n +Sun, 12 Sep 2021 17:10:09 +0000
+ +GRU Devlog 6 - yemu, published gxt and interrupts working in Orion +This week I have published gxt, but it currently works as more (only down scrolling). +Also it has a lot of of runtime error (Segmentation fault and others).

+ +

I have started working on yemu - Yet another EMUlator. It currently supports only 6502 +proccessor with tiny number of instructions (LDA, LDX and LDY)

+ +

Today we have fixed interrupts in Orion and now I can implement timer, paging, keyboard +and a lot of other things (thanks to quinn and smlckz from tilde.chat)

+ +

Hope you liked this post and if you would like to help me, +contact me via email, xmpp or irc :)

+ +

tags: gru, gxt, yemu, orion

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.html +https://gru.codeberg.page/blog/./gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.html +G1n +Sun, 05 Sep 2021 16:33:09 +0000
+ +GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) +This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future).

+ +

Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor.

+ +

Currently it can only move cursor and display files. But I think I’ll publish it next week +when editing will be working.

+ +

Bad news is that my school lessons will start next week so maybe this devlogs won’t be +published every week, because of not enough work done. But I don’t know, maybe I’ll have +enough time.

+ +

Also good news - we have first contribution on codeberg to grsh. I didn’t know this person +(because he is not from tildeverse :) ), so it is cool!

+ +

Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :)

+ +

tags: gru, coreutils, contribution, gxt, grsh

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.html +https://gru.codeberg.page/blog/./gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.html +G1n +Sun, 29 Aug 2021 16:27:38 +0000
+ +GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg +In first days of this week I thought it will be not very productive. +But I was wrong.

+ +

We now have webpage and organizations on tildegit/codeberg:

+ +

https://g1n.ttm.sh/gru/

+ +

Also I am working on some new projects:

+ +
    +
  • orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet)

  • +
  • gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet)

  • +
  • hexutils - I think hexdump, xxd and some other utils will be in this project

  • +
+ + +

Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this.

+ +

And of course if you can help me please contact me in someway! :)

+ +

tags: gru, orcc, gasm, hexutils, webpage

+ + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.html +https://gru.codeberg.page/blog/./gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.html +G1n +Sun, 22 Aug 2021 16:08:03 +0000
+ +GRU DevLog 3 - Orion and dreams about GRU software future +This week I was trying to make interrupts, paging and other memory things working in Orion. +I found this guide and tried to follow it without rewriting the whole project: +http://www.jamesmolloy.co.uk/index.html

+ +

For now only Global Descriptor Table maybe working.

+ +

My current goals/dreams:

+ +
    +
  • make filesystem (the coolest would be make Ext2 driver)

  • +
  • build GCC hosted compiler (this will help GCC understand our OS better)

  • +
+ + +

My very future dreams:

+ +
    +
  • make kernel, libs, ports and soft in different repos

  • +
  • make proper way to make “distros” on our kernel

  • +
  • make some website with mirror of ports scripts (like in Serenity OS but not in one repo with +everything and tool for searching and downloading ports from that mirror)

  • +
  • maybe (if i will work a lot on this projects) I’ll make one more account on tilde.team +for our organisation (domain name - gru.ttm.sh, is cool), but i’ll ask admins about that

  • +
+ + +

Also I think Orion need new name because i found several projects with this name :)

+ +

Some ideas about the GRU name:

+ +
    +
  • GRU rocks (or rocking) UNIX

  • +
  • GloRious UNIX

  • +
  • GloRious Union

  • +
+ + +

If you can help me or have some ideas (name/names or anything else) contact me via email +or any other type of contact (irc: g1n on tilde.chat, xmpp: g1n@hmm.st)

+ +

tags: gru, orion, dreams

+ + + + + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-3---orion-and-dreams-about-gru-software-future.html +https://gru.codeberg.page/blog/./gru-devlog-3---orion-and-dreams-about-gru-software-future.html +G1n +Sun, 15 Aug 2021 17:11:33 +0000
+ +GRU DevLog 2 - Orion +This week I was developing new OS - Orion.

+ +

I don’t understand very basic osdev thing so I decided to make OS on C and Asm. +Currently that can just output text (with printf arguments) on screen and serial. +Now gros is much cooler than Orion - it has input, interupts and a lot of else. +But maybe I’ll understand OSdev better. +Currently working on GDT (global descriptor table) and than will work on +interrupts and exceptions.

+ +

Of course if you can help me contact me throught email or in other ways!

+ +

tags: gru, orion

+ + + + + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-2---orion.html +https://gru.codeberg.page/blog/./gru-devlog-2---orion.html +G1n +Sun, 08 Aug 2021 14:11:43 +0000
+ +GRU DevLog 1 - gros sources published and add wc to grutils +I didn’t make a lot work this week, so i think this devlogs should be renamed from “week number” to just “number” +Ok, so what i did this week: +- Add wc to grutils +- Published gros +- Add basic shell and some commands for gros

+ +

I know that is not a lot, but i was reading some osdev articles and books. +Currently I would like to implement basic filesystem but i don’t know what to do.

+ +

Some goals for gros (I will add that to gros readme): +- Filesystem (FAT or Ext2) +- ELF or other executable formats +- LibC (for compiling C programs) +- Maybe basic networking but after all of that

+ +

All code in osdev wiki is for C so I need to implement it myself (or port existing rust code)

+ +

If you can help me somehow please contact me via email (g1n@ttm.sh) or in other ways (~chat irc, xmpp)

+ +

tags: gru, grutils, gros

+ + + + + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.html +https://gru.codeberg.page/blog/./gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.html +G1n +Sun, 01 Aug 2021 16:12:04 +0000
+ +GRU DevLog Week 0 - grsh, grutils and start of gros +So I have started new project this week - grsh! It is shell written on Rust. Also, for now, other rewrites of coreutils are there.

+ +

What grsh can do for this moment: echo some variables (pwd, user, home, status of previous command using $?) and text; true, false, : - set status; pwd shows current dir, also comments and cd working, basic piping (thanks to that article and of course executing not builtin command also working.

+ +

Some grutils that I made: ls, touch, mkdir/rmdir, rm, grep, head/tail, yes, cat.

+ +

TODOs exist in grsh repo - so you can read there some of my plans.

+ +

Yesterday i have started GROS - OS on Rust! But I haven’t published code yet because it not have that minimum of funcionality that i want. Thanks for that site for teaching how to make basics - https://os.phil-opp.com

+ +

So it was first of GRU Devlog! Thanks for reading! If you want to contribute to some of that project write me an email - g1n@ttm.sh , or contact me in other ways

+ +

tags: gru, grsh, grutils, gros

+ + + + + + + + +]]>
https://gru.codeberg.page/blog/gru-devlog-week-0---grsh-grutils-and-start-of-gros.html +https://gru.codeberg.page/blog/./gru-devlog-week-0---grsh-grutils-and-start-of-gros.html +G1n +Sun, 25 Jul 2021 17:22:59 +0000
+
diff --git a/blog/gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.html b/blog/gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.html new file mode 100644 index 0000000..f9a8861 --- /dev/null +++ b/blog/gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.html @@ -0,0 +1,60 @@ + + + + + + + +GRU DevLog 1 - gros sources published and add wc to grutils + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU DevLog 1 - gros sources published and add wc to grutils +

+ +
August 01, 2021 — +G1n +
+ + +

I didn’t make a lot work this week, so i think this devlogs should be renamed from “week number” to just “number” +Ok, so what i did this week: +- Add wc to grutils +- Published gros +- Add basic shell and some commands for gros

+ +

I know that is not a lot, but i was reading some osdev articles and books. +Currently I would like to implement basic filesystem but i don’t know what to do.

+ +

Some goals for gros (I will add that to gros readme): +- Filesystem (FAT or Ext2) +- ELF or other executable formats +- LibC (for compiling C programs) +- Maybe basic networking but after all of that

+ +

All code in osdev wiki is for C so I need to implement it myself (or port existing rust code)

+ +

If you can help me somehow please contact me via email (g1n@ttm.sh) or in other ways (~chat irc, xmpp)

+ +

tags: gru, grutils, gros

+ + + + + + + + + +
+ +
+ diff --git a/blog/gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.md b/blog/gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.md new file mode 100644 index 0000000..897f153 --- /dev/null +++ b/blog/gru-devlog-1---gros-sources-published-and-add-wc-to-grutils.md @@ -0,0 +1,22 @@ +GRU DevLog 1 - gros sources published and add wc to grutils + +I didn't make a lot work this week, so i think this devlogs should be renamed from "week number" to just "number" +Ok, so what i did this week: +- Add wc to grutils +- Published gros +- Add basic shell and some commands for gros + +I know that is not a lot, but i was reading some osdev articles and books. +Currently I would like to implement basic filesystem but i don't know what to do. + +Some goals for gros (I will add that to gros readme): +- Filesystem (FAT or Ext2) +- ELF or other executable formats +- LibC (for compiling C programs) +- Maybe basic networking but after all of that + +All code in osdev wiki is for C so I need to implement it myself (or port existing rust code) + +If you can help me somehow please contact me via email (g1n@ttm.sh) or in other ways (~chat irc, xmpp) + +tags: gru, grutils, gros diff --git a/blog/gru-devlog-10---orsh-now-like-proper-shell-and-gasm.html b/blog/gru-devlog-10---orsh-now-like-proper-shell-and-gasm.html new file mode 100644 index 0000000..f01d6ac --- /dev/null +++ b/blog/gru-devlog-10---orsh-now-like-proper-shell-and-gasm.html @@ -0,0 +1,66 @@ + + + + + + + +GRU Devlog 10 - orsh now like proper shell and gasm + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-10---orsh-now-like-proper-shell-and-gasm.md b/blog/gru-devlog-10---orsh-now-like-proper-shell-and-gasm.md new file mode 100644 index 0000000..abfee57 --- /dev/null +++ b/blog/gru-devlog-10---orsh-now-like-proper-shell-and-gasm.md @@ -0,0 +1,31 @@ +GRU Devlog 10 - orsh now like proper shell and gasm + +Hooray! Today is 10's GRU Devlog! :) + +This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks. + +First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!) + +Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion) + +Orsh also has one session history, so you don't need to rewrite command from scratch now + +And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need) + +Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven't published it yet. + +This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more! + +Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better. + +Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news diff --git a/blog/gru-devlog-11---yemu-and-channel-on-liberachat.html b/blog/gru-devlog-11---yemu-and-channel-on-liberachat.html new file mode 100644 index 0000000..9f4ad01 --- /dev/null +++ b/blog/gru-devlog-11---yemu-and-channel-on-liberachat.html @@ -0,0 +1,53 @@ + + + + + + + +GRU Devlog 11 - yemu and channel on libera.chat + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 11 - yemu and channel on libera.chat +

+ +
October 08, 2021 — +G1n +
+ + +

I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-11---yemu-and-channel-on-liberachat.md b/blog/gru-devlog-11---yemu-and-channel-on-liberachat.md new file mode 100644 index 0000000..f03a15c --- /dev/null +++ b/blog/gru-devlog-11---yemu-and-channel-on-liberachat.md @@ -0,0 +1,18 @@ +GRU Devlog 11 - yemu and channel on libera.chat + +I am making this devlog a bit earlier, because I will be busy on weekends. + +This week I didn't have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP. + +I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu. + +I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn't +very success, but I hope to do it more often :) + +Also I have registered #gru channel on libera, so you can join us also on libera.chat :) + +Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, yemu, libera, org-mode, org-roam diff --git a/blog/gru-devlog-13---ocpu-thoughts-and-some-elecronics.html b/blog/gru-devlog-13---ocpu-thoughts-and-some-elecronics.html new file mode 100644 index 0000000..7f8e75c --- /dev/null +++ b/blog/gru-devlog-13---ocpu-thoughts-and-some-elecronics.html @@ -0,0 +1,50 @@ + + + + + + + +GRU Devlog 13 - ocpu thoughts and some elecronics + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 13 - ocpu thoughts and some elecronics +

+ +
October 24, 2021 — +G1n +
+ + +

This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-13---ocpu-thoughts-and-some-elecronics.md b/blog/gru-devlog-13---ocpu-thoughts-and-some-elecronics.md new file mode 100644 index 0000000..800d8b7 --- /dev/null +++ b/blog/gru-devlog-13---ocpu-thoughts-and-some-elecronics.md @@ -0,0 +1,15 @@ +GRU Devlog 13 - ocpu thoughts and some elecronics + +This week was very busy week at school and I had no time for programming. + +But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required). + +But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder. + +I have created tiny log page - [lolcpu](https://g1n.ttm.sh/lolcpu/). I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things. + +Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, lolcpu, ocpu, transistors, electonics diff --git a/blog/gru-devlog-13---yemu-gasm-and-ocpu.html b/blog/gru-devlog-13---yemu-gasm-and-ocpu.html new file mode 100644 index 0000000..402397a --- /dev/null +++ b/blog/gru-devlog-13---yemu-gasm-and-ocpu.html @@ -0,0 +1,52 @@ + + + + + + + +GRU Devlog 12 - yemu, gasm and ocpu + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 12 - yemu, gasm and ocpu +

+ +
October 17, 2021 — +G1n +
+ + +

This week I have done several new instructions for yemu. For example all transfer instructions.

+ +

Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start.

+ +

But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it here. +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it.

+ +

Also smlckz’s idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino!

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, gasm, ocpu

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-13---yemu-gasm-and-ocpu.md b/blog/gru-devlog-13---yemu-gasm-and-ocpu.md new file mode 100644 index 0000000..ecefb05 --- /dev/null +++ b/blog/gru-devlog-13---yemu-gasm-and-ocpu.md @@ -0,0 +1,17 @@ +GRU Devlog 12 - yemu, gasm and ocpu + +This week I have done several new instructions for yemu. For example all transfer instructions. + +Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start. + +But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it [here](https://g1n.ttm.sh/gru/ocpu). +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it. + +Also smlckz's idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino! + +Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, yemu, gasm, ocpu diff --git a/blog/gru-devlog-14---ocpu-and-yemu.html b/blog/gru-devlog-14---ocpu-and-yemu.html new file mode 100644 index 0000000..b1bbbf3 --- /dev/null +++ b/blog/gru-devlog-14---ocpu-and-yemu.html @@ -0,0 +1,52 @@ + + + + + + + +GRU Devlog 14 - ocpu and yemu + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 14 - ocpu and yemu +

+ +
October 31, 2021 — +G1n +
+ + +

This week I was working on ocpu emulator. So using it we can know if specifications can be implemented. +It helps me adding some description to it.

+ +

First I made yemu a bit modular, so you need to add several lines to main file and then building your emulator +based on template (that should be placed in docs one day). Now if someone would like to add some architecture to +our emulator they won’t need to rewrite it from scratch.

+ +

I also added –system flag to yemu so architecture can be choosen more user-friendly way.

+ +

Currently in ocpu emulator only mov and add instructions are implemented. +We also added some description to commands in specifications, so it is easier to understand what it should do

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, ocpu

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-14---ocpu-and-yemu.md b/blog/gru-devlog-14---ocpu-and-yemu.md new file mode 100644 index 0000000..0bc3385 --- /dev/null +++ b/blog/gru-devlog-14---ocpu-and-yemu.md @@ -0,0 +1,17 @@ +GRU Devlog 14 - ocpu and yemu + +This week I was working on ocpu emulator. So using it we can know if specifications can be implemented. +It helps me adding some description to it. + +First I made yemu a bit modular, so you need to add several lines to main file and then building your emulator +based on template (that should be placed in docs one day). Now if someone would like to add some architecture to +our emulator they won't need to rewrite it from scratch. + +I also added --system flag to yemu so architecture can be choosen more user-friendly way. + +Currently in ocpu emulator only mov and add instructions are implemented. +We also added some description to commands in specifications, so it is easier to understand what it should do + +Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, yemu, ocpu diff --git a/blog/gru-devlog-15---ocpu-yemu-and-licenses.html b/blog/gru-devlog-15---ocpu-yemu-and-licenses.html new file mode 100644 index 0000000..7affa00 --- /dev/null +++ b/blog/gru-devlog-15---ocpu-yemu-and-licenses.html @@ -0,0 +1,46 @@ + + + + + + + +GRU Devlog 15 - ocpu, yemu and licenses + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 15 - ocpu, yemu and licenses +

+ +
November 07, 2021 — +G1n +
+ + +

This week wasn’t very productive. I was working on one of my personal projects.

+ +

I have added ADD for registers, INC, DEC and NOP instructions.

+ +

Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, ocpu, yemu, license

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-15---ocpu-yemu-and-licenses.md b/blog/gru-devlog-15---ocpu-yemu-and-licenses.md new file mode 100644 index 0000000..1e19820 --- /dev/null +++ b/blog/gru-devlog-15---ocpu-yemu-and-licenses.md @@ -0,0 +1,11 @@ +GRU Devlog 15 - ocpu, yemu and licenses + +This week wasn't very productive. I was working on one of my personal projects. + +I have added ADD for registers, INC, DEC and NOP instructions. + +Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects. + +Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, ocpu, yemu, license diff --git a/blog/gru-devlog-16---ormp-and-egg.html b/blog/gru-devlog-16---ormp-and-egg.html new file mode 100644 index 0000000..efd938b --- /dev/null +++ b/blog/gru-devlog-16---ormp-and-egg.html @@ -0,0 +1,50 @@ + + + + + + + +GRU Devlog 16 - ormp and EGG + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-16---ormp-and-egg.md b/blog/gru-devlog-16---ormp-and-egg.md new file mode 100644 index 0000000..2d8fb93 --- /dev/null +++ b/blog/gru-devlog-16---ormp-and-egg.md @@ -0,0 +1,15 @@ +GRU Devlog 16 - ormp and EGG + +This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it. + +Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS. + +Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed. + +And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc. + +Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :) + +tags: gru, ormp, egg, yemu, xmpp, irc diff --git a/blog/gru-devlog-17-18---coreutils-egg-and-ideas.html b/blog/gru-devlog-17-18---coreutils-egg-and-ideas.html new file mode 100644 index 0000000..b77343d --- /dev/null +++ b/blog/gru-devlog-17-18---coreutils-egg-and-ideas.html @@ -0,0 +1,52 @@ + + + + + + + +GRU Devlog 17-18 - coreutils, EGG and ideas + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 17-18 - coreutils, EGG and ideas +

+ +
November 28, 2021 — +G1n +
+ + +

Last week I didn’t make devlog because was busy and haven’t done anything useful except +mkdir for coreutils.

+ +

This week I started from try to make something in framebuffer but currently nothing, because +I can’t even understand why my code can’t see size of my display. I think E will require making +something like Elib for easier communicating with E (but it will be in very far future…)

+ +

Then I made echo and very simple ls for coreutils. I am going to add more flags to ls next week. +This week I also have made simple irc bot in python, so I will try to make simple clone of suckless ii +on C (i think name gic is now really good so if you have ideas please suggest them to me). +Currently I don’t reallly understand how to work with sockets but I will try to do something.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, coreutils, egg

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-17-18---coreutils-egg-and-ideas.md b/blog/gru-devlog-17-18---coreutils-egg-and-ideas.md new file mode 100644 index 0000000..967f3eb --- /dev/null +++ b/blog/gru-devlog-17-18---coreutils-egg-and-ideas.md @@ -0,0 +1,17 @@ +GRU Devlog 17-18 - coreutils, EGG and ideas + +Last week I didn't make devlog because was busy and haven't done anything useful except +mkdir for coreutils. + +This week I started from try to make something in framebuffer but currently nothing, because +I can't even understand why my code can't see size of my display. I think E will require making +something like Elib for easier communicating with E (but it will be in very far future...) + +Then I made echo and very simple ls for coreutils. I am going to add more flags to ls next week. +This week I also have made simple irc bot in python, so I will try to make simple clone of suckless ii +on C (i think name gic is now really good so if you have ideas please suggest them to me). +Currently I don't reallly understand how to work with sockets but I will try to do something. + +Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :) + +tags: gru, coreutils, egg diff --git a/blog/gru-devlog-19---gic-and-several-libs.html b/blog/gru-devlog-19---gic-and-several-libs.html new file mode 100644 index 0000000..5bb1824 --- /dev/null +++ b/blog/gru-devlog-19---gic-and-several-libs.html @@ -0,0 +1,61 @@ + + + + + + + +GRU Devlog 19 - gic and several libs + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-19---gic-and-several-libs.md b/blog/gru-devlog-19---gic-and-several-libs.md new file mode 100644 index 0000000..7fe4958 --- /dev/null +++ b/blog/gru-devlog-19---gic-and-several-libs.md @@ -0,0 +1,26 @@ +GRU Devlog 19 - gic and several libs + +This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don't yet how it will be done but we will see... + +Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won't need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit) + +After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don't know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time. + +When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future... + +Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :) + +tags: gru, gic, girclib, liblinux, olibc, libs diff --git a/blog/gru-devlog-2---orion.html b/blog/gru-devlog-2---orion.html new file mode 100644 index 0000000..c43a88d --- /dev/null +++ b/blog/gru-devlog-2---orion.html @@ -0,0 +1,52 @@ + + + + + + + +GRU DevLog 2 - Orion + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU DevLog 2 - Orion +

+ +
August 08, 2021 — +G1n +
+ + +

This week I was developing new OS - Orion.

+ +

I don’t understand very basic osdev thing so I decided to make OS on C and Asm. +Currently that can just output text (with printf arguments) on screen and serial. +Now gros is much cooler than Orion - it has input, interupts and a lot of else. +But maybe I’ll understand OSdev better. +Currently working on GDT (global descriptor table) and than will work on +interrupts and exceptions.

+ +

Of course if you can help me contact me throught email or in other ways!

+ +

tags: gru, orion

+ + + + + + + + + +
+ +
+ diff --git a/blog/gru-devlog-2---orion.md b/blog/gru-devlog-2---orion.md new file mode 100644 index 0000000..0ba6dbd --- /dev/null +++ b/blog/gru-devlog-2---orion.md @@ -0,0 +1,14 @@ +GRU DevLog 2 - Orion + +This week I was developing new OS - Orion. + +I don't understand very basic osdev thing so I decided to make OS on C and Asm. +Currently that can just output text (with printf arguments) on screen and serial. +Now gros is much cooler than Orion - it has input, interupts and a lot of else. +But maybe I'll understand OSdev better. +Currently working on GDT (global descriptor table) and than will work on +interrupts and exceptions. + +Of course if you can help me contact me throught email or in other ways! + +tags: gru, orion diff --git a/blog/gru-devlog-20---olibc.html b/blog/gru-devlog-20---olibc.html new file mode 100644 index 0000000..8571e5d --- /dev/null +++ b/blog/gru-devlog-20---olibc.html @@ -0,0 +1,50 @@ + + + + + + + +GRU Devlog 20 - olibc + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 20 - olibc +

+ +
December 12, 2021 — +G1n +
+ + +

This week I was making olibc. I was implementing <string.h>. Also I was fixing liblinux to +be able to include it without need to use full path in #include. I had several other issues +with it and also fixed them.

+ +

My current goal is to implement <string.h> and after that I am planning to publish it. +Currently most of funcs are implemented. Making strtok now but all other functions need +locale.h and I don’t know yet how I will be implemented. But it is already cool that we +have most of functions that should be in <string.h>!

+ +

Also we now have gru webpage on codeberg! Maybe next week I +will move all devlogs to gru webpage so it will be easier to move.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, olibc, liblinux

+ + + + +
+ +
+ diff --git a/blog/gru-devlog-20---olibc.md b/blog/gru-devlog-20---olibc.md new file mode 100644 index 0000000..b49dc9d --- /dev/null +++ b/blog/gru-devlog-20---olibc.md @@ -0,0 +1,17 @@ +GRU Devlog 20 - olibc + +This week I was making olibc. I was implementing . Also I was fixing liblinux to +be able to include it without need to use full path in `#include`. I had several other issues +with it and also fixed them. + +My current goal is to implement and after that I am planning to publish it. +Currently most of funcs are implemented. Making strtok now but all other functions need +locale.h and I don't know yet how I will be implemented. But it is already cool that we +have most of functions that should be in ! + +Also we now have [gru webpage on codeberg](https://gru.codeberg.page)! Maybe next week I +will move all devlogs to gru webpage so it will be easier to move. + +Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :) + +tags: gru, olibc, liblinux diff --git a/blog/gru-devlog-3---orion-and-dreams-about-gru-software-future.html b/blog/gru-devlog-3---orion-and-dreams-about-gru-software-future.html new file mode 100644 index 0000000..3244fc1 --- /dev/null +++ b/blog/gru-devlog-3---orion-and-dreams-about-gru-software-future.html @@ -0,0 +1,81 @@ + + + + + + + +GRU DevLog 3 - Orion and dreams about GRU software future + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU DevLog 3 - Orion and dreams about GRU software future +

+ +
August 15, 2021 — +G1n +
+ + +

This week I was trying to make interrupts, paging and other memory things working in Orion. +I found this guide and tried to follow it without rewriting the whole project: +http://www.jamesmolloy.co.uk/index.html

+ +

For now only Global Descriptor Table maybe working.

+ +

My current goals/dreams:

+ +
    +
  • make filesystem (the coolest would be make Ext2 driver)

  • +
  • build GCC hosted compiler (this will help GCC understand our OS better)

  • +
+ + +

My very future dreams:

+ +
    +
  • make kernel, libs, ports and soft in different repos

  • +
  • make proper way to make “distros” on our kernel

  • +
  • make some website with mirror of ports scripts (like in Serenity OS but not in one repo with +everything and tool for searching and downloading ports from that mirror)

  • +
  • maybe (if i will work a lot on this projects) I’ll make one more account on tilde.team +for our organisation (domain name - gru.ttm.sh, is cool), but i’ll ask admins about that

  • +
+ + +

Also I think Orion need new name because i found several projects with this name :)

+ +

Some ideas about the GRU name:

+ +
    +
  • GRU rocks (or rocking) UNIX

  • +
  • GloRious UNIX

  • +
  • GloRious Union

  • +
+ + +

If you can help me or have some ideas (name/names or anything else) contact me via email +or any other type of contact (irc: g1n on tilde.chat, xmpp: g1n@hmm.st)

+ +

tags: gru, orion, dreams

+ + + + + + + + + +
+ +
+ diff --git a/blog/gru-devlog-3---orion-and-dreams-about-gru-software-future.md b/blog/gru-devlog-3---orion-and-dreams-about-gru-software-future.md new file mode 100644 index 0000000..4bae210 --- /dev/null +++ b/blog/gru-devlog-3---orion-and-dreams-about-gru-software-future.md @@ -0,0 +1,40 @@ +GRU DevLog 3 - Orion and dreams about GRU software future + +This week I was trying to make interrupts, paging and other memory things working in Orion. +I found this guide and tried to follow it without rewriting the whole project: +[http://www.jamesmolloy.co.uk/index.html](http://www.jamesmolloy.co.uk/index.html) + +For now only Global Descriptor Table maybe working. + +My current goals/dreams: + +- make filesystem (the coolest would be make Ext2 driver) + +- build GCC hosted compiler (this will help GCC understand our OS better) + +My very future dreams: + +- make kernel, libs, ports and soft in different repos + +- make proper way to make "distros" on our kernel + +- make some website with mirror of ports scripts (like in Serenity OS but not in one repo with +everything and tool for searching and downloading ports from that mirror) + +- maybe (if i will work a lot on this projects) I'll make one more account on tilde.team +for our organisation (domain name - gru.ttm.sh, is cool), but i'll ask admins about that + +Also I think Orion need new name because i found several projects with this name :) + +Some ideas about the GRU name: + +- GRU rocks (or rocking) UNIX + +- GloRious UNIX + +- GloRious Union + +If you can help me or have some ideas (name/names or anything else) contact me via email +or any other type of contact (irc: g1n on tilde.chat, xmpp: g1n@hmm.st) + +tags: gru, orion, dreams diff --git a/blog/gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.html b/blog/gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.html new file mode 100644 index 0000000..68d2dff --- /dev/null +++ b/blog/gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.html @@ -0,0 +1,59 @@ + + + + + + + +GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg +

+ +
August 22, 2021 — +G1n +
+ + +

In first days of this week I thought it will be not very productive. +But I was wrong.

+ +

We now have webpage and organizations on tildegit/codeberg:

+ +

https://g1n.ttm.sh/gru/

+ +

Also I am working on some new projects:

+ +
    +
  • orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet)

  • +
  • gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet)

  • +
  • hexutils - I think hexdump, xxd and some other utils will be in this project

  • +
+ + +

Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this.

+ +

And of course if you can help me please contact me in someway! :)

+ +

tags: gru, orcc, gasm, hexutils, webpage

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.md b/blog/gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.md new file mode 100644 index 0000000..e1841d5 --- /dev/null +++ b/blog/gru-devlog-4---more-projects-started-webpage-for-gru-and-organizations-on-tildegitcodeberg.md @@ -0,0 +1,23 @@ +GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg + +In first days of this week I thought it will be not very productive. +But I was wrong. + +We now have webpage and organizations on tildegit/codeberg: + +[https://g1n.ttm.sh/gru/](https://g1n.ttm.sh/gru/) + +Also I am working on some new projects: + +- orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet) + +- gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet) + +- hexutils - I think hexdump, xxd and some other utils will be in this project + +Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this. + +And of course if you can help me please contact me in someway! :) + +tags: gru, orcc, gasm, hexutils, webpage diff --git a/blog/gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.html b/blog/gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.html new file mode 100644 index 0000000..d4f781c --- /dev/null +++ b/blog/gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.html @@ -0,0 +1,59 @@ + + + + + + + +GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) +

+ +
August 29, 2021 — +G1n +
+ + +

This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future).

+ +

Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor.

+ +

Currently it can only move cursor and display files. But I think I’ll publish it next week +when editing will be working.

+ +

Bad news is that my school lessons will start next week so maybe this devlogs won’t be +published every week, because of not enough work done. But I don’t know, maybe I’ll have +enough time.

+ +

Also good news - we have first contribution on codeberg to grsh. I didn’t know this person +(because he is not from tildeverse :) ), so it is cool!

+ +

Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :)

+ +

tags: gru, coreutils, contribution, gxt, grsh

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.md b/blog/gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.md new file mode 100644 index 0000000..e751c72 --- /dev/null +++ b/blog/gru-devlog-5---first-contribution-from-other-person-coreutils-and-gxt-tui-text-editor.md @@ -0,0 +1,24 @@ +GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) + +This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future). + +Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor. + +Currently it can only move cursor and display files. But I think I'll publish it next week +when editing will be working. + +Bad news is that my school lessons will start next week so maybe this devlogs won't be +published every week, because of not enough work done. But I don't know, maybe I'll have +enough time. + +Also good news - we have first contribution on codeberg to grsh. I didn't know this person +(because he is not from tildeverse :) ), so it is cool! + +Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :) + +tags: gru, coreutils, contribution, gxt, grsh diff --git a/blog/gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.html b/blog/gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.html new file mode 100644 index 0000000..de72107 --- /dev/null +++ b/blog/gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.html @@ -0,0 +1,50 @@ + + + + + + + +GRU Devlog 6 - yemu, published gxt and interrupts working in Orion + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 6 - yemu, published gxt and interrupts working in Orion +

+ +
September 05, 2021 — +G1n +
+ + +

This week I have published gxt, but it currently works as more (only down scrolling). +Also it has a lot of of runtime error (Segmentation fault and others).

+ +

I have started working on yemu - Yet another EMUlator. It currently supports only 6502 +proccessor with tiny number of instructions (LDA, LDX and LDY)

+ +

Today we have fixed interrupts in Orion and now I can implement timer, paging, keyboard +and a lot of other things (thanks to quinn and smlckz from tilde.chat)

+ +

Hope you liked this post and if you would like to help me, +contact me via email, xmpp or irc :)

+ +

tags: gru, gxt, yemu, orion

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.md b/blog/gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.md new file mode 100644 index 0000000..a9bb717 --- /dev/null +++ b/blog/gru-devlog-6---yemu-published-gxt-and-interrupts-working-in-orion.md @@ -0,0 +1,15 @@ +GRU Devlog 6 - yemu, published gxt and interrupts working in Orion + +This week I have published gxt, but it currently works as more (only down scrolling). +Also it has a lot of of runtime error (Segmentation fault and others). + +I have started working on yemu - Yet another EMUlator. It currently supports only 6502 +proccessor with tiny number of instructions (LDA, LDX and LDY) + +Today we have fixed interrupts in Orion and now I can implement timer, paging, keyboard +and a lot of other things (thanks to quinn and smlckz from tilde.chat) + +Hope you liked this post and if you would like to help me, +contact me via email, xmpp or irc :) + +tags: gru, gxt, yemu, orion diff --git a/blog/gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.html b/blog/gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.html new file mode 100644 index 0000000..d711a6e --- /dev/null +++ b/blog/gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.html @@ -0,0 +1,51 @@ + + + + + + + +GRU Devlog 7 - keyboard, paging and WIP initrd in Orion + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 7 - keyboard, paging and WIP initrd in Orion +

+ +
September 12, 2021 — +G1n +
+ + +

This week I was improving Orion. First I made keyboard working, next day paging! +Also I have added several new LibC functions. +Today I have made scrolling working.

+ +

Last few days I was trying to make initrd working +(this required heap implementing so I also did that but I don’t know if it works correctly). +Currently it can only output /dev directory.

+ +

But I made something wrong with %x in printf and it can display weird chars first +and then contents of files!

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.md b/blog/gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.md new file mode 100644 index 0000000..fe4e162 --- /dev/null +++ b/blog/gru-devlog-7---keyboard-paging-and-wip-initrd-in-orion.md @@ -0,0 +1,16 @@ +GRU Devlog 7 - keyboard, paging and WIP initrd in Orion + +This week I was improving Orion. First I made keyboard working, next day paging! +Also I have added several new LibC functions. +Today I have made scrolling working. + +Last few days I was trying to make initrd working +(this required heap implementing so I also did that but I don't know if it works correctly). +Currently it can only output /dev directory. + +But I made something wrong with %x in printf and it can display weird chars first +and then contents of files! + +Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, orion diff --git a/blog/gru-devlog-8---orsh-and-published-initrd.html b/blog/gru-devlog-8---orsh-and-published-initrd.html new file mode 100644 index 0000000..e83d31a --- /dev/null +++ b/blog/gru-devlog-8---orsh-and-published-initrd.html @@ -0,0 +1,48 @@ + + + + + + + +GRU Devlog 8 - orsh and published initrd + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 8 - orsh and published initrd +

+ +
September 19, 2021 — +G1n +
+ + +

This week I have published initrd, but it is not working as expected.

+ +

Also I have started one more project - orsh. It is one more shell, but now in C. +Maybe it will be easier to port to Orion. It already supports ; but they are working a bit weird.

+ +

Also in orsh you can work with environment variables. +From today’s morning I am trying to replace bash with it, but still a lot need to be done.

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orsh, orion

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-8---orsh-and-published-initrd.md b/blog/gru-devlog-8---orsh-and-published-initrd.md new file mode 100644 index 0000000..2e1d47e --- /dev/null +++ b/blog/gru-devlog-8---orsh-and-published-initrd.md @@ -0,0 +1,13 @@ +GRU Devlog 8 - orsh and published initrd + +This week I have published initrd, but it is not working as expected. + +Also I have started one more project - orsh. It is one more shell, but now in C. +Maybe it will be easier to port to Orion. It already supports ; but they are working a bit weird. + +Also in orsh you can work with environment variables. +From today's morning I am trying to replace bash with it, but still a lot need to be done. + +Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, orsh, orion diff --git a/blog/gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.html b/blog/gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.html new file mode 100644 index 0000000..f964356 --- /dev/null +++ b/blog/gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.html @@ -0,0 +1,56 @@ + + + + + + + +GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +

+ +
September 26, 2021 — +G1n +
+ + +

This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + + +
+ +
+ diff --git a/blog/gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.md b/blog/gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.md new file mode 100644 index 0000000..b429079 --- /dev/null +++ b/blog/gru-devlog-9---orsh-orion-bootloader-gru-xmpp-room-and-logo.md @@ -0,0 +1,21 @@ +GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo + +This week I didn't commited a lot, but started some new projects. +I made orsh signal handling working (so it won't exit on ^C) and homedir "handling" +(can replace homedir in prompt with ~, and you can use 'cd ~' or just 'cd' to change +dir to homedir) + +Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible. + +I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files. + +We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it! + +I was thinking about making weekly or monthly "conferences". We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :) + +Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :) + +tags: gru, orion, orsh, xmpp, tilde.tel, jitsi diff --git a/blog/gru-devlog-week-0---grsh-grutils-and-start-of-gros.html b/blog/gru-devlog-week-0---grsh-grutils-and-start-of-gros.html new file mode 100644 index 0000000..a629444 --- /dev/null +++ b/blog/gru-devlog-week-0---grsh-grutils-and-start-of-gros.html @@ -0,0 +1,53 @@ + + + + + + + +GRU DevLog Week 0 - grsh, grutils and start of gros + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+ +

+GRU DevLog Week 0 - grsh, grutils and start of gros +

+ +
July 25, 2021 — +G1n +
+ + +

So I have started new project this week - grsh! It is shell written on Rust. Also, for now, other rewrites of coreutils are there.

+ +

What grsh can do for this moment: echo some variables (pwd, user, home, status of previous command using $?) and text; true, false, : - set status; pwd shows current dir, also comments and cd working, basic piping (thanks to that article and of course executing not builtin command also working.

+ +

Some grutils that I made: ls, touch, mkdir/rmdir, rm, grep, head/tail, yes, cat.

+ +

TODOs exist in grsh repo - so you can read there some of my plans.

+ +

Yesterday i have started GROS - OS on Rust! But I haven’t published code yet because it not have that minimum of funcionality that i want. Thanks for that site for teaching how to make basics - https://os.phil-opp.com

+ +

So it was first of GRU Devlog! Thanks for reading! If you want to contribute to some of that project write me an email - g1n@ttm.sh , or contact me in other ways

+ +

tags: gru, grsh, grutils, gros

+ + + + + + + + + +
+ +
+ diff --git a/blog/gru-devlog-week-0---grsh-grutils-and-start-of-gros.md b/blog/gru-devlog-week-0---grsh-grutils-and-start-of-gros.md new file mode 100644 index 0000000..f4ffb97 --- /dev/null +++ b/blog/gru-devlog-week-0---grsh-grutils-and-start-of-gros.md @@ -0,0 +1,15 @@ +GRU DevLog Week 0 - grsh, grutils and start of gros + +So I have started new project this week - grsh! It is shell written on Rust. Also, for now, other rewrites of coreutils are there. + +What grsh can do for this moment: echo some variables (pwd, user, home, status of previous command using $?) and text; true, false, : - set status; pwd shows current dir, also comments and cd working, basic piping (thanks to [that article](https://www.joshmcguigan.com/blog/build-your-own-shell-rust/) and of course executing not builtin command also working. + +Some grutils that I made: ls, touch, mkdir/rmdir, rm, grep, head/tail, yes, cat. + +TODOs exist in grsh repo - so you can read there some of my plans. + +Yesterday i have started GROS - OS on Rust! But I haven't published code yet because it not have that minimum of funcionality that i want. Thanks for that site for teaching how to make basics - [https://os.phil-opp.com](https://os.phil-opp.com) + +So it was first of GRU Devlog! Thanks for reading! If you want to contribute to some of that project write me an email - [g1n@ttm.sh](mailto:g1n@ttm.sh) , or contact me in other ways + +tags: gru, grsh, grutils, gros diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 0000000..8338c77 --- /dev/null +++ b/blog/index.html @@ -0,0 +1,324 @@ + + + + + + + +GRU's blog + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 20 - olibc +

+ +
December 12, 2021 — +G1n +
+ + +

This week I was making olibc. I was implementing <string.h>. Also I was fixing liblinux to +be able to include it without need to use full path in #include. I had several other issues +with it and also fixed them.

+ +

My current goal is to implement <string.h> and after that I am planning to publish it. +Currently most of funcs are implemented. Making strtok now but all other functions need +locale.h and I don’t know yet how I will be implemented. But it is already cool that we +have most of functions that should be in <string.h>!

+ +

Also we now have gru webpage on codeberg! Maybe next week I +will move all devlogs to gru webpage so it will be easier to move.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, olibc, liblinux

+ + + +

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +

+GRU Devlog 17-18 - coreutils, EGG and ideas +

+ +
November 28, 2021 — +G1n +
+ + +

Last week I didn’t make devlog because was busy and haven’t done anything useful except +mkdir for coreutils.

+ +

This week I started from try to make something in framebuffer but currently nothing, because +I can’t even understand why my code can’t see size of my display. I think E will require making +something like Elib for easier communicating with E (but it will be in very far future…)

+ +

Then I made echo and very simple ls for coreutils. I am going to add more flags to ls next week. +This week I also have made simple irc bot in python, so I will try to make simple clone of suckless ii +on C (i think name gic is now really good so if you have ideas please suggest them to me). +Currently I don’t reallly understand how to work with sockets but I will try to do something.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, coreutils, egg

+ + + + + +

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +

+GRU Devlog 15 - ocpu, yemu and licenses +

+ +
November 07, 2021 — +G1n +
+ + +

This week wasn’t very productive. I was working on one of my personal projects.

+ +

I have added ADD for registers, INC, DEC and NOP instructions.

+ +

Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, ocpu, yemu, license

+ + + + + +

+GRU Devlog 14 - ocpu and yemu +

+ +
October 31, 2021 — +G1n +
+ + +

This week I was working on ocpu emulator. So using it we can know if specifications can be implemented. +It helps me adding some description to it.

+ +

First I made yemu a bit modular, so you need to add several lines to main file and then building your emulator +based on template (that should be placed in docs one day). Now if someone would like to add some architecture to +our emulator they won’t need to rewrite it from scratch.

+ +

I also added –system flag to yemu so architecture can be choosen more user-friendly way.

+ +

Currently in ocpu emulator only mov and add instructions are implemented. +We also added some description to commands in specifications, so it is easier to understand what it should do

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, ocpu

+ + + + + +

+GRU Devlog 13 - ocpu thoughts and some elecronics +

+ +
October 24, 2021 — +G1n +
+ + +

This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + +

+GRU Devlog 12 - yemu, gasm and ocpu +

+ +
October 17, 2021 — +G1n +
+ + +

This week I have done several new instructions for yemu. For example all transfer instructions.

+ +

Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start.

+ +

But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it here. +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it.

+ +

Also smlckz’s idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino!

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, gasm, ocpu

+ + + + + +

+GRU Devlog 11 - yemu and channel on libera.chat +

+ +
October 08, 2021 — +G1n +
+ + +

I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + +

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + + +
+ +
+ diff --git a/blog/main.css b/blog/main.css new file mode 100644 index 0000000..4e4f37e --- /dev/null +++ b/blog/main.css @@ -0,0 +1,33 @@ +body { + background:#1c1c1c; + color:#a7d129; + margin:0; + padding:0; +} +hr{ + color:#32302f; +} +ul{ + list-style: none; +} +li{ + color:#81b214; +} +a{ + text-decoration:none; + color:#9ede73; +} +h1,h2,h3,h4,h5,h6{color:#a7d129;} +h1{margin-bottom:12px !important;} +h4{margin-left:24px;margin-right:24px;} +img{max-width:100%;} +h3{font-size:20pt;width:100%;font-weight:bold;margin-top:32px;margin-bottom:0;} +.header{width:100%;max-width:800px;margin:0px auto;} +.headerholder{max-height:20%;max-width:100%;width:100%;margin:0;padding:0;} +#footer{padding-top:10px;border-top:solid 1px #666;text-align:center;font-size:small;font-family:"Courier New","Courier",monospace;} +.description{margin-top:10px;border-top:solid 1px #666;padding:10px 0;} +blockquote{background-color:#f9f9f9;border-left:solid 4px #e9e9e9;margin-left:12px;padding:12px 12px 12px 24px;} +blockquote img{margin:12px 0px;} +blockquote iframe{margin:12px 0px;} +#divbodyholder{padding:5px;width:100%;max-width:874px;margin:24px auto;} +#divbody{padding:0px 38px 24px 38px;top:0;} diff --git a/blog/tag_contribution.html b/blog/tag_contribution.html new file mode 100644 index 0000000..b347700 --- /dev/null +++ b/blog/tag_contribution.html @@ -0,0 +1,57 @@ + + + + + + + +GRU's blog — posts tagged "contribution" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) +

+ +
August 29, 2021 — +G1n +
+ + +

This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future).

+ +

Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor.

+ +

Currently it can only move cursor and display files. But I think I’ll publish it next week +when editing will be working.

+ +

Bad news is that my school lessons will start next week so maybe this devlogs won’t be +published every week, because of not enough work done. But I don’t know, maybe I’ll have +enough time.

+ +

Also good news - we have first contribution on codeberg to grsh. I didn’t know this person +(because he is not from tildeverse :) ), so it is cool!

+ +

Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :)

+ +

tags: gru, coreutils, contribution, gxt, grsh

+ + + + + +
+ +
+ diff --git a/blog/tag_coreutils.html b/blog/tag_coreutils.html new file mode 100644 index 0000000..c59cd40 --- /dev/null +++ b/blog/tag_coreutils.html @@ -0,0 +1,86 @@ + + + + + + + +GRU's blog — posts tagged "coreutils" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 17-18 - coreutils, EGG and ideas +

+ +
November 28, 2021 — +G1n +
+ + +

Last week I didn’t make devlog because was busy and haven’t done anything useful except +mkdir for coreutils.

+ +

This week I started from try to make something in framebuffer but currently nothing, because +I can’t even understand why my code can’t see size of my display. I think E will require making +something like Elib for easier communicating with E (but it will be in very far future…)

+ +

Then I made echo and very simple ls for coreutils. I am going to add more flags to ls next week. +This week I also have made simple irc bot in python, so I will try to make simple clone of suckless ii +on C (i think name gic is now really good so if you have ideas please suggest them to me). +Currently I don’t reallly understand how to work with sockets but I will try to do something.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, coreutils, egg

+ + + + + +

+GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) +

+ +
August 29, 2021 — +G1n +
+ + +

This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future).

+ +

Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor.

+ +

Currently it can only move cursor and display files. But I think I’ll publish it next week +when editing will be working.

+ +

Bad news is that my school lessons will start next week so maybe this devlogs won’t be +published every week, because of not enough work done. But I don’t know, maybe I’ll have +enough time.

+ +

Also good news - we have first contribution on codeberg to grsh. I didn’t know this person +(because he is not from tildeverse :) ), so it is cool!

+ +

Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :)

+ +

tags: gru, coreutils, contribution, gxt, grsh

+ + + + + +
+ +
+ diff --git a/blog/tag_dreams.html b/blog/tag_dreams.html new file mode 100644 index 0000000..8ca4f19 --- /dev/null +++ b/blog/tag_dreams.html @@ -0,0 +1,79 @@ + + + + + + + +GRU's blog — posts tagged "dreams" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU DevLog 3 - Orion and dreams about GRU software future +

+ +
August 15, 2021 — +G1n +
+ + +

This week I was trying to make interrupts, paging and other memory things working in Orion. +I found this guide and tried to follow it without rewriting the whole project: +http://www.jamesmolloy.co.uk/index.html

+ +

For now only Global Descriptor Table maybe working.

+ +

My current goals/dreams:

+ +
    +
  • make filesystem (the coolest would be make Ext2 driver)

  • +
  • build GCC hosted compiler (this will help GCC understand our OS better)

  • +
+ + +

My very future dreams:

+ +
    +
  • make kernel, libs, ports and soft in different repos

  • +
  • make proper way to make “distros” on our kernel

  • +
  • make some website with mirror of ports scripts (like in Serenity OS but not in one repo with +everything and tool for searching and downloading ports from that mirror)

  • +
  • maybe (if i will work a lot on this projects) I’ll make one more account on tilde.team +for our organisation (domain name - gru.ttm.sh, is cool), but i’ll ask admins about that

  • +
+ + +

Also I think Orion need new name because i found several projects with this name :)

+ +

Some ideas about the GRU name:

+ +
    +
  • GRU rocks (or rocking) UNIX

  • +
  • GloRious UNIX

  • +
  • GloRious Union

  • +
+ + +

If you can help me or have some ideas (name/names or anything else) contact me via email +or any other type of contact (irc: g1n on tilde.chat, xmpp: g1n@hmm.st)

+ +

tags: gru, orion, dreams

+ + + + + + + + +
+ +
+ diff --git a/blog/tag_egg.html b/blog/tag_egg.html new file mode 100644 index 0000000..11c2bc1 --- /dev/null +++ b/blog/tag_egg.html @@ -0,0 +1,77 @@ + + + + + + + +GRU's blog — posts tagged "egg" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 17-18 - coreutils, EGG and ideas +

+ +
November 28, 2021 — +G1n +
+ + +

Last week I didn’t make devlog because was busy and haven’t done anything useful except +mkdir for coreutils.

+ +

This week I started from try to make something in framebuffer but currently nothing, because +I can’t even understand why my code can’t see size of my display. I think E will require making +something like Elib for easier communicating with E (but it will be in very far future…)

+ +

Then I made echo and very simple ls for coreutils. I am going to add more flags to ls next week. +This week I also have made simple irc bot in python, so I will try to make simple clone of suckless ii +on C (i think name gic is now really good so if you have ideas please suggest them to me). +Currently I don’t reallly understand how to work with sockets but I will try to do something.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, coreutils, egg

+ + + + + +

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +
+ +
+ diff --git a/blog/tag_electonics.html b/blog/tag_electonics.html new file mode 100644 index 0000000..2d3048e --- /dev/null +++ b/blog/tag_electonics.html @@ -0,0 +1,48 @@ + + + + + + + +GRU's blog — posts tagged "electonics" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 13 - ocpu thoughts and some elecronics +

+ +
October 24, 2021 — +G1n +
+ + +

This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + +
+ +
+ diff --git a/blog/tag_gasm.html b/blog/tag_gasm.html new file mode 100644 index 0000000..1151fec --- /dev/null +++ b/blog/tag_gasm.html @@ -0,0 +1,129 @@ + + + + + + + +GRU's blog — posts tagged "gasm" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 12 - yemu, gasm and ocpu +

+ +
October 17, 2021 — +G1n +
+ + +

This week I have done several new instructions for yemu. For example all transfer instructions.

+ +

Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start.

+ +

But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it here. +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it.

+ +

Also smlckz’s idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino!

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, gasm, ocpu

+ + + + + +

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +

+GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg +

+ +
August 22, 2021 — +G1n +
+ + +

In first days of this week I thought it will be not very productive. +But I was wrong.

+ +

We now have webpage and organizations on tildegit/codeberg:

+ +

https://g1n.ttm.sh/gru/

+ +

Also I am working on some new projects:

+ +
    +
  • orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet)

  • +
  • gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet)

  • +
  • hexutils - I think hexdump, xxd and some other utils will be in this project

  • +
+ + +

Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this.

+ +

And of course if you can help me please contact me in someway! :)

+ +

tags: gru, orcc, gasm, hexutils, webpage

+ + + + + +
+ +
+ diff --git a/blog/tag_gic.html b/blog/tag_gic.html new file mode 100644 index 0000000..d5f0049 --- /dev/null +++ b/blog/tag_gic.html @@ -0,0 +1,59 @@ + + + + + + + +GRU's blog — posts tagged "gic" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +
+ +
+ diff --git a/blog/tag_girclib.html b/blog/tag_girclib.html new file mode 100644 index 0000000..5b3b8e8 --- /dev/null +++ b/blog/tag_girclib.html @@ -0,0 +1,59 @@ + + + + + + + +GRU's blog — posts tagged "girclib" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +
+ +
+ diff --git a/blog/tag_gros.html b/blog/tag_gros.html new file mode 100644 index 0000000..02d0333 --- /dev/null +++ b/blog/tag_gros.html @@ -0,0 +1,88 @@ + + + + + + + +GRU's blog — posts tagged "gros" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU DevLog 1 - gros sources published and add wc to grutils +

+ +
August 01, 2021 — +G1n +
+ + +

I didn’t make a lot work this week, so i think this devlogs should be renamed from “week number” to just “number” +Ok, so what i did this week: +- Add wc to grutils +- Published gros +- Add basic shell and some commands for gros

+ +

I know that is not a lot, but i was reading some osdev articles and books. +Currently I would like to implement basic filesystem but i don’t know what to do.

+ +

Some goals for gros (I will add that to gros readme): +- Filesystem (FAT or Ext2) +- ELF or other executable formats +- LibC (for compiling C programs) +- Maybe basic networking but after all of that

+ +

All code in osdev wiki is for C so I need to implement it myself (or port existing rust code)

+ +

If you can help me somehow please contact me via email (g1n@ttm.sh) or in other ways (~chat irc, xmpp)

+ +

tags: gru, grutils, gros

+ + + + + + + + +

+GRU DevLog Week 0 - grsh, grutils and start of gros +

+ +
July 25, 2021 — +G1n +
+ + +

So I have started new project this week - grsh! It is shell written on Rust. Also, for now, other rewrites of coreutils are there.

+ +

What grsh can do for this moment: echo some variables (pwd, user, home, status of previous command using $?) and text; true, false, : - set status; pwd shows current dir, also comments and cd working, basic piping (thanks to that article and of course executing not builtin command also working.

+ +

Some grutils that I made: ls, touch, mkdir/rmdir, rm, grep, head/tail, yes, cat.

+ +

TODOs exist in grsh repo - so you can read there some of my plans.

+ +

Yesterday i have started GROS - OS on Rust! But I haven’t published code yet because it not have that minimum of funcionality that i want. Thanks for that site for teaching how to make basics - https://os.phil-opp.com

+ +

So it was first of GRU Devlog! Thanks for reading! If you want to contribute to some of that project write me an email - g1n@ttm.sh , or contact me in other ways

+ +

tags: gru, grsh, grutils, gros

+ + + + + + + + +
+ +
+ diff --git a/blog/tag_grsh.html b/blog/tag_grsh.html new file mode 100644 index 0000000..a85af4b --- /dev/null +++ b/blog/tag_grsh.html @@ -0,0 +1,87 @@ + + + + + + + +GRU's blog — posts tagged "grsh" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) +

+ +
August 29, 2021 — +G1n +
+ + +

This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future).

+ +

Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor.

+ +

Currently it can only move cursor and display files. But I think I’ll publish it next week +when editing will be working.

+ +

Bad news is that my school lessons will start next week so maybe this devlogs won’t be +published every week, because of not enough work done. But I don’t know, maybe I’ll have +enough time.

+ +

Also good news - we have first contribution on codeberg to grsh. I didn’t know this person +(because he is not from tildeverse :) ), so it is cool!

+ +

Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :)

+ +

tags: gru, coreutils, contribution, gxt, grsh

+ + + + + +

+GRU DevLog Week 0 - grsh, grutils and start of gros +

+ +
July 25, 2021 — +G1n +
+ + +

So I have started new project this week - grsh! It is shell written on Rust. Also, for now, other rewrites of coreutils are there.

+ +

What grsh can do for this moment: echo some variables (pwd, user, home, status of previous command using $?) and text; true, false, : - set status; pwd shows current dir, also comments and cd working, basic piping (thanks to that article and of course executing not builtin command also working.

+ +

Some grutils that I made: ls, touch, mkdir/rmdir, rm, grep, head/tail, yes, cat.

+ +

TODOs exist in grsh repo - so you can read there some of my plans.

+ +

Yesterday i have started GROS - OS on Rust! But I haven’t published code yet because it not have that minimum of funcionality that i want. Thanks for that site for teaching how to make basics - https://os.phil-opp.com

+ +

So it was first of GRU Devlog! Thanks for reading! If you want to contribute to some of that project write me an email - g1n@ttm.sh , or contact me in other ways

+ +

tags: gru, grsh, grutils, gros

+ + + + + + + + +
+ +
+ diff --git a/blog/tag_gru.html b/blog/tag_gru.html new file mode 100644 index 0000000..b533ce6 --- /dev/null +++ b/blog/tag_gru.html @@ -0,0 +1,662 @@ + + + + + + + +GRU's blog — posts tagged "gru" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 20 - olibc +

+ +
December 12, 2021 — +G1n +
+ + +

This week I was making olibc. I was implementing <string.h>. Also I was fixing liblinux to +be able to include it without need to use full path in #include. I had several other issues +with it and also fixed them.

+ +

My current goal is to implement <string.h> and after that I am planning to publish it. +Currently most of funcs are implemented. Making strtok now but all other functions need +locale.h and I don’t know yet how I will be implemented. But it is already cool that we +have most of functions that should be in <string.h>!

+ +

Also we now have gru webpage on codeberg! Maybe next week I +will move all devlogs to gru webpage so it will be easier to move.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, olibc, liblinux

+ + + +

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +

+GRU Devlog 17-18 - coreutils, EGG and ideas +

+ +
November 28, 2021 — +G1n +
+ + +

Last week I didn’t make devlog because was busy and haven’t done anything useful except +mkdir for coreutils.

+ +

This week I started from try to make something in framebuffer but currently nothing, because +I can’t even understand why my code can’t see size of my display. I think E will require making +something like Elib for easier communicating with E (but it will be in very far future…)

+ +

Then I made echo and very simple ls for coreutils. I am going to add more flags to ls next week. +This week I also have made simple irc bot in python, so I will try to make simple clone of suckless ii +on C (i think name gic is now really good so if you have ideas please suggest them to me). +Currently I don’t reallly understand how to work with sockets but I will try to do something.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, coreutils, egg

+ + + + + +

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +

+GRU Devlog 15 - ocpu, yemu and licenses +

+ +
November 07, 2021 — +G1n +
+ + +

This week wasn’t very productive. I was working on one of my personal projects.

+ +

I have added ADD for registers, INC, DEC and NOP instructions.

+ +

Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, ocpu, yemu, license

+ + + + + +

+GRU Devlog 14 - ocpu and yemu +

+ +
October 31, 2021 — +G1n +
+ + +

This week I was working on ocpu emulator. So using it we can know if specifications can be implemented. +It helps me adding some description to it.

+ +

First I made yemu a bit modular, so you need to add several lines to main file and then building your emulator +based on template (that should be placed in docs one day). Now if someone would like to add some architecture to +our emulator they won’t need to rewrite it from scratch.

+ +

I also added –system flag to yemu so architecture can be choosen more user-friendly way.

+ +

Currently in ocpu emulator only mov and add instructions are implemented. +We also added some description to commands in specifications, so it is easier to understand what it should do

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, ocpu

+ + + + + +

+GRU Devlog 13 - ocpu thoughts and some elecronics +

+ +
October 24, 2021 — +G1n +
+ + +

This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + +

+GRU Devlog 12 - yemu, gasm and ocpu +

+ +
October 17, 2021 — +G1n +
+ + +

This week I have done several new instructions for yemu. For example all transfer instructions.

+ +

Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start.

+ +

But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it here. +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it.

+ +

Also smlckz’s idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino!

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, gasm, ocpu

+ + + + + +

+GRU Devlog 11 - yemu and channel on libera.chat +

+ +
October 08, 2021 — +G1n +
+ + +

I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + +

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +

+GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +

+ +
September 26, 2021 — +G1n +
+ + +

This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + +

+GRU Devlog 8 - orsh and published initrd +

+ +
September 19, 2021 — +G1n +
+ + +

This week I have published initrd, but it is not working as expected.

+ +

Also I have started one more project - orsh. It is one more shell, but now in C. +Maybe it will be easier to port to Orion. It already supports ; but they are working a bit weird.

+ +

Also in orsh you can work with environment variables. +From today’s morning I am trying to replace bash with it, but still a lot need to be done.

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orsh, orion

+ + + + + +

+GRU Devlog 7 - keyboard, paging and WIP initrd in Orion +

+ +
September 12, 2021 — +G1n +
+ + +

This week I was improving Orion. First I made keyboard working, next day paging! +Also I have added several new LibC functions. +Today I have made scrolling working.

+ +

Last few days I was trying to make initrd working +(this required heap implementing so I also did that but I don’t know if it works correctly). +Currently it can only output /dev directory.

+ +

But I made something wrong with %x in printf and it can display weird chars first +and then contents of files!

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion

+ + + + + +

+GRU Devlog 6 - yemu, published gxt and interrupts working in Orion +

+ +
September 05, 2021 — +G1n +
+ + +

This week I have published gxt, but it currently works as more (only down scrolling). +Also it has a lot of of runtime error (Segmentation fault and others).

+ +

I have started working on yemu - Yet another EMUlator. It currently supports only 6502 +proccessor with tiny number of instructions (LDA, LDX and LDY)

+ +

Today we have fixed interrupts in Orion and now I can implement timer, paging, keyboard +and a lot of other things (thanks to quinn and smlckz from tilde.chat)

+ +

Hope you liked this post and if you would like to help me, +contact me via email, xmpp or irc :)

+ +

tags: gru, gxt, yemu, orion

+ + + + + +

+GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) +

+ +
August 29, 2021 — +G1n +
+ + +

This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future).

+ +

Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor.

+ +

Currently it can only move cursor and display files. But I think I’ll publish it next week +when editing will be working.

+ +

Bad news is that my school lessons will start next week so maybe this devlogs won’t be +published every week, because of not enough work done. But I don’t know, maybe I’ll have +enough time.

+ +

Also good news - we have first contribution on codeberg to grsh. I didn’t know this person +(because he is not from tildeverse :) ), so it is cool!

+ +

Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :)

+ +

tags: gru, coreutils, contribution, gxt, grsh

+ + + + + +

+GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg +

+ +
August 22, 2021 — +G1n +
+ + +

In first days of this week I thought it will be not very productive. +But I was wrong.

+ +

We now have webpage and organizations on tildegit/codeberg:

+ +

https://g1n.ttm.sh/gru/

+ +

Also I am working on some new projects:

+ +
    +
  • orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet)

  • +
  • gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet)

  • +
  • hexutils - I think hexdump, xxd and some other utils will be in this project

  • +
+ + +

Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this.

+ +

And of course if you can help me please contact me in someway! :)

+ +

tags: gru, orcc, gasm, hexutils, webpage

+ + + + + +

+GRU DevLog 3 - Orion and dreams about GRU software future +

+ +
August 15, 2021 — +G1n +
+ + +

This week I was trying to make interrupts, paging and other memory things working in Orion. +I found this guide and tried to follow it without rewriting the whole project: +http://www.jamesmolloy.co.uk/index.html

+ +

For now only Global Descriptor Table maybe working.

+ +

My current goals/dreams:

+ +
    +
  • make filesystem (the coolest would be make Ext2 driver)

  • +
  • build GCC hosted compiler (this will help GCC understand our OS better)

  • +
+ + +

My very future dreams:

+ +
    +
  • make kernel, libs, ports and soft in different repos

  • +
  • make proper way to make “distros” on our kernel

  • +
  • make some website with mirror of ports scripts (like in Serenity OS but not in one repo with +everything and tool for searching and downloading ports from that mirror)

  • +
  • maybe (if i will work a lot on this projects) I’ll make one more account on tilde.team +for our organisation (domain name - gru.ttm.sh, is cool), but i’ll ask admins about that

  • +
+ + +

Also I think Orion need new name because i found several projects with this name :)

+ +

Some ideas about the GRU name:

+ +
    +
  • GRU rocks (or rocking) UNIX

  • +
  • GloRious UNIX

  • +
  • GloRious Union

  • +
+ + +

If you can help me or have some ideas (name/names or anything else) contact me via email +or any other type of contact (irc: g1n on tilde.chat, xmpp: g1n@hmm.st)

+ +

tags: gru, orion, dreams

+ + + + + + + + +

+GRU DevLog 2 - Orion +

+ +
August 08, 2021 — +G1n +
+ + +

This week I was developing new OS - Orion.

+ +

I don’t understand very basic osdev thing so I decided to make OS on C and Asm. +Currently that can just output text (with printf arguments) on screen and serial. +Now gros is much cooler than Orion - it has input, interupts and a lot of else. +But maybe I’ll understand OSdev better. +Currently working on GDT (global descriptor table) and than will work on +interrupts and exceptions.

+ +

Of course if you can help me contact me throught email or in other ways!

+ +

tags: gru, orion

+ + + + + + + + +

+GRU DevLog 1 - gros sources published and add wc to grutils +

+ +
August 01, 2021 — +G1n +
+ + +

I didn’t make a lot work this week, so i think this devlogs should be renamed from “week number” to just “number” +Ok, so what i did this week: +- Add wc to grutils +- Published gros +- Add basic shell and some commands for gros

+ +

I know that is not a lot, but i was reading some osdev articles and books. +Currently I would like to implement basic filesystem but i don’t know what to do.

+ +

Some goals for gros (I will add that to gros readme): +- Filesystem (FAT or Ext2) +- ELF or other executable formats +- LibC (for compiling C programs) +- Maybe basic networking but after all of that

+ +

All code in osdev wiki is for C so I need to implement it myself (or port existing rust code)

+ +

If you can help me somehow please contact me via email (g1n@ttm.sh) or in other ways (~chat irc, xmpp)

+ +

tags: gru, grutils, gros

+ + + + + + + + +

+GRU DevLog Week 0 - grsh, grutils and start of gros +

+ +
July 25, 2021 — +G1n +
+ + +

So I have started new project this week - grsh! It is shell written on Rust. Also, for now, other rewrites of coreutils are there.

+ +

What grsh can do for this moment: echo some variables (pwd, user, home, status of previous command using $?) and text; true, false, : - set status; pwd shows current dir, also comments and cd working, basic piping (thanks to that article and of course executing not builtin command also working.

+ +

Some grutils that I made: ls, touch, mkdir/rmdir, rm, grep, head/tail, yes, cat.

+ +

TODOs exist in grsh repo - so you can read there some of my plans.

+ +

Yesterday i have started GROS - OS on Rust! But I haven’t published code yet because it not have that minimum of funcionality that i want. Thanks for that site for teaching how to make basics - https://os.phil-opp.com

+ +

So it was first of GRU Devlog! Thanks for reading! If you want to contribute to some of that project write me an email - g1n@ttm.sh , or contact me in other ways

+ +

tags: gru, grsh, grutils, gros

+ + + + + + + + +
+ +
+ diff --git a/blog/tag_grutils.html b/blog/tag_grutils.html new file mode 100644 index 0000000..2277332 --- /dev/null +++ b/blog/tag_grutils.html @@ -0,0 +1,88 @@ + + + + + + + +GRU's blog — posts tagged "grutils" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU DevLog 1 - gros sources published and add wc to grutils +

+ +
August 01, 2021 — +G1n +
+ + +

I didn’t make a lot work this week, so i think this devlogs should be renamed from “week number” to just “number” +Ok, so what i did this week: +- Add wc to grutils +- Published gros +- Add basic shell and some commands for gros

+ +

I know that is not a lot, but i was reading some osdev articles and books. +Currently I would like to implement basic filesystem but i don’t know what to do.

+ +

Some goals for gros (I will add that to gros readme): +- Filesystem (FAT or Ext2) +- ELF or other executable formats +- LibC (for compiling C programs) +- Maybe basic networking but after all of that

+ +

All code in osdev wiki is for C so I need to implement it myself (or port existing rust code)

+ +

If you can help me somehow please contact me via email (g1n@ttm.sh) or in other ways (~chat irc, xmpp)

+ +

tags: gru, grutils, gros

+ + + + + + + + +

+GRU DevLog Week 0 - grsh, grutils and start of gros +

+ +
July 25, 2021 — +G1n +
+ + +

So I have started new project this week - grsh! It is shell written on Rust. Also, for now, other rewrites of coreutils are there.

+ +

What grsh can do for this moment: echo some variables (pwd, user, home, status of previous command using $?) and text; true, false, : - set status; pwd shows current dir, also comments and cd working, basic piping (thanks to that article and of course executing not builtin command also working.

+ +

Some grutils that I made: ls, touch, mkdir/rmdir, rm, grep, head/tail, yes, cat.

+ +

TODOs exist in grsh repo - so you can read there some of my plans.

+ +

Yesterday i have started GROS - OS on Rust! But I haven’t published code yet because it not have that minimum of funcionality that i want. Thanks for that site for teaching how to make basics - https://os.phil-opp.com

+ +

So it was first of GRU Devlog! Thanks for reading! If you want to contribute to some of that project write me an email - g1n@ttm.sh , or contact me in other ways

+ +

tags: gru, grsh, grutils, gros

+ + + + + + + + +
+ +
+ diff --git a/blog/tag_gxt.html b/blog/tag_gxt.html new file mode 100644 index 0000000..f6f2c60 --- /dev/null +++ b/blog/tag_gxt.html @@ -0,0 +1,84 @@ + + + + + + + +GRU's blog — posts tagged "gxt" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 6 - yemu, published gxt and interrupts working in Orion +

+ +
September 05, 2021 — +G1n +
+ + +

This week I have published gxt, but it currently works as more (only down scrolling). +Also it has a lot of of runtime error (Segmentation fault and others).

+ +

I have started working on yemu - Yet another EMUlator. It currently supports only 6502 +proccessor with tiny number of instructions (LDA, LDX and LDY)

+ +

Today we have fixed interrupts in Orion and now I can implement timer, paging, keyboard +and a lot of other things (thanks to quinn and smlckz from tilde.chat)

+ +

Hope you liked this post and if you would like to help me, +contact me via email, xmpp or irc :)

+ +

tags: gru, gxt, yemu, orion

+ + + + + +

+GRU Devlog 5 - First contribution from other person, coreutils and gxt (tui text editor) +

+ +
August 29, 2021 — +G1n +
+ + +

This week I had a lot of new ideas. But I think we have to work on something that +have already been started. +Also we now have one more coreutils rewrite +(now on C to more easily port it to Orion in future).

+ +

Also i have started working on some +projects that is not ready to be published yet. One of them is gxt - tui text editor.

+ +

Currently it can only move cursor and display files. But I think I’ll publish it next week +when editing will be working.

+ +

Bad news is that my school lessons will start next week so maybe this devlogs won’t be +published every week, because of not enough work done. But I don’t know, maybe I’ll have +enough time.

+ +

Also good news - we have first contribution on codeberg to grsh. I didn’t know this person +(because he is not from tildeverse :) ), so it is cool!

+ +

Hope you liked this devlog! If you can somehow help us, please contribute to our projects +on tildegit/codeberg and/or message me in someway :)

+ +

tags: gru, coreutils, contribution, gxt, grsh

+ + + + + +
+ +
+ diff --git a/blog/tag_hexutils.html b/blog/tag_hexutils.html new file mode 100644 index 0000000..dde4885 --- /dev/null +++ b/blog/tag_hexutils.html @@ -0,0 +1,57 @@ + + + + + + + +GRU's blog — posts tagged "hexutils" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg +

+ +
August 22, 2021 — +G1n +
+ + +

In first days of this week I thought it will be not very productive. +But I was wrong.

+ +

We now have webpage and organizations on tildegit/codeberg:

+ +

https://g1n.ttm.sh/gru/

+ +

Also I am working on some new projects:

+ +
    +
  • orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet)

  • +
  • gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet)

  • +
  • hexutils - I think hexdump, xxd and some other utils will be in this project

  • +
+ + +

Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this.

+ +

And of course if you can help me please contact me in someway! :)

+ +

tags: gru, orcc, gasm, hexutils, webpage

+ + + + + +
+ +
+ diff --git a/blog/tag_irc.html b/blog/tag_irc.html new file mode 100644 index 0000000..e04c514 --- /dev/null +++ b/blog/tag_irc.html @@ -0,0 +1,48 @@ + + + + + + + +GRU's blog — posts tagged "irc" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +
+ +
+ diff --git a/blog/tag_jitsi.html b/blog/tag_jitsi.html new file mode 100644 index 0000000..294b612 --- /dev/null +++ b/blog/tag_jitsi.html @@ -0,0 +1,54 @@ + + + + + + + +GRU's blog — posts tagged "jitsi" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +

+ +
September 26, 2021 — +G1n +
+ + +

This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + +
+ +
+ diff --git a/blog/tag_libera.html b/blog/tag_libera.html new file mode 100644 index 0000000..9a7e671 --- /dev/null +++ b/blog/tag_libera.html @@ -0,0 +1,51 @@ + + + + + + + +GRU's blog — posts tagged "libera" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 11 - yemu and channel on libera.chat +

+ +
October 08, 2021 — +G1n +
+ + +

I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + +
+ +
+ diff --git a/blog/tag_liblinux.html b/blog/tag_liblinux.html new file mode 100644 index 0000000..627840b --- /dev/null +++ b/blog/tag_liblinux.html @@ -0,0 +1,86 @@ + + + + + + + +GRU's blog — posts tagged "liblinux" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 20 - olibc +

+ +
December 12, 2021 — +G1n +
+ + +

This week I was making olibc. I was implementing <string.h>. Also I was fixing liblinux to +be able to include it without need to use full path in #include. I had several other issues +with it and also fixed them.

+ +

My current goal is to implement <string.h> and after that I am planning to publish it. +Currently most of funcs are implemented. Making strtok now but all other functions need +locale.h and I don’t know yet how I will be implemented. But it is already cool that we +have most of functions that should be in <string.h>!

+ +

Also we now have gru webpage on codeberg! Maybe next week I +will move all devlogs to gru webpage so it will be easier to move.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, olibc, liblinux

+ + + +

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +
+ +
+ diff --git a/blog/tag_libs.html b/blog/tag_libs.html new file mode 100644 index 0000000..ee0eb0b --- /dev/null +++ b/blog/tag_libs.html @@ -0,0 +1,59 @@ + + + + + + + +GRU's blog — posts tagged "libs" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +
+ +
+ diff --git a/blog/tag_license.html b/blog/tag_license.html new file mode 100644 index 0000000..14a9621 --- /dev/null +++ b/blog/tag_license.html @@ -0,0 +1,44 @@ + + + + + + + +GRU's blog — posts tagged "license" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 15 - ocpu, yemu and licenses +

+ +
November 07, 2021 — +G1n +
+ + +

This week wasn’t very productive. I was working on one of my personal projects.

+ +

I have added ADD for registers, INC, DEC and NOP instructions.

+ +

Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, ocpu, yemu, license

+ + + + + +
+ +
+ diff --git a/blog/tag_lobste.rs.html b/blog/tag_lobste.rs.html new file mode 100644 index 0000000..639445b --- /dev/null +++ b/blog/tag_lobste.rs.html @@ -0,0 +1,64 @@ + + + + + + + +GRU's blog — posts tagged "lobste.rs" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +
+ +
+ diff --git a/blog/tag_lolcpu.html b/blog/tag_lolcpu.html new file mode 100644 index 0000000..8c5f1b3 --- /dev/null +++ b/blog/tag_lolcpu.html @@ -0,0 +1,48 @@ + + + + + + + +GRU's blog — posts tagged "lolcpu" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 13 - ocpu thoughts and some elecronics +

+ +
October 24, 2021 — +G1n +
+ + +

This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + +
+ +
+ diff --git a/blog/tag_meeting.html b/blog/tag_meeting.html new file mode 100644 index 0000000..ba89ac7 --- /dev/null +++ b/blog/tag_meeting.html @@ -0,0 +1,64 @@ + + + + + + + +GRU's blog — posts tagged "meeting" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +
+ +
+ diff --git a/blog/tag_ocpu.html b/blog/tag_ocpu.html new file mode 100644 index 0000000..9cf4f1d --- /dev/null +++ b/blog/tag_ocpu.html @@ -0,0 +1,129 @@ + + + + + + + +GRU's blog — posts tagged "ocpu" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 15 - ocpu, yemu and licenses +

+ +
November 07, 2021 — +G1n +
+ + +

This week wasn’t very productive. I was working on one of my personal projects.

+ +

I have added ADD for registers, INC, DEC and NOP instructions.

+ +

Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, ocpu, yemu, license

+ + + + + +

+GRU Devlog 14 - ocpu and yemu +

+ +
October 31, 2021 — +G1n +
+ + +

This week I was working on ocpu emulator. So using it we can know if specifications can be implemented. +It helps me adding some description to it.

+ +

First I made yemu a bit modular, so you need to add several lines to main file and then building your emulator +based on template (that should be placed in docs one day). Now if someone would like to add some architecture to +our emulator they won’t need to rewrite it from scratch.

+ +

I also added –system flag to yemu so architecture can be choosen more user-friendly way.

+ +

Currently in ocpu emulator only mov and add instructions are implemented. +We also added some description to commands in specifications, so it is easier to understand what it should do

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, ocpu

+ + + + + +

+GRU Devlog 13 - ocpu thoughts and some elecronics +

+ +
October 24, 2021 — +G1n +
+ + +

This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + +

+GRU Devlog 12 - yemu, gasm and ocpu +

+ +
October 17, 2021 — +G1n +
+ + +

This week I have done several new instructions for yemu. For example all transfer instructions.

+ +

Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start.

+ +

But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it here. +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it.

+ +

Also smlckz’s idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino!

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, gasm, ocpu

+ + + + + +
+ +
+ diff --git a/blog/tag_olibc.html b/blog/tag_olibc.html new file mode 100644 index 0000000..069af16 --- /dev/null +++ b/blog/tag_olibc.html @@ -0,0 +1,86 @@ + + + + + + + +GRU's blog — posts tagged "olibc" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 20 - olibc +

+ +
December 12, 2021 — +G1n +
+ + +

This week I was making olibc. I was implementing <string.h>. Also I was fixing liblinux to +be able to include it without need to use full path in #include. I had several other issues +with it and also fixed them.

+ +

My current goal is to implement <string.h> and after that I am planning to publish it. +Currently most of funcs are implemented. Making strtok now but all other functions need +locale.h and I don’t know yet how I will be implemented. But it is already cool that we +have most of functions that should be in <string.h>!

+ +

Also we now have gru webpage on codeberg! Maybe next week I +will move all devlogs to gru webpage so it will be easier to move.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, olibc, liblinux

+ + + +

+GRU Devlog 19 - gic and several libs +

+ +
December 05, 2021 — +G1n +
+ + +

This week started with making gic (maybe name will be change). As I have written before +it is going to be suckless ii clone. Also I started making girclib - simple C library for irc +protocol. I think it will be published as separate project, because I would like to make it +for both: client and server. I don’t yet how it will be done but we will see…

+ +

Then I thought that would be cool to have own libc, but have no knowledge how it speaks with OS. +Then I understood that on linux it is working via syscalls. So started making liblinux - +C library for linux syscalls. Using it we won’t need to use assembly a lot in our libc. Currently +write and read syscalls are done and programmer can use it if passed -I, -L and -l flags to compiler. +And it is already published! (check codeberg or tildegit)

+ +

After understanding how to create proper makefile with liblinux, I started making olibc. Currently +it has very tiny number of features. But string.h is mostly done! I don’t know when I will fill that +it will be ready enough to be published, but hope to have useful functions and test suit there till +that time.

+ +

When olibc will be done enough I am going to start making C compiler (already have some code, but it +is old and I not understand how it works, so need to be rewritten). Also I hope that we will have +enough toolchain (or I will have enough knowledge to implement things that are not done faster) +for our own Linux or BSD distribution. But that will be in future…

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, gic, girclib, liblinux, olibc, libs

+ + + + + +
+ +
+ diff --git a/blog/tag_orcc.html b/blog/tag_orcc.html new file mode 100644 index 0000000..3a9b98e --- /dev/null +++ b/blog/tag_orcc.html @@ -0,0 +1,57 @@ + + + + + + + +GRU's blog — posts tagged "orcc" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg +

+ +
August 22, 2021 — +G1n +
+ + +

In first days of this week I thought it will be not very productive. +But I was wrong.

+ +

We now have webpage and organizations on tildegit/codeberg:

+ +

https://g1n.ttm.sh/gru/

+ +

Also I am working on some new projects:

+ +
    +
  • orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet)

  • +
  • gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet)

  • +
  • hexutils - I think hexdump, xxd and some other utils will be in this project

  • +
+ + +

Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this.

+ +

And of course if you can help me please contact me in someway! :)

+ +

tags: gru, orcc, gasm, hexutils, webpage

+ + + + + +
+ +
+ diff --git a/blog/tag_org-mode.html b/blog/tag_org-mode.html new file mode 100644 index 0000000..9f013cf --- /dev/null +++ b/blog/tag_org-mode.html @@ -0,0 +1,94 @@ + + + + + + + +GRU's blog — posts tagged "org-mode" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 11 - yemu and channel on libera.chat +

+ +
October 08, 2021 — +G1n +
+ + +

I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + +

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +
+ +
+ diff --git a/blog/tag_org-roam.html b/blog/tag_org-roam.html new file mode 100644 index 0000000..8b2231f --- /dev/null +++ b/blog/tag_org-roam.html @@ -0,0 +1,51 @@ + + + + + + + +GRU's blog — posts tagged "org-roam" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 11 - yemu and channel on libera.chat +

+ +
October 08, 2021 — +G1n +
+ + +

I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + +
+ +
+ diff --git a/blog/tag_orion.html b/blog/tag_orion.html new file mode 100644 index 0000000..cca5e4a --- /dev/null +++ b/blog/tag_orion.html @@ -0,0 +1,221 @@ + + + + + + + +GRU's blog — posts tagged "orion" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +

+ +
September 26, 2021 — +G1n +
+ + +

This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + +

+GRU Devlog 8 - orsh and published initrd +

+ +
September 19, 2021 — +G1n +
+ + +

This week I have published initrd, but it is not working as expected.

+ +

Also I have started one more project - orsh. It is one more shell, but now in C. +Maybe it will be easier to port to Orion. It already supports ; but they are working a bit weird.

+ +

Also in orsh you can work with environment variables. +From today’s morning I am trying to replace bash with it, but still a lot need to be done.

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orsh, orion

+ + + + + +

+GRU Devlog 7 - keyboard, paging and WIP initrd in Orion +

+ +
September 12, 2021 — +G1n +
+ + +

This week I was improving Orion. First I made keyboard working, next day paging! +Also I have added several new LibC functions. +Today I have made scrolling working.

+ +

Last few days I was trying to make initrd working +(this required heap implementing so I also did that but I don’t know if it works correctly). +Currently it can only output /dev directory.

+ +

But I made something wrong with %x in printf and it can display weird chars first +and then contents of files!

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion

+ + + + + +

+GRU Devlog 6 - yemu, published gxt and interrupts working in Orion +

+ +
September 05, 2021 — +G1n +
+ + +

This week I have published gxt, but it currently works as more (only down scrolling). +Also it has a lot of of runtime error (Segmentation fault and others).

+ +

I have started working on yemu - Yet another EMUlator. It currently supports only 6502 +proccessor with tiny number of instructions (LDA, LDX and LDY)

+ +

Today we have fixed interrupts in Orion and now I can implement timer, paging, keyboard +and a lot of other things (thanks to quinn and smlckz from tilde.chat)

+ +

Hope you liked this post and if you would like to help me, +contact me via email, xmpp or irc :)

+ +

tags: gru, gxt, yemu, orion

+ + + + + +

+GRU DevLog 3 - Orion and dreams about GRU software future +

+ +
August 15, 2021 — +G1n +
+ + +

This week I was trying to make interrupts, paging and other memory things working in Orion. +I found this guide and tried to follow it without rewriting the whole project: +http://www.jamesmolloy.co.uk/index.html

+ +

For now only Global Descriptor Table maybe working.

+ +

My current goals/dreams:

+ +
    +
  • make filesystem (the coolest would be make Ext2 driver)

  • +
  • build GCC hosted compiler (this will help GCC understand our OS better)

  • +
+ + +

My very future dreams:

+ +
    +
  • make kernel, libs, ports and soft in different repos

  • +
  • make proper way to make “distros” on our kernel

  • +
  • make some website with mirror of ports scripts (like in Serenity OS but not in one repo with +everything and tool for searching and downloading ports from that mirror)

  • +
  • maybe (if i will work a lot on this projects) I’ll make one more account on tilde.team +for our organisation (domain name - gru.ttm.sh, is cool), but i’ll ask admins about that

  • +
+ + +

Also I think Orion need new name because i found several projects with this name :)

+ +

Some ideas about the GRU name:

+ +
    +
  • GRU rocks (or rocking) UNIX

  • +
  • GloRious UNIX

  • +
  • GloRious Union

  • +
+ + +

If you can help me or have some ideas (name/names or anything else) contact me via email +or any other type of contact (irc: g1n on tilde.chat, xmpp: g1n@hmm.st)

+ +

tags: gru, orion, dreams

+ + + + + + + + +

+GRU DevLog 2 - Orion +

+ +
August 08, 2021 — +G1n +
+ + +

This week I was developing new OS - Orion.

+ +

I don’t understand very basic osdev thing so I decided to make OS on C and Asm. +Currently that can just output text (with printf arguments) on screen and serial. +Now gros is much cooler than Orion - it has input, interupts and a lot of else. +But maybe I’ll understand OSdev better. +Currently working on GDT (global descriptor table) and than will work on +interrupts and exceptions.

+ +

Of course if you can help me contact me throught email or in other ways!

+ +

tags: gru, orion

+ + + + + + + + +
+ +
+ diff --git a/blog/tag_ormp.html b/blog/tag_ormp.html new file mode 100644 index 0000000..66ff43d --- /dev/null +++ b/blog/tag_ormp.html @@ -0,0 +1,48 @@ + + + + + + + +GRU's blog — posts tagged "ormp" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +
+ +
+ diff --git a/blog/tag_orsh.html b/blog/tag_orsh.html new file mode 100644 index 0000000..731051d --- /dev/null +++ b/blog/tag_orsh.html @@ -0,0 +1,122 @@ + + + + + + + +GRU's blog — posts tagged "orsh" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +

+GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +

+ +
September 26, 2021 — +G1n +
+ + +

This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + +

+GRU Devlog 8 - orsh and published initrd +

+ +
September 19, 2021 — +G1n +
+ + +

This week I have published initrd, but it is not working as expected.

+ +

Also I have started one more project - orsh. It is one more shell, but now in C. +Maybe it will be easier to port to Orion. It already supports ; but they are working a bit weird.

+ +

Also in orsh you can work with environment variables. +From today’s morning I am trying to replace bash with it, but still a lot need to be done.

+ +

Hope you liked this post and if you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orsh, orion

+ + + + + +
+ +
+ diff --git a/blog/tag_tilde.news.html b/blog/tag_tilde.news.html new file mode 100644 index 0000000..43ac42a --- /dev/null +++ b/blog/tag_tilde.news.html @@ -0,0 +1,64 @@ + + + + + + + +GRU's blog — posts tagged "tilde.news" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 10 - orsh now like proper shell and gasm +

+ +
October 03, 2021 — +G1n +
+ + +

Hooray! Today is 10’s GRU Devlog! :)

+ +

This week i was trying to make notes to org document, to not forget something and put TODOs +there for future weeks.

+ +

First several days was the most valuable - readline support and signal handling! +This means you can use emacs-like bindings there (but i think readline also supports vi bindings, +so maybe i will add them too!)

+ +

Also we now have very minimal completion support there :), but still proper function need to be added +for that (currently only filenames completion)

+ +

Orsh also has one session history, so you don’t need to rewrite command from scratch now

+ +

And I have started to use it as my main (but had some problems after chsh, so currently is autostarts after bash +and i can exit from there any time i will need)

+ +

Then I have started making our own assembler - gasm. Currently it only supports NOP, so i haven’t published it yet.

+ +

This week I also registered to ~news and shared devlog there (i think this devlog also will be there ;) ) +If you have lobste.rs account please contact me to invite me, if you can, because it may advertize GRU more!

+ +

Today (Sunday) we had first testing GRU meeting via Jitsi. Thanks to r1k for joining. +We need to make something like plan our schedule (to know about what to speak) and discuss meeting time better.

+ +

Hope you liked this post and you will join our XMPP muc (if you are not already there) :). +If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, org-mode, gasm, orsh, meeting, lobste.rs, tilde.news

+ + + + + +
+ +
+ diff --git a/blog/tag_tilde.tel.html b/blog/tag_tilde.tel.html new file mode 100644 index 0000000..609d5e2 --- /dev/null +++ b/blog/tag_tilde.tel.html @@ -0,0 +1,54 @@ + + + + + + + +GRU's blog — posts tagged "tilde.tel" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +

+ +
September 26, 2021 — +G1n +
+ + +

This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + +
+ +
+ diff --git a/blog/tag_transistors.html b/blog/tag_transistors.html new file mode 100644 index 0000000..8ff6d8b --- /dev/null +++ b/blog/tag_transistors.html @@ -0,0 +1,48 @@ + + + + + + + +GRU's blog — posts tagged "transistors" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 13 - ocpu thoughts and some elecronics +

+ +
October 24, 2021 — +G1n +
+ + +

This week was very busy week at school and I had no time for programming.

+ +

But in the start of week I was thinking about making ocpu specs more Turing-complete. +I still think it is not done but maybe it will in some time (and of course more description required).

+ +

But I had time to buy some transistors and other electronics. Currently I am trying to make half-adder.

+ +

I have created tiny log page - lolcpu. I am going to post there some of my +electronic ideas, circuits and progress in doing some electronic things.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, lolcpu, ocpu, transistors, electonics

+ + + + + +
+ +
+ diff --git a/blog/tag_webpage.html b/blog/tag_webpage.html new file mode 100644 index 0000000..7ccea79 --- /dev/null +++ b/blog/tag_webpage.html @@ -0,0 +1,57 @@ + + + + + + + +GRU's blog — posts tagged "webpage" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 4 - more projects started, webpage for GRU and organizations on tildegit/codeberg +

+ +
August 22, 2021 — +G1n +
+ + +

In first days of this week I thought it will be not very productive. +But I was wrong.

+ +

We now have webpage and organizations on tildegit/codeberg:

+ +

https://g1n.ttm.sh/gru/

+ +

Also I am working on some new projects:

+ +
    +
  • orcc - GRU/Orion Compilers Collection (but currently I am working only on lexer so it is not published yet)

  • +
  • gasm - GRU assembler (maybe will be part of GRU binutils. Also not published yet)

  • +
  • hexutils - I think hexdump, xxd and some other utils will be in this project

  • +
+ + +

Also I tryed to advertize GRU on ~chat, some users liked us, +so maybe soon someone will help me with all this.

+ +

And of course if you can help me please contact me in someway! :)

+ +

tags: gru, orcc, gasm, hexutils, webpage

+ + + + + +
+ +
+ diff --git a/blog/tag_xmpp.html b/blog/tag_xmpp.html new file mode 100644 index 0000000..2317c6d --- /dev/null +++ b/blog/tag_xmpp.html @@ -0,0 +1,81 @@ + + + + + + + +GRU's blog — posts tagged "xmpp" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +

+GRU Devlog 9 - orsh, orion, bootloader, GRU xmpp room and logo +

+ +
September 26, 2021 — +G1n +
+ + +

This week I didn’t commited a lot, but started some new projects. +I made orsh signal handling working (so it won’t exit on ^C) and homedir “handling” +(can replace homedir in prompt with ~, and you can use ‘cd ~’ or just ‘cd’ to change +dir to homedir)

+ +

Also I started making bootloader, but for now it can only detect what CPU is (intel if x86 and amd if x86_64), +some additional instructions (msr) and if apic is avalible.

+ +

I was trying to make something with orion fs, maybe it will use pak files for initrd. Currently i am making archiver +for it, but after that i will need to understand more how vfs working and rewrite initrd to use pak files.

+ +

We now have xmpp room (gru@conference.hmm.st) and logo! Thanks to chunk for it!

+ +

I was thinking about making weekly or monthly “conferences”. We could do it via jitsi tildeverse instance or tilde.tel +(tel.tilde.org.nz) conference. I think jitsi is better, but we should try tilde.tel confernce at least once, why not? :)

+ +

Hope you liked this post and you will join our XMPP muc :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, orion, orsh, xmpp, tilde.tel, jitsi

+ + + + + +
+ +
+ diff --git a/blog/tag_yemu.html b/blog/tag_yemu.html new file mode 100644 index 0000000..813bc68 --- /dev/null +++ b/blog/tag_yemu.html @@ -0,0 +1,186 @@ + + + + + + + +GRU's blog — posts tagged "yemu" + +
+
+
+

GRU's blog

+
GRU's blog
+
+
+

+GRU Devlog 16 - ormp and EGG +

+ +
November 14, 2021 — +G1n +
+ + +

This week i was working on one more new project - ormp. It will be terminal multiplexor. +Currently i am doing it in ncurses. For current time it is not working - can just handle input but not display it.

+ +

Also i have an idea for new projects - EGG (Extended/Exciting GRU GUI). I am planning some proj in this category - eggwm, eggterm, eggmenu and E. +E would be a new display server. We will need to have it for Orion in future. Currently i am planning to do it or on fbdev or on DRM/KMS.

+ +

Also now yemu can be compiled with different compilers, -pedantic flag was added to makefile and all errors fixed.

+ +

And now our channels are bridged via matterbridge: irc on ~chat, irc on libera and xmpp muc.

+ +

Hope you liked this post! If you would like to help us, contact me via email, xmpp or irc :)

+ +

tags: gru, ormp, egg, yemu, xmpp, irc

+ + + + + +

+GRU Devlog 15 - ocpu, yemu and licenses +

+ +
November 07, 2021 — +G1n +
+ + +

This week wasn’t very productive. I was working on one of my personal projects.

+ +

I have added ADD for registers, INC, DEC and NOP instructions.

+ +

Also codeberg informed me that yemu has to have license, and I fast added MIT license to all our projects.

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, ocpu, yemu, license

+ + + + + +

+GRU Devlog 14 - ocpu and yemu +

+ +
October 31, 2021 — +G1n +
+ + +

This week I was working on ocpu emulator. So using it we can know if specifications can be implemented. +It helps me adding some description to it.

+ +

First I made yemu a bit modular, so you need to add several lines to main file and then building your emulator +based on template (that should be placed in docs one day). Now if someone would like to add some architecture to +our emulator they won’t need to rewrite it from scratch.

+ +

I also added –system flag to yemu so architecture can be choosen more user-friendly way.

+ +

Currently in ocpu emulator only mov and add instructions are implemented. +We also added some description to commands in specifications, so it is easier to understand what it should do

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, ocpu

+ + + + + +

+GRU Devlog 12 - yemu, gasm and ocpu +

+ +
October 17, 2021 — +G1n +
+ + +

This week I have done several new instructions for yemu. For example all transfer instructions.

+ +

Also I have rewritten gasm to support 6502, published it and it should help me with debugging yemu. +It supports not very a lot instructions but I hope it is good start.

+ +

But I think the coolest what I did this week is ocpu proccessor specification. +Currently it is draft but i have already published it here. +I hope this specifications will be Turing complete and we will try to implement it in real world. +But firstly we need to make this specififcations complete, assembler and emulator for it.

+ +

Also smlckz’s idea was to make translator from ocpu assembler instructions to avr to emulate it on arduino!

+ +

Hope you liked this post! If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, gasm, ocpu

+ + + + + +

+GRU Devlog 11 - yemu and channel on libera.chat +

+ +
October 08, 2021 — +G1n +
+ + +

I am making this devlog a bit earlier, because I will be busy on weekends.

+ +

This week I didn’t have plan, but it seems I have done some things to yemu: added loading programs +from binary file and several instructions - TAX, TAY and NOP.

+ +

I think gasm will be made for 6502 firstly, because it is easier then x86 and it would help in +testing yemu.

+ +

I was trying to make some daily notes in Org Roam (and moved devlog notes there), but it wasn’t +very success, but I hope to do it more often :)

+ +

Also I have registered #gru channel on libera, so you can join us also on libera.chat :)

+ +

Hope you liked this post :). If you would like to help me, contact me via email, xmpp or irc :)

+ +

tags: gru, yemu, libera, org-mode, org-roam

+ + + + + +

+GRU Devlog 6 - yemu, published gxt and interrupts working in Orion +

+ +
September 05, 2021 — +G1n +
+ + +

This week I have published gxt, but it currently works as more (only down scrolling). +Also it has a lot of of runtime error (Segmentation fault and others).

+ +

I have started working on yemu - Yet another EMUlator. It currently supports only 6502 +proccessor with tiny number of instructions (LDA, LDX and LDY)

+ +

Today we have fixed interrupts in Orion and now I can implement timer, paging, keyboard +and a lot of other things (thanks to quinn and smlckz from tilde.chat)

+ +

Hope you liked this post and if you would like to help me, +contact me via email, xmpp or irc :)

+ +

tags: gru, gxt, yemu, orion

+ + + + + +
+ +
+