Re: [racket-users] Scribbling hexadecimal values
Hi Dominik, If you put the hex number in a string, many of the formatting functions in the Scribble manual, section 4.2.1.4 will work: (proc-doc/names name (->* () (integer?) void?) (() ((argument #,(racketvalfont "#x1f" @{ some description })) Eric On Fri, Sep 18, 2020 at 2:23 PM Dominik Pantůček < dominik.pantu...@trustica.cz> wrote: > Hello Racketeers, > > I am struggling to make scribble typeset default values in > proc-doc/names in hexadecimal. An example would be: > > (proc-doc/names > name > (->* () (integer?) void?) > (() >((argument #x1f))) > @{ some description }) ; yes, at-exp reader > > The same applies to values in nested contracts of ->* - like (integer-in > 0 #x1f). > > Of course #,(~a "~x" #x1f) will produce the string with appropriate > contents - but enclosed in parentheses which does not help much. Also it > is not just a matter of typesetting because the provide form really > contracts the procedure being provided and the actual values should > actually be present. > > I would love to see some documentation-stage parameter where I could > just (parameterize ((numbers-as-hexadecimal #t)) (integer-in ...) ...) > and it would keep the values as they are for contract purposes and > render them hexadecimal. Of course, this is quite specific - more > generic solution is probably more appropriate, this is just to explain > the problem I am trying to solve. > > > Cheers, > Dominik > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/aca5b2ab-36b6-98c6-0747-9d5447ae9766%40trustica.cz > . -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAORuSUyry_LHHU0%2BsujcWNU1vBzxcaQ-i92vhafGtcvSyFHHcA%40mail.gmail.com.
[racket-users] querying MS SQL Server with db-lib (ODBC)
Does anyone have experience using Racket to query a MS SQL Server? I'm attempting to use the db-lib package (https://docs.racket-lang.org/db/) and odbc-driver-connect, but running the method just hangs, with no feedback. By contrast, using the same connection string, I can successfully connect using python and pyodbc. Any suggestions or tips would be appreciated! -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/58e03456-b76e-4212-a170-82e1fc4fb178n%40googlegroups.com.
Re: [racket-users] Scribbling hexadecimal values
+1 For now, I've used hacks like `(string->number "#x...")` for typesetting https://docs.racket-lang.org/pict-abbrevs/index.html On 9/18/20, Dominik Pantůček wrote: > Hello Racketeers, > > I am struggling to make scribble typeset default values in > proc-doc/names in hexadecimal. An example would be: > > (proc-doc/names > name > (->* () (integer?) void?) > (() >((argument #x1f))) > @{ some description }) ; yes, at-exp reader > > The same applies to values in nested contracts of ->* - like (integer-in > 0 #x1f). > > Of course #,(~a "~x" #x1f) will produce the string with appropriate > contents - but enclosed in parentheses which does not help much. Also it > is not just a matter of typesetting because the provide form really > contracts the procedure being provided and the actual values should > actually be present. > > I would love to see some documentation-stage parameter where I could > just (parameterize ((numbers-as-hexadecimal #t)) (integer-in ...) ...) > and it would keep the values as they are for contract purposes and > render them hexadecimal. Of course, this is quite specific - more > generic solution is probably more appropriate, this is just to explain > the problem I am trying to solve. > > > Cheers, > Dominik > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/aca5b2ab-36b6-98c6-0747-9d5447ae9766%40trustica.cz. > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAFUu9R7xE4j4f8CLqWhV3-jRKMifFxUfLBx7xBogiuaT37OwqA%40mail.gmail.com.
[racket-users] Scribbling hexadecimal values
Hello Racketeers, I am struggling to make scribble typeset default values in proc-doc/names in hexadecimal. An example would be: (proc-doc/names name (->* () (integer?) void?) (() ((argument #x1f))) @{ some description }) ; yes, at-exp reader The same applies to values in nested contracts of ->* - like (integer-in 0 #x1f). Of course #,(~a "~x" #x1f) will produce the string with appropriate contents - but enclosed in parentheses which does not help much. Also it is not just a matter of typesetting because the provide form really contracts the procedure being provided and the actual values should actually be present. I would love to see some documentation-stage parameter where I could just (parameterize ((numbers-as-hexadecimal #t)) (integer-in ...) ...) and it would keep the values as they are for contract purposes and render them hexadecimal. Of course, this is quite specific - more generic solution is probably more appropriate, this is just to explain the problem I am trying to solve. Cheers, Dominik -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/aca5b2ab-36b6-98c6-0747-9d5447ae9766%40trustica.cz.
[racket-users] [racket users] Naming conventions
Hi guys, Racket has some naming conventions that I’ve come across: parameters prefixed with “current-“, class and interfaces suffixed with % and <%> respectively. I’ve not stumbled across one for structs yet. Suppose I have a circle struct and want to distinguish this from the http/image circle function? Or suppose I have symbols that are never bound to anything? Kevin -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/9B9B9785-3B2A-4DBB-BC2E-E3D543CB4D21%40gmail.com.