Sorry my mistake , it is 6.8 seconds. :) .
Veer
On Tue, Dec 11, 2012 at 9:52 PM, daniel rupis
wrote:
> Veer Singh writes:
>
>>
>> I am getting 6.8 ms without modifying the code.
>> When I change modulo to remainder I get 6.3 ms consistently.
>
>
>
I am getting 6.8 ms without modifying the code.
When I change modulo to remainder I get 6.3 ms consistently.
Veer.
On Tue, Dec 11, 2012 at 8:33 PM, daniel rupis
wrote:
>
> I was comparing some code in Qi with that of sbcl, I posted a question in
> comp.lang.lisp asking for a way to im
; to re-order them yourself (and note that DrRacket currently doesn't
> provide any guarantees about the precise set of menus in the menubar).
>
> Robby
>
> On Thu, Jun 28, 2012 at 6:47 AM, Veer Singh wrote:
>> Just tried it , the menu is inserted before Tab menu , which
Just tried it , the menu is inserted before Tab menu , which is where I wanted.
I assume that new menu's are inserted before Tab menu in DrRacket.
Thanks.
On Thu, Jun 28, 2012 at 4:28 PM, Veer Singh wrote:
> Is it possible to insert a menu between two other menu in menu-bar but
>
Is it possible to insert a menu between two other menu in menu-bar but
not at the end?
More specifically if I want to add a new menu in DrRacket between
"Racket" and "Insert" how do I do that?
Thanks
Veer
Racket Users list:
http://lists.racket-lang.org/users
In racket you are applying function "base64-encode" and in python you are not.
Sorry if I didn't get your question.
Veer.
On Mon, May 14, 2012 at 9:38 AM, Shawn Smith wrote:
> Having issues with mailing list. Trying again:
>
> I've gotten a bit of help in #racke
Hurray! it works just fine now . Thanks a lot Neil.
On Wed, Feb 8, 2012 at 3:16 PM, Neil Van Dyke wrote:
> Veer Singh wrote at 02/08/2012 04:27 AM:
>
> Well actual program is here :
>>
>> https://github.com/veer-**public/Predicate-Dispatch<https://github.com/veer-p
Well actual program is here :
https://github.com/veer-public/Predicate-Dispatch
Running example1.rkt produces the error in DrRacket , but runs fine in
console.
Thanks.
On Wed, Feb 8, 2012 at 2:41 PM, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 08
My First line is #lang racket and the control in the lower left of the
DrRacket window says "Determine language from source custom?"
On Wed, Feb 8, 2012 at 2:48 PM, Neil Van Dyke wrote:
> What happens if you make the first line of the file be "#lang racket", and
> you make sure that the contro
I just recently downloaded racket version 5.2.1.
Now when running a "particular" program in drracket I get following error :
compile: unbound identifier in the transformer environment (and no #%app
syntax transformer is bound) in: #%require
But when same program is run in console , it works just
Ignore the above post , I figured this out after reading little bit more ,
just need to properly structure the code , sorry for the noise :)
Thanks.
On Wed, Jan 18, 2012 at 1:20 PM, Veer Singh wrote:
> Hello ,
>
> How do I during compilation stop propagation of shared state
Add
(require (for-syntax syntax/parse))
or
use syntax-case and wrap it in begin i.e (begin define id-lst .)
On Wed, Jan 18, 2012 at 5:36 PM, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 18-01-12 11:36, Veer Singh wrote:
> > This seems t
This seems to work (blind hack), I really don't know
what syntax-local-make-definition-context and syntax-local-bind-syntaxes
does
I can only assume that they introduce some kind of bindings in particular
context.
(define-syntax (depgraph stx)
(syntax-parse stx
[(_ ((id:id expr:expr ...) ..
Hello ,
How do I during compilation stop propagation of shared state in a some
module and allow propagation of shared state in other modules.
Consider the following normal and compiled modules given below where
applying (add) produces list of symbols.
Now in module m2 if there is some form like
little bit but I think its because the `phases' macro is
> expanded at phase 2 before `set-compile' is called. If you put
> (set-compile) before the definition of `phases' then you get '(1 2).
>
>
> On 01/17/2012 12:06 AM, Veer Singh wrote:
>
>
> W
Why macro call (phases) produces '(1 0) and not '(1 2) ?
(module mod1 racket
(require (for-syntax syntax/parse))
;"mod-compile.rkt"))
(require (for-syntax
(for-syntax syntax/parse racket )))
;"mod-compile.rkt")))
(provide set-compile phases)
I think the conflict may be here(I may be wrong) :
When parser encounter C , it can reduce to y or it can shift i.e it think
there is A waiting to be read, hence shift/reduce conflict
On Mon, Jan 16, 2012 at 2:49 PM, Dmitry Pavlov wrote:
> Hello all,
>
> I am having trouble with yacc parser
I am not too sure if this is less than quadratic ??
(define points (list->vector '(a b c d e f)))
(define l (vector-length points))
(define (gen org start end)
(for/list ([n (in-range start end )])
(cons (vector-ref points org ) (vector-ref points n
(for/fold ([accum empty]) ([i (in-r
Code is available here https://github.com/veer-public/OAuth-2.0 .
Thanks.
On Sat, Sep 17, 2011 at 7:55 PM, Matthew Flatt wrote:
> I think we need "web-flow/web-server-flow.rkt" and its dependencies to
> diagnose this problem. Is that code available somewhere?
>
> At Sun
Thank you so much , it is really inspiring and helpful and will read
again and again.
Hope to change my style , which is basically no tests , and no
documentation and poor code organization .
On Thu, Sep 15, 2011 at 6:17 AM, Matthias Felleisen
wrote:
>
>
> For the past few months, I have been w
When I click Scribble HTML in DrRacket for code below
#lang scribble/manual
@(require (for-label racket "web-flow/web-server-flow.rkt"))
@title{OAuth 2.0 Client Library}
I get following error :
#%plain-lambda: cannot bind identifier tainted by macro expansion at:
l17069 in: (#%plain-lambda (l1
Thank you for neat explanation , I was really confused and apology to OP.
On Wed, Sep 7, 2011 at 9:08 PM, Nadeem Abdul Hamid wrote:
> On Wed, Sep 7, 2011 at 1:40 AM, Veer wrote:
>> If my link tag is
>>
>> Then browser does not find index.css , but when my li
If my link tag is
Then browser does not find index.css , but when my link tag is
If it is :
Then browser is able to apply the index.css .
I am not too sure why is it so.
Also add current directory to the #:extra-files-paths , assuming this
is where html and css files resides.
(serve/servlet st
, do something with it .
On Tue, Sep 6, 2011 at 6:12 PM, Jay McCarthy wrote:
> Can you give an example?
>
> Jay
>
> On Tue, Sep 6, 2011 at 6:39 AM, Veer wrote:
>> But this will require duplicating most of what serve/servlet already does.
>>
>> I was thinking in t
, Jay McCarthy wrote:
> That's what serve/launch/wait is. If serve/servlet isn't quite
> customizable enough, you should use serve/launch/wait and perhaps
> dispatch/servlet
>
> Jay
>
> On Tue, Sep 6, 2011 at 5:48 AM, Veer wrote:
>> I wonder if it is good id
I wonder if it is good idea for serve/servlet to take extra keyword
argument for custom dispatcher.
This might be useful for plugin type of application. Just a thought.
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo
d inside modules that use that language.
>
> The one from web-server/servlet/web is the stateful one. This is
> implemented purely with native continuations, so it can be used
> anywhere.
>
> Jay
>
> On Mon, Sep 5, 2011 at 12:44 AM, Veer wrote:
>> Can I use send/suspend
Can I use send/suspend outside the #lang web-server module ?
For example , the two modules below don't work , I get something like :
"Attempt to capture a continuation from within an unsafe context: "
For statefull servlets this type of example works fine.
"Module test.rkt"
#lang web-serve
h";
#:token-uri "https://accounts.google.com/o/oauth2/token";
#:redirect-uri "http://localhost:8000/oauth2callback.rkt";
#:response-type 'code))
Just substitute the client-id and client-secret that you got from google.
Example should work now, if not just drop
I have put a very basic OAuth-2.0 protocol implementation at
https://github.com/veer-public/OAuth-2.0
As I understand it more , I will try to improve it , at present it
seems to work ok with
google api and requires racket version 5.1.3 .
Thanks
On Fri, Aug 26, 2011 at 1:01 AM, Sam Tobin
I figured it out, it is not that complex as I thought initially , also
I thought url constructor
was escaping the data.
Thanks all for the help.
On Sat, Aug 13, 2011 at 9:37 AM, Veer wrote:
> Since server part expects escaped data based on rfc 1738 , I "assume"
> that it wil
This url http://localhost:8000/servlets/standalone.rkt?test=%ff
causes server to close connection whereas
http://localhost:8000/servlets/standalone.rkt?test=%23 does not , and
works as expected.
I suppose this is caused by use of net/url library, right?
On Fri, Aug 12, 2011 at 11:43 PM, Jay McCar
Since server part expects escaped data based on rfc 1738 , I "assume"
that it will not be able to interpret the data as base64 encoding.
As per bittorrent spec , the get request to tracker must have
info_hash(20 byte sha) escaped along with others.
Is there any other way to insert query part in url
e also , but could not follow it up (sorry for that)
Veer
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
I think #:servlet-regexp #rx"" will match anything , if I remove it
the application runs fine.
Otherwise http://localhost:8080/servlets/standalone.rkt will match ,
so will http://localhost:8080/servlets/standalone2.rkt and so on.
Most probably the browser is also requesting favicon.ico . You can
Thanks.
Also I missed was that when a unit is invoked/inferred , one
need not provide a another unit which implements import of
first unit, only names should be visible to first unit when it is
invoked.
On Sun, Jul 10, 2011 at 1:53 PM, Ryan Culpepper wrote:
> On 07/10/2011 01:04 AM, V
Thanks for taking time out to explain.
Now I got it that define introduces identifier binding before
it evaluate it expression part, so that we can refer
to it in the expression.
Thanks again.
On Sun, Jul 10, 2011 at 12:19 PM, Eli Barzilay wrote:
> A few seconds ago, Veer wrote:
>> I
)
>
> Just between you and me, I never use internal "define". I came from RnRS,
> where "define" was only used at top level, and top level is fraught with
> witchcraft. "let", "let*", "let-values", and "let*-values" are more
nters the
identifier color and then value of color is returned.
Sorry if I am using wrong terminology.
Thanks.
On Sun, Jul 10, 2011 at 11:28 AM, Eli Barzilay wrote:
> 10 minutes ago, Veer wrote:
>> Following code returns # :
>>
>> (define (make-color color)
>>
Following code returns # :
(define (make-color color)
(define color color)
color)
(make-color 'red) ;; => #
>From the guide , I get that internal definition of color is not initialized
therefore the result is # . What does not initialized means
in this context.
My assumption was that interna
Just a suggestion , not request.
How about web application for multiple choice tests.
For example you can have a online test for "How well you know Racket" or
"Simple algebra" etc. Each question has choices and one answer.
Any one can submit a test and anyone can take test or only registered
users
ation is
>
> (begin [] (error 'oops ...) (recur))
>
> When you click "View", the value
>
> (response/xexpr
> `(html))
>
> gets returned to the continuation, so you get an error, because begin
> ignores the value and drops through to the error.
>
> Jay
>
Hello,
When I run this web application (given below) , I get strange behavior
, don't know if
this is correct behavior or not.
Follow/click the link in sequence :
1. Create Something
2. Start again
3. View
So , when I click "view" I get exception instead of blank page.
code :
#lang web-server/
Hello Sam,
Choosing "No debugging or profiling" did the trick.
I assume that this error(now gone) is not specific to my system.
Thanks!!! a lot.
Veer.
On Thu, Jun 16, 2011 at 5:30 PM, Sam Tobin-Hochstadt wrote:
> Try the following:
>
> 1. Open the "Choose La
Ok , problem is still there , I get the same error , on new ubuntu
system 11.04 and newly downloaded racket 5.1.1 .
Any other idea , on how to troubleshoot it ?
On Tue, Jun 14, 2011 at 6:55 PM, Veer wrote:
> Removing compiled directory also does not work , same error.
> I am upgrad
led' directory
> from wherever "filename.rkt" is.
>
> On Tue, Jun 14, 2011 at 4:01 AM, Veer wrote:
>> Thanks for replying.
>> Problem still persist , even after running raco setup .
>> I did not compiled the racket from the source, I downloaded the binary
>
2011 at 10:26 AM, Veer wrote:
>> When I run the code(shown below) in DrRacket , I get the error :
>>
>> compile: access from an uncertified context to unexported variable
>> from module: "/home/vvv/racket/collects/racket/contract/private/base.rkt"
>> in: appl
iring "web-utils1.rkt" , but
cannot understand why is it so and what this error means.
My Racket Version is 5.1.1
Thanks
Veer.
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
Thanks Jos for trying out the code.
Thank you for your suggestion for keeping struct in separate module,
which is what I want to do.
Veer.
On Thu, Apr 21, 2011 at 6:56 PM, Jos Koot wrote:
> Well, I didn't try it.
> It appears that you cannot define a syntax within a begin for sy
s loe)
#:omit-define-syntaxes))
I get error :
"expand: unbound identifier in module (in phase 1, transformer
environment) in: proc-struct "
But this works :
(begin-for-syntax
(struct proc-struct (name args loe)
#:omit-define-syntaxes #:constructor-name make-proc-struct))
Th
te:
> Wrap the definition of the struct in begin-for-syntax.
> Jos
>
>> -Original Message-
>> From: users-boun...@racket-lang.org
>> [mailto:users-boun...@racket-lang.org] On Behalf Of Veer
>> Sent: 21 April 2011 14:22
>> To: users@racket-lang.org
>&g
How do I use structure's constructor in define-syntax .
I want to do something like this :
(struct proc-struct (name args loe))
(define-for-syntax (process ps)
#'#t)
(define-syntax (procedure stx)
(syntax-case stx ()
[(_ name args e1 e2 ...)
(process (proc-struct #'name (syntax->
1
exp1
(cond2 (pred2 exp2) ...)))]))
;;this is returns 7
(cond2
(#f 4)
(else1 7))
;;this cause error
(cond2
(else1 3)
(else1 4))
;;returns 2
(let ((else1 1))
(cond2
(else1 2)
(else1 3)))
Thanks again for explaining in such detail and simplic
You are right, I misunderstood everything from syntax object to
free-identifier=? and bound-identifier=? .
Thank you for explaining it so nicely also for the references , I will
read them soon.
Veer.
On Sun, Apr 10, 2011 at 4:53 PM, Marco Maggi wrote:
> Veer wrote:
>> I am u
Hello,
I am unable to understand how free-identifier=? and bound-identifier=? works?
For example suppose I have a code :
(lambda (x y) (let ([x 2]) x))
then how do I determine if last x in the body of let is not bound by first
parameter to lambda? , using either free-identifier=? or bound-ide
If your data is always a "string" over 0,1 then you can write like
this (which is similar to yours)
(define (bit-and b1 b2)
(if (char=? b1 #\0)
b1
b2))
(define (bitwise f str1 str2)
(for/fold ((res "")) ((b1 str1) (b2 str2))
(string-append res (string (f b1 b2)
(bitwise b
Give a byte string, for example (bytes 211) , how do I encode it to
"%D3" , using uri-encode , or
any other existing function in racket.
Also when i try to do (uri-decode "%D3") , it complains that :
"bytes->string/utf-8: string is not a well-formed UTF-8 encoding: #"\323"
Thanks
_
57 matches
Mail list logo