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

2020-08-24 Thread Deren Dohoda
Hi Paulo, The link to the slack community is munged with the racket-news URL. Deren On Monday, August 24, 2020 at 2:23:59 PM UTC-4 Paulo Matos wrote: > It's here! :) > https://racket-news.com/2020/08/racket-news-issue-37.html > > Enjoy. > > Paulo Matos > -- You received this message because

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

2020-08-20 Thread Deren Dohoda
> I think Racket would benefit by a suite of applications which are small but > not trivial and with a source code which is commented in more detail than a > regular application I would kill to understand the intended use of the framework library. I don't understand what I'm supposed to do

[racket-users] Package Server Update Status

2020-08-18 Thread Deren Dohoda
Hi team, I notice on the very nice about page, https://pkg-build.racket-lang.org/about.html, it does not give an indication of when packages are rebuilt. I had a package that had doc problems and conflicts that I resolved (the ol' manual.scrbl curse). It appeared from me browsing information

[racket-users] Re: Help creating a distributable version of my app

2020-08-17 Thread Deren Dohoda
Hello, The main submodule is intended to be a way to have execution when run from racket/drracket. Maybe there is a way to use ++lib or ++named-lib flags to raco exe but I can't tell from the docs. I just removed your (module+ main ...) wrapper and used the default tool settings from DrRacket

Re: [racket-users] Scribble and examples can't read racket-prefs.rktd

2020-08-16 Thread Deren Dohoda
h > `call-with-trusted-sandbox-configuration`. > > Matthew > > At Sun, 16 Aug 2020 00:45:46 -0700 (PDT), Deren Dohoda wrote: > > Hi Racketeers, > > > > I'm going in absolute circles trying to understand what I might be doing > > wrong. I can use the command line

[racket-users] Scribble and examples can't read racket-prefs.rktd

2020-08-16 Thread Deren Dohoda
Hi Racketeers, I'm going in absolute circles trying to understand what I might be doing wrong. I can use the command line scribble to generate html, which works fine except a problem showing # instead of an actual plot/pict image. And for that matter the package installs fine using a local

Re: [racket-users] Scribble and structs

2020-08-12 Thread Deren Dohoda
Deren Dohoda wrote: > Hi racketeers, > > I have two questions. The first is: is there a way to have scribble / > sandbox use the gen:custom-write property of a structure? When I use > @examples the output is just the bare structure output, not using the > gen:custom-write proced

Re: [racket-users] Scribble and structs

2020-08-12 Thread Deren Dohoda
Hi Matthew, > A `@defstruct*[polynomial .]` form does document `polynomial?`. > Although the word `polynomial?` doesn't appear on the page, it's > implied by the `struct` form on the page. Thank you, I understand. Deren -- You received this message because you are subscribed to the Google

Re: [racket-users] Scribble and structs

2020-08-12 Thread Deren Dohoda
Hi Matthew, Structs should not cause any particular problem for Scribble. I'm > puzzled by the problem with `gen:custom-write`, because that should > certainly work with sandboxes and `@examples`. I will try to look at some included documents with the main distribution to see if I can figure out

[racket-users] Scribble and structs

2020-08-12 Thread Deren Dohoda
Hi racketeers, I have two questions. The first is: is there a way to have scribble / sandbox use the gen:custom-write property of a structure? When I use @examples the output is just the bare structure output, not using the gen:custom-write procedure. Second, I am working on a very simple

Re: [racket-users] Licence guidance

2018-09-26 Thread Deren Dohoda
I put a package up but it has no license info in the code. I would add one which is the most permissive possible that wouldn't cause conflict. I guess this is BSD? MIT? On Tue, Sep 25, 2018, 12:30 PM Neil Van Dyke wrote: > BTW, I don't know the status of possible new GPL and LGPL versions in >

Re: [racket-users] Call to C++ files / or functions from Racket?

2018-08-18 Thread Deren Dohoda
Hi David. You want to either look at the documentation of racket/system (to open executables) or ffi/unsafe (for shared libraries with a C interface). Deren On Sat, Aug 18, 2018 at 1:21 PM, David Merinos wrote: > Hello. Is there a way to call to a C program from within racket? I'd like > to

