[racket] Revisiting Racket on ARM

2011-11-15 Thread Deren Dohoda
It looks like everything is moving ahead fine for the Raspberry Pi, a ridiculously inexpensive single-board computer based on ARM. The mailing list here doesn't have a lot of discussion on ARM except as it related to things like tablets. While it might be fun to tinker on my phone with Racket, I co

Re: [racket] Revisiting Racket on ARM

2011-11-15 Thread Deren Dohoda
Ahh, excellent. I had no idea that this work was already done. Thanks. On Nov 15, 2011 4:59 PM, "Brian Mastenbrook" wrote: > > On 11/15/2011 01:35 PM, Deren Dohoda wrote: >> >> It looks like everything is moving ahead fine for the Raspberry Pi, a >> ridiculously

[racket] What does "

2011-11-18 Thread Deren Dohoda
_ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

[racket] What does "delay" delay?

2011-11-18 Thread Deren Dohoda
Sorry about the other message, the enter key got in the way. Consider this code: #lang racket (define x 10) (define d (delay ((λ(x) (* x x)) x))) (define d2 (* x x)) (define d3 (apply * (list x x))) (define d4 (apply * `(,x ,x))) (define d5 (apply (λ(x) (* x x)) (list x))) (set! x

Re: [racket] What does "delay" delay?

2011-11-18 Thread Deren Dohoda
"calculate (* x x) at some point in the future". > > Hope this helps, > configurator > > 2011/11/18 Deren Dohoda > >> Sorry about the other message, the enter key got in the way. >> >> Consider this code: >> >> #lang racket

Re: [racket] accessing serial communications on Racket/Windows?...

2012-03-23 Thread Deren Dohoda
When I used the serial port in windows I had to flush to send. I also used the input/output file not two separate ones. On Mar 13, 2012 1:28 PM, "Matthew Flatt" wrote: > At Tue, 13 Mar 2012 17:20:12 +0100, Rüdiger Asche wrote: > > Thanks, that sort of works, but only sort of... here is the portmo

[racket] Plot: plot-new-window never happens?

2012-04-17 Thread Deren Dohoda
I was messing around with a spline utility last night and was using the plot-new-window? setting to get a plot. The goal was to share an exe with a coworker who doesn't have Racket. Just a command-line app but to get the plot to display I needed a window and this seemed awesome. The problem is I co

Re: [racket] Plot: plot-new-window never happens?

