Re: [dev] mkws(1) - simple static site generator

2020-09-05 Thread Adrian Grigore
Removed stat dependency. I really didn't want to do OS/feature detection so I wrote this: https://mkws.sh/lts.html. On Tue, Sep 1, 2020 at 7:55 PM Adrian Grigore wrote: > > Thanks for your feedback! > > I agree that shell script is sort of a natural fit for templating, you

Re: [dev] mkws(1) - simple static site generator

2020-09-01 Thread Adrian Grigore
Thanks for your feedback! I agree that shell script is sort of a natural fit for templating, you just take plain text and massage it into HTML. There are 3rd party solutions for ugc for static sites like https://staticman.net/ which are acceptable. OpenBSD stat is used to generate the timestamp

[dev] mkws(1) - simple static site generator

2020-08-31 Thread Adrian Grigore
Hi all, Can you give me a review for this https://mkws.sh? -- Thank you, Adi, Freelance Developer http://adi.tilde.institute/

Re: [dev] Re: My take at a static site generator

2019-12-12 Thread Adrian Grigore
What exactly are your dissatisfactions? On 12/12/19, Marc Chantreux wrote: > hello, > > On Wed, Dec 11, 2019 at 09:02:00PM +0200, Adrian Grigore wrote: >> That was my issue, the need to implement things. Along my HTML code, I >> also have to implement or include

[dev] Re: My take at a static site generator

2019-12-11 Thread Adrian Grigore
think most loops would be on files. On Wednesday, December 11, 2019, Marc Chantreux wrote: > > On Wed, Dec 11, 2019 at 01:39:38PM +0200, Adrian Grigore wrote: > > Regarding m4(1) I remember I wasn't a big fan of the dnl macro, no > > loops and also other goodies sh(1) has to o

[dev] Re: My take at a static site generator

2019-12-11 Thread Adrian Grigore
17:55 +0200 > Adrian Grigore wrote: > > Dear Adrian, > > > Thanks for answering! > > > > Do you still have a link to your m4(1) static site generator? > > it was never online and had some design decisions that made it close to > swerc, including multi-hierarch

Re: [dev] My take at a static site generator

2019-12-09 Thread Adrian Grigore
Hi, Thanks for answering! Do you still have a link to your m4(1) static site generator? On 12/9/19, Laslo Hunhold wrote: > On Sun, 8 Dec 2019 20:28:16 +0200 > Adrian Grigore wrote: > > Dear Adrian, > >> https://adi.tilde.institute/mkws/ > > I've already seen

[dev] My take at a static site generator

2019-12-08 Thread Adrian Grigore
https://adi.tilde.institute/mkws/ -- Thank you, Adi, Freelance Developer http://adi.tilde.institute/

Re: [dev] URI Parser

