[dev] Shell vs C where is the border?

2014-03-10 Thread Szymon Olewniczak
Hi,
I was recetly wondering about the use cases of C and shell. I've seen that
this topic appears several times mostly when discussing sbase. Some of
you probably knows ffmpeg, software that allows to convert media files
between various formats. Imagine now that we have several smaller tools
that do one thing and do it well and to convert mkv wideo do webm we do:
videostream movie.mkv | theoradec | v8enc  video
audiostream movie.mkv  audio
createwebmvideo video audio

But having so many individual programs is more harder to use that just
one (we need to run more commands), so reasonable would be to combine
all this commands to one script which would do all this work
automaticaly. So what solution would be better in your opinion? When
we should use shell scripts and when write new C programs to achieve our
goals?

BR,
Szymon



[dev] What is bad with Python

2014-03-03 Thread Szymon Olewniczak
Hi,
I've recently had a presentation(during local Linux User Group meeting)
about some basic ideas Unix philosophy and suckless projects. This has led 
my attention once to the topic of programming languages and I must admit
that I've found Python much less harmful that I had previously
considered it to be. And when I can point out why does Perl, PHP, JS
sucks, python is another way round. Python has precise design, the code
is readable and what is very important it simplify many things. In
addition it has many great libraries so why
do not use Python at least as a prototype language. Mayby it's
multi-paradigm aproach is the problem but what alternatives to python do you 
see?
awk? Limbo? And at last what do you thing about Ruby which is quite
similar to the python in many aspects?

BR,
Szymon



Re: [dev] man and man-db

2013-11-05 Thread Szymon Olewniczak
On Tue, Nov 05, 2013 at 10:58:58AM +, Raphaël Proust wrote:
 On Mon, Nov 4, 2013 at 11:45 AM, Szymon Olewniczak
 szymon.olewnic...@rid.pl wrote:
  Which db engines
  do you consider of being suckless?
 
 I (as in “myself”, not as in “the suckless community”) think file
 based storage is a DB that sucks less than most systems out there.
But it has some disadvantages. For example searching 
database, without indexes can be very slow. Another issue rise when you
have huge files that cannot be fully loaded to RAM. When you would relay only
on the kernel, you could easily slow down your system with lots of
unnessesery IO operations. So when you think about this in that
way, you will realize that some database engine can be useful. 

 However, I would argue that the file abstraction is the important bit,
 not the implementation (i.e. if you have a file interface that does
 not rely on usual files can be close enough to the suckless philosophy
 (depending on the implementation). E.g. procfs is a database of the
 running processes on top of which is is reasonably easy to building
 clean, portable scripts and programs that do not suck too much. Other
 examples: devices in /dev, network connections in Plan9's /net.
Great idea. I'll look at it.

BR,
Szymon



[dev] man and man-db

2013-11-04 Thread Szymon Olewniczak
Hi,
I've realized recently that starting from the times of Fedora 13 man
application was replaced by man-db in all major GNU/Linux distros. Do
you thing that using Berkeley DB is better that traditional flat-text
whatis db (in my opinion it is, it probably speed up things)? Does the 
apropos command works in the original man implementation? And what is 
your opinion about Berkeley DB - is it suckless or not? Which db engines 
do you consider of being suckless?

BR,
Szymon



[dev] TDD

2013-10-22 Thread Szymon Olewniczak
Hi,
what is your opinion about TDD? Is it suckles or not? Do you have any
experience with this kind of development? Do TDD in C make any sense?

BR,
Szymon



Re: [dev] Some thoughts about XML

2013-10-20 Thread Szymon Olewniczak
On Sun, Oct 20, 2013 at 01:02:34AM +0200, Dmitrij D. Czarkoff wrote:
 Evan Buswell said:
  But OTOH, I do like the idea of separating the translation-to-html bit
  from the generate-sensible-output bit. XSLT may have done this poorly,
  but it's on the right track (and what else works better for this, Awk?
  Perl? m4?). I mean, I take the point that we can't really make the web
  stack all that much better, but at least we can containerize suck?
  Yes?
 
 Containerize suck of web stack? It is already containerized in browsers
 - choose the one that sucks less.
 
 See, the problem with web stack are not somewhere between the stack and
 the rest of your software and data. You readily may have your data in
 whatever format you want and share it via whatever protocol you like.
 Eg. you may have a bunch of JSON files accessible via their URLs as they
 are and via werc (or your custom CGI script) as HTML. The problem with
 web stack is the ugliness of web stack itself, and there is no
 workaround for that.
