Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Galos, David
> Attached is a first shot at seq(1) for sbase.  I do not like having to > juggle data around to play games with sprintf, so if someone has a > cleaner approach to this program, please speak up. Unfortunately, there isn't much that can be done. User input is always sub-par, and unless we want to a

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Christoph Lohmann
Greetings. On Mon, 16 Apr 2012 14:40:01 +0200 "Galos, David" wrote: > > Attached is a first shot at seq(1) for sbase.  I do not like having to > > juggle data around to play games with sprintf, so if someone has a > > cleaner approach to this program, please speak up. > > Unfortunately, there i

[dev] A tiny IRC connection tool

2012-04-16 Thread Connor Lane Smith
Hey all, I've written a tiny (90 SLOC) tool for connecting to an IRC server and streaming the connection over stdin/stdout, while responding to (and filtering out) pings. I just wrote this so I could write simpler IRC bots without having to worry about TCP, pings, or having to reconnect every time

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Galos, David
> Have  you  tried  the fmtvalid() function? It seems like there is a typo > where it is used. Such a function would still be useful in the  now  ex‐ > isting seq.c. I hadn't tested it when I sent that. I've attached a version with a tested fmtvalid function, proper support for scientific notation

Re: [dev] A tiny IRC connection tool

2012-04-16 Thread Bjartur Thorlacius
IRC I/O seems like an absurdly simple and useful tool. Should it not be on suckless.org? -- -,Bjartur

Re: [dev] A tiny IRC connection tool

2012-04-16 Thread Christoph Lohmann
Greetings. On Mon, 16 Apr 2012 20:38:14 +0200 "Bjartur Thorlacius" wrote: > IRC I/O seems like an absurdly simple and useful tool. Should it not be on > suckless.org? There is socat(1) and netcat(1). Of course they are big, but is there a need to reimplement them? They do not try to include

Re: [dev] st utf8 printing

2012-04-16 Thread Kurt H Maier
On Sun, Apr 15, 2012 at 11:02:40PM +0200, Joerg Zinke wrote: > I think you are wrong. An example for a TUI with images is w3m compiled with > inline images. Once you include graphics, it is a graphical interface. What the hell happened to this list that this has to be explained?

Re: [dev] st utf8 printing

2012-04-16 Thread Kurt H Maier
Smith: *Computers* are artificial. Get over it. TUI specifically refers to somethign stupid enough to do character-addressing inside a typewriter emulator. GUI works at the pixel level. Sophistry about the difference between the two is unproductive and annoying. On Sun, Apr 15, 2012 at 04:51

Re: [dev] A tiny IRC connection tool

2012-04-16 Thread Connor Lane Smith
On 16 April 2012 19:38, Christoph Lohmann <2...@r-36.net> wrote: > There  is socat(1) and netcat(1). Of course they are big, but is there a > need to reimplement them? Neither handle IRC pings. Of course, you could wrap them in a shell script and so on, but at that point I begin to wonder whether

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Christoph Lohmann
Greetings. On Mon, 16 Apr 2012 21:49:48 +0200 "Galos, David" wrote: > > Have  you  tried  the fmtvalid() function? It seems like there is a typo > > where it is used. Such a function would still be useful in the  now  ex‐ > > isting seq.c. > > I hadn't tested it when I sent that. I've attached

Re: [dev] A tiny IRC connection tool

2012-04-16 Thread Christoph Lohmann
Greetings. On Mon, 16 Apr 2012 21:54:53 +0200 Connor Lane Smith wrote: > On 16 April 2012 19:38, Christoph Lohmann <2...@r-36.net> wrote: > > There  is socat(1) and netcat(1). Of course they are big, but is there a > > need to reimplement them? > > Neither handle IRC pings. Of course, you could

Re: [dev] A tiny IRC connection tool

2012-04-16 Thread Benjamin R. Haskell
On Mon, 16 Apr 2012, Connor Lane Smith wrote: Hey all, I've written a tiny (90 SLOC) tool for connecting to an IRC server and streaming the connection over stdin/stdout, while responding to (and filtering out) pings. I just wrote this so I could write simpler IRC bots without having to worry

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Galos, David
> Thanks for your contribution! Please test my munging of both codes! It's basically all there, a few issues, though: Checking for any sign is pointless in digitsright. Checking for the minus sign is wrong in digitsleft, because the format string we create won't ever print '+'; but since '-' might

Re: [dev] st utf8 printing

2012-04-16 Thread Joerg Zinke
Am 16.04.2012 um 20:51 schrieb Kurt H Maier : >> I think you are wrong. An example for a TUI with images is w3m compiled with >> inline images. > > Once you include graphics, it is a graphical interface. What the hell > happened to this list that this has to be explained? I think you missed m

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Connor Lane Smith
Hey, On 16 April 2012 22:34, Galos, David wrote: > After some testing I realized that my regex was inaccurate--I forgot to > encase it in '^$'. If everyone here's cool with REG_EXTENDED, I changed it to > "^([^%]|%%)*%[ +-]?[0-9]*.?[0-9]*[fFgGeE]([^%]|%%)*$" > Which seemed clearer, and survived m

Re: [dev] A tiny IRC connection tool

2012-04-16 Thread Connor Lane Smith
On 16 April 2012 21:45, Benjamin R. Haskell wrote: > How does it compare to the other two suckless minimalist IRC tools? In short, ircio does less. It doesn't have any real parsing of the IRC protocol aside from PING, and it's not designed for use as an IRC client. It's equivalent to netcatting i

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Galos, David
> I'm confused about why we need to use a regular expression here. We > can do this with a few loops and some ifs. Using regexes in seq(1) > really, really concerns me. It was really me being lazy-- my evil plan was to pretend that everyone was cool with them unless someone spoke up. Curses!

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Kurt H Maier
On Mon, Apr 16, 2012 at 05:30:05PM -0500, Galos, David wrote: > > I'm confused about why we need to use a regular expression here. We > > can do this with a few loops and some ifs. Using regexes in seq(1) > > really, really concerns me. > > It was really me being lazy-- my evil plan was to pretend

Re: [dev] sbase - seq.c: help wanted

2012-04-16 Thread Galos, David
> > Using regexes in seq(1) really, really concerns me. > Not in C. I've fixed it to use no regex; only goto, loops and string.h stuff; attached is the patch. seq-changes.diff Description: Binary data

Re: [dev] A tiny IRC connection tool

2012-04-16 Thread Kai Hendry
On 17 April 2012 06:20, Connor Lane Smith wrote: > dealing with raw IRC commands, and that's why there's a large > difference in SLOC. Bad for humans, great for bots. So you could use like an adaptor for hubot IIUC, like Ted Dziuba's shell script https://github.com/teddziuba/hubot/blob/master/bin