logs archiveIRC Archive / Freenode / #emacs / 2010 / May / 19 / 1
bpalmer
prompt state?
madpickle-
well
technomancy
eh; it's not really that stateful
madpickle-
imagine python's repl. if emacs had to get completion state and other internal information transferred to it using stdin/in you have to ghetto it by erasing that from the comint buffer, etc.
i'm just sayin' - that's painful, and SLIME's way of solving it is far more elegant.
bpalmer
madpickle-: oh, just use another buffer as the real comint buffer.
technomancy
gotcha.
madpickle-
i think my import trick would work well though
technomancy
ruby's repl at least was built with comint support in mind
madpickle-
technomancy: nice
i've tried to like pymacs etc. - but it's so buggy.
         

technomancy
perks of having a language invented by an Emacs user =)
madpickle-
technomancy: so how does ruby improve interaction then?
technomancy
madpickle-: I think it's mostly just dumbing it down actually; disabling readline, etc.
madpickle-
yeah.
hm... i might just explore the import trick furhter
if it means i don't have to use that piece of crap pymacs then all the better.
bpalmer
you have to actively enable readline in python's repl
(Action) just uses python in a shell for a repl, coupled with occasional execute-and-exit scripts.
madpickle-
i've gotten flymake to work well with pylint
that pretty much just works perfectly
technomancy
bpalmer: no send-region-to-python stuff?
madpickle-
and getting emacs to highlight your screwups is very nice.
bpalmer
rarely. I find it more convenient to just kill and yank.
technomancy
(Action) would get annoyed without slime's compile-file
bpalmer
and to the extent that I feel like I should change my workflow, it's in the direction of putting more stuff into test files that get executed rather than poking in the repl
madpickle-
i rigged my own send buffer to python based on the existing code; it sends the point to eob THEN sends the buffer
technomancy
bpalmer: that's the same cultural leaning that I see in Ruby
madpickle-
then it posts a message in the minibuffer (So i know my keypress worked - there's no indicator otherwise)
technomancy
but you lose out on a lot of awesome stuff that way
madpickle-
bpalmer: absolutely. TDD.
bpalmer: and you avoid the issue of stale objects lingering in the REPL.
bpalmer
madpickle-: I don't start with tests :)
technomancy
madpickle-: aka "getting slimed"
madpickle-
bpalmer: ok, fine, but you use that to drive your development in some way.
bpalmer
but yes, exactly. Stale state is a pain.
madpickle-: well, that's my goal :)
         

madpickle-
and don't get me started on python's rubbish package management.
technomancy
it happens, but the benefits are definitely worth it
bpalmer
We're really pushing to get our codebase at work better tested.
madpickle-
technomancy: absolutely. if not for the REPL i'd never waste my time on python.
bpalmer
So we've currently broken a substantial part of our unit tests in an effort to fix our fixtuers.
*fixtures
madpickle-
so i'm tring to expand my global abbrevs list with more words suitable for auto correction
someone made a nice long list on the wiki with the autocorrect list extracted from open office
ashawley
,abbrevmodeopenoffice
fsbot
From memory, AbbrevModeOpenOffice is at http://www.emacswiki.org/cgi-bin/wiki.pl?AbbrevModeOpenOffice
ashawley
madpickle-: Does it need to be updated?
seems short.
e1f
icelandic volcano accompanied by sigur ros http://vimeo.com/11673745
madpickle-
i was going through wikipedia actually, ashawley, looking for more lists of stuff to snarf.
http://en.wiktionary.org/wiki/Appendix:English_words_with_diacritics
http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings
ashawley
madpickle-: smart.
madpickle-
i figure they'd only print lists where the mistakes are unlikely to be ambiguous
bpalmer
madpickle-: I would think a customized list might serve you better for auto-complete.
madpickle-
bpalmer: auto-compelte?
this is just for plain old abbrev to fix my screwups on-the-fly.
ashawley
(Action) needs a command that will convert correct spellings to their typos.
bpalmer
auto-correction, rather.
quotemstr
Will company-mode do typeahead autocompletion?
madpickle-
quotemstr: yes, partially
quotemstr: if there's a list and you've typed until there's only one item left, it will "type ahead"
technomancy
is company-mode a play on a bad suggestion for "completion-mode"?
quotemstr
Ah, nifty.
madpickle-
i like company for elisp
it's very, very good for that.
quotemstr
technomancy: It's a bad joke about intellisense, I think.
technomancy
ah
madpickle-
(autocomplete sucks elisp for some reason)
quotemstr
madpickle-: Emacs is at its best when you're editing elisp.
madpickle-
quotemstr: yep
quotemstr: most definitely - and company is a welcome sight for that
quotemstr
(Action) needs to try it out.
madpickle-
there's a "hidden" key for company-mode in elisp: C-w, i think, will go to the completions' source file :)
cvandusen
There seems to be a problem with both auto-complete and company in regard to undo.
madpickle-
cvandusen: it can be a bit wonky sometimes if you undo while it's completing
cvandusen
I was trying madpickle-'s C-w hint and had typed some characters. Hitting C-w asked which TAGS file I wanted to visit.
madpickle-
is there a function in emacs that will replace characters with diacritics with their diacritic-free equivalent?
cvandusen
madpickle-: yeah, that was my next statement. :)
madpickle-
cvandusen: oopsie. check the mode map to be sure.
cvandusen
Once it has presented the completions, you can't undo.
madpickle-
better to disable than let it roam free and blow up.
cvandusen
auto-complete had a similar issue. It would only allow undos back to a certain point.
madpickle-
cvandusen: by the way, if you are using an older version of ac and find that it lags on input, try getting the trunk version -- it's far, far better.
cvandusen
I'm surprised I didn't see warnings about it on the various blogs, wikis, etc., but I had issues with the stock company setup (e.g., dependencies on pymacs, pysmell, rope*, semantic).
madpickle-
cvandusen: yeah.. on one hand it's easier for newbies as it cuts down on configuration management; on the other hand...
cvandusen
Everything I read was "add to load path, require/load/whatever, good to go".
madpickle-
yeah.. he should probably replace the implicit loading with one command for newbies called company-set-it-all-up.
cvandusen
madpickle-: Initially, I think I was using some zipped up version, and got fed up & switched to company. I would have to say though, that out of the box, auto-complete was a more pleasant experience.
Well, not just newbies. If there are dependencies, they should be stated up front.
madpickle-
cvandusen: yeah. but -- and i haven't looked closely as i switched to AC a few days ago -- but company has WAY better elisp support.
cvandusen
I wouldn't have any issue with that, but to say plug & play then not be able to do that...
technomancy
is there a way to get ERC's modeline tracking to not show "the blue stuff"? (ops/deops, topic changes, etc.)
cvandusen
madpickle-: could be, I haven't tried all of the backends.
bpalmer
technomancy: erc-track-exclude-type
technomancy
bpalmer: thanks
bpalmer
s/$/s/
technomancy
what would you add to the list for ops changes?
bpalmer
"MODE", I think.
since it's technically a mode change on the channel.
technomancy
thanks
ashawley
madpickle-: I think there should be a way to "decompose" Unicode characters.
M-x decompose-region doesn't work here.
madpickle-
damnit
you tell me after i manually fixed it :P
ashawley
madpickle-: query-replace?
madpickle-
yea
extracting the diacritical chars then replacing with their ascii selves.
bpalmer
Let's traverse the internet depth-first.
JordiGH
Nice, started a cute flamewar in LinkedIn.
madpickle-
hahaha
JordiGH
"Mathematical software should show source!" says I.
Intensity
Hi. I'm interested in trimming down the number of dynamic libraries linked into Emacs (and replacing them with static ones instead), but I come across pretty confusing results.
JordiGH
"I agree with JordiGH" says someone.
madpickle-
Götterdämmerung
fräulein
fledermaus
götterspammerung
JordiGH
"Should we demands that Google release all of its algorithms? Should we not trust the Nike brand because they don't release the source of their shoes?" says third.
qDot_
I was working with a diacritical remover in python earlier this year, they named the algorithm "the stupid american" :D
madpickle-
qDot_: i could've farmed out to python, i s'pose.
ashawley
My PHP version is here: http://aaronhawley.livejournal.com/24262.html
qDot_
I had issues with it, even then. Thus, my fantasy baseball team consists completely of players without diacriticals in their names.
And I'm first in my league.
Which I think says something.
madpickle-
python has weird unicode support
ashawley
weird == native
madpickle-
it is a veritable smörgåsbord of conflicting methods and modules
quotemstr
Python 3 is better.
madpickle-
this diacritic thing is great
jordanb
Yeah just a little better
Also it's missing a whole bunch of stuff that is really important.
madpickle-
and they moved reduce to itertools
jordanb
At least python 3 got rid of all the unichr/chr sh*te, and the u"foo" buisness.
Reduce is depricated.
It also returns an interator in python3.
Or, 'reduce result object'
Or something
not a list.
madpickle-
"deprecated" - it was removed entirely along with map/filter until people rebelled
jordanb
Yeah.
madpickle-
i still don't get why they didn't add the range operator Haskell has
jordanb
So it moved back to 'existent, but depricated'
madpickle-
all this x/range bullsh*t
quotemstr
Aren't map and filter still around in another module?
jordanb
Yes, in itertools.
The reason why they're depricated though is that the pythonic way to do that stuff is to use a list comprehension.
quotemstr
Range operator?
madpickle-
quotemstr: [1..3] vs range(1,4)
quotemstr
Ah.
jordanb
Heh, Ada has that.
madpickle-
so if you wanted even numbers: [2,4,..10]
jordanb
Oh
Not that.
tromey
wacky
jordanb
I'd do [x for x in range(2, 10) if x % 2 == 0]
madpickle-
jordanb: or range(2,10,2)
jordanb
Or that...
quotemstr
Guido would say, "doesn't that look almost like range() anyway? Why make the language more complicated?"
fledermaus
ugh, when di dthis channel become eyebleedscript central?
madpickle-
call me old-fashioned, but i like map/filter - in come cases they enhance readability
fledermaus
(Action) bails for the night
jordanb
The definition of mine is "stuff between 2 and 10 that is even", though, while the definition of yours is "2 to 10 skipping one"
madpickle-
jordanb: that's mostly because range secretly subtracts 1 to make it 0-indexed.
another ppet peeve of mine.
anywho
gonna hit the sack too.
jordanb
madpickle-: I don't think they really are an improvment over list comprehensions.
madpickle-
g'night
quotemstr
Can you think of a Lisp syntax for lisp comprehensions that's better than LOOP or ITERATE?
technomancy
wow, removing reduce? as if 1-line lambdas weren't already enough of a reason to avoid python. =\
(Action) has an unhealthy attachment to reduce
tromey
a big incompatible language change seems like a bad idea at this late date
I've been avoiding dealing with python 3
technomancy
the "TCO is hard; let's not bother" blog post was worth several good chuckles too.
it's novel how they're attempting to corner the market on people who have been programming for less than a day.
tromey
url?
quotemstr
technomancy: I'm with him on the TCO thing. I don't think it's a big deal.
TCO is nice as an optimization, but programs shouldn't rely on it for correct operation.
technomancy
quotemstr: I could grant him it not being a big deal, but the reasons he listed were absurd.
jordanb
The argument behind TCO wasn't that it was hard.
tromey
oh, TCO == tail call
technomancy
tromey: http://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.html
tromey
hah
jordanb
It was that TCO is language feature, not an implementation feature.
If you have TCO it needs to be defined as part of the language and supported by all implementations.
Because it changes the way programs are written.
rryouumaa
does stallman have an opinion on whether he is an aspie?
jordanb
quotemstr: Guido's argument is that TCO isn't a simple optimization, you cant take advantage of it without relying on it.
quotemstr: If you rely on it then it's a language feature, not an implementation detail.
quotemstr
rryouumaa: I think all geeks are to some extent.
tromey
the more I learn python, the more I like lisp
bpalmer
the more I learn python, the more I like it :)
quotemstr
tromey: How so?
jordanb
You can tell python is a sh*tty language because people write software in it.
bpalmer
it's not perfect, but it's got a direction and it's fairly sensible.
tromey
shrug, I use it, I just am not a big fan
quotemstr
tromey: Then why choose Python for GDB instead of, say, Guile?
jordanb
Heh, guile.
tromey
the particular choice was made before I was on the scene
« prev 1 2 3 4 5 6 7 8 9 10 next »