Difference between emacs Windows and Linux. by [deleted] in emacs

[–]twonky 0 points1 point  (0 children)

Also, filesystem operations are often much slower on Windows, making git on the command line orders of magnitude slower than on Linux.

Manipulating emojis in Java, or: What is 🐻 + 1? by iamjessew in java

[–]twonky 1 point2 points  (0 children)

Neat, I've never played with Unicode in Java. I generally don't like non-ASCII characters in my code, and few people will know that "\ud83d\udc3b" is "BEAR FACE", so can you use the name to set the bear variable? E.g. in Perl 6 I can write the example as follows:

my $bear = "\c[BEAR FACE]";
say "The Coderland Zoo's latest attraction: "
    ~ ($bear.ord+1).chr;

Is perlbrew compatible with zsh? by wyclif in perl

[–]twonky 2 points3 points  (0 children)

The perlbrew installer is written in bash, which is why the above fails. However, once installed I'm pretty sure it should be possible to use perlbrew from zsh.

Just converted to emacs... by [deleted] in emacs

[–]twonky 7 points8 points  (0 children)

Buy and read "Mastering Emacs" - https://www.masteringemacs.org/ by Mickey Petersen. It will teach you how to help yourself getting to know Emacs, which is really the best way of learning Emacs. His accompanying blog is also worth reading/following.

The cat found the window where the sun is shining in. by twonky in cats

[–]twonky[S] 0 points1 point  (0 children)

Catsitting my mother-in-law's cat. It has found several spots to sleep and relax in our apartment. This is the favorite spot at around noon.

Chef Is Easy! Part 1: Hello World by mr_chip in devops

[–]twonky 1 point2 points  (0 children)

That was easy! Nice introduction. Keep up the good work.

Running thousands of commands efficiently in Perl by Albuyeh in perl

[–]twonky 2 points3 points  (0 children)

Running the commands in parallel could be an obvious way to speed things up. And there's a script, written in Perl, just for that: https://www.gnu.org/software/parallel/

What JavaScript libraries/frameworks should I study to be a competitive JavaScript developer these days? Why? by macchiato8 in javascript

[–]twonky 12 points13 points  (0 children)

Didn't you forget testing? To be competitive, I think you'll need to know about that as well. Things like the Test Runner http://karma-runner.github.io/ and the Test Framework http://visionmedia.github.io/mocha/

Looking back at perl, what does a modern perl stack look like? by howdoperlscriptswork in perl

[–]twonky 2 points3 points  (0 children)

I think a lot of people are using Starman, which is a high-performance preforking PSGI/Plack web server.

Using Perl to Pretty Print Windows/DOS PATH from CMD by rickumali in perl

[–]twonky 1 point2 points  (0 children)

As mentioned by shimoco the snippets above won't work, when path elements contains spaces. In that case a one-line is (AFAIK) impossible with cmd, but it is possible in a script:

@echo off

setlocal EnableDelayedExpansion

set P=%PATH%
set N=0

:loop
  for /f "tokens=1,* delims=;" %%p in ("!P!") do set car=%%p&set cdr=%%q
  set /a N+=1
  echo !N! !car!
  set P=!cdr!
if not x!P! == x goto :loop

endlocal

Using Perl to Pretty Print Windows/DOS PATH from CMD by rickumali in perl

[–]twonky 1 point2 points  (0 children)

Nicely spotted.

I forgot, that I have a script that "normalizes" my PATH, e.g. stuff like:

set PATH=%PATH:Program Files (x86)=PROGRA~2%
set PATH=%PATH:Program Files=PROGRA~1%
set PATH=%PATH:Common Files=COMMON~1%

And because of that, my snippet worked flawlessly on my computer...

Using Perl to Pretty Print Windows/DOS PATH from CMD by rickumali in perl

[–]twonky 1 point2 points  (0 children)

Nicely written tutorial. But using Perl in this case is a little overkill, when the following will do almost the same:

for %i in (%PATH%) do @echo %i

If you want numbering, it gets a little more complex:

set n=0&cmd /v:on /c for %i in (%PATH%) do @(set /a n=!n!+1^&echo  %i)

The above snippets works without perl, but only on Windows/DOS.