Re: [racket] An elm-like racket language?

2013-11-12 Thread Philip Monk
I don't think I'll need the GUI bindings, since I'm mostly using my own GUI system (just a big openGL canvas%). I imagine that I could just have my system generate events and create behaviors on its own and just use the update model. Is there anything stopping me from being able to just `(require

Re: [racket] Common Lisp or Racket?

2013-11-12 Thread zbyszek
Dnia 2013-11-12, wto o godzinie 10:56 -0600, Lawrence Bottorff pisze: > I'm your typical newbie who is hand-wringing over what direction to go > in the general functional programming world. Lisp, Scheme, or Haskell? > > > Of late I've been trying to get through the Barski book, "Land of > Lisp,"

Re: [racket] Common Lisp or Racket?

2013-11-12 Thread Tomasz Rola
On Tue, 12 Nov 2013, Hendrik Boom wrote: > On Tue, Nov 12, 2013 at 10:56:09AM -0600, Lawrence Bottorff wrote: > > I'm your typical newbie who is hand-wringing over what direction to go in > > the general functional programming world. Lisp, Scheme, or Haskell? > > [...] > > > > I understand that

Re: [racket] An elm-like racket language?

2013-11-12 Thread Gregory Cooper
Similarly to what Shriram said, I think a big problem with FrTime is that it's monolithic. It could (in my opinion) be greatly improved if the core update model were decoupled from any language extensions, global state, or threads, i.e., made into something that could be independently instantiated,

Re: [racket] turning input-port into file-stream port

2013-11-12 Thread David T. Pierson
On Tue, Nov 12, 2013 at 11:55:22PM -0500, David T. Pierson wrote: > On Nov 12, 2013, at 4:04 PM, Vlad Kozin wrote: > > Can somebody pls have a look at this code. I can't figure out why it > > doesn't work. Input is certainly seen inside the background thread > > that I spawn to pump data from one p

Re: [racket] An elm-like racket language?

2013-11-12 Thread Shriram Krishnamurthi
I think the core stuff will continue to work fine; I imagine the GUI bindings have ossified by now. You may actually find it useful to look at some of the examples on the Flapjax site (www.flapjax-lang.org). There, we were actively trying to convey an idea to a community that thought didn't think

Re: [racket] An elm-like racket language?

2013-11-12 Thread Philip Monk
I've been interested in FRP for a while, but I haven't yet found a way to learn it, and I'm thinking FrTime might be a good way. I'm the kind of guy who learns stuff best by integrating them into my projects, and I'm working on a project in Racket right now that seems like it could benefit. How h

Re: [racket] turning input-port into file-stream port

2013-11-12 Thread David T. Pierson
On Nov 12, 2013, at 4:04 PM, Vlad Kozin wrote: > Can somebody pls have a look at this code. I can't figure out why it > doesn't work. Input is certainly seen inside the background thread > that I spawn to pump data from one port to another. But the main > thread seems to receive an empty port. Hi

Re: [racket] Number-crunching...

