zenspider
2018-3-24 09:45:31

mmmm footgun


zenspider
2018-3-24 09:46:21

@mflatt is there a way to compile your chez fork on osx w/o X11? I wanted to poke but it dies on compile very quickly and I don’t see obvious config options for this.


mflatt
2018-3-24 12:30:25

@zenspider That’s an issue with building Chez Scheme that has bothered many. I don’t have an easy workaround, but I think it must be a solvable problem, and I’ll take a look again soon.


dmitryhertz
2018-3-24 14:53:51

Hello everyone! )


dmitryhertz
2018-3-24 14:54:44

I don’t know why, but (list->string (list #\\)) produces double backslash "\\" instead of the single one "\"


dmitryhertz
2018-3-24 14:55:52

Is there any solution to use a backslash like a symbol? By using #\backslash for example (the last one unfortunately doesn’t exist).


greg
2018-3-24 15:03:22

Racket uses the same convention as some other programming languages like C, that in literal and printed strings, \ is an escape character. So e.g. "\n" means the newline character ASCII 11. "\r" means the return character ASCII 13. And so on.


greg
2018-3-24 15:03:36

They’re actually single characters.


greg
2018-3-24 15:04:03

And if you want \, then you use two of them, "\\".


greg
2018-3-24 15:05:53

For instance, try (car (string->list (list->string (list #\\)))). It prints #\\.


greg
2018-3-24 15:06:52

@dmitryhertz Does that help or am I misunderstanding your question?


dmitryhertz
2018-3-24 15:07:41

Hm, when I try to eval (displayln (list->string '(#/ #\1 #\\ #\2 #/ #\3 #\\ #\4 #/ #\5 #\\))) every backslash behaves itself as expected. So, the result is /1\2/3\4/5\.


dmitryhertz
2018-3-24 15:08:47

I meant above, the problem didn’t exist at all. It was my misunderstanding.


greg
2018-3-24 15:08:57

As well as displayln, try print.


dmitryhertz
2018-3-24 15:09:01

@greg Sorry please, all is okay.


dmitryhertz
2018-3-24 15:09:20

Ok, I’ll try print right now


dmitryhertz
2018-3-24 15:09:56

(print (list->string '(#/ #\1 #\\ #\2 #/ #\3 #\\ #\4 #/ #\5 #\\))) the result is "/1\\2/3\\4/5\\".


greg
2018-3-24 15:10:57

So print shows you it the same as you’d write it as a Racket literal string — e.g. \\.


greg
2018-3-24 15:11:19

display shows you the “result” when displayed — e.g. \.


greg
2018-3-24 15:11:35

Maybe I’m explaining the distinction badly here but hopefully you get the idea. :slightly_smiling_face:


greg
2018-3-24 15:11:52

Once in awhile it can be confusing.


dmitryhertz
2018-3-24 15:12:28

@greg your explanation is great! Seriously. Thank you! )


greg
2018-3-24 15:12:44

Great! Have fun.


me1
2018-3-24 17:55:09

Does ; before #\| turn off the multi-line commenting in Racket? It seems to in mine.


iam
2018-3-24 17:58:14

@iam has joined the channel


hellochazcampos
2018-3-24 23:39:28

@hellochazcampos has joined the channel