Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-12 Thread Simon Schlee
Another approach might be to use multiple editor-snip% https://docs.racket-lang.org/gui/editor-snip_.html within a pasteboard% https://docs.racket-lang.org/gui/pasteboard_.html Or possibly together with other snip instances, I currently don't have the time to experiment with it and no

Re: [racket-users] Re: Racket News - Issue 34

2020-07-07 Thread Simon Schlee
yes it works again! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit

Re: [racket-users] Re: Racket News - Issue 34

2020-07-07 Thread Simon Schlee
> I think you probably went to www.racket-news.com, but you should go to > racket-news.com (without the www) instead. > With or without www I get a certificate error, when I ignore the certificate I get a 502 from gitlab. With different browsers and curl all give me the same responses. Does

[racket-users] Re: Racket News - Issue 34

2020-07-07 Thread Simon Schlee
When I ignore the certificate error I get a gitlab styled 502 response code. I wanted to read the news so I found the gitlab repository and within it this markdown file: https://gitlab.com/racket-news/racket-news.gitlab.io/-/blob/master/_src/posts/2020-07-06-issue34.md Posting this in case

[racket-users] Re: Racket News - Issue 34

2020-07-07 Thread Simon Schlee
I am getting an error message for the https certificate: Websites prove their identity via certificates. Firefox does not trust this > site because it uses a certificate that is not valid for racket-news.com. > The certificate is only valid for the following names: *.gitlab.io, > gitlab.io >

Re: [racket-users] Should I stop sending packages to the catalog?

2020-06-20 Thread Simon Schlee
Declaring the dependencies explicitly is good in a lot of cases, but I guess there are cases where it is unnecessary. If you do decide to create the uber package you can create the info.rkt, `raco pkg install` the package and then use `raco setup --fix-pkg-deps --unused-pkg-deps ` to let setup

Re: [racket-users] Should I stop sending packages to the catalog?

2020-06-20 Thread Simon Schlee
> What I'd like to do is to create a personal catalog that represents the > packages I currently have installed, but it doesn't appear there's a super > easy `raco pkg` command to do that - I still need to research a bit. > raco pkg archive --help Create catalog from installed packages

Re: [racket-users] Re: local variables are hyperlinked inscribble/manual

2020-06-13 Thread Simon Schlee
I struggled with a similar case, in my case the easiest/simplest solution was to use: @var[identifier] instead of @racket[identifier] (this works well for function arguments, but might not work for your case)

Re: [racket-users] raco setup --only-docs Is there something like this?

2020-06-02 Thread Simon Schlee
This cuts the time down from 6-7 seconds to 2-3 seconds for me, that is great, thank you! previous: time raco setup --doc-index --no-pkg-deps layout 6.85s user 1.29s system 209% cpu 3.888 total now: raco setup -n -j 1 --doc-index --no-pkg-deps --avoid-main layout 2.31s user 0.47s system 99%

[racket-users] raco setup --only-docs Is there something like this?

2020-06-02 Thread Simon Schlee
Hello, I like that I can run: raco setup --doc-index my-collection-name and it builds the documentation and makes it searchable on my local machine. But I was wondering if there is a way to speed-up/skip some of the usual setup stuff that happens before building the documentation? Should I

[racket-users] pkgs.racket-lang.org Why are the links so inconsistent?

2020-05-26 Thread Simon Schlee
Hello, searching through a bunch of different packages I noticed that the code/download links are quite inconsistent. For some packages there is a download button clicking that button does nothing (in firefox) because it contains a git:// protocol url, here is an example package:

[racket-users] Re: Is it possible to make submodules with private names?

2020-05-23 Thread Simon Schlee
I think pollen uses racket's compiled directories to store some of its own cached/generated code, maybe a similar technique could be helpful for you. Do you want to create submodules for arbitrary modules or only for modules using a certain library or language? When its the latter I think its a

Re: [racket-users] How to run multiple Racket installations?

2020-05-09 Thread Simon Schlee
You could use the nix package manager https://nixos.org/nix/ it runs on many linux platforms and macOS. It has predefined racket and racket-minimal packages, you can define derived versions of those packages and adapt them to your needs. It allows you to easily switch between different

