[racket-users] (require plot) categorically requires X11

2015-04-11 Thread Dmitry Pavlov
Hello, I try to require the plotting library (let alone use it) in a non-X Linux session: $ ssh localhost $ racket Welcome to Racket v6.1.1.8. (require plot) Gtk initialization failed for display :0 context...: /opt/racket/share/pkgs/gui-lib/mred/private/wx/gtk/queue.rkt: [running body]

Re: [racket-users] (require plot) categorically requires X11

2015-04-11 Thread Dmitry Pavlov
Leif, You can always use the plot/no-gui collection: http://docs.racket-lang.org/plot/plotting.html?q=plot%2Fno-gui#%28mod-path._plot%2Fno-gui%29 This should work without the need for X11. Thank you, that is exactly what I need. Best regards, Dmitry -- You received this message because

Re: [racket-users] crash in nightly build

2015-11-11 Thread Dmitry Pavlov
Matthew, More than a week has passed since I updated my installation of Racket. Good news: no crashes since the update. Most probably the bug that you fixed was causing the crash. Best regards, Dmitry On 10/31/2015 06:23 AM, Dmitry Pavlov wrote: Matthew, Before upgrading to the version

Re: [racket-users] What has happened to extflonum support in 32-bit nightly builds?

2015-11-12 Thread Dmitry Pavlov
Matthew, unsafe-extfllong_double_mult: unsupported on this platform FWIW, my actual program is a C program that uses a Racket library obtained with raco ctool. I can provide you more details and a reproducible example if the above is not enough to hunt down the cause. I think the problem is

Re: [racket-users] embedded Racket + runtime paths = ?

2015-11-15 Thread Dmitry Pavlov
Matthew, [...] So, if the immediate repair doesn't solve the problem for you, a follow-up change might. [...] Is it e3d78e4, or it is to be done yet? Yes, it's e3d78e4. I hate to tell you this, but the error still remains in the latest nightly build, Windows i386: >racket Welcome to

Re: [racket-users] embedded Racket + runtime paths = ?

2015-11-15 Thread Dmitry Pavlov
Matthew, On 11/13/2015 06:33 PM, Matthew Flatt wrote: I've pushed a change that may solve this problem. The change was to the way that `--runtime` determines a shared path prefix among runtime files, so that it can copy them to a new place but keep relative paths intact. On Windows, the paths

Re: [racket-users] What has happened to extflonum support in 32-bit nightly builds?

2015-11-12 Thread Dmitry Pavlov
The more interesting thing is that the 'longdouble.dll' is not put into the runtime directory by 64-bit Racket, too. Still, the 64-bit program works without any additional effort. Oops, sorry, I just checked again, the 64-bit Racket fails too. I think you'll need to call

Re: [racket-users] crash in nightly build

2015-10-30 Thread Dmitry Pavlov
JIT-compiled. At Thu, 15 Oct 2015 11:56:21 +0300, Dmitry Pavlov wrote: Matthew, It seems that I have lost my grip on the crash. It has not happened for almost a week---neither with the version that I build myself, nor with the nightly build where I definitely saw it. I did not update Racket

Re: [racket-users] embedded Racket + runtime paths = ?

2015-11-05 Thread Dmitry Pavlov
h string there anymore, so I do not know what to do. Regards, Dmitry On 09/21/2015 08:13 AM, Dmitry Pavlov wrote: I just tried the 32-bit Utah snapshot and 32-bit C app -- build OK, but the app crashed right on scheme_main_setup with zero pointer access. It did not even enter my "r

Re: [racket-users] What has happened to extflonum support in 32-bit nightly builds?

2015-10-31 Thread Dmitry Pavlov
Moreover: I just built Racket from github source on 32-bit Linux with --enable-extflonum switch to ./configure, and the build version somehow misses the extflonums: Actually, not from the github source, but from the snapshot "source + built packages". I guess it should not matter, though.

[racket-users] What has happened to extflonum support in 32-bit nightly builds?

2015-10-31 Thread Dmitry Pavlov
Hello, I vaguely remember that extflonum support was supposed to be turned off by default in 32-bit Linux releases. OK. But current 32-bit Windows nightly builds do not provide it either. I did not notice when they stopped to provide it. Moreover: I just built Racket from github source on

Re: [racket-users] What has happened to extflonum support in 32-bit nightly builds?

2015-11-17 Thread Dmitry Pavlov
Matthew, On 11/13/2015 06:25 PM, Matthew Flatt wrote: At Thu, 12 Nov 2015 19:11:28 +0300, Dmitry Pavlov wrote: The more interesting thing is that the 'longdouble.dll' is not put into the runtime directory by 64-bit Racket, too. Still, the 64-bit program works without any additional effort

