[racket-users] reporting contract violations in executable programs

2018-11-01 Thread Alexander McLin
I’m a little confused here, to me it looks like the second contract violation is completely different from the first one. You were expecting `foo` to raise a contract violation but in your executable example it appears that contract violation is being raised by the `build-path` function not `fo

Re: [racket-users] How to tighten the contract on a function

2018-09-05 Thread Alexander McLin
Something like the following program: #lang racket (module foomod racket (provide foo) (define/contract (foo arg) (-> string? #t) #t)) (require 'foomod) (provide (contract-out (foo (-> non-empty-string? #t On Tuesday, September 4, 2018 at 9:00:06 PM UTC-4, David K. Storrs wrote: > >

Re: [racket-users] How to tighten the contract on a function

2018-09-05 Thread Alexander McLin
What about reproviding foo and using contract-out to wrap foo in a new contract? On Tuesday, September 4, 2018 at 9:00:06 PM UTC-4, David K. Storrs wrote: > > > > On Tue, Sep 4, 2018 at 8:55 PM, Matthew Butterick > wrote: > >> >> On Sep 4, 2018, at 3:54 PM, David Storrs > > wrote: >> >> Say

[racket-users] Re: Recommendation for learning syntax?

2018-08-07 Thread Alexander McLin
I was an attendee of Racket Summer School 2018 where we covered syntax-parse extensively. The lecture plans and problem assignments are still available online and they together comprise a good tutorial for syntax-parse and language design principles. I encourage you to give it a try! https://

Re: [racket-users] Unicode identifiers

2018-05-16 Thread Alexander McLin
Would it be possible to adjust the readtable to replace "→" with "->" ? On Wednesday, May 16, 2018 at 10:32:43 AM UTC-4, Andrew Kent wrote: > > `racket/string` needs to be required _for syntax_ in order to work in the > suggested way (because it's bindings are needed at compile time). > > The f

[racket-users] Re: error in DrRacket but not in script

2018-04-10 Thread Alexander McLin
My guess the problem is (define imleftname #"./tsukubaleft.jpg") You're using a relative path to the jpg file which may be valid wherever your script file is located but DrRacket is probably starting up with a different working directory and the relative path is not resolving successfully.

Re: [racket-users] Struct general question

2018-03-30 Thread Alexander McLin
As an aside, vectors are intended to be a constant-time access data structure. Lists aren't so it won't make sense to build vectors on top of lists which would make for non-constant slot access times. On Monday, March 26, 2018 at 4:13:02 PM UTC-4, lysseus wrote: > > > > > On Mar 26, 2018, at 11

Re: [racket-users] racket (7) on a new arch

2018-02-23 Thread Alexander McLin
On Friday, February 23, 2018 at 11:08:23 AM UTC-5, David K. Storrs wrote: > > > On Thu, Feb 22, 2018 at 11:14 AM, Alexander McLin > wrote: > >> As one of those who have been following RISC-V progress for several years >> and also interested in seeing Racket being po

Re: [racket-users] racket (7) on a new arch

2018-02-22 Thread Alexander McLin
As one of those who have been following RISC-V progress for several years and also interested in seeing Racket being ported to that architecture I want to drop a note to let you know you have my support! -- You received this message because you are subscribed to the Google Groups "Racket Users

Re: [racket-users] Adding interactive overlays to racket plots

2018-02-04 Thread Alexander McLin
Your interactive plot looks wonderful and would be a good replacement for some of R's statistical graphing features. I'm excited you're making this valuable contribution to Racket. I did noticed something in your documentation at https://alex-hhh.github.io/2018/02/interactive-overlays-with-the-

[racket-users] Re: Reliably propagating received log messages to ports

2018-02-01 Thread Alexander McLin
Thanks all for your inputs. I tried `with-intercepted-logged` before though it didn't solve all of my issues, though as Robby mentioned, my code probably isn't accurately capturing all of the start and exit nuances my need reflect, I'll need to think more about the big picture to do a better jo

[racket-users] Reliably propagating received log messages to ports

2018-01-31 Thread Alexander McLin
ust using old-fashioned `println`s Thank you for your suggestions. Alexander McLin -- 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

[racket-users] Re: How to integrate Racket with a .Net application?

2018-01-31 Thread Alexander McLin
All three approaches you outlined are viable but web service is easiest to set up. >From what you described, it seems it would be a low-performance use for Racket and only simple data structures will be passed back and forth on an infrequent basis. Web service would be a good fit for that. Ou

Re: [racket-users] Equivalent of dynamic-wind post-thunk for with-handlers

2018-01-24 Thread Alexander McLin
On Wednesday, January 24, 2018 at 5:54:44 PM UTC-5, Alexis King wrote: > > Based on your question, why not just use dynamic-wind in combination > with with-handlers? Just keep in mind that the post-thunk could be > called multiple times if there is a continuation jump into value-thunk, > so you

[racket-users] Equivalent of dynamic-wind post-thunk for with-handlers

2018-01-24 Thread Alexander McLin
I have a with-handlers expression which handles several exceptions appropriately and raises user-error exceptions, I have some additional code I'd like to be executed after the exception have been handled, analogous to dyanmic-wind's post-thunk argument or like the finally clause of a conventio

[racket-users] Re: Installing Racket Package `gregor` inside a Docker container

2017-12-27 Thread Alexander McLin
I don't have much to add but wanted to note that the problem appears to be in rendering grengor's documentation. The package itself may be installed fine, just not its associated documentation. You can test to verify if package is installed by querying via raco pkg or just requiring gregor in a

[racket-users] Re: New package: Argo: JSON Schema validation

2017-08-30 Thread Alexander McLin
This is quite a timely post. I had been looking into using a JSON schema validation C library and using FFI to hook into that for my projects. I'll give your new package a try! Thank you for making it available Jesse. -- You received this message because you are subscribed to the Google Groups

[racket-users] Re: query-exec SQLite3 multiple statements

2017-07-28 Thread Alexander McLin
Yes, you can use DrRacket to debug the file at collects/db/private/sqlite3/connection.rkt. That one is likely the most relevant one for you. Alternatively, you could wait till Racket 6.10 is released which is very soon I think. The bug fixes to the db library might reveal the correct error mess

[racket-users] Re: query-exec SQLite3 multiple statements

2017-07-26 Thread Alexander McLin
I tried query-exec on those SQL strings you posted on gist on my local copy of Racket 6.8 with an in-memory SQLite3 db and it worked fine. I'm not sure what's causing your issue. What version of Racket and SQLite3 are you running on your machine? Is it Windows, Linux, or Mac OSX? > https://gi

[racket-users] Re: query-exec SQLite3 multiple statements

2017-07-26 Thread Alexander McLin
One more thing for you to check, make sure there's no trailing whitespace after the end of your statement's terminating semi-colon, that will also trigger the `multiple statements given` error. That bug has been also fixed in the current repository. -- You received this message because you are

[racket-users] Re: query-exec SQLite3 multiple statements

2017-07-26 Thread Alexander McLin
It appears you're giving to `query-exec` a string consisting of two statements; the create table and insert into statements. `query-exec` only supports executing one statement at a time. If you break your two statements up into two strings and call `query-exec` on each one, it should work. --

[racket-users] Re: Searching diffrences in two lists

2017-06-28 Thread Alexander McLin
Consider using the following function https://docs.racket-lang.org/reference/pairs.html?q=memq#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._memq%29%29 It's helpful to sketch out the general steps you'd need to be able to carry out the procedure to solve the problem. My quick sketch would

[racket-users] Re: inspecting a table error 'error 'query: multiple statements given'

2017-06-25 Thread Alexander McLin
FYI, the misleading "multiple statements given" error has been fixed in the racket master branch and correct syntax error message is now being raised. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop recei

[racket-users] Re: Executing batch statements against a database using `db` library.

2017-05-12 Thread Alexander McLin
Thank you Alex, your code looks comprehensive and ought cover my use case. Appreciate your sharing! Best, Alexander -- 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 emai

[racket-users] Executing batch statements against a database using `db` library.

2017-05-12 Thread Alexander McLin
`db` library doesn't seem to provide support for executing batch statements against a database. I'm trying to initialize and create an in-memory SQLite3 database using a SQL schema file. `query-exec` and its friends only support executing single SQL statements. Reading documentation isn't show

[racket-users] Re: Racket Package Catalog Site and Raco Commands

2017-04-24 Thread Alexander McLin
While I have no strong preferences for whether it would be better to allow end-users determine what tags to apply as opposed to automatic system tags, it might be more effective to make provisions for special tags to be supported in info.rkt and have the catalog automatically read those tags if

[racket-users] Re: Racket Package Catalog Site and Raco Commands

2017-04-24 Thread Alexander McLin
All of your suggestions are great and get my vote. To elaborate on the raco tag, it should list all the commands *and* subcommands. Example: pkg package tag: raco: pkg install, pkg update, pkg remove, etc. -- You received this message because you are subscribed to the Google Groups "Racket

[racket-users] Racket Package Catalog Site and Raco Commands

2017-04-24 Thread Alexander McLin
First of all, I wish to express my appreciation for such a beautifully designed package catalog site located at pkgs.racket-lang.org. I was wondering if we could add a special search term category or tag that list all available raco commands that packages may install? For example, when building

Re: [racket-users] Announcing Leibniz, a new language in the Racket universe

2017-04-20 Thread Alexander McLin
> Indeed. What would be such classical papers from your field? One paper I have in mind is Hodgkin & Huxley's paper published in 1952 where they first wrote down the equations describing the membrane voltage of the giant squid axon. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1392413/pdf/jphys

[racket-users] Re: [Shameless self-promotion] Articles about programming-language theory for working programmers in Racket

2017-04-17 Thread Alexander McLin
Leandro, Your article comes at a good time for me because I received my copy of "Semantics Engineering with PLT Redex" last week and am preparing to start studying it. I thought your examples are a nice exposition of the complex ideas that go into selecting features a programming language needs

[racket-users] Re: inspecting a table error 'error 'query: multiple statements given'

2017-04-17 Thread Alexander McLin
The error message is unclear but I believe SQLite do not support parameters for PRAGMA statements. The SQLite documentation at http://www.sqlite.org/lang_expr.html#varparam specifically says parameters are supported by expressions. PRAGMA statements are not expressions. If you examine the SQ

Re: [racket-users] Announcing Leibniz, a new language in the Racket universe

2017-04-16 Thread Alexander McLin
This looks quite promising, I'm liking the progress and examples so far. The idea of using the same notation to express both equations and algorithms excites me. It would certainly make it easier to write down and analyze algorithms implementing a set of model equations in a language independent

[racket-users] Re: linking with raco ctool : unable to find libracket3mxxxxxxx.lib

2017-03-14 Thread Alexander McLin
You need to compile Racket from source to generate the .lib file, it is not distributed with the installation. You need to make sure the source is the same version as your installed Racket and it is compiled targeting the same bit architecture as the installed Racket version. Then copy the gene

Re: [racket-users] Request for Information about Racket and .NET interop support

2017-01-16 Thread Alexander McLin
I understand where you're coming from. My organization is flexible and isn't ideologically committed to one particular platform. Microsoft's community promise is just that, a promise. It can be changed or revoked at any time in the future. I've been encouraging adoption of open system practices

Re: [racket-users] Request for Information about Racket and .NET interop support

2017-01-16 Thread Alexander McLin
Thank you Matthias for the historical information, it was interesting to learn that a porting project was sponsored by Microsoft in .NET's early days. Were any papers describing the efforts published? Porting Racket to .NET definitely is ambitious and as you have said, it seems unlikely .NET ha

[racket-users] Request for Information about Racket and .NET interop support

2017-01-15 Thread Alexander McLin
oo much impedance mismatch. Any design ideas or suggestions are very much welcome. Best, Alexander McLin -- 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 em

Re: [racket-users] Re: racket users fight for their right to colon keywords

2015-11-24 Thread Alexander McLin
I remember those classes as a student, to be honest I didn't really actually started to learn till after I'd left undergraduate. Don't get me wrong, I know how frustrating syntax/semantics nuances can be. I've been reflecting on the idea of existential keywords the past couple days and have rea

[racket-users] Re: racket users fight for their right to colon keywords

2015-11-22 Thread Alexander McLin
se in the keyword grammar when all other keyword cases are allowed to assume arbitrary values. Aλexander On Sunday, November 22, 2015 at 12:08:49 PM UTC-5, Alexander McLin wrote: > I don't really have a horse in this race. My position is very similar to > Alexis which is why I di

[racket-users] Re: racket users fight for their right to colon keywords

2015-11-22 Thread Alexander McLin
I don't really have a horse in this race. My position is very similar to Alexis which is why I didn't vote in the poll too. When I first arrived to Racket the #: syntax made me go "what in the world?" Since then I've grown to appreciate the reasoning behind the deliberate eye catching keyword sy

[racket-users] Re: Emacs Lisp as a Racket Language?

2015-07-03 Thread Alexander McLin
No question, this would be a challenging project. Do a clean room fresh implementation or provide full Emacs Lisp compatibility? Would it make sense to consider doing a strict subset of Emacs Lisp, with sufficiently flexibility to allow popular extensions run while leaving others behind? Commo

[racket-users] Re: Gear VR

2015-07-01 Thread Alexander McLin
On Wednesday, July 1, 2015 at 7:07:03 AM UTC-4, AJ Campbell wrote: > JSON is probably going to be the go-to format to send/receive renderable 3D > packets. The thought of doing it with XML makes me feel ill. I'm sure Racket > can handle JSON data (it very well might already for all I know), but

Re: [racket] universe program using 100% cpu on Mac (also poor Raspberry Pi performance)

2014-12-30 Thread Alexander McLin
Hello Darren, May I offer this point of view regarding tautological tests. They are useful for checking if your assumptions are consistent and they stay that way over multiple iterations of design modifications. Personally I've found keeping a list of assumptions only in my head is a recipe fo

Re: [racket] SICP (again)

2014-11-26 Thread Alexander McLin
it so I don't know whether it works or not but it's worth a look. > On Nov 26, 2014, at 8:00 AM, Catonano wrote: > > > > 2014-11-26 13:17 GMT+01:00 Alexander McLin : >> The square function is also defined in earlier SICP sections so I would >> recommend you mai

Re: [racket] SICP (again)

2014-11-26 Thread Alexander McLin
The square function is also defined in earlier SICP sections so I would recommend you maintain a running file of all functions SICP defines so you can refer back to them easily. > On Nov 26, 2014, at 5:37 AM, Catonano wrote: > > Hello > > I understand that this is not the first time someon

Re: [racket] Understanding contracts

2014-10-03 Thread Alexander McLin
n the -> form which is the ->* contract. On Fri, Oct 3, 2014 at 10:55 PM, Alexander McLin wrote: > Actually I wasn't quite ready to move on. > > When I apply (curve 3) where (define curve (cubic-bezier a b) a and b are > bezier-control-point? &g

Re: [racket] Understanding contracts

2014-10-03 Thread Alexander McLin
as passed and — at least for me — cubic-bezier is long since gone, and thus out of mind. Alexander McLin On Fri, Oct 3, 2014 at 9:59 PM, Alexander McLin wrote: > Good evening Mathias, > > After studying your program and mine, and running various permutations, I > understand whe

Re: [racket] Understanding contracts

2014-10-03 Thread Alexander McLin
gt; (define b (bezier-control-point 0.3 9.0)) > > ((cubic-bezier a b) > ;; a contract violation because i isn't comparable > (sqrt -1))) > > > drracket or raco test file.rkt will show contract errors. > > > > > On Oct 2, 2014, at 1:50 PM, Alexander McLin

Re: [racket] Understanding contracts

2014-10-02 Thread Alexander McLin
- > ;; run program run > (require 'client) > > I assume you want to see other violations. Can you explain with this > example w/o going into Bezier? > (I just know enough about Bezier to draw curve

[racket] Understanding contracts

2014-10-01 Thread Alexander McLin
d inputs to cubic-bezier's value. How can I attach a more complex contract to cubic-bezier's value? Thank you Alexander McLin Racket Users list: http://lists.racket-lang.org/users

Re: [racket] users Digest, Vol 109, Issue 55

2014-09-29 Thread Alexander McLin
Good grief, was it necessary to spam the list with your requests? You could have just sent one email instead of replying to like 20 different threads? And it would have been nice if you'd read the basic instructions which tells you exactly how to unsubscribe yourself without flooding my inbox. On

Re: [racket] contracts ->i optional keyword syntax

2014-08-26 Thread Alexander McLin
Thank you for this information. I had been trying to figure out how to test contracts from within a module+ only to give up and move my test cases to a different file. I think this reinforces that I should be asking more questions on the mailing list. Alexander McLin > On Aug 26, 2014,

Re: [racket] Announce: multiplayer networked coop game in racket

2014-07-12 Thread Alexander McLin
This is fun! I loved how my screen would shake and flicker each time I get slammed by a fire volley. Certainly got my adrenaline pumping. On Sat, Jul 12, 2014 at 12:01 PM, David Vanderson wrote: > For the past 6 months my hobby has been writing the beginnings of a > lan-party game in Racket: >

Re: [racket] Q. about 'nostops' in MTWT paper

2014-05-09 Thread Alexander McLin
Thanks! On Fri, May 9, 2014 at 11:33 AM, David Van Horn wrote: > On 5/9/14, 11:29 AM, Alexander McLin wrote: > > Do you mind expanding on what MTWT stands for? I'm not familiar with this > > paper and am curious. > > Macros that Work Together > http://www.eecs

Re: [racket] Q. about 'nostops' in MTWT paper

2014-05-09 Thread Alexander McLin
Do you mind expanding on what MTWT stands for? I'm not familiar with this paper and am curious. On Thu, May 8, 2014 at 6:20 PM, John Clements wrote: > > On May 8, 2014, at 3:00 PM, Ryan Culpepper wrote: > > > IIRC, the typesetting of environment extension might suggest replacement > in a mappin

Re: [racket] package server + making docs available early

2014-05-02 Thread Alexander McLin
Looking forward to checking out your Pollen package in more detail, just wanted to add that after reading your original email and following the links, I eventually discovered myself losing a hour or two reading your typographical book. Very nicely written and I look forward to studying it more care

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Alexander McLin
I see, thanks for the detailed explanation. I understand the issue is whether the cost associated with cons checking arguments prior to creating the pair is acceptable or not but truly if cons is checking for list? by whether a bit is set or not, wouldn't that be negligible compared to the cost

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Alexander McLin
I'm joining in this thread because I'm now wondering about the same questions. It seems to me that if a list is created via list or make-list then the bits should have been set on the car of the new list, so all the list predicates have to do is check the first element in O(1) time. Likewise co

Re: [racket] About set-car! and set-cdr!

2014-03-05 Thread Alexander McLin
Daniel, I think it'll be worthwhile to direct your attention to this blog entry which goes into more details about why mutable pairs were removed in the first place. http://blog.racket-lang.org/2007/11/getting-rid-of-set-car-and-set-cdr.html On Wed, Mar 5, 2014 at 4:15 PM, Jens Axel Søgaard wrot

Re: [racket] racket project idea: viable html5 web browser

2014-02-16 Thread Alexander McLin
Unfortunately I don't think I have enough time to be a serious contributing developer here, but the goals of this project brought to mind another project I had studied some time ago with similar goals of creating a secure browser based on a capability-based security model. The project team used a

Re: [racket] Common Lisp or Racket?

2013-11-12 Thread Alexander McLin
Racket is truely a great and cleaner Lisp. It's carved out its own path that I find quite attractive and am enjoying my forays into Racket. I would recommend you just get started with The Little Schemer to get a taste, move on to How To Design Programs. There is a Coursera course that uses HTDP, a

Re: [racket] Racket VM in FPGAs

2013-10-19 Thread Alexander McLin
o the Scheme-79 paper yet (thanks for the reference by > the way!). > >> On Oct 19, 2013, at 1:35 PM, Alexander McLin wrote: >> I'd be interested in hearing how it's going! >> >> Just curious, are you reusing ideas from Scheme-79, or starting off in a

Re: [racket] Racket VM in FPGAs

2013-10-19 Thread Alexander McLin
I'd be interested in hearing how it's going! Just curious, are you reusing ideas from Scheme-79, or starting off in an entirely different direction? From your original email, I assume you're using JOP as a springing board? Alex > On Oct 19, 2013, at 4:32 AM, Petr Samarin wrote: > > First I w

Re: [racket] applicative order -- topic was: Re: Help with exception raising and testing

2013-08-28 Thread Alexander McLin
Thank you for the illuminating primer, Matt. I hadn't realized that it was such a questionable term. On Wed, Aug 28, 2013 at 12:54 PM, Matthias Felleisen wrote: > > On Aug 28, 2013, at 12:33 PM, Grant Rettke wrote: > > > On Wed, Aug 28, 2013 at 11:04 PM, Matthias Felleisen > > wrote: > >> For

Re: [racket] applicative order -- topic was: Re: Help with exception raising and testing

2013-08-28 Thread Alexander McLin
ew" for Matthew Flatt, the CEO of PLT Design, Inc, creator of > Racket, and ruler of the kingdom > -- "Matthias" for me, which yes, is a form of Matthew (used in Germanic > and Hispanic contexts with various spellings). > > > > > > > On Aug 28, 2013, at 1

Re: [racket] applicative order -- topic was: Re: Help with exception raising and testing

2013-08-28 Thread Alexander McLin
I would like to understand this some more. My understanding of applicative order is also connected with normal order, I thought applicative order just means that all arguments given to a procedure are always evaluated before the procedure is applied, the left-right or right-left detail is irreleva