[racket] Racket in computational science?

2013-08-16 Thread Konrad Hinsen
Hi everyone, Profiting from the calm summer period, I explored Racket over the last two weeks because I kept hearing good things about it. It looks indeed quite impressive, but I suspect I don't need to tell that to members of this list ;-) What caught my attention is the math library, which look

Re: [racket] Racket in computational science?

2013-08-16 Thread Konrad Hinsen
Matthias Felleisen writes: > Did you look at the Science collection on Planet? It's used in a > commercial product but the producers decided it was worth opening > the library to the public. -- Matthias That one looks quite impressive as well, but it doesn't use racket/math. In fact, it dupli

Re: [racket] Racket in computational science?

2013-08-17 Thread Konrad Hinsen
Neil Toronto writes: > Anyway, the math library came about because I was sitting on a pile of > code I thought I should share. When I announced it, people asked for > arrays, so I added them, and Jens Axel volunteered number theory and > linear algebra functions. Sounds fine. But "... so I

Re: [racket] Racket in computational science?

2013-08-19 Thread Konrad Hinsen
Doug Williams writes: > I wrote the Science Collection to support my own knowledge-based > simulation work, which is basically the Simulation and Inference > collections that are also on PLaneT. The Science Collection I looked at those, and also found your blog at drschemer.blogspot.com. You a

Re: [racket] Rackunit best practices

2013-08-23 Thread Konrad Hinsen
--On 23 août 2013 15:09:04 +0900 Chad Albers wrote: From the many responses, it looks like Dr Racket is more popular than I thought. I'm a long-time Emacs user, and although I have tried Dr Racket, Emacs is now part of my bones. (I'm excited to learn that there is a Racket mode...and hope it

Re: [racket] Worried about the new package manager not storing each version of a package

2013-08-27 Thread Konrad Hinsen
Jay McCarthy writes: > The users can do something. They can save their old version before > they upgrade and not continue if there is a problem. The package > system definitely supports "trials" like this, because it's easy to > locate the files you downloaded for the package. I don't recommen

[racket] Generics and modules

2013-08-27 Thread Konrad Hinsen
Hi everyone, I have started playing with generics and quickly got myself in trouble. Consider the following two modules: -- foo.rkt #lang racket (provide (all-defined-out)) (require racket/generic) (define-generics bar [baz bar]) ---

Re: [racket] Worried about the new package manager not storing each version of a package

2013-08-27 Thread Konrad Hinsen
Sam Tobin-Hochstadt writes: > I think the right approach to running multiple Racket applications > at once that all rely on packages that might conflict is to use > multiple installations of Racket. Then you can install packages > installation-wide and not have them conflict. > > This is, I

Re: [racket] Generics and modules

2013-08-27 Thread Konrad Hinsen
Asumu Takikawa writes: > This is what the `define/generic` form is for. You can then re-write > your struct definition as Great, thanks! I had seen define/generic but its documentation made me believe that its use is more restricted. But it works fine in my demonstration code. Unfortunately, I

Re: [racket] Generics and modules

2013-08-27 Thread Konrad Hinsen
J. Ian Johnson writes: > No, your function is just ill-founded. Do you mean to destruct x to > find an inner bar to call gen-foo-far-baz on it? I want to make the field baz of struct foo-bar accessible through the generic interface method foo-bar-baz. The background is that struct foo-bar alre

Re: [racket] Generics and modules

2013-08-27 Thread Konrad Hinsen
Konrad Hinsen writes: > Is there a workaround for that case as well? I found one myself, though it's a bit of a kludge: -- foo-bar.rkt #lang racket (provide (all-defined-out)) (require (prefix-in foo: "foo.rkt") (only

Re: [racket] Generics and modules

2013-08-28 Thread Konrad Hinsen
J. Ian Johnson writes: > You'll want foo-bar-baz the field accessor to be bound to something > else that won't be shadowed when you define foo-bar-baz the generic > function. Your define-generics likely is not in the same scope as > the struct foo-bar definition, since Right. > Leads to a s

Re: [racket] Worried about the new package manager not storing each version of a package

2013-08-28 Thread Konrad Hinsen
Lawrence Woodman writes: > I have seen problems with version control crop up for so long and > so often that I can't see why people think Racket and it's > third-party packages would be immune to what has happened in every > other package eco-system I have used: Ruby, Tcl, Shared C Libraries

