[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

Re: [racket-users] Help: How to check a typed/racket type in an untyped Racket contract?

2017-07-28 Thread Matthias Felleisen
After some poking around, here is what I can offer: #lang racket (module predicates racket (provide discrete-dist-thing?) ;; - ;; dependencies (require math/distributions) ;; - ;; implementation (define

Re: [racket-users] Help: How to check a typed/racket type in an untyped Racket contract?

2017-07-28 Thread Matthias Felleisen
> On Jul 28, 2017, at 11:23 AM, James Geddes wrote: > > This is likely a typed-untyped interface newbie question. > > Briefly, how can I write a contract that asserts that some value has a type > that is defined in an imported typed/racket library? > > In more detail, I

[racket-users] Help: How to check a typed/racket type in an untyped Racket contract?

2017-07-28 Thread James Geddes
This is likely a typed-untyped interface newbie question. Briefly, how can I write a contract that asserts that some value has a type that is defined in an imported typed/racket library? In more detail, I am using the math/distributions library, which is written in typed/racket. My module is

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Philip McGrath
Specifically, as Robby said earlier, `list?` is memoized, so e.g. (first (rest (build-list 10 values))) only pays this price once. And `list?` rejects pairs that have cycles. -Philip On Fri, Jul 28, 2017 at 5:51 AM, Matthias Felleisen wrote: > > first and rest were

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Matthias Felleisen
first and rest were introduced in the teaching languages first when we decided it was about principles of design and cadadar was cute but nobody should have care. first and rest are about lists in other languages and the names say so. car and cdr are about pairs (not that their names say so)

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Robby Findler
It could have been. I am not sure why (but it probably had something to do with better checking for the teaching languages, Matthias may recall more). Robby On Fri, Jul 28, 2017 at 4:19 AM Daniel Prager wrote: > Interesting stuff, but if I may probe a little deeper

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Neil Van Dyke
As soon as I sent it, I saw I was conflating lists with what CL calls proper lists. I'll just link: http://docs.racket-lang.org/reference/pairs.html http://clhs.lisp.se/Body/t_list.htm http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.3.2 -- You received this

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Daniel Prager
Interesting stuff, but if I may probe a little deeper into scheme history, why couldn't first have simply been defined as a synonym for car (i.e. first item in a pair) and rest a synonym for cdr? Dan On Fri, Jul 28, 2017 at 6:09 PM, Neil Van Dyke wrote: > Daniel Prager

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Neil Van Dyke
Daniel Prager wrote on 07/28/2017 01:03 AM: > `first` and `rest` need to check if the input is a list. Why is that? When Racket/Scheme/Lisp people speak of checking whether something is a list, I think they usually mean in the sense of the predicate `list?` (or `listp`), which is usually an

[racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Zelphir Kaltstahl
In general what is the opinion on replacing `first` and `rest` with `car` and `cdr`, when considering readability? I find `first` and `rest` very readable and remember that I got quite confused when I started learning Racket with all the cadrdrdrd ;) I still think `first` and `rest` reads

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Zelphir Kaltstahl
On Friday, July 28, 2017 at 2:02:56 AM UTC+2, gustavo wrote: > I agree with the in-list explanation, but I want to remark a few details. > > >> I don't really understand the (in-list ...) thing. This seems to be > >> internal magic to me. > > `in-list` is not a function, it's a macro that looks

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-07-28 Thread Zelphir Kaltstahl
On Thursday, July 27, 2017 at 10:17:00 PM UTC+2, Daniel Prager wrote: > > Wow, are those timings for the "big" data set?! > > > I use 1/5 of the data as a training set, in line with my understanding of the > original article, which splits it in 5. > > I use the remaining 4/5 as a single