2013-11-12 Thread Sam Tobin-Hochstadt
On Tue, Nov 12, 2013 at 10:17 PM, Matthew Flatt wrote: > > For fun, I tried adding `unsafe-flrandom` to use in place of > `random-real`, in which case the JIT can leave the flonum result > unboxed. That saves another 40% or so, but only if I manually inline > `unsafe-flrandom` in place of `random-

Re: [racket] Number-crunching...

2013-11-12 Thread Matthew Flatt
As you say, at least for Racket, this seems to be largely a benchmark of the random-number generator. In particular, it turns out to be mostly measure the overhead of getting from JIT-generated code to the random-number generator and back. Sam pointed out a part of the cost that you can avoid (by

Re: [racket] compiling git head fails with compatibility-test error

2013-11-12 Thread Stephen Chang
For the record, this seems to have been fixed in a recent commit. On Sun, Nov 10, 2013 at 6:52 PM, Stephen Chang wrote: > Trying to compile head and I get the error below. I originally thought > it was due to one of my external pkgs but I've removed them one-by-one > until I have nothing installe

Re: [racket] An elm-like racket language?

2013-11-12 Thread Shriram Krishnamurthi
Hi Dan, I don't think anyone is using FrTime, because nobody in the Racket community really expressed much interest in it, so it didn't gain enough momentum. I concluded that the kind of person who likes Racket is perfectly happy with Racket's existing GUI libraries, and FrTime was solving a non-p

Re: [racket] An elm-like racket language?

2013-11-12 Thread Daniel Prager
Hi Shriram I guess I could have formulated clearer questions! Here's one: Is anyone using FrTime as their preferred means of programming Racket GUIs? Why / why not? I'll go away and read your paper on FrTime, have a play, and come back when I have a bit more understanding. Dan On Wed, Nov 1

Re: [racket] turning input-port into file-stream port

2013-11-12 Thread Vlad Kozin
I should also mention that doing this by creating a temporary file feels incredibly hacky if only because it never gets deleted. If anyone can think of a better pattern pls share. thanks --- Vlad Kozin On Nov 12, 2013, at 4:04 PM, Vlad Kozin wrote: > Hi all. > > Can somebody pls have a l

[racket] turning input-port into file-stream port

2013-11-12 Thread Vlad Kozin
Hi all. Can somebody pls have a look at this code. I can't figure out why it doesn't work. Input is certainly seen inside the background thread that I spawn to pump data from one port to another. But the main thread seems to receive an empty port. Thanks --- Vlad Kozin ___

Re: [racket] An elm-like racket language?

2013-11-12 Thread Shriram Krishnamurthi
Elm was (partially) inspired by Flapjax, which is a direct descendant of FrTime. So the Elm-like language for Racket _is_ FrTime. Perhaps you have a different question? Maybe I've completely misunderstood your question! Racket Users list: http://lists.racket-lang.org/users

[racket] An elm-like racket language?

2013-11-12 Thread Daniel Prager
Given the existence of FrTime, whalesong, and FlapJax is anyone working on or considering doing an elm-like language (http://elm-lang.org/) for Racket? Behind that question is my need to do some GUI programming -- more like rapid prototyping at this stage -- in Racket and/or using a web front-end,

Re: [racket] Common Lisp or Racket?

2013-11-12 Thread Matthias Felleisen
Lawrence, let me supplement Alex's answer. if you have programmed before, dive right into Realm. If it is your first real adventure in programming, take the time to work through HtDP. -- Matthias On Nov 12, 2013, at 12:47 PM, Alexander McLin wrote: > Racket is truely a great and cleaner Lis

Re: [racket] Common Lisp or Racket?

2013-11-12 Thread Hendrik Boom
On Tue, Nov 12, 2013 at 10:56:09AM -0600, Lawrence Bottorff wrote: > I'm your typical newbie who is hand-wringing over what direction to go in > the general functional programming world. Lisp, Scheme, or Haskell? > > Of late I've been trying to get through the Barski book, "Land of Lisp," > but I'

Re: [racket] example where untagging behavior of local-expand is important?

2013-11-12 Thread John Clements
On Nov 12, 2013, at 9:32 AM, Ryan Culpepper wrote: > On 11/12/2013 01:51 AM, John Clements wrote: >> I was looking over changes to Rust recently, and I saw with some alarm that >> at least one macro had added an ad-hoc local expansion mechanism. I sat >> down with MTWT to see if I could figure

Re: [racket] Common Lisp or Racket?

2013-11-12 Thread Alexander McLin
Racket is truely a great and cleaner Lisp. It's carved out its own path that I find quite attractive and am enjoying my forays into Racket. I would recommend you just get started with The Little Schemer to get a taste, move on to How To Design Programs. There is a Coursera course that uses HTDP, a

Re: [racket] example where untagging behavior of local-expand is important?

2013-11-12 Thread Ryan Culpepper
On 11/12/2013 01:51 AM, John Clements wrote: I was looking over changes to Rust recently, and I saw with some alarm that at least one macro had added an ad-hoc local expansion mechanism. I sat down with MTWT to see if I could figure out a situation where this might cause a problem. I came up

[racket] Common Lisp or Racket?

2013-11-12 Thread Lawrence Bottorff
I'm your typical newbie who is hand-wringing over what direction to go in the general functional programming world. Lisp, Scheme, or Haskell? Of late I've been trying to get through the Barski book, "Land of Lisp," but I'm really seeing now why Scheme was created: CL seems to have a ton of gnarl t

Re: [racket] Number-crunching...

2013-11-12 Thread Sam Tobin-Hochstadt
I've realized one big slowdown in your code -- `random` by default uses a parameter to find the `current-pseudo-random-generator`. By removing the parameter lookup from the loop, I cut the time by about 33%. My new version is at the same Gist url, with some very minor additional speedups. Sam O

Re: [racket] Number-crunching...

2013-11-12 Thread Sam Tobin-Hochstadt
I now know why your custom RNG was slow. Racket fixnums are (a) signed and (b) have a width 1 less than the width of the host architecture: [1] -> (fixnum? (- (expt 2 64) 1)) #f -> (fixnum? (- (expt 2 63) 1)) #f -> (fixnum? (- (expt 2 62) 1)) #t Therefore, your random number generation calculati

Re: [racket] Number-crunching...

2013-11-12 Thread Sam Tobin-Hochstadt
Here's a start: https://gist.github.com/samth/7431213 This is a Typed Racket version of your program, converted to use flvectors instead of f64vectors. I haven't taken a look at the code for your random number generator yet, but you could try doing the timing by creating a large array of random nu

Re: [racket] Number-crunching...

2013-11-12 Thread Stephan Houben
Hi Will, I think flvectors are supposed to be more efficient than f64vectors (one less level of indirection). In addition, you can use unsafe-flvector-ref . Stephan 2013/11/12 William Cushing > I'm in the process of benchmarking various systems for their ability to > handle the inner loop of

[racket] Generics and gen:custom-write

2013-11-12 Thread Laurent
I'm trying to implement a custom writer for a struct with generics, but I think I'm misunderstanding something. What I want to do is specialize only the behavior for `write' and `display', but leave the behavior for `print' untouched. So I thought that is what define/generic was for, but the follo

[racket] Number-crunching...

2013-11-12 Thread William Cushing
I'm in the process of benchmarking various systems for their ability to handle the inner loop of compilations of MCMC from a higher level probabilistic modeling language (BLOG). Attached are examples of the kind of output (instantiations of MCMC) we'd like to be able to generate given the tried-an

Re: [racket] dynamically auto-initialized private struct fields

2013-11-12 Thread David T. Pierson
On Sun, Nov 10, 2013 at 12:36:13PM -0500, Matthias Felleisen wrote: > > Have you considered classes instead of structs? -- Matthias Matthias, Thanks for the response. Classes did cross my mind, but in the particular use case I'm working on now, they feel a little too heavy. Perhaps that is a r