Re: [racket] Worried about the new package manager not storing each version of a package

2013-08-30 Thread Konrad Hinsen
Matthew Flatt writes: > In particular, see this message from mid-July: > > http://www.mail-archive.com/dev@racket-lang.org/msg09419.html Thanks, that (and the following discussion) provides a lot of background information. In particular, I now see that the main goal of the package system is

[racket] Combining iteration and match

2013-09-03 Thread Konrad Hinsen
Hi everyone, I find myself writing lots of expressions such as (for/list ([temp some-sequence]) (match temp [(list a b) a])) where I iterate over a sequence and then destructure each element of the sequence using match, most often to pick some fields out of a struct. Is there a more compac

[racket] Combining iteration and match

2013-09-03 Thread Konrad Hinsen
Konrad Hinsen writes: > a struct. Is there a more compact way to do this? Ideally I'd like > to write > > (for/list ([(list a b) some-sequence]) > a) Thanks to all who replied. In summary, there are two options: 1) match-define (for/list ([a+b some-sequence

[racket] Immutable vectors

2013-09-04 Thread Konrad Hinsen
For the kind of data I am working with, immutable vectors look like just the right choice: immutable and O(1) element access. However, I am discovering that they are a real pain to work with. Pretty much any vector operation returns a mutable vector: vector-map, vector-drop, vector-split-at, etc.

Re: [racket] Immutable vectors

2013-09-05 Thread Konrad Hinsen
Neil Toronto writes: > FWIW, `vector->immutable-vector' is pretty fast. It's usually the least > significant part of an O(n) operation. Its two biggest problems are that > it allocates memory and annoys people. That's a good summary of my first impressions ;-) > If you're working in Typed

[racket] Implementing an generic interface outside of a struct definition

2013-09-05 Thread Konrad Hinsen
Is it possible to implement a generic interface outside of a struct definition, i.e.. for a struct that is already defined? I didn't find anything about this in the documentation. Konrad. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Implementing an generic interface outside of a struct definition

2013-09-06 Thread Konrad Hinsen
Vincent St-Amour writes: > You can use the `#:defaults' clause of `define-generics' for that. The > documentation included in recent snapshots includes examples of its use: > > > http://www.cs.utah.edu/plt/snapshots/current/doc/reference/struct-generics.html > > You can also use it t

Re: [racket] Implementing an generic interface outside of a struct definition