[racket-users] Re: On the importance of testing for noobs - or 'there's no such thing as a stupid test'.

2020-05-04 Thread Simon Schlee
And use contracts. I can't claim that all my code uses contracts everywhere, but when I encounter unexpected/bewildering behavior I add contracts to break those chains of "piped functions". You can start with define/contract for ease of use. Later on you can put functions that belong together

[racket-users] Re: bitmap% performance

2020-04-23 Thread Simon Schlee
Hi, have you tried using read-bitmap? https://docs.racket-lang.org/draw/Drawing_Functions.html?q=read-bitmap#%28def._%28%28lib._racket%2Fdraw..rkt%29._read-bitmap%29%29 Personally I have only used the second constructor that takes a parameter named "in" here:

[racket-users] Re: Lightweight, lazy trees (new package)

2020-04-22 Thread Simon Schlee
Hi Sid, this looks like a nice, clean, simple to use interface, that could replace some of my adhoc tree traversals hidden within, some of my code. I am looking forward to playing around with it and seeing where I can use it, thank you for creating it! Have a great day! Simon -- You received

[racket-users] Re: window on-move / move inconsistency: is this a bug?

2019-12-02 Thread Simon Schlee
Yes, when I put on my pragmatic thinking hat, I certainly agree with you. But it also makes me think about whether I should create a utility library which does a more abstracted window placement and restoring. That library would care more about logical "human" positioning and for example snap to

[racket-users] Re: window on-move / move inconsistency: is this a bug?

2019-12-01 Thread Simon Schlee
created an issue for this: https://github.com/racket/gui/issues/149 -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com.

Re: [racket-users] question re downloading a PDF file

2019-11-25 Thread Simon Schlee
Hello, call-with-output-file and copy-port makes this task easier. Took me a while before I found out about copy-port, too. Maybe there are a few places in the documentation that should have explicit mentions of it. #lang racket (require net/url) (define/contract (download-file uri

[racket-users] window on-move / move inconsistency: is this a bug?