2019-07-05 Thread Adrian Grigore
Hi all, Sorry for the late reply! Laslo: 1. I'm in period of experiment with different stuff, including self hosting, I bought a https://www.pine64.org/devices/single-board-computers/rock64/ so , I'll maybe host a git or cvs (I get it, I never worked with cvs ever so I think it's a good idea to

[dev] URI Parser

2019-06-12 Thread Adrian Grigore
Hi guys, I started writing a RFC3986 compliant URI parser. It's not done yet. Can I get some feedback? https://adi.tilde.institute/tmp/uri.h https://adi.tilde.institute/tmp/parseuri.c -- Thank you, Adi, Freelance Developer http://adi.tilde.institute/

[dev] Linters

2019-05-12 Thread Adrian Grigore
Hey, I also created a set of linters that check for max line length, indenting style, trailing whitespace and trailing newlines. Please let me know your opinions. -- Thank you, Adi, Freelance Developer http://adi.tilde.institute/ linters.tar.gz Description: application/gzip

Re: [dev] Preprocessor

2019-05-03 Thread Adrian Grigore
In HTML5, attribute quotes are optional so I'm going to remove all sanitization. On Thu, May 2, 2019 at 3:44 AM Adrian Grigore wrote: > > In the code itself as in compile your own `pp.c`. > > On Thu, May 2, 2019 at 2:45 AM Adrian Grigore > wrote: > > > > I sani

Re: [dev] Preprocessor

2019-05-01 Thread Adrian Grigore
In the code itself as in compile your own `pp.c`. On Thu, May 2, 2019 at 2:45 AM Adrian Grigore wrote: > > I sanitized double-quotes because they have a high frequency in HTML files and > you would have to do lots of escaping. I was also playing with HTML files > while > de

Re: [dev] Preprocessor

2019-05-01 Thread Adrian Grigore
POSIX sh(1) strings. I may remove all form of sanitization and people could add it themselves in the code itself as and if necessary. What do you think? What's your preference? On Wed, May 1, 2019 at 10:57 PM Teodoro Santoni wrote: > > Hi, > > 2019-05-01 18:21 GMT, Adrian Grig

Re: [dev] Preprocessor

2019-05-01 Thread Adrian Grigore
I think it's done: http://adi.tilde.institute/tmp/pp.c On Thu, Apr 25, 2019 at 6:44 AM Adrian Grigore wrote: > > Ok, refactored. > > http://adi.tilde.institute/tmp/pp.c > > Sorry, was experimenting before. > > On Wed, Apr 24, 2019 at 11:58 PM opal hart wrote: &

Re: [dev] Preprocessor

2019-04-24 Thread Adrian Grigore
Ok, refactored. http://adi.tilde.institute/tmp/pp.c Sorry, was experimenting before. On Wed, Apr 24, 2019 at 11:58 PM opal hart wrote: > > On Tue, 23 Apr 2019 12:26:04 -0400 > Cág wrote: > > http://porkmail.org/era/unix/award.html > > `ls | cat` is actually useful to combat the differences bet

Re: [dev] Preprocessor

2019-04-23 Thread Adrian Grigore
Ignore the shell stuff, I know it's bad (I also usually use find(1) for these cases), good comments however. It's good you mentioned it so anybody reading this would know it's bad, thank you! On Tue, Apr 23, 2019 at 11:07 PM Peter Nagy wrote: > > This was a question about the preprocessor, please

[dev] Preprocessor

2019-04-22 Thread Adrian Grigore
Hi, I built a preprocessor. It allows embedding shell code in any type of files. Can you guys give some tips or a code review? The file format it accepts is the following: #!/home/adi/src/pp/pp #! ls -1 "$1" | while IFS= read -r p do #! $p

[dev] Re: Preprocessor

2019-04-22 Thread Adrian Grigore
Ooops sorry, something broke. The format is the following: #!/home/adi/src/pp/pp #! ls -1 "$1" | while IFS= read -r p do #! $p #! done #! Code is here http://adi.tilde.institute/tmp/pp.c. On Mon, Apr 22, 2019 at 4:55 PM Adrian Grigore wrote: > > H

Re: [dev] [sbase] Split libutil

2018-10-24 Thread Adrian Grigore
I was thinking it maybe has a generic name and could be splitted in smaller, more specific, libraries? On Mon, Oct 22, 2018 at 10:14 PM Hiltjo Posthuma wrote: > > On Mon, Oct 22, 2018 at 08:18:43PM +0300, Adrian Grigore wrote: > > Is there any interest in splitting llibutil from sbas

[dev] [sbase] Split libutil

2018-10-22 Thread Adrian Grigore
Is there any interest in splitting llibutil from sbase in smaller libraries? -- Thanks, Adi

[dev] diff -x

2018-09-28 Thread Adrian Grigore
How would you implement diff -x in a POSIX compliant manner? -- Thanks, Adi

[dev] Re: diff -x

2018-09-28 Thread Adrian Grigore
In a diff -ur situation? On Fri, Sep 28, 2018 at 5:48 PM Adrian Grigore wrote: > > How would you implement diff -x in a POSIX compliant manner? > > -- > Thanks, > Adi -- Thanks, Adi

[dev] Dynamic DNS

2018-09-27 Thread Adrian Grigore
Do you know any good free Dynamic DNS provider? -- Thanks, Adi

Re: [dev] Shell script testing functions

2018-06-09 Thread Adrian Grigore
> 1) use shellcheck. Check out shellcheck.net or install locally. It catches the most common shell scripting problems. I already do. Thanks for the other recommendations. On Sat, Jun 9, 2018 at 6:32 PM Evan Gates wrote: > > On Sat, Jun 9, 2018, 08:20 Adrian Grigore > wrote: >

[dev] Re: Shell script testing functions

