Re: [racket-users] What has happened to extflonum support in 32-bit nightly builds?
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 that "longdouble.dll" is not found by Racket as embedded in your C program. As I recall, you're using some new support to gather DLLs needed for an embedding, so probably "longdouble.dll" is gathered into the right directory, but Racket isn't looking there when trying to load it. In fact, longdouble.dll is not being put into the "runtime" directory by raco ctool. All the other relevant libs (libeay32, libgmp-10, libmpfr-4, ssleay32) are there in the "runtime\lib\plt\generic\exts\ert\r2\Program Files\Racket\lib\" subdirectory. One funny thing is that this particular compiled program actually does not use extflonums during execution. racket/extflonum is (require)-d for some macros and functions, but they are not called. Maybe not putting 'longdouble.dll' there was a right decision in this case. Or it was not, because how the (eval)-aware compiler can know which functions are going to be called and which are not. I am not sure. 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. I think you'll need to call scheme_set_dll_path(), which should be exported by the libracket DLL, but it isn't currently declared in "scheme.h". __declspec(dllimport) void scheme_set_dll_path(wchar_t *s); and provide the path containing "longdouble.dll". Thanks, that has helped for 32-bit program. Regards, Dmitry -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] raco install says it is already there, raco setup says it doesn't exist ...
You can set up a package, as opposed to a collection, with `raco setup --pkgs liquid-extensions`. Sam On Thu, Nov 12, 2015 at 2:27 AM Alex Knauthwrote: > As far as I know, raco setup doesn't deal with packages, but with > collections. Assuming the `liquid-extensions` packages provides files in > the collection `liquid`, does `raco setup liquid` do what you want? > > (If you haven't seen it, this might be helpful: > http://blog.racket-lang.org/2015/08/modules-packages-and-collections.html) > > Alex Knauth > > > On Nov 12, 2015, at 2:17 AM, thomas.lynch < > thomas.ly...@reasoningtechnology.com> wrote: > > > > would some kind person clue me in to the raco setup syntax? When I try > to install this, it tells me it is there. When I run setup it says it > doesn't exist .. I must be missing a switch or something? > > > > > > §lambda1:/home/deep/liquid-extensions> raco pkg install > > raco pkg install: package is already installed > > package: liquid-extensions > > > > §lambda1:/home/deep/liquid-extensions> raco setup liquid-extensions > > collection-path: collection not found > > collection: "liquid-extensions" > > in collection directories: > > /home/mordecai/.racket/6.1/collects > > /usr/share/racket/collects > > ... [151 additional linked and package directories] > > > > §lambda1:/home/deep/liquid-extensions> raco setup . > > raco setup: bad collection path: . > > -- > 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, visit https://groups.google.com/d/optout. > -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] Mandatory arguments for command-line
Thanks, Greg, that's helpful. By the way, I love racket-mode. DrRacket is a great environment, but I get frustrated editing text in anything but Emacs (or more recently Emacs with Evil via Spacemacs). Racket-mode provides enough support that I only switch into DrRacket when I've hit the wall with debugging. It probably shows, but I'm just beginning to work with Racket proper and while the documentation is exhaustive, there's just so much to learn. I did two passes on Gregor Kiczales' Systematic Programming Design MOOC back when it was on Coursera -- once as a student, and once as a community TA. I've passed through most of Realm of Racket and am now just trying to use Racket for things that are actually useful to me, things I would normally just do through rough and raunchy adhoc shell scripting. I'm switching back and forth between the guide and the reference and grepping the codebase to find examples of in-the-wild usages. As a curiosity, I had my co-worker who doesn't code read over the original Python script I'd written, and this Racket script and he commented that he found the Racket version easier to follow. I agree. I've found it easy to get simple things done in Python, and that mostly without knowing what I'm doing. Doing the same things in Racket has required a little more effort to research how to solve the problem, but I'm happier with the end result and feel better about it, somehow. Thanks again, Christopher -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] Mandatory arguments for command-line
I don't know how to make the `command-line` syntax do this (there's no flag-clause like `#:required-once`). So I think I'd just do a normal test outside it: (define destination (make-parameter #f)) ;default to #f meaning "unspecified" (command-line your existing code ) (define (main) (unless (destination) (raise-user-error "The -d option is required.")) your existing code ) p.s. Not too many versions ago Racket added a `main` submodule [1]. Using that would let other, "helper" functions be used and tested independently. However for what you have, now, the way you're doing it also seems fine. [1]: http://docs.racket-lang.org/guide/Module_Syntax.html#%28part._main-and-test%29 -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] How to get information about where an error occurs, in a stack trace context?
At Sun, 8 Nov 2015 21:56:04 -0500, Ben Lerner wrote: > > On 11/8/2015 9:18 PM, Nota Poin wrote: > >> Or if you insist on command line usage, use error trace. > > What's wrong with command line usage? Anyway, I was going to say this: > > > > http://docs.racket-lang.org/errortrace/using-errortrace.html > > > > That seems to enable stack traces that work. > > > Relatedly, is there a way to use this stacktrace mechanism with > scribble? That is, can I write `scribble -l errortrace files>` or `racket -l errortrace > `, or would that not work out for some reason? For errors while a document is constructed, just running racket -l errortrace -t would work, since a Scribble document is a Racket program. For an error that happens only during rendering, you could use racket -l errortrace -l scribble/run since the `scribble` program just runs the `scribble/run` module. I'm not sure why it's `scribble/run` instead of just `scribble`, and maybe it's worth adding a `scribble` module as an alias. I'll think about that more, in case there was a reason that I've forgotten. -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] How to "strip" a package installation with "raco pkg install"
Splitting "foobar" into "foobar-lib", "foobar-doc", etc., certainly solves the problem, and that approach is used widely for packages in the main distribution. It's also kind of a pain, though, and `--binary-lib` is intended to be a more automatic solution --- with the trade-off that built packages need to be made available. Yes, a script would need to traverse package dependencies. If you already have the desired package installed somewhere, you should be able to traverse packages in that installation.[*] Various functions from `pkg/lib` and `setup/getinfo` can help implement the traversal, including `pkg-directory`, `get-info`, and `extract-pkg-dependencies`. [*] There's a potential issue with platform-specific dependencies, but that's not an issue if the relevant packages tend are already available in built form, as for the platform-specific packages in the main distribution. At Wed, 11 Nov 2015 10:03:00 +0100, Daniel Brunner wrote: > Hi Matthew, > > thanks for your post and your hints. Now I have a better idea on what is > going on. I managed to strip the packages with the "raco pkg create" > command. > > But for a script hmmm... That script would need to check all > dependencies on the target system then create the packages on a "build" > system load them on the target system and install them? Or did I miss > something? > > Wouldn't it be easier for me to split my packages in "foobar-lib" and > "foobar-doc" packages to avoid the scribble dependencies coming on my box? > > Best wishes, > Daniel > > Am 10.11.2015 um 15:57 schrieb Matthew Flatt: > > You're trying the right thing, but it doesn't work because our > > package-serving infrastructure didn't quite get there. > > > > Part of the idea was that the package-build service could provide built > > versions of packages, and then you could install them from binary mode, > > but built packages have not yet been made available that way. The > > main-distribution's catalog does provide built versions of packages in > > the main distribution. Other packages are currently only available in > > source form --- at least from our servers --- and that's incompatible > > with a binary install. (Also, the current error message is not good.) > > > > If you have the package installed somewhere, you could extract a built > > version of the package using `raco pkg create --from-install`, and then > > install the built package in `--binary-lib` mode on your target > > environment. More generally, you could script the process of extracting > > built packages and assembling them into a catalog. A tool like that > > might be useful to others, too. > > > > At Tue, 10 Nov 2015 10:10:57 +0100, Daniel Brunner wrote: > >> Hello, > >> > >> I have a minimal installation of Racket and want to install a package > >> (Greg's aws package to name it) without its documentation. Otherwise > >> packages are installed. In the "info.rkt" there are "deps" and > >> "build-deps" > >> (https://github.com/greghendershott/aws/blob/master/info.rkt). After > >> reading raco's documentation I thought something like > >> > >> raco pkg install --binary-lib aws > >> > >> would give me only the code and not install scribble-lib etc. But it > >> ends with an error: > >> > >> Resolving "aws" via http://download.racket-lang.org/releases/6.2.1/catalog/ > >> Resolving "aws" via http://pkgs.racket-lang.org > >> Downloading > >> > https://github.com/greghendershott/aws/tarball/0167b4858f3ce4ee4574174699b5b1ce > >> b1058c14 > >> raco pkg install: cannot strip directory in place > >> > >> > >> Am I doing something wrong? Or is this the right way to come up with a > >> installation without documentation? > >> > >> If not, the best way would be to seperate code/documentation in packages? > >> > >> Kind regards, > >> Daniel > >> > >> -- > >> 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, visit https://groups.google.com/d/optout. > > > > -- > 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, visit https://groups.google.com/d/optout. -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] syntax-original? always returns #f within syntax transformers?
At Wed, 11 Nov 2015 10:00:15 -0800 (PST), Thomas Dickerson wrote: > On Tuesday, October 27, 2015 at 7:24:55 AM UTC-4, Matthew Flatt wrote: > > This role of marks has been taken over by macro-introduction scopes, so > > that's still the explanation. A macro-introduction scope is added to > > the right places by first adding it everywhere to the argument to a > > macro transformer, then flipping it everywhere in the transformer's > > result. > > > > (The documentation of `syntax-original?` includes an attempt to specify > > that, but none of the documentation is clear enough yet about scopes.) > > I'm looking at this documentation now ( > http://docs.racket-lang.org/reference/stxops.html#%28def._%28%28quote._~23~25ke > rnel%29._syntax-original~3f%29%29 ) and see nothing of the sort. Can you > specify where this is hypothetically being communicated? FWIW, I had in mind the "if stx’s lexical information does not indicate that the object was introduced by a syntax transformer (see Syntax Objects)" and the slightly more explicit variant in the development docs. But I completely agree that you can't get the relevant information from that sentence or the links that it refers to, and the docs still need a lot of work in this area. > That the macro stepper simultaneously allows you to click on the syntax in a > remark or local step and see #t for original?, while simultaneously returning > false for syntax-original? is incredibly user hostile. The macro stepper shows a form after expansion, while Alexis's example was looking at it during expansion (i.e., in the dynamic extent of a syntax transformer). Those different times have different syntax objects --- although one is derived from the other --- and they have different properties. In particular, the syntax object during the transformer call has an extra scope that will be canceled when it is returned back from the transformer. Inspecting syntax objects during a transformer call would be useful, but the current macro stepper doesn't do that. -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] Feasibility of Racket for scientific and engineering calculations
Hi Marc, Take a look at: https://github.com/soegaard/racket-cas Start with the readme and play with a few examples. Skim (later parts) of: https://github.com/soegaard/racket-cas/blob/master/racket-cas/racket-cas.rkt to see what's implemented. Any bug reports and comments are welcome. /Jens Axel 2015-11-12 17:26 GMT+01:00 Marc Kaufmann: > Since you mention symbolic computations: is there anything that does > symbolic differentiation in Racket - I know Maxima is written in Common > Lisp. I would I would be happy with only differentiation and little of the > other stuff, if only to check my own computations (in economics) as I have > perform a sign-error in 25% of the cases... > > On Tuesday, November 10, 2015 at 10:34:50 PM UTC-5, John Kitchin wrote: > > Those are great resources! Thanks! > > > > Jens Axel Søgaard writes: > > > > > A few useful resources: > > > > > > Matrices > > > http://docs.racket-lang.org/math/matrices.html?q=matrix > > > > > > GNU Scientific Library > > > > > > > http://planet.racket-lang.org/package-source/wmfarr/mzgsl.plt/3/0/planet-docs/mzgsl/index.html > > > > > > Science Collection > > > > > > > http://planet.racket-lang.org/package-source/williams/science.plt/4/8/planet-docs/science/index.html > > > > > > Math library > > > http://docs.racket-lang.org/math/index.html?q=matrix > > > > > > Also: If you are looking for concrete algorithms - just ask. Chances > are > > > that > > > someone has a Racket and/or Scheme implementation lying around. > > > > > > If you are interested in symbolic computations I have a few ideas. > > > > > > /Jens Axel > > > > > > > > > 2015-11-03 2:15 GMT+01:00 John Kitchin: > > > > > >> Hi all, > > >> > > >> I am exploring whether Racket could be a Lisp replacement for Python > in > > >> scientific and engineering calculations. I currently use Python > extensively > > >> in teaching chemical engineering courses ( > > >> http://kitchingroup.cheme.cmu.edu/pycse/) and in running molecular > > >> simulations (http://kitchingroup.cheme.cmu.edu/dft-book/), but I am > > >> interested in transitioning these to a Lisp. > > >> > > >> Why? Because I really like writing Lisp code, and some interesting > things > > >> I can do with it. My current experience is all with emacs-lisp, which > at > > >> the moment has no hope for replacing Python as it lacks a real ffi. > > >> > > >> Python works for scientific/engineering calculations because of > > >> numpy/scipy/matplotlib which provide the majority of our needs, and > largely > > >> they just wrap C/Fortran numerical libraries. It is also distributed > with > > >> batteries included that make it trivial to install these days. It > seems > > >> like Racket can do this too. > > >> > > >> How feasible would it be to use Racket to solve the problems described > > >> here: http://kitchingroup.cheme.cmu.edu/pycse/pycse.pdf > > >> > > >> I am trying to gauge how difficult it would be to start using Racket > for > > >> these problems. Does anyone know of any similar kinds of projects as > my > > >> Python project above in Racket? > > >> > > >> Thanks! > > >> > > >> -- > > >> 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, visit https://groups.google.com/d/optout. > > >> > > > > > > > > > > > > -- > > > > -- > > Professor John Kitchin > > Doherty Hall A207F > > Department of Chemical Engineering > > Carnegie Mellon University > > Pittsburgh, PA 15213 > > 412-268-7803 > > @johnkitchin > > http://kitchingroup.cheme.cmu.edu > > -- > 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, visit https://groups.google.com/d/optout. > -- -- Jens Axel Søgaard -- 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, visit https://groups.google.com/d/optout.
[racket-users] Mandatory arguments for command-line
I've just ported a small sript to Racket to investigate Racket as a scripting language for cli tasks. (My past Racket experiences have really only been with the HTDP languages.) I was quite happy with the process and the results, but I have one question I haven't been able to figure out on my own: How can I specify a mandatory argument such that without the argument the script will stop, possibly with an error, and preferably display the help? In the following, I would like to make the "-d" flag non-optional, or alternatively specify it as a required non-flag argument. Perhaps I just need to specify it as a non-flag argument and raise my own errors? Or is there a built-in way that I've not found? (define slow-copy (command-line #:program "slowcp" #:usage-help "\n Copy at a limited rate" #:once-each [("-t") time "the duration of in seconds between each copy; default: 5" (copy-delay (string->number time))] [("-d") dest "the directory to which will be copied; default: ." (destination dest)] #:args files files )) » the complete script is here: » https://github.com/tuirgin/racket-cli/blob/master/slowcp.rkt Any criticism or pointers towards a more idiomatic implementation are definitely welcome. -- Christopher D. Walborn : http://laconic-prolixity.blogspot.com 1st Gent.: Our deeds are fetters that we forge ourselves. 2nd Gent.: Ay, truly: but I think it is the world That brings the iron. (Middlemarch, George Eliot) -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] What has happened to extflonum support in 32-bit nightly builds?
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(), which should be exported by the libracket DLL, but it isn't currently declared in "scheme.h". __declspec(dllimport) void scheme_set_dll_path(wchar_t *s); and provide the path containing "longdouble.dll". Thanks, that has helped for 32-bit program. This should be: that has helped for both 32-bit and 64-bit programs. Anyway: why not have Racket put longdouble.dll into the runtime directory, as it does with the others (libmpfr etc)? It would make things simpler. Best regards, Dmitry -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] Feasibility of Racket for scientific and engineering calculations
Since you mention symbolic computations: is there anything that does symbolic differentiation in Racket - I know Maxima is written in Common Lisp. I would I would be happy with only differentiation and little of the other stuff, if only to check my own computations (in economics) as I have perform a sign-error in 25% of the cases... On Tuesday, November 10, 2015 at 10:34:50 PM UTC-5, John Kitchin wrote: > Those are great resources! Thanks! > > Jens Axel Søgaard writes: > > > A few useful resources: > > > > Matrices > > http://docs.racket-lang.org/math/matrices.html?q=matrix > > > > GNU Scientific Library > > > > http://planet.racket-lang.org/package-source/wmfarr/mzgsl.plt/3/0/planet-docs/mzgsl/index.html > > > > Science Collection > > > > http://planet.racket-lang.org/package-source/williams/science.plt/4/8/planet-docs/science/index.html > > > > Math library > > http://docs.racket-lang.org/math/index.html?q=matrix > > > > Also: If you are looking for concrete algorithms - just ask. Chances are > > that > > someone has a Racket and/or Scheme implementation lying around. > > > > If you are interested in symbolic computations I have a few ideas. > > > > /Jens Axel > > > > > > 2015-11-03 2:15 GMT+01:00 John Kitchin: > > > >> Hi all, > >> > >> I am exploring whether Racket could be a Lisp replacement for Python in > >> scientific and engineering calculations. I currently use Python extensively > >> in teaching chemical engineering courses ( > >> http://kitchingroup.cheme.cmu.edu/pycse/) and in running molecular > >> simulations (http://kitchingroup.cheme.cmu.edu/dft-book/), but I am > >> interested in transitioning these to a Lisp. > >> > >> Why? Because I really like writing Lisp code, and some interesting things > >> I can do with it. My current experience is all with emacs-lisp, which at > >> the moment has no hope for replacing Python as it lacks a real ffi. > >> > >> Python works for scientific/engineering calculations because of > >> numpy/scipy/matplotlib which provide the majority of our needs, and largely > >> they just wrap C/Fortran numerical libraries. It is also distributed with > >> batteries included that make it trivial to install these days. It seems > >> like Racket can do this too. > >> > >> How feasible would it be to use Racket to solve the problems described > >> here: http://kitchingroup.cheme.cmu.edu/pycse/pycse.pdf > >> > >> I am trying to gauge how difficult it would be to start using Racket for > >> these problems. Does anyone know of any similar kinds of projects as my > >> Python project above in Racket? > >> > >> Thanks! > >> > >> -- > >> 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, visit https://groups.google.com/d/optout. > >> > > > > > > > > -- > > -- > Professor John Kitchin > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu -- 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, visit https://groups.google.com/d/optout.
[racket-users] Big thanks for the Racket Plot design
Hi all, since complaints about bugs are probably more common than compliments about smooth experiences, I just wanted to say thank you to whomever designed the interface for the Racket plot library (and DrRacket for making the saving of images so pain-free). I had to get some plots done quickly yesterday and was done within 15 minutes without having to use all my Google-Fu to see how the order or arguments changes when you want to add a second line, or when the colour is red rather than blue. Thank you. Cheers, Marc -- 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, visit https://groups.google.com/d/optout.
Re: [racket-users] syntax-original? always returns #f within syntax transformers?
On Thursday, November 12, 2015 at 12:26:23 PM UTC-5, Matthew Flatt wrote: > The macro stepper shows a form after expansion, while Alexis's example > was looking at it during expansion (i.e., in the dynamic extent of a > syntax transformer). Those different times have different syntax > objects --- although one is derived from the other --- and they have > different properties. In particular, the syntax object during the > transformer call has an extra scope that will be canceled when it is > returned back from the transformer. > > Inspecting syntax objects during a transformer call would be useful, > but the current macro stepper doesn't do that. In my case, I was using emit-local-step, and was under the impression that emit-local-step allowed the inspection of syntax objects as they might appear to the transformer, as unlike emit-remark it makes no note about marks. -- 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, visit https://groups.google.com/d/optout.