Re: [racket-users] embedded Racket + runtime paths = ?

2015-11-17 Thread Dmitry Pavlov
Matthew On 11/17/2015 03:50 PM, Matthew Flatt wrote: I found another place where case-normalization of paths was not handled correctly. Your example now works for me with a snapshot build. Can you try the latest? Yes the latest build works! Thank you very much. The case can be finally

[racket-users] embedded Racket + runtime paths = ?

2015-09-16 Thread Dmitry Pavlov
Hello, I just created a C program that uses my Racket library via Racket's embedding mechanism, and it works fantastic. Now I am wondering---how to ship my C program's executable if the underlying Racket library has runtime paths in it? The executable seems to have been set up for absolute

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-16 Thread Dmitry Pavlov
At Wed, 16 Sep 2015 14:26:41 +0300, Dmitry Pavlov wrote: Hello, I just created a C program that uses my Racket library via Racket's embedding mechanism, and it works fantastic. Now I am wondering---how to ship my C program's executable if the underlying Racket library has runtime paths in it? The

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-16 Thread Dmitry Pavlov
Also, if it matters, I usually make my Windows builds on Linux with MinGW (i686-w64-mingw32-gcc, x86_64-w64-mingw32). But I can use Visual Studio too, I guess, if that will make things easier for raco distribute or whatever. Best regards, Dmitry On 09/16/2015 03:52 PM, Dmitry Pavlov wrote

Re: [racket-users] Why not ship pre-built Racket libraries in the distribution?

2015-09-15 Thread Dmitry Pavlov
our purposes. At Tue, 15 Sep 2015 14:29:51 +0300, Dmitry Pavlov wrote: Hello, I just started to experiment with making my Racket library embeddable to C programs [1]. The first thing I needed to do was to download the Racket source code and compile the libracket3m.a. I wonder why the maintainers do

[racket-users] Why not ship pre-built Racket libraries in the distribution?

2015-09-15 Thread Dmitry Pavlov
Hello, I just started to experiment with making my Racket library embeddable to C programs [1]. The first thing I needed to do was to download the Racket source code and compile the libracket3m.a. I wonder why the maintainers do not put this file into the distribution? It seems that as soon as

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-20 Thread Dmitry Pavlov
I just tried the 32-bit Utah snapshot and 32-bit C app -- build OK, but the app crashed right on scheme_main_setup with zero pointer access. It did not even enter my "run" function. My initial guess is that it's related to thread-local storage and missing instructions in "Inside". I'll look

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-20 Thread Dmitry Pavlov
Matthew, I've added a `--runtime ` argument to `raco ctool --cmods`, which gathers runtime files into and makes the embedded modules refer to them in (which is expected to be relative to the executable, but see also the `--runtime-access` option). The embedding executable must call

Re: [racket-users] Why not ship pre-built Racket libraries in the distribution?

2015-09-20 Thread Dmitry Pavlov
, Dmitry On 09/15/2015 11:01 PM, Dmitry Pavlov wrote: Matthew, Sure I meant the full distribution. Thanks, I hope that the consensus will be reached :) Best regards, Dmitry On 09/15/2015 08:06 PM, Matthew Flatt wrote: We left out "libracket3m.a" just to make the distribution smal

[racket-users] crash in nightly build

2015-09-20 Thread Dmitry Pavlov
Hello, I was just able to discover that my program crashes on the nightly build 6.2.900.17, on Linux. The program has a heavy portion of math, double and extended unsafe ops, and accesses multiple low-level libraries. It has crashed after 4 hours of running, while doing just the same that it had

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-20 Thread Dmitry Pavlov
Matthew, On 09/21/2015 12:38 AM, Matthew Flatt wrote: At Sun, 20 Sep 2015 23:53:42 +0300, Dmitry Pavlov wrote: On Windows, though, I ran into a problem when linking my app with pre-built libracket3m_9yy8mp.lib : error LNK2001: unresolved external symbol __imp_scheme_get_mz_setjmp

Re: [racket-users] crash in nightly build

2015-10-05 Thread Dmitry Pavlov
places.) If you can get any sort of crash report with a stack trace, that information is often enough for me to either track down the problem or at least say something about what parts of the example may be relevant. Thanks, Matthew At Mon, 21 Sep 2015 00:08:43 +0300, Dmitry Pavlov wrote: Hello, I

Re: [racket-users] pasteboard% applications

