dmitryhertz
2019-11-22 08:29:43

Hi colleagues! I’ve a question about bytes-length function. Which level is it implemented in? C or Rkt? I just trying to decode ucs2 bytestrings and use this fn to tell to let loop construction when it should start. Maybe I shouldn’t use bytes-length at all here.)


dmitryhertz
2019-11-22 08:30:50

I like dark themes, the light ones burn my eyes. Where did you activate the dark mode?


pocmatos
2019-11-22 10:40:58

Can I help you here? Which problem are you seeing? I am also on archlinux and see no problems. Also, racket does not use upstream chez. There’s a special version of chez to use as a racket backend.


dmitryhertz
2019-11-22 10:46:47

Hello! :slightly_smiling_face: I expect to see a racketcs binary near the traditional one. racket racketcs For this I write make both in PKGBUILD. After compilation I run: tar tf ./packages/racket-7.5-75-x86_64.pkg.tar.xz \| grep '/bin/' But there is no racketcs in the list of binaries. Something I do wrong probably.


dmitryhertz
2019-11-22 10:47:52

Thank you a lot in advance! I’m reading the configurations on github you wrote for CI. Maybe it will help. )


dmitryhertz
2019-11-22 10:52:21

https://docs.racket-lang.org/racket-build-guide/build.html

> 1.6 More Instructions: Building Racket on Chez Scheme > … > Use make both to build both traditional Racket and Racket on Chez Scheme, where packages are updated and documentation is built only once (using traditional Racket).


samth
2019-11-22 13:55:54

@dmitryhertz bytes-length in traditional Racket is implemented in C, you can see the implementation here: https://github.com/racket/racket/blob/master/racket/src/racket/src/strops.inc#L233 (unfortunately a little obscured by preprocessor-based abstraction). On Racket CS it’s just the Chez primitive bytevector-length, which is implemented in some way I can’t immediately find.


asumu
2019-11-22 14:31:04

One of my Racket CS builds errored with nonrecoverable invalid memory reference during raco setup. Does this seem like a known problem? (buildlog: https://gist.github.com/takikawa/83cf5e31304d69578da8122f0a133139)


pocmatos
2019-11-22 14:43:16

I have seen that before but I thought that was fixed before 7.5 branching.


pocmatos
2019-11-22 14:43:22

Or at least partially fixed.


pocmatos
2019-11-22 14:44:42

pocmatos
2019-11-22 14:44:53

mine didn’t say they were nonrecoverable though.



castro.mbithii
2019-11-22 15:23:37

@castro.mbithii has joined the channel


asumu
2019-11-22 15:46:23

Interesting, so I restarted my erroring build figuring it was intermittent but it happened on the 2nd build on launchpad too. So maybe it is reproducible on Ubuntu 14.04, may try that in a VM later.


bill_temps
2019-11-22 16:03:45

@mark.warren Dark mode: you can use Preferences…, Colors, Color Schemes, White on Black (in DrRacket 7.5; I’m not sure when this was introduced). Unfortunately, that results in a lot of dark blue and dark gray on a black background, which I find very hard to read. However, it is possible to tweak the colors. Under REPL, I was able to change the color of output to something other than dark blue. (My own preference is white text on a dark blue background; all this black is depressing.) Maybe some helpful volunteers will come up with some additional color schemes. https://docs.racket-lang.org/drracket/color-scheme.html


pocmatos
2019-11-22 16:18:43

@asumu if you need a hand, let me know and I will give it a go as well.


deactivateduser60718
2019-11-22 16:47:55

What’s the relationship between loggers and places? More specifically, what happens if a place logs an event using data that’s not allowed on a place channel?


deactivateduser60718
2019-11-22 16:49:01

Intent: I want to aggregate log events from several build processes, where each build runs in a place. Not every event would have values that pass place-message-allowed?


deactivateduser60718
2019-11-22 17:06:18

It doesn’t look like the message even makes it. The test shown here only passes if you uncomment the (emit) line. Does this mean illegal-message implicitly tried to cross over a place channel?

#lang racket (define illegal-message object%) (define logger (make-logger)) (define (emit) (log-message logger 'info "" illegal-message)) (define (make-place) (place ch (emit))) (module+ test (require rackunit) (define receiver (make-log-receiver logger 'debug)) ; (emit) (void (place-wait (make-place))) (match (sync/timeout 0.2 receiver) [(vector _ _ v _) (check-eq? illegal-message v)] [#f (fail "timeout")]))


deactivateduser60718
2019-11-22 17:14:08

https://docs.racket-lang.org/reference/places.html?q=place#%28part._place-logging%29 suggests the answer is yes since there’s a prefab structure used for the 'place logger, but even if I bind illegal-message to a valid message for a place channel, the test still fails. It’s like it doesn’t even bother to process log messages.


deactivateduser60718
2019-11-22 17:15:23

What am I missing?


dmitryhertz
2019-11-22 17:58:38

Thank you all a lot! :slightly_smiling_face:


samdphillips
2019-11-22 18:20:07

If you use OSX and have the OS setting turned on it will be enabled.


samdphillips
2019-11-22 18:21:50

On OSX in System Preferences>General there is a setting between Dark/Light. DrRacket will pick up that setting.

I don’t know which version of OSX you need I’m on Mojave.


samdphillips
2019-11-22 18:26:49

I wonder if those are two distinct loggers? One for the parent place and one for the child?


deactivateduser60718
2019-11-22 18:38:03

Sounds right. From https://docs.racket-lang.org/guide/parallelism.html#%28part._effective-places%29 I thought that the dynamic-require of the enclosing module meant that said module was not instantiated again. But if it’s a whole new VM, then it makes sense that they wouldn’t share modules. Am I right in saying that everything that can go wrong using C’s fork can happen in places?


notjack
2019-11-22 19:06:03

You’re correct, It’s a whole new vm and a whole new set of module instantiations.


notjack
2019-11-22 19:06:34

I would guess that fork and places don’t mix well but I have zero experience to base that suspicion on.


deactivateduser60718
2019-11-22 19:28:02

I guess I’ll just have to not try to hack my way around place channels :)


