[racket-users] getting intermediate values out of a do chain in functional-lib:data/monad

2019-10-23 Thread Martin DeMello
I have the following code, which in sequence calls the load-file dialog, loads the file, processes it and populates a textbox: (define (try v e) (if v (success v) (failure e))) (define (load-and-process-file textbox parse fmt) (define f #f) (let* [(text (do

[racket-users] Re: drracket indentation in vim

2019-10-23 Thread Alex Harsanyi
Well, you could use the racket-mode from emacs to indent your files. You will need to install GNU Emacs and racket-mode, and save the following in indent-racket-file.sh: #!/bin/bash FILE=$1 emacs --daemon --eval " (progn (find-file \"$1\") (racket-mode) (indent-region (point-min)

[racket-users] drracket indentation in vim

2019-10-23 Thread Martin DeMello
Is there a good way to call out to the indentation code drracket uses from within vim? even just manually piping the whole file through an indenter would be fine. martin -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this

[racket-users] [ANN] New update, Magic Racket for VS Code

2019-10-23 Thread Evžen Wybitul
As you might already know, I'm developing a Racket extension for VS Code, called *Magic Racket*. Until now the main feature was near-perfect syntax highlighting (supporting everything from binary numbers to weird constructs like |variable name|). However, a recent update introduces simple, but

[racket-users] Is there any command line formatter?

2019-10-23 Thread Evžen Wybitul
Hey, I'm building an extension for VS Code and I'm slowly adding new QoL features and I was wondering if there's some CLI tool that would mimic the DrRacket (= recommended) formatting. Something along the lines of black for Python, gofmt for go, or some js beautifiers. I couldn't find

Re: [racket-users] [ANN] Transducers library

2019-10-23 Thread William G Hatch
On Wed, Oct 23, 2019 at 12:39:43PM -0700, Jack Firth wrote: and it uses *no macros at all*: Gotcha! You're using the `define` and `#%app` macros in this example, aren't you! More seriously, ever since I watched a Rich Hickey talk about transducers I've wanted Racket to have them. Thanks for

[racket-users] [ANN] Transducers library

2019-10-23 Thread Jack Firth
Rebellion now provides the rebellion/streaming/transducer library for processing streams of data using transducers. A *transducer* is a kind of sequence transformation that comes with

Re: [racket-users] What's "#"?

2019-10-23 Thread Sage Gerard
Found the issue. I am populating a [VkPhysicalDeviceProperties](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkPhysicalDeviceProperties.html) struct. On my system, C reports this structure as 824 bytes. (ctype-sizeof), on the other hand, says it's 312. Hardcoding 824

Re: [racket-users] What's "#"?

2019-10-23 Thread Sage Gerard
Alright, thanks. I have a couple of leads on what happened, but since the implementation details are private I'm unsure of the best troubleshooting technique in this context. For now I am making a minimal C project that builds a shared library and follows the same allocation pattern and FFI

Re: [racket-users] procedural text generation for game jam.

2019-10-23 Thread Hendrik Boom
On Wed, Oct 23, 2019 at 10:04:04AM -0300, bruno cuconato wrote: > On Mon, 22 Oct 2019 at 19:28, Hendrik Boom wrote: > > What's desired in a too for a game is to take an abstract syntax of what > > is to be said, and to do the necessary transformations to make it into a > > grammatical sentence. >

Re: [racket-users] procedural text generation for game jam.

2019-10-23 Thread bruno cuconato
On Mon, 22 Oct 2019 at 19:28, Hendrik Boom wrote: > What's desired in a too for a game is to take an abstract syntax of what > is to be said, and to do the necessary transformations to make it into a > grammatical sentence. for the abstract syntax to concrete representation part,