At Mon, 21 Jul 2014 01:32:21 -0500, Robby Findler wrote:
> On Mon, Jul 21, 2014 at 12:53 AM, Matthew Flatt wrote:
> > Currently, `read-language` does return #f when `get-info` is not
> > available. I'm not sure anymore whether that was intended, but since it
> > has worked that way for a while, an
On Mon, Jul 21, 2014 at 12:53 AM, Matthew Flatt wrote:
> Currently, `read-language` does return #f when `get-info` is not
> available. I'm not sure anymore whether that was intended, but since it
> has worked that way for a while, and since the intent of
> `read-language` is to report the `get-inf
Currently, `read-language` does return #f when `get-info` is not
available. I'm not sure anymore whether that was intended, but since it
has worked that way for a while, and since the intent of
`read-language` is to report the `get-info` function, then I think the
way forward here is to fix the doc
Thank U very much,
Our project is about "programming language principle". during the semester
we have been programming a compiler for Jack language in racket,
and now we need to make a presentation on Racket language that includes all
information about the principle that we learned.
2014-07-21 5:
On Jul 20, 2014, at 9:25 PM, Jon Zeppieri wrote:
> On Sun, Jul 20, 2014 at 6:27 PM, Matthias Felleisen
> wrote:
>>
>> The phrase "call-by-value is a reduction strategy" has no meaning per se but
>> is a left over from the time when people hadn't figured out the above (pre
>> 1070).
>>
>
> I
On Sun, Jul 20, 2014 at 6:27 PM, Matthias Felleisen
wrote:
>
> The phrase "call-by-value is a reduction strategy" has no meaning per se but
> is a left over from the time when people hadn't figured out the above (pre
> 1070).
>
I apologize for spreading this nonsense. Is it the phrase "reductio
Yeah: I think that it is safe to say at this point that pollen doesn't need
to change. Either read-language's docs (and various places in DrRacket and
libraries) need to change or read-language needs to change and either way
pollen will work afterwards.
My guess is that your language is the only o
On Sun, Jul 20, 2014 at 8:18 PM, Robby Findler
wrote:
> FWIW, I think raise-argument-error is a fine way to go here to avoid
> that expense (I assuming you're thinking of not checking this aspect
> of the contract using the racket/contract library but instead
> computing 'expensive-result' once in
Hey all,
Anyone know how to get Racket's db to write to a uuid column in Postgres? I
keep getting "unsupported type". The documentation suggests casting as a
workaround, but the example is a select - I doubt that will work as well for an
insert...?
Thanks,
joshua
Rac
> It appears that read-language can return #f and what DrRacket does in
> that case appears to be what you're seeing. Is that what you're
> getting?
Your theory seems correct. Yes, Pollen is the only #lang returning #f for
read-language, e.g.:
#lang racket/base
(map
(λ(lang) (read-language (op
FWIW, I think raise-argument-error is a fine way to go here to avoid
that expense (I assuming you're thinking of not checking this aspect
of the contract using the racket/contract library but instead
computing 'expensive-result' once in the body and then checking it?).
And one day perhaps the resea
It appears that read-language can return #f and what DrRacket does in
that case appears to be what you're seeing. Is that what you're
getting?
The docs say that read-language never returns #f (presumably it is
allowed to return #f when fail-thunk returns #f, but the relevant
fail-thunk here doesn'
call-by is a notion of time, pass-by refers to entity that is used (location if
you so will). You can create a 2-dimension table of these options and you'll be
able to find some language for almost any cell in this table.
The common meaning of call-by-value is call-by-value/pass-by-reference.
Oh, sorry I meant:
(read-language (open-input-string "#lang pollen"))
Robby
On Sun, Jul 20, 2014 at 6:23 PM, Robby Findler
wrote:
> DrRacket doesn't do anything with packages during startup that's
> related to this. It doesn't do anything with the language at startup
> either, but it does cac
DrRacket doesn't do anything with packages during startup that's
related to this. It doesn't do anything with the language at startup
either, but it does cache information about the language to avoid
querying the language while you are editing the file. Editing the
"#lang" line invalidates this cac
Thanks
And actually I wrote an experimental syntax-parse branch that has support for
pattern-expanders. It’s not completely working yet though.
On Jul 20, 2014, at 6:22 PM, J. Ian Johnson wrote:
> If you don't want to allow ellipses, this will work:
> (~seq-no-order _pats ...) == (~seq (~or
Hi all,
I'm stuck on a macro issue with the top-level and was wondering if
anyone had any thoughts.
Certain macros (I'm thinking of parts of Typed Racket) manage
communication between different parts of a program (different macros or
different instantiations of the same macro) by storing a syntax
If you don't want to allow ellipses, this will work:
(~seq-no-order _pats ...) == (~seq (~or (~once _pats) ...))
Here _pats and ... are meta, not part of the syntax-parse syntax.
If you do want ellipses, then you'll have to do some parsing yourself to
determine which patterns shouldn't be wrappe
Thanks I didn’t know about prop:match-expander.
Now the rename transformer seems to work but it’s not working as a
match-expander:
(define-match-expander+rename-transformer my-list
#:match-expander
(lambda (stx)
(syntax-parse stx
[(my-list expr:expr ...) ; doesn't work
#'(l
Hi Michael,
Did the error from git master say something like "x undefined" ?
If so I have a fix.
/Jens Axel
2014-07-20 22:18 GMT+02:00 Michael McCracken :
> Hi, I'm trying to build whalesong and am hitting errors both when using the
> planet version in DrRacket, and when using the makefile fr
Is there anything like a "~seq-no-order" pattern for syntax/parse ?
Racket Users list:
http://lists.racket-lang.org/users
You want to use the prop:match-expander and prop:procedure properties for a
struct you bind for syntax. That way the match-expander has its piece and the
procedure provides the syntax transformer.
-Ian
- Original Message -
From: Alexander D. Knauth
To: racket users list
Sent: Sun, 20 Ju
On Sun, Jul 20, 2014 at 1:18 PM, Michael McCracken <
michael.mccrac...@gmail.com> wrote:
> Hi, I'm trying to build whalesong and am hitting errors both when using
> the planet version in DrRacket, and when using the makefile from the
> current git master.
>
> Unfortunately I'm a real newcomer to R
Hi, I'm trying to build whalesong and am hitting errors both when using the
planet version in DrRacket, and when using the makefile from the current
git master.
Unfortunately I'm a real newcomer to Racket, so I'm not sure how to make
this a smarter question. Does anyone know what's going on here,
On Sun, Jul 20, 2014 at 2:47 PM, Alexander D. Knauth
wrote:
>
> On Jul 20, 2014, at 1:56 PM, Jon Zeppieri wrote:
>
>> I feel like this has come up before, but I can't seem to find the
>> discussion in the archive.
>
> Was this what you were thinking of?
> http://lists.racket-lang.org/users/archiv
Though it is an off-label use of contracts, it can be done. I made something I
call "coercion contracts" that mutate & validate the input (or output) argument
as part of the contract:
(define/contract (function-that-wants-something-stringlike x)
(coerce/string? . -> . coerce/boolean?)
(d
On Jul 20, 2014, at 1:56 PM, Jon Zeppieri wrote:
> I feel like this has come up before, but I can't seem to find the
> discussion in the archive.
Was this what you were thinking of?
http://lists.racket-lang.org/users/archive/2013-November/060427.html
http://lists.racket-lang.org/users/archive/2
On Sun, Jul 20, 2014 at 5:02 AM, קוראל אלימלך wrote:
> Hey :)
> How the arguments are passed in racket?
> by value/ reference/name?
>
> If u can add an example it will b good :)
> Thank U !
>
I suspect two different things are being conflated here:
1. the reduction semantics of the language
2. t
On Jul 20, 2014, at 1:56 PM, Jon Zeppieri wrote:
> I feel like this has come up before, but I can't seem to find the
> discussion in the archive. I have a procedure that needs to perform a
> fairly expensive computation which is needed both for checking the
> inputs and for producing output. I'd
That's a helpful clue, but DrRacket still seems to be making some kind of
mysterious & negative judgment about the package when it starts up:
1) I created a branch in my github repo called pollen/scratchy that only
consists of the file shown below, and switched to that branch.
2) Consistent wi
I ran into this when trying to do vector-ref on a value of type In-Indexes from
math/array.
If I do something like this:
#lang typed/racket
(: v : (U (Vectorof Index)
(Vectorof Integer)))
(define v #(0))
(ann (vector-ref v 0) Integer)
Then it doesn't type check. I understand that (
I feel like this has come up before, but I can't seem to find the
discussion in the archive. I have a procedure that needs to perform a
fairly expensive computation which is needed both for checking the
inputs and for producing output. I'd like to avoid computing it twice,
and I'd also like to use
Is there a way to supply a rename transformer instead of a procedure for it to
use when it’s not used as a match pattern?
If I do something like this:
#lang racket
(require (for-syntax syntax/parse))
(define-match-expander my-list
(lambda (stx) ; to use when it’s a match pattern, works
(
I think probably a clearer way is to say this:
(define plus
(lambda xs
(displayln “received: “)
(displayln xs)
(apply + xs)))
http://docs.racket-lang.org/guide/lambda.html#%28part._rest-args%29
On Jul 20, 2014, at 11:33 AM, קוראל אלימלך wrote:
> thank u very much:)
>
>
> 2014-07
thank u very much:)
2014-07-20 18:29 GMT+03:00 Jens Axel Søgaard :
> (define (plus . xs) ; notice the . xs . The arguments are passed as a
> list in xs.
> (displayln "received: ")
> (displayln xs)
> (apply + xs))
>
> 2014-07-20 16:07 GMT+02:00 קוראל אלימלך :
> > how can i define a functio
(define (plus . xs) ; notice the . xs . The arguments are passed as a
list in xs.
(displayln "received: ")
(displayln xs)
(apply + xs))
2014-07-20 16:07 GMT+02:00 קוראל אלימלך :
> how can i define a function that gets a not known number of parameters
> (like the + function:
> that i can se
On 7/20/14, 10:07 AM, קוראל אלימלך wrote:
> how can i define a function that gets a not known number of parameters
> (like the + function:
> that i can send (+1 2 ) or (+ 1 2 3 ) (+1 2 3 4 ))
http://docs.racket-lang.org/guide/lambda.html
I think many of the questions you have will be answere
how can i define a function that gets a not known number of parameters
(like the + function:
that i can send (+1 2 ) or (+ 1 2 3 ) (+1 2 3 4 ))
thank u :)
Racket Users list:
http://lists.racket-lang.org/users
thank u all!! :)
2014-07-20 16:09 GMT+03:00 קוראל אלימלך :
> תודה רבה לכולם :)
> עזרתם לי מאוד!
>
>
> 2014-07-20 15:59 GMT+03:00 David Van Horn :
>
>> On 7/20/14, 7:04 AM, קוראל אלימלך wrote:
>> > How can i define that a function will get an integer argument?
>> >
>> > is its possible?
>> >
>> >
תודה רבה לכולם :)
עזרתם לי מאוד!
2014-07-20 15:59 GMT+03:00 David Van Horn :
> On 7/20/14, 7:04 AM, קוראל אלימלך wrote:
> > How can i define that a function will get an integer argument?
> >
> > is its possible?
> >
> > for example:
> > (define (func (x::Number))) /// its not working that way
>
On 7/20/14, 7:04 AM, קוראל אלימלך wrote:
> How can i define that a function will get an integer argument?
>
> is its possible?
>
> for example:
> (define (func (x::Number))) /// its not working that way
>
> and if ill call the function with string there will be an error..
In addition to the sug
#lang typed/racket
(: plus : Number Number -> Number)
(define (plus x y)
(+ x y))
(plus 1 2)
(plus "x" 3)
2014-07-20 13:53 GMT+02:00 Jens Axel Søgaard :
> #lang racket
>
> (define (plus x y)
> (unless (and (number? x) (number? y))
> (error 'plus (~a "expected two numbers, got: " x " " y
#lang racket
(define (plus x y)
(unless (and (number? x) (number? y))
(error 'plus (~a "expected two numbers, got: " x " " y)))
(+ x y))
(plus 1 2)
(plus "x" 3)
2014-07-20 13:04 GMT+02:00 קוראל אלימלך :
> How can i define that a function will get an integer argument?
>
> is its possible?
Have you looked into Typed Racket?
http://docs.racket-lang.org/ts-guide/index.html
You can write things similar to the following:
(define (f [x : Number]) : Number x)
- Original Message -
From: "קוראל אלימלך"
To: users@racket-lang.org
Sent: Sunday, July 20, 2014 7:04:39 AM GMT -05:0
How can i define that a function will get an integer argument?
is its possible?
for example:
(define (func (x::Number))) /// its not working that way
and if ill call the function with string there will be an error..
Racket Users list:
http://lists.racket-lang.org/users
Be aware there is also a lazy racket (#lang lazy)
#lang racket ; call by value
(define (show x) (display x) (newline) x)
(define (plus x y z)
(display "now we are in the procedure\n")
(+ x y z))
"the procedure has been defined"
(plus (show 1) (show 2) (show 3) )
"the proceedure has been calle
thank u :)
but we didn't understand if the arguments are passed by value or reference?
we think that it passed by value, and if we use with pointers it can pass
by refernce.
another question,
if we use let function, the argument is passed by name?
thank u very much!
2014-07-20 13:09 GMT+03:00
See section 4.3.1 of the Racket guide.
Jos
_
From: users [mailto:users-boun...@racket-lang.org] On Behalf Of ? ??
Sent: domingo, 20 de julio de 2014 11:03
To: users@racket-lang.org
Subject: [racket] Pass by value/name/reference
Hey :)
How the arguments are passed in racket?
by
Hey :)
How the arguments are passed in racket?
by value/ reference/name?
If u can add an example it will b good :)
Thank U !
Racket Users list:
http://lists.racket-lang.org/users
49 matches
Mail list logo