2013-09-06 Thread Konrad Hinsen
Asumu Takikawa writes: > You can write the method implementations as plain function definitions > in some module, e.g., > > (define (my-dict-ref ...) ...) > ... > (provide my-dict-ref ...) > > and then in each structure you can do > > (struct particular-dict (...) > #:met

Re: [racket] Immutable vectors

2013-09-07 Thread Konrad Hinsen
David Van Horn writes: > Thee is also this: > > https://pkg.racket-lang.org/info/ralist > > Which is not written in typed racket and has an un-contracted form for > efficiency. Installed, looks good. I'll try it in real life soon. Thanks! Neil Toronto writes: > > The implementati

[racket] Understanding GC when working with streams

2013-09-07 Thread Konrad Hinsen
Lawrence Woodman writes: > i. Why does the GC seem to collect more effectively when the stream is > created in a function as opposed to in a straight definition? i.e > test-gen-filtered-nums? passes, although I note that > test-for/sum-gen-filtered-nums? doesn't. I don't

Re: [racket] Combining iteration and match

2013-09-09 Thread Konrad Hinsen
Stephen Chang writes: > I've updated the generic-bind ~for/X forms so that its performance is > the same as racket's for/X. Sounds great! > The update relies on a change to racket though. So if you want to try > it, first pull from racket git head, then update the generic-bind pkg. OK, that

Re: [racket] Combining iteration and match

2013-09-09 Thread Konrad Hinsen
Stephen Chang writes: > Ah sorry. The package was missing a metadata file, which I've added. > It's working on my machine now. Would you mind trying again? > Preferably, do a remove, then install (as opposed to an update). Done, it works fine now! Thanks, Konrad Racke

[racket] How to get a pict-box into a slideshow?

2013-09-15 Thread Konrad Hinsen
Hi everyone, I have started looking at the slideshow language, which looks like an interesting candidate for solving the old problem of finding the right balance between programmatic and interactive construction of presentations. The interactive element seems to be provided by something called pi

Re: [racket] How to get a pict-box into a slideshow?

2013-09-16 Thread Konrad Hinsen
Robby Findler writes: > Pict boxes were an experiment that didn't work out. > > Picts, however, are still going strong and so you probably want just to use > them. It looks like picts are hard to avoid, since just about anything in a slide is a pict. But I liked the idea of a way to do man

Re: [racket] How to get a pict-box into a slideshow?

2013-09-17 Thread Konrad Hinsen
Stephen Chang writes: > > But I liked the idea of a way to do manual positioning in cases where > > esthetics matter more than functional relationships between items. > > Does ppict do what you want? ppict looks interesting, but it seems to address a different issue: creating animations from

Re: [racket] How to get a pict-box into a slideshow?

2013-09-17 Thread Konrad Hinsen
Robby Findler writes: > I am not seeing any hanging, but I did see an error and just pushed a fix > for that. How > are you getting things to hang? It's not deterministic, unfortunately. The best recipe I found is this: 1) Type the following code into DrRacket (or load it from a file):

Re: [racket] How to get a pict-box into a slideshow?

2013-09-18 Thread Konrad Hinsen
Robby Findler writes: > It didn't hang yet for me after 12 attempts. If you do see it After rebooting my machine this morning (for a completely unrelated reason), it doesn't hang any more. > again, and you started DrRacket from a shell prompt, hit control-c > and we might get lucky and get an

Re: [racket] How to get a pict-box into a slideshow?

2013-09-20 Thread Konrad Hinsen
Robby Findler writes: > You probably want to insert a Racket box into the pict box and then type > some code in > there that evaluates to a pict. Got it. It works! > But I fear you'll be disappointed. The reason I mothballed these (and I had > forgotten > about the environment variable!)

Re: [racket] How to get a pict-box into a slideshow?

2013-09-20 Thread Konrad Hinsen
Robby Findler writes: > Yes. You would use ct-find and friends to find the picts that you put into > the box. Sure, but what do I ask ct-find to look for? I found one way, even though it looks a bit clumsy: (define my-text (t "inside the pict box")) (define box ... put the pict box here

[racket] Introduction to syntax-parse

2013-09-24 Thread Konrad Hinsen
Hi everyone, I am trying to learn about syntax-parse, starting with the introduction of the "Syntax" documentation. Unfortunately, the very first example given for the use of syntax-parse doesn't work in my Racket installation: Welcome to Racket v5.90.0.9. racket@> (require syntax/parse)

Re: [racket] Introduction to syntax-parse

2013-09-24 Thread Konrad Hinsen
Stephen Chang writes: > You need (require (for-syntax syntax/parse)) because you are using it inside > a > define-syntax. Ahhh... that does it, thanks! Laurent writes: > How much work would be required to prevent people from falling into it ever > again? > Maybe saying so in the doc

[racket] Macros: dealing with optional elements

2013-09-25 Thread Konrad Hinsen
Hi everyone, I am struggling with what looks like a straightforward macro issue, but even after reading most of the documentation three times, I am stuck. I want to write a macro that behaves much like struct and produces a struct form. In particular, it should accept the struct name followed by

Re: [racket] Macros: dealing with optional elements

2013-09-25 Thread Konrad Hinsen
Laurent writes: > Unsyntax-splicing to the rescue! Great, this evokes memories of Common Lisp macros... More importantly, it works! J. Ian Johnson writes: > This is such a common pattern that there is support for it with a > feature called syntax templates, in > syntax/parse/experimental/te

[racket] RacketCon 2013 videos

2013-10-10 Thread Konrad Hinsen
Asumu Takikawa writes: > The higher-quality talk recordings for RacketCon are now up on Youtube. > This playlist has all of the talks: > > http://www.youtube.com/playlist?list=PLXr4KViVC0qLyXpinlARzSDWaQTCzaGw3 Great, thanks! Are the slides also available somewhere? I find them hard to re

Re: [racket] RacketCon 2013 videos

2013-10-12 Thread Konrad Hinsen
Neil Toronto writes: > In case Asumu doesn't ask us for them, mine are here: > > https://github.com/ntoronto/writing/raw/master/2013rcon-floating-point/toronto-2013rcon-floating-point.pdf Thanks! A nice tutorial, and behind it a nice set of libraries, not only for computing with floating-poi

[racket] Floating-point (was: RacketCon 2013 videos)

2013-10-13 Thread Konrad Hinsen
Neil Toronto writes: > > So how about Racket? Can a programmer rely on a given program producing > > the exact same result on all platforms, and with any Racket version? > > In almost everything, PLT and Racket prioritize correctness over speed. That sounds interesting. Why doesn't the Racke

[racket] Reading large XML files

2013-10-14 Thread Konrad Hinsen
Hi everyone, I would like to read XML files into a Racket program, and these files could well be very large (a few GB). After a quick look at the XML library, it seems that read-xml always reads the entire file into memory. I checked PLaneT for alternatives, but didn't find anything. So I wonder

Re: [racket] Reading large XML files

2013-10-14 Thread Konrad Hinsen
Neil Van Dyke writes: > Oleg Kiselyov's SSAX parser is one of the best XML parsers in any > language, and can work like a ``fold''. There are a few different > packagings of it. For documentation, you have to Google for Oleg's > papers on SSAX and SXML. Jay McCarthy writes: > I totally

Re: [racket] Reading large XML files

2013-10-16 Thread Konrad Hinsen
Neil Van Dyke writes: > The name ``SXML'' is a bit confusing. A good understatement ;-) > What happened is that, a long time ago, Oleg Kiselyov defined an XML > representation, called SXML. He also wrote a series of Scheme code and > papers on tools that used SXML, including his XML parse

Re: [racket] Reading large XML files

2013-10-17 Thread Konrad Hinsen
Jay McCarthy writes: > The version I linked will be maintained and improved (such as writing > better docs) Great news, thanks! Konrad. Racket Users list: http://lists.racket-lang.org/users

[racket] Small and short-lived data structures

2013-10-21 Thread Konrad Hinsen
Hi everyone, I am facing a situation quite frequent in scientific computing: the use of small and often short-lived data structures, where the overhead of construction, element access, and garbage collection can easily dwarf the cost of computation. The classical example is Geometry in 3D space.

Re: [racket] Small and short-lived data structures

2013-10-22 Thread Konrad Hinsen
Matthias Felleisen writes: > You can count on Racket to inline a bunch of such small functions. > You can use Optimization Coach to check on your understanding of > what the compiler actually does, and you may benefit from its advice. Optimization Coach sounds interesting, I'll install it ne

Re: [racket] Small and short-lived data structures

2013-10-22 Thread Konrad Hinsen
Matthias Felleisen writes: > On Oct 22, 2013, at 6:46 AM, Konrad Hinsen > wrote: > > > structs and vectors once I am in the Typed Racket universe, so I'll > > stick to structs for now. > > Use vectors. At some point, you will want to iterate over thes

Re: [racket] Reading large XML files

2013-10-23 Thread Konrad Hinsen
Neil Van Dyke writes: > Oleg Kiselyov's SSAX parser is one of the best XML parsers in any > language, and can work like a ``fold''. There are a few different > packagings of it. For documentation, you have to Google for Oleg's > papers on SSAX and SXML. Having used this myself for a whil

[racket] Typed Racket and Emacs

2013-10-24 Thread Konrad Hinsen
Hi everyone, Is someone using Typed Racket from Emacs? If so, how? I am quite happy with Geiser for standard Racket work, but Geiser doesn't handle Typed Racket in the REPL, which makes it a pain to work with (see https://github.com/jaor/geiser/issues/18 for an example). Konrad.

[racket] Numbers with dimensions

2013-10-25 Thread Konrad Hinsen
Alvin Schatte writes: > Is there a library or package that combines numbers and their > operations with dimensions that may be associated with them? Apparently not, from what I learn from previous discussions on this list. Doing this well is actually far from trivial, in any language, but it w

Re: [racket] Numbers with dimensions

2013-10-25 Thread Konrad Hinsen
Thomas Chust writes: > in that respect, the type system of F# may be noteworthy, too. The > support for dimensions is built into the language in that case. Interesting. A quick Google search led me to http://en.wikibooks.org/wiki/F_Sharp_Programming/Units_of_Measure which says "Importa

Re: [racket] Numbers with dimensions

2013-10-26 Thread Konrad Hinsen
Laurent writes: > Examples and details here: > https://github.com/Metaxal/measures At first glance, I miss the notion of "dimension", which defines if two units are compatible, i.e. can be converted. If I understand your approach correctly (which I am not sure about), you consider each product

[racket] Numerical Optimization in Racket (i.e. Finding Local Minima and Maxima)

2013-10-27 Thread Konrad Hinsen
Daniel King writes: > I think Racket has the first three features (the math library looks > awesome), but AFAICT it lacks a numerical optimizer. Has anyone The math library *is* awesome (I have been discovering it myself during the last weeks). The only other source of math/science code I know

Re: [racket] Numbers with dimensions

2013-10-27 Thread Konrad Hinsen
Laurent writes: > Indeed, the notion of dimension is not really what I was after. My intention > was rather > to provide a useful unit converter. Fair enough. > If my current units are in N, and I multiply by square seconds, I > think it's not always desirable for the measure to be automat

Re: [racket] Numbers with dimensions

2013-10-29 Thread Konrad Hinsen
Laurent writes: > So I've redesigned it somewhat, and now there are 2 calculation "modes": > - The normal mode is pretty much like Frink (probably the one you want), > which converts > everything to base SI units. Conversion back to non base units can be done > afterwards. Well, what I rea

Re: [racket] Numbers with dimensions

2013-10-30 Thread Konrad Hinsen
Laurent writes: > Pushed: https://github.com/Metaxal/measures#4-dimensions-and-contracts This is getting better and better every day! The use of contracts looks like the best way to do run-time dimensional analysis. My only remaining wish is to be able to define my own set of units and prefixes

Re: [racket] Implementation of Simpson's Rule (SICP Exercise 1.29)

2013-11-07 Thread Konrad Hinsen
Todd O'Bryan writes: > I just found a lovely Java expression to emphasize the inexactness of > doubles to my AP students. The problem--which I think is from > HtDP/1e--is to find the value of a bag of coins given the number of > pennies, nickels, dimes, and quarters. In BlueJ's code pad (or si

Re: [racket] Numbers with dimensions

2013-11-07 Thread Konrad Hinsen
Laurent writes: > so many useful ones anyway. Each client module would then require the > module with the unit system it needs, i.e. measures/si or > measures/atomic. > > The units are now in a separate file but I did not try to build another base. > But at least it's possible to r

Re: [racket] Changing the pretty print columns when running raco expand

2013-11-07 Thread Konrad Hinsen
Neil Van Dyke writes: > "raco expand"? If you've not yet tried the Macro Stepper feature of > DrRacket, you are in for a treat. And for Emacs fans, Geiser provides macro-expansion-at-a-keypress. Konrad. Racket Users list: http://lists.racket-lang.org/users

[racket] Should we _always_ use `only-in` or `prefix-in` when `require`-ing packages?

2013-11-18 Thread Konrad Hinsen
Greg Hendershott writes: > Pre-caveats: > - Maybe this has been discussed before? > - This is true (IIUC) of the old Planet as well as the new package system. > - Maybe it's true of every package system. It's certainly a problem with many package systems. I have run into the exact situation

[racket] Another Canonical Use of Macros?

2013-11-22 Thread Konrad Hinsen
John Clements writes: > categorizing them in terms of the "three canonical categories" that > Matthias described--apologies if I'm misrepresenting him/you: > - changing evaluation order, > - implementing a data sublanguage, and > - creating new binding forms. > > Some of the Rust macros se

Re: [racket] How to call a Julia function from DrRacket?

2014-02-02 Thread Konrad Hinsen
Neil Toronto writes: > Enrique, if you don't mind my asking, where does Racket's math library > fall short for the study you have in mind? (Its floating-point support > shouldn't, especially if you work in Typed Racket.) I'm one of its > authors, so I'm looking for suggestions. >From my ow

Re: [racket] Formal Presentation and initial doubts.

2014-03-22 Thread Konrad Hinsen
--On 22 mars 2014 04:18:03 -0400 Neil Van Dyke wrote: One tip for writing macros: make your transformer pattern variables be all-uppercase. This convention makes reading and writing macros much easier for humans, and also less confusing to learn (because people seeing examples are less confuse

[racket] Using Racket 6.0 through a Web proxy

2014-03-31 Thread Konrad Hinsen
Hi everyone, I just installed Racket 6.0 on a new machine (MacOS 10.9), without any problems. However, I didn't yet succeed in installing any packages from the package catalog. I suspect that this is due to the Web proxy that I have to use in my office. My first attempt was to use raco: raco

Re: [racket] Using Racket 6.0 through a Web proxy

2014-04-02 Thread Konrad Hinsen
Jay McCarthy writes: > The package system currently doesn't use proxies at all. Howver, you > should be able to go to > > https://github.com/jbclements/sxml/tarball/648a97f4881a8ea2f0959cf26e80bfdfec93d181 > > in a web browser and download the archive manually then install it > "raco pkg

[racket] Controlling the size of plot symbols

2014-04-10 Thread Konrad Hinsen
Hi everyone, I am trying to use (abuse?) Racket's 3D plots for molecular visualization. It actually works out better than I expected, except that I haven't yet figured out how to control the size of the plot symbols in the way I want. The documentation says no more than that the size of a symbol

Re: [racket] Controlling the size of plot symbols

2014-04-10 Thread Konrad Hinsen
Neil Toronto writes: > It's unfortunately not. But I think there's something you can do > instead: use `parametric-interval' to draw the circles instead. Thanks for the example, which contains some nice tricks I'll keep in mind for some other application. But I don't see a way to use this for

Re: [racket] Controlling the size of plot symbols

2014-04-11 Thread Konrad Hinsen
Neil Toronto writes: > On git HEAD this takes about 15-20 seconds on my computer, depending on > random sphere placement and size. It takes 5-6 seconds for 81 samples > instead of 121. For comparison, the following takes 7-10 seconds with > 121 samples and 3-4 seconds with 81 samples. Than

Re: [racket] matrix-solve and approximation errors

2014-04-16 Thread Konrad Hinsen
Neil Toronto writes: > The design decision is to determine how much the solvers should automate > detecting and responding to floating-point error. I have no idea what > extent popular linear algebra libraries go to, nor whether we should try > to do better. Any linear-algebra library mean

Re: [racket] matrix-solve and approximation errors

2014-04-17 Thread Konrad Hinsen
Laurent writes: > Sounds like a good idea, but possibly cumbersome to program. > Or maybe just define a error-checking-level parameter that can be adjusted > from > `unsafe` to `noob`? I'd expect this more difficult to design than to program. My first idea would be to base everything on sin

Re: [racket] typed racket and interfaces

2014-05-02 Thread Konrad Hinsen
Asumu Takikawa writes: > There is not (yet) and I don't know how we will support it if we do. > Right now the only option is to remove interfaces from your code and use > types instead to enforce that methods are implemented. ... > and so on. Also, I'm not sure interfaces add all that much va

Re: [racket] typed racket and interfaces

2014-05-03 Thread Konrad Hinsen
Asumu Takikawa writes: > On 2014-05-02 18:57:52 +0200, Konrad Hinsen wrote: > > Interfaces provide functions that dispatch on the type of one of their > > arguments. I don't see how that can be done with types. > > Maybe we are talking about different things.

[racket] Blog post about Racket

2014-05-10 Thread Konrad Hinsen
Hi everyone, I just published a blog post about my first experiences with Racket: http://khinsen.wordpress.com/2014/05/10/exploring-racket/ Comments welcome. This is also a good occasion to thank everyone on this list who has helped me by answering questions during the last few months. Konr

Re: [racket] Blog post about Racket

2014-05-12 Thread Konrad Hinsen
Hi Matthias, Thanks for your comments! > Hi Konrad, thanks for the post. It is quite illuminating because > I wouldn't have thought that we're that close to 'performant' in > this domain. I was a bit surprised as well, but I found that the math library is really a pretty good foundation fo

Re: [racket] Blog post about Racket

2014-05-13 Thread Konrad Hinsen
Hendrik Boom writes: > > > Making languages with different garbage > > > collectors work together is such a pain that I am not very motivated > > > to try. I guess this problem will ensure the survival of C for many > > > years to come. > > > > A student of mine tried twice to integrate Pyt

Re: [racket] Blog post about Racket

2014-05-13 Thread Konrad Hinsen
Sam Tobin-Hochstadt writes: > On Mon, May 12, 2014 at 10:18 AM, Matthias Felleisen > wrote: > > > >> If the FFI can provide > >> C-pointer access to something like a flvector, and ensure that it's > >> not garbage-collected for the duration of a C function call, then a > >> good interface

Re: [racket] Blog post about Racket

2014-05-13 Thread Konrad Hinsen
Matthias Felleisen writes: > > Note however that I didn't look at performance, which is not > > really important for most of what I do. > > In hindsight that is obvious from your use of Python :-) It should > have clicked in me, but I am just so used to think "scientific > computation ~ si

Re: [racket] Blog post about Racket

2014-05-13 Thread Konrad Hinsen
Matthias Felleisen writes: > This is not a misconception. It's an understanding based > on spending 15 years next to a top-10 department in scientific > computing, in a computer science department that was spun off > from that department, and a huge research group in the latter > that support

Re: [racket] Blog post about Racket

2014-05-13 Thread Konrad Hinsen
Stephen Chang writes: > > That said, it's interesting to look at why Python became such a > > popular language in science. > > Coincidentally, I just read this article: > http://www.talyarkoni.org/blog/2013/11/18/the-homogenization-of-scientific-computing-or-why-python-is-steadily-eating-oth

Re: [racket] Blog post about Racket

2014-05-13 Thread Konrad Hinsen
Stephen De Gabrielle writes: > FWIW the http://software-carpentry.org team have done some > excellent work on teaching scientists how to > code.  'Data-carpentry' seems to be topical for them (looking > at the twitter feed). Software Carpentry is doing a very good job indeed in my biased opin

Re: [racket] Blog post about Racket

2014-05-14 Thread Konrad Hinsen
Jay Kominek writes: > Perhaps you could add a page to the Racket wiki on github, like the > intro projects page > (https://github.com/plt/racket/wiki/Intro-Projects) but which > covers... "Scientific Racket projects"? Divide it up like "machine > learning", "statistical analysis", "file forma

Re: [racket] math/matrix

2014-05-14 Thread Konrad Hinsen
Neil Toronto writes: > One thing we should really do is get your LAPACK FFI into the math > library and have `flmatrix-solve` use that, but fail over to Racket code > systems that don't have LAPACK. If I remember right, it would have to > transpose the data because LAPACK is column-major.

[racket] Python versus Racket

2014-05-14 Thread Konrad Hinsen
Eduardo Costa writes: > Is there anything in the semantic of Python that makes it much more > difficult to > implement a Python compiler than a Racket compiler? Python is much more dynamic than Racket. As an illustration, look at a simple operation: addition. In Racket, (+ a b) requires

Re: [racket] Blog post about Racket

2014-05-14 Thread Konrad Hinsen
Neil Toronto writes: > My dissertation is on programming languages for Bayesian analysis, which > can handle arbitrary, possibly recursively defined models and arbitrary > probabilistic conditions. I have only skimmed it until now, but it looks like a very important step in a direction I lik

Re: [racket] math/matrix

2014-05-14 Thread Konrad Hinsen
Jens Axel Søgaard writes: > See my post in this thread 3 days ago. It is attached. It isn't, but I found it in the thread, thanks! I am mostly interested in using it as an example for the Racket FFI, given that I know LAPACK rather well. > > Transposition can be avoided in many practically rel

Re: [racket] Python versus Racket

2014-05-15 Thread Konrad Hinsen
Eduardo Costa writes: > I wonder whether a more restricted form of Python would not be > acceptable in situations where speed is critical. I mean, instead > of cl-python, that tries to mimic the semantic of Python closely, > the Lisp community could write a compiler for the subset of Python >

Re: [racket] You're invited to Neil Toronto's Dissertation Defense

2014-06-04 Thread Konrad Hinsen
Matthias Felleisen writes: > > How are we going to toast him remotely? Are you shipping cold champagne > first :-) Maybe this ingenious device can be adapted to champagne: https://www.youtube.com/watch?v=CRL1SeTJ1rk There's still one week to adapt the software, get going! ;-) Konrad. __

Re: [racket] You're invited to Neil Toronto's Dissertation Defense

2014-06-13 Thread Konrad Hinsen
Neil Toronto writes: > Here's the edit: > > https://www.youtube.com/watch?v=bKKkj-M34So Good job. Having watched this, I now feel qualified to congratulate! Konrad. Racket Users list: http://lists.racket-lang.org/users

Re: [racket-users] Racketeers and slide-show presentations

2017-09-17 Thread Konrad Hinsen
On 16/09/2017 21:48, Andrew Gwozdziewycz wrote: I've been hacking on a way to make *simpler* slideshow presentations, which I'll actually present briefly at Racketcon next month. The idea is to take something plaintext and turn it into slides, so you don't have to be a pict master. I am tryin

Re: [racket-users] Racketeers and slide-show presentations

2017-09-17 Thread Konrad Hinsen
On 16/09/2017 16:47, Daniel Brunner wrote: I switched to slideshow/pict recently but it takes a lot of time for me to prepare the presentation due to my missing skills in using pict. That's also the major stumbling block for me. Whenever I have to prepare a presentation, it's just not the rig

Re: [racket-users] Re: code reflection

2017-10-16 Thread Konrad Hinsen
On 16/10/2017 23:11, Matthias Felleisen wrote: Lisp macros are easier than Racket’s in the same way that it was so much easier to write procedures in ASM than in Pascal. Having used both, I fully agree, but I also wonder if it is possible to restore *some* of the simplicity of Lisp macros in

Re: [racket-users] code reflection

2017-10-18 Thread Konrad Hinsen
Matthias, > It’s quite doable but I think this misses the point I see that I haven't made my point clearly enough (if at all). I certainly don't want to go back to unhygienic macros without error checking. What I do want to go back to is doing simple manipulations of syntax objects using familia

Re: [racket-users] code reflection

2017-10-19 Thread Konrad Hinsen
Matthias, > Please search my post for ‘hygiene’. I didn’t mention the word. Off — Matthias Oops, you are right, sorry. Your example used "let", which is also what everybody used for discussing hygiene, so I jumped to conclusions. Your argument is that pattern matching works at a higher level of

Re: [racket-users] code reflection

2017-10-19 Thread Konrad Hinsen
Matthew, > If your goal is readable code, why not add some sugar? That's a perfectly good solution. > More broadly, it feels like there's plenty of room for new > macro-definition and syntax-processing forms that suit different > ergonomic needs: readability, automatic error messages, debugging,

Re: [racket-users] code reflection

2017-10-21 Thread Konrad Hinsen
Matthias, > Yes, on rare occasions, Racket programmers need to use the FFI > to link in C libraries, C developers need to include ASM, and > so on. But when we can, we should really stick to high-level > linguistic constructs when possible and available, especially > when they provide a safer

Re: [racket-users] where does DrRacket get its environment variables on OS X?

2017-11-09 Thread Konrad Hinsen
On 08/11/2017 17:48, 'John Clements' via Racket Users wrote: IIRC, Mac has an apologetic moue towards unix-y things here: I believe there’s a special place in your home directory … or maybe it’s in ~/Library/Preferences, which would … okay, let me search. Okay, here you go: https://stackove

Re: [racket-users] Alternatives to DrRacket

2017-11-26 Thread Konrad Hinsen
On 26/11/2017 16:42, Stephen De Gabrielle wrote: I know two big reasons for using a complex tool is it’s stickiness factors; normally a combination of familiarity (hence speed) with a lot of powerful features and non-transportable customisation. A third big reason is generality. The main reas

[racket-users] Using ffi/unsafe/alloc

2018-01-24 Thread Konrad Hinsen
Hi everyone, I am working on an FFI which overall progresses well - the Racket FFI library is really a very nice tool to have. The one problem I couldn't solve yet is handling resource allocation. My use case is very similar to what allocator/deallocator are meant for, except that the alloca

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

2018-01-25 Thread Konrad Hinsen
Hi Dmitry and Matthew, Thanks for your suggestions, which, although quite different, turned out to be both useful for me. As you can imagine, my real C API is a lot more complicated. There are dependencies between allocated memory blocks, i.e. freeing one can invalidate another one. More fine-grai

Re: [racket-users] Adding interactive overlays to racket plots

2018-01-30 Thread Konrad Hinsen
On 29/01/2018 12:09, Alex Harsanyi wrote: I have built a prototype implementation of adding interactive overlays to plot snips, as shown in the image below, and I would like to ask if there is interest in adding such a feature to the plot package distributed with racket. Yes, definitely! Ko

Re: [racket-users] Racket on the cover page

2018-02-26 Thread Konrad Hinsen
On 26/02/2018 17:42, Matthias Felleisen wrote: https://cacm.acm.org Hi everyone, Racket made the cover page of the Communications of the ACM, the ACM’s flagship magazine. Congratulations! I find the article quite convincing, but then I was already pre-convinced. Would be interesting to

  1   2   3   >