me1
2018-3-5 09:19:11

I want a macro or something (may need to be a reader [is that what it’s called?] over the initial text ?) for ’(a, b, c) to become ’(“a, b, c”) , but it becomes ’(a ,b ,c) which then something like (symbol->string input) errors, seems likez I’m still learning more of the basics for more immediately helpful stuff; thanks so much for this more complicated stuff. Is there a way to make this work?


me1
2018-3-5 09:20:20

Thanks so much for all your help; studying more Racket and Lisp has been very helpful and joy producing.


jerome.martin.dev
2018-3-5 09:54:41

@jerome.martin.dev has joined the channel


jerome.martin.dev
2018-3-5 09:57:31

(displayln "Hello there :D")


notjack
2018-3-5 12:27:22
(pretty-print "welcome :)")

ryanc
2018-3-5 15:06:48

Poll regarding https://github.com/racket/racket/pull/1803: ?? and ?@ or ~? and ~@?


dedbox
2018-3-5 15:56:43

@me1 Are you using these commas as list delimiters? Your example input reads as '(a ,b ,c), which is the quoted form of (list 'a (quasi-unquote b) (quasi-unquote c)), which makes no sense unless you’re trying to do something unusual with quasiquotes.


ben
2018-3-5 16:01:16

?? and ?@


dedbox
2018-3-5 16:01:45

If those commas really are list delimiters, just drop them — Racket lists use whitespace to delimit list elements, and commas to escape from a quote. Then, your original problem is to produce '("a b c") from '(a b c).


jerome.martin.dev
2018-3-5 16:44:07

which is one string-join away :wink:


jerome.martin.dev
2018-3-5 16:46:12
> (list (string-join (map ~a '(a b c))))
'("a b c")

(you can replace ~a with symbol->string for the same result)


lexi.lambda
2018-3-5 17:46:14

I’ve always wondered if ~seq and ~optional (or ?seq and ?optional) would be better names than the symbol soup, since they’d correspond more closely to their matching counterparts, but that might be too likely to break programs.


kylewsherman
2018-3-5 18:19:14

@kylewsherman has joined the channel


me1
2018-3-5 18:42:21

The commas aren’t being used as list delimiters. The language I’m/(my company is) developing was using simply (e.g.,) (define x ’(a, b, c)) to mean x is defined to be the string of “a, b, c”. Overall though I am thinking doing explict string quotes (e.g.,) (define x (“a, b, c”)) whenever there is punctuation like that ("," ";", etc.), and allowing for symbol->string for if there’s no conflicting punctuation, if really a more robust system, fundamentally.


me1
2018-3-5 18:43:24

Thanks though. :blush:


dedbox
2018-3-5 18:43:52

Oh, I get it.


dedbox
2018-3-5 18:46:10

How do you differentiate between normal Racket and things to parse differently?


dedbox
2018-3-5 18:48:26

:+1: for less symbol soup


lexi.lambda
2018-3-5 20:44:52

Related to the discussion of van Tonder’s system on the mailing list, the system has some really interesting properties. For example, this program: (define x 'module) (define-syntax (mac stx) (syntax-case stx () [(_) #`(let ([x 'local]) (list x #,#'x))])) (mac) produces '(local module), which I think is just fascinating.


githree
2018-3-5 23:19:45

@abmclin I’ve just accidentally stumbled upon this page detailing racket logos history - near the bottom there is the one with a star: http://www.eecs.northwestern.edu/~robby/logos/


abmclin
2018-3-5 23:25:05

Fascinating history! Thanks for the link. I do miss the logo version used for RAcket v 4.3 – 6.7. The history behind the stepper foot is amusing. Neato.


me1
2018-3-6 02:44:11

@dedbox yeah, we’re moving away from that system because it has issues. Always evolving!


dedbox
2018-3-6 03:03:26

:smiley:


dedbox
2018-3-6 03:05:29

To the Scribble wizards, I’m having a couple of problems with scribble/examples.


dedbox
2018-3-6 03:07:36

Issue 1: an opaque struct inside an eval:error is being printed as if it was transparent. You can see it here (http://docs.racket-lang.org/neuron/Control_Your_Resources.html#%28part._.Concurrency%29) in the first example. The raised value is a transparent struct that contains the opaque one.


dedbox
2018-3-6 03:09:04

Issue 2: I made a macro that quasiquotes a supplied term, but scribble complains that valid quasi-unquoted terms are not inside a quasiquote.


dedbox
2018-3-6 03:10:23

Are either of these expected behavior in certain cases, for instance if my evaluator sandbox is too strict? I’ve tried twiddling parameters to no avail.


notjack
2018-3-6 06:18:41

¯_(ツ)_/¯


notjack
2018-3-6 06:20:31

I really ought to read about this macro system too because it makes a disturbing amount of sense