logs archiveIRC Archive / Freenode / #emacs / 2010 / June / 3 / 1
jlf
then things like hail.mary.txt would match
yates
why does it take \\. to represent a .?
wait - i know
\. is what we "want" (to escape the normal regexp interp of ".")
but somehow we need an extr "\" - why?
ldleworker
For pymacs the code to add to the dotfile doesn't compile correctly: http://pymacs.progiciels-bpi.ca/pymacs.html#id12
It says EOF while scanning file
jlf
\ has special meaning in emacs strings, so the extra \ is to make the other \ survive string evaluation
ldleworker
To clairfy it does that when I uncomment the last two lines
yates
jlf: ok, thanks
ldleworker
To specify my specific pymacs folder
vivien`
damd: M-x query-replace-regexp. And put the expression ".*\?.*\?.*" (without the quote), press C-q C-j to insert new line. Then press RET twice.
damd
vivien`: it was the regexp i had troubles with, thanks
(but i did ask about quotation marks :))
         

jlf
ldleworker: they're missing the opening "
ldleworker
jlf, the path?
thanks
jlf
s/YOUR-PYMACS-DIRECTORY"/"YOUR-PYMACS-DIRECTORY"/
ldleworker
woah, no need to yell
;)
damd
how do i set the nth entry in a list to a certain value?
vivien`
damd: what list?
damd: in elisp?
damd
yes, in elisp
jlf
(setf (nth n some-list) new-val)
damd
thanks
jlf
np
ggole
If you need to set the nth thing, you should probably use a vector.
damd
i see
jlf
at least for all your performance-critical elisp
damd
this is not performance critical, but i'll go for it
i don't really have any reason not to use vectors
vivien`
How can one apply "repeat" (C-x z) 143 times?
damd
vivien`: probably with a kmacro
jlf
M-: (dotimes (i 143) (repeat)
)
aidalgol
What's a good response to "Lisp is unintuitive, therefore Lisp is more prone to bugs?"
technomancy
aidalgol: "the only intuitive interface is the nipple"
aidalgol
(Aside from a crowbar.)
         

technomancy
that's not even true
tromey
yeah, babies have to learn
yates
does thsi look right? (push (cons "\\.tcf$" 'javascript-mode) auto-mode-alist)
damd
aidalgol: how is lisp unintuitive?
aidalgol: is the for-loop intuitive?
aidalgol
damd: Because it's unintuitive.
damd
aidalgol: are accessors on instance variables intuitive?
technomancy
aidalgol: if you have referential transparency in your lisp that's pretty easy to refute
ggole
yates: add-to-list is usually preferable to push, because it's idempotent.
technomancy
otherwise s/unintuitive/unfamiliar/ and it could be a valid criticism
ggole
But yes, that looks right.
aidalgol
Seriously, I was arguing with someone who said that Lisp is more prone to bugs because it's unintuitive.
yates
well, i'm getting this message when i load a .tcf fiel: File mode specification error: (void-function javascript-mode)
ggole
Do you have a javascript-mode?
aidalgol
But he failed to define "intuitive".
JordiGH
Gah.
jlf
,intuitive
fsbot
hmm, intuitive is the only truly intuitive interface is the nipple
JordiGH
How do I tell the compilation buffer where to look for a file?
damd
aidalgol: it's easy to bash languages when you don't understand them
JordiGH
It's asking me every time I compile.
yates
ggole: no
ggole
yates: that would appear to be the problem.
yates
is that an extra emacs package under fedora?
ggole: ya' think?
:)
ggole
Not sure, but recent emacsen have js2-mode included
aidalgol
damd: Yeah, I gave up on trying to convince him of even the power of mapcar.
cvandusen
What programming language (other than Intuitive) is intuitive?
damd
aidalgol: was his name by any chance guido?
aidalgol
cvandusen: C apparently.
damd: Um, no. Why do you ask?
technomancy
damd: hah; nice!
damd
aidalgol: guido van rossum hates FP style programming :P
at least so i *hear*
jlf
to most people, intuitive means what they're used to
aidalgol
C, because it's procedural as a computer's hardware is, therefore it is the best language.
damd
aidalgol: people aren't procedural though
aidalgol
And OOP just gets in the way.
cvandusen
jlf: exactly, and intuition is more in the eye of the beholder than that being beheld
tromey
computer hardware is actually crazily complicated
yates
thix
thx
arrgg!!!
shabble
tromey: you can't fool me, I know it's all done with magical pixies.
ggole
C does an acceptable job of exposing low level functionality, but calling it intuitive is pretty hilarious
yates
Thank you, ggole et alius
aidalgol
You should always be able to translate any problem into a set of instructions for the machine, otherwise you are a bad programmer.
tromey
yeah, C has a lot of weirdness
yates
i c
tromey
anyway, I disagree with the initial assertion about lisp being more bug prone
jlf
aidalgol: s/programmer/compiler/
tromey
I assume he just made that up
JordiGH
Ah, compilation-directory needs to be updated.
aidalgol
ggole: Mhm. I literally laughed out loud when he said that.
I think this person was using what one might call "screwball logic".
vivien`
Is anyone using "kill-do-not-save-duplicates" (non nil value)? It does not seem to work here.
ggole
aidalgol: go and find some of C's darker corners (there are quite a few) and ask him if that behaviour is "intuitive".
aidalgol
ggole: Well, I thought of that, but decided it would not even shake his delusions when he responded to my explanation of how you can interact with and alter a running Lisp system by saying that you can do that in C with a debugger and manually altering the program's memory.
vivien`
I answered my question: "kill-do-not-save-duplicates" is only took into account in Emacs 23.2, while I have only 23.1...
ggole
aidalgol: but that's totally the same thing as a repl!
jlf
aidalgol: my aha moment was when i was evolving a CL client-server application without disturbing existing connections
technomancy
aidalgol: if he's responding like that it's not very likely he's looking for a debate; he sounds like he just wants to be right.
cvandusen
Don't we all?
jlf
cvandusen: good point
technomancy
I don't think there is a more appropriate response than laughing in his face.
aidalgol
technomancy: I agree. I think I only lasted that long because it was mildly entertaining.
cvandusen
(Action) is overly cynical in thinking that even when we admit to being wrong, we think that we are right by doing so
tromey
it is weird, because you don't have to resort to such bogus arguments to be conscious of actually existing flaws in lisp
aidalgol
technomancy: If only I could get close enough to someone's face over IRC.
How easy would it be (in general) to port Common Lisp code to Emacs Lisp?
ggole
Depends on the code.
technomancy
aidalgol: not too bad if it's portable CL, but in practice the spec doesn't define enough functionality to make portable CL actually useful.
so implementation-specific stuff always sneaks in
aidalgol
That's certainly one weakness that de facto standard languages (such as Ruby) don't have.
ggole
It's not just the implementation-specific stuff, emacs lacks an awful lot of basic CL functionality
Packages, extensible vectors, etc
Various kinds of declarations
aidalgol
Oh, right, and then the dialect differences. :P
ggole
And it's scoped differently
aidalgol
Ah, yes, I still don't quite fully understand the different kinds of scoping in Lisp.
tromey
yeah, for better or worse I think we have to consider elisp as its own dialect and evolve it along different lines
technomancy
aidalgol: elisp has two kinds of scoping: broken and ugly.
aidalgol
technomancy: A language that lives in a text editor is bound to have some unique weirdness.
technomancy
aidalgol: true; elisp could have turned out a lot worse
ggole
There's no good technical reason for elisp to require dynamic scoping by default.
Chris2048
lo ppl
tromey
I think the reason is that a ton of code assumes it
Chris2048
I'm running anything-gentoo, and the list of installed packages is incomplete, any ideas?
jabot
ggole: i heard once that it makes simple configuration of code easier
aidalgol
I'm not even sure if Emacs is written in C and Elisp, or if Elisp is written to run inside of Emacs.
tromey
maybe in retrospect that is not the best deccision
but it is too late for that
emacs is not readily differentiated from the elisp implementation
for example, buffer-local variables are a characteristic of the language but also of the fact that elisp is running inside an editor
ggole
jabot: languages like CL and scheme provide dynamically scoped variables, just not by default.
jabot
scheme doesn't
ggole
Although CL's behaviour in that regard is a bit flaky.
Scheme calls them fluids.
jabot
... naaah
ggole
Same thing.
jabot
i read the R5RS several times
no such thing
aidalgol
Then maybe it's just some dialects that provide fluids?
jabot
then again, there may be implementations that provide extensions
hm
maybe they added fluids to R6RS
damd
what is rNrs anyways?
ggole
Eh, Scheme is so balkanised that I find it impossible to care which version has which feature.
damd
a "lisp standard"?
tromey
yeah
jlf
,r5rs
fsbot
R5RS is, like, [0] the Scheme spec.
[1] shorter than the index to the CL spec.,
[2] at <http://www.schemers.org/Documents/Standards/R5RS/>
jabot
http://community.schemewiki.org/?RnRS
ggole: not if you stick to the base language
sepult
is it called the comon-corte ?
common-core
jabot
i don't know
aidalgol
I suck at programming challenges that require you to use a particular language. I'm always thinking "how would this be done differently in different languages?"
ggole
jabot: the base language is too small for real world programming.
jabot
r5rs doesn't mention that
um
ggole: there is slib
which is implemented in portable scheme
and provides usefull stuff
so...
depends on what you mean with "real world programming"
it wont replace perl
too readable ;)
ggole
Hah
aidalgol
It seems to me that the Scheme spec is, in practice, more of a basis for implementations so that they have enough common ground to be called Scheme.
jlf
that's the perl version of "too many parentheses"
aidalgol
...rather than a strict standard.
damd
parentheses are awful though
technomancy
damd: I know! they're so ... round.
cvandusen
not nearly so baroque as curly braces
ggole
damd: I know the perfect language for you: Forth.
Almost no parens.
aidalgol
I find crazy keywords and delimiters of languages such as Java and C++ much worse than a pile of parenthesis.
jabot
aidalgol: i don't think so
aidalgol
jabot: Each to his own.
jabot
iirc the scheme standard provides as much as C
(standard C)
ggole
C++'s syntax doesn't suck because of its choice of delimiters.
It sucks for a whole bunch of other reasons.
jabot
i'm not talking about POSIX here, though
aidalgol
ggole: I wasn't saying it does. Just that I prefer parenthesis.
ggole
Fair enough.
damd
is there really any point talking about POSIX anymore? not a single major OS is fully compliant.
aidalgol
jabot: So then why so many minor deviations amongst implementations?
...compared to C, that is.
jabot
aidalgol: so why are there so many minor deviations between implementations?
... in C?
ggole
Because the C standard explicitly allows for that.
jabot
have you looked into a configure - script?
aidalgol
jabot: Are there? I thought all the widely used C compilers were almost the same?
jabot
ummm
yeah
« prev 1 2 3 4 5 6 7 8 9 10 11 12 next »