logs archiveIRC Archive / Freenode / #emacs / 2010 / March / 22 / 1
rgr
as are too many functions when it makes no sense to break it down into many polluting your memory and the name spaces.
RadioApe`
5 lines at most
Never nest deeper than 3 or 4.
rgr
sounds like ivory tower bullsh*t to me.
RadioApe`
Yeah, maybe emacs does need a namespace mechanism.
But you could write one, if you wanted.
Wouldn't be *too* hard.
stepnem
.oO("5 lines at most"?)
zomfg
rgr
ok ..... (makes whirring motions with his finger by his ear and slinks off...)
RadioApe`
(module (export ...) (use ...) ...)
rgr
yup. really easy and intuitive. You need a cup of reality tea.
RadioApe`
I WILL WRITE THIS.
I WILL CREATE A MODULE SYSTEM.
THEN WE WILL SEE!
         

rgr
sure you will. And maybe 2 people will use it. maybe. if you finish it. which you wont.
tali713
nothing is intuitive!!!
rgr
nothing is intuitive? What a load of nonsense.
tali713
rgr: it all takes paractice and familiarity, you just happen to have startedon imperitive languages
(ouch, my spelling is bad)
rgr
tali713: I know fluently about 6 languages. I have tought some. I have a good idea of what people can learn relatively quickly and what not. And haskell, and to a lesser degree, elisp are not up there with things like C, Java or .....
tali713
there was nothing intuitive to me about for loops and while loops, or objects, but I started with BASIC.
rgr
err, and they all exist in pretty much all languages.
RadioApe`
I think, in fairness, Elisp is sort of weird.
rgr
yes it is sort of weird.
RadioApe`
I constantly think Emacs is both the awesomest software I've ever used and the worst.
But at the end of the day.
It works.
rgr
emavcs IS awesome. but with power comes responsibility ... <sound of orchestra> ....
tali713
well yes, and i think elisp would be better if it had lexical scope by default. But I understand why dynamic was chosen.
rgr
I know people who still think they are leet C programmers because they use "i++" ;)
huh? I dont even know what you mean there. It has "lexical scope" too doesnt it?
tali713
and i hear people say that using GOTO is ALWAYS bad.
RadioApe`
It has lexical-let
technomancy
rgr: it has a macro that lets you fake lexical scope
rgr
RadioApe`: exactly
RadioApe`
But it is difficult to use in a lot of common cases
technomancy
if you squint it's the same thing, but it doesn't support it natively
RadioApe`
That is why I implemented clojure's defn, actually.
I wanted functions which created lexical scopes.
         