Re: [racket-users] Question about style

2018-08-16 Thread Deren Dohoda
> > Thanks for the up-vote but let me explain the “local” rationale here and > vote for the ‘inner define’ variant. > [snip]... > > > In Racket programs for the world, possibly real, you want to avoid > rightward drift. Indenting deeper and deeper makes code appear ‘ugly’ to > many eyes,

Re: [racket-users] Question about style

2018-08-11 Thread Deren Dohoda
> > > > My question is: is the way I'm writing things considered to be bad > style? It feels like a hangover from more imperative-style programming > & the inclination to do one thing "per line". On the other hand, it > often helps readability. > I invariably write my code like this. I just

[racket-users] raco distribute help

2018-02-01 Thread Deren Dohoda
Hi everyone, I'm having a hard time understanding the docs for raco exe and raco distribute. tl;dr main.rkt has to (dynamic-require user-selected.rkt) and user-selected.rkt is written in a different #lang and requires a file from this program. How do I glue these pieces together for raco exe /

Re: [racket-users] in-source documentation, single-file packages, and scribble/srcdoc

2018-01-27 Thread Deren Dohoda
Neil, If I understand the implication: how is turbo-racket practically different from scribble/lp2? —Just that the code is not put in the document? Deren On Sat, Jan 27, 2018 at 7:26 AM, Neil Van Dyke wrote: > 1. Do we foresee using srcdoc for new work in the future, and

Re: [racket-users] A very simple #lang

2018-01-25 Thread Deren Dohoda
ing it in the documentation, which > perhaps suggests that, whatever the reason is, it should be documented more > prominently. > > -Philip > > On Thu, Jan 25, 2018 at 2:21 PM, Deren Dohoda <deren.doh...@gmail.com> > wrote: > >> Hi everyone, >> >> I am

[racket-users] A very simple #lang

2018-01-25 Thread Deren Dohoda
Hi everyone, I am desperately in need of a #lang exact so that decimals are read as exact values. I thought this would be extremely simple: ..\exact\lang\reader.rkt (module reader racket/base (provide (rename-out (exact-read read) (exact-read-syntax read-syntax)))

Re: [racket-users] How to delay evaluation of a set! expression