2012-04-17 Thread Deren Dohoda
? dummy) (zero? dummy)) >             (void) >             (begin >               ;; queue a callback instead of `plot' directly: >               (queue-callback >                (lambda () >                  (plot (function (λ(x) (* x x)) -2 2 >               (loop &g

Re: [racket] Plot: plot-new-window never happens?

2012-04-17 Thread Deren Dohoda
; >> > > >> > #lang at-exp racket > >> > (require plot > >> >racket/gui/base) > >> > (plot-new-window? #t) > >> > (yield > >> >(thread > >> > (lambda () > >> > (let loop () &g

[racket] Plot: #:samples parameter of function---is this what was meant?

2012-04-18 Thread Deren Dohoda
This is very counter-intuitive to me: #lang racket (require plot) (plot (list (axes) (function (λ(x) (* x x)) #:samples 4 -2 0) ; 2 samples?! (function (λ(x) (* x x)) #:samples 8 0 2))) ; 4 samples?! It is really surprising to suppose that the number of samples isn't spec

[racket] scribble/lp: comments stripped, how to stop?

2012-04-21 Thread Deren Dohoda
I have finally started learning scribble for use in literate programming to break away from noweb for Racket. It's quite excellent, I am glad to be making the switch. Thank everyone for their work. I miss the math of latex but it isn't a dealbreaker. However, part of writing code is commenting the

Re: [racket] scribble/lp: comments stripped, how to stop?

2012-04-21 Thread Deren Dohoda
g it. Deren On Sat, Apr 21, 2012 at 9:07 PM, Matthias Felleisen wrote: > > Do you use > > @;% > @(begin > #reader scribble/comment-reader > (racketblock > (place-image ROCKET X ... MTSCN) > )) > @;% > > to write down code blocks? It installs a reader that can cope wi

Re: [racket] scribble/lp: comments stripped, how to stop?

2012-04-23 Thread Deren Dohoda
haven't used /lp myself. I am stuck here -- Matthias > > > > On Apr 22, 2012, at 12:25 AM, Deren Dohoda wrote: > > > Hi Matthias, > > > > I cannot seem to get it to work. I can get scribble to be happy, but > > not the scribble/lp file. > > &g

Re: [racket] scribble/lp: comments stripped, how to stop?

2012-04-23 Thread Deren Dohoda
nning text that gets produced > when you render the document with Scribble (and dropped when > evaluated). > > If that's not making sense, maybe you could supply a little example to > help clarify? > > Thanks, > Robby > > On Sat, Apr 21, 2012 at 3:53 PM, Deren Do

Re: [racket] scribble/lp: comments stripped, how to stop?

2012-04-23 Thread Deren Dohoda
to s-expressions, but that seems a bit complex to wire in, at least > to me.) > > Sorry I don't have a more directly helpful answer for you. > > Robby > > On Mon, Apr 23, 2012 at 8:22 PM, Deren Dohoda wrote: >> Hi Robby, >> >> Yes, you are right, it i

[racket] Some questions about PLaneT

2012-04-25 Thread Deren Dohoda
Dear list members, I have some code that I think might be nice to have up on PLaneT. Of course I'd be willing to maintain it or add features as necessary. But I have some questions and I'd like to understand how people view PLaneT packages. 1) I have a library for generating natural splines from

Re: [racket] Quick on-screen documentation

2012-04-27 Thread Deren Dohoda
Sorry, supposed to be to all: WinXP, DrRacket 5.2 Edit: Show Active Keybindings: string: expects argument of type ; given f1 === context === C:\Program Files\Racket\collects\drracket\private\frame.rkt:45:13 C:\Program Files\Racket\collects\racket\private\map.rkt:45:11: for-each C:\Program Files

Re: [racket] Plot: #:samples parameter of function---is this what was meant?

2012-04-27 Thread Deren Dohoda
oped. Which means, short version: plot is still awesome. Thanks, Deren On Fri, Apr 27, 2012 at 4:30 PM, Neil Toronto wrote: > Sorry it took so long to reply. I let my email backlog get too large. > > > On 04/18/2012 01:27 PM, Deren Dohoda wrote: >> >> This is very counte

Re: [racket] idiomatic and fast

2012-04-28 Thread Deren Dohoda
I don't know if I could ever be a resource on "most idiomatic", especially since I basically never use any of the for/et ceteras but this feels reminiscent of "The Little Schemer" to me (except for the internal define instead of letrec): (define (make-triangles to-n) (define (next-triangle last-

Re: [racket] Quick on-screen documentation

2012-04-29 Thread Deren Dohoda
n Fri, Apr 27, 2012 at 21:54, Laurent wrote: >>> >>> >>> >>> On Fri, Apr 27, 2012 at 21:08, Deren Dohoda >>> wrote: >>>> >>>> Sorry, supposed to be to all: >>>> >>>> WinXP, DrRacket 5.2 >>>&g

Re: [racket] Mutable state vs RAM on fire

2012-05-02 Thread Deren Dohoda
I have a polynomial library I wrote for other purposes. It also uses list of numbers, though it isn't a sparse representation so exponents are assumed. Can't click your link right now, on my phone, but if you don't have an example problem, could you post one for me to try with my library? Then id k

Re: [racket] Mutable state vs RAM on fire

2012-05-02 Thread Deren Dohoda
rst version crapped out around 10; the new version can handle 300. > > > tk > > > > On Wed, May 02, 2012 at 05:13:00PM -0400, Deren Dohoda wrote: >> I have a polynomial library I wrote for other purposes. It also uses list >> of numbers, though it isn't a sparse re

Re: [racket] Mutable state vs RAM on fire

2012-05-02 Thread Deren Dohoda
t; magnitude, now. > > https://github.com/TurtleKitty/Dice/blob/e69dc696f4d36a7dfdb6ec28676f5c002f5de6b1/dice.rkt > > This process has been educational. > > > tk > (Also fixed a couple of bugs and added a histogram.) > > > On Wed, May 02, 2012 at 08:52:25PM -0400, Deren Dohoda wrote: >> What sort of time are you looking for for it to be "handled"? >> >> Deren >> Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Mutable state vs RAM on fire

2012-05-03 Thread Deren Dohoda
This reminded me that I had a similar kind of recursion issue when I wrote some code for generating integer partitions. In the end I abandoned the stack+tail recursion form and accumulated a list of things to do when I thought I was done, which made all calls tail calls. It significantly sped up th

Re: [racket] The value of a language

2012-05-09 Thread Deren Dohoda
I have to disagree, with qualifications. Most of my programming is in c in embedded systems. Small ones. API is totally irrelevant. And when I leave that domain, it is to solve problems, the kind of problems there aren't APIs for. My needs are basically library-based, but no general purpose languag

Re: [racket] `def' ?

2012-05-11 Thread Deren Dohoda
-1 But this is why we can make our own #langs. On May 10, 2012 11:55 PM, "Michael W" wrote: > Yes! Hear, hear! Having to explicitly write all the references > out and get their types right is a pain point for me. Maybe it's > encouraged by the design recipe, but sometimes I get jealous of > lang

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

2015-04-15 Thread Deren Dohoda
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 computer, and then use raco make in the Debian system. But when the system is powered on, it doesn't boot to Debian, it boots to a busybox OS where th

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

2015-04-19 Thread Deren Dohoda
zo files will work. (And if you don't, you'll > get an error message pointing out the version mismatch.) > > Robby > > > > On Wed, Apr 15, 2015 at 12:50 PM, Deren Dohoda > wrote: > > Hi group, > > > > I use Racket in an embedded linux system. My no

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" 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)? > > I'm thinkin

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

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

2015-07-31 Thread Deren Dohoda
might want to specify "collect" 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 > wrote: > > Suppose I have

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

2015-08-05 Thread Deren Dohoda
hat I should be able to build upon without troubles.​ Deren On Fri, Jul 31, 2015 at 12:29 PM, Deren Dohoda wrote: > Hi Stephen, > > At the moment, "collect" is syntax, itself defined through syntax-parse. > So you suggest making "collect" a literal and changing

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

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

2015-08-07 Thread Deren Dohoda
o anything special with > #%top-interaction or anything, so I'm 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 wrote: > > > I have a #lang I'm working on and everyt

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 w

[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

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

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

2015-08-17 Thread Deren Dohoda
(begin > (define s v) > (define field (struct-field s)) > ...)) > ;; 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

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

2015-08-17 Thread Deren Dohoda
en > [(define-syntax-rule (sv (fld ooo) v) >(define-struct-fields struct-name (fld ooo) v)) > body ...])) > > (pstruct test (a b c) > #:methods gen:printable > [(define (gen-print ps [out (current-output-port)]) > (struct-values (a) ps) > (print

[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 'rack

[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 'rack

Re: [racket-users] `divides?` from math/number-theory slow?

2015-08-24 Thread Deren Dohoda
Is it because you're not using typed racket? On Aug 24, 2015 6:42 AM, "Rickard Andersson" wrote: > Hi, > > I noticed that the `divides?` function from math/number-theory seems to be > a huge bottleneck for whatever reason. > > This seems strange to me, but I figured I'd write to the list to see i

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

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

2015-08-24 Thread Deren Dohoda
tions/blob/master/continued-fractions/cf-manual.scrbl Deren On Mon, Aug 24, 2015 at 11:40 AM, Deren Dohoda 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.

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

2015-08-24 Thread Deren Dohoda
f-manual.scrbl and see if something obvious is going wrong I'd > appreciate > > it. > > > > > https://github.com/derend/continued-fractions/blob/master/continued-fractions/cf-manual.scrbl > > > > > > Deren > > > > On Mon, Aug 24, 2015 at 11:40 AM, De

[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, prec

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

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

2015-08-26 Thread Deren Dohoda
and install your library. The > build status and docs for your package will also be available 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 2

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 wrote: > Thanks for your prompt and clear reply. > I admit I don't fully understand the map? argu

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

Re: [racket] Interesting article

2010-08-11 Thread Deren Dohoda
I am a novice, self-taught programmer. Please forgive this possibly naive question, but what's the problem? The big post I read seems to say this one sentence: different containers are different, but they should act the same. But, different containers are different for a good reason. Take a linke

[racket] Literate Programming and Scribble

2010-09-09 Thread Deren Dohoda
I am sorry to ask such introductory questions, but it's killing me to see "literate programming" in Racket while finding myself unable to use it. I love noweb and all, but I am writing a literate Racket program and, well, I'd like to use Racket. 1) Is this intended correct flow: literate program i

Re: [racket] Looking for feedback on code style

2010-09-10 Thread Deren Dohoda
This format is a pretty good idea. I like how HTDP pushes it from the beginning. But is something like this a good idea? Welcome to DrRacket, version 5.0 [3m]. Language: racket; memory limit: 1024 MB. > (require user/help) > (help foo) No help available. > (help help) help (or (name -> void) (void

Re: [racket] handy trick for "amb-collect" desired

2010-09-12 Thread Deren Dohoda
You might want to consider something like the "Backtracking via the stream of successes" mentioned in SRFI 41, unless you are very wed to amb. On Sun, Sep 12, 2010 at 10:16 AM, Stefan Busch wrote: > Hello racket community, > > though it may be impolite to enter the community with a wish, > I'd li

Re: [racket] internal definitions in r6rs

2010-09-18 Thread Deren Dohoda
Hi Jos, (meant to reply to all... sorry) (letrec () exps ...) where is ( ) ... >From page 36 on letrec: "It must be possible to evaluate each without assigning or referring to the value of the corresponding or the of any bindings that follow it in ." In short: you can use the *name* but you

Re: [racket] internal definitions in r6rs

2010-09-18 Thread Deren Dohoda
I see, please ignore my last response, as you were talking about letrec* and not letrec. Deren On Sat, Sep 18, 2010 at 3:33 PM, Deren Dohoda wrote: > Hi Jos, > > (meant to reply to all... sorry) > > (letrec () exps ...) > where is > ( ) ... > > From page 36 on letrec

Re: [racket] internal definitions in r6rs

2010-09-18 Thread Deren Dohoda
answer. > Jos > >> -Original Message----- >> From: Deren Dohoda [mailto:deren.doh...@gmail.com] >> Sent: 18 September 2010 21:35 >> To: Jos Koot >> Cc: PLT-Scheme Mailing List >> Subject: Re: [racket] internal definitions in r6rs >> >> I see, please ig

Re: [racket] internal definitions in r6rs

2010-09-18 Thread Deren Dohoda
list I am back where I started. As, unfortunately, are you. Deren On Sat, Sep 18, 2010 at 6:50 PM, Deren Dohoda wrote: > Actually, after reading more, letrec* also demands (again page 36, top > of second column): > > "It must be possible to evaluate each without assigning or &

Re: [racket] Is there a name for: (lambda (x) (x)) ?

2010-09-23 Thread Deren Dohoda
It's interesting that (map apply ...) doesn't work, as this would have been the very first thing I tried (and probably the first thing you tried). You can pull it off with (map apply (list thunk thunk thunk) (list empty empty empty)) but that's hardly any better than the "thunk-apply" you cre

Re: [racket] Help: Running racket programs from command line

2010-09-28 Thread Deren Dohoda
Shad, what you're looking for, I believe, is local-require. On Tue, Sep 28, 2010 at 5:07 PM, A Z wrote: > Hello, > > There is a problem. 'require' does not go inside the definition of a > function. DrRacket complains that it needs to go in a module. > > I need (require path) inside a function bec

Re: [racket] Math Guidance

2010-11-05 Thread Deren Dohoda
> Unless you are headed for CS grad school or are Google/Microsoft material > (by ability > or by being in a brand name school) nobody really cares about your CS degree. I'm a self-taught programmer that would love to get an entry-level programming job. I've yet to see a job listing that doesn't

Re: [racket] in-line documentation program? Like Javadoc or Doxygen

2011-04-05 Thread Deren Dohoda
Have you looked at literate programming tools like noweb, and the literate tools in Racket? On Apr 5, 2011 2:52 PM, "Charles Hixson" wrote: > Is there there a program roughly similar to doxygen or javadoc for > Scheme or Racket? > > I know myself to well to believe that I will document something,

Re: [racket] Three new builds

2011-05-06 Thread Deren Dohoda
Oh, so many thinks for the debian builds! Very appreciated here. On May 6, 2011 5:23 PM, "Eli Barzilay" wrote: > Three new builds are now available as nightly builds (and will be > included in the next release): > > * Two x86_64 debian builds, thanks to Mason Loring Bliss for > volunteering server

[racket] Where Are List/Container Operations Headed?

2011-05-15 Thread Deren Dohoda
Please forgive my ignorance on this matter. (cons value list) --- Well, makes intuitive sense to put the container second here. (map proc list) --- Reads like English. (foldl proc init list) --- Hmm, I guess the association with "map" makes this understandable. (take list 2) (drop list 2) --- OK,

Re: [racket] Getting started with R6RS

2011-05-15 Thread Deren Dohoda
> Elliot pointing out the Learn You A Haskell website and the Learn You > Some Erlang website was probably the most helpful part of this entire > email - the docs are great. DrRacket is great. The website design of the > docs are intuitive and focus the attention just right (I really do thing > thi

Re: [racket] Where Are List/Container Operations Headed?

2011-05-16 Thread Deren Dohoda
The big argument last can make sense. My style may rely too much on 'rest' arguments... for the code I seem to write, sometimes big arguments are relatively fixed so I write fake monad-like macros to sweeten the code a bit. E.g., in a simple interpreter continuously using an environment a-list. Avo

Re: [racket] disable garbage collection

2011-06-02 Thread Deren Dohoda
You might want to start at "A Real-Time Garbage Collection Framework for Embedded Systems" Fu and Hauser (2005) for some references on this theme, Neil. On Jun 2, 2011 3:18 PM, "Neil Van Dyke" wrote: _ For list-related administrative tasks: http:

Re: [racket] Tutorial: writing a language (brainf*ck) in Racket

2011-06-14 Thread Deren Dohoda
It was a very good read. Maybe too many parentheticals to avoid technical errors? It is hard to comment until I try it myself. In any case, I think I needed something exactly like this, so thank you very much. Deren On Jun 13, 2011 1:38 PM, "Danny Yoo" wrote: > I've written a tutorial about how t

[racket] Capturing Procedures in Macros: Style Question

2011-06-18 Thread Deren Dohoda
Hi everyone, I wrote a small polynomial math library. In it are operations like poly-add, poly-times, poly-expt, and poly-sub, performing the operations that should be obvious. In a language like C++, one might have defined a polynomial class and then, possibly, override the +, -, and * operators

Re: [racket] Sweet expressions; or making it easier to introduce Racket to me and my coworkers :-)

2011-07-21 Thread Deren Dohoda
Fully-parenthesized math is more difficult to read, I agree, but overall lispy syntax has really grown on me. I can't tell you how many times Excel has gotten mad at me for typing =*5A1 I think the math problem is accidental, related only to the customary use of infix. The difference between (f x

Re: [racket] Racket embedding / FFI "guide" docs?

2011-08-08 Thread Deren Dohoda
I'm not saying that the docs are perfect, but not-being-another-wiki is, to me, a feature. Deren On Aug 7, 2011 8:05 AM, "Jens Axel Søgaard" wrote: > User contributions are what is needed to improve the documentation. > > 1. It should be *easy* to report spelling errors and/or complaints > about

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

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 jus

[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))) (req

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

2018-01-25 Thread Deren Dohoda
, 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 > wrote: > >> Hi everyone, >> >> I am desperately in need of a #lang exact so that decimals ar

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 is it > suitable as pa

[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 / ra

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 thin

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

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 wri

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

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

Re: [racket-users] Custodian/Will question

2016-04-21 Thread Deren Dohoda
40 AM, "Matthew Flatt" 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 implemen

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 had

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 [3m].

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

2017-01-04 Thread Deren Dohoda
Yes, Robby, if the new base fits within the range allowed by number->string. On Wed, Jan 4, 2017 at 1:49 PM, Robby Findler wrote: > Is changing the alphabet something that can be done post-facto with > string replacements? > > Robby > > > On Wed, Jan 4, 2017 at 12:46 P

[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] 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 wrote: > The `compiler-lib` pkg will install the `raco make` command. > > Sam > > On Tue, Jan 10, 2017 at 10:21 AM, Deren Dohoda > wrote: > > Basically the subject. > > > > Downlo

[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, sy

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 > simple #%app macro for

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: > If i got " '(2 2 2) " a

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

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 (PST), Ethan Estrada

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

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 mi

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

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 i

[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

  1   2   >