Re: pattern matching

"Kenneth Miller [email protected] [ocaml_beginners]" <[email protected]> Wed, 30 Mar 2016 05:39:23 +0000 (UTC)
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
Well, I was a staunch vim guy for a long time. Then I wanted my tools to support me more because I got tired of doing things with just a shell. I wanted language based support, which is rather sophisticated and hard to get. I found that vimscript is really really hard to write a good plugin with, and that the vim philosophy explains their editor design in a few words: "do one simple thing, and do it well". Emacs is different in that there are thousands of packages and they integrate within a wholistic system. So one package provides a service - others can use it and register various things against the emacs core. So it can scale better. I does use hundreds of megabytes, but on modern machinery I just don't care what I have to pay to be a more efficient or correct programmer.

You don't have to have a phd. Just learn the movement keys, the multi-modal system, and how to install packages.

Also, you don't have to deal with that annoying backup file in your common directory. I wrote an emacs plugin a long time ago that whistles away every save of a file into a replica directory, so you can get at individual dates and versions of a particular file. 

As far as setting up preferences, you can save your preferences across runs by editing your ~/.emacs file.

You probably should use a shell of some sort for interacting with the operating system. Although I think that bash's shellism make me want to pull my hair out, if bash is what floats your boat, go for it. In any case, utop is more of a way for you to play around with your code that you've written; you write it and experiment with it interactively and then save what you have so it can be fully compiled. Check out the SLIME package for emacs (it's for lisp, but there are sister packages for any subprocess) - it keeps your utop in a little sub process, and when you want you can just send chunks or the whole file to be re-evaluated by the system. It's really awesome because it comebines well with the ability to build custom utop's just like you would any other target binary, but with your dependencies and your own software pre-loaded and defined. 

    On Wednesday, March 30, 2016 12:45 AM, "Douglas Lewit [email protected] [ocaml_beginners]" <[email protected]> wrote:
 

     Hey Hendrik,
Large indentations don't necessarily bother me, but I remember posting a Python program to a Python User's Group with something like 6 spaces per tab, and one of the programmers gave me an earful for not following standard Python protocol, which is 4 spaces per tab.  ( This should be a personal choice for the programmer based on personal visual preferences, but some people insist on suppressing individual creativity for the sake of conforming to their "tried and true" standards. )  
Anyhow, is there a quick way to establish my preferences in Emacs?  Tabs, spaces, indentations, font, font colors, etc?  Thanks!
On Tue, Mar 29, 2016 at 7:33 PM, Hendrik Boom [email protected] [ocaml_beginners] <[email protected]> wrote:

     On Tue, Mar 29, 2016 at 07:28:26PM -0500, Douglas Lewit [email protected] [ocaml_beginners] wrote:

> I've also found
> that when I write a file in Vim, it looks really weird when I open it up in
> Emacs. All the tabs and indentations are way too big! I think in my
> .vimrc file I specified a tab of 4 spaces, but when I open the file in
> Emacs I end up with one tab being equal to like 8 spaces or something like
> that. Very annoying.

It is the case that the default tab settings have been 8 spaces since 
the 60's, on ancient teletype machines, long before the days of emacs.

-- hendrik
   

  #yiv4628933292 #yiv4628933292 -- #yiv4628933292ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv4628933292 #yiv4628933292ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv4628933292 #yiv4628933292ygrp-mkp #yiv4628933292hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv4628933292 #yiv4628933292ygrp-mkp #yiv4628933292ads {margin-bottom:10px;}#yiv4628933292 #yiv4628933292ygrp-mkp .yiv4628933292ad {padding:0 0;}#yiv4628933292 #yiv4628933292ygrp-mkp .yiv4628933292ad p {margin:0;}#yiv4628933292 #yiv4628933292ygrp-mkp .yiv4628933292ad a {color:#0000ff;text-decoration:none;}#yiv4628933292 #yiv4628933292ygrp-sponsor #yiv4628933292ygrp-lc {font-family:Arial;}#yiv4628933292 #yiv4628933292ygrp-sponsor #yiv4628933292ygrp-lc #yiv4628933292hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv4628933292 #yiv4628933292ygrp-sponsor #yiv4628933292ygrp-lc .yiv4628933292ad {margin-bottom:10px;padding:0 0;}#yiv4628933292 #yiv4628933292actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv4628933292 #yiv4628933292activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv4628933292 #yiv4628933292activity span {font-weight:700;}#yiv4628933292 #yiv4628933292activity span:first-child {text-transform:uppercase;}#yiv4628933292 #yiv4628933292activity span a {color:#5085b6;text-decoration:none;}#yiv4628933292 #yiv4628933292activity span span {color:#ff7900;}#yiv4628933292 #yiv4628933292activity span .yiv4628933292underline {text-decoration:underline;}#yiv4628933292 .yiv4628933292attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv4628933292 .yiv4628933292attach div a {text-decoration:none;}#yiv4628933292 .yiv4628933292attach img {border:none;padding-right:5px;}#yiv4628933292 .yiv4628933292attach label {display:block;margin-bottom:5px;}#yiv4628933292 .yiv4628933292attach label a {text-decoration:none;}#yiv4628933292 blockquote {margin:0 0 0 4px;}#yiv4628933292 .yiv4628933292bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv4628933292 .yiv4628933292bold a {text-decoration:none;}#yiv4628933292 dd.yiv4628933292last p a {font-family:Verdana;font-weight:700;}#yiv4628933292 dd.yiv4628933292last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv4628933292 dd.yiv4628933292last p span.yiv4628933292yshortcuts {margin-right:0;}#yiv4628933292 div.yiv4628933292attach-table div div a {text-decoration:none;}#yiv4628933292 div.yiv4628933292attach-table {width:400px;}#yiv4628933292 div.yiv4628933292file-title a, #yiv4628933292 div.yiv4628933292file-title a:active, #yiv4628933292 div.yiv4628933292file-title a:hover, #yiv4628933292 div.yiv4628933292file-title a:visited {text-decoration:none;}#yiv4628933292 div.yiv4628933292photo-title a, #yiv4628933292 div.yiv4628933292photo-title a:active, #yiv4628933292 div.yiv4628933292photo-title a:hover, #yiv4628933292 div.yiv4628933292photo-title a:visited {text-decoration:none;}#yiv4628933292 div#yiv4628933292ygrp-mlmsg #yiv4628933292ygrp-msg p a span.yiv4628933292yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv4628933292 .yiv4628933292green {color:#628c2a;}#yiv4628933292 .yiv4628933292MsoNormal {margin:0 0 0 0;}#yiv4628933292 o {font-size:0;}#yiv4628933292 #yiv4628933292photos div {float:left;width:72px;}#yiv4628933292 #yiv4628933292photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv4628933292 #yiv4628933292photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv4628933292 #yiv4628933292reco-category {font-size:77%;}#yiv4628933292 #yiv4628933292reco-desc {font-size:77%;}#yiv4628933292 .yiv4628933292replbq {margin:4px;}#yiv4628933292 #yiv4628933292ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv4628933292 #yiv4628933292ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv4628933292 #yiv4628933292ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv4628933292 #yiv4628933292ygrp-mlmsg select, #yiv4628933292 input, #yiv4628933292 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv4628933292 #yiv4628933292ygrp-mlmsg pre, #yiv4628933292 code {font:115% monospace;}#yiv4628933292 #yiv4628933292ygrp-mlmsg * {line-height:1.22em;}#yiv4628933292 #yiv4628933292ygrp-mlmsg #yiv4628933292logo {padding-bottom:10px;}#yiv4628933292 #yiv4628933292ygrp-msg p a {font-family:Verdana;}#yiv4628933292 #yiv4628933292ygrp-msg p#yiv4628933292attach-count span {color:#1E66AE;font-weight:700;}#yiv4628933292 #yiv4628933292ygrp-reco #yiv4628933292reco-head {color:#ff7900;font-weight:700;}#yiv4628933292 #yiv4628933292ygrp-reco {margin-bottom:20px;padding:0px;}#yiv4628933292 #yiv4628933292ygrp-sponsor #yiv4628933292ov li a {font-size:130%;text-decoration:none;}#yiv4628933292 #yiv4628933292ygrp-sponsor #yiv4628933292ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv4628933292 #yiv4628933292ygrp-sponsor #yiv4628933292ov ul {margin:0;padding:0 0 0 8px;}#yiv4628933292 #yiv4628933292ygrp-text {font-family:Georgia;}#yiv4628933292 #yiv4628933292ygrp-text p {margin:0 0 1em 0;}#yiv4628933292 #yiv4628933292ygrp-text tt {font-size:120%;}#yiv4628933292 #yiv4628933292ygrp-vital ul li:last-child {border-right:none !important;}#yiv4628933292