1
0
Fork
You've already forked sandbox
0
My personal configs and whatnot. Some of this is obsolete.
  • Dylan 60.8%
  • Shell 20.3%
  • C 15.7%
  • Python 3.2%
2024年03月31日 12:16:40 -04:00
benchmarks Added the C and Python version of IO benchmark 2011年03月14日 12:18:29 -04:00
.bashrc various and sundry 2024年03月30日 20:39:39 -04:00
.emacs various and sundry 2024年03月30日 20:39:39 -04:00
.gitconfig .gitconfig: git b == git branch -vv 2024年03月18日 20:12:11 -04:00
.sbclrc sbcl config stuff + turn off "smart" completion 2024年03月03日 21:15:19 -05:00
choose-dylan $D -> $DYLAN 2018年05月10日 22:32:52 -04:00
configure-linode.sh minor 2020年05月21日 18:01:08 +00:00
ferri-dynamic.jpg dylan graphics 2019年07月06日 20:48:21 -04:00
LICENSE.txt a simple IO benchmark to count words in a file. perf is abysmal. 2011年02月02日 10:29:51 -05:00
misbah-urgent.png dylan graphics 2019年07月06日 20:48:21 -04:00
opendylan-reorg.md Mark some things done 2019年03月22日 07:42:50 -04:00
ordered-table.dylan <ordered-table>, moved here from coil library in case I ever want to add this to the collections library. 2013年02月23日 15:42:31 -05:00
README.rst Remove utterly obsolete stuff 2024年03月01日 09:50:34 -05:00
sequence-apis.md updates 2022年02月21日 18:07:14 +00:00

cgay's sandbox

Just a bunch of notes.

Much of this has been moved to various Google Docs.

Libraries

collections

  • Move <set> into the collections library. It's Currently defined in functional-extensions, so that's where you find it with a 'grep' and that's not a library you want to use directly since it's not portable.

    housel suggests that we could combine collection-extensions into collections, since collections is standard/"common dylan" while collection-extensions started as a GD-only library.

  • Write a DEP to introduce slices to the language. They really need to be supported by the language itself or they're not terribly useful. Thoughts so far:

    • Slices inherit their (im)mutability from the target sequence.
    • slice(sequence, start, end) where end may be #f. Both start and end may be negative to index from the end.
    • reverse(slice) can sometimes just swap the start and end indices.
    • For mutable slices need to look at all collection mutation functions and see what the semantics should be.
  • Add start/end parameters to sequence functions? Doing this could create a more consistent strings API. (Alternatively slice() could be used, but it requires allocating memory.)

  • Change subsequence-position:

    • Rename to find-subsequence. This function stands out in that it doesn't use a verb-noun naming scheme where a much better (in my opinion) name exists: find-subsequence.
    • Fix inconsistency between find-key(..., skip: 2) and subsequence-position(..., count: 2). Use "skip".
  • add/add! don't specify where an element is added and it differs between lists and stretchy vectors, and it's completely non-obvious what deque will do. (It adds to the front.) It would be preferable to have separate functions for adding to the beginning or end of a sequence. Perhaps push/push! and push-last/push-last!, inspired by <deque>.

    I just found (what I think is) a bug in user-registry-path due to this behavior. How often does one not care where an element will be added?

Project Ideas

  • Get lisp-to-dylan (LTD) added to quicklisp.

  • It might be fun to try something like this for Dylan: http://dev-tricks.net/pipe-infix-syntax-for-python I imagine syntax like:

    pipe(fib() => until(f1) => where(f2) => transform(f3) => sum)

    Instead of iterators we would use closures in Dylan, so fib() returns a "generator": a closure taking no args and returning the next value each time it is called. Each name following the =>, such as "until", would be a function that expects a generator function as its first argument and returns the next value according to its own rules.

    I have my doubts about the general applicability of this, but it might be a neat hack and possibly a blog post. dlowe brought it to my attention.

  • english2cron: parse english and generate cron time specs. Could be a Python hack to actually have anyone give a shit, and would make a fun blog post. :)

  • Convert lisppaste to Dylan with LTD. This would be a good synthesis project, like wiki is.

  • Convert COIL to Dylan. XML is just such a horrible configuration syntax.

    This is underway in https://github.com/cgay/coil . Parser is basically working. Needs tests and printer.

  • Create a general-purpose "with" macro, analogous to Python's "with" statement or C#'s "using" statement. This could use a <resource-protocol[-mixin]> class and support acquire and release generic functions. I counted around 300 "with"-style macros in fundev and libraries, but of course only some of them would fit this model. The main ones that jump out at me are: network streams, files, database connections, locks, http-server. Housel mentioned <closable-object> as one possibility, but it only supports close currently, and the name isn't quite right.

  • Implement enums a la Java: http://download.oracle.com/javase/1.5.0/docs/guide/language/enums.html It looks as though each element is an instance of the enum's class name. In Dylan there's no need to create a subclass for each element when methods are provided, since we can use == method dispatch on the enum constant. The elements can be stored in class slots.

  • Fix shootout code and update the web site.

  • Benchmarks -- IO performance seems to be really bad. See the count-words benchmark. Even some very basic benchmarks could be useful at this stage...

    • Array access speed for different array types.
    • Gabriel benchmarks
    • Allocation/deallocation
  • DUIM on Linux

Conditions

  • Consider switching wholesale to current (Java?) terminology: condition -> exception, error -> bug
  • Rename <serious-condition> to <exception>. Should <error> really be a subclass of <serious-condition>? Fix system libraries' subclassing of <error> where inappropriate. cpage's comments clarified things:
  • Fix condition hierarchy around <invalid-index-error> and friends (see comment in collection.dylan) and export a useful set of conditions. <key-error>?

Chroma Lexer (syntax highlighting)

go test -test.run 'TestLexers/Dylan'