logs archiveIRC Archive / Freenode / #emacs / 2010 / April / 28 / 1
sword
Hmm, maybe M-x customize-face RET bold RET
madpickle
yup
yonkeltron
fledermaus: know what just occurred to me? if emacs gets threads, we'll need thread-safe data structures
fu*k that
fledermaus: i was musing about implementing a work-queue but that would entail the need for a thread-safe queue, prob
madpickle
global interpreter lock would probably work
akin to python's system
yonkeltron
madpickle: eh. ewies.
derek_
hi
yonkeltron
madpickle: i don't like threads
derek_
could anyone please help me get image-dired working on windows?
madpickle
it's easier to deal with for everybody and would probably ensure that we do not need to rewrite large swathes of existing elisp, whilst providing background thread support that won't hang the main thread
         

technomancy
yonkeltron: what's wrong with persistent data structures?
yonkeltron
technomancy: are they thread-safe?
technomancy
if they're persistent, yeah
tromey
currently the threads are cooperative
but yes, locking and whatnot will be needed
technomancy
http://technomancy.us/132
yonkeltron
technomancy: ah. good, then.
(Action) consumes
madpickle
,yow
fsbot
I smell a RANCID CORN DOG!
yonkeltron
i'm considering the idea of an offline queue for data processing in emacs. with only one thread, this works fine
or at least, i think it does
if i want to add more threads, i need to know that the queue's pop method will do the right thing
or else i'll have two threads running the same job, won't i?
tromey
yes, you will need a lock, eventually
but the initial threading is all cooperative
yonkeltron
fair enough
so doesn't this decrease the usefulness of an offline queue for data processing?
tromey
in what way?
yonkeltron
if all threads are cooperative, doesn't this mean that i've still got a single-threaded application!? if i wanted to spawn true threads for number crunching or something...
quotemstr
I have a void* and a type_info that corresponds to the object pointed to by that pointer. Let's say the object's runtime type is D. D is derived from B. I'd like to cast that void* to a B*. Do you guys know a portable way to do that?
(The closest thing I can think of is invoking Itanium ABI's __dynamic_cast manually, but that's crazy.)
tromey
yonkeltron: yeah, in the initial version, it is not very useful for actual parallel processing like that
but since I/O does a context switch, it is useful for a case like gnus
pmade
quotemstr: Are you talking about C++, if so wouldn't a reinterpret_cast be what you're looking for?
tromey
I thought you could static_cast from void*
yonkeltron
tromey: surely it is useful for such things.
quotemstr
tromey: Only to the type used to generate the voiD*.
void*, even.
yonkeltron
tromey: has there been any talk of how to deal with buffers being global?
         