But think that we need to find something between. If we develop our
own window manager on top of X11(which itself isn't very suckless),  its 
useful beouse it uses X11 (something that is standrad now) and it let us
use all X11 apps in a less sucky way.

So I think that saying - all modern web sucks(which is right in fact) -
 let's make something completly diffirent is like saying - X11
sucks, let's create something that can replace it. 

I'm serching for something similar as dwm in the web services world. 
We cannnot force everyone to use something diffirent than HTML and HTTP
becouse noone want a huge revolution(users, web browsers and http
servers developers). But maybe we can use this tools to create something 
less sucky, something that would make the web a better place. 

I don't want to starting a new project that will make the web 
worst place. I believe that web developdent can be done better rigth now and 
I want to show that it's possible. 

BR,
Szymon



[dev] Some thoughts about XML

2013-10-18 Thread Szymon Olewniczak
Hi,
everyone knows that XML has its defects but considering some of our
discussions about suckless web ideas I think that XML + XSLT is quite a
good solution - much better than plain HTML. Pages writen in XML has
readable source and data can be accessed much more easily. In addition 
using of XML causes that we have API for each web page which is using
it.

Other disadvantage of XML - the large size of files (in compression with
JSON) also isn't a big problem becouse when we use some compression
algorithms (gzip for example), xml will compress much better and it's
size will be similar to its JSON equivalent. 

Another advantage of XML is its adaptation. We've already have MathML,
SVG and many many others[1] all build on top of XML.

Persons who would like to use web browser to read
the page can still do it (using XLST) and the person who would like to
get some information from the page can also do it in easy way. 

At the and I want to ask you a question. What do you think would be the
best solution for bulding websites which would look similar to this what
we have now(gopher is great but ...) and would have easily accessible
data for persons who want to use it in thay own applications?

BR,
Szymon

[1]https://en.wikipedia.org/wiki/List_of_XML_markup_languages



Re: [dev] Some thoughts about XML

2013-10-18 Thread Szymon Olewniczak
On Fri, Oct 18, 2013 at 06:48:06PM +0200, Dmitrij D. Czarkoff wrote:
 Chris Down said:
  On 2013-10-18 14:44, Szymon Olewniczak wrote:
   Pages writen in XML has readable source and data can be accessed much more
   easily.
  
  I don't even know what to say to this...
 
 Strictly speaking, I agree with OP on this: XML is much better then HTML
 (actually fault-tolerance reuired for HTML makes it much worse then otherwise
 nightmarish XML). That doesn't make XML usable though.

I've started this topic becouse I'm woriking in a small family firm and
we have decided that we need an new application to managing complaints,
documentation, and several other things of our clients (I don't want to 
go into detail). So I'm thinking about model that would make it usable
for peoples like me and for non-tech users. XML + XSLT is one
of my ideas, another is one file web application based on JSON
calls (maybe its better, what do you think?). I believe that we can make
the web the better place without huge revolutino(such as changing HTTP
to something else) or maybe I am wrong.

BR,
Szymon



Re: [dev] Some thoughts about XML

2013-10-18 Thread Szymon Olewniczak
 On 18/10/2013, Szymon Olewniczak szymon.olewnic...@rid.pl wrote:
  I believe that we can make the web the better place without huge revolutino
 
 s/HTML/XML+XSLT/g is quite a revolution.
But it's something whitch I can use in my application straight away
without forcing user to change their web browsers. 
  (such as changing HTTP to something else)
 
 Which is this about, HTTP or HTML?
It's about whole modern web stack and ways we can make it better,
without a huge revolution. 

BR,
Szymon



[dev] [dwm] mousless monitor switching

2013-06-03 Thread Szymon Olewniczak
Hi,
there is one thing about dwm that really annoy me. In multi-monitor setup
I need to use mouse to switch between my screens. Can I do it using some
keyboard shorotcuts. I like the way it's working in i3 where I simply have 
one set of tags for all screens and switching tag automaticly switches
screen, when the tag belongs to other screen. (by default first screen get 1
tag second 2 and so on). Can I achieve something similar in dwm?

Regards,
Szymon



[dev] Why HTTP is so bad?

2013-05-22 Thread Szymon Olewniczak
On the http://harmful.cat-v.org/software/ I've found very interesting
statment about HTTP: or best of all: don't use HTTP. Can someone
explain me why the author claims that? What is bad in http?

Regards,
Szymon