
@kokou.afidegnon has joined the channel

hi all,

how do i launch the custom html browser with this package ? https://docs.racket-lang.org/browser/index.html

i can’t find a working example

i was able to draw a GUI but how do i incorporate the browser library?

@alexender Run this program in DrRacket: #lang racket
(require browser)
(open-url "<http://www.google.com>")

Don’t expect too much. The browser library is very old. It doesn’t handle JavaScript.

yes, i just noticed that now

is there an alternative? or any way to render Js as well?

send-url
will open the user’s web browser

i am looking for a way to manipulate the DOm nodes

Day 2 starts in about 40 minutes: https://www.youtube.com/watch?v=dnz6y5U0tFs

No professional videographers today, though

@pocmatos @soegaard2 (or others watching online): please let us know about problems with the video/audio today, since it’s just us with Matthew’s laptop

Will do.

@soegaard2 how is it currently?

There is sound.

great

This is the hackathon page I mentioned: https://github.com/racket/racket/wiki/Racket-Hackathon-2019

Hey all. How would I remove multiple keys from an immutable hash table? I wasn’t able to find anything about it in the documentation, so I made my own procedure for it, but I still think there’s probably something in the stdlib, which does this, it’s just that I haven’t found it.

@dnaeon there’s not a std library function that does that

we’d call it hash-remove*
though :slightly_smiling_face:

@jeapostrophe FYI I added a section to the hackathon wiki linking to a checklist of data-science related issues in the repo I’ll be working on

also I think we should call that hash-remove-all
:P

remq
vs remq*

We use *
more than -all
as a suffix

And my favorite color is Orange

I think we shouldn’t do that in new APIs. It’s difficult to learn (especially for beginners) and not discoverable.

and my favorite color is blue

which, coincidentally, I’m pretty sure is chromatically opposite to orange

at least *
won’t conflict with our new, buttery infix syntax, since the multiplication operator will surely be ×

@samth @jeapostrophe thanks, that means I didn’t overlook the documentation :slightly_smiling_face: do you think submitting a PR for such a function makes sense?

Yes

Thanks for streaming Flatt’s talk. It worked great.

Indeed! Thanks to @mflatt for the shoutout to the newsletter!

And thank you @pocmatos for writing the newsletter!

Here’s the wiki page for the racketcon hackathon: https://github.com/racket/racket/wiki/Racket-Hackathon-2019

Here’s something related to what I’ll be working on for the data science hackathon: > (require rebellion/streaming/reducer)
> (reduce into-sum 1 2 3 4 5)
15
> (reduce-all into-sum (in-range 1 100))
4950
> (define into-product (make-fold-reducer * 1))
> (reduce-all into-product (in-range 1 20))
121645100408832000
> (for/reducer into-product
([n (in-range 1 20)]
#:when (even? n))
n)
185794560
> (define-syntaxes (for/product for*/product)
(make-reducer-based-for-comprehensions #'into-product))
> (for/product ([n (in-range 1 20)]
#:when (even? n))
n)
185794560

(If you want to ask me about it, I’m sitting at the leftmost table in the front row - come say hi!)

:wave: from SLC Airport. Thanks all for this incredible week. Kind of a shame that I had to leave before the hacking started. Maybe I can make it to one of the european meetups.
(also, I really should find whether there’s appetite for racketeers to meet up in Scotland. I know there’s some meetups in Edinburgh)

My first reaction to the “lets change the syntax” proposal was btw “I hate it” :wink:. If I have a more substantiated opinion I’ll post it on the github/mailinglist as appropriate

hi, apart from the browser
package in racket, what do you suggest? i m trying to create a sort of DOM node builder where clicking on a particular html element should give a hint of a specific source code, which can be manipulated via macros…. something a la dreamweaver

Just made https://github.com/racket/racket/wiki/Data-Science - can anyone suggest relevant racket packages and other resources; example code, demos, blog posts, etc.?

neilv’s csv pkg?



Awesome thank you

FWIW if anyone want to write a matrix library using BLAS: https://lists.racket-lang.org/users/archive/attachments/20130120/14127529/attachment-0001.obj

Also if you need an idea for a math-related Racket project: pick something from https://github.com/racket/racket/wiki/Math-Library-Features

How do you test a change to a pkg that you’re modifying a clone of? I’m changing pict, but when I build the docs, it’s already downloaded and installed pict in /root/.racket/7.3/pkgs/pict-*

Is there a way to make a template-metafunction act like a conditional?
Like an ~if
metafunction that would act like this: {~if c t e}
to produce t
if c
is true, and e
if c
is false.
And is there a way this can work if either t
or e
(whichever one wouldn’t be used) has an attribute value of false? (syntax-parse #'(1 2)
[{~or {~and (a) {~parse c #true}} {~and (a b) {~parse c #false}}}
#'{~if c a b}])
;=> 2
(syntax-parse #'(1)
[{~or {~and (a) {~parse c #true}} {~and (a b) {~parse c #false}}}
#'{~if c a b}])
;=> 1
I want it to “short circuit” in the same way that if
short-circuits and only evaluates the branch it needs to

@alexknauth Template metafunctions are metafunctions, not macros, so I think the answer is “no,” you can’t make it short-circuiting like that. I’d like to have “template transformers,” and to be honest those seem more useful than metafunctions to me, but I don’t believe anything like that exists.

How would template transformers help with something like ~if
?

Oh, perhaps you’re right, maybe they wouldn’t help on their own. I was thinking they could expand into something with unsyntax
. I don’t know if that is wise or not.

I guess expanding into unsyntax
wouldn’t work if you’re under ellipses. I’ve wanted an ~if
before, so maybe baking it in would be a good idea. There’s probably a more general solution, but I don’t know if it’s worth it.

Maybe it would be enough to have a ~delay
built in somehow, with metafunctions able to force sub-syntax-objects

done. Thank you.

done. Thank you

Not added to wiki. not quite sure how to put it in.

@soegaard2 My suggestion would be to pop it in a repo on github with a little readme on contributing. Does that sound reasonable? I can do it for you but thought it should be your repo.

I’d like to know the answer to this too.

You want to have the version of the package that you’re modifying be the one that’s installed

See raco pkg update —clone

@alexknauth no, you can’t do that with template metafunctions. It wouldn’t be hard to add something like ~if
directly if there’s a good justification for it, but I don’t want to gradually slide into creating a general-purpose programming language within syntax templates. (eg, “you know, ~if
would be a lot more useful if we also had ~let
…”)

Would something like ~delay
be a reasonable addition?

It’s already felt like most of a general-purpose language. :) But then I was under the misconception that template metafunctions were transformers, so I suppose my feelings were miscalibrated. XD

What does it mean when a module path index prints like #<module-path-index='vector[7223]>
, and module-path-index-split
returns (values #f #f)
, and module-path-index-submodule
returns #f
?

used the flight to do some hacking on his GAP language implementation and made it more elegant

well at least I think I made it more elegant

I could even debug macros now and not just randomly poke at them until it seemed to work. go racket school!