From tty.erlang@REDACTED Mon Jun 4 22:28:59 2007 From: tty.erlang@REDACTED (t ty) Date: Mon, 4 Jun 2007 16:28:59 -0400 Subject: [erlang-patches] sha256 and sha512 in crypto Message-ID: <290b3ba10706041328o644f3145h97225bf69c5cb8c0@mail.gmail.com> Added support for sha256 and sha512. Was hoping to use it for LDAP authentication but looks like LDAP only supports sha1/ssha. Hopefully it's useful for someone else. Patch generated from R11B4 using git-format-patch. However 'patch < fname' does work. Regards tee -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Adding-sha256-and-sha512.patch Type: text/x-patch Size: 5822 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Increase-number-of-functions-to-33.patch Type: text/x-patch Size: 1759 bytes Desc: not available URL: From billclem@REDACTED Fri Jun 8 02:35:10 2007 From: billclem@REDACTED (Bill Clementson) Date: Thu, 07 Jun 2007 17:35:10 -0700 Subject: [erlang-patches] Patch for erlang.el (optional debug_info on compile) References: Message-ID: Bill Clementson writes: > At present, erlang-mode doesn't provide any way to compile an erlang > file for debug - you have to manually do the debug compile in an > Erlang shell. This bugs me (bad pun!), so I've created a patch for > erlang.el that does a debug compile if the standard compile function > is called with a prefix arg (e.g. - "C-c C-k" does a "normal" compile > and "C-u C-c C-k" does a compile with "debug_info"). > > Attached is the patch (for erlang-mode version 2.5.2) I've updated the patch for erlang.el version 2.5.3 (which is the one that is in R11B-4) and added functionality so that "C-u C-c C-k" now does a compile with both "debug_info" and "export_all". -- Bill Clementson --- /usr/local/lib/erlang/lib/tools-2.5.4/emacs/erlang.el 2007-03-02 07:14:38.000000000 -0800 +++ /Users/bc/Desktop/erlang.el 2007-06-07 17:21:14.000000000 -0700 @@ -5599,9 +5599,11 @@ (replace-match "" t t)))))) -(defun inferior-erlang-compile () +(defun inferior-erlang-compile (arg) "Compile the file in the current buffer. +With prefix arg, compiles for debug. + Should Erlang return `{error, nofile}' it could not load the object module after completing the compilation. This is due to a bug in the compile command `c' when using the option `outdir'. @@ -5613,7 +5615,7 @@ 2) Set the Emacs variable `erlang-compile-use-outdir' to nil. To do so, place the following line in your `~/.emacs'-file: (setq erlang-compile-use-outdir nil)" - (interactive) + (interactive "P") (save-some-buffers) (or (inferior-erlang-running-p) (save-excursion @@ -5621,7 +5623,7 @@ (or (inferior-erlang-running-p) (error "Error starting inferior Erlang shell")) (let ((dir (file-name-directory (buffer-file-name))) - ;;; (file (file-name-nondirectory (buffer-file-name))) +;;; (file (file-name-nondirectory (buffer-file-name))) (noext (substring (buffer-file-name) 0 -4)) ;; Hopefully, noone else will ever use these... (tmpvar "Tmp7236") @@ -5631,12 +5633,16 @@ (inferior-erlang-wait-prompt) (setq end (inferior-erlang-send-command (if erlang-compile-use-outdir - (format "c(\"%s\", [{outdir, \"%s\"}])." noext dir) + (if current-prefix-arg + (format "c(\"%s\", [{outdir, \"%s\"}, debug_info, export_all])." noext dir) + (format "c(\"%s\", [{outdir, \"%s\"}])." noext dir)) (format (concat "f(%s), {ok, %s} = file:get_cwd(), " "file:set_cwd(\"%s\"), " - "%s = c(\"%s\"), file:set_cwd(%s), f(%s), %s.") + (if current-prefix-arg + "%s = c(\"%s\", [debug_info, export_all]), file:set_cwd(%s), f(%s), %s." + "%s = c(\"%s\"), file:set_cwd(%s), f(%s), %s.")) tmpvar2 tmpvar dir tmpvar2 noext tmpvar tmpvar tmpvar2)) From neumann@REDACTED Tue Jun 12 01:55:44 2007 From: neumann@REDACTED (Francois-Denis Gonthier) Date: Mon, 11 Jun 2007 19:55:44 -0400 Subject: [erlang-patches] erlang-mode patch Message-ID: <200706111955.49339.neumann@lostwebsite.net> While investigating warnings shown by compiling erlang mode to bytecode, I've stumbled upon a likely syntax error. I've made at patch potentially correcting it. The error message was "t called as a function" or something like that. diff -u erlang.el.old erlang.el --- erlang.el.old 2007-06-08 19:34:54.000000000 -0400 +++ erlang.el 2007-06-08 19:35:28.000000000 -0400 @@ -3250,10 +3250,9 @@ (error "Missing `end'")) )) ((eq (car (car stack)) 'begin) - (error "Missing `end'") + (error "Missing `end'")) (t - (error "Unbalanced parenthesis")) - )) + (error "Unbalanced parenthesis"))) (forward-char 1)) ;; Character quote: Skip it and the quoted char. Could anyone confirm? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From tty.erlang@REDACTED Tue Jun 12 05:03:54 2007 From: tty.erlang@REDACTED (t ty) Date: Mon, 11 Jun 2007 23:03:54 -0400 Subject: [erlang-patches] Fisher-Yates lists shuffle bif Message-ID: <290b3ba10706112003h744a4022g532d0c03bc0a2f84@mail.gmail.com> Added a new bif to lists module for a Fisher-Yates shuffle taken from Knuth's The Art of Computer Programming v2. The seed to random(3) is initialize in beam_emu.c although there might be a better place for it. t -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Added-Fisher-Yates-Knuth-fair-shuffle-to-lists-modul.patch Type: text/x-patch Size: 2871 bytes Desc: not available URL: From hio@REDACTED Tue Jun 12 11:27:53 2007 From: hio@REDACTED (YAMASHINA Hio) Date: Tue, 12 Jun 2007 18:27:53 +0900 Subject: [erlang-patches] patch for better record syntax. Message-ID: <20070612182753.943a4e80.hio@hio.jp> Hi, all. When we today want to extract a value which lies deep in a complex object, we have to say like: ``((Data#type1.field1)#type2.field2)#type3.field3'' but it looks ugly. I suggest more straightforward syntax: ``Data#type1.field1#type2.field2#type3.field3.'' Attached patch implements this. Regards. -- YAMASHINA Hio -------------- next part -------------- A non-text attachment was scrubbed... Name: record.patch Type: application/octet-stream Size: 635 bytes Desc: not available URL: From hio@REDACTED Thu Jun 14 15:22:09 2007 From: hio@REDACTED (YAMASHINA Hio) Date: Thu, 14 Jun 2007 22:22:09 +0900 Subject: [erlang-patches] patch for better record syntax. In-Reply-To: <20070612182753.943a4e80.hio@hio.jp> References: <20070612182753.943a4e80.hio@hio.jp> Message-ID: <20070614222209.29877f28.hio@hio.jp> Hi, all. In addition to previous, this one extends another syntax, ``Data#type1.field1#type2{ field2 = value2 }.'' Regards. On Tue, 12 Jun 2007 18:27:53 +0900 YAMASHINA Hio wrote: > > Hi, all. > > When we today want to extract a value which lies deep in a complex > object, we have to say like: > ``((Data#type1.field1)#type2.field2)#type3.field3'' > but it looks ugly. > > I suggest more straightforward syntax: > ``Data#type1.field1#type2.field2#type3.field3.'' > > Attached patch implements this. > > > Regards. > > -- > YAMASHINA Hio > -- YAMASHINA Hio http://fleur.hio.jp/erlang/ -------------- next part -------------- A non-text attachment was scrubbed... Name: record2.patch Type: application/octet-stream Size: 738 bytes Desc: not available URL: