prog


 

Go(lang) Thread

1 2019-12-25 23:35

Is any of you using it? If so, what are you building?

At the moment I'm trying to replicate this website. It's the first time I'm using Go and I'm finding it pretty amusing.

217

18 2020-01-24 21:26

>>16 I have this wiki in a cheatsheet but it's rather uncomfortable to write this syntax. Nevertheless I find Go pretty cool to write toy projects on.

19 2020-02-28 22:09

I made a program that I use with i3lock.

package main

import (
	"flag"
	"fmt"
	"image"
	"image/png"
	"log"
	"os"

	"golang.org/x/image/draw"
)

var (
	flagImage  = flag.String("i", "", "Path to the image you want to pixelate")
	flagOutput = flag.String("o", "", "Path to the output image")
	flagScale  = flag.Int("p", 0, "How much you want to pixelate. [1-100]")
)

func init() {
	flag.Parse()

	if *flagImage == "" || *flagOutput == "" {
		flag.Usage()
		os.Exit(1)
	}

	if *flagScale < 1 || *flagScale > 100 {
		fmt.Println("the -p flag must be between 1-100")
		os.Exit(1)
	}
}

func main() {
	img, err := OpenImage(*flagImage)
	if err != nil {
		log.Fatalf("could not open image '%s': %s\n", *flagImage, err)
	}

	scaledDown := Rect(img, 100-*flagScale)
	out := ScaleTo(img, scaledDown)

	originalSize := Rect(img, 100)
	out = ScaleTo(out, originalSize)

	err = SaveImage(*flagOutput, out)
	if err != nil {
		log.Fatalf("could not save file to '%s': %s\n", *flagOutput, err)
	}
}

func Rect(img image.Image, scale int) image.Rectangle {
	s := float64(scale) / 100
	x := int(s * float64(img.Bounds().Max.X))
	y := int(s * float64(img.Bounds().Max.Y))
	return image.Rect(0, 0, x, y)
}

func ScaleTo(from image.Image, rect image.Rectangle) image.Image {
	to := image.NewRGBA(rect)
	draw.NearestNeighbor.Scale(to, rect, from, from.Bounds(), draw.Over, nil)
	return to
}

func SaveImage(path string, img image.Image) error {
	file, err := os.Create(path)
	if err != nil {
		return err
	}
	defer file.Close()

	err = png.Encode(file, img)
	if err != nil {
		return err
	}

	return nil
}

func OpenImage(path string) (image.Image, error) {
	file, err := os.Open(path)
	if err != nil {
		return nil, err
	}
	defer file.Close()

	img, err := png.Decode(file)
	if err != nil {
		return nil, err
	}

	return img, nil
}

I use it with this script:

#!/usr/bin/bash

VALUE=$1
IMG=/tmp/i3lock.png
maim /tmp/i3lock.png
pixelate -i $IMG -o $IMG -p $VALUE
i3lock -i $IMG
rm $IMG
20 2020-02-28 22:32

>>19
Came back here to bump this thread and ask how Go was going for you. Talk about synchronicities.

21 2020-02-29 01:30

synchronicities

I didn't know about it. Thanks for introducing it to me!

It's been really good. I'm a miserable programmer so I've just understand generics and I'm already missing it. This program is an example of the lack of generics as methods for gif, jpg and png are all the same and I can't wrap them around a generic function. I don't know how to do it with interfaces because I know I have to type structs with the same method for all of them just to get an "unified" function call. Not worth it for a small program like that.
Nevertheless I really enjoy the syntax and the tooling. Having a standard formatter and a whole lot of architecture support out of the box is something I appreciate.

But tell me about you, anon. How has it been for you?

22 2020-02-29 04:55

>>21
I have yet to learn it properly and write small programs, like you did. I was curious about your progress and thought to ask you how you were doing. Then I saw that you came back here half an hour before me, answering all those questions.

Have you already grasped Go's model of concurrency?

23


VIP:

do not edit these



 

Cool Lisp projects

1 2020-02-28 22:49

Post them here as you stumble across them.

https://github.com/phantomics/april

Array Programming Re-Imagined in Lisp
Ken Iverson's masterpiece reflected in the medium of Lisp.

April compiles a subset of the APL programming language into Common Lisp. Leveraging Lisp's powerful macros and numeric processing faculties, it brings APL's expressive potential to bear for Lisp developers. Replace hundreds of lines of number-crunching code with a single line of APL.

2 2020-02-29 02:50 *

https://github.com/mihaiolteanu/lastfm.el

An interface to Last.fm API for Emacs.

3


VIP:

do not edit these



 

How can I run my own instance of this

1 2019-01-21 01:37

Say I want to make a text board using this script How would I go about making more boards in customizing the index to my liking

294

95 2020-02-26 23:52

Here are two more pieces of information. First, the (or) branch of sre->procedure doesn't follow "leftmost, longest":

scheme@(guile-user)> (define (imsis re str) (irregex-match-substring (irregex-search re str)))
scheme@(guile-user)> (imsis '(** 1 1 (or "free" "freedom")) "freedom")
$11 = "free"

The fixed range of 1 is only there to cause irregex to use sre->procedure. A plain 'or' uses a vanilla NFA, the implementation of which seems to work. Second, the 'or' can be forced to use later branches to reach a non-zero lower range limit, but no further, again in violation of "leftmost, longest":

scheme@(guile-user)> (imsis '(** 2 4 (or "a" "ab")) "abababab")
$12 = "aba"
scheme@(guile-user)> (imsis '(** 3 4 (or "a" "ab")) "abababab")
$13 = "ababa"

The way in which the (or) branch is broken seems fairly clear, but for the (**) branch I do not have all the details yet.

96 2020-02-27 18:14 *

Beware of the bug chaser.

97 2020-02-28 04:02

As an aside, before I explain why (or) and (**) are broken in sre->procedure, there is a "Fix exponential explosion in backtrack compilation" commit to irregex by Peter Bex on "Dec 5, 2016".
https://github.com/ashinn/irregex/commit/a16ffc86eca15fca9e40607d41de3cea9cf868f1
It only came to my attention because it contains the current implementation of the (+) branch of sre->procedure. While "define * in terms of +, instead of vice versa" is a fine idea, you still need a working (+). This (+), however, also takes a light-hearted comedy approach to the "POSIX leftmost, longest semantics" guaranteed by the documentation. As explained in >>95 the fixed range of 1 is only there to cause irregex to use sre->procedure.

$ guile -l irregex.scm
[...]
scheme@(guile-user)> (define (imsis re str) (irregex-match-substring (irregex-search re str)))
scheme@(guile-user)> (define (inout re n)
   (let* ((sin  (string-join (make-list n "a") ""))
          (sout (imsis re sin)))
      (simple-format #t  " in ~A ~A\nout ~A ~A\n" (string-length sin) sin (string-length sout) sout)))
scheme@(guile-user)> (inout '(** 1 1 (+ (or "aaa" "aaaaa"))) 8)
 in 8 aaaaaaaa
out 6 aaaaaa
scheme@(guile-user)> (inout '(** 1 1 (+ (or "aaa" "aaaaa"))) 9)
 in 9 aaaaaaaaa
out 9 aaaaaaaaa
scheme@(guile-user)> (inout '(** 1 1 (+ (or "aaa" "aaaaa"))) 10)
 in 10 aaaaaaaaaa
out 9 aaaaaaaaa

This class of tests can also be made to fail if the prefix is the second alternative:

scheme@(guile-user)> (inout '(** 1 1 (+ (or "aaaaa" "aaa"))) 9)
 in 9 aaaaaaaaa
out 8 aaaaaaaa
scheme@(guile-user)> (inout '(** 1 1 (+ (or "aaaaa" "aaa"))) 10)
 in 10 aaaaaaaaaa
out 10 aaaaaaaaaa
scheme@(guile-user)> (inout '(** 1 1 (+ (or "aaaaa" "aaa"))) 11)
 in 11 aaaaaaaaaaa
out 10 aaaaaaaaaa

Contrast this with grep, whose authors appear to actually know what they're doing. The {1,1} is only there for equivalence.

$ g () {
> local sin sout len
> len () { echo "$1" | gawk '{ print length ($0) }'; }
> sin=$(printf "%$2s" "" | tr ' ' 'a')
> echo " in $(len "$sin") $sin"
> sout=$(echo "$sin" | grep -E -oe "$1")
> echo "out $(len "$sout") $sout"
> }
$ g '(aaa|aaaaa)+{1,1}' 8
 in 8 aaaaaaaa
out 8 aaaaaaaa
$ g '(aaa|aaaaa)+{1,1}' 9
 in 9 aaaaaaaaa
out 9 aaaaaaaaa
$ g '(aaa|aaaaa)+{1,1}' 10
 in 10 aaaaaaaaaa
out 10 aaaaaaaaaa

And with reversed alternatives:

$ g '(aaaaa|aaa)+{1,1}' 9
 in 9 aaaaaaaaa
out 9 aaaaaaaaa
$ g '(aaaaa|aaa)+{1,1}' 10
 in 10 aaaaaaaaaa
out 10 aaaaaaaaaa
$ g '(aaaaa|aaa)+{1,1}' 11
 in 11 aaaaaaaaaaa
out 11 aaaaaaaaaaa

Great commit you have there.

>>96
Indeed, I hear entomologists can be quite peculiar people.

98 2020-02-28 21:10

I like taking notes during debugging, it helps a lot. I use an org-mode file, per project, for it. It can contain links to the code, so I can record where I have been while tracking down a fault. Very handy when working on foreign codebases, it's slowly growing into something like a travel guide. It can also have snippets, checklists, etc., anything one could want. When I fix an issue, I write a summary of what was wrong and why I think my fix is the correct one. After that, I change the TODO state into DONE and feel good about myself.

Especially useful for projects done in spare time, where it helps tremendously in getting back in context, even after longer intermissions.

99 2020-02-28 22:06

>>98

May you show us a bit of an org file to demonstrate?

100


VIP:

do not edit these



 

Improving

1 2020-02-22 06:14

Let's discuss the ways of becoming a better programmer!

24

5 2020-02-25 19:45

I feel like I've hit a plateau and have no idea how to proceed. The usual advice is to read more books and write more programs. But what book is to be read and what program is to be written? I don't even feel like I know what I am good at and what needs to be improved. What are even the ``subskills'' of programming and how could they be measured? Please help me /prog/!

6 2020-02-25 21:32

What kinds of books have you been reading? What kind of programs have you been programming?

You might need to learn stuff that you aren't directly interested in, so better yourself indirectly in the fields you are interested in. Arguably, that's also the point of universities.

7 2020-02-26 01:55

>>5

I feel like I've hit a plateau and have no idea how to proceed. The usual advice is to read more books and write more programs. But ...

Sounds like you feel inured. Perhaps you should try something different---even wildly different, seemingly unrelated to your work. You might learn something that noone else considered, that might apply, somehow, to your work.

I don't even feel like I know what I am good at and what needs to be improved. What are even the ``subskills'' of programming and how could they be measured?

Sounds like you oughtta review the fundamentals. Have you read Donald Knuth's The Art Of Computer Programming? By the way, literate programming <http://literateprogramming.com/> seems to be where the future of software developement is gonna be. Maybe not soon, but the basic idea---keeping all sources, including documentation, together as one file, written for human consumption, and, additionally, computer parsing---is quite compelling, and pramatically sound.

8 2020-02-26 01:55

>>2

Wake up early. Take care of your diet. Work instead of procrastinating.

Well, really, it's about having the proper exercise, rest, nutritional, hygiene,, programmes. The problem is that what is proper for one is not necessarily proper for another. There may be similarities among some individuals, and some individuals might be near the ``average advice'' about when to go to bed, how often to do what sorts of exercises, when to eat what sorts of foods, water,, how often to bathe, brush teeth, do laundry, clean/organize your rooms,,. It might be worth trying the average advice, but if that's very different to how you are doing things now, it might not turn out too well. (It might even be your proper programme, but there might be some shock, which might lessen, perhaps negate, it's salutary effects.)
Another strategy might be to try some small change, and wait a few weeks to see the difference in your activity; repeating this until you get to something that works well for you. This can get you to a local maximum, but that's not necessarily your proper programme.
Another strategy might be to choose an arbitrary programme (checking to make sure that you won't die because of it) and then just try it for a few weeks; repeating until the programmes that you have tried are spread around the space of possible programmes, sufficiently close together that it's unlikely that there is any interesting variants between them. Then, based on the best of the programmes in that spread, you should try minor variants, each with it's own trial period, to find your proper programme.
It's best to start with a good idea of the sorts of aspects of your life that might be factors in your well-being, and construct a space of possible programmes based on these potential factors. You can apply some empirical results and basic reasoning to have a basic conception of how the programmes might be related.
For one, your overall movement should correspond with your overall nutritional intake. So, if you keep your movement the same, and experiment with different nutritional intake, or keep your nutritional intake the same, and experiment with your movement, you should get a decent idea of the relation between movement and nutritional intake.
Another example is that, based on the principle of entropy, things get dirtier over time. Also, dirtier things are more difficult to work with, becuase of the greater complexity. (And there's a greater risk involved with things going wrong.) So this is where hygiene comes it. Since things get dirtier over time, you know that, e.g. bathing once a day is cleaner than bathing once every few days. Is the extra cleanliness worth the extra bathing effort? Generally, how much extra cleanliness of that sort is worth the extra hygienic effort of that sort? That something for you to try to figure out or notice. (For all we know, this may differ depending on the person, so there's no reason to be a cleanliness snob, snubbing any less clean, nor to condemn someone cleanlier-than-thou as obsessive about cleanliness.)
So, to start, learn about what the possible factors might be, and learn about the possible factors, then, based on them, construct the space of potential programmes. Then, the goal is to find the measure function on that space of potential programmes. How you go about doing that is up to you, but I've mentioned, above, one way that you might do this. Perhaps there is another way. Perhaps there is a better way.

9 2020-02-28 19:05

>>5,7

Sounds like you oughtta review the fundamentals. Have you read Donald Knuth's The Art Of Computer Programming?

I'd suggest you start with Concrete Mathematics by Knuth. It truly is enlightening.

10


VIP:

do not edit these



 

Mathematical Proofs Set to Music and Boethius' De Institutione Musica

1 2020-02-28 18:56

http://us.metamath.org/mpegif/mmmusic.html

While looking at some proofs, it occurred to me that their structure resembled musical scores, so as an experiment I decided to see what they "sounded" like. Essentially, the musical notes correspond to the depth of the proof tree as the proof is constructed by the proof verifier. A fast higher note is produced for each step in the construction of a formula. A sustained lower note is produced when the formula is matched to a previous theorem or earlier proof step, to result in a new proof step (which corresponds to a proof step displayed on the Metamath Proof Explorer page that shows the theorem's proof)

There was a time when you'd learn music along arithmetic, geometry and astronomy, because they all deal with Harmony. Boethius named this cursus the quadrivium.

In liberal arts education, the quadrivium consists of the four subjects or arts (namely arithmetic, geometry, music, and astronomy), taught after teaching the trivium. The word is Latin, meaning four ways, and its use for the four subjects has been attributed to Boethius or Cassiodorus in the 6th century. Together, the trivium and the quadrivium comprised the seven liberal arts (based on thinking skills), as distinguished from the practical arts (such as medicine and architecture).

For most medieval scholars, who believed that God created the universe according to geometric and harmonic principles, science – particularly geometry and astronomy – was linked directly to the divine. To seek these principles, therefore, would be to seek God.
The quadrivium consisted of arithmetic, geometry, music, and astronomy. These followed the preparatory work of the trivium, consisting of grammar, logic, and rhetoric. In turn, the quadrivium was considered the foundation for the study of philosophy (sometimes called the "liberal art par excellence") and theology. The quadrivium was the upper division of the medieval education in the liberal arts, which comprised arithmetic (number), geometry (number in space), music (number in time), and astronomy (number in space and time) Educationally, the trivium and the quadrivium imparted to the student the seven liberal arts (essential thinking skills) of classical antiquity.

The author of the metamath's webpage uses a program to visualize music structure. For instance, here's the visualization of the structure of the tune of the Schröder-Bernstein Theorem: http://us.metamath.org/mpegif/_music_shape_mm.gif
Now compare the last image to an actual illustration found in Boethius' book de Institution Musica: http://www.chmtl.indiana.edu/tml/6th-8th/BOEMUS2C_05GF.gif

How quaint!

2


VIP:

do not edit these



 

What are you working on?

1 2018-12-22 22:05

This is the type of thread that you can write in every time you visit the site! You can do anything from use this as a personal log for your project, to sharing what you're hacking on at the moment, or to critique something some else did in the thread. I'm looking forward to hearing what you guys are up to!

Personally I've been working on a radix tree implementation in R7RS, it seems moderately efficient and not too bad to use, although I haven't finished many of the operations, and I'm not sure I will due to the awareness of a better way to do it if I only had the primitives (or even just a standardised FFI). Anyway thought I'd share it just because it's something to talk about. Due to the file limit I'm only posting the introduction, imports, exports, and type here, but a link to the full source can be found here: http://ix.io/1wB1.

; This is a implementation of a radix tree in the style of Clojure or
; Scala, meaning a not particularly good implementation. Ideally this
; would be a adaptive radix tree as described in the following paper:
; http://www-db.in.tum.de/~leis/papers/ART.pdf
; additionally it'd be nice to be able to have a variant for using SIMD
; functions on unboxed values if possible. Regardless scheme does not
; have the necessary primitives for implementing a adaptive radix tree
; to its full potential, namely access or abstractions of SIMD functions
; for the search function.

; much of this library may seem unidiomatic, this is simply because I'm
; trying quite hard to A) avoid allocations and B) factor out functions
; when they can be used in multiple situations, even if this means adding
; a bit of complexity.

; one of the goals of this library was to be exceedinly standard compliant,
; it's written entirely in R7RS small with SRFI 1 & 60. That being said
; this doesn't actually make this a particularly portable library due to
; the lack of upto date compliance with the standard and implementation
; of SRFI 60. To my knowledge the following implementations would likely
; be able to run this library: Foment, Gauche, Larceny, & Sagittarius.

(define-library (data radix)
  (export radix-ref radix-set radix->list radix->vector
          vector->radix list->radix radix radix-append
          radix-data radix-length radix-depth))

(import
  (scheme base)
  (srfi 1)   ; append! in radix->list
  (srfi 60)) ; bitwise operations

(define-record-type radix #t #f data length depth)
296

97 2020-02-19 12:56 *

>>96
This should be added to the "collection" of userscripts.

98 2020-02-20 00:28

To change single post quote links inside full thread views from separate single post views to local scroll jumps within the thread, while leaving other links untouched:

Array.from (document.getElementsByTagName ("a")).filter (e => e.hasAttribute ("href")).forEach (e => {
  h = e.getAttribute ("href")
  s = h.replace (/^\/([^\/]+)\/(\d+)\/(\d+)$/, "/$1/$2#t$2p$3")
  if (h != s) { e.setAttribute ("href", s); }
})

The operation is idempotent. To get the previous behavior back reload the thread.

99 2020-02-20 06:44

>>96
The sexp API also gives you the thread list in update order: http://textboard.org/sexp/prog/
But it's not really human readable, you need a scheme client first.

100 2020-02-27 02:09 *

>>98
Thanks for saving me from having to do this myself.

101 2020-02-27 15:08

>>97

This should be added to the "collection" of userscripts.

Done.
>>96 and >>98 were added to the list of userscripts:
http://textboard.org/prog/preferences
http://textboard.org/static/userscripts/

102


VIP:

do not edit these



 

Racket on Chez is ready for production

1 2020-02-26 20:48

https://blog.racket-lang.org/2020/02/racket-on-chez-status.html

2 2020-02-26 21:32 *

Any advancement they make is overcast by their decision to get rid of the s-expression based syntax.

3 2020-02-27 10:20

their decision to get rid of the s-expression based syntax

I thought it was a joke but it isn't. Now I understand why my gut feeling had always kept me away from Racket.

It doesn't matter, there's no real lack of good implementations with useful ecosystems. Guile 3.0 has been released in January. There's Gambit-C (and Gerbil) and a few others that I have yet to try.

4


VIP:

do not edit these



 

How do free file-hosts survive?

1 2020-02-26 13:29

Wouldn't it be easy to abuse all those free file-hosts?: encrypt data, upload encrypted data (to multiple different file-hosts; redundancy and all that), save download URL, download encrypted data, decrypt data; automatically occasionally checking that the uploaded data is still there, and if it's not, reuploading it (e.g. from one of the other file-hosts that the encrypted data was uploaded to)..
The data is encrypted (by different keys per uploadion, so a would-be cyberspy won't see that it's the same encrypted data uploaded multiple times, to multiple free file-hosts,,) (transferred via TOR), so it's not worth anything to a would-be cyberspy who might otherwise be willing to pay for it. (Unless he's a stupid would-be cyberspy who is willing to pay for useless, i.e. uninformative, data.)

(Why can't I VIP a new thread?)

25

6 2020-02-26 22:45

>>5
Why don't you link to a single post like this: https://textboard.org/prog/34/96 ?

7 2020-02-26 23:51

>>6
Because threads are one lesbillion times more usable with surrounding context and local scroll jumps, which is why this was posted:
https://textboard.org/prog/34#t34p98

8 2020-02-27 00:09 *

>>7
You can actually do this: https://textboard.org/prog/34/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99

9 2020-02-27 00:23 *

>>7
What's a lesbillion? The only meaningful result I got from a Google search was this weird comics: https://steamcommunity.com/sharedfiles/filedetails/?id=768154996

>>8
Unoptimized and ultimately destructive.

10 2020-02-27 04:03

>>8
http://I-have-a-hunch-that.at-that-point.sane-people-would-just.link-the-thread-itself

>>9
An old joke from a bygone age. Your image may or may not have anything to do with its origin, my memory is too hazy on this point to say one way or the other.

11


VIP:

do not edit these



 

Doffing his fez with an impish grin, The Sussman returns.

1 2020-02-06 03:53

You heard it here first, folks. The Sussman's next book, Software Design for Flexibility, will be out soon. Abelson talked about it at around 25:45 in this interview from last year: https://corecursive.com/039-hal-abelson-sicp/, and it's named in the documents linked at the page for the "Advanced Symbolic Systems" course that Sussman is currently teaching: https://groups.csail.mit.edu/mac/users/gjs/6.945/

It's a graduate level class, meaning the book will likely be a step up from SICP. To whet your appetites while you wait, you can find talks Sussman has given over the past several years on Youtube, where he talks about a lot of the same principles regarding flexibility.

Now that The Sussman has four mind-bending books out, we might consider replacing satori with the Theraveda Four Stages of Nirvana:

SICP - Stream Entry
SICM - Once-Returning
Functional Differential Geometry - Non-Returning
Software Design for Flexibility - Arhantship

2 2020-02-15 21:55

Is there any info on when the book will be publicly released?

3 2020-02-17 07:06 *

>>2
According to the red tape memo for the Spring 2020 class Adventures in Advanced Symbolic Programming

Readings: The readings for this subject will be taken from a variety of sources. There will be assigned readings with each problem set. The textbook for this class is currently under development; draft sections will be distributed as needed. The text book is: Chris Hanson and Gerald Jay Sussman; Software Design for Flexibility

4 2020-02-22 16:57

>>2
Abelson was saying it would probably be this fall. Of course it could be delayed, but I don't think we need to fear a Knuth-tier wait.

5 2020-02-26 01:55

Knuth-tier wait

At first, people thought it was a hiatus. Then, they agreed that it's probably too-broad a task for any one man to complete, so we should be satisfied with the three extant books. Then we get some of the fourth book! Personally, I want the anti-aging, and anti-death research to continue, even if only to progress the work of this academic treasure-incarnate named Donald Ervin Knuth.

6


VIP:

do not edit these



 

Emacs mode for SchemeBBS markup

1 2020-02-16 22:22
(require 'generic-x)
(define-generic-mode schemebbs-mode
  nil nil
  '(("\\(\\*\\*.+\\*\\*\\)" 1 font-lock-keyword-face)           ; bold
    ("\\(__.+__\\)" 1 font-lock-comment-face)                   ; italic
    ("\\(==.+==\\)" 1 font-lock-constant-face)                  ; monospaced
    ("\\(~~.+~~\\)" 1 font-lock-type-face)                      ; spoiler
    ("^\\(>.+\\)" 1 font-lock-doc-face)                         ; quotes
    ("^\\(```\n\\(.+\n\\)+```\\)$" 1 font-lock-reference-face)) ; code
  nil nil
  "Basic highlighting for composing SchemeBBS posts.")
216

17 2020-02-22 18:16

>>16
No real reason, probably because I hacked multiple-service-support in too quicky. Upon further reflection, I've actually been thinking about removing it and limiting the package to only 0x0 and forked service.

18 2020-02-24 18:55

What is the recommended way to learn elisp? How did you learn it?

I just finished reading ``Writing GNU Emacs Extensions''. While I enjoyed it a lot, it is decidedly narrow in what it covers and I was left wanting more. Should I just read the reference manual cover-to-cover? Or just lazily learn whatever is needed at the moment while extending my init.el?

19 2020-02-24 19:53

>>18
Knowing Common Lisp helps a lot, but knowing when not to use cl-lib is also good. But when it comes to learning, i think "lazily learning" is the best way, but not only while you're extending your init.el, but also whenever you're curious as to how a functionality is implemented (C-h k with local emacs sources are useful). Reading the entire manual will be of little use, consider skimming it or section from time to time, so that you have an idea of the vocabulary when it need it.

20 2020-02-25 22:02

>>9,10
ornamentum was meant to be a ``revolutionary'' antispam technique but the lack of usable crypography in MIT/GNU Scheme 9.2 hindered its implementation. In effect ornamentum is always the same hash, whatever the thread you're posting in.

>>10

It seems the API is read-only at this point.

Yep and that's unfortunate. On the TODO list, now with higher priority.

Also, I took the liberty of linking your Emacs mode under the clients section in the site preferences: http://textboard.org/prog/preferences

21 2020-02-26 01:00

>>19

lazily learning

It depends. There's much out there---too much for any one to learn it all---so it's important to prioritize what to learn (whether to learn it), and to know whether, at a particular moment, it's better to learn, or to implement what you have learned.
At first, it's almost always to learn---unless your learning style is more ``hands-on'', wherefore it's better to (guided by a teacher, mentor, vel cetera, or merely a good course (be it static or dynamic, old-style media (text, video, audio,,) or hypermedia,,), or whatever; even yourself, if your intuition about it is sufficiently good) make (but for the sake of learning). (My favourite initial learning style is imagining, in full detail, making.) and:
What to learn? There are some things which are so useful, or so often used, so powerful or promising, or just so beautiful, that one tends to consider them necessary for any such specialist. Often, one hears ``a real'' or ``a true''---whatever professional designation---would/should/oughtta// know. Sometimes, this sentiment is misguided; too-generally applied. (Often, it would be true, were it about a subspecialization (of which the speaker, probably, is) of the specialization about which he is, apparently, speaking. The proper interpretation, in my experience, of such statements, tends to be, having attempted to understand to which specialization (of those that the speaker may be (reasonably considered to be) a part) that statement could truthfully apply, that that statement is about that subspecialization, which, probably, the speaker has confused with that surspecialization.) i.e. A basic ``common'' (among these specialists, that is) knowledge/skill set. But sometimes, there isn't, or it's not well known what would constitute, a basic ``common'' knowledge/skill set; wherefore one would merely start wherever, within such a sea, and progress through as might seem best. (Or, he might be wise to choose a different specialization.)
When it's time to make something, one must muster up all he has learned that may be relevant to the task at hand, to apply all applicable knowledge and skills, to make that which is to be made. Sometimes, his extant knowledge is not quite enough, or could be improved slightly; thus there is a complement to his knowledge, his skills,, which he would do well to learn prior to the actual making. Such complementary, for this learning, I suspect, is where such ``lazily learning''---learning them just before needing them---applies. (It's important to be able to know which things you'll need to learn, so that you'll be better able ``lazily learn'' that complement; this, naturally, would be part of that ``common'' knowledge/skills set.)

22


VIP:

do not edit these



New Thread





do not edit these