If I'm following correctly, I think that's what I was trying to do, but I'm
unclear how to give `make-deserialize-info` a variant of `make-adder` that
has a contract. The initial example with `define/contract` was the closest
I've come: it at least reported violations in terms of `make-adder` rathe
On Sun, Jul 23, 2017 at 10:09 PM, Jon Zeppieri wrote:
>
> Even after implementing my own suggestions, it's still much slower
> than the python example it was based. Maybe there's an algorithmic
> problem somewhere (aside from the vector iteration I mentioned
> before). At any rate, I'm intrigued n
The original example had an explicit deserializer:
At Sun, 23 Jul 2017 19:54:43 -0500, Philip McGrath wrote:
> (define deserialize-info:adder-v0
> (make-deserialize-info make-adder
>(λ () (error 'adder
> "can't have cycles")
I see. Not surprisingly serialization strips the contract of (structural)
functions as you can see with this slightly different example:
#lang racket
(module server racket
(require racket/serialize)
(provide (contract-out
[adder (-> natural-number/c (-> natural-number/c
natur
On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl
wrote:
> Hi Racket Users,
>
> The last few days I've been working on implementing decision trees in Racket
> and I've been following the following guide:
> http://machinelearningmastery.com/implement-decision-tree-algorithm-scratch-python/
>
> N
Here is the problem with serialization, without my attempts to mitigate it:
#lang racket
(module server racket
(require racket/serialize)
(provide (contract-out
[adder (-> natural-number/c (-> natural-number/c
natural-number/c))]))
(se
[replying to myself]
> On Jul 23, 2017, at 9:58 PM, Matthias Felleisen wrote:
>
>
> At some point I wrote all this up for the contract doc (as the opening
> paragraphs). I can’t see it right now.
Still there:
http://docs.racket-lang.org/guide/contract-boundaries.html
--
You receiv
> On Jul 23, 2017, at 9:43 PM, Philip McGrath wrote:
>
> Aha — so it isn't really an issue with serialization at all. If I (now)
> understand this correctly, when a function produces a contracted higher-order
> result, it is the responsibility of the caller of the original function to
> ensur
Aha — so it isn't really an issue with serialization at all. If I (now)
understand this correctly, when a function produces a contracted
higher-order result, it is the responsibility of the caller of the original
function to ensure that the result function is always applied to
appropriate arguments
On Sun, Jul 23, 2017 at 9:07 PM, Jon Zeppieri wrote:
> Struct update does, however, involve a full copy[...]
Err, immutable struct update, that is (in case it wasn't obvious).
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe fro
On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl
wrote:
>
> How can I make my code more efficient, without changing the basic logic of it?
>
In addition to what I wrote before, there are a couple of places where
you're constructing new lists when you don't need to. In `gini-index`,
for example,
> On Jul 23, 2017, at 8:54 PM, Philip McGrath wrote:
>
> I'm confused about why the following program is blaming the server for the
> client's misuse of an applicable struct instance. More generally, I've tried
> doing this in several different ways, and I can't figure out how to make
> appli
On Sun, Jul 23, 2017 at 8:43 PM, David Storrs wrote:
>
>
> On Sun, Jul 23, 2017 at 8:05 PM, Jon Zeppieri wrote:
>> - Use a struct instead of a hash to represent a split.
>
>
> Oh, are structs faster than hashes?
Can't make a blanket statement, and the best reason to use a struct in
this case has
I'm confused about why the following program is blaming the server for the
client's misuse of an applicable struct instance. More generally, I've
tried doing this in several different ways, and I can't figure out how to
make applicable structs that are still protected by contracts after
deserializa
On Sun, Jul 23, 2017 at 8:05 PM, Jon Zeppieri wrote:
> On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl
> wrote:
> > Hi Racket Users,
> >
> > The last few days I've been working on implementing decision trees in
> Racket and I've been following the following guide:
> http://machinelearningmast
More generally, this seems to be a raw translation of an algorithm stated in a
language that has a rather lowlevel view of data. Perhaps this is needed for
this world, but I doubt it.
I teach trees and decision trees to freshman students who have never programmed
before, and Racket’s forms of
On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl
wrote:
> Hi Racket Users,
>
> The last few days I've been working on implementing decision trees in Racket
> and I've been following the following guide:
> http://machinelearningmastery.com/implement-decision-tree-algorithm-scratch-python/
>
> N
Hi Racket Users,
The last few days I've been working on implementing decision trees in Racket
and I've been following the following guide:
http://machinelearningmastery.com/implement-decision-tree-algorithm-scratch-python/
Now I have the following code: https://github.com/ZelphirKaltstahl/racke
Thank you so much! I feel so stupid now, that file path is a leftover from when
the directory structure was different. Now it works perfectly.
> On 23 Jul 2017, at 17:43, Ryan Culpepper wrote:
>
> On 07/23/2017 07:26 AM, Alejandro Sanchez wrote:
>> Hello everyone,
>> I am working on this projec
On Sunday, July 23, 2017 at 5:43:51 PM UTC+2, Ryan Culpepper wrote:
> On 07/23/2017 07:26 AM, Alejandro Sanchez wrote:
> > Hello everyone,
> >
> > I am working on this project: https://gitlab.com/HiPhish/MsgPack.rkt/
> >
> > I am writing test cases and I ran into a problem with my ‘ext’ structure
On 07/23/2017 07:26 AM, Alejandro Sanchez wrote:
Hello everyone,
I am working on this project: https://gitlab.com/HiPhish/MsgPack.rkt/
I am writing test cases and I ran into a problem with my ‘ext’ structure. It is
declared in the file ‘msgpack/main.rkt’, which is required in the file
‘msgpac
Hello everyone,
I am working on this project: https://gitlab.com/HiPhish/MsgPack.rkt/
I am writing test cases and I ran into a problem with my ‘ext’ structure. It is
declared in the file ‘msgpack/main.rkt’, which is required in the file
‘msgpack/pack.rkt’ (also in ‘msgpack/unpack.rkt’). For my
22 matches
Mail list logo