[racket-users] F1 key for custom language

2020-11-17 Thread Dmitry Pavlov
Hello, When I press F1 in DrRacket, I get a nice new browser tab with search results from ~/.racket//doc/ directory. I would like to have a thing like this for my custom non-sexp language. So I am going to write some Scribble, and then... will it be automatically searchable after I install m

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-27 Thread Dmitry Pavlov
orked fine too. I can totally live without WinXP, just curious whether it is a planned behaviour. Best regards, Dmitry On December 22, 2019 9:22:40 PM EET, Matthew Flatt wrote: >At Sun, 22 Dec 2019 20:28:41 +0300, Dmitry Pavlov wrote: >> >> > Thanks! It really is a bug in `s

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Dmitry Pavlov
Thanks! It really is a bug in `scheme_get_long_long_val`, where the extraction can read past the end of a bignum on a 32-bit platform. Repair pushed. Great, thank you! Given that I do not normally build Racket, should I wait for the next snapshot from UoU or Northwestern to check out the rep

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-21 Thread Dmitry Pavlov
There could be something wrong with `scheme_get_long_long_val`, but it's surprising that it could go wrong in a machine-specific way. Does the error happen for you even in a very short program that tries to set the file position to 1122398240, or does it only happen in your full program? I j

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Dmitry Pavlov
The Racket-imposed limit should be 64 bits (more than enough) on all platforms. I can try to replicate the problem later today, but more information on the error message would be helpful. I do not have access to that Windows 7 machine until Monday. I managed to reproduce the problem, though,

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Dmitry Pavlov
I would have understood maximum the limit of maximum signed integer 2^31 = 2 GB (and my program would be fine with 2 GB limit). meant to be "I would have understood the limit of maximum signed integer ..." -- You received this message because you are subscribed to the Google Groups "Racket

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Dmitry Pavlov
On a fresh 32-bit Racket 7.5 install on 32-bit Windows 7, (file-position port number) does not work when number is more that 1 GB. On 32-bit machines, the largest fixnum is 2^30  which is 1GB.  I suspect that /file-position/  really wants a fixnum rather than a non-negative-integer as is d

[racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Dmitry Pavlov
Hello, On a fresh 32-bit Racket 7.5 install on 32-bit Windows 7, (file-position port number) does not work when number is more that 1 GB. I can not now say exactly what the error message was, because I am away from that system, but IIUC it was something about the position being "too large". The

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

2019-08-20 Thread Dmitry Pavlov
se `make-compilation-manager-load/use-compiled-handler`, but not need to set `use-compiled-file-paths`. It could accept extra options as a way to avoid environment variables and communicate some other way to the code generator, but I'm not sure what the better way would be. At Mon, 12 Aug 20

[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 th

Re: [racket-users] finding the expander at run-time

2019-08-05 Thread Dmitry Pavlov
Hello, Your task reminds me of the one I had some time ago, and the found solution is still used to this day. You can see the old thread here: https://groups.google.com/forum/#!msg/racket-users/ATXEyp-4AJA/x0KHbeOhdFwJ I am not sure it is compatible right away with what you are doing: there i

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

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; VeryL

[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 source

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 origi

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.

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

[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 syntax/pars

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 regar

[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 for-loop

[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

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 G

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 "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 bro

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

2018-11-11 Thread Dmitry Pavlov
ub.com/racket/plot/blob/8dcfd7745e2595b8d517fd8cd7c59510efab84a9/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

[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 mes

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

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

2018-04-18 Thread Dmitry Pavlov
f information: the expanded syntax and the additional property. You can try to encode this 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 implem

[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 (p

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

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

2018-04-16 Thread Dmitry Pavlov
ax ([x (communicate #'e  (length (flatten (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 M

[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 not.

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 librsvg

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 #:ke

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] "Immobile" lambdas for FFI

2018-03-14 Thread Dmitry Pavlov
Hello, I am doing a Racket interface for a C library and the garbage collector is my trouble again. I am asking for advice from Racket FFI masters (actually, from anybody who knows how to keep persistent callbacks from a C side to Racket). Earlier I was doing this: (define _callback (_fun _int

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 wo

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 critica

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

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 01/2

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 https://github.com/racket/racket/wiki/Friend

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 sto

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 th

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

[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 (rend

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

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 y

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 L

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), b

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 haven'

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 lost,

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 object

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 mo

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 that

[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 an

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 s

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 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/19/2016 11:45 PM, Alex Knauth wrote: On Nov 19, 2016, at 1:51 PM, Dmitry Pavlov 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 the module, i.e. there are no modifications

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 cou

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 y

Re: [racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
replace call-my-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 u

[racket-users] list-free syntax

2016-11-19 Thread Dmitry Pavlov
Hello, I was wondering how I can define a macro that acts without parentheses. Here is what I came up with: (define (my-func) "abc") (define-syntax (call-my-func stx) (syntax-case stx () (_ #'(my-func It was fine at the first glance: call-my-func "abc" But then I tried (ca

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] 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 raise-syntax

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 a

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

2016-10-20 Thread Dmitry Pavlov
ample, 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. >

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 3

Re: [racket-users] Spreadsheet widget?

2016-09-04 Thread Dmitry Pavlov
David, Also, what license is your spreadsheet under? BSD, so it should be OK for most usages, including commercial apps. I just added a copyright statement. I'm building a for-commerce app and I don't want to step on your toes if you'd rather it not be used that way. Quite the opposite, t

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 regard

Re: [racket-users] Spreadsheet widget?

2016-08-29 Thread Dmitry Pavlov
David, I once made some basic spreadsheet editor for my project. https://groups.google.com/forum/#!msg/racket-users/mtfMgxrite4/5YH3BnVPGm0J raco pkg install spreadsheet-editor Demo: https://github.com/kugelblitz/spreadsheet-editor/blob/master/spreadsheet-editor-demo.rkt I should have sp

Re: [racket-users] Error message from GUI

2016-08-29 Thread Dmitry Pavlov
On Fri, 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 '(

Re: [racket-users] Error message from GUI

2016-07-29 Thread Dmitry Pavlov
es the problem on your 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 con

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 Files\Racket\share\pkgs\draw-lib\racket\draw\private\syntax.rkt:2

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 the

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

2016-05-19 Thread Dmitry Pavlov
recommend? Is there a catalog similar to 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 move

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

[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 i

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 comman

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 rec

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 co

[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 vector

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

2015-12-20 Thread Dmitry Pavlov
exclusively use URLs ad bib entries :-) — Matthias On Dec 20, 2015, at 7:05 AM, Jay McCarthy 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 Pavlov wrote: Hello, I am writin

[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 usi

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 -

[racket-users] lib-search-dirs in config.rktd discards Racket's own libs on Windows

2015-11-25 Thread Dmitry Pavlov
Hello, I edit etc/config.rktd on every installation of Racket to add a path to my own libraries: (lib-search-dirs . ("C:/my/libs")) Older versions of Racket were OK with that setting. Current version obeys that setting too strongly, forgetting where its own libraries are. For example, DrRacket

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 additio

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 closed,

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 Rac

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 b

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 scheme_set_dll_path(

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] 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] 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-11-03 Thread Dmitry Pavlov
Matthew, But current 32-bit Windows nightly builds do not provide it either. I did not notice when they stopped to provide it. When I try the 32-bit Windows builds, they seem to have extflonums enabled. Oh, sorry. It has turned out that I was jumping to conclusion on this one. Actually, ex

  1   2   3   >