Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

edit: eh, nevermind

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

Symbolic Butt posted:

Once I saw this one dude using some vim script or something (I'm not even entirely sure if it was really vim) that if you typed like 'or not = == in' it would show as '∨ ¬ → ≡ ∈'.

I can't find any evidence that this is a real thing, if anyone is familiar with it please tell me.



:help digraphs
code:
Digraphs                                        digraph digraphs Digraphs

Digraphs are used to enter characters that normally cannot be entered by
an ordinary keyboard.  These are mostly printable non-ASCII characters.  The
digraphs are easier to remember than the decimal number that can be entered
with CTRL-V (see i_CTRL-V).

There is a brief introduction on digraphs in the user manual: 24.9
An alternative is using the 'keymap' option.

1. Defining digraphs    digraphs-define
2. Using digraphs       digraphs-use
3. Default digraphs     digraphs-default

{Vi does not have any of these commands}

==============================================================================
1. Defining digraphs                                    digraphs-define

                                                :dig :digraphs
:dig[raphs]             show currently defined digraphs.
                                                        E104 E39
:dig[raphs] {char1}{char2} {number} ...
                        Add digraph {char1}{char2} to the list.  {number} is
                        the decimal representation of the character.  Normally
                        it is the Unicode character, see digraph-encoding.
                        Example: >
        :digr e: 235 a: 228
<                       Avoid defining a digraph with '_' (underscore) as the
                        first character, it has a special meaning in the
                        future.

Vim is normally compiled with the +digraphs feature.  If the feature is
disabled, the ":digraph" command will display an error message.

Example of the output of ":digraphs": >
 TH Þ  222  ss ß  223  a! à  224  a' á  225  a> â  226  a? ã  227  a: ä  228

The first two characters in each column are the characters you have to type to
enter the digraph.

In the middle of each column is the resulting character.  This may be mangled
if you look at it on a system that does not support digraphs or if you print
this file.

                                                        digraph-encoding
The decimal number normally is the Unicode number of the character.  Note that
the meaning doesn't change when 'encoding' changes.  The character will be
converted from Unicode to 'encoding' when needed.  This does require the
conversion to be available, it might fail.  For the NUL character you will see
"10".  That's because NUL characters are internally represented with a NL
character.  When you write the file it will become a NUL character.
        
When Vim was compiled without the +multi_byte feature, you need to specify
the character in the encoding given with 'encoding'.  You might want to use
something like this: >

        if has("multi_byte")
                digraph oe 339
        elseif &encoding == "iso-8859-15"
                digraph oe 189
        endif

This defines the "oe" digraph for a character that is number 339 in Unicode
and 189 in latin9 (iso-8859-15).

==============================================================================
2. Using digraphs                                       digraphs-use

There are two methods to enter digraphs:                        i_digraph
        CTRL-K {char1} {char2}          or
        {char1} <BS> {char2}
The first is always available; the second only when the 'digraph' option is
set.

If a digraph with {char1}{char2} does not exist, Vim searches for a digraph
{char2}{char1}.  This helps when you don't remember which character comes
first.

Note that when you enter CTRL-K {char1}, where {char1} is a special key, Vim
enters the code for that special key.  This is not a digraph.

Once you have entered the digraph, Vim treats the character like a normal
character that occupies only one character in the file and on the screen.
Example: >
        'B' <BS> 'B'    will enter the broken '|' character (166)
        'a' <BS> '>'    will enter an 'a' with a circumflex (226)
        CTRL-K '-' '-'  will enter a soft hyphen (173)

The current digraphs are listed with the ":digraphs" command.  Some of the
default ones are listed below digraph-table.

For CTRL-K, there is one general digraph: CTRL-K <Space> {char} will enter
{char} with the highest bit set.  You can use this to enter meta-characters.

The <Esc> character cannot be part of a digraph.  When hitting <Esc>, Vim
stops digraph entry and ends Insert mode or Command-line mode, just like
hitting an <Esc> out of digraph context.  Use CTRL-V 155 to enter meta-ESC
(CSI).

If you accidentally typed an 'a' that should be an 'e', you will type 'a' <BS>
'e'.  But that is a digraph, so you will not get what you want.  To correct
this, you will have to type <BS> e again.  To avoid this don't set the
'digraph' option and use CTRL-K to enter digraphs.

You may have problems using Vim with characters which have a value above 128.
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
mode.  After leaving the Insert mode everything is fine.  Note that fmt
removes all characters with a value above 128 from the text being formatted.
On some Unix systems this means you have to define the environment-variable
LC_CTYPE.  If you are using csh, then put the following line in your .cshrc: >
        setenv LC_CTYPE iso_8859_1

==============================================================================
3. Default digraphs                                     digraphs-default

Vim comes with a set of default digraphs.  Check the output of ":digraphs" to
see them.

On most systems Vim uses the same digraphs.  They work for the Unicode and
ISO-8859-1 character sets.  These default digraphs are taken from the RFC1345
mnemonics.  To make it easy to remember the mnemonic, the second character has
a standard meaning:

        char name               char    meaning
        Exclamation mark        !       Grave
        Apostrophe              '       Acute accent
        Greater-Than sign       >       Circumflex accent
        Question mark           ?       Tilde
        Hyphen-Minus            -       Macron
        Left parenthesis        (       Breve
        Full stop               .       Dot above
        Colon                   :       Diaeresis
        Comma                   ,       Cedilla
        Underline               _       Underline
        Solidus                 /       Stroke
        Quotation mark          "       Double acute accent
        Semicolon               ;       Ogonek
        Less-Than sign          <       Caron
        Zero                    0       Ring above
        Two                     2       Hook
        Nine                    9       Horn

        Equals                  =       Cyrillic
        Asterisk                *       Greek
        Percent sign            %       Greek/Cyrillic special
        Plus                    +       smalls: Arabic, capitals: Hebrew
        Three                   3       some Latin/Greek/Cyrillic letters
        Four                    4       Bopomofo
        Five                    5       Hiragana
        Six                     6       Katakana

Example: a: is ä  and o: is ö

These are the RFC1345 digraphs for the one-byte characters.  See the output of
":digraphs" for the others.  The characters above 255 are only available when
Vim was compiled with the +multi_byte feature.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
oh I found it, fiiinally

http://github.com/ehamberg/vim-cute-python

it's actually just a simple use of some vim new feature (conceal)

but hey, you can also be this cool with perl, php and haskell!


λ x: x

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
also python

https://github.com/ehamberg/vim-cute-python

Socracheese
Oct 20, 2008

i can't see how that would be a confusing headache, nope

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

ok but why

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
because i got my degree in math

MeruFM
Jul 27, 2010
it actually kinda works in python

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
which means that this:



    map (λ x: x, [1,2,3])

    def foo(e, a):
        if e ∈ [1,2,3] ∧ ¬a:
            return √(π)
        else:
            return ∑([1,2,3])


is more legible than this


    map (lambda x: x, [1,2,3])

    def foo(e, a):
        if e in [1,2,3] and not a:
            return math.sqrt(math.pi)
        else:
            return sum([1,2,3])

Workaday Wizard
Oct 23, 2009

by Pragmatica
the only enhancement is lambda as λ (because lambda is a noun and thus terrible as a keyword). the rest is worthless.

cowboy beepboop
Feb 24, 2001

rotor posted:

which means that this:



    map (λ x: x, [1,2,3])

    def foo(e, a):
        if e ∈ [1,2,3] ∧ ¬a:
            return √(π)
        else:
            return ∑([1,2,3])


is more legible than this


    map (lambda x: x, [1,2,3])

    def foo(e, a):
        if e in [1,2,3] and not a:
            return math.sqrt(math.pi)
        else:
            return sum([1,2,3])

omg i love it

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Shinku ABOOKEN posted:

the only enhancement is lambda as λ (because lambda is a noun and thus terrible as a keyword). the rest is worthless.

you're worthless

Workaday Wizard
Oct 23, 2009

by Pragmatica

rotor posted:

you're worthless

oh no

1337JiveTurkey
Feb 17, 2005

i majored in math but the notation and penchant for single greek character identifiers never really grew on me. φ(n) is quicker to write on a chalkboard than totient(n) or for enterprise java number theorists numberOfDistinctPositiveIntegersLessThanAndRelativelyPrimeTo(n) but the only reason it means anything is due to convention. i still can't understand why √x sticks around when x1/2 or x.5 is easier to write and more consistent.

Socracheese
Oct 20, 2008

1337JiveTurkey posted:

i still can't understand why √x sticks around when x1/2 or x.5 is easier to write and more consistent.

this is annoying when you do calculus, first thing i'd have to do is convert them all to exponent notation instead of √

PrBacterio
Jul 19, 2000

1337JiveTurkey posted:

i majored in math but the notation and penchant for single greek character identifiers never really grew on me. φ(n) is quicker to write on a chalkboard than totient(n) or for enterprise java number theorists numberOfDistinctPositiveIntegersLessThanAndRelativelyPrimeTo(n) but the only reason it means anything is due to convention. i still can't understand why √x sticks around when x1/2 or x.5 is easier to write and more consistent.
it's rare for me to find a post I just unequivocally agree with, and in YOSPOS of all places, so I'll just quote this here and welp

PENETRATION TESTS
Dec 26, 2011

built upon dope and vice
the only reason anything means anything is convention

if the editor can transform between equivalent representations then everyone's happy?

Sneaking Mission
Nov 11, 2008

squirt(x)

double sulk
Jul 2, 2010

http://www.jetbrains.com/specials/index.jsp

jetbrains' stuff is 75% off today. i don't know how good most of it is but it's still a big sale.

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post
resharper for vs is the greatest thing ever and worth 50 bucks without thinking about it.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

gucci void main posted:

http://www.jetbrains.com/specials/index.jsp

jetbrains' stuff is 75% off today. i don't know how good most of it is but it's still a big sale.

yup upgradign to 12 now

their servers appear to be getting beat to poo poo right now tho

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

gucci void main posted:

http://www.jetbrains.com/specials/index.jsp

jetbrains' stuff is 75% off today. i don't know how good most of it is but it's still a big sale.

tried ruby mine a couple weeks ago, it's poo poo

double sulk
Jul 2, 2010

Cocoa Crispies posted:

tried ruby mine a couple weeks ago, it's poo poo

:( i figured as much, it and pycharm look like more hassle than they're worth

gabensraum
Sep 16, 2003


LOAD "NICE!",8,1

0xB16B00B5 posted:

resharper for vs is the greatest thing ever and worth 50 bucks without thinking about it.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Viggen posted:

Here's an oldie but goodie:

code:
<?php
@include("http://site.com/header.html");
...
@include("http://site.com/footer.html");
?>
Gee, any idea why it takes 30 seconds to render the index page? Well, actually, yes.

baquerd posted:

I don't get it, aren't includes like headers and footers a basic part of php templating?

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
tee hee

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

gucci void main posted:

http://www.jetbrains.com/specials/index.jsp

jetbrains' stuff is 75% off today. i don't know how good most of it is but it's still a big sale.

holey moley!!!

Posting Principle
Dec 10, 2011

by Ralp
intellij idea is real nice and pycharm is real pointless

MononcQc
May 29, 2007

gucci void main posted:

http://www.jetbrains.com/specials/index.jsp

jetbrains' stuff is 75% off today. i don't know how good most of it is but it's still a big sale.

Thanks for this. Forwarded to my brother who actually uses that stuff.

~ family of programmers ~

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

double sulk
Jul 2, 2010

im sqrtin here

multigl
Nov 22, 2005

"Who's cool and has two thumbs? This guy!"

gucci void main posted:

:( i figured as much, it and pycharm look like more hassle than they're worth

pycharm is awesome

Posting Principle
Dec 10, 2011

by Ralp
just use eclipse for everything

salted hash browns
Mar 26, 2007
ykrop

multigl posted:

pycharm is awesome

how much better is pycharm than pydev

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal
no don't

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
jetbrains is dying

come back baby come back

Posting Principle
Dec 10, 2011

by Ralp
I hope they publish stats of how much money they made today, because its going to be a whole lot

e: and they're dead

Posting Principle fucked around with this message at 18:41 on Dec 20, 2012

qntm
Jun 17, 2009

Jerry SanDisky posted:

just use eclipse for everything

sitting here with five eclipses and 3gig of RAM.

every time one of them hangs and thrashes the hard drive for a little while, that's a tea break

Posting Principle
Dec 10, 2011

by Ralp
platters in 2012

Adbot
ADBOT LOVES YOU

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

multigl posted:

pycharm is awesome

Have you tried WingIDE?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply