spdegabrielle
2020-6-12 09:21:43

Rack-a-thon? (feedback please)


dcmicoltacespedes
2020-6-12 13:02:06

@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.


spdegabrielle
2020-6-12 13:30:08

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


laurent.orseau
2020-6-12 13:30:47

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)


samth
2020-6-12 13:31:50

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


laurent.orseau
2020-6-12 13:32:18

Thanks Sam, same here


spdegabrielle
2020-6-12 13:33:27

osx 7.7 no tooltiip


spdegabrielle
2020-6-12 13:36:08

Maybe I misunderstood - hovering on it1


laurent.orseau
2020-6-12 13:41:03

No I meant when you run the code :)


spdegabrielle
2020-6-12 13:42:40

thats embarrasing. no tooltip.


laurent.orseau
2020-6-12 14:24:21

Any Windows users?


me1884
2020-6-12 14:48:44

@me1884 has joined the channel


me1884
2020-6-12 14:49:24

Hello


me1884
2020-6-12 14:49:49

Is the bytecode signature documented somewhere?



me1884
2020-6-12 14:50:42

Let’s see…


spdegabrielle
2020-6-12 14:52:13

I thought zo goes away for cs?


me1884
2020-6-12 14:53:17

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


me1884
2020-6-12 14:53:48

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?


badkins
2020-6-12 14:54:48

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?


me1884
2020-6-12 14:56:03

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


me1884
2020-6-12 14:57:56

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))]))


me1884
2020-6-12 15:00:06

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


me1884
2020-6-12 15:01:27

I’ll just hardcode the two.


samth
2020-6-12 15:02:48

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


me1884
2020-6-12 15:03:32

linklet?


samth
2020-6-12 15:04:27

yes


spdegabrielle
2020-6-12 15:04:56

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


badkins
2020-6-12 15:13:19

:thumbsup:


evyatar2013
2020-6-12 15:25:20

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


greg
2020-6-12 15:29:38

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?


greg
2020-6-12 15:30:38

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).



greg
2020-6-12 15:32:01

@byron ^


greg
2020-6-12 15:38:04

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.


greg
2020-6-12 15:38:20

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


greg
2020-6-12 15:38:26

:smile:


laurent.orseau
2020-6-12 15:39:00

evyatar2013
2020-6-12 15:39:30

Thanks!


laurent.orseau
2020-6-12 15:39:44

badkins
2020-6-12 15:47:29

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.


badkins
2020-6-12 15:47:48

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


bedeke
2020-6-12 16:11:03

also nothing…


spdegabrielle
2020-6-12 16:47:36

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





bedeke
2020-6-12 19:18:01

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


soegaard2
2020-6-12 19:18:26

@leif ^


leif
2020-6-12 19:19:30

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


leif
2020-6-12 19:20:00

The clip function can work with images.


leif
2020-6-12 19:20:20

If you want text I could probably put that together.


leif
2020-6-12 19:20:46

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.


leif
2020-6-12 19:20:51

If that makes any sense?


bedeke
2020-6-12 19:21:15

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


bedeke
2020-6-12 19:21:33

thanks


leif
2020-6-12 19:22:00

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


leif
2020-6-12 19:25:23

Thanks for tagging me @soegaard2 :slightly_smiling_face:


bedeke
2020-6-12 19:27:26

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


laurent.orseau
2020-6-12 20:09:26

Thanks. Also, intriguing.


notjack
2020-6-12 23:09:19

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.


sorawee
2020-6-12 23:42:54

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.


samth
2020-6-12 23:59:43

What does shlex do?


samth
2020-6-13 00:01:07

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


sorawee
2020-6-13 00:01:08

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


sorawee
2020-6-13 00:01:17

and quote arguments


sorawee
2020-6-13 00:02:41

looking at Rash right now


sorawee
2020-6-13 00:03:33

> 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


samth
2020-6-13 00:04:44

But I do not think such a thing already exists


byron
2020-6-13 05:19:00

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.


byron
2020-6-13 05:20:09

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