2019-11-21 Thread Simon Schlee
Hello, I am writing a gui application it is supposed to save the position of the window and upon restart restore the position. For this I get the position via overriding the on-move method of frame%. Upon restoring I call (send frame move x y). The problem is that on my system (linux manjaro

Re: [racket-users] Modeling a context-sensitive evaluation context with PLT Redex?

2019-11-10 Thread Simon Schlee
I have no experience with Redex (it is one of the things I want to get more familiar with in the future), but I happened to watch this talk: "Finding bugs without running or even looking at code" by Jay Parlar https://www.youtube.com/watch?v=FvNRlE4E9QQ Maybe a tool like this is interesting to

[racket-users] Re: Mandelbrot set compute pipeline functional in racket-vulkan

2019-11-03 Thread Simon Schlee
Thank you, for creating this! Currently I am still using opengl for my projects, until I have time to learn vulkan and port to it. I created a pull request which saves the image via a bitmap% to get rid of the external `convert` program. -- You received this message because you are subscribed

Re: [racket-users] Efficient idiom for converting key-set of a hash-map into a hash-set

2019-10-30 Thread Simon Schlee
Hi Tomas, you say you drain the set, do you remove elements one by one from it? Do you need more from that set than only getting successive elements from it? It seems you are implementing something, which might require going lower level or using different data structures. I am still not really

Re: [racket-users] Efficient idiom for converting key-set of a hash-map into a hash-set

2019-10-30 Thread Simon Schlee
Hi Thomas, it seems to me that you may have a misleading intuition for racket's hash tables. Racket has mutable and immutable hash tables these are implemented differently. Because as a user of hash tables you have to differentiate between mutable and immutable, there are also different hash

[racket-users] Re: horizontal alignment in a message% or equivalent

2019-10-13 Thread Simon Schlee
Another possibility is to set the stretchable-width of the message to #f, this way the message does not take more than its minimal required space. #lang racket/gui (define (example) (define frame (new frame% [label "Alignment example"] [width 400])) (define vbox (new vertical-panel%

[racket-users] Re: My macro works in the global namespace, but fails inside of a let

2019-10-07 Thread Simon Schlee
I meant to write (less confusing): "You say you want to use some definitions in your macro, why not just pass the relevant ones as arguments to your macro?" -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and

[racket-users] Re: My macro works in the global namespace, but fails inside of a let

2019-10-07 Thread Simon Schlee
Your second macro does not work as you expect, because by default macros in racket are hygienic, described roughly that means that a macro only "manipulates" the syntax it is given as arguments, not with the syntax around its invocation. As gfb has mentioned one way to do this is to use

Re: [racket-users] Re: third-party package tips and developer concerns (Was: New version of file-watchers)

2019-09-02 Thread Simon Schlee
Am So., 1. Sept. 2019 um 22:55 Uhr schrieb Neil Van Dyke < n...@neilvandyke.org>: > Simon Schlee wrote on 9/1/19 3:28 PM: > > > > Try not to make identifiers be simple generic terms, like `watch` > > > > > > I strongly disagree with this statement. &

Re: [racket-users] Re: third-party package tips and developer concerns (Was: New version of file-watchers)

2019-09-01 Thread Simon Schlee
> > Try not to make identifiers be simple generic terms, like `watch` > I strongly disagree with this statement. Rackets require possibilities are highly flexible so if you want more specific names use prefix-in and prefix the module name or whatever you like. The way racket does imports is

[racket-users] Re: gen:stream doc fix?

2019-08-27 Thread Simon Schlee
I agree with your explanation and your version. I think nobody expects stream-rest to change the concrete type of stream, unless there is a good reason for it. My guess is that nobody noticed because it happens to work. -- You received this message because you are subscribed to the Google

Re: [racket-users] Scribble text included out of order

2019-08-04 Thread Simon Schlee
I have not completely read this thread in detail, but to me it seems like it could be useful to you, to experiment with pollen and custom tags and try to capture more semantic meaning with those tags. I think you would have an easier time creating templates that layout the code exactly like you

[racket-users] Re: returning GUI elements in function?

2019-07-09 Thread Simon Schlee
Classes are really nice and easy for tasks like this, it took me a little bit to get used to the class syntax, but now I love them. I found that it helps to look at real code that uses classes, because the documentation quickly goes into quite advanced/special use cases. You can use them to

[racket-users] Re: Seeking users to try file monitoring package

2019-06-30 Thread Simon Schlee
After some more reading I think I understand the purpose for watch-directories as a simple way to define callbacks for changes. Maybe it could return a shutdown procedure but I guess using a custom custodian and shutting that down might be easier. -- You received this message because you are

[racket-users] Re: Seeking users to try file monitoring package

2019-06-30 Thread Simon Schlee
I Just had a quick look at the documentation, it states: watch-directories > Starts threads using thread-maker to watch each given directory. Meant > for use with file-watcher procedures, namely apathetic-watch, > intensive-watch, or robust-watch. This will block the current thread > until all

[racket-users] Re: db module 'query' does not return insert-id

2019-04-24 Thread Simon Schlee
> > (require db) > > (define db (postgresql-connect ...args...)) > > (simple-result-info (query db "insert into collaborations (name) values > ('foojalskdsfls')")) > '((insert-id . #f) (affected-rows . 1)) > With postgresql instead of doing a plain insert you can use returning to return your

[racket-users] Re: [how to] search for #lang languages in packages and GitHub?

2019-01-21 Thread Simon Schlee
> > Does anyone know good way to search for Racket #lang languages in packages > and github? (GitHub advanced search is dire) > Maybe this helps you: https://searchcode.com/?q=%23lang=143 -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To

[racket-users] crashing scrollbars (gtk3 bug?)

2018-05-26 Thread Simon Schlee
Hello, while writing this email I found a solution to my problem. By setting the PLT_GTK2 environment variable to: export PLT_GTK2=/usr/lib64/libgtk-x11-2.0.so like described in https://docs.racket-lang.org/gui/libs.html The program runs with gtk2 and no longer crashes (with gtk3 it does for me)