« first day (2405 days earlier)      last day (2574 days later) » 
00:00 - 22:0022:00 - 00:00

10:00 PM
God forsaken bash bubble sort is finally working (except punctuation in directory names) FINALLY after ONE WEEK!
Now I can kick back and watch some ice hockey :)
 
10:16 PM
-1
Q: Software stabalization

oshirowanenTrying to do some software video stabalization using transcode. Using the following 2 commands: transcode -J stabilize -i MOVIE -y null,null -o dummy transcode -J transform -i MOVIE OUTPUTOPTIONS -o STABILE Only issue is that the OUTPUTOPTIONS I use cause the video quality to drop a lot. -y ...

 
10:27 PM
@WinEunuuchs2Unix Bubble sort? In Bash? I hope that was for an exercise and nothing productive.
 
@DavidFoerster Well After a week I got desperate and downloaded source code for tree command and was floored to learn it calls c-code called "quicksort". I reinvented a wooden wheel using a sharp rock sigh.
Most of wasted time was in LANG=C, en_CA-UTF-8, collating sequences and how tree command simply removes some punctuation characters rather than sorting them for "user-friendly" alphabet that hates "ASCIIabetical".
I guess the R&D knowledge will help me in the future shrugs
 
What kind of things did you try to sort? sort should cover most of them and the specific sort algorithm doesn't matter for success.
 
I have an array of 3,000 to 20,000 directory names in Ubuntu. Stored in bash array the use CRUD operations with YAD on them.
I looked at sort but array has no \n (newline)
fields are separated with "|"
10 fields per array entry (directory name).
 
sort supports arbitrary field separators and you can easily feed the content of a Bash array to the standard input of an external command.
Can you give me an example? I'm pretty sure I can come up with a better solution.
 
Darn. Wish I knew that a week ago :(
 
10:36 PM
Even an implementation of Quicksort in Bash would be better.
Oh, and sort uses the LC_COLLATE locale setting to compare strings, so you can set that to C or whatever suits your needs.
 
I did find some guy who wrote Quicksort for Bash in Stack Overflow but I couldn't wrap my mind around recursive nature, found bubbles easier to comprehend :)
 
Yeah, I remember that it took me quite a while to understand recursive algorithms.
 
The problem isn't LC_COLLATE on locale settings. I use tree command to generate initial database and only when I add a directory and subs do I need to resort. It's in the resorting I couldn't figure out tree logic because it was resorting it's elements.
 
There are very good teaching materials to illustrate recursive Quicksort though.
 
Sadly I learned Quicksort and Bubblesort in Assembler 30 years ago in college but most of it was forgotten. :(
 
10:40 PM
I never used tree but it looks like it's main purpose is to display directory content and not to generate machine-readable output. find is usually better with that.
 
Before deleting all my "echo's" and various attempts at LANG=, declare -u ArrayName and search and replace \057 with \037 I copied it all to a file called "NIGHTMARE".
 
Ultimately it may be better to use something more flexible than Bash for this task, e. g. Python, Perl, or Lua.
 
The only other option besides tree was ls to generate initial database and I found tree more friendly (to me).
tree --noreport -danifI "src*|dev|lib|media|mnt|proc|root|run|sys|tmp|tmpfs|var|usr" "$1"
 
Bash is not that good with data structures.
 
I'll be moving onto C in 6 months to a year.
SQL too instead of bash arrays.
 
10:45 PM
Even C may work out better but in my experience Python & Co. are better for prototyping algorithms. You can always write a C or C++ program if Python/Perl/whatever is too slow. A native module for either of those is another options.
Ruby and PHP are other quite suitable scripting languages.
 
wat
 
If you are interested in the design here are some screen mockups I made last week: askubuntu.com/questions/774103/…
 
I mean, I don't find them particularly good but they're OK for moderately complex data mangling tasks.
 
The nice thing about Ubuntu Bash is I can port it to Windows in a year or two when I get a new used laptop.
 
Most scripting languages are pretty portable.
 
10:48 PM
Bash is ok for managing 20,000 directories on your laptop that are of interest but arrays break in YAD after 200,000 array elements (10 elements per directory name).
First time around I had 418,000 directories (4.18 million elements) because I didn't realize my /media pointed to my Windows 7 drive.
It broke horribly LOL
It was like 40 minutes to build the array... after I learned my mistake it was only a few seconds to build the directory names array for Linux only on SSD.
 
Yeah, (graphical) file managers really are a job for a "real" programming language. Bash lacks many of the niceties that you'd want and you don't profit a lot from Bash's simple command invocation.
 
Yeah it's kind of an accident I had to learn Bash & Shell just to make Ubuntu work then I expanded from there with arrays, dialog boxes, etc.
I even web-scraped Ask Ubuntu answers using bash :)
 
I recommend any of the aforementioned scripting languages (minus PHP). They have bindings to various graphics toolkit libraries like GTK+, Qt and Tk for the UI.
 
I think YAD is using GTK+ but I'm not 100% positive. I'd like to start learning one that works on Windows too in order to future-proof my toolkits.
 
All of the above toolkits work in Windows and OS X too.
 
10:54 PM
I didn't mean as a native Window app, I meant within Ubuntu Bash for Windows subsystem where I'd like to develop.
 
If you're aiming for a more "native" look-and-feel on each platform you should use Wx instead.
 
I really don't care about Apple... they were never much of a business platform unless it was media graphic arts.
Is Wx the new Wayland they've been talking about?
 
The GTK/Qt/Tk/Wx bindings will work the same for any language on any supported platform.
No. The full name is wxWidgets.
 
it's the C code which will be the tricky part. You have to design your libraries carefully so certain binaries remain the same and other ones talk to the OS.
Thanks for the link. But They shouldn't have called it "WxWidgets" after microsoft sued them for using "WxWindows". They should have called it "WxWinner".
 
The way I imagine it there wouldn't be any C code to write at all.
 
10:59 PM
Well the catch is I already have a million lines of C code from the 80's and 90's I want to modernize to GUI.
 
Scripting languages are usually better for UI development.
 
These are C applications Personnel Tracking and Warehouse Accounting.
 
Well, GTK+ and Tk are C libraries anyway.
Qt and wx are C++ and you may be able to build a C++ front-end around an existing C back-end.
 
The kernel is written in C so that might be the platform of choice for me. I don't know what language MS Windows is written in but I'll probably never see that source code anyway so mute point.
 
Windows was written in C originally. They've started to build new stuff in and replace old stuff with C++.
Some higher-level user-space tools are written in C#, usually as a front-end for some operating system service written in C or C++.
 
11:04 PM
I think the deciding factor is the applications I like to learn from in Linux and the language they are written in.
I'll probably have to learn PHP because I have an old laptop I want to install LAMP on.
Hopefully PHP can call bash scripts :)
 
11:28 PM
@NathanOsman what's your lowest version Android emu?
 
00:00 - 22:0022:00 - 00:00

« first day (2405 days earlier)      last day (2574 days later) »