News for hackers. Stuff that matters.

djcb

Re:Guide to email in Emacs using mu and mu4e on Friday October 05, 2018 @03:09PM (#18150880)
mu/mu4e author here... please let me know if you have any specific questions.
Re:GNU Guile 2.2.0 on Thursday March 16, 2017 @01:13PM (#13886791)
One big item is that that Emacs' internal string/buffer representation supports things like loading weirdly (or even erroneously) encoded data, and saving this unchanged; this is sometimes quite useful.

Guile's strings (gnulib's) do not support that, and adding the support is quite a bit of works for all the corner-cases that emacs supports.

Now, emacs and guile do not necessarily have to use the same underlying string/buffer implementation, but it would definitely be a big plus, and I wouldn't be surprised the emacs maintainers would require it.

Re:Mutt 1.7.0 released on Saturday August 20, 2016 @12:35PM (#12327245)
(mu4e author here)

Mu4e has a few different options for displaying rich-text messages. In recent emacsen, it defaults to a shr/eww based display; it's not perfect, but it reduces the set of problem cases.

For those, there are the view-in-browser action, and with (as of yet unreleased) emacs-25 you can use a webkit-based display embedded in emacs.

With those, I'm able to view just about any message; even the ones I get from airlines etc., which tend to be html-only.

Anyway - to get back to the top-level subject: congratulations to mutt, which is a great e-mail client, and a big influence on mu/mu4e.

Re:Functional programming in C (2013) on Tuesday July 19, 2016 @11:56AM (#12122461)
In the same spirit, I wrote some functionally-flavored extensions for GLib a few months back. https://github.com/djcb/gxlib, taking a bit of inspiration from Rust and SRFI-1.

It's fun to get some of the functional flavor, while still being very near the bare pointers.

Re:Yann LeCun's comment on AlphaGo and true AI on Monday March 14, 2016 @01:19AM (#11281211)
While they weren't card-carrying ornithologists, the Wright brothers studied bird flight extensively and explicitly used it for their designs.

But they concluded that the flapping motion wasn't essential for propulsion, and could more easily be achieved by a propeller.

Re:GNU Guile 2.1.1 released on Wednesday November 04, 2015 @04:26PM (#10509896)
There are also gdb and make, which are probably a bit more prominent examples of guile-integration. Perhaps one day, emacs will do so as well.

I've embedded Guile into some of my own projects, and it's a great and fun way to bring a bit of life in "dead" compiled code. Many more projects would benefit from this.

Re:New Emacs maintainer on Wednesday November 04, 2015 @03:56PM (#10509678)
And, for completeness, Chong Yidong, how co-maintained together with Stefan for quite a while (and did a great job as well). I think both of them were quite a big part of the "emacs renaissance" of the last few years.

http://emacs-fu.blogspot.fi/2009/08/interview-with-chong-yid...

Re:DBus, FreeDesktop, and lots of madness on Sunday November 23, 2014 @09:27AM (#8648860)
Agreed -- I remember some of the alternative ways to solve the same problems, such as CORBA and various custom protocols, but they were painful to use...

Now, early DBus was a bit lacking in that respect as well, but with GDBus (GLib's DBus implementation) it's become as straightforward as IPC can be, even in plain C; I've seen quite a few people new to the technology that were able to get up to speed with it quickly.

It'll be interesting to see how people are taking DBus and pushing the boundaries of what it can be used for, such as kdbus.

Thank you hp!

Re:The Most Influential Microprocessors of All Time on Wednesday January 08, 2014 @04:54PM (#7027009)
Had a lot of (slightly masochistic) fun programming the Z80 back in the day on my MSX2 machine.

I didn't have an assembler, so I wrote my code by taking the opcodes from a table, calculating offsets etc., then turning them into DATA-lines in an MSX-Basic program, which POKEd the code into RAM, then CALL into the starting address.

Re:How I Read Programming Books on Tuesday January 08, 2013 @04:46PM (#5028707)
It's the difference between understanding and copy-pasting.
Re:21st Century C (new book) on Sunday November 18, 2012 @09:45AM (#4800641)
Could you elaborate on the 'horrible design'? In general, I've found GLib very useful (say, the data structures, mainloops, GError, the G_GNUC_ stuff, ...) . If the biggest problem is some typedef that you can happily ignore, it can't be that bad, or?

GObject is a bit different matter - there's quite a bit of boilerplate, which makes me think twice before adding one. But at the same time, it's quite nice to use them in libraries like GStreamer.

GLib is certainly not perfect, but I found it more pleasant to use than, say, talloc. Are there any specific advantage is APR? (I've never used it) Does it cover the same functionality?

Re:The Homely Mutt on Monday October 01, 2012 @12:16PM (#4597799)
There can be only one database (index) per mu4e/emacs instance, but you can store multiple maildirs in one database though, and there's support for multiple accounts (esp. in the upcoming 0.99; there are some recent ML-threads about this).
Re:The Homely Mutt on Monday October 01, 2012 @11:27AM (#4597508)
I wrote an emacs-based e-mail client "mu4e"; see e.g. http://emacs-fu.blogspot.fi/2012/08/introducing-mu4e-for-ema...

Its user-interface is a bit mutt-influenced, but it's fully query-based and very fast, and of course you can extend it using elisp. A fairly young project, but it's near-fully documented, and the manual has instructions on how to set things up with Gmail.

Re:Use Zsh on Friday September 28, 2012 @06:34PM (#4588127)
I've been using zsh for a decade or so, and I like it quite a lot. For basic things, it works enough like bash to hardly notice it; but slowly I've learned all the special tricks.

Now, I would recommend against using /oh-my-zsh/ and the like wholesale; just add useful things to your zsh setup step-by-step, where you actually understand each step.

Otherwise you're just importing a blob of magic that can interact with other things in weird ways. /oh-my-zsh/ contains a lot of gems, but take them one by one.

Re:Linux Commands for Developers on Wednesday August 29, 2012 @09:25AM (#4448374)
Hmmm, is this HN worthy? These commands are so basic that I don't expect any HN-reader using Unix systems not to know those.

What about some slightly less basic ones that I'd think would be useful for many people.

  # less with syntax highlighting
  alias less="/usr/share/vim/vimcurrent/macros/less.sh"
  
  tailf # tail -f, but better & shorter

  mtr # check your connection (ie., traceroute with more info)

  htop # nice a colorful process listing (better than top)

  locate # search files by name -- that late-night disk thrashing is useful after all!
Re:Learning C with gdb on Monday August 27, 2012 @03:15PM (#4440313)
for the somewhat-graphically-inclined, gdb mode in emacs has the much under-advertized 'M-x gdb-many-windows' which shows your stack, local variables, breakpoints etc. in separate 'windows'.
Re:Your public IP address, via Google Search on Thursday July 26, 2012 @11:32AM (#4296484)

  alias myip="dig +short myip.opendns.com @resolver1.opendns.com"

  alias myip2="curl -s icanhazip.com"
Re:VimOrganizer : An Emacs' Org-mode clone for Vim on Monday June 18, 2012 @09:46AM (#4126357)
Eh? I have been using org-mode for years for calendaring, smart todo-lists and what not -- with all the things like deadlines, schedules, repeated items, tags, priorities etc. etc.
Re:Emacsy, an embeddable Emacs on Wednesday May 16, 2012 @02:45PM (#3983404)
Guile is nice embeddable scheme, and seems to have a lot of momentum, cool new developments. If this project is about making it a bit easier to integrate it in your app, that would be great. It's not /too/ hard to embed guile, but I certainly think there's room for making it easier.
Teaching students about being careful about sources -- online or not -- is good of course. But he should just have shared a paper about or something like that.

I agree with Wales; deliberately putting untruths on Wikipedia is really anti-social behavior. Wikipedia, however imperfect, is a really great asset -- people using it for their own little experiments like this is really doing everyone a great disservice, and I can only imagine how many others he has inspired to do similar things.

There's the 'pmccabe' tool, which can check for # of lines of functions and their cyclomatic complexity.

Then,

  pmccabe `find . -name '*.c'` | sort -nr | awk '($1 > 10)'
gives me all functions that have a cyclomatic complexity over 10; I often add it as a target in a Makefile, so I can easily check this. Similar, for functions of a certain length.
Re:Books for people in the software business on Sunday January 22, 2012 @12:47PM (#3497115)
"Outliers"? Malcolm Gladwell is an entertaining writer, but I really wouldn't take it too serious... extrapolating way too much, and then reaching faux-unexpected conclusions that resonate nicely with what people like to believe.
There are some systems based on the Xapian full-text indexer, including my own 'mu'[1] which might be able to do this. It expects the messages in a Maildir, and it can handle > 150 messages per sec, on fairly slow hardware - so after a peak of thousands of new messages, it would take a few seconds to catch up. Tens-of-thousands per day would be no problem. There have been people using [1] for a few million of messages without any problem, but I'm not sure how well it scales beyond that.

[1] http://www.djcbsoftware.nl/code/mu, or 'maildir-utils' in debian/ubuntu

Re:Strangest Language Features on Thursday December 15, 2011 @02:57PM (#3357641)
similarly, the 'approaches' pseudo-operator:

while (i --> 0) { /* do something */ }

Re:MUSE: Relive and analyze your entire email archive on Monday October 17, 2011 @06:12PM (#3122709)
I wrote 'mu' (http://www.djcbsoftware.nl/code/mu), which let's you index/search maildirs; I'm currently adding glue to use it as an emacs-based e-mail client as well (basically, something between wanderlust and notmuch).

Anyway, to get back on-topic, as an alternative way to analyse your mails, I've added guile (scheme) bindings, and it's pretty easy to get all kinds of interesting statistics from your mails -- see https://gitorious.org/mu/mu/blobs/master/toys/muile/README

Re:Learning Scheme in Emacs on Sunday September 11, 2011 @06:32AM (#2983580)
I think the first step is to leverage Guile as a 'better elisp interpreter'. A lot of progress has been made in that direction, lately. Now, if it will ever replace the existing elisp interpreter depends on a lot of things, technical and non-technical. Guile could (potentially) be significantly faster, and stuff like threads, FFI may be nice as well. Anyway, I wouldn't hold my breath :)
Re:Learning Scheme in Emacs on Sunday September 11, 2011 @06:16AM (#2983573)
Hmm, I usually use guile[1] + geiser[2] in emacs, which works quite well for me. There's even an info-version[3] of SICP, so all the fun can happen within emacs.

[1] http://www.gnu.org/s/guile/ [2] https://savannah.nongnu.org/projects/geiser/ [3] http://www.neilvandyke.org/sicp-texi/

Re:Best of ZSH Tips on Tuesday April 12, 2011 @09:31AM (#2437079)
Fish-like syntax highlighting for zsh: https://github.com/nicoulaj/zsh-syntax-highlighting