2015-12-05 Thread Dmitry Pavlov
Does anyone have an application using pasteboard%? I want to try one, and I’d love to see an example. A (bit underdone) spreadsheed editor using pasteboard% : https://github.com/kugelblitz/spreadsheet-editor Available in Racket via raco pkg install spreadsheet-editor Regards, Dmitry

Re: [racket-users] How to cite Racket in a journal paper?

2015-12-20 Thread Dmitry Pavlov
that exclusively use URLs ad bib entries :-) — Matthias On Dec 20, 2015, at 7:05 AM, Jay McCarthy <jay.mccar...@gmail.com> wrote: Hi Dmitry, This page describes what you should do: http://racket-lang.org/tr/ > http://racket-lang.org/tr1/ On Sun, Dec 20, 2015 at 5:52 AM, Dmitry Pav

[racket-users] How to cite Racket in a journal paper?

2015-12-20 Thread Dmitry Pavlov
Hello, I am writing a paper for a scientific journal. The results that I am presenting there were obtained mostly in Racket. What is the best way to give credit to Racket in references? Is there a specific paper I can reference, or just link the website? If specifics matter: I am heavily

Re: [racket-users] DSL to C code generation with symbolic computations en route

2016-04-29 Thread Dmitry Pavlov
RAI seems to be the closest to what I need to do. It has a DSL with arrays and matrices, it generates C code, and it even has automatic differentiation, according to the docs. It is designed for DSP, but probably can be extended to non-DSP programming. I should look at it closer. For the

Re: [racket-users] GUI: clipping of controls fails on Linux but not on Windows

2016-05-19 Thread Dmitry Pavlov
Debian "unstable" repo that I can sync to? Best regards, Dmitry At Wed, 18 May 2016 23:37:02 +0300, Dmitry Pavlov wrote: Matthew, > One possible fix is to add the 'hscroll style to the horizontal panel. > That change moves the program into "defined behavi

Re: [racket-users] GUI: clipping of controls fails on Linux but not on Windows

2016-05-18 Thread Dmitry Pavlov
Matthew, > One possible fix is to add the 'hscroll style to the horizontal panel. > That change moves the program into "defined behavior" territory, since > a scrolling panel allows its content to be wider than itself. I just tried that and I see that it shows a scrollbar under the panel that I

Re: [racket-users] GUI: clipping of controls fails on Linux but not on Windows

2016-05-19 Thread Dmitry Pavlov
Matthew, Second thought was to check the latest snapshot (d0d85b2, commit in racket/racket made ~3h later than yours in racket/gui). That did not work, too -- the commit of interest is not included into the snapshot. That should have worked, and it looks to me like the change is included in

[racket-users] GUI: clipping of controls fails on Linux but not on Windows

2016-05-18 Thread Dmitry Pavlov
Hello, I would like to report two GUI issues; I do not know is they are related or not. I ran against those issues while working on spreadsheet-editor. The task is to clip a row of buttons (column buttons in my spreadsheet). Below I reproduce the issue using a simpler configuration than I use

[racket-users] DSL to C code generation with symbolic computations en route

2016-04-18 Thread Dmitry Pavlov
Dear Racketeers, I, as a programmer in the area of numerics, just evolved to the state where the following task seem reasonable to work on: - I need to take (or invent) some DSL for numerical computations. All I need is: variables and functions, vectors, loops, arithmetics on numbers and

Re: [racket-users] DSL to C code generation with symbolic computations en route

2016-04-19 Thread Dmitry Pavlov
All, Thank you very much for the provided references. Robby, John, Jerzy: thanks for the pointer to Jeff Siskind. His works on automatic differentiation are very interesting. I should look at his Stalingrad software. I did not think about automatic vs symbolic differentiation before; now I am

Re: [racket-users] Re: Running racket on a #lang-less module-less file?

2016-05-07 Thread Dmitry Pavlov
Jack, There exists a language that wasn't initially designed with racket in mind, but could easily be a racket #lang. To interop with code already written in this language, I wanted an easy way to run files that don't have the #lang line. I had a very similar case when I had to create a

Re: [racket-users] Error message from GUI

2016-07-29 Thread Dmitry Pavlov
Jens, Oddly, another installation of Racket 6.6 on 32-bit Windows XP not only reproduced the error, but also gave a stack trace: initialization for bitmap%: bad argument combination: 495 0 #f #t 1.25 context...: C:\Program

Re: [racket-users] Error message from GUI

