2427 posts
Location
UK
Posted 31 December 2015 - 07:25 PM
Had to share this. I think it characterises a lot of our programs, definitely many of mine.
[media]
http://www.youtube.com/watch?v=lIFE7h3m40U[/media]
video link for those without flash:
https://www.youtube.com/watch?v=lIFE7h3m40U
Edited on 31 December 2015 - 06:38 PM
2679 posts
Location
You will never find me, muhahahahahaha
Posted 31 December 2015 - 07:35 PM
DemHydraz will love this guy:
- "I use Windows, because it's cheaper."
-"By the way, if anyone suggests using Linux… NO, simply NO."
~The guy from the video.
429 posts
Posted 31 December 2015 - 08:49 PM
This could be shortened to 10 lines of bash. I'm not angry, just disappointed.
224 posts
Posted 31 December 2015 - 09:45 PM
This could be shortened to 10 lines of bash. I'm not angry, just disappointed.
Let's see it.
Edited on 31 December 2015 - 08:45 PM
429 posts
Posted 31 December 2015 - 11:09 PM
sudo evtest /dev/input/by-id/usb-*-event-kbd |grep --line-buffered 'EV_KEY.*value 1\>'|while read line; do code=`echo "$line"|sed 's/.*code \([0-9]*\).*/\1/'`; xdotool key `printf U%X $((code+0x1F601))`; done
Single line.
EDIT:
Here's some sample output. You can see residual characters because this isn't generating keybindings, this is filtering USB keyboard events (for every USB keyboard on the system, regardless) into xdotool key commands.
Edited on 31 December 2015 - 10:16 PM
224 posts
Posted 01 January 2016 - 12:20 AM
Where is the GUI? Everyone wants GUI.
2679 posts
Location
You will never find me, muhahahahahaha
Posted 01 January 2016 - 12:54 AM
Where is the GUI? Everyone wants GUI.
Apparently not DemHydraz.
376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 01 January 2016 - 02:12 AM
Until now I called it "Duct Tape Coding."
That aside, great video.
1583 posts
Location
Germany
Posted 01 January 2016 - 02:24 AM
Where is the GUI? Everyone wants GUI.
GUIs are for the weak.
429 posts
Posted 01 January 2016 - 01:35 PM
Where is the GUI? Everyone wants GUI.
I said 10 lines of bash, not 8000 lines of Vala.
1080 posts
Location
In the Matrix
Posted 01 January 2016 - 06:57 PM
To be honest, Tom isn't a programmer by trade, he's a linguist. The fact that he knew enough of what he knew to get this working is astounding in of itself. As for better coding practices, of course people who program for a job will have better more robust solutions.
2427 posts
Location
UK
Posted 01 January 2016 - 07:25 PM
Sometimes it's fun to look at a fun program idea and think "Let's try it this unorthodox way" or "I wonder if I could do it without using…".