2017-12-21 Thread Deren Dohoda
Vityou, > even though (class ...) expands into a function where method-list is defined. It does not expand into a function where method-list is defined because it does not expand in that way. The macro "define/method" is called with the given syntax and the macro operates on that syntax (it's

Re: [racket-users] How to delay evaluation of a set! expression

2017-12-21 Thread Deren Dohoda
Hi Vityou, Racket macros are procedures and like all procedures only have access to values in their scope. Conceptually, yes, macros replace code with other code, but how they do this is not like a glorified C preprocessor. One way to manage this: you can move the definition of the procedure

Re: [racket-users] [ANN] MrEd Designer update

2017-09-30 Thread Deren Dohoda
Thanks, Laurent. MrEd is extremely handy. Deren -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options,

Re: [racket-users] new to racket‎

2017-08-05 Thread Deren Dohoda
Hello. Racket is a language in which there are procedures and special forms (syntax). When a procedure is called, arguments to it are evaluated, and the result of that evaluation is then used in the procedure. Consider it like this: > (+ (* 2 3) (/ 2 3)) ; evaluate argument ; (+ 6 (/ 2 3)) ;

Re: [racket-users] Boot To Racket

2017-07-08 Thread Deren Dohoda
I actually use Racket in an embedded linux scenario on a 32-bit ARM. The board has Debian installed but without twiddling boots under busybox. Once upon a time I thought about giving a 5-minute presentation at Racketcon on the experience of using Racket in this way but it never happened. It's very

Re: [racket-users] hacking falsiness

2017-07-01 Thread Deren Dohoda
Matthew, If your #lang has Greg's "if" then any module written in that #lang will use that "if". So if I understand, your concern is that someone calls a procedure which has some conditional behavior but that procedure, being written in another module entirely, won't use Greg's "if". That is,

[racket-users] Re: Plot: line with histogram

2017-06-30 Thread Deren Dohoda
I asked too soon. It appears that the markers for histograms are not ticks. So you can simply parameterize plot-x-ticks to no-ticks. This does not affect the histogram markers. Sorry for the noise. Deren On Fri, Jun 30, 2017 at 2:28 PM, Deren Dohoda <deren.doh...@gmail.com> wrote:

[racket-users] Plot: line with histogram

2017-06-30 Thread Deren Dohoda
Hi Racketeers, I'm trying to put a horizontal line on a histogram plot so one can see whether the height passes some threshold. It's no problem for plot, but the ticks generated are some combination of how (function ...) wants to have ticks and how (discrete-histogram ...) wants to have ticks.

Re: package naming (Was: [racket-users] Re: GLPK: how many chickens to invite to your picnic?)

2017-06-23 Thread Deren Dohoda
I already screwed up my uploaded package by using a plural and then later read that the style guide suggests singulars. Embarrassing. On Fri, Jun 23, 2017 at 5:57 PM, Neil Van Dyke wrote: > Jack Firth wrote on 06/23/2017 04:47 PM: > >> Pot-stirring question: do you think

Re: [racket-users] Expanding a macro into multiple syntax objects (Defining two things with one macro)

2017-06-22 Thread Deren Dohoda
Hi Sam, ​I'm a little unclear on your intended use case since (begin ...) does splice defines, for instance: (define (add-something x) (begin (define one 1) (define two 2)) (+ x one two)) ;; Welcome to DrRacket, version 6.9 [3m]. Language: racket/base, with debugging; memory

Re: [racket-users] Some inconsistent behavior with mutable prefab structs

2017-06-22 Thread Deren Dohoda
e the problem. Running in a fresh Racket > avoids any cached structure type for the prefab. > > The problem is specific to prefab struct types that include an auto > field. > > I'll push a repair. Thanks for the report! > > At Thu, 22 Jun 2017 10:38:36 -0400, Deren

[racket-users] Some inconsistent behavior with mutable prefab structs

2017-06-22 Thread Deren Dohoda
Hi Racketeers, I am having some frustrations dealing with mutable prefab structures, getting errors about attempting to mutate an immutable structure. I wish I could give you a sequence of simple steps that I know for sure would reproduce the problem but I have not found them. I thought I had one

Re: [racket-users] Code critique (of naive code) would be very appreciated

2017-06-21 Thread Deren Dohoda
Hi Glenn, Because of the submodule system it's not necessarily a good idea to put running code in the file directly. If you want something to run when the file is the main file (e.g. run in drracket) you can use (module* main #f ...). This way (module+ test ...) doesn't execute these things, and

Re: [racket-users] RacketCon Code of Conduct

2017-06-19 Thread Deren Dohoda
If by whiskey, Jack. Your guarantees on this matter are unenforceable and therefore meaningless, and any further comment on my ignorance will likely violate any CoC you care to throw your weight behind, so best get it out now because you can't unring this bell. On Mon, Jun 19, 2017 at 8:08 PM,

Re: [racket-users] RacketCon Code of Conduct

2017-06-19 Thread Deren Dohoda
>Bluntly, if someone finds the admonition to refrain from harassment "censorious", then it is likely they are exactly the sort of person that a Code of Conduct is in fact *designed* to make feel unwelcome. These are invariably motte and bailey style arguments and the notion that the only reason I

Re: [racket-users] RacketCon Code of Conduct

2017-06-17 Thread Deren Dohoda
I don't believe virtue signaling can ever substitute for actual virtue. If, however, a failure to signal virtue is interpreted as a vice, then this is a sticky situation indeed. There is the argument that if everyone behaved we wouldn't need laws, but there is also the argument that people still

[racket-users] Standalone Executables and shared libraries

2017-02-24 Thread Deren Dohoda
Hi racketeers, I must be doing something wrong. I apologize for a very long explanation of incongruities I find. What is the intended method of using shared libraries in Racket so that --- DrRacket works when the file is opened --- DrRacket works when the file is opened from the recently used

Re: [racket-users] Package layout in docs

2017-01-29 Thread Deren Dohoda
Honestly I've never even thought about this. I just look at the "require" form at the top of the docs. Since I always use racket/base as my main language, everything feels like extra. On Sun, Jan 29, 2017 at 8:45 AM, Matthew Flatt wrote: > At Sat, 28 Jan 2017 22:51:43 -0800

[racket-users] Package Providing results from another package

2017-01-26 Thread Deren Dohoda
I have a collection based on polynomial code I wrote which I intend to release at some time in the near future for some simple data processing routines. The somewhat optimized underlying data structure for random access use of one of my procedures would be a tree, but the somewhat optimized

Re: [racket-users] String to list?

2017-01-12 Thread Deren Dohoda
In general you can (read (open-input-string " ...")). In this case (second (read (open-input-string "'(2 2 2)"))) Since read will quote the input and if you don't take the second element you'll get ''(2 2 2) Deren On Fri, Jan 13, 2017 at 2:18 AM, Andreas Olsson wrote:

Re: [racket-users] [ANN] New packages: compose-app and retry

2017-01-11 Thread Deren Dohoda
Thanks a lot! Retryers are fantastic. I have poorly written this code more than a few times and I like the model a lot. Deren On Tue, Jan 10, 2017 at 10:31 PM, Jack Firth wrote: > I've added two new packages to the package catalog. The first, > `compose-app`, provides a >

[racket-users] literals vs datum-literals in syntax-parse

2017-01-10 Thread Deren Dohoda
I am still making most macros using syntax-rules and syntax-case because when I happened to learn macros these were the paths of least resistance. Every once in a while I try to learn a little more of syntax-parse since the few times I've tried it I really liked it. It appears that, in general,

Re: [racket-users] racket 6.7 minimal+prebuilt no raco make?

2017-01-10 Thread Deren Dohoda
Thanks, Sam. Got it. On Tue, Jan 10, 2017 at 10:23 AM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote: > The `compiler-lib` pkg will install the `raco make` command. > > Sam > > On Tue, Jan 10, 2017 at 10:21 AM, Deren Dohoda <deren.doh...@gmail.com> > wr

[racket-users] racket 6.7 minimal+prebuilt no raco make?

2017-01-10 Thread Deren Dohoda
Basically the subject. Downloaded the source for 6.7 minimal with prebuilt packages, compiled. I didn't see any errors. But apparently there's no "make" command for raco? The docs don't indicate this disappeared so I am a little confused. raco help indicates make is not a recognized command:

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

2017-01-04 Thread Deren Dohoda
> On Wed, Jan 4, 2017 at 12:46 PM, Deren Dohoda <deren.doh...@gmail.com> > wrote: > > Some food for thought on this topic, I use base conversion for all sorts > of > > silly things. To this end I require a great deal of flexibility in > > representa

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

2017-01-04 Thread Deren Dohoda
Some food for thought on this topic, I use base conversion for all sorts of silly things. To this end I require a great deal of flexibility in representation. When I wrote my continued-fractions package I included this as a separate module. Here's an example: Welcome to DrRacket, version 6.7

Re: [racket-users] Newbie seeking advice

2016-12-20 Thread Deren Dohoda
I learned programming for fun. I still enjoy it today, but I don't think I would have stuck with it without aspirations of endless tinkering. It is that aspect I seem to enjoy the most. Counterfactual scenarios are too easy to wax philosophical about. I didn't start with any lisp, but I wish I

Re: [racket-users] Custodian/Will question

2016-04-21 Thread Deren Dohoda
tthew Flatt" <mfl...@cs.utah.edu> wrote: > At Tue, 19 Apr 2016 10:39:57 -0400, Deren Dohoda wrote: > > I have a thread that can only be shut down during certain points: > > In general, you can't implement that safety in Racket, in much the same > way you can't impleme

[racket-users] Custodian/Will question

2016-04-19 Thread Deren Dohoda
Hi Racketeers, I'm a little unclear on the right way to use custodians and wills. I have a thread that can only be shut down during certain points: it does some writing operations on a port and this write must finish under normal circumstances. I worry that if this thread is managed by a

Re: [racket-users] racket users fight for their right to colon keywords

2015-10-15 Thread Deren Dohoda
I don't have a very strong opinion, it seems like convenient syntax, but half of what draws me to stick with lisps is the low amount of syntax. Pound-colon has a strong line noise quality to it which colons lack, I admit. But they also have an explicit feel which colons lack. Inclusion or

Re: [racket-users] Formatting Function

2015-10-12 Thread Deren Dohoda
Hi Taro, Probably racket/format is what you need to look at. http://docs.racket-lang.org/reference/strings.html#%28mod-path._racket%2Fformat%29 #lang racket/base (require racket/format) (define (this-format num) (~a #:min-width 3 #:align 'right #:pad-string "0" num)) (this-format 5) ;=>

Re: [racket-users] namespace-undefine-variable! question

2015-08-27 Thread Deren Dohoda
Hi Jos, But some of them I want to undefine. Isn't it easier to make your own restricted #lang and then use make-module-evaluator? Sorry to butt in. Deren On Thu, Aug 27, 2015 at 1:24 PM, Jos Koot jos.k...@gmail.com wrote: Thanks for your prompt and clear reply. I admit I don't fully

Re: [racket-users] Re: Continued Fraction Arithmetic Package

2015-08-26 Thread Deren Dohoda
from pkgs.racket-lang.org. It's quick, simple and painless, and will make your library easily available to anyone. Vincent On Wed, 26 Aug 2015 10:12:26 -0500, Deren Dohoda wrote: I did not. I wasn't sure what the protocol is there. Deren On Aug 26, 2015 11:10 AM, Vincent St

Re: [racket-users] Re: Continued Fraction Arithmetic Package

2015-08-26 Thread Deren Dohoda
I did not. I wasn't sure what the protocol is there. Deren On Aug 26, 2015 11:10 AM, Vincent St-Amour stamo...@eecs.northwestern.edu wrote: Awesome! Did you add it to pkgs.racket-lang.org? I didn't find it. Vincent On Tue, 25 Aug 2015 21:54:55 -0500, Deren Dohoda wrote: Hello

[racket-users] Re: Continued Fraction Arithmetic Package

2015-08-25 Thread Deren Dohoda
Hello Racketeers, The continued fractions package has made its first release, complete with documentation and hopefully enough good examples. You can find it at https://github.com/derend/continued-fractions Short story: (require continued-fractions) logs, exponentials, trig, hyperbolic trig,

[racket-users] Re: DrRacket Scribbles OK, but can't build docs with raco

2015-08-24 Thread Deren Dohoda
I have tracked it down finally to a very stupid error. Some uses of @examples or @interaction-eval were not given quoted expressions and this was the problem. It's actually surprising that it works in DrRacket, which was very misleading. Deren On Sun, Aug 23, 2015 at 10:54 PM, Deren Dohoda

[racket-users] Re: DrRacket Scribbles OK, but can't build docs with raco

2015-08-24 Thread Deren Dohoda
/blob/master/continued-fractions/cf-manual.scrbl Deren On Mon, Aug 24, 2015 at 11:40 AM, Deren Dohoda deren.doh...@gmail.com wrote: I have tracked it down finally to a very stupid error. Some uses of @examples or @interaction-eval were not given quoted expressions and this was the problem. It's

Re: [racket-users] Re: DrRacket Scribbles OK, but can't build docs with raco

2015-08-24 Thread Deren Dohoda
AM, Deren Dohoda deren.doh...@gmail.com wrote: Actually quoting it was the wrong thing to do, as I found out when I finally looked at the docs. The docs are not very complicated, if someone could take a look at the cf-manual.scrbl and see if something obvious is going wrong I'd

[racket-users] DrRacket Scribbles ok, but can't install the docs

2015-08-23 Thread Deren Dohoda
I have a scribble document with several examples. When I view the scribble html output by using DrRacket, all the examples are fine, the output is correct, and I see no errors. Then I go to the directory, use raco pkg install, and I get a major text dump which starts with cannot instantiate

[racket-users] DrRacket Scribbles OK, but can't build docs with raco

2015-08-23 Thread Deren Dohoda
I have a scribble document with several examples. When I view the scribble html output by using DrRacket, all the examples are fine, the output is correct, and I see no errors. Then I go to the directory, use raco pkg install, and I get a major text dump which starts with cannot instantiate

Re: [racket-users] macro making a struct with a macro

2015-08-17 Thread Deren Dohoda
)) ...)) ;; testing it out (struct test (a b c)) (define x (test 1 2 3)) (define-struct-fields test (a b) x) a b Or do you want it even more automatic than that? On Aug 17, 2015, at 11:29 PM, Deren Dohoda deren.doh...@gmail.com wrote: Suppose I have a struct which implements a generic

