
Rack-a-thon? (feedback please)

@sanchom. I did this part, I was thinking about it going through the spaces of struct-piece.
So there, if we talk about the first one in the list it would be (make-piece 0 0) and search space1-> 0 and space2-> 0
I don’t know if I’m explaining well. This is the error appears to me: first: contract violation
expected: (and / c list? (not / c empty?))
given: '()
Although, I also don’t know, if that program is doing what I want it to do, that it return the piece higher of a list. Thanks.

on racket discord: https://discordapp.com/channels/571040468092321801/618895179343986688/720983802532593694 > erkin Today at 13:52 > I’m writing a patch for file(1)
to add Scheme file types and I have a question > If a file begins with #lang
, should it be treated as application/x-racket
, text/x-racket
or text/x-script.racket
? > I can, of course, add additional constraints like #lang typed
and #lang racket
. > > erkinToday at 14:24 > How does this look? # Racket #lang directive
0 string \#lang\ Racket source code
!:mime text/x-racket
>6 string scheme MzScheme program text
!:mime text/x-scheme
>6 string racket Racket program text
!:mime text/x-racket
!:ext rkt
>6 string typed Typed Racket program text
!:mime text/x-racket
!:ext rkt
>6 string scribble Scribble document
!:ext scrbl

With the code below, when you click on Help! then hover on the menu item, does it display a tooltip? (what OS are you using?) #lang racket/gui
(define fr (new frame% [label "frame"] [width 200] [height 200]))
(define menu-bar (new menu-bar% [parent fr]))
(define menu (new menu%
[parent menu-bar]
[label "Help!"]))
(define it1 (new menu-item% [parent menu]
[label "item"]
[help-string "Help me!"]
[callback void]))
(send fr show #t)

I don’t get a tooltip. I’m on Linux/Ubuntu 20.04, with 7.7.0.4.

Thanks Sam, same here

osx 7.7 no tooltiip

Maybe I misunderstood - hovering on it1

No I meant when you run the code :)

thats embarrasing. no tooltip.

Any Windows users?

@me1884 has joined the channel

Hello

Is the bytecode signature documented somewhere?


Let’s see…

I thought zo goes away for cs?

So, it’s #~[version length byte][version string][VM length byte][VM string]D

If zo files won’t be in Racket CS, would it be safe to assume that it’s essentially #~[version length byte][version length]6racketD
?

From Stephen’s message above, I see that, in addition to mailing list(s), IRC and Slack, we also have Discord. I can understand why both IRC and Slack exist from a UX perspective. Can someone help me understand why having both Slack and Discord is important?

Some people only use Discord and not Slack, and vice versa. :-)

Hmm, this is further complicating matters… (define (zo-marshal-bundle-to top outp)
(case (hash-ref top 'vm #f)
[(#"racket" #f)
(zo-marshal-racket-bundle-to (hash-remove top 'vm) outp)]
[(#"linklet")
(write-bundle-header #"linklet" outp)
(s-exp->fasl (hash-remove top 'vm) outp)]
[(#"chez-scheme")
(write-bundle-header #"chez-scheme" outp)
(define bstr (hash-ref top 'opaque
(lambda ()
(error 'zo-marshal "missing 'opaque for chez-scheme virtual-machine format"))))
(write-bytes (integer->integer-bytes (bytes-length bstr) 4 #f #f) outp)
(write-bytes bstr outp)]
[else
(error 'zo-marshal "unknown virtual machine: ~a" (hash-ref top 'vm #f))]))

Yeah, raco make
does generate #~37.711chez-schemeD
under Racket CS.

I’ll just hardcode the two.

there’s a third format, which is what you get for platform-independent files

linklet
?

yes

Discord is ‘not official’ and I try to drive people to racket-users slack or irc

:thumbsup:

Is there a repo of available drracket plugins anywhere? I looked around but I mostly found results for how to write my own plugins

It’s been years but I glanced at the code and it seems I defined a logger. Have you tried setting the http
logger to show 'debug
level?

Looks like a characterization of the request method, path, and headers. Not the exact bytes sent (for that I guess use some network tool for your OS, like tcpdump or wireshark or whatever).

What I’m looking at: https://github.com/greghendershott/http/blob/master/http/request.rkt#L421-L427

@byron ^

If only there were some way to communicate where people could use various clients, and also use various servers not all controlled by just one company — but still all see the same messages.

I don’t know, it sounds impossible. But maybe someday it will be invented!

:smile:


Thanks!


I have an affinity for IRC, and my love for simplicity drew me to Scheme, then Racket, but I have to admit Slack has some niceties despite being super bloated. Code formatting & threads can be handy.

Bottom line is I’m willing to subordinate my preferences to use whatever the community has “chosen” :slightly_smiling_face:

also nothing…

I also try to drive other social media activity like fb, stack overflow (if unanswered) and reddit to racket users.

The tag is another way to search https://pkgd.racket-lang.org/pkgn/search?tags=drracket\|https://pkgd.racket-lang.org/pkgn/search?tags=drracket



Hello, in lang video, is there an easy way to insert frames made from text or an image?

@leif ^

@bedeke Image yes, text no. (Not yet anyway)

The clip
function can work with images.

If you want text I could probably put that together.

Although one thing you could do is combine video with the pict
library ro convert the text to an image, and put that into a video.

If that makes any sense?

ok, great! I missed that it could take images. That was my plan if there was no direct text option.

thanks

I’d be happy to add a text option. Just not yet sure what a good API would be.

Thanks for tagging me @soegaard2 :slightly_smiling_face:

I think an example using pict might be better than implementing all the possibilities to format text…

Thanks. Also, intriguing.

sometimes separation is a feature rather than a bug - the Discord userbase is very different from the Slack one. I don’t think a message bridge between the two would be useful.

Is there Python’s shlex
equivalent in Racket? I need one for work, so if there’s none, I will create it. Just want to make sure I’m not reinventing the wheel.

What does shlex do?

Ah, having looked, I bet something from rash would be useful

One common task is to split a command in shell to arguments that can be passed to system*

and quote arguments

looking at Rash right now

> Rash, adj 1. Hurrying into action or assertion without due caution and regardless of prudence, hasty, reckless, precipitate. “A rash programmer is likely to produce shell scripts.” That’s gold

But I do not think such a thing already exists

Thank you, that’s very helpful. I should have gone to the source code myself. I’ve been working in some less transparent systems, and I forget that everything is available in Racket.

The other approach I thought of was setting up a simple web-server and logging what comes in.