2018-06-09 Thread Adrian Grigore
st "one plus one is one" sum=$((1+1)) [ $sum -eq 2 ] tap_test "one plus one is three" sum=$((1+1)) [ $sum -eq 3 ] tap_test "two plus two is four" sum=$((2+2)) [ $sum -eq 4 ] On Sat, Jun 9, 2018 at 6:19 PM Adrian Grigore wrote: > > I sometimes enjoy t

[dev] Shell script testing functions

2018-06-09 Thread Adrian Grigore
I sometimes enjoy testing my shell scripts. Opinions? #!/bin/sh tap_inited=false tap_i=0 tap_exitstatus=0 tap_printline() { [ "$1" -eq 0 ] && printf "ok %d - %s\n" $tap_i "$current" && return; printf "not ok %d - %s\n" $tap_i "$current" exitstatus=1 } tap_test() { lastexitstatus=$? ! $tap_ini

Re: [dev] ASCII Delimited Text

2018-05-22 Thread Adrian Grigore
ght? On Tue, May 22, 2018 at 3:24 AM, Raphaël Proust wrote: > Hello, > > On 2018-05-22 00:38, Connor Lane Smith wrote: >> On 21 May 2018 at 17:12, Adrian Grigore >> wrote: >>> I'm having problems compiling usul: >> >> This is a surprise. Where

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Adrian Grigore
ann wrote: > On Mon, May 21, 2018 at 07:12:46PM +0300, Adrian Grigore wrote: >> cc -lutf -o cat cat.o util.o >> cat.o: In function `main': >> cat.c:(.text+0x179): undefined reference to `chartorune' >> cat.c:(.text+0x1dd): undefined reference to `runetochar&#

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Adrian Grigore
data (i.e. until a line with no FS), or you need to do crazy tty-rewriting ANSI escapes, which it did support but is a massive hack. This sounds interesting. On Mon, May 21, 2018 at 7:38 PM, Connor Lane Smith wrote: > Hi, > > On 21 May 2018 at 17:12, Adrian Grigore wrote: >> I'

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Adrian Grigore
> Maybe a nice thing to have would be to get the terminal emulator to treat the field and record separator in a special way. So the programs all output fs and rs, and the terminal emulator uses these characters to layout the data in a tabular way But would it still be plain text? I'm having probl

Re: [dev] ASCII Delimited Text

2018-05-17 Thread Adrian Grigore
How would you have other tools like cat(1) or ls(1) handle them? On Thu, May 17, 2018 at 6:16 AM, Greg Reagle wrote: > On Wed, May 16, 2018, at 10:05, Adrian Grigore wrote: >> What do you guys think of this: >> >> https://ronaldduncan.wordpress.com/2009/10/31/text-file-fo

[dev] ASCII Delimited Text

2018-05-16 Thread Adrian Grigore
What do you guys think of this: https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/ -- Thanks, Adi

[dev] Ranger inspired file manager in Go

2017-02-13 Thread Adrian Grigore
https://github.com/gokcehan/lf -- Thanks, Adi

Re: [dev] Shell style guide

2016-09-07 Thread Adrian Grigore
Thanks! On Thu, Sep 8, 2016 at 12:29 AM, Evan Gates wrote: > On Wed, Sep 7, 2016 at 2:11 PM, Adrian Grigore > wrote: >> Rendering was just an example, I doubt a shell script would be rendering. >> >> Example of camelCase I find ok is here: >> https://raw.githu

Re: [dev] Shell style guide

2016-09-07 Thread Adrian Grigore
(if I did some blatant mistakes, please point them). On Thu, Sep 8, 2016 at 12:04 AM, Charlie Kester wrote: > On Wed 07 Sep 2016 at 11:43:48 PDT Adrian Grigore wrote: >> >> Tbh, I'm nor a big fan of camelCase either, but when dealing with >> names composed of multipl

Re: [dev] Shell style guide

2016-09-07 Thread Adrian Grigore
Tbh, I'm nor a big fan of camelCase either, but when dealing with names composed of multiple words, it looks cleaner to me. renderimage vs renderImage On Wed, Sep 7, 2016 at 8:21 PM, Adrian Grigore wrote: > Tbh, I'm nor a big fan of camelCase either, but when dealing with names

Re: [dev] Shell style guide