tromey
dynamic_cast<D*>(static_cast<B*> (voidpointer)) ?
quotemstr
There are many Ds --- D1, D2, D3, etc --- and I don't care which of them the void* points at. I only have the type_info for the D. I want a B out of that.
tromey
or I have that backward, but you see what I mean
chosig
nite y'all
tromey
oh, I see
yonkeltron: a bit. we handled buffer-local bindings, which seemed to be the biggest problem
the rest we are just ignoring
I'm sure this sounds crazy :)
yonkeltron
tromey: it does.
did you hear my idea for an actor-like interface to buffers?
tromey
we looked at some kind of buffer lock, but this makes more problems than it solves
I don't see how to reconcile an actor model with existing elisp
I'm open to the idea
yonkeltron
tromey: consider this, then
each buffer gets a queue
derek_
help with image-dired needed
it does not work in windows
yonkeltron
and code which wants to modify the buffer pushes a function onto the queue, as if the functions themselves are messages.
tromey: then, the buffer 'actor' goes just goes through the mailbox
guaranteed ordering
and on each loop, each buffer will exec one function
tromey: i don't know if there is any way to enforce this system on code running in a thread or not
tromey: i haven't given it all to much thought, really
tromey
I don't get how that works with set-buffer and other things like that
yonkeltron
tromey: what do you mean?
i'm talking about for modifying the contents of a buffer, etc.
tromey
it is really typical for elisp to change to some buffer, do something, then change back
ashawley
I'm thinking of making C-w take a prefix arg to not put the kill on the kill-ring.
tromey
all elisp runs in smoe buffer's context
ashawley
Do people have a better alternative besides M-x delete-region ?
tromey
so that is an additional problem
quotemstr
C-w ?
:-)
ashawley: delete-selection-mode ?
yonkeltron
tromey: gotcha.
tromey: ok, thanks for listening.
ashawley
quotemstr: Delsel is a good suggestion.
Unfortunately, I tried it for a month and couldn't handle it.
It's not very emacsen-like.
madpickle
(Action) forgot he'd enabled it years ago
which was especially amusing when that devel thread cropped up asking people to enable it
and i went: "hah. it's already on."
yonkeltron
,delsel
fsbot
delsel.el is, like, at http://www.emacswiki.org/cgi-bin/wiki.pl?delsel.el
qdot_
(Action) sighs, his affair with ERC over for the moment. :(
yonkeltron
tromey: so, when can we expect threads?
tromey
dunno
there are some issues to sort out. I don't have time to really hack on it
lisppaste
ashawley pasted "kill-or-delete-region" at http://paste.lisp.org/display/98465
madpickle
do you find the need to delete stuff that frquently?
ashawley
Why doesn't the prefix arg above work?
madpickle: not as often as i yank.
madpickle
my use case is more or less: use M-y where possibly; if I must preserve order of the kill ring contents then I will use registers to store whatever it is i'm keeping in the kill ring
possible*
ashawley
(Action) nods
i also should be using search and replace in these scenarios as well.
lisppaste
ashawley annotated #98465 "kill-or-delete-region" at http://paste.lisp.org/display/98465#1
ashawley
I guess an interactive form can't handle both a region and a prefix arg...
had to use current-prefix-arg
quotemstr
Hrm.
Even using non-portable tricks, it doesn't seem to work.
http://codepad.org/CBJqu0ZA
magcius
huh
when I run code through edebug, it fails :P
brilliant
oh
if it's working, I do C-u C-M-x and then directly after C-M-x without even letting it step through and it break
s
oh waiyt
nevermind, I'm wrong
it ONLY breaks when I'm stepping through the code
jlf
it's probably your midichlorians
bremner
use your rage.
magcius
so how am I supposed to debug this?
tazle
when I open a file that is written in UTF-8 and Emacs for some reason doesn't recognize it as such and interprets it as ISO-8859-1 instead, how do I tell emacs to reinterpret the buffer it as UTF-8?
e1f
c-x ret f utf-8
tazle
that only sets the encoding used for writing out the buffer
e1f
oh
tazle
if I write out an UTF-8 buffer read in as latin-1, it will be double-encoded upon writing
e1f
then it'x c-x ret something
jlf
check out C-x RET C-h
e1f
apropos buffern-encoding
buffer
jlf
C-x RET r looks promising
tazle
ah, C-x RET r seems good
thanks
jlf
np
technomancy
how do you get the magit log buffer to stay on the branch you opened it on rather than switching to the current branch after you cherry-pick from it?
rryouumaa
(Action) strange that color-theme isn't in elpa
i have a buffer i can't reach using ido or ibuffer. it is archive-contents in elpa.
i only know of its existence because i am asked whether to save it
technomancy
rryouumaa: buffers with names beginning with spaces are hidden by default
try C-x b C-q SPC TAB
rryouumaa
that was the first thing i tried. didn't work :(
maybe the buffer name is different from the file name
technomancy
creepy
moljac024
whats the name of the command to make all frames the same size?
jlf
if you mean windows, ,,df balance-windows
fsbot
balance-windows is an interactive compiled Lisp function in
`window.el'.
It is bound to C-x +.
(balance-windows &optional WINDOW-OR-FRAME)
Make windows the same heights or widths in window split subtrees.
When called non-interactively WINDOW-OR-FRAME may be either a ..[Type ,more]
moljac024
yes, meant windows
that's why i couldn't find anything with M-x apropos
i typed frame instead of window
thanks
quotemstr
Aha!
It turns out you can just use type_info::__do_upcast.
Which, of course, is nearly undocumented.
But it seems to work robustly.
legumbre
nearly is good enough
,yow
fsbot
Look!! Karl Malden!
quotemstr
legumbre: " // Internally used during catch matching" is perfectly adequate documentation.
... right?
:-)
legumbre
quotemstr: if it says "internally" then it's meant to be abused :)
quotemstr
Damn straight.
konr
How can I insert colored text in a buffer?
quotemstr
,df propertize
fsbot
propertize is a built-in function in `C source code'.
(propertize STRING &rest PROPERTIES)
Return a copy of STRING with text properties added.
First argument is the string to copy.
Remaining arguments form a sequence of PROPERTY VALUE pairs for text
properties to add to the result.
konr
<3
vlar
good evening , i'm trying to install mac os X on an old emac G4 using the target mode and a .dmg file , the target mode is between G4 and ibook G3, is this going to work?
legumbre
nope
vlar
why that?
quotemstr
vlar: You might be looking for #apple
jlf
(Action) thinks someone misunderstood the channel name
legumbre
vlar: jk, I have no idea what you're talking about
jlf
,emacs
fsbot
Emacs is, like, [0] an extensible, customizable, self-documenting real-time display editor <http://www.gnu.org/software/emacs/>
[1] not a number of eMacs <http://www.apple.com/emac/>, ..[Type ,more]
vlar
ok then i'm trying anyway (install leopard without a dvd using a dmg file ---> expecting to do that in target mode with an older computer)
rryouumaa
vlar: ask fsbot??
fsbot
Highly likely.
vlar
fsbot
fsbot
[->] erbot is [0] an ERC (i.e. Emacs) based IRC infobot <http://emacswiki.org/wiki/ErBot>, <http://sv.nongnu.org/projects/erbot>
[1] the program of which fsbot is an instance (see <fsbot> and <help>),
[2] your plastic pal who's fun to be with!,
[3] secretary of state of the emacs embassy
jlf
let's hire a spokesmodel and cut off vim's air supply
cantona
indeed
quotemstr
(Action) has a cruel joke he's not making.
rryouumaa
you can try ##mac
jlf
quotemstr: does it involve autoerotic asphyxiation?
vlar
tx a lot guys !!! emac are still crazy ;)
legumbre
\o/
quotemstr
jlf: Make vim the model and just have it starve itself to death.
jlf
nice
ggole
vim doesn't really seem like the anorexic type. vi, maybe...
legumbre
some model in this channel might have been offended by that cruel joke
jlf
legumbre: that reminds me: have you perfected `Magnum' yet?
« prev 1 2 3 4 5 6 7 8 9 10 11 12 next »