[racket-users] Re: Scribble markdown renderer: tables

2020-12-29 Thread Alex Harsanyi
I am not entirely sure what it is that is not working, so I am just guessing here: * If you are generating Markdown files that contain tables, you need to be aware that tables need to be in column 0 (i.e. NOT indented). If they are indented, they will be rendered as pre-formatted text. * If y

Re: [racket-users] Using current-process-memory with 'cumulative argument

2020-12-16 Thread Alex Harsanyi
Flatt wrote: > At Tue, 15 Dec 2020 17:00:42 -0800 (PST), Alex Harsanyi wrote: > > I am trying to use `(current-process-memory 'cumulative)` to determine > the > > total memory used by an application, including the memory that was > > reclaimed by the garbage collecto

[racket-users] Using current-process-memory with 'cumulative argument

2020-12-15 Thread Alex Harsanyi
I am trying to use `(current-process-memory 'cumulative)` to determine the total memory used by an application, including the memory that was reclaimed by the garbage collector. I would expect the results from the call to be constantly increasing, and this is indeed the case at a "global" scal

[racket-users] Re: Pict and pict types

2020-11-24 Thread Alex Harsanyi
This is a known issue: plot-pict does not return a typed/pict type · Issue #15 · racket/plot (github.com) Alex. On Tuesday, November 24, 2020 at 7:24:17 PM UTC+8 tim wrote: > Hi everyone, > > In typed racket, vc-append expects arguments of type pict,

[racket-users] Re: EDIT: Building a rectangle builder: trailing rectangle bug.

2020-11-23 Thread Alex Harsanyi
The snip selection and resize is handled by the pasteboard on-default-event, and it looks like your code also handles events, resulting in duplicate handling. There is no clear solution to this, as the system does not know if you want to select snips or draw rectangles. However, you could u

Re: [racket-users] Re: when do we use snip%, snip-class% and editor-snip%