2016-07-29 Thread Dmitry Pavlov
ur machine? At Fri, 29 Jul 2016 17:08:42 +0300, Dmitry Pavlov wrote: Jens, Oddly, another installation of Racket 6.6 on 32-bit Windows XP not only reproduced the error, but also gave a stack trace: initialization for bitmap%: bad argument combination: 495 0 #f #t 1.25 context...: C:\Pro

Re: [racket-users] Spreadsheet widget?

2016-09-03 Thread Dmitry Pavlov
David, invalid symbol: 'hide-hscroll given: '(hide-hscroll) This is relatively new in Racket GUI. (Matthew added this option at my request not long ago). If you can update your Racket installation to the latest version, it is probably the easiest way to get past this error. Best

Re: [racket-users] Error message from GUI

2016-08-29 Thread Dmitry Pavlov
29 Jul 2016 10:08:46 -0500, Dmitry Pavlov wrote: Matthew, Yes that works, thank! Also I figured why the message did not show up on my "first" WinXP installation: the spreadsheet-editor package has not been updated there. Newer version of spreadsheet-editor sets (style '(hide-vscro

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Dmitry Pavlov
Matthew, Did you timezone use daylight saving in 1996? Oh, right. I need UTC date and time; I assumed it is UTC since I passed #f for dst? and 0 for time-zone-offset in (date). I missed the local-time? flag in date->seconds, which is true by default. So the corrected version of my code

[racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Dmitry Pavlov
Hello, The surprise of the day for me is date->seconds rejecting a particular time on a particular date. (date->seconds (date 59 47 2 31 3 1996 0 0 #f 0)) This should be 1996, March 31, 02:47:59 am, correct? It reports the following error: find-seconds: non-existent date wanted: (59 47 2

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Dmitry Pavlov
e, 2:47:59am on March 13, 2016 really did not exist in my timezone. At Thu, 20 Oct 2016 19:05:38 +0300, Dmitry Pavlov wrote: > Hello, > > The surprise of the day for me is date->seconds > rejecting a particular time on a particular date. > > (date-&

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Dmitry Pavlov
That was more intended as a rant about things that drive me batty than actual instruction -- I hope it didn't come across as patronizing. No, not at all. One of the things that surprised me the most is that prior to 1925, astronomers kept timestamps of their observations where day started

Re: [racket-users] Error messages in DSL implementations

2016-10-24 Thread Dmitry Pavlov
Konrad, Is it compile-time or run-time errors? Assuming compile-time, I would suggest an approach I took for a non-SEXP language: call raise-syntax-error in the (custom) compiler, which runs after parser and transforms syntax objects to other syntax objects. The third argument of

Re: [racket-users] Error messages in DSL implementations

2016-10-24 Thread Dmitry Pavlov
Is it compile-time or run-time errors? Mostly module-instantiation-time errors, which are closer to run-time errors. As a simple example, consider syntactically correct DSL code that expands to (define foo (first '())) The call to first raises an exception, which is displayed without

Re: [racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
-func with (my-func) disregarding the circumstances" macro. Just out of curiosity: is the latter possible? Best regards, Dmitry On 11/19/2016 01:10 PM, Dmitry Pavlov wrote: Hello, I was wondering how I can define a macro that acts without parentheses. Here is what I came up with: (defin

Re: [racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
Out of curiosity, why do you want this? I have a bunch of parameters (in the Racket sense of the word) that are "read-only" throughout the module, i.e. there are no modifications via calls (parameter value). Most of parameters' values are themselves functions. So what I wanted to save a

Re: [racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
Alex, Using that your macro would be: (define-syntax call-my-func (make-variable-like-transformer #'(my-func))) Perfect solution, thank you! I read about make-rename-transformer, but make-variable-like-transformer escaped me. Best regards, Dmitry -- You received this message because

Re: [racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
Without the macro, the last line would have been (some-func ((parameter-1) some-arg) The question comes when you would have used (parameter-1) in a higher-order context. Do you want it to be equivalent to (parameter-1), or equivalent to (lambda (arg ...) ((parameter-1) arg ...)) ? In your

Re: [racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
On 11/19/2016 11:45 PM, Alex Knauth wrote: On Nov 19, 2016, at 1:51 PM, Dmitry Pavlov <dpav...@iaaras.ru> wrote: Out of curiosity, why do you want this? I have a bunch of parameters (in the Racket sense of the word) that are "read-only" throughout

Re: [racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
On 11/20/2016 12:04 AM, Dmitry Pavlov wrote: On 11/19/2016 11:45 PM, Alex Knauth wrote: On Nov 19, 2016, at 1:51 PM, Dmitry Pavlov <dpav...@iaaras.ru> wrote: Out of curiosity, why do you want this? I have a bunch of parameters (in the Racket sense of the word) that are &quo

Re: [racket-users] errortrace requires 10x time and memory for the program to compile

2016-12-06 Thread Dmitry Pavlov
I guess, under these circumstances, I should try and make my own continuation marks in the parser/compiler. I managed to to that. I can not say that it is a beautiful implementation, but it works. For "a+b", instead of a syntax object of '(plus a b), the parser now generates a syntax

Re: [racket-users] errortrace requires 10x time and memory for the program to compile

2016-12-06 Thread Dmitry Pavlov
Robby, On 12/06/2016 07:20 PM, Robby Findler wrote: I'm not sure if it helps, but errortrace fully expands your program and then traverses that and adds continuation marks (this is called "annotation" in the errortrace docs). There may be a bug in this process that causes information to be

Re: [racket-users] errortrace requires 10x time and memory for the program to compile

2016-12-12 Thread Dmitry Pavlov
Matthew, On 12/10/2016 06:22 PM, Matthew Flatt wrote: At Mon, 5 Dec 2016 10:19:03 -0700, Matthew Flatt wrote: There's a pending issue of making sure that `for` loops or other things are not needlessly instrumented, since they're only part of the expansion instead of the original code. We

Re: [racket-users] errortrace requires 10x time and memory for the program to compile

2016-12-05 Thread Dmitry Pavlov
I just tried that: unfortunately, this stack trace does not seem to be able to cross the boundary of dynamically required module. What I see in (continuation-mark-set->context (current-continuation-marks)) are just lines in the "main" Racket module, and no lines that belong to the non-sexp

Re: [racket-users] errortrace requires 10x time and memory for the program to compile

2016-12-05 Thread Dmitry Pavlov
Matthew, Question 1: A factor of 10 is on the high side, but not unusual at the moment. There's a pending issue of making sure that `for` loops or other things are not needlessly instrumented, since they're only part of the expansion instead of the original code. We haven't gotten back to

[racket-users] errortrace requires 10x time and memory for the program to compile

2016-12-05 Thread Dmitry Pavlov
Hello, I have a program that takes 17 seconds and ~260 MB of memory. If I use errortrace on it, the numbers grow about tenfold: 150 seconds and 2600+ MB. That is just compilation; in the runtime the program does almost nothing and terminates quickly. I know little about how errortrace works

Re: [racket-users] Narrow radix of string->number.

2016-12-22 Thread Dmitry Pavlov
On 12/21/2016 11:33 PM, Jos Koot wrote: Or up to 60, 60 even nowadays being a commonly used radix in time notation. FWIW, the radix of the time notation does not seem that simple to me. I would rather say it is a combined notation. base-10 (days), base-60 (up to 24 hours+minutes+seconds),

Re: [racket-users] Scribble: tables and figures with captions and numbering?

2017-07-07 Thread Dmitry Pavlov
Ben, Georges, Many thanks for your input. I checked out the example of a figure from the Scribble manual: #lang scribble/manual @(require scriblib/figure) @figure["straw" @elem{A straw}]{@image["straw.png"]} Reference to @(figure-ref "straw"). The figure itself successfully converts to

[racket-users] Scribble: tables and figures with captions and numbering?

2017-07-06 Thread Dmitry Pavlov
Hello, I have zero experience with Scribble, and today I have been considering using it to document a program. Previously, I have been using LaTeX, Markdown, and Word. One of the first questions that comes to mind is: can I assign captions to tables (rendered above the table) and figures

Re: [racket-users] Announcing Leibniz, a new language in the Racket universe

2017-04-26 Thread Dmitry Pavlov
Konrad, Sorry I am a bit late to the party. You may remember me from this topic: https://groups.google.com/forum/#!topic/racket-users/E6utg2Pv5hA where I looked for a scientific language and a tool for code generation. Leibniz seems to be very general. Is generation of (C or other) code from

Re: [racket-users] "Link: bad variable linkage" when trying to work through tutorial

2017-05-13 Thread Dmitry Pavlov
Onno, That happens when the .zo files produced by plain command-line racket conflict with ones that come from DrRacket. Or the other way around, I am not sure. Or something else related to .zo files that are no longer valid for some reason. Anyway, try removing the 'compiled' directories from

Re: [racket-users] Re: "Link: bad variable linkage" when trying to work through tutorial

2017-05-14 Thread Dmitry Pavlov
Onno, I tried deleting all ZO files in the Racket tree, but that broke my Racket installation. Sorry, I did not mean to suggest deleting all .zo files in the Racket tree. I should have been more specific. What I meant was the .zo files for your programs. Best regards, Dmitry -- You

Re: [racket-users] using a created language in the repl

2017-05-25 Thread Dmitry Pavlov
Vityou, I will give you an example though I myself sometimes doubt that I did it in the right way. Anyway, here is what I did when I had exactly the same problem: - redefine and reexport #% top-interaction - provide #:language-info to the DrRacket's REPL (I am not sure if racket's REPL needs

Re: [racket-users] can't (require table-panel) today

2017-10-13 Thread Dmitry Pavlov
#lang racket/gui (require table-panel) leads to: standard-module-name-resolver: collection not found Have you tried raco pkg install table-panel? Best regards, Dmitry -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from

Re: [racket-users] Spacemacs Light & Dark Color Schemes for DrRacket

2017-08-31 Thread Dmitry Pavlov
However, I've now ported the Spacemacs light and dark themes for Emacs to DrRacket color schemes. https://github.com/tuirgin/drracket-spacemacs-schemes Very nice and useful. Thank you very much! Regards, Dmitry -- You received this message because you are subscribed to the Google Groups

Re: [racket-users] Re: New wiki page ‘friends of Racket’

2017-10-31 Thread Dmitry Pavlov
John Carmack uses Racket as script language in Oculus platform. Not anymore: https://twitter.com/ID_AA_Carmack/status/739289907038801921 Regards, Dmitry -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and

Re: [racket-users] New wiki page ‘friends of Racket’

2017-10-31 Thread Dmitry Pavlov
I have added some Racket-related information about the Institute of Applied Astronomy I work in. Stephen or Racket-devs: feel free to edit it if needed. Regards, Dmitry On 28.10.2017 12:56, Stephen De Gabrielle wrote: I created a new wiki page

Re: [racket-users] plan for the upcoming v7.0 release

2018-05-27 Thread Dmitry Pavlov
On 05/27/2018 03:10 PM, Matthew Flatt wrote: Hi Dmitry, At Sun, 27 May 2018 14:21:27 +0300, Dmitry Pavlov wrote: We do not expect Racket users to see a big difference between Racket v6.12 and Racket v7.0. I once saw in some text file that extflonums will not make it to Racket on Chez

Re: [racket-users] Using ffi/unsafe/alloc

2018-01-24 Thread Dmitry Pavlov
Konrad, I would create a wrapper like this: (define-fooapi make-foo (_fun (foo : (_ptr o _foo)     -> (r : _int)     -> (if r (begin (register-finalizer-and-custodian-shutdown foo destroy-foo) foo)     (error "can not make foo"))) Regards, Dmitry On

Re: [racket-users] raco distribute help

2018-02-05 Thread Dmitry Pavlov
Deren, In addition to what Matthew has said, I guess you need to have a 'main' module in your language, and provide it to raco exe, too. It can be a dummy module or not. The requirement of such a module is unclear to me, but it exists. Here is my working script to pack a standalone interpreter

[racket-users] (dynamic-require) performance problem

2018-02-12 Thread Dmitry Pavlov
Hello, I have a performance problem with loading a Racket program dynamically. I measure the time taken to execute a program in two different ways: 1. raco make ; time racket 2. raco make my-runner.rkt; raco make ; time racket my-runner.rkt In the first case, execution takes ~1 second, in

Re: [racket-users] (dynamic-require) performance problem

2018-02-12 Thread Dmitry Pavlov
Matthew, I can imagine a problem where the "language implementation" is in the reader, in which case it wouldn't get run when loading from bytecode, but that doesn't explain why `racket ` works --- unless the initialization is also triggered by a `main` or `configure-runtime` submodule, which

Re: [racket-users] (dynamic-require) performance problem

2018-02-12 Thread Dmitry Pavlov
Does the port `p` contain the source text for , or does it contain the bytecode from the ".zo" file created by `raco make ? In this dedicated test, just the source text of and nothing else. I think this is the main cause of the performance difference, but just to make sure, does raco

Re: [racket-users] (dynamic-require) performance problem

2018-02-12 Thread Dmitry Pavlov
Matthew, I'm not clear on why you're using `require-input-port` here instead of `dyanmic-require` with 's path. Originally, I needed it to prepend "#lang " to the source because I did not have it in the file. That requirement is not so strict now and I will be able to lift it if it is

Re: [racket-users] "Immobile" lambdas for FFI

2018-03-15 Thread Dmitry Pavlov
Matthew, I agree with John on this one. In case you decide to release the files, you may want to correct the comment in callback.rkt: it has (define b #f) and (define b null) where I believe you mean (define b (box #f)) and (define b (box null)), respectively. Also, among listed options for

Re: [racket-users] "Immobile" lambdas for FFI

2018-03-15 Thread Dmitry Pavlov
Matthew, On 03/15/2018 04:22 AM, Matthew Flatt wrote: At Wed, 14 Mar 2018 21:56:05 +0300, Dmitry Pavlov wrote: I suspect that "my-callback" or something linked to it are moved in memory by the garbage collector, and the pointer kept by the C library is no longer valid. In the fir

[racket-users] Is it possible to pass syntax information from bottom up?

2018-04-18 Thread Dmitry Pavlov
Hello, I am looking for an advice on how to write a macro that is aware of the information extracted from syntax objects from another macro that is called "inside" the first one. For instance, let it be the (this) macro that detects if its argument is an integer or float, and let it be the

Re: [racket-users] Is it possible to pass syntax information from bottom up?

2018-04-18 Thread Dmitry Pavlov
s with #'(begin expanded-code property) or just use a syntax-property, whatever fits best. When the local-expand returns, take apart the macro and re-do the same thing. Details in the implementation. You may also wish to look at the implementation of Alexis’ Hackett. On Apr 18

[racket-users] How to access lexical context from macro?

2018-04-16 Thread Dmitry Pavlov
Hello, I would like to write two seemingly simple macros and I found no way to do it. (my-let ((x 2)) (begin (begin (begin (access x) (access y) I would like the (access) macro to know at compile (expansion) time that x is up there in (my-let) macro and y is

Re: [racket-users] How to access lexical context from macro?

2018-04-16 Thread Dmitry Pavlov
n (syntax->datum #'e] ...)    body)])) (my-let ([x '(a b ((c d) 4) (5 9))])   (access x)) ;=> '((a b ((c d) 4) (5 9)) has-tree-nodes 8) (the answer is 8 and not 7 because it's counting the 'quote in the syntax) On Mon, Apr 16, 2018 at 2:16 PM Dmitry Pavlov <dpav...@iaaras.ru <

Re: [racket-users] How to access lexical context from macro?

2018-04-16 Thread Dmitry Pavlov
You can "pass" information from one macro to another by binding information to an identifier defined to be a syntax parameter that both macros have in scope. You would need to functionally update its value for each rebinding. Its value would be retrievable with syntax-local-value. Like

Re: [racket-users] How to access lexical context from macro?

2018-04-16 Thread Dmitry Pavlov
Oh, syntax-parameter-value has helped. #lang racket (require (for-syntax syntax/parse syntax/transformer) racket/stxparam) (define-syntax-parameter my-info '()) (define-syntax (access stx)   (syntax-parse stx     ((_) (printf "my-info = ~v\n" (syntax-parameter-value #'my-info))  

Re: [racket-users] Windows Foreign Libraries

2018-03-23 Thread Dmitry Pavlov
On 03/23/2018 03:58 PM, silverfire...@gmail.com wrote: Really silly question but I was using the rsvg package with racket/gui on Linux and everything was working fine.   I moved the code over to windows to try it out (after installing the rsvg package there) and it's complaining that

[racket-users] plot library: legend outside plot?

2018-11-08 Thread Dmitry Pavlov
Hello, Is it possible to render a plot with the legend outside the plotting area, like gnuplot does with "set key outside" option? I see only (plot-legend-anchor) parameter for placement of the legend in different places inside the plot area. Best regards, Dmitry -- You received this

Re: [racket-users] Re: plot library: legend outside plot?

2018-11-11 Thread Dmitry Pavlov
dcfd7745e2595b8d517fd8cd7c59510efab84a9/plot-lib/plot/private/common/plot-device.rkt#L587 <https://github.com/racket/plot/blob/8dcfd7745e2595b8d517fd8cd7c59510efab84a9/plot-lib/plot/private/common/plot-device.rkt#L587> Alex. On Thursday, November 8, 2018 at 11:18:14 PM UTC+8

[racket-users] CAM-2019 conference (St. Petersburg, July 22-24)

2019-03-25 Thread Dmitry Pavlov
Bernard University Lyon, France - Dmitry Pavlov, IAA of Russian Academy of Sciences, Russia - Michael Weigend, University of Münster, Germany - Tatiana Mylläri, St.George’s University, Grenada, West Indies ### Registration and abstract submission Abstract submission is done via EasyChair: https

[racket-users] net/url: Can not download a file over HTTPS

2019-01-24 Thread Dmitry Pavlov
Hello, My workflow broke because of some mess going on with SSL certificates or something. I do not understand what is going on and how to fix it. Could please anybody give an idea? Here is a link: https://datacenter.iers.org/data/latestVersion/9_FINALS.ALL_IAU2000_V2013_019.txt It opens in

Re: [racket-users] net/url: Can not download a file over HTTPS

2019-01-24 Thread Dmitry Pavlov
Neil, Thank you so much, I did not know that I can play with the header so easily in get-pure-port. It turned out that the server expects "Accept:" field in the request (but does not care much about its value). So the following code works #lang racket (require net/url) (let* ((url

Re: [racket-users] net/url: Can not download a file over HTTPS

2019-01-24 Thread Dmitry Pavlov
An additional reason to do it with Racket's HTTP libraries is so that one bot someday going crazy doesn't make a devops/sysadmin see that it's Racket, and think unhappy thoughts about Racket. :) Agreed. Best regards, Dmitry -- You received this message because you are subscribed to the

[racket-users] Program aborts except when there are no previously compiled .zo files

2019-04-12 Thread Dmitry Pavlov
Hello, My program demonstrates an unexpected behavior depending on how I run it. $ $ racket program.rkt $ raco make program.rkt $ racket program.rkt read: bad syntax `#fx' in: compiled/subprogram.mylang.zo context...: "/path/to/myprogram.rkt": [running body] temp37_0

Re: [racket-users] Program aborts except when there are no previously compiled .zo files

2019-04-15 Thread Dmitry Pavlov
It would be good if you can share a link to the code. It is difficult to guess where is the problem is with this information. Is there an online public repository with the code? Unfortunately, no. But you are right. I will try and provide an excerpt on which the crash reproduces. Best

[racket-users] Compiler options for a DSL

2019-05-30 Thread Dmitry Pavlov
Hello, Racket is a perfect tool for creating new languages and compilers for them, everybody knows that. There is one thing, though, generally available in compilers and not instantly available in Racket DSL tools (or I just missed it). How to specify options to the compiler? Consider a

Re: [racket-users] anyone using single-flonums?

2019-05-29 Thread Dmitry Pavlov
My guess is that no one uses them currently, because it's rare that you'd want to trade speed for *im*precision. Single-flonums in Racket are significantly slower than regular flonums, because they're not treated as a common case. The only use I can think of, and the one that inspired the

Re: [racket-users] Why struct type doesn't include field names?

2019-06-14 Thread Dmitry Pavlov
Hello, While we are at it: is it theoretically possible in Racket or Typed Racket (or will be possible in Racket 2 or Typed Racket 2) to access struct fields without repeating the name of the struct type again? Like in C typedef struct {   double x;   double y; } VeryLongStructureName;

Re: [racket-users] Why struct type doesn't include field names?

2019-06-15 Thread Dmitry Pavlov
But yes, this is directly related to the discussion above because with the field name information, you can write your own accessor. Yes it will be a way to go in Racket 2. But for now, https://docs.racket-lang.org/struct-define/index.html might be a good workaround for your problem.

Re: [racket-users] Bytecode problem with fxvector inside a macro

2019-05-08 Thread Dmitry Pavlov
Matthew, The intended error here is "cannot marshal value that is embedded in compiled code" at `raco make` time, because fxvectors are not supported as literals. I'll fix the bytecode writer to check for this case. OK, thank you. What would you recommend, though, to users who want fxvectors

Re: [racket-users] Bytecode problem with fxvector inside a macro

2019-05-08 Thread Dmitry Pavlov
On 5/9/19 12:04 AM, Dmitry Pavlov wrote: Matthew, The intended error here is "cannot marshal value that is embedded in compiled code" at `raco make` time, because fxvectors are not supported as literals. I'll fix the bytecode writer to check for this case. OK, thank you. What

[racket-users] Bytecode problem with fxvector inside a macro

2019-05-08 Thread Dmitry Pavlov
Hello, I would like to report something that I see as inconsistent behavior of the bytecode compiler. The following short program (an artificial minimal reproducible example) works at first, but fails after raco make. My OS is Linux. $ cat one.rkt #lang racket (require (for-syntax

[racket-users] Code generation options for a self-made compiler

2019-08-12 Thread Dmitry Pavlov
Hello, I posted this question once, nobody answered, this is a second try. I believe there should be a solution because the problem seems rather common. See, I have a DSL compiler implemented in Racket as a #lang, syntax-parse etc. Like most compilers, it can emit somewhat diifferent code from

  1   2   >