2016-09-06 Thread Adrian Grigore
What do you think of camelCase names for functions/variables? On Tue, Sep 6, 2016 at 11:53 PM, Greg Reagle wrote: > On Tue, Sep 6, 2016, at 03:27 PM, Evan Gates wrote: >> Sadly there is a lot of software these days that requires bash. >> Hopefully we can avoid most of it, but I'm sure it'll pop u

Re: [dev] Re: Linux distros that don't suck too too much

2016-05-12 Thread Adrian Grigore
I jumped from Ubuntu, to Arch and currently am very happy with OpenBSD. I think only 9front can supersede it. Note tho, that it's very bare bones so you'll spend some time understanding it but it's definitely worth it. On Thu, May 12, 2016 at 12:54 PM, Rubén Llorente wrote: > hiro <23h...@gmail.c

Re: [dev] Auto-preview man pages

2016-01-07 Thread Adrian Grigore
On Fri, Jan 8, 2016 at 5:05 AM, Greg Reagle wrote: > echo Readme.md | entr sh -c 'markdown Readme.md | w3m -T text/html' > > Still not ideal, because you have to quit from w3m manually. If you use > -dump with w3m you don't have to quit, but you lose formatting and other > goodies. > This is

Re: [dev] Auto-preview man pages

2016-01-07 Thread Adrian Grigore
On Thu, Jan 7, 2016 at 8:56 PM, Greg Reagle wrote: > I find it a real pain to work with things like man page source and markdown > source and so forth because of the extra steps of making the output/object > format. > I have yet to find a solution for markdown. I would really prefer something wit

[dev] Auto-preview man pages

2016-01-06 Thread Adrian Grigore
Don't know if it's worth posting, but this is a comfortable way for me to write man pages: ls *.1 | entr -cd sh -c 'MANPAGER="less -FX" man -l $0' /_ entr is http://entrproject.org/ -- Thanks, Adi

Re: [dev] C package manager-ish

2015-12-15 Thread Adrian Grigore
Need to install sta.li and see how that works out. :) It's on my todo list. On Tue, Dec 15, 2015 at 12:26 PM, Anselm R Garbe wrote: > On 15 December 2015 at 11:20, Adrian Grigore > wrote: >> I wanted to know what's your general opinion on >> https://github.com/cl

[dev] C package manager-ish

2015-12-15 Thread Adrian Grigore
Hey guys, I wanted to know what's your general opinion on https://github.com/clibs/clib. Disclaimer: I'm not a C programmer, but planning to learn. -- Thanks, Adi

Re: [dev] My dwmstatusbar.c

2012-12-31 Thread Adrian Sadłocha
On 2012-12-31 09:26, Krol, Willem van de wrote: Now I can scroll on the status bar to raise/lower volume. Awesome, thanks!

Re: [dev] [surf] adblocking

2012-11-22 Thread Adrian Sadłocha
On 2012-11-20 14:07, hiro wrote: I block only in my DNS. I think it's the most important feature of my home network. Not only because it blocks ads, but also because it block fads. What does 'fad' mean?

Re: [dev] Perl/Linux

2012-08-17 Thread Adrian Sadłocha
On 2012-08-17 20:29, Hiltjo Posthuma wrote: We need linux in javascript: http://bellard.org/jslinux/ :P "/var/root # perl sh: perl: not found" -- Adrian N3T Sadłocha

Re: [dev] Perl/Linux

2012-08-17 Thread Adrian Sadłocha
W dniu 17.08.2012 08:06, Lorenzo Bolla napisał(a): Now, this is what we all need and love! http://perllinux.sourceforge.net/ Awesome idea, I have to test it! -- Adrian N3T Sadłocha

Re: [dev] static bionic libc ...

2010-10-09 Thread Adrian
Because the most important thing about a libc is the name...

Re: [dev] [st] border crop fix

2010-06-02 Thread Adrian
On 02/06/2010, Aurélien Aptel wrote: > The problem lies in the size hints : they do not seem to be handled > correctly by the wm (i'm using wmii) or I'm not using them correctly > (more probable). I've been reading up on this and it seems that you need to set [PBaseSize](http://tronche.com/gui/x/

[dev] [st] border crop fix

2010-05-31 Thread Adrian
St has a bug where characters are always cropped slightly off of the bottom and right hand sides of the window. I suspect that this is caused by st not taking into account the border when regenerates the pixmap during a window resize event. I've attached a patch that appears to solve the problem f