[racket-users] macro making a struct with a macro

2015-08-17 Thread Deren Dohoda
Suppose I have a struct which implements a generic interface. I'll copy and paste the interface from the guide for the example. What I'd like to do is have automatically-introduced syntax which allows you to skip a lot of the struct-accessor forms. So for instance, for a struct like (struct test

Re: [racket-users] macro making a struct with a macro

2015-08-17 Thread Deren Dohoda
-output-port)]) (struct-values (a) ps) (print a out))]) (gen-print (test 1 2 3)) On Aug 18, 2015, at 12:20 AM, Deren Dohoda deren.doh...@gmail.com wrote: Thanks for your help Alexander. I did have this much working alright in a different manner. What I guess I wanted was that this syntax

[racket-users] Continued Fraction Arithmetic Package

2015-08-15 Thread Deren Dohoda
Hi Racketeers, I'm working on a continued fraction arithmetic package for arbitrary precision arithmetic. I have the basics implemented and functioning and would like to know which features people would like available as an interface, and I'll see if I can provide it. What you can already expect

Re: [racket-users] #lang languages and REPL

2015-08-07 Thread Deren Dohoda
Short version: __Thank you__ It does appear that I do not need the #%module-begin rewrite in this test case. However, the point of the language is to create a dictionary of procedures and provide a run procedure which accepts a symbol and returns the procedure in the dictionary. My concern was

