[racket-users] putting stx in TR structs
Alas, ensnared again by TR the seductress. Why must you raise my hopes only to dash them again? To be more specific: I want to use TR to specify types for some of the stepper’s structures. However, structures containing syntax objects are giving me fits. Here’s a simple program: #lang racket (module sub typed/racket (provide (struct-out wrapper)) (struct wrapper ([x : Any]))) (require 'sub) (wrapper-x (wrapper #'1234)) This type-checks, but fails at runtime with the error: wrapper-x: contract violation Attempted to use a higher-order value passed as `Any` in untyped code: # in: the range of (-> wrapper? Any) contract from: (/private/tmp/bar.rkt sub) blaming: /private/tmp/bar.rkt (assuming the contract is correct) at: /private/tmp/bar.rkt:6.10 > I’ve tried a bunch of things, including specifying a good type for the x field ((Syntaxof Number) works, but in general I want to be able to specify any syntax object), and putting the lookup on the TR side (still get the same error). I really can’t think of a way of working around this problem. Oh! I just thought of something really evil… create a bogus submodule with an OpaqueVal type that wraps anything… nope, sigh, that didn’t work either. Any help appreciated! Thanks, John -- 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. signature.asc Description: PGP signature
Re: [racket-users] Combining body-id in title with hidden attribute in scribble
Providing 'hidden as `#:style` is shorthand for (make-style #f (list 'hidden)) When you're already using `make-style`, you can add 'hidden to the list of properties: (title #:style (make-style #f (list 'hidden (make-body-id "beta"))) ) At Mon, 20 Jun 2016 03:47:56 -0700 (PDT), Kathi Fisler wrote: > I need to make the title of a scribbled document hidden, while also using the > title construct to modify the body-id. > > Before I added the body-id, I was using > > (title #:style 'hidden text) > > My current replacement (to add body-id) looks like: > > (title #:style (make-style #f (list (make-body-id "beta") >(attributes '((type . > "hidden") > text)) > > The title element is not hidden with this new version. What's the right way > to attach hidden to a style when I can't use just the 'hidden symbol on its > own? (I realize this is an HTML question as much as a Scribble one but I > haven't turned up anything useful by googling). > > thanks, > Kathi > > -- > 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] Re: mode-lambda opengl shader error
Thank you for your fast response! Am Montag, 20. Juni 2016 12:53:42 UTC+2 schrieb Jay McCarthy: > Thanks! I pushed a fix. > > Jay > > On Mon, Jun 20, 2016 at 6:49 AM, 'Thomas Prebeck' via Racket Users > wrote: > > I cloned the github repo and found the offending bits: > > > > ngl.vertex.glsl line 49: > > > > Color = vec4(r / 255.0, g / 255.0, b / 255.0, a); > > > > I changed it to: > > > > Color = vec4(float(r) / 255.0, float(g) / 255.0, float(b) / 255.0, a); > > > > and everthing works > > > > Am Montag, 20. Juni 2016 11:27:49 UTC+2 schrieb Thomas Prebeck: > >> Hi there, > >> > >> I'm trying to write a simple program using mode-lambda. > >> It runs when I use the software backend, although very slowly. > >> When I try to use the gl backend, the program crashes with this error: > >> > >> - > >> You are using OpenGL (4 5 0) > >> Log of shader(1): > >> 0(149) : error C1020: invalid operands to "/" > >> 0(149) : error C1020: invalid operands to "/" > >> 0(149) : error C1020: invalid operands to "/" > >> > >> Exiting... > >> - > >> > >> I'm using a NVIDIA Quadro K620 with the 364.19 official driver on Ubuntu > >> Linux 14.04. > >> > >> The same error comes up if I run "racket -l mode-lambda/examples/one" > >> whithout the --soft switch > >> > >> Thanks in advance > >> Thomas Prebeck > > > > -- > > 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. > > > > -- > Jay McCarthy > Associate Professor > PLT @ CS @ UMass Lowell > http://jeapostrophe.github.io > >"Wherefore, be not weary in well-doing, > for ye are laying the foundation of a great work. > And out of small things proceedeth that which is great." > - D&C 64:33 -- 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] Re: mode-lambda opengl shader error
Thanks! I pushed a fix. Jay On Mon, Jun 20, 2016 at 6:49 AM, 'Thomas Prebeck' via Racket Users wrote: > I cloned the github repo and found the offending bits: > > ngl.vertex.glsl line 49: > > Color = vec4(r / 255.0, g / 255.0, b / 255.0, a); > > I changed it to: > > Color = vec4(float(r) / 255.0, float(g) / 255.0, float(b) / 255.0, a); > > and everthing works > > Am Montag, 20. Juni 2016 11:27:49 UTC+2 schrieb Thomas Prebeck: >> Hi there, >> >> I'm trying to write a simple program using mode-lambda. >> It runs when I use the software backend, although very slowly. >> When I try to use the gl backend, the program crashes with this error: >> >> - >> You are using OpenGL (4 5 0) >> Log of shader(1): >> 0(149) : error C1020: invalid operands to "/" >> 0(149) : error C1020: invalid operands to "/" >> 0(149) : error C1020: invalid operands to "/" >> >> Exiting... >> - >> >> I'm using a NVIDIA Quadro K620 with the 364.19 official driver on Ubuntu >> Linux 14.04. >> >> The same error comes up if I run "racket -l mode-lambda/examples/one" >> whithout the --soft switch >> >> Thanks in advance >> Thomas Prebeck > > -- > 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. -- Jay McCarthy Associate Professor PLT @ CS @ UMass Lowell http://jeapostrophe.github.io "Wherefore, be not weary in well-doing, for ye are laying the foundation of a great work. And out of small things proceedeth that which is great." - D&C 64:33 -- 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] Re: mode-lambda opengl shader error
I cloned the github repo and found the offending bits: ngl.vertex.glsl line 49: Color = vec4(r / 255.0, g / 255.0, b / 255.0, a); I changed it to: Color = vec4(float(r) / 255.0, float(g) / 255.0, float(b) / 255.0, a); and everthing works Am Montag, 20. Juni 2016 11:27:49 UTC+2 schrieb Thomas Prebeck: > Hi there, > > I'm trying to write a simple program using mode-lambda. > It runs when I use the software backend, although very slowly. > When I try to use the gl backend, the program crashes with this error: > > - > You are using OpenGL (4 5 0) > Log of shader(1): > 0(149) : error C1020: invalid operands to "/" > 0(149) : error C1020: invalid operands to "/" > 0(149) : error C1020: invalid operands to "/" > > Exiting... > - > > I'm using a NVIDIA Quadro K620 with the 364.19 official driver on Ubuntu > Linux 14.04. > > The same error comes up if I run "racket -l mode-lambda/examples/one" > whithout the --soft switch > > Thanks in advance > Thomas Prebeck -- 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] Combining body-id in title with hidden attribute in scribble
I need to make the title of a scribbled document hidden, while also using the title construct to modify the body-id. Before I added the body-id, I was using (title #:style 'hidden text) My current replacement (to add body-id) looks like: (title #:style (make-style #f (list (make-body-id "beta") (attributes '((type . "hidden") text)) The title element is not hidden with this new version. What's the right way to attach hidden to a style when I can't use just the 'hidden symbol on its own? (I realize this is an HTML question as much as a Scribble one but I haven't turned up anything useful by googling). thanks, Kathi -- 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] Where to use make-body-id in scribble
Thanks Brian -- that worked fine! Kathi On Sunday, June 19, 2016 at 7:50:45 PM UTC-4, Brian LaChance wrote: > (Adding the list this time. Sorry for the noise, Kathi) > > On Sun, Jun 19, 2016 at 2:34 PM, Kathi Fisler wrote: > > I can't figure out where to put this so that the overall page body id gets > > affected though. Is there a specific part I need to hang this on > > (presumably through a make-style)? > > It appears to work if you put this style property on the document's title: > > #lang scribble/base > @(require scribble/core > scribble/html-properties) > @title[#:style (style #f (list (body-id "the-bodys-id")))]{Scribble is great!} > > I can't figure out if there's a better or different way to accomplish > this, though. I hope the example at least helps. > > -Brian -- 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] mode-lambda opengl shader error
Hi there, I'm trying to write a simple program using mode-lambda. It runs when I use the software backend, although very slowly. When I try to use the gl backend, the program crashes with this error: - You are using OpenGL (4 5 0) Log of shader(1): 0(149) : error C1020: invalid operands to "/" 0(149) : error C1020: invalid operands to "/" 0(149) : error C1020: invalid operands to "/" Exiting... - I'm using a NVIDIA Quadro K620 with the 364.19 official driver on Ubuntu Linux 14.04. The same error comes up if I run "racket -l mode-lambda/examples/one" whithout the --soft switch Thanks in advance Thomas Prebeck -- 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.