Re: [racket-users] installing scribble-mode for Spacemacs
I just decided to distribute this as a ".el" file now: http://www.neilvandyke.org/scribble-emacs/ I will add it to one of the Emacs package systems when I get a chance, probably not soon. If you find a problem with this package specific to this Spacemacs thing, I'll consider a small and clean patch to fix the problem. Neil V. -- 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] second->date
There was an overflow problem in the part that tries to prepare a 64-bit value to put into the 32-bit halves of `FILETIME`. I've pushed a repair. Thanks for the report and help! At Fri, 19 Feb 2016 18:06:55 -0500, Jon Zeppieri wrote: > Er, no. Disregard that. That'll teach me to talk about the Windows API when > I know nothing about it. Apparently, the FILETIME type is divided into two > 32-bit values. > > At any rate, there is a bug, but I don't know where it is. > > -Jon > > > On Fri, Feb 19, 2016 at 5:31 PM, Jon Zeppieriwrote: > > > I'm not especially familiar with the code in question, but it looks to me > > like some time-handling code in fun.c assumes 32-bit values. I'm referring > > to this: [ > > > https://github.com/racket/racket/blob/50db01bf2c7c57fd5c7c662307d517ce2c29c279/ > racket/src/racket/src/fun.c#L9981 > > ]. > > > > On a 64-bit system, mzlonglong should be 64 bits wide, I think, but the > > code here seems to assume 32 bits. > > > > Again, I'm really not very familiar with this code, though. > > > > (By the way, the date* you get back from (sub1 (expt 2 50)) isn't correct. > > The year should be 35680317.) > > > > -Jon > > > > > > > > On Fri, Feb 19, 2016 at 4:49 PM, Jos Koot wrote: > > > >> The following surprises me: > >> > >> > (seconds->date (sub1 (expt 2 40))) > >> seconds->date: integer is out-of-range > >> integer: 1099511627775 > >> Nevertheless I can go further on in time: > >> > >> > (seconds->date (sub1 (expt 2 50))) > >> #(struct:date* > >> 40 > >> 5 > >> 11 > >> 23 > >> 9 > >> 22520 > >> 1 > >> 266 > >> #t > >> 7200 > >> 0 > >> "Romance Daylight Time") > >> > >> But when I go too far in future, I find myself in the past: > >> > >> > (seconds->date (sub1 (expt 2 62))) > >> #(struct:date* > >> 59 > >> 59 > >> 0 > >> 1 > >> 1 > >> 1970 ---> the future seems to be in the past > >> 4 > >> 0 > >> #f > >> 3600 > >> 0 > >> "Romance Standard Time") > >> > >> This in the REPL of DrRacket (64 bits, Windows 7) > >> Anyone an idea what is happening here? > >> Things go well with seconds < (expt 2 31) > >> Thanks, Jos > >> > >> -- > >> 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. -- 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: if you want to do a startup
jun lin wrote on 02/19/2016 04:24 AM: I'm not sure using Racket is a good choice for a startup. Racket itself is a good language, but if you need do something serious, you also need bullet proof libraries. In the detail, I'm interested in web development, and looks like Racket don't have good ORM and web framework libraries. It depends what you're trying to do, and how you want to do it. Sometimes it goes back to my comments in another thread here the other day, regarding "DIY": Neil Van Dyke wrote on 02/13/2016 01:33 PM: I'd say the biggest downside is that there is still lots of things that are off-the-shelf for some mainstream platforms, but require some in-house DIY work for Racket. Sometimes this is something you can DIY faster and better than you can get an off-the-shelf solution integrated, but sometimes the DIY is just extra cost with no direct benefit. There is also a long discussion to be had about the countless different ways that people develop and deploy Web-based systems, and how that relates to Racket and startups. Quick off-the-cuff brain dump for now, since had a non-decaf coffee this afternoon... Not only is the sheer size/complexity and numbers of 'standards' and languages and frameworks *massive* now, but they're constantly growing. And still, unless your needs fit some now-conventional way of doing things, there's a significant chance you'll be unable to find a framework that does what you need well, and you'll only discover that after substantial investment in evaluating different ones. (In support of that last assertion: notice that the houses of successful Web-ish companies with skilled developers, like Google/Amazon/Facebook/Twitter/Yahoo/Microsoft, usually end up developing their own frameworks and other infrastructure, even when that's not their business.) I have worked on projects in which Racket DIY saved the day, when no off-the-shelf solution would've been viable, no matter what other language had been used. So, depending on the nature of your startup's innovation, it might well be that you are doing something Web-related that doesn't actually fit an off-the-shelf Web framework anyway. You're probably OK with off-the-shelf "Web" frameworks, if you're making yet another photo sharing site; possibly not, if you're doing yet another messaging/forum service or `sharing economy' middleman middleware, that scales and integrates with necessary devices/services; also possibly not, if doing needing "Web" bits that competitors/owners currently guard closely or that is just now emerging; also possibly not, if you're you're not just exhausting the combinatorics of mash-ups of well-known successful ideas like "We're like cats.com, but for hamsters!", and your ideas imply non-entirely-clerical-grunt-coding technical requirements. That said, if your startup's innovation does fit off-the-shelf frameworks well, as they often do, then a Racket-inclined team especially will have to ask themselves, "What are the benefits/costs/risks of doing this in Racket, given what we can foresee about how our architecture would use off-the-shelf and DIY, and how does that compare to what we can foresee about other language-rooted platforms we might use instead?" The decision could easily go either way, with many rapidly-moving early startups. To contrast, for a stodgy corporate system, the decision will usually go with what the broader organization (or subset) already uses, or something otherwise politically safe to pitch and implement, in a "nobody ever got fired for buying IBM" way -- but startups tend to have more flexibility than that. (Aside regarding contributing the hypothetical DIY bits back to Racket community... I do have a model/story for, when an organization does DIY some bits in Racket, how to maintain the non-proprietary DIY bits in a low-cost and possibly-beneficial (not altruistic) open source lifecycle. This involves a particular correspondence between kinds of reusable open source components, and good practices for systems architecture and organizational software engineering process, and some tools to support that. But, for an early startup, I would probably advise against open source contributions, except for patches to upstream of others' established stuff, because cost:benefit doesn't seem likely to work out for a startup in the near term. My own open source bits are to promote the platform as a consultant, or just altruistic, not an example for startups, and I've also been sitting on some unreleased packages for reasons that a startup might. Later, once the startup is more successful, they can look at retroactive open sourcing of bits, as a one-time dump for PR/hiring purposes, or even maintained that way, or possibly do new/ongoing development with a model/story of self-beneficial architecture/process/tools that happens to fit well with open sourcing, but that's after already successful.
[racket-users] Re: Generic dipatch and multi-methods options in DrRacket
> Are there arguments against using multi-methods or other ways of building > generic (and extensible) dispatch? > Just recently I have read blog post by Alexis King regarding safe multi-methods proof of concept that addresses "spooky action at a distance": http://lexi-lambda.github.io/blog/2016/02/18/simple-safe-multimethods-in-racket/ One could also try pattern matching to get multiple dispatch like here: http://r-wos.org/blog/racket-multiple-dispatch I personally like to structure my code utilizing multi-methods so am looking forward to the development in this area. I know too little of Racket to advise, but definitely like the direction Alexis' proof of concept is going into. Greg -- 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] second->date
On Fri, Feb 19, 2016 at 6:34 PM, Jos Kootwrote: > Thanks very much for your reply. > Reflecting your post it now is clear to me that the (decimal) order of > magnitude of the year > (seconds->date (sub1 (expt 2 50))) should be around 7 or 8 (setting > second 0 to "Thu, 01 Jan 1970 01:00:00 +0100"). > How do you know the year should be (exactly) 35680317? > Jos > It comes out that way on my system (OS X): > (seconds->date (sub1 (expt 2 50))) (date* 3 57 13 25 9 35680317 2 267 #f -18000 0 "EST") And I double-checked it with gregor (which doesn't use the OS for computing dates and times): > (require gregor) > (posix->datetime (sub1 (expt 2 50))) # Note the difference in the hours field between the two answers is the result of using local time for the former and UTC for the latter. If I pass the additional flag to seconds->date: > (seconds->date (sub1 (expt 2 50)) #f) (date* 3 57 18 25 9 35680317 2 267 #f 0 0 "UTC") ... the results are the same. -Jon > > > -- > *From:* Jon Zeppieri [mailto:zeppi...@gmail.com] > *Sent:* viernes, 19 de febrero de 2016 23:31 > *To:* Jos Koot > *Cc:* Racket Users > *Subject:* Re: [racket-users] second->date > > I'm not especially familiar with the code in question, but it looks to me > like some time-handling code in fun.c assumes 32-bit values. I'm referring > to this: [ > https://github.com/racket/racket/blob/50db01bf2c7c57fd5c7c662307d517ce2c29c279/racket/src/racket/src/fun.c#L9981]. > > > On a 64-bit system, mzlonglong should be 64 bits wide, I think, but the > code here seems to assume 32 bits. > > Again, I'm really not very familiar with this code, though. > > (By the way, the date* you get back from (sub1 (expt 2 50)) isn't correct. > The year should be 35680317.) > > -Jon > > > > On Fri, Feb 19, 2016 at 4:49 PM, Jos Koot wrote: > >> The following surprises me: >> >> > (seconds->date (sub1 (expt 2 40))) >> seconds->date: integer is out-of-range >> integer: 1099511627775 >> Nevertheless I can go further on in time: >> >> > (seconds->date (sub1 (expt 2 50))) >> #(struct:date* >> 40 >> 5 >> 11 >> 23 >> 9 >> 22520 >> 1 >> 266 >> #t >> 7200 >> 0 >> "Romance Daylight Time") >> >> But when I go too far in future, I find myself in the past: >> >> > (seconds->date (sub1 (expt 2 62))) >> #(struct:date* >> 59 >> 59 >> 0 >> 1 >> 1 >> 1970 ---> the future seems to be in the past >> 4 >> 0 >> #f >> 3600 >> 0 >> "Romance Standard Time") >> >> This in the REPL of DrRacket (64 bits, Windows 7) >> Anyone an idea what is happening here? >> Things go well with seconds < (expt 2 31) >> Thanks, Jos >> >> -- >> 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] second->date
Thanks very much for your reply. Reflecting your post it now is clear to me that the (decimal) order of magnitude of the year (seconds->date (sub1 (expt 2 50))) should be around 7 or 8 (setting second 0 to "Thu, 01 Jan 1970 01:00:00 +0100"). How do you know the year should be (exactly) 35680317? Jos _ From: Jon Zeppieri [mailto:zeppi...@gmail.com] Sent: viernes, 19 de febrero de 2016 23:31 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] second->date I'm not especially familiar with the code in question, but it looks to me like some time-handling code in fun.c assumes 32-bit values. I'm referring to this: [https://github.com/racket/racket/blob/50db01bf2c7c57fd5c7c662307d517ce2c29c 279/racket/src/racket/src/fun.c#L9981]. On a 64-bit system, mzlonglong should be 64 bits wide, I think, but the code here seems to assume 32 bits. Again, I'm really not very familiar with this code, though. (By the way, the date* you get back from (sub1 (expt 2 50)) isn't correct. The year should be 35680317.) -Jon On Fri, Feb 19, 2016 at 4:49 PM, Jos Kootwrote: The following surprises me: > (seconds->date (sub1 (expt 2 40))) seconds->date: integer is out-of-range integer: 1099511627775 Nevertheless I can go further on in time: > (seconds->date (sub1 (expt 2 50))) #(struct:date* 40 5 11 23 9 22520 1 266 #t 7200 0 "Romance Daylight Time") But when I go too far in future, I find myself in the past: > (seconds->date (sub1 (expt 2 62))) #(struct:date* 59 59 0 1 1 1970 ---> the future seems to be in the past 4 0 #f 3600 0 "Romance Standard Time") This in the REPL of DrRacket (64 bits, Windows 7) Anyone an idea what is happening here? Things go well with seconds < (expt 2 31) Thanks, Jos -- 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] second->date
Er, no. Disregard that. That'll teach me to talk about the Windows API when I know nothing about it. Apparently, the FILETIME type is divided into two 32-bit values. At any rate, there is a bug, but I don't know where it is. -Jon On Fri, Feb 19, 2016 at 5:31 PM, Jon Zeppieriwrote: > I'm not especially familiar with the code in question, but it looks to me > like some time-handling code in fun.c assumes 32-bit values. I'm referring > to this: [ > https://github.com/racket/racket/blob/50db01bf2c7c57fd5c7c662307d517ce2c29c279/racket/src/racket/src/fun.c#L9981 > ]. > > On a 64-bit system, mzlonglong should be 64 bits wide, I think, but the > code here seems to assume 32 bits. > > Again, I'm really not very familiar with this code, though. > > (By the way, the date* you get back from (sub1 (expt 2 50)) isn't correct. > The year should be 35680317.) > > -Jon > > > > On Fri, Feb 19, 2016 at 4:49 PM, Jos Koot wrote: > >> The following surprises me: >> >> > (seconds->date (sub1 (expt 2 40))) >> seconds->date: integer is out-of-range >> integer: 1099511627775 >> Nevertheless I can go further on in time: >> >> > (seconds->date (sub1 (expt 2 50))) >> #(struct:date* >> 40 >> 5 >> 11 >> 23 >> 9 >> 22520 >> 1 >> 266 >> #t >> 7200 >> 0 >> "Romance Daylight Time") >> >> But when I go too far in future, I find myself in the past: >> >> > (seconds->date (sub1 (expt 2 62))) >> #(struct:date* >> 59 >> 59 >> 0 >> 1 >> 1 >> 1970 ---> the future seems to be in the past >> 4 >> 0 >> #f >> 3600 >> 0 >> "Romance Standard Time") >> >> This in the REPL of DrRacket (64 bits, Windows 7) >> Anyone an idea what is happening here? >> Things go well with seconds < (expt 2 31) >> Thanks, Jos >> >> -- >> 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] second->date
I'm not especially familiar with the code in question, but it looks to me like some time-handling code in fun.c assumes 32-bit values. I'm referring to this: [ https://github.com/racket/racket/blob/50db01bf2c7c57fd5c7c662307d517ce2c29c279/racket/src/racket/src/fun.c#L9981 ]. On a 64-bit system, mzlonglong should be 64 bits wide, I think, but the code here seems to assume 32 bits. Again, I'm really not very familiar with this code, though. (By the way, the date* you get back from (sub1 (expt 2 50)) isn't correct. The year should be 35680317.) -Jon On Fri, Feb 19, 2016 at 4:49 PM, Jos Kootwrote: > The following surprises me: > > > (seconds->date (sub1 (expt 2 40))) > seconds->date: integer is out-of-range > integer: 1099511627775 > Nevertheless I can go further on in time: > > > (seconds->date (sub1 (expt 2 50))) > #(struct:date* > 40 > 5 > 11 > 23 > 9 > 22520 > 1 > 266 > #t > 7200 > 0 > "Romance Daylight Time") > > But when I go too far in future, I find myself in the past: > > > (seconds->date (sub1 (expt 2 62))) > #(struct:date* > 59 > 59 > 0 > 1 > 1 > 1970 ---> the future seems to be in the past > 4 > 0 > #f > 3600 > 0 > "Romance Standard Time") > > This in the REPL of DrRacket (64 bits, Windows 7) > Anyone an idea what is happening here? > Things go well with seconds < (expt 2 31) > Thanks, Jos > > -- > 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.
[racket-users] second->date
The following surprises me: > (seconds->date (sub1 (expt 2 40))) seconds->date: integer is out-of-range integer: 1099511627775 Nevertheless I can go further on in time: > (seconds->date (sub1 (expt 2 50))) #(struct:date* 40 5 11 23 9 22520 1 266 #t 7200 0 "Romance Daylight Time") But when I go too far in future, I find myself in the past: > (seconds->date (sub1 (expt 2 62))) #(struct:date* 59 59 0 1 1 1970 ---> the future seems to be in the past 4 0 #f 3600 0 "Romance Standard Time") This in the REPL of DrRacket (64 bits, Windows 7) Anyone an idea what is happening here? Things go well with seconds < (expt 2 31) Thanks, Jos -- 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] pict3d trouble
awesome thanks. On Fri, Feb 19, 2016 at 3:05 AM Matthew Flattwrote: > Thanks for the info! > > The problem was not specific to 10.11 (obviously) and not related to GL > bitmaps. It was in the way Pict3D creates and hides a frame to get a > screen-compatible GL context. Between v6.3 and v6.4, I changed the way > `racket/gui` hides a frame on OS X, and the new way destroys the GL > context that Pict3D is trying to get. > > One workaround is for Pict3D to not show and hide the GL-context frame > on OS X. (The show-and-hide step is still needed to initialize the > context on Gtk.) A better solution would be to more directly support > the creation of screen-compatible GL contexts, but I'll leave that for > another day. > > For now, I've pushed a change to Pict3D, and the catalog should pick up > the change soon. > > At Fri, 19 Feb 2016 00:02:04 +, Stephen De Gabrielle wrote: > > I'm running 10.10 Yosemite. (should I do a bug report to capture machine > > details?) > > > > macosx "Darwin Miriams-MacBook-Pro.local 14.5.0 Darwin Kernel Version > > 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 > > x86_64" (x86_64-macosx/3m) (get-display-depth) = 32 > > > > thanks, > > > > S. > > > > > > > > > > On Thu, Feb 18, 2016 at 11:31 PM Matthew Flatt > wrote: > > > > > I see the same problem on my machine with v6.4 and 6.4.0.8, and not > > > with v6.3. > > > > > > Using `pict3d/universe` works for me in all versions, but the Pict3D > > > snip that's shown in DrRacket doesn't. So, I think the problem must be > > > due to a change since v6.3 in `racket/gui` related to GL bitmaps. I'll > > > investigate more. > > > > > > Are you running 10.11 (El Capitan)? > > > > > > > > > At Thu, 18 Feb 2016 22:27:05 +, Stephen De Gabrielle wrote: > > > > [image: Screen Shot 2016-02-18 at 22.22.50.png]Hi, > > > > > > > > Does anyone have any ideas why pict3d is giving me white on white? > > > > I can tell it is drawing the sphere because the mouseover coords > appear - > > > > but I'm at a loss as to what I've done. > > > > > > > > Stephen > > > > > > > > -- > > > > 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. > > > > > -- > 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] Which html-parsing package?
BTW, I now intend to move my packages to the new package system shortly, and I'll then stop supporting the PLaneT ones. (There's some urgency to moving now, so I'm going to punt on workarounds for the version-related differences in the new package system, and cut some corners on automation like I had for PLaneT, for now. I might have to leave in the `mcfly-runtime` package dependency for now, if I don't have time to move to my forthcoming `threedoc` format and tool.) Neil V. -- 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] Typed Classes and this%
Axel, I tend to organize modules around classes so that I avoid the "Asumu pitfall": #lang typed/racket (define-type Polynome% (Class [init-field [a [Vectorof Real]]] [value (-> Real Real)] [derive (-> Polynome)])) (define-type Polynome (Instance Polynome%)) #; (type-out [create-polynome (-> [Vectorof Real] Polynome)]) ;; where is it? (provide create-polynome) (: create-polynome (-> [Vectorof Real] Polynome)) (define (create-polynome a0) (new polynome% [a a0])) ;; represent the polynomial p(x) = Σ a(i) * x^i (: polynome% Polynome%) (define polynome% (class object% (init-field ;; [Vectorof Real] a) (super-new) ;; Real -> Real (define/public (value x) (* (vector-ref a 0) x)) ;; -> Polynome (define/public (derive) (create-polynome a) #; (new this% [a a] (: polynome Polynome) (define polynome (new polynome% [a #(1 2 3)])) (send polynome value 1) (send (send polynome derive) value 1) Warning: functionality intentionally wrong. I started from this untyped version: #lang racket (provide ;; type Polynome = #; (Class [field a [Vectorof Real]] [value (-> Real Real)] [derive (-> Polynome)]) ;; [Vectorof Real] -> Polynome create-polynome) (define (create-polynome a) (new polynome [a a])) ;; represent the polynomial p(x) = Σ a(i) * x^i (define polynome% (class object% (init-field ;; [Vectorof Real] a) (super-new) ;; Real -> Real (define/public (value x) (* (vector-ref a 0) x)) ;; -> Polynome (define/public (derive) (create-polynome a) #; (new this% [a a] (define polynome (new polynome% [a #(1 2 3)])) (send polynome value 1) (send (send polynome derive) value 1) ;; You see how adding types clarified my thoughts. -- Matthias -- 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] Typed Classes and this%
Hi Axel, On 2016-02-19 06:24:35 -0800, Axel Schnell wrote: > I'm just experimenting with typed classes in the typed/racket language.In my > first experiments I created a class called polynome% with a method derive. > The result of this method is new instance of this class via (new this% ...). > Unfortunately the drracket environment complained that it does not know > this%. Is 'this%' missing by design or is it just not yet implemented? It's missing by design, because it's unclear what type it can be assigned. Typed Racket requires that a class type describes all of the methods/fields that a class actually has, so that when you subclass it you can statically check that no method/field name conflicts will occur. But you can't write down such a type for `this%` because the methods/fields it will have is only known at runtime. In particular, it may actually be a subclass of the class you originally wrote the `this%` reference in. Cheers, Asumu -- 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] Typed Classes and this%
I'm just experimenting with typed classes in the typed/racket language.In my first experiments I created a class called polynome% with a method derive. The result of this method is new instance of this class via (new this% ...). Unfortunately the drracket environment complained that it does not know this%. Is 'this%' missing by design or is it just not yet implemented? -- 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: recursive definition of a PROPOSITION
Do you mean the following? (define (a) (case (random 6) [(0) (string-append "P" "→" (a))] [(1) (string-append "R" "↔" (a))] [(2) (string-append "T" "∧" (a))] [(3) (string-append "Z" "⊕" (a))] [(4) (string-append "S" "q" (a))] [(5) "" ])) Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Aysenur Türk Sent: viernes, 19 de febrero de 2016 13:24 To: Racket Users Subject: [racket-users] Re: recursive definition of a PROPOSITION (define (a) (case (random 6) [(0) (string-append "P" (a)"→" )] [(1) (string-append "R" (a) "↔")] [(2) (string-append "T" (a)"∧" ) ] [(3) (string-append "Z" (a)"⊕")] [(4) (string-append "S" (a) "q")] [(5) "" ])) (a) "RPRZTZPRZPZT∧⊕→⊕↔→⊕∧⊕↔→↔" "TPTZ⊕∧→∧" I tried it and found that but it's not work that i want.the propositions and variables order wrong i want it like that "P↔Q→ R ∧ S ⊕ T¬Y ∨ Z ".How can fix it? -- 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: recursive definition of a PROPOSITION
You are not designing your code. You’re guessing. Is that what you want? > On Feb 19, 2016, at 7:23 AM, Aysenur Türkwrote: > > (define (a) > (case (random 6) >[(0) (string-append "P" (a)"→" )] >[(1) (string-append "R" (a) "↔")] >[(2) (string-append "T" (a)"∧" ) ] >[(3) (string-append "Z" (a)"⊕")] >[(4) (string-append "S" (a) "q")] >[(5) "" ])) > > > > (a) > > > "RPRZTZPRZPZT∧⊕→⊕↔→⊕∧⊕↔→↔" > "TPTZ⊕∧→∧" > > I tried it and found that but it's not work that i want.the propositions and > variables order wrong i want it like that "P↔Q→ R ∧ S ⊕ T¬Y ∨ Z ".How can fix > it? > > -- > 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.
[racket-users] Re: recursive definition of a PROPOSITION
(define (a) (case (random 6) [(0) (string-append "P" (a)"→" )] [(1) (string-append "R" (a) "↔")] [(2) (string-append "T" (a)"∧" ) ] [(3) (string-append "Z" (a)"⊕")] [(4) (string-append "S" (a) "q")] [(5) "" ])) (a) "RPRZTZPRZPZT∧⊕→⊕↔→⊕∧⊕↔→↔" "TPTZ⊕∧→∧" I tried it and found that but it's not work that i want.the propositions and variables order wrong i want it like that "P↔Q→ R ∧ S ⊕ T¬Y ∨ Z ".How can fix it? -- 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: if you want to do a startup
在 2016年2月16日星期二 UTC+8上午7:05:59,Neil Van Dyke写道: > CS students and other Racketeers planning to do a startup... You're > probably familiar with what Paul Graham, of Y Combinator fame, has said > about the merits of using Lisp (ahem, Racket) for the initial system. > And sometimes you can also use Racket for the eventual system. So, > you're considering using Racket for your startup, right? > > My day job is money-grubbing, fancy-pants technical consultant to > established organizations. But if you'd like to use Racket for your > startup, I'm up to being a technical advisor to a couple early cash-poor > startups, on an equity-only basis. You'll of course need to assemble > your founders team with the key competencies for your business -- an > advisor is just there in the background, to help your team grow in the > right directions, and to quietly back you up on occasion. Your founders > team will also need to be doing all the standard business-side things, > with the help of business advisers and perhaps an accelerator program, > and to be driving the startup with your own vision and wholehearted effort. > > I'm based in Boston, and often work online. > > Neil V. I'm not sure using Racket is a good choice for a startup. Racket itself is a good language, but if you need do something serious, you also need bullet proof libraries. In the detail, I'm interested in web development, and looks like Racket don't have good ORM and web framework libraries. -- 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.