[racket-users] #lang languages and REPL

2015-08-07 Thread Deren Dohoda
I have a #lang I'm working on and everything seems to be going very well. One thing I don't understand, though, is that when a file written in this language is opened in DrRacket and Run, I still have to (require file.rkt) in the REPL before I am able to use anything provided by the file. I

Re: [racket-users] #lang languages and REPL

2015-08-07 Thread Deren Dohoda
not sure what's going on. How are you defining it? Can you show us some of the source code? On Aug 7, 2015, at 1:09 PM, Deren Dohoda deren.doh...@gmail.com wrote: I have a #lang I'm working on and everything seems to be going very well. One thing I don't understand, though, is that when

[racket-users] Some help with syntax-parse: macro in macro

2015-07-31 Thread Deren Dohoda
Suppose I have a macro (experiment ...) which is intended, among other things, to be composed of uses of a macro (collect ...). For instance: (experiment (collect ...) (collect ...) ...) To my understanding, collect is not a literal. Can I turn the collect macro itself into a syntax class

Re: [racket-users] Some help with syntax-parse: macro in macro

2015-07-31 Thread Deren Dohoda
in #:datum-literals if it is not a defined name. Can you describe some usage examples? That may lead to better insight for the implementation. On Fri, Jul 31, 2015 at 11:49 AM, Deren Dohoda deren.doh...@gmail.com wrote: Suppose I have a macro (experiment ...) which is intended, among other

Re: [racket-users] scribble namespace landgrab embedded package documentation

2015-05-08 Thread Deren Dohoda
How does this really differ from literate programming? Deren On May 4, 2015 7:39 PM, Neil Van Dyke n...@neilvandyke.org wrote: For purposes of embedding docs for a package in its Racket source file(s), anyone care whether I landgrab some names in the Scribble namespace (for package metadata)?

Re: [racket-users] raco make, file permissions, and unstable directories

2015-04-19 Thread Deren Dohoda
an error message pointing out the version mismatch.) Robby On Wed, Apr 15, 2015 at 12:50 PM, Deren Dohoda deren.doh...@gmail.com wrote: Hi group, I use Racket in an embedded linux system. My normal development process is to write Racket code in Windows, transfer this to the embedded