samdphillips
2019-11-22 19:30:50

One thought is that you could have the parent place send a place channel specifically for log messages and make a log receiver in the child place that forwards the messages. If you need to send non-place-channel-able data you would still be stuck though.


deactivateduser60718
2019-11-22 19:31:45

Yep. It seems that if I want to do that, I’d have to hand-roll a custom protocol.


blerner
2019-11-22 21:48:54

Is there an easy way to migrate the raco link ... packages from 7.4 to 7.5? From inside DrR, in the Package Manager, it doesn’t show the raco link’ed packages as things that can be migrated.


samth
2019-11-22 21:52:59

@blerner the short answer is don’t use raco link. I think the long answer is “no”


blerner
2019-11-22 21:53:22

hmm, I think your shorter answer is longer than your long answer :wink:


blerner
2019-11-22 21:54:19

in my case, I have a bunch of helper code in my lecture notes, which is mostly scribble plus some other reader stuff for syntax highlighting. every time I update racket, I have to remember to re-link that syntax highlighting stuff, to get the reader to work…


blerner
2019-11-22 21:54:38

it’s not stable or standalone enough to warrant being a package of its own, so it lives in my lecture-notes repo


samdphillips
2019-11-22 22:14:30

You can make it a package that you just don’t publish


samdphillips
2019-11-22 22:15:43

I have linked packages that raco pkg migrate have worked on fine.


spdegabrielle
2019-11-22 22:55:26

racket–2019-gamejam Submissions due in 7 days 2 hours 9 minutes 57 seconds Join jam https://itch.io/jam/racket-2019-gamejam


hrj.nzym
2019-11-22 23:40:46

@hrj.nzym has joined the channel


sorawee
2019-11-22 23:51:47

Hmm. Who is core-code? https://github.com/core-code


sorawee
2019-11-22 23:52:11

This account upgrades Racket to 7.5 in Homebrew


willbanders
2019-11-23 00:03:59

I’m basing things off of this example for using ~optional with defaults (specifically for syntax classes).

> (syntax-parse #'(m #:foo 2 a b c) [(_ (~optional (~seq #:foo x) #:defaults ([x #'#f])) y:id ...) (attribute x)]) How is this extended when x is another custom syntax class that has multiple attributes? I tried something along the lines of the following, but that doesn’t seem to be it.

(~optional (~seq s:custom-syntax-class) #:defaults([s.a #'null] [s.b #'null]))


sorawee
2019-11-23 00:35:23

As I understand, you need to push ~optional inside the syntax class.


sorawee
2019-11-23 00:35:35

Note that if you want to parameterize it, syntax class can accept arguments


willbanders
2019-11-23 01:27:03

It is in the syntax class. But I don’t know how to do defaults when the type of the default is another syntax class, because somehow I have to make something which is equivalent to that syntax class.


willbanders
2019-11-23 01:28:06

I tried extracting the inner components out using #:with, and now I have something like this:

(pattern (~seq (~optional (~seq l:bound2 #:with lv l.v #:with li l.i) #:defaults([lv #'null] [li #'null]))


willbanders
2019-11-23 01:28:18

This gives the error duplicate attribute at l.v


jesse
2019-11-23 05:33:02

the docs at http://docs.racket-lang.org\|docs.racket-lang.org still seem to be at 7.4 (if you look at the little “v.7.4” in the upper left)