2020-11-20 Thread Alex Harsanyi
c x y width height . other) > (when width (set-box! width w)) > (when height (set-box! height h))) > (define/override (draw dc x y . other) > (draw-pict (rectangle w h) dc x y > > (send board insert (new rectangle-snip% [w 30] [h 80]) 100 300) > > > &

Re: [racket-users] Re: when do we use snip%, snip-class% and editor-snip%

2020-11-20 Thread Alex Harsanyi
her snip% related tutorials on that web site. > > > On Fri, Nov 20, 2020 at 5:26 AM Alex Harsanyi wrote: > >> You use snips to build small interactive widgets which can be combined >> and embedded into other GUI applications. the snip-class% is a helper >> c

[racket-users] Re: when do we use snip%, snip-class% and editor-snip%

2020-11-19 Thread Alex Harsanyi
You use snips to build small interactive widgets which can be combined and embedded into other GUI applications. the snip-class% is a helper class for building snips and editor-snip% is a type of snip which allows building nested editors (an editor within an editor). DrRacket uses snips for i

[racket-users] Re: Help implementing an early return macro

2020-10-28 Thread Alex Harsanyi
Are you looking for `let/ec`? (let/ec return (define x (random 10)) (unless (even? x) (log-info "x wasn't even, x = ~a" x) (return -1)) (define y (random 10)) (unless (even? y) (log-info "y wasn't even, y = ~a" y) (return -1)) (+ x y)) Alex. On Wednesday, October 28, 20

Re: [racket-users] Why is get-impure-port* slower than a system call to curl?

2020-09-16 Thread Alex Harsanyi
On Thursday, September 17, 2020 at 7:54:23 AM UTC+8 gneuner2 wrote: > > That's true - Windows tries IPv6 first Windows does not try IPv6 first. Client applications that call `getaddrinfo` with `AF_UNSPEC` , ask for both IPv4 and IPv6 addresses when resolving names. When that happens, the

Re: [racket-users] Why is get-impure-port* slower than a system call to curl?

2020-09-16 Thread Alex Harsanyi
On Windows at least, "localhost" resolves to two IP addresses (in this order): "::1" (IPv6) and "127.0.0.1". The Racket `tcp-connect` function will try the fist one first, and since you probably don't bind your web server to the IPv6 address, the connection times out, than `tcp-connect` tries

Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Alex Harsanyi
On Thursday, August 20, 2020 at 9:11:45 PM UTC+8 hen...@topoi.pooq.com wrote: > On Wed, Aug 19, 2020 at 09:33:01PM -0700, Alex Harsanyi wrote: > ... > ... > > I think Racket would benefit by a suite of applications which are small > but > > not trivial and wit

[racket-users] Re: Application Templates!

2020-08-19 Thread Alex Harsanyi
I am not sure that a template in the style of "dotnet new" is directly applicable for Racket -- the .Net framework is, well a framework. which is a library that expects the users to structure their own programs in certain ways. The templates fill the need of setting up the boilerplate code for

[racket-users] Re: GUI zoom and normal-control-font

2020-08-19 Thread Alex Harsanyi
At least on Windows, users can select the text size in the Windows System Settings,and Racket GUI applications will use that setting. So I can make the text of the GUI controls bigger or smaller by adjusting this setting. The Racket GUI have to be restarted though for the settings to take eff

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

2020-08-10 Thread Alex Harsanyi
The simplest thing is to just use tabs. A line of text would be "\tYour Message here" and an overflowing line would be "\tOverflowing message". Yes, this will work for variable width fonts. The `text%` class has a `set-tabs` method which allows setting the tab stops in drawing units on the

[racket-users] Overiding the default preferences directory in Racket applications

2020-07-25 Thread Alex Harsanyi
If a Racket package uses `get-preference` and `(find-system-path 'pref-dir)` to store some data, is there a way for an application using that package to override the default preferences file used and the preferences directory returned by `(find-system-path 'pref-dir)`? The reason I ask this quest

Re: [racket-users] Re: note about parsing speed of xml vs sxml?

2020-06-29 Thread Alex Harsanyi
On Tuesday, June 30, 2020 at 7:48:14 AM UTC+8 Neil Van Dyke wrote: > Is even 2x speedup helpful for your purpose? Yes it is, and for my purpose `read-xml` is fine even without any speed improvement. In the sports field, XML (via the TCX format) is a legacy technology. Typical TCX files ar

[racket-users] Re: note about parsing speed of xml vs sxml?

2020-06-29 Thread Alex Harsanyi
I installed the sxml package out of curiosity, and while it is faster, it is not 4 times as fast, as your tests indicate. I used the following test program with a 14Mb XML file (a bike ride in TCX format): (define file-name "../MyPackages/more-df-tests/tcx-data/2015-09-27-0755_Road_Cycling_

Re: [racket-users] Re: note about parsing speed of xml vs sxml?

2020-06-28 Thread Alex Harsanyi
I tested the your string port version and I also wrote a "string-append" version of the xml reader and they are both slower by about 10-15% on my machine, when compared to the current read-xml implementation which uses `list->string`. It looks like `list->string` is not the bottleneck here. Th

Re: [racket-users] Re: note about parsing speed of xml vs sxml?

2020-06-28 Thread Alex Harsanyi
I suggested using `string-append` because in my own performance investigations with reading 100Mb+ CSV files: constructing short tokens using string-append is faster than using a string port -- perhaps there is a fixed overhead with using string ports which makes `string-append` faster for shor

[racket-users] Re: Pasting an Image from windows clipboard and annotating it

2020-06-27 Thread Alex Harsanyi
You can get the bitmap from the clipboard using "(send the-clipboard get-clipboard-bitmap)" and you can use the bitmap dimensions (see get-with and get-height methods of the bitmap% object) to make the canvas the same size as the bitmap by constructing it with stretchable-width and stretchable-

[racket-users] Re: note about parsing speed of xml vs sxml?

2020-06-27 Thread Alex Harsanyi
Looking at the source for `read-xml`, it seems to be using `list->string` in several places. That is, it reads characters one-by-one and constructs a list by appending a character to the end of it, than calls `list->string` to produce the string. I suspect read-xml could be made faster by usin

[racket-users] Re: [racket-money] Fwd: [racket-dev] Racket Survey 2020

2020-06-24 Thread Alex Harsanyi
On Thursday, June 25, 2020 at 6:14:42 AM UTC+8, jos.koot wrote: Questions and problem reports of users always are responded to very > promptly. > It depends. If the problem report starts with "racket crashes when I do X", it will be fixed within 24 hours. For everything else, not so much.

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

2020-06-17 Thread Alex Harsanyi
10:08:06 PM UTC+8, Brian Adkins wrote: > > On Wednesday, June 17, 2020 at 4:50:44 AM UTC-4, Alex Harsanyi wrote: >> >> >> I am trying to speed up an algorithm using futures, but I am getting some >> unexpected results (and no real speed improvements), and I was wonder

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

2020-06-17 Thread Alex Harsanyi
> You can slightly mitigate this by some refactoring and custom syntax, > but that is even more work and I would really consider whether you need > the parallelism for a computation that takes a few seconds anyway. > > Of course, if you plan to use your algorithm for much bigger

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

2020-06-17 Thread Alex Harsanyi
I am trying to speed up an algorithm using futures, but I am getting some unexpected results (and no real speed improvements), and I was wondering if someone more experienced could have a look a the code and tell me what am I doing wrong. I put up the code in this repository: https://github.c

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

2020-06-08 Thread Alex Harsanyi
On Monday, June 8, 2020 at 6:11:37 PM UTC+8, Yury Bulka wrote: > > Wow, from 695 requests per second to 49,516 is a huge improvement! > > Since we were comparing to django previously, it's now much closer with > django (which does 78,132 rps.) > I know very little about web development, so th

[racket-users] Re: foldts-test-suite

2020-06-02 Thread Alex Harsanyi
Are there alternatives to the `folds-test-suite` and `fold-test-results` functions, for people who want to write their own test running and reporting for Rackunit tests? Alex. On Wednesday, June 3, 2020 at 2:00:02 AM UTC+8, Jack Firth wrote: > > The test case folding stuff in RackUnit should m

[racket-users] Re: Testing for Packages

2020-05-26 Thread Alex Harsanyi
I am personally confused about what you think the problem is, so I just want to make sure that you know that you can develop and test a new package, or you can modify an existing package and test the modifications, without publishing the package. Basically in Racket you can: * create a new pa

[racket-users] Re: GUI executable creating an annoying command line window

2020-05-26 Thread Alex Harsanyi
I cannot reproduce this. If I create the executable from the command line using "raco exe --gui work-timer.rkt", or from DrRacket specifying GRacket as the "base", the console window does not show up. If I create the executable using "raco exe work-timer.rkt" or by specifying "Racket" as th

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

2020-05-25 Thread Alex Harsanyi
s.html I understand that everyone has a different workflow and my workflow will not be directly applicable to them, but hopefully a few ideas can be re-used. I also tried to explain what I would like from a "dependency management" solution. Alex. > > On Thu, Apr 30, 2020

Re: [racket-users] Re: rackunit and logging

2020-05-23 Thread Alex Harsanyi
As I mentioned in my previous post, the "unit" that can succeed or fail is the "test case", and this will work: #lang racket (require rackunit) (define-test-suite hw (test-case "one" (check-equal? 1 1)) (test-case "two" (check-equal? 1 (/ 1 0))) (test-case "three" (check-equal? 1 2))) (f

Re: [racket-users] Re: rackunit and logging

2020-05-23 Thread Alex Harsanyi
On Saturday, May 23, 2020 at 10:25:07 PM UTC+8, sk wrote: > > Thank you, Alex, this seems to have just the right set of information. I'm > curious why you use `foldts-test-suite` instead of `fold-test-results`, > whose documentation says "Hence it should be used in preference to > foldts-test

[racket-users] Re: rackunit and logging

2020-05-22 Thread Alex Harsanyi
You can use foldts-test-suite (part of the rackunit package) to write your own test runner which collects and reports on the tests according to your nee

[racket-users] Re: Output out of order when using system procedure

2020-05-20 Thread Alex Harsanyi
gt; Can I do anything in the racket side to solve the problem? Making the > interactive window behave like terminal perhaps? > > On Wednesday, May 20, 2020 at 4:49:30 PM UTC+8, Alex Harsanyi wrote: >> >> Short version: Try adding a "sys.stdout.flush()" after each of your

[racket-users] Re: Output out of order when using system procedure

2020-05-20 Thread Alex Harsanyi
Short version: Try adding a "sys.stdout.flush()" after each of your print statements in your python script. Longer version: when you run that program in a terminal, the output is a TTY and the standard output is flushed after every line. When you run it as a subprocess, the standard output is

[racket-users] Re: Requesting feedback on CSS3 parser and tokenizer

2020-05-12 Thread Alex Harsanyi
I now very little about web technologies and web development, so this might be a stupid question: could you explain what types of applications might need a to parse CSS files? I can only think of one, and that is a web browser. Are you working towards a web browser in Racket? Alex. On Wedne

[racket-users] Re: trickiness about the order of definitions in GUI code

2020-05-06 Thread Alex Harsanyi
Every problem can be solved by adding another level of indirection (except perhaps having too many levels of indirection :-) ). You can put the code below in a separate file: (define (make-info-menu-item parent target-table) (new menu-item% (label "info") (parent parent) (c

[racket-users] Re: plotting graphs with flipped y axes

2020-05-03 Thread Alex Harsanyi
On Monday, May 4, 2020 at 1:31:06 AM UTC+8, David Bremner wrote: > > > Does anyone know how to achieve plots like the attached with racket's > plot module? I'm stuck trying to invert the y axis. I'd like the smaller > y values to be at the top of the plot. > > I am not aware of any plot parame

[racket-users] Re: Strange find-files problem

2020-05-03 Thread Alex Harsanyi
The path is fine. `ext` however is always void. get-current-platforms-icon-ext is incorrect, you don't need quotes around the platform names. Also, the error message is incomplete, I am not sure if there was scroll bar, but the contract failure should have told you which argument was wrong.

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

2020-05-01 Thread Alex Harsanyi
On Friday, May 1, 2020 at 9:12:55 PM UTC+8, Jesse Alama wrote: > > On Thursday, April 30, 2020 at 2:57:45 PM UTC+2, Jay McCarthy wrote: >> >> >> This is simply a social standard though. There is nothing that >> technically prevents you from breaking compatibility, except that your >> users may

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

2020-04-29 Thread Alex Harsanyi
You could both send packages to the package catalog and instruct your users to use a different package source if they wish to use old versions. I don't see these two options in conflict with each other. As an application writer, I am on the other side of this problem, by depending on other pa

[racket-users] Re: ask a pict its colour?

2020-04-18 Thread Alex Harsanyi
I don't think such a procedure can be written. at least not for the general case. First, the color of `(filled-rectangle 30 30)` is not black, but whatever color was installed in the drawing context when the filled rectangle was rendered. You can change it to red using: (colorize (filled-rec

[racket-users] Re: plotting multiple data sets on one set of axes

2020-04-11 Thread Alex Harsanyi
The renderers that you pass on to the `plot` function can be manipulated outside the call to plot, so you can read the datasets you need, construct a renderer for each one, group them in a list and pass them on to plot. I am not familiar with Matlab, but based on your description, you can im

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

2019-12-01 Thread Alex Harsanyi
On Monday, December 2, 2019 at 12:58:39 AM UTC+8, Simon Schlee wrote: > > created an issue for this: > https://github.com/racket/gui/issues/149 > Based on you description, it seems that the window manager you use on Linux will adjust the window position to make room for the border, but this seem

[racket-users] Re: Looking for transducer early-adopters

2019-11-15 Thread Alex Harsanyi
I'm not sure if this would be useful to you, but, as part of writing my tzgeolookup package, I wrote a blog post exploring the performance of different ways in which the underlying data is organized. As a result of that, I have a repository with 10 variants of the same program using different

[racket-users] Re: raco setup equivalent for building standalone executables?

2019-11-08 Thread Alex Harsanyi
There is no such raco command, as far as I know. I see two possible solutions to your problem: 1) Place the raco commands in a shell script, so that the application can be built by running the single shell script 2) The raco pkg, make, exe and distribute commands all provide a Racket level

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

2019-11-08 Thread Alex Harsanyi
en you have the "slatex" package linked to a clone in the > `slatex/` directory where you ran the second command. > > Here's a demo: https://asciinema.org/a/lOASUq2O1AT8JHhGyNJzvOcqE > > Sam > > On Thu, Nov 7, 2019 at 8:28 PM Alex Harsanyi > wrote: > > >

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

2019-11-07 Thread Alex Harsanyi
d building there. In that setting, for example, it's > easier to use `raco pkg update --clone` to get started, as described at > > > https://docs.racket-lang.org/racket-build-guide/contribute.html#%28part._pkg-contribute%29 > > > > Matthew > > At Tue, 5 Nov 2

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

2019-11-05 Thread Alex Harsanyi
I wrote some notes about how to do something similar, when I worked on the plot package: https://alex-hhh.github.io/2018/01/changing-built-in-racket-packages.html These instructions will work for the case where Racket is installed globally and your current user does not have permissions to

[racket-users] Re: drracket indentation in vim

2019-10-23 Thread Alex Harsanyi
Well, you could use the racket-mode from emacs to indent your files. You will need to install GNU Emacs and racket-mode, and save the following in indent-racket-file.sh: #!/bin/bash FILE=$1 emacs --daemon --eval " (progn (find-file \"$1\") (racket-mode) (indent-region (point-min) (point-

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

2019-10-07 Thread Alex Harsanyi
Hi Dominik, I tried to use your package and you are missing a dependency for the `scribble-math` package in your info.rkt file, this has to be installed separately otherwise your package won't install. However, I tried to use the `vector-futures-sort!` function and got an error: > (vector-fut

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

2019-10-07 Thread Alex Harsanyi
Hi Paulo, I would be interested to know what your plans are for your Darwin package (which is a fork of the Frog blog generator, for those who didn't read the newsletter :-) ). Over the years several people have updated their copy of Frog with new features, you can see this on the Network ta

[racket-users] Re: Some guidance in setting up Racket as a game scripting language.

2019-10-02 Thread Alex Harsanyi
Unless your objective is to learn C and SDL, I would recommend writing the game entirely in Racket and using the Racket graphics facilities -- you will find that the performance will be more than enough for a roguelike game that you want to develop. Also, there are more people that can help yo

[racket-users] Re: raco exe & distribute, and namespace-require'ing a module: missing racket/base?

2019-09-25 Thread Alex Harsanyi
On Wednesday, September 25, 2019 at 1:37:41 PM UTC+8, Jesse Alama wrote: > > I'm working on building a standalone executable for a #lang that can be > used in two ways: > > 1. foo awesome.foo: execute file awesome.foo, which is written in #lang foo > > 2. foo (no arguments): fire up a REPL. Expr

Re: [racket-users] Re: Confusion with udp-receive!

2019-09-25 Thread Alex Harsanyi
is a bug in the underlying C code? > > 2) Why does Racket use a hand-rolled io library instead of a more > standard net stack element? Is it for portability or...? > > On Wed, Sep 25, 2019 at 9:28 AM David Storrs > wrote: > > > > > > > > On Wed, Sep 25,

[racket-users] Re: Confusion with udp-receive!

2019-09-25 Thread Alex Harsanyi
Do you know what port the router is using for NAT? Are you sure that the router is not simply choosing the same port, so 25890 is both your local port and the port used by the router? Alex. On Wednesday, September 25, 2019 at 1:08:16 PM UTC+8, David Storrs wrote: > > udp-receive! is giving me

[racket-users] Interactive Heat Maps

2019-09-21 Thread Alex Harsanyi
A few days ago I posted about adding maps to the DrRacket REPL -- while a nice demo, this is not why I implemented the `map-snip%` object. The reason I implemented it is because I wanted to add maps to an interface which was designed for displaying plots produced by `plot-snip`. While this i

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

2019-09-18 Thread Alex Harsanyi
On Thursday, August 29, 2019 at 9:39:05 AM UTC+8, Alex Harsanyi wrote: > > > > On Wednesday, August 28, 2019 at 11:45:10 PM UTC+8, Joel Dueck wrote: >> >> On Wednesday, August 28, 2019 at 12:10:56 AM UTC-5, Alex Harsanyi wrote: >>> >>> I am curious to kn

Re: [racket-users] What is a (the?) way to track requirements for a web or app with Racket?

2019-09-16 Thread Alex Harsanyi
On Monday, September 16, 2019 at 5:04:58 PM UTC+8, Bogdan Popa wrote: > > > Marc Kaufmann writes: > > > this is surely answered somewhere, but I have not made much progress. If > > you know python, what I want to do is essentially > > > > $ pip install requirements.txt > > > > Although it's

[racket-users] Re: Downloadable tutorials (e.g. on github)? Tutorial example source codes samples attached to DrRacket instalation?

2019-09-09 Thread Alex Harsanyi
On Monday, September 9, 2019 at 10:09:02 PM UTC+8, Prokop Hapala wrote: > > Hi, > > I recently found Racket when I was searching some tutorials about Lisp and > Metaprogramming. I really like that the community around DrRacket seems to > be very much interested in education, making talks and t

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Alex Harsanyi
or-ref v 0) name)) (df-select* df "city" "country" "lat" "lng" #:filter (is-city? "Perth")) ;; Produces: ;; '#(#("Perth" "Australia" -31.955 115.84) ;; #("Perth" "United Kingdom" 56.4003 -3.47))

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Alex Harsanyi
rning (csv->rktd, > then just list of assoc operations). > > On Fri, Sep 6, 2019 at 1:35 PM Sage Gerard > wrote: > >> Would geonames help? >> http://www.geonames.org/ >> >> >> Original Message >> On Sep 6, 2019, 8:28 AM, Hendrik Boom < hen...@to

Re: [racket-users] Embedding a map widget in the DrRacket REPL

2019-09-05 Thread Alex Harsanyi
>> painful >> >> Stephen >> >> On Wed, 4 Sep 2019 at 12:20, Sage Gerard > > wrote: >> >>> How cool is that! DrRacket's flexibility is pretty amazing >>> >>> >>> >>> Original Message &g

Re: [racket-users] Embedding a map widget in the DrRacket REPL

2019-09-05 Thread Alex Harsanyi
is so close to being an electronic lab notebook it’s almost > painful > > Stephen > > On Wed, 4 Sep 2019 at 12:20, Sage Gerard > wrote: > >> How cool is that! DrRacket's flexibility is pretty amazing >> >> >> >> ---- Original Message -

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

2019-08-28 Thread Alex Harsanyi
On Wednesday, August 28, 2019 at 11:45:10 PM UTC+8, Joel Dueck wrote: > > On Wednesday, August 28, 2019 at 12:10:56 AM UTC-5, Alex Harsanyi wrote: >> >> I am curious to know how you plan to comply with section 4.d of the LGPL, >> which states that the users of your app

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

2019-08-27 Thread Alex Harsanyi
On Wednesday, August 28, 2019 at 12:17:46 AM UTC+8, Joel Dueck wrote: > > On Friday, August 23, 2019 at 10:40:13 AM UTC-5, Alexis King wrote: >> >> Distributing a closed-source, non-LGPL Racket application without >> violating Racket’s licensing terms is likely to be very difficult or >> imposs

[racket-users] Re: Error when I try to use slideshow?

2019-08-23 Thread Alex Harsanyi
l fail regardless of the icon. Slideshow fails because it tries to set the icon on the frame. It seems that the W32 API call CreateIconIndirect() fails because it thinks the bitmap passes in is invalid... Alex. On Thursday, August 22, 2019 at 12:58:13 PM UTC+8, Alex Harsanyi wrote: > > Th

[racket-users] Re: Error when I try to use slideshow?

2019-08-21 Thread Alex Harsanyi
This may or may not work for them, but ask the user to open the "viewer.rkt" file in their racket installation (it should be in C:\Program Files\Racket\share\pkgs\slideshow-lib\slideshow) and comment out the `set-icon` call around line 1512. That is, comment out the following block: (let

[racket-users] Re: gui widgets over canvas

2019-08-05 Thread Alex Harsanyi
I can think of two options which only use the functionality that is currently available in the racket GUI library: One option is to use a `pasteboard%` instead of the `canvas%` and use an `editor-snip%` for the text input, with the snip being moved where you need it. This solution will be limite

Re: [racket-users] Re: Racket v7.3.0.900 is available for testing

2019-08-01 Thread Alex Harsanyi
\.\racket > Variant:Replace This>.exe": > > > > > > > > I have no extra packages installed or migrated to this installation. > > > > Alex. > > > > On Friday, July 26, 2019 at 8:41:15 PM UTC+8, Matthew Flatt wrote: > > &

[racket-users] [standard-fish] map of the world

2019-07-30 Thread Alex Harsanyi
Here is a map of the world, rendered using a 40 line Racket program and country outline data from https://geojson-maps.ash.ms/. You can find the source here: https://gist.github.com/alex-hhh/2c0f5a02d9e795cbedf90cf84ef84281 [image: world.png] The program is similar to the one described here, w

Re: [racket-users] Directory-specific installation of packages?

2019-07-28 Thread Alex Harsanyi
On Sunday, July 28, 2019 at 3:48:24 PM UTC+8, james.geddes wrote: > > > My workaround is to tell my colleagues to use homebrew to install Racket; > then use `raco pkg` to install the app; and to specify `(define > racket-launcher-names …)` in the info.rkt file to make an executable. > It’s a wo

Re: [racket-users] Re: Racket v7.3.0.900 is available for testing

2019-07-26 Thread Alex Harsanyi
lation. Alex. On Friday, July 26, 2019 at 8:41:15 PM UTC+8, Matthew Flatt wrote: > > At Tue, 23 Jul 2019 18:50:57 -0600, Matthew Flatt wrote: > > At Tue, 23 Jul 2019 17:47:35 -0700 (PDT), Alex Harsanyi wrote: > > > I installed the windows version of the Racket CS build and, w

[racket-users] Re: Using errortrace with repl-driven-development?

2019-07-23 Thread Alex Harsanyi
If you are using DrRacket, you can go to the "Language/Choose Language..." menu, click on "Show Details", than make sure the "Preserve Stack Trace" checkbox is ticked. If you are using racket-mode in Emacs, you can evaluate the current buffer using "C-u F5" which will do the same thing. If you

[racket-users] Re: Message in the meantime?

2019-07-23 Thread Alex Harsanyi
On Wednesday, July 24, 2019 at 12:55:40 AM UTC+8, Greg Hendershott wrote: > > Although I'm still skeptical that changing the surface syntax will be a > sufficiently big net gain, and ought to be the next, highest priority? > I'm running with that idea for the following. > I had a look at the p

[racket-users] Re: Racket v7.3.0.900 is available for testing

2019-07-23 Thread Alex Harsanyi
I installed the windows version of the Racket CS build and, when trying to run DrRacket I get the following error in a console: variable force-unfasl is not bound context...: condition->exn body of data dynamic-wind body of data compiled-module->dh+h+data-instance+declaration-ins

[racket-users] Re: Problem with `copy` method of image-snip%

2019-07-21 Thread Alex Harsanyi
I am not entirely sure why (because I already spent more than 15 minutes on this :-) ), but the problem is with the `get-extent` method: just remove it, and let `image-snip%` handle the method. The `copy` method is not used in this case. Also, in your `on-char` and `on-event` methods, you migh

[racket-users] Re: Creating movable Fonts on a Canvas

2019-06-23 Thread Alex Harsanyi
Have a look at the `snip%` and `pasteboard%` classes: you can represent each glyph using a `snip%` and the pasteboard will handle the moving it with the mouse. You can derive the `snip%` and `pasteboard%` objects to add new functionality -- this is easier than implementing a mouse move operati

[racket-users] Re: Request for Feedback (SQL, Plisqin)

2019-06-21 Thread Alex Harsanyi
While I am familiar with SQL, I am not familiar with any of the libraries you mention on the wiki page (Ecto, Honey SQL and Slick), so maybe I am not the target audience... Your sections about "Joins Are Values" and "Aggregates are self-contained" seem difficult to follow: I think I understand t

Re: [racket-users] Racket 7.3 Plot Performance Regression

2019-06-07 Thread Alex Harsanyi
lag-test.rkt > Mouse > Min: 0.126953125 > Max: 202.34912109375 > Mean: 25.70277455891149 > StdDev: 38.4063903237421 > > Paint > Min: 0.175048828125 > Max: 21.754150390625 > Mean: 7.548767089843749 > StdDev: 8.728339324923978 > > If this modification is okay, I guess

Re: [racket-users] Racket 7.3 Plot Performance Regression

2019-06-05 Thread Alex Harsanyi
On Wednesday, June 5, 2019 at 9:23:26 PM UTC+8, Alex Harsanyi wrote: > > > > On Wednesday, June 5, 2019 at 8:51:48 PM UTC+8, evdubs wrote: >> >> I ran the program with your modifications, but counter to the >> documentation >> <https://docs.racket-la

Re: [racket-users] Racket 7.3 Plot Performance Regression

2019-06-05 Thread Alex Harsanyi
On Wednesday, June 5, 2019 at 8:51:48 PM UTC+8, evdubs wrote: > > I ran the program with your modifications, but counter to the > documentation > , > >

Re: [racket-users] Racket 7.3 Plot Performance Regression

2019-06-05 Thread Alex Harsanyi
at least from > the mouse-event stats, even though that is counter to the experience from > interacting with the plot. Have any other ideas? > > Evan > > On Tuesday, June 4, 2019 at 1:39:49 PM UTC-10, Alex Harsanyi wrote: >> >> >> >> On Tuesday, June 4, 2

Re: [racket-users] Racket 7.3 Plot Performance Regression

2019-06-04 Thread Alex Harsanyi
On Tuesday, June 4, 2019 at 11:32:42 AM UTC+8, evdubs wrote: > > Thanks for trying it out. > > I just tried using the bash installer from > https://download.racket-lang.org/ and I experience the same issue of > lagginess in 7.3. I also tried using a snapshot release from > https://plt.eecs.nor

[racket-users] Re: recursive function with multiple arguments

2019-04-11 Thread Alex Harsanyi
On Thursday, April 11, 2019 at 1:50:23 PM UTC+8, travis@gmail.com wrote: > > Hi All, > > I'm trying to better understand recursion. I decided to rewrite the > logmodr function from this blog post > as > a recursive fun

[racket-users] Re: How to install local dir package replacing pre-installed one

2019-04-05 Thread Alex Harsanyi
Here are some notes that I wrote to deal with this situation, except they use the plot package: https://alex-hhh.github.io/2018/01/changing-built-in-racket-packages.html You will also find some more information about this topic if you search this group, but most of what is explained in tho

Re: [racket-users] Generate really large random numbers in Racket

2019-04-01 Thread Alex Harsanyi
You can use `crypto-random-bytes` to generate large random numbers, however, that function returns a string of bytes, which you have to combine into an integer: (define (random-bignum bits)

[racket-users] Emacs scribble-mode

2019-03-31 Thread Alex Harsanyi
I started writing Scribble documentation more often lately and Emacs has no good support for editing such documents. For me the main feature that I would like is indentation, like it is done in other programming modes. I found a `racket-mode` on GitHub, but it only supports some basic syntax

[racket-users] Re: Intriguing performance difference between Windows and Linux on `(factorial 100000)`

2019-03-24 Thread Alex Harsanyi
You can check if the big number multiplication is the problem, by using a factorial version which does not need so many big number multiplications: #lang racket/base (require racket/math) (define (fact n) (if (zero? n) 1 (* n (fact (- n 1) (define (fact-1 n) (define nslots (exact-truncat

[racket-users] Re: SQL DB tooling

2019-03-23 Thread Alex Harsanyi
The package is called "north" and you can find it here: https://pkgs.racket-lang.org/package/north There is also the announcement on Reddit: https://www.reddit.com/r/Racket/comments/akob56/ann_north_database_migrations/ Alex. On Saturday, March 23, 2019 at 12:40:48 PM UTC+8, Aidan Gauland wr

Re: [racket-users] Error handling for the GUI

2019-03-22 Thread Alex Harsanyi
On Saturday, March 23, 2019 at 5:17:22 AM UTC+8, James Platt wrote: > > Well, I might make some kind of compromise. What I don't want to allow is > the possibility of the user experience being "I click on the button and > nothing happens." You can wrap each button callback with a `with-hand

Re: [racket-users] color-maps for the plot package

2019-03-21 Thread Alex Harsanyi
I created a pull request for items (1) and (2), illustrating the changes that I propose, you can find it here: https://github.com/racket/plot/pull/52 Alex. On Wednesday, March 20, 2019 at 12:17:47 PM UTC+8, Alex Harsanyi wrote: > > > > On Wednesday, March 20, 2019 at 10:35:51 A

Re: [racket-users] color-maps for the plot package

2019-03-19 Thread Alex Harsanyi
On Wednesday, March 20, 2019 at 10:35:51 AM UTC+8, Ben Greenman wrote: > > > Could you (or Ben or Matt) elaborate on how do you see this work for non > > plot programs? > > I'm thinking a color-map% object would define a possibly-infinite > sequence of colors that look nice in some way. The co

Re: [racket-users] color-maps for the plot package

2019-03-19 Thread Alex Harsanyi
On Tuesday, March 19, 2019 at 9:53:23 PM UTC+8, Jens Axel Søgaard wrote: > > This is a great idea. > > It would be really nice to be able to use the colors also from non-plot > programs. > Could you (or Ben or Matt) elaborate on how do you see this work for non plot programs? For plots, the

[racket-users] color-maps for the plot package

2019-03-19 Thread Alex Harsanyi
The Python matplotlib package supports the concept of a colormap for selecting colors for each data set that is displayed -- the user uses an index, like color 0, 1, 2, etc and this is mapped to a RGB value in the color map. The visual aspect of a plot can be changed just by switching the color

Re: [racket-users] Re: Pretty display of tabular data?

2019-03-13 Thread Alex Harsanyi
On Thursday, March 14, 2019 at 9:06:12 AM UTC+8, Matt Jadud wrote: > > First, thank you for all the great pointers in this thread. It is clear > that different renderings will be useful in different contexts, and there's > good libraries to leverage in the community. That's what I was hoping. >

[racket-users] Re: Pretty display of tabular data?

2019-03-13 Thread Alex Harsanyi
You can use the table pict constructor to construct tables, https://docs.racket-lang.org/pict/Pict_Combiners.html?q=table#%28def._%28%28lib._pict%2Fmain..rkt%29._table%29%29 Here is an example: #lang racket (require racket/draw pict) (define (make-pretty-table items) (define c

[racket-users] Re: What is the best way to "raco make" all *.rkt files in a directory tree?

2019-03-11 Thread Alex Harsanyi
To add one more answer to this thread :-) In addition to compiling files specified on the command line, `raco make` will recursively compile all files referenced via `require`. This means that if you have a top level file for your application, you can tell `raco make` to compile that file, and

Re: [racket-users] "table" data structure in Racket

2019-02-21 Thread Alex Harsanyi
On Thursday, February 21, 2019 at 7:19:39 AM UTC+8, travis.h...@gmail.com wrote: > > Hi All, > > I'm resurrecting this thread to ask if anyone in the Racket community has > Apache Arrow on their radar. It seems like Apache Arrow might be gaining > steam. > > Apache Arrow is a cross-language d

  1   2   3   >