rgr
but there is my point some more. Dont get me wrong. I dont hate elisp, but to suggest its as "easy" as some others is living in wonderland.
RadioApe`
And it seemed like it would be easier to reimplement clojure's semantics than common lisps.
I don't think its particularly hard either.
The language basically makes sense. It feels a little outdated, but it makes sense.
vasudeva_
is there a way to get emacs to auto-launch subshells in named buffers, possibly then executing shell commands in them? right now i have to manually open each subshell i want, set it up and launch the process manually
rgr
oo, oo, my takeaway thai has arrived .... ciao for now.
RadioApe`
There is very little extremely surprising about how it works.
vasudeva_: there are lots of ways to do this.
tali713
it is not as easy as scheme for example. but it is better suited to text editting.
RadioApe`
vasudeva_: what exactly do you want to do?
vasudeva_: Is there a list of subshells that you want to always start when you start emacs? Or do you want to make custom commands to start particular programs?
vasudeva_: a place to start looking, in any case, is comint-send-string. You can write a function which opens a shell, gets the buffer and buffer process, and then sends the string with the program you want to start.
vasudeva_: but check the documentation for shell, it may allow you to specify a program to start.
vasudeva_
RadioApe`: when i'm working on a certain project, i usually need 4-5 shells open with different processes -- e.g., python dummy email server, multitail, django shell, mysql prompt, etc. each one requires a certain flavor of emacs shell -- eshell vs multiterm, depending
i'd like all these shell buffers to open, pre-named, at emacs startup
RadioApe`
Well, it sounds like you just need to add some code to your .emacs to start each shell.
vasudeva_: are you very familiar with elisp?
vasudeva_: or a not so much?
vasudeva_
not very familar but i've copied and pasted my share :)
RadioApe`
vasudeva_: let me see. Suppose I want to start a shell that runs python at startup.
I could put this in my .emacs (expect a lisp-paste)
vasudeva
(not sure if you can paste to me in PM while i'm not identified)
RadioApe`
I will just paste it here.
(progn (setf python-buffer (shell "*python*")) (comint-send-string (get-buffer-process python-buffer) "python\n"))
See how that works? First I create a shell buffer called *python* and then I send a string starting python to it.
You should be able to modify this for each type of shell you want to create.
You already know the functions you are using to create the shells, since you are using M-x to do it, I would imagine.
So you will use the same ones in your .emacs.
You can use apropos to get the documentation for functions so you know exactly how to call them in emacs lisp.
And if you are using functions bound to a key, instead of an m-x command, type C-h k and then the key to find the function name that the key calls.
vasudeva
cool, that's simpler than i had imagined for some reason. i had thought there might be some sort of desktop-mode business, but i prefer your one-liner :)
RadioApe`
You may need to do a bit of digging for other types of shells.
vasudeva
sure, that's a great start -- thanks!
RadioApe`
I think eshell is pretty different than the others, for instance. Most of the shell based stuff in emacs is built on something called comint-mode, which is a set of functions for talking to sub-processes.
But I think eshell is supposed to be a pure emacs thing.
I am not sure it uses a running sub-process.
vasudeva
the main sticking point i'm hitting amongst the shells is the extent to which they let me use regular emacs keybindings
RadioApe`
Yeah, I remember that when I started.
I eventually just used shells only, rather than terms
Too much trouble to keep switching modes in term buffers.
Unless you need to launch something that needs more than a dumb terminal, I would advise against using terms too much.
vasudeva
you mean, launch you mean, launch eshell and then use it to run BASH or similar?
RadioApe`
I mean use the command "shell" rather than "term"
"shell" starts a subshell, but keeps the same emacs key bindings.
jordanb
rudybot_: quote
rudybot_
I'll indent you.
RadioApe`
"term" starts a shell in a window which is set up mimic a real terminal more closely.
I believe you can even run things like vi in a "term" buffer.
But why anyone would want to is beyond me.
vasudeva
ah
RadioApe`
I find that a regular "shell" buffer can suit my purposes. And I use them pretty extensively.
If you are using python, though, you should check the web
I am sure people have written custom shells for using python with emacs.
vasudeva
will do
thanks for the pointers
RadioApe`
vasudeva: No problem.
vasudeva: Good luck.
Ok
Bed time for me, friends.
Bye bye.
jordanb
Let's make a joke about the Dirty Sanchez.
Let's draw out our lame nerd jokes with stick figures.
We'll be able to quit our job at NASA and sell tee-shirts!
And work about three hours a week, cause that's how long it takes to think up a lame nerd joke and draw some stick figures.
technomancy
jordanb: sometimes the graphs can get pretty involved though
maybe that can be outsourced?
jordanb
Yeah how much could it possibly cost to farm out requests to return google search info from mechanical turk?
tsp
This might be a longshot, but is there an emacs mode or something else that will let me edit something like a database, with each record having a few predefined fields?
JordiGH
orgmode?
fsbot
OrgMode is, like, at http://www.emacswiki.org/cgi-bin/wiki.pl?OrgMode
tsp
How could that help? I thought it was just for organizing things
jabot
orgmode can do tables
jordanb
There's a csv-mode.
JordiGH
I think people used it for more things. Everyone seems to love org-mode. It's sort of like an Emacs-within-Emacs.
tsp
Basicly what I'm doing is creating a big list of fan fiction links. Currently I'm writing them directly in txt2tags markup, but if I want to add anything to them it'll be painful
upward
you can also define properties for entries if i remember correctly
tsp
The most difficult part about this is entering the data. I want to do whatever I can to avoid screwing it up
and avoid reentering it if things change
jordanb
Fan fiction.
So tell me.
tsp
jordanb: you've heard of it?
jordanb
Your fan faction (does/does not) involve furries.
tsp
I'm sure I could find you some furry sites
bremner_
(Action) ponders the fact that jordanb disses xkcd, then launches into a discussion of furries
wgreenhouse
tsp: orgmode is like an office suite for Emacs. it has a "spreadsheet" that takes advantage of the Emacs calculator. there's also csv-mode, and ess (Emacs Simple Spreadsheet), which can export to a tab-separated value format
JordiGH
(Action) waves at bremner_
jordanb
bremner_: Randall Munroe is a well-known furrie.
tsp
I think shifti.org has some furry stories. furry.de definitely does
upward
wgreenhouse: yes and also powerpoint you can export org to beamer
bremner_
jordanb: uh huh. And the BSD license is non-free
upward
wgreenhouse: and org to latex for documents
tsp
(Action) thought about using excel since he's on windows, but I don't think that's very expandable for a project
wgreenhouse
upward: yup. I wasn't trying to exhaustively list org's features :-)
as that would be almost as painless as doing so for, say, Gnus, or Emacs itself
tsp
though I suppose it'd work
upward
wgreenhouse: just going over the "office" basic spectrum
:D
wgreenhouse
pointless, I mean
JordiGH
bremner_: The GPL is non-free!
bremner_: You know what else isn't free? Laws that remove my freedom to punch idiots on the face.
bremner_
(Action) used to run FreeBSD, so he has actually heard that one.
JordiGH
Which one, GPL?
upward
Does excel support some kind of diffable/source controlable format ?
bremner_
JordiGH: shouldn't you be wrestling with C++ or Fortran? Yeah, the GPL is less free tirade.
JordiGH
There's this really stupid and uninformed that's just factually wrong about the GPL and why it's non-free.
bremner_: I'm on my flamewar break.
stupid and uninformed document
in the FreeBSD website
jordanb
This is like debate hour at the star trek convention.
fledermaus
Khaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaan!
jordanb
What's the technology behind the huge televisions in mission control from the 1960s?
Rear projection?
bremner_
litebrite
and gnomes
cluck
Luke, I'm your father!
bremner_
furry, freebsd using gnomes.
jordanb
bremYou're thinking of the curren tRussian mission control: http://upload.wikimedia.org/wikipedia/commons/c/ce/Russian_ISS_Flight_Control_Room.jpg
fledermaus
alien technology harvested from roswell
cluck
oops, wrong "star" quote
jordanb
Brought to you by Fortis (Swiss watches)
bremner_
I wonder if you can have a sillyness pandemic
cluck
(Action) returns his geek card .oO(and now that i'm no longer a geek i can go for the super models. yes! my plan was a success!)
jordanb
It's a trap.
cluck
bremner_: are we playing trivial pursuit? i know that one! RMS! right? right?
jordanb
http://upload.wikimedia.org/wikipedia/commons/1/1c/JFK_Tour_of_KSC_-_GPN-2000-000605.jpg <-- I love it how rivited Johnson is
fledermaus
jordanb: how's the healthcare vote going?
jordanb
It's gonna pass, but the republicans are doing everything to stall the vote.
wgreenhouse
jordanb
bremner_
is that a swearword now?
JordiGH
The US is going communist?
Is comrade Obama implementing a five-year plan?
jordanb
Yeah communist death squads are messing with medicate and taking our guns away.
wgreenhouse
lol. I meant, " jordanb: corporate sponsorship in a mission control room might be the most Russian thing I've seen in a while"
JordiGH
lol
wgreenhouse
JordiGH: it's an evil communist plot just like fluoride in the water
JordiGH
So *that's* what's in the water!! http://www.youtube.com/watch?v=_c6HsiixFS8
ologNation
When I type C-x b, I get a list of buffers in a buffer called *completions*. My question: How can I search through all of those files at once, say using isearch-forward?
wgreenhouse
ologNation: C-x o to focus on the *completions* buffer, then C-s as usual
jordanb
Heh.
wgreenhouse
or use a different buffer switcher bound to C-x b, such as iswitchb, for easier searching
jordanb
Skylab was supposed to last a long time, but the shuttle was delayed too long to be used to boost it back into a safe orbit.
Which was the original plan.
wgreenhouse
cute.
jordanb
http://www.washingtonmonthly.com/features/2001/8004.easterbrook-fulltext.html <-- One of the best early articles about the space shuttle.
Interestingly, the article listed three problems that would destroy shuttles: The main engines, the SRB, and the heat tiles.
I guess there are still a few launches left for the main engines to work their magic.
rudybot_: quote
rudybot_
I'll likn your d.
wgreenhouse
more than just listed, jordanb: this article even points out the exact problems with the tiles we became so concerned with, lack of a backup and maintainability in orbit
jordanb
Yeah it's a brilliant and prescient article.
kodein
space shuttle: 60s technology built in the 70s and should've been replaced in the 90s
wgreenhouse
kodein: nah that better describes the Soyuz, which [these days] kills fewer people
shuttle was 80s technology built in the 70s. :-P
kodein
first drafts was made around the same time as the apollo program started
it'll be an interesting day when/if we'll ever get to know about the russian kosmonaut casualties.
jordanb
Warner Von Braun's plan for space exploration was that you'd start by building a space sation at L4, and a shuttle to ferry materials there and back, and then more crafts to go to the moon, mars, etc.
kodein
I mean, the lost cosmonauts stuff is quite intriguing...
« prev 1 2 3 4 5 6 7 8 9 next »