Re: [racket-users] Utah snapshots will switch to CS by default

2020-09-29 Thread Sam Tobin-Hochstadt
How will this affect the pkg-build snapshots? Sam On Tue, Sep 29, 2020 at 3:33 PM Robby Findler wrote: > > I'm finally catching up and switching the Northwestern snapshots to BC by > default. I've made the change and the changes will kick off tonight at > midnight, Chicago time (probably

Re: [racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Sam Tobin-Hochstadt
port->lines produces a list with all the lines in it. That list is what uses all the memory. Using in-lines avoids producing the whole list at once. Sam On Thu, Sep 24, 2020, 8:53 AM Hong Yang wrote: > Thanks Laurent, I tried (in-lines...), and yes, it's memory-efficient, but > I still curious

Re: [racket-users] [racket users] describe variant issue?

2020-09-17 Thread Sam Tobin-Hochstadt
020 at 1:17 PM Kevin Forchione wrote: > > > > > On Sep 15, 2020, at 3:11 PM, Sam Tobin-Hochstadt > > wrote: > > > > This is a difference in behavior between Racket BC and Racket CS, and > > not something in the describe library: > > > > [samth@

Re: [racket-users] [racket users] describe variant issue?

2020-09-15 Thread Sam Tobin-Hochstadt
This is a difference in behavior between Racket BC and Racket CS, and not something in the describe library: [samth@homer:~/work/teaching/c211 (master) racket-7.8] racket Welcome to Racket v7.8. > (struct->vector 5) '#(struct:fixnum-integer ...) > ^D [samth@homer:~/work/teaching/c211 (master)

Re: [racket-users] locally linked package name doesn't match info collection name

2020-09-09 Thread Sam Tobin-Hochstadt
For that, I recommend "Open require path" in the File menu in DrRacket. Sam On Wed, Sep 9, 2020, 9:09 PM Shriram Krishnamurthi wrote: > I'm curious why the Package Manager doesn't also show the collection name > (or plural)? Wouldn't I need that to trace backwards? "This program in > #lang foo

Re: [racket-users] locally linked package name doesn't match info collection name

2020-09-09 Thread Sam Tobin-Hochstadt
This is all as expected. The package name is mystery-language-uploader, but the collection name is mystery-language. The info.rkt entry controls the latter but not the former [1]. If you're linking it on the command line, you can use a command line option to specify the package name to use. [1]

Re: [racket-users] Why is struct/contract so much faster than a guard?

2020-09-02 Thread Sam Tobin-Hochstadt
The issue is that `struct-guard/c` is slow. If you just write a function as a guard it's faster than `struct/contract`. Sam On Wed, Sep 2, 2020 at 3:41 PM Christopher Lemmer Webber wrote: > > I tested the following: > > (struct foo (bar baz) > #:guard (struct-guard/c any/c list?)) > >

Re: [racket-users] Can no longer interactively enter! module from the shell

2020-08-10 Thread Sam Tobin-Hochstadt
al-one-top > ;/Applications/Racket v7.8/share/pkgs/xrepl-lib/xrepl/xrepl.rkt:1493:0 > ;/Applications/Racket v7.8/collects/racket/repl.rkt:11:26 > > > On Monday, August 10, 2020 at 11:09:09 AM UTC-4, Sam Tobin-Hochstadt wrote: >> >> This works for me the way you describe

Re: [racket-users] Can no longer interactively enter! module from the shell

2020-08-10 Thread Sam Tobin-Hochstadt
This works for me the way you describe: ``` [samth@huor:/tmp cs-snap] r -ie '(enter! "x.rkt")' Welcome to Racket v7.8.0.7 [cs]. loading example "x.rkt"> example 5 "x.rkt"> ``` Perhaps there was a problem with 7.3 that you're running into? Can you try with the 7.8 release? Sam On Sun, Aug 9,

Re: [racket-users] Proposal: GitHub Issue Triage Party

2020-08-06 Thread Sam Tobin-Hochstadt
That sounds great. I'm happy to help. I created the #triage channel on slack, which is a good place to chat about this. I'm happy to help people figure out issues that should be closed, or reassigned, as you've started to do. And creating a specific time to work on this would also be great. A

Re: [racket-users] Strange performance behavior

2020-08-05 Thread Sam Tobin-Hochstadt
What's happening here is that your function takes effectively 0 time, but when you ran the first version, there was a GC pause during it (that's why there's the "gc time: 9" there). GC pauses can happen at any time, basically, so it's not something about what your function is doing. Here's a

Re: [racket-users] Advice wanted about new opengl binding

2020-08-04 Thread Sam Tobin-Hochstadt
On Mon, Aug 3, 2020, 7:27 PM Hendrik Boom wrote: > On Mon, Aug 03, 2020 at 02:01:16PM -0400, Philip McGrath wrote: > > Is this what you're looking for? > https://pkgs.racket-lang.org/package/sgl > > > > -Philip > > Yes, looks like it. Is it messing from the index for some good reason? > By

Re: [racket-users] Recommended workaround still the same?

2020-08-02 Thread Sam Tobin-Hochstadt
Yes, I think that's still the best approach. Sam On Sun, Aug 2, 2020 at 4:47 PM Nate Griswold wrote: > > Hello. Ran into some problems with typed racket and define-cstruct when > adding typed racket layer on top of my ffi bindings. > > Is this

Re: [racket-users] Re: Racket CS release plan

2020-08-01 Thread Sam Tobin-Hochstadt
Note that Matthew's point was not about bytecode, but about the machine code in the Racket BC executable vs the machine code in the Chez kernel plus boot files. Especially if you look pre-7.0, there is very little bytecode in the Racket BC executable. Sam On Sat, Aug 1, 2020, 3:46 PM Gustavo

Re: [racket-users] Does Racket interpreter exist?

2020-07-27 Thread Sam Tobin-Hochstadt
A few thoughts on interpreters vs compilers: - somewhere, there has to be an interpreter -- the x86 chip in my laptop is interpreting the x86 code that Racket generates. - there could certainly be a more direct AST-based interpreter for (fully-expanded) Racket. My work on Pycket involved writing

Re: [racket-users] Does Racket interpreter exist?

2020-07-26 Thread Sam Tobin-Hochstadt
Hi, Racket BC (the non-Chez version) does use an interpreter. The pipeline in Racket BC is source code => expanded code => compiled bytecode => interpreter or source code => expanded code => compiled bytecode => JIT compiler => machine code You can turn off the JIT compiler with the

[racket-users] Re: Racket Survey 2020

2020-07-23 Thread Sam Tobin-Hochstadt
A reminder: there's one more week to take the 2020 Racket Survey. We've had fantastic response so far, but we don't want to miss anyone. Fill out the survey here: https://forms.gle/XeHdgv8R7o2VjBbF9 Sam On Tue, Jun 23, 2020 at 12:22 PM Sam Tobin-Hochstadt wrote: > > We’re taking a surv

Re: [racket-users] Re: Combining generators and typed racket

2020-07-22 Thread Sam Tobin-Hochstadt
iterate in there. > > Are there any papers that would be helpful in trying to address this > implementation-wise? > > Nate > > > On Wed, Jul 22, 2020 at 1:56 PM Sam Tobin-Hochstadt > wrote: >> >> Currently, neither `racket/stream` nor `racket/generator` are

Re: [racket-users] Re: Combining generators and typed racket

2020-07-22 Thread Sam Tobin-Hochstadt
Currently, neither `racket/stream` nor `racket/generator` are supported by Typed Racket, unfortunately. Sam On Wed, Jul 22, 2020 at 12:15 AM Nate Griswold wrote: > > Actually, is there any way at all to use lazy lists of things (streams or > generators) in typed racket? > > Nate > > > On Tue,

Re: [racket-users] Replace pre-installed rackunit with git source

2020-07-22 Thread Sam Tobin-Hochstadt
To figure out where things are, I recommend the `raco fc` command, which is in the `raco-find-collection` package. Almost certainly what went wrong is that you installed the cloned `rackunit` directory as a package. Instead, you need to install all the individual sub-directories as packages. To

Re: [racket-users] Embedded racket (cs) question

2020-07-13 Thread Sam Tobin-Hochstadt
My guess, not having looked further than your email, is that when you don't include racket/promise, something is supplying a promise to something else but there are two different instantiations of the promise library, causing the force call from one not to recognize the promise from the other.

Re: [racket-users] Recommended CS replacement for make-sized-byte-string

2020-07-12 Thread Sam Tobin-Hochstadt
Copying is probably the best option -- this is discussed some in the following readme: https://www.github.com/racket/racket/tree/master/racket%2Fsrc%2Fcs%2FREADME.txt Sam On Sun, Jul 12, 2020, 12:16 PM Nate Griswold wrote: > Maybe i have been up too long, but what is the best replacement for >

Re: [racket-users] Gtk initialization failed for display ":0"

2020-07-11 Thread Sam Tobin-Hochstadt
The usual solution to this problem is to use xvfb to create a virtual display, which works great in this situation when the display is not really needed anyway. This is how we run the handin server headless and how all the racket CI works. Sam On Sat, Jul 11, 2020, 12:26 PM Shriram Krishnamurthi

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

2020-07-07 Thread Sam Tobin-Hochstadt
It turns out it was a brief error by gitlab. Sam On Tue, Jul 7, 2020 at 11:42 AM Simon Schlee wrote: > > 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

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

2020-07-07 Thread Sam Tobin-Hochstadt
Ah, it is now no longer working for me (it worked earlier this morning). Sam On Tue, Jul 7, 2020 at 11:03 AM Simon Schlee wrote: > > >> 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

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

2020-07-07 Thread Sam Tobin-Hochstadt
I think you probably went to www.racket-news.com, but you should go to racket-news.com (without the www) instead. Sam On Tue, Jul 7, 2020 at 10:28 AM Simon Schlee wrote: > > I am getting an error message for the https certificate: > >> Websites prove their identity via certificates. Firefox

Re: [racket-users] FYI, build from HEAD fails in realloc()

2020-06-30 Thread Sam Tobin-Hochstadt
It should be fine to do both of those in the same directory. Sam On Tue, Jun 30, 2020 at 4:47 PM 'John Clements' via Racket Users wrote: > > D’oh! Closing the loop on this one… it appears to me that this problem > occurred after running a “make” (that is, a BC make) in a directory in which >

Re: [racket-users] racket-dev problem?

2020-06-26 Thread Sam Tobin-Hochstadt
There are no currently-pending messages for the racket-dev list, so your email has not been caught in a spam filter. I have not seen problems with the list recently. Can you say more about what has happened? Sam On Fri, Jun 26, 2020 at 1:15 PM Jos Koot wrote: > > Sending mail to racket -dev

Re: [racket-users] trying to use futures for some calculations

2020-06-17 Thread Sam Tobin-Hochstadt
wrote: > > At Wed, 17 Jun 2020 10:24:37 -0400, Sam Tobin-Hochstadt wrote: > > - on Racket BC, operations like `+` do indeed block > > ... which mixing, say, fixnum and flonum arguments, but not when > operating on all fixnums or all flonums. > > In this case, it may be the `i

Re: [racket-users] trying to use futures for some calculations

2020-06-17 Thread Sam Tobin-Hochstadt
I have not yet done much investigating on this, but: - on Racket BC, operations like `+` do indeed block, and effectively you need to replace them with lower-level operations that don't (such as `unsafe-fl+`). Typed Racket can help with this, or you can do it all by hand. As you note, that makes

[racket-users] Call for Tutorial Proposals: ICFP 2020

2020-06-16 Thread 'Sam Tobin-Hochstadt' via users-redirect
CALL FOR TUTORIAL, PANEL, AND DISCUSSION PROPOSALS ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming August 23 - 28, 2020 Virtual https://icfp20.sigplan.org/

Re: [racket-users] How to handle conflicts in packages?

2020-06-05 Thread Sam Tobin-Hochstadt
This most likely means that your documentation is in a file with a generic name like manual.scrbl which those packages also use. Sam On Fri, Jun 5, 2020, 11:20 AM David Storrs wrote: > I uploaded a new module, 'thread-with-id', and the package server tells me > that there are conflicts. The

Re: [racket-users] Poor documentation of List*

2020-06-03 Thread Sam Tobin-Hochstadt
`(List* T)` is just `T`. This follows the behavior of the `list*` function, where `(list* 5)` produces 5. You can explore this using the `:type` form at the REPL. For example, ``` > (:type (List* String)) String > (:type (List* String String)) (Pairof String String) > (:type (List* String (List

[racket-users] Call for Submissions: ICFP Student Research Competition

2020-06-02 Thread 'Sam Tobin-Hochstadt' via users-redirect
ICFP 2020 Student Research Competition Call for Submissions ICFP invites students to participate in the Student Research Competition, which will be held virtually alongside the main conference, in order to present their research and receive feedback from prominent members of the

Re: [racket-users] Re: Racket News - Issue 32 is here!

2020-06-02 Thread Sam Tobin-Hochstadt
Sham is designed for very different use cases than Racket -- Racket is general purpose and not easily mapped to a low level language. Sam On Tue, Jun 2, 2020, 2:00 AM Liwei Chou wrote: > Saw this cool paper Sham: A DSL for Fast DSLs >

Re: [racket-users] syntax woe with typed Racket 'let'

2020-06-01 Thread Sam Tobin-Hochstadt
%29 in particular the `rst` production. Sam On Mon, Jun 1, 2020 at 3:09 PM Hendrik Boom wrote: > > On Mon, Jun 01, 2020 at 10:58:09AM -0400, Sam Tobin-Hochstadt wrote: > > Do you perhaps have some other binding shadowing the binding of `:` > > from Typed Racket? That produces the

Re: [racket-users] Re: [racket] Web Framework Benchmarks

2020-06-01 Thread Sam Tobin-Hochstadt
I'm skeptical both of the DB explanation and the multi-core explanation. As you say, the difference between something like Django and Racket is much too large to be explained by that. For example, on the "plaintext" benchmark, Racket serves about 700 req/sec (I get similar results on my machine).

Re: [racket-users] Re: [racket] Web Framework Benchmarks

2020-06-01 Thread Sam Tobin-Hochstadt
I think the biggest thing is that no one has looked at optimizing these benchmarks in Racket. If you tried out running one of these benchmarks and ran the profiler it would probably show something interesting. Sam On Mon, Jun 1, 2020 at 6:43 AM hashim muqtadir wrote: > > A new version of these

Re: [racket-users] syntax woe with typed Racket 'let'

2020-06-01 Thread Sam Tobin-Hochstadt
Do you perhaps have some other binding shadowing the binding of `:` from Typed Racket? That produces the error message you get when I try it. Sam On Sat, May 30, 2020 at 1:32 PM Hendrik Boom wrote: > > I'm sorry to keep pestering this list, but I'm out of my depth with the > detailed syntax

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-26 Thread Sam Tobin-Hochstadt
I think the best way to implement what you describe for a "better version" is as follows: Expand `(instance h1 half-adder-arch)` into something like (define-syntax h1 (half-adder-arch-info)) Where `half-adder-arch-info` is an expansion-time structure describing half-adders. Then the `assign`

Re: [racket-users] inconvenience in typed Racket

2020-05-22 Thread Sam Tobin-Hochstadt
The problem is almost certainly that `Any` is not allowed in `Ffi-type`. What's the definition of `Ffi-type`, and why does `params` have a type that involves `Any`? Sam On Fri, May 22, 2020 at 5:21 PM Hendrik Boom wrote: > > Here's the code it's complaining about. > > `(,@params -> ,rettype) >

Re: [racket-users] Re: Practical HTTP requests?

2020-05-17 Thread Sam Tobin-Hochstadt
I think you may want to use the lower-level 'net/http-client' library, which supports connection reuse and gives more control over the details of redirects. Sam On Sun, May 17, 2020, 11:52 AM fixpoint wrote: > I was under the incorrect impression that net/url did not support HTTP > 1.1. I

Re: [racket-users] Trouble shooting net/http-client

2020-05-15 Thread Sam Tobin-Hochstadt
The source code is here: https://github.com/racket/racket/blob/master/racket/collects/net/http-client.rkt Sam On Fri, May 15, 2020 at 3:57 PM je back wrote: > > I'm having trouble with formatting the #:data parameter to a http-sendrecv > request. If I insert the string literal after #:data

Re: [racket-users] SOLVED BUT needs documentation change: printing structures in typed Racket

2020-05-15 Thread Sam Tobin-Hochstadt
I've updated the docs. On Fri, May 15, 2020 at 10:33 AM Hendrik Boom wrote: > > On Fri, May 15, 2020 at 10:07:31AM -0400, Sam Tobin-Hochstadt wrote: > > Generics are not supported yet; you need to use structure type > > properties, like this: > > > > #lang typed/ra

Re: [racket-users] printing structures in typed Racket

2020-05-15 Thread Sam Tobin-Hochstadt
Generics are not supported yet; you need to use structure type properties, like this: #lang typed/racket/base (: parameter-print : Any Output-Port Any -> Any) (define (parameter-print v p b) (fprintf p "hi\n")) (struct parameter ([type : String] [name : Symbol] [len : (Option String)] [const?

Re: [racket-users] How to avoid all packages when building from source?

2020-05-08 Thread Sam Tobin-Hochstadt
For Racket CS, you'd want `make cs` or `make cs-base`. `PKGS` is what gets built. The `racket/pkgs` directory is packages that are part of the `racket/racket` repository; it includes things like tests, the guide and reference, and a few other packages that make sense to develop in the same

Re: [racket-users] Another futures-related bug hunt

2020-05-08 Thread Sam Tobin-Hochstadt
You will want to do `handle SIGSEGV nostop noprint` when you start gdb. Racket BC uses the SEGV handler to implement the GC write barrier, so you'll want to skip those. Sam On Fri, May 8, 2020 at 9:36 AM Dominik Pantůček wrote: > > Hello, > > On 08. 05. 20 14:27, Matthew Flatt wrote: > > At

Re: [racket-users] How to avoid all packages when building from source?

2020-05-08 Thread Sam Tobin-Hochstadt
The default build installs "main-distribution", which is the same as what you get for a regular (not minimal) Racket install. It does, as you noticed, install a lot of packages. You can do "make base" instead, which installs no packages. Or you can do something like 'make PKGS=drracket' which

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

2020-05-08 Thread Sam Tobin-Hochstadt
This is the tooling I use: https://github.com/takikawa/racket-dev-goodies/ Note that it works primarily with "in-place" installations. Sam On Fri, May 8, 2020, 4:55 AM zeRusski wrote: > I have two builds of Racket on my local machine. Racket CS resides in one > directory and was built with

Re: [racket-users] Futures + threads SIGSEGV

2020-05-02 Thread Sam Tobin-Hochstadt
! > > I'm investigating, too... > > At Sat, 2 May 2020 08:26:10 -0400, Sam Tobin-Hochstadt wrote: > > I successfully reproduced this on the first try, which is good. Here's > > my debugging advice (I'm also looking at it): > > > > 1. To use a binary with debugg

Re: [racket-users] Futures + threads SIGSEGV

2020-05-02 Thread Sam Tobin-Hochstadt
I successfully reproduced this on the first try, which is good. Here's my debugging advice (I'm also looking at it): 1. To use a binary with debugging symbols, use `racket/src/build/racket/racket3m` from the checkout of the Racket repository that you built. 2. When running racket in GDB, there

[racket-users] ICFP 2020 will be held ONLINE Aug 23-28

2020-05-01 Thread 'Sam Tobin-Hochstadt' via users-redirect
The ICFP 2020 organizers would like to announce that the conference and co-located events, originally scheduled for August 23-28, in Jersey City, New Jersey, will now be held online during the same dates. Further information for presenters, authors, attendees, sponsors, and the ICFP community

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

2020-05-01 Thread Sam Tobin-Hochstadt
This is very cool! One question -- for "main-distribution" packages, are you snapshotting the most-recent release catalog? Or pkgs.racket-lang.org? The latter is simpler, but the former is probably needed to make the examples in the README work. Otherwise, if, say, "typed-racket-lib" on May 1

Re: [racket-users] Rhombus project plan

2020-04-30 Thread Sam Tobin-Hochstadt
On Thu, Apr 30, 2020 at 9:09 AM Ben Greenman wrote: > > On 4/29/20, Sorawee Porncharoenwase wrote: > > (Not directly related to Rhombus) Speaking of “how to contribute”, I find > > that it is not friendly at all to setup stuff in order to contribute to > > Racket core and main distribution.

Re: [racket-users] Rhombus project plan

2020-04-29 Thread Sam Tobin-Hochstadt
ut to ask > precisely that, how to contribute to the docs. If there’s JavaScript to make, > I can take a look. I don’t use Slack, is there an alternative? > > Cheers, > > Dex > > > On Apr 29, 2020, at 4:27 PM, Sam Tobin-Hochstadt > > wrote: > > > > Hi

Re: [racket-users] Rhombus project plan

2020-04-29 Thread Sam Tobin-Hochstadt
Hi David, If you ping me on Slack, I'll be happy to walk you through how to make changes to the docs. And maybe you can lend a hand to finally completing https://github.com/racket/racket/pull/874 which I think is mostly a matter of JavaScript programming now. Sam On Wed, Apr 29, 2020 at 9:35 AM

Re: [racket-users] Functions not being linked in scribble

2020-04-28 Thread Sam Tobin-Hochstadt
I believe you're missing a `defmodule` inside test.scrbl. Sam On Tue, Apr 28, 2020 at 11:32 AM David Storrs wrote: > > Here's my test code. I get the test.html file out at the end and, as > expected, the explanation of bar says "Calls foo" with foo in blue with a red > line underneath. What

Re: [racket-users] Typed Racket: Generics and interfaces/subtyping

2020-04-25 Thread Sam Tobin-Hochstadt
Structure type properties are getting better support incrementally thanks to Fred Fu, and that sentence needs to be revised. However, there's been no work yet on generic interfaces. I'm happy to chat about the issues there, but it's not simply a matter of doing some programming -- there are a lot

Re: [racket-users] hash-ref in typed Racket

2020-04-21 Thread Sam Tobin-Hochstadt
The problem here is with the optional third argument to `hash-ref`. Typed Racket only allows `#f` or functions as the third argument. Plain Racket allows any non-function value as a default, or a function which is called to produce the default. Since "any non-function" is not expressible in Typed

Re: [racket-users] What's the correct way to test a Racket build?

2020-04-19 Thread Sam Tobin-Hochstadt
The most basic test suite is run with `racket/bin/racket pkgs/racket-test-core/tests/racket/test.rkt`. There are a lot of other tests; a good guide is the CI suite here: https://github.com/racket/racket/blob/master/.github/workflows/ci-push.yml#L283-L318 In general, and certainly for a release

Re: [racket-users] typing variable length argument lists

2020-04-13 Thread Sam Tobin-Hochstadt
The change makes a difference because Typed Racket's type inference for `cons` is producing a less-accurate answer than it could. When it sees arguments of type `String` and `(Listof Any)`, it decides that the result is a `(Listof Any)` instead of a `(Pairof String (Listof Any))`. If you add

Re: [racket-users] Are there interfaces for IP ports at least raw sockets?

2020-04-02 Thread Sam Tobin-Hochstadt
Here's some C source code which should point to the right functions: https://www.geeksforgeeks.org/ping-in-c/ I think you can just use `#f` for the library -- all the functions should be from libc. Sam On Thu, Apr 2, 2020 at 1:00 PM David Storrs wrote: > > On Thu, Apr 2, 2020 at 12:37 PM

Re: [racket-users] Issue with define-type and typed classes

2020-04-02 Thread Sam Tobin-Hochstadt
When this happens, it's usually a bug in Typed Racket caused by depending on hash table ordering, so it would be great to find and fix it. On Thu, Apr 2, 2020, 3:43 AM hashim muqtadir wrote: > > I am thinking its deeper because the code sometimes compiles. >> > > Yes, this happens with me too.

Re: [racket-users] How do I just run the type checker?

2020-02-21 Thread Sam Tobin-Hochstadt
If you compile the file with `raco make server.rkt` then it will run the type checker as part of compilation. Furthermore, it will run faster the next time since it won't have to re-compile. Sam On Fri, Feb 21, 2020 at 12:13 PM Marc Kaufmann wrote: > > Hi, > > the way I currently check my web

Re: [racket-users] Mixing different #lang in one application

2020-02-10 Thread Sam Tobin-Hochstadt
Yes, you can use Typed Racket together with racket/gui -- there's a `typed/racket/gui` module that you can `require`, and also you can simply write the handler functions in `#lang typed/racket` and `require` them into your GUI application code. Sam On Mon, Feb 10, 2020 at 3:56 PM Alain De Vos

[racket-users] Call for Papers: PACMPL issue ICFP 2020

2020-01-30 Thread 'Sam Tobin-Hochstadt' via users-redirect
hair: Stephanie Weirich (University of Pennsylvania, USA) Artifact Evaluation Co-Chairs: Ben Lippmeier (UNSW, Australia) Brent Yorgey (Hendrix College, USA) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organiser: Igor Lukanin (Kontur, R

Re: [racket-users] What's the point of make-continuation-mark-key?

2020-01-11 Thread Sam Tobin-Hochstadt
We created the continuation-mark-key data type in ~2011 to support Typed Racket. At that point, Racket had continuation mark support for more than a decade using other values as keys. Sam On Sat, Jan 11, 2020, 11:37 PM Jack Firth wrote: > That makes sense. I think the thing that seems most

Re: [racket-users] ffi-lib and scribble/srcdoc

2019-12-23 Thread Sam Tobin-Hochstadt
What you're seeing is that `scribble/srcdoc` looks for the _binding_ of `->` from `racket/contract` which is being shadowed by the version of `->` from `ffi/unsafe`. I would do something like this: #lang racket (require (rename-in ffi/unsafe [-> -->]) scribble/srcdoc) (provide (proc-doc/names

Re: [racket-users] Change error message of web server continuations from "Sorry, this page has expired. Please go back."

2019-12-23 Thread Sam Tobin-Hochstadt
The default is documented here: https://docs.racket-lang.org/web-server/run.html?q=serve%2Fservlet#%28def._%28%28lib._web-server%2Fservlet-env..rkt%29._serve%2Fservlet%29%29 as the default value for the `#:manager` argument. The default handler is `#f`, which produces the behavior you see. You

Re: [racket-users] [Type Racket] Why doesn't this code type check?

2019-12-21 Thread Sam Tobin-Hochstadt
Typed Racket doesn't refine the type of mutable variables. Doing that soundly would require an effect and escape analysis that seems like more complexity than it's worth. Sam On Sat, Dec 21, 2019, 9:46 AM Weixi Ma wrote: > Hi guys, thanks for your attention. Here is the code. > > 1 (: n (U

Re: [racket-users] Typed Racket: 'Unable to protect opaque value passed as `Any`' with interesting behavior

2019-12-16 Thread Sam Tobin-Hochstadt
ial and obvious answer to something that stumped me for quite a while. >> Good illustration of >> >> “It's not what we don't know that hurts. It's what we know that ain't so.” >> >> >> Cheers, >> Marc >> >> On Wednesday, December 11, 2019 at 4:27:0

Re: [racket-users] index-of + TR ... parametricity problem?

2019-12-15 Thread Sam Tobin-Hochstadt
Yes, this is because the contract enforces parametericity, which doesn't allow `index-of` to work the way you'd want. Instantiating things doesn't help because the contract is based on the `require/typed`, not on the use site. Here's a few suggestions: 1. Submit a pull-request to TR to add

Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Sam Tobin-Hochstadt
Yes, basically. I'd say it's showing how to translate that Racket code (taken from Shriram Krishnmurthi's JFP paper/LL1 talk) into Sham. Sam On Thu, Dec 12, 2019 at 10:32 PM Anthony Carrico wrote: > > On 12/12/19 10:05 PM, Sam Tobin-Hochstadt wrote: > > You might be interested in

Re: [racket-users] Re: What’s everyone working on this week?

2019-12-12 Thread Sam Tobin-Hochstadt
You might be interested in our project Sham: https://github.com/rjnw/sham which is a Racket interface for easily using LLVM. Documentation coming soon, but you can see some examples here: https://github.com/rjnw/sham/tree/master/test Sam On Thu, Dec 12, 2019 at 10:03 PM Nathaniel Griswold

Re: [racket-users] Why is racklog so inefficient?

2019-12-11 Thread Sam Tobin-Hochstadt
Racklog is a port to more-idiomatic Racket of the Schelog system [1] by Dorai Sitaram. The idea of Schelog was not to be a high-performance implementation of Prolog, but to use continuations to allow smooth integration between Prolog-style search and more conventional computation, while

Re: [racket-users] Typed Racket: 'Unable to protect opaque value passed as `Any`' with interesting behavior

2019-12-11 Thread Sam Tobin-Hochstadt
First, (U Any response) is the same as (U response Any) which is the same as Any -- Any includes all other types and thus includes response. Second, f4 really is breaking the contract -- the contract Any turns into says: don't try to pass through any "interesting" values, or if you do, the other

Re: [racket-users] futures-sort update

2019-12-08 Thread Sam Tobin-Hochstadt
On Sat, Dec 7, 2019 at 11:03 AM Dominik Pantůček wrote: > > Hello Racketeers, > > I am continuing my work on cleaning up our private source code and > publishing it as a part of my futures-sort[1] package. Current state of > the package is: > > - configurable parallelism depth > - in-place

Re: [racket-users] Scribble output without navigation

2019-12-06 Thread Sam Tobin-Hochstadt
Is there a reason that not showing it is a problem, relative to not having it in the HTML? The CSS approach is quite easy. Sam On Fri, Dec 6, 2019 at 5:18 AM 'Reuben Thomas' via Racket Users wrote: > > On Thu, 5 Dec 2019 at 14:47, Sam Tobin-Hochstadt wrote: >> >> The u

Re: [racket-users] Re: GUI (get-directory)

2019-12-05 Thread Sam Tobin-Hochstadt
First, one thing I would suggest is that you can create pull requests for anything right from the GitHub UI, although that doesn't let you test them. Especially for small documentation changes where there's no chance you're breaking something, I find that to be very effective and lightweight.

Re: [racket-users] Scribble output without navigation

2019-12-05 Thread Sam Tobin-Hochstadt
The usual way I've done this is with some custom CSS to set the navigation to "display: none". Sam On Wed, Dec 4, 2019 at 5:12 PM 'Reuben Thomas' via Racket Users wrote: > > How can I get scribble/base to output HTML without the navigation elements? I > just want a plain HTML page, similar to

Re: [racket-users] type-checking error with immutable vectors in for loop

2019-11-25 Thread Sam Tobin-Hochstadt
This is a situation where the problem is needing more annotations -- if you write: (for/list : (Listof M) ([m : M s]) m) it type checks. Sam On Mon, Nov 25, 2019 at 3:27 AM bedeke wrote: > > Hello, > > the following doesn't typecheck. Is it a bug? Should I avoid > Immutable-Vectors? >

Re: [racket-users] Newb question....About "How to Design Programs" book

2019-11-24 Thread Sam Tobin-Hochstadt
ot;function is not defined" error, and I'm a > little confused about what I missed. > > Huh! I just checked my version against the online version, and they are NOT > the same! I prefer reading PDFs on my Android tablet, but I think I will need > to see what happens when I follow the

Re: [racket-users] Newb question....About "How to Design Programs" book

2019-11-24 Thread Sam Tobin-Hochstadt
Which edition of the book are you using? And can you point to where in the book you ran into trouble, and what happened? The full book is online, so a link to the section would be very helpful. Sam On Sun, Nov 24, 2019 at 9:28 PM Michael Burke wrote: > > I'm sure this has been asked and

Re: [racket-users] polymorphic datastructures in typed/racket

2019-11-18 Thread Sam Tobin-Hochstadt
> On Mon, Nov 18, 2019 at 12:23 PM David Storrs wrote: >> >> >> >> On Mon, Nov 18, 2019 at 10:09 AM Sam Tobin-Hochstadt >> wrote: >>> >>> >>> Third, your version with structs can't work because you can't tell >>>

[racket-users] Completing Racket's re-licensing process

2019-11-18 Thread Sam Tobin-Hochstadt
With the upcoming Racket 7.5 release, almost all of Racket, including the core Racket CS binary, the standard library, and the packages provided with the main distribution, are available under a permissive license, either the Apache 2.0 License or the MIT License. You can read the details of the

Re: [racket-users] polymorphic datastructures in typed/racket

2019-11-18 Thread Sam Tobin-Hochstadt
A few thoughts on this: First, polymorphic data structures are certainly supported in Typed Racket. You might be interested in https://github.com/takikawa/tr-pfds which is a library of them. Second, it's not totally clear to me what you're trying to do in your various code snippets. Here's a

Re: [racket-users] Re: How to install an updated version of an installation-wide package?

2019-11-07 Thread Sam Tobin-Hochstadt
You don't have to do that, there's just one extra step starting from a pre-built distribution. If you want to work on the "slatex" package for some reason, you'd do: $ raco pkg update --lookup --catalog https://pkgs.racket-lang.org/ slatex ... $ raco pkg update --clone slatex And then you have

Re: [racket-users] Typed Racket needs annotation to realize (Mutable-HashTable Symbol Symbol) is of a more general type

2019-11-05 Thread Sam Tobin-Hochstadt
The problem is that the `DB` type is _not_ a super-type of `(Mutable-HashTable Symbol Symbol)`, because mutable data structures are two way communications channels. If you used an immutable hash, that's a one-way communication and you would have the expected result. However, the change you made

[racket-users] Call for Workshop Proposals: ICFP 2020

2019-10-30 Thread 'Sam Tobin-Hochstadt' via users-redirect
CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming August 23 - 28, 2020 Jersey City, NJ, US

Re: [racket-users] Does match against list traverse the whole list?

2019-10-29 Thread Sam Tobin-Hochstadt
Here are some quick numbers on the traditional Racket VM: ``` > (define v (build-list 1000 values)) > (time (list? v)) cpu time: 47 real time: 47 gc time: 0 #t > (time (list? v)) cpu time: 31 real time: 31 gc time: 0 #t > (time (list? v)) cpu time: 13 real time: 13 gc time: 0 #t > (time

Re: [racket-users] Scribble examples performance

2019-10-19 Thread Sam Tobin-Hochstadt
One thing that's important that we've found improves performance is to close the evaluator at the end of the module. Sam On Sat, Oct 19, 2019, 3:43 AM Jack Firth wrote: > The Scribble docs for my Rebellion > package take nearly two minutes > to build. I

Re: [racket-users] function dispatch in typed racket

2019-10-14 Thread Sam Tobin-Hochstadt
Typed Racket won't generate type-dispatching code for you automatically. However, if you write such code the same way you'd write it in regular Racket, Typed Racket will be ok with that. For example, #lang typed/racket (: id : (case-> (One One -> Number) ((Immutable-Vectorof One)

Re: [racket-users] Re: Structured Concurrency in Racket

2019-10-09 Thread Sam Tobin-Hochstadt
The Racket community, and even more so the design of Racket concurrency APIs, is very strongly influenced by the academic side of Racket. As far as I can tell, structured concurrency is fairly close to what is traditionally called the fork/join model. Concurrency in Racket is usually structured in

Re: [racket-users] Re: Parallel merge-sort leveraging futures

2019-10-08 Thread Sam Tobin-Hochstadt
On Tue, Oct 8, 2019 at 3:44 AM Dominik Pantůček wrote: > Btw, is it necessary to bump the version on pkgd.racket-lang.org in > order to get it updated? When I `raco install' the package from its > directory, it works fine now. When I use the github repository using > plain `raco pkg install

Re: [racket-users] Re: Parallel merge-sort leveraging futures

2019-10-07 Thread Sam Tobin-Hochstadt
I've submitted a pull request fixing those errors and supporting running in serial mode. One thing I notice is that it's substantially faster than `vector-sort!` even when run in serial mode on traditional Racket (but not on Racket CS), so perhaps this should be integrated (or there are

Re: [racket-users] Mysterious issue with pict/code

2019-10-05 Thread Sam Tobin-Hochstadt
This definitely seems like a bug. Here's a smaller program that shows it: #lang racket (begin-for-syntax (dynamic-require 'pict/code #f)) Sam On Sat, Oct 5, 2019 at 12:56 PM Stephen Foster wrote: > > I spent a few hours tracking down a mysterious bug. Although I've fixed it, > I still

Re: [racket-users] Current state of racket2 planning?

2019-10-04 Thread Sam Tobin-Hochstadt
Matthew wrote a long email on Wednesday with about the current state, although the subject was "Rhombus Project Plan" so that may have been why you missed it. Sam On Fri, Oct 4, 2019, 8:42 AM David Storrs wrote: > The racket2 discussion dropped off my radar a while ago but I got some > spoons

Re: [racket-users] read-eval-print-loop, #%top-interaction, and define

2019-09-24 Thread Sam Tobin-Hochstadt
It's fine to have `#%top-interaction` around a `define`: ``` Welcome to Racket v7.4.0.10. > (#%top-interaction . (define x 1)) > x 1 ``` My guess is that your `#%top-interaction` is doing something that puts it in an expression context. Sam On Tue, Sep 24, 2019 at 8:34 AM Jesse Alama wrote: >

Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?

2019-08-29 Thread Sam Tobin-Hochstadt
Thanks for volunteering! I'll follow-up off-list. Sam On Thu, Aug 29, 2019 at 12:14 PM 'Joel Dueck' via Racket Users wrote: > > On Thursday, August 29, 2019 at 10:45:33 AM UTC-5, Matthew Flatt wrote: >> >> >> A pulse and keyboard is a good start, but the task requires significant >> initiative

Re: [racket-users] Re: Gracket format

2019-08-28 Thread Sam Tobin-Hochstadt
The "Collapse S-expression" action is what leads to this result -- the collapsed state is saved in the file using the wxme gracket format. Sam On Wed, Aug 28, 2019 at 1:29 PM Mark Bestley wrote: > > Kieron Hardy writes: > > > Hi Mark, > > > > How are you starting your program? > > > > Not

  1   2   3   4   5   >