to be able to go to any
program and simply use existing lambdas to send them to a process pool
to make use of multiple cores, instead of having to refactor many things
into serializable things.
Regards,
Zelphir
On 10/9/19 11:58 PM, Philip McGrath wrote:
> On Wed, Oct 9, 2019 at 2:09 PM Zelp
Hi George!
I was wrongly under the impression, that serializable-lambda are
supposed to work out of the box, when sending them over channels,
without needing to do any further work ("are serialized automatically"
instead of "can be serialized"). This is what I would have expected, as
it seems to b
> Which defines a new function and installs it for later use under the
> name "greet".
>
> It's not elegant and it has all the usual problems with eval'ing code,
> but it's possible.
>
> On Wed, Oct 9, 2019, 2:34 AM Zelphir Kaltstahl
> mailto:zelphirkalt
I don't think places are a good example for good support of parallelism.
It is difficult to get a flexible multi processing implementation done,
without hard-coding the lambdas, that run in each place, because we
cannot send serializable lambdas (which also are not core, but only
exist in the web
You already mentioned the `begin-for-syntax`. However, it is Racket
specific and not available in for example Guile Scheme or other Schemes.
I guess I will have to put things in separate modules then. Or is there
any other way?
On 8/3/19 11:53 AM, Ryan Culpepper wrote:
> On 8/3/19 10:48 AM,
Hi!
I am trying to write a macro, which checks the name of an argument for
presence a substring. This is not the main purpose of the macro, but I want
to do different things depending on the substring being contained or not
contained.
Here is what I've got so far:
~
;; A macro to get the
Just for mentioning the original source: It has been made quite clear at
RacketCon and the video recording of it, that #lang racket is here to stay
with its current syntax.
My guess is still, that people are a bit worried about any syntax becoming
second class citizen in Racket.
(btw.: I like
I just want to give one thought as input to this discussion and will admit,
that I did not read every (but some) of the posts above.
When I write code in Racket or Scheme, I mostly like the parentheses, as
they make writing the code easy. I can very easily select a block and move
it around, wit
> The main difference, as has been pointed out before, is that Python
generators are more common as an idiom for solving problems that in
Racket would typically be approached differently.
This piqued my interest. Can you elaborate a bit or give an example? How
would one approach things with Racket
> (define my-estates-value
> (for/sum ([i (in-naturals)]
> [(k v) (in-hash my-stuffs-value)])
> (printf "item ~a is worth ~a\n" i v)
> v))
>
> my-estates-value
>
> On Thu, Feb 21, 2019 at 1:40 PM Zelphir Kaltstahl
> wrote:
>> I don't
If you were using Racket, you might be interested in this RacketCon video
(time is linked):
https://youtu.be/WI8uA4KjQJk?t=1510
Racket has a very tree like code structure right in front of the developer,
while I guess you would have to get through to the AST in other languages,
where that is n
I don't think one can see `for` in Racket as equivalent to generators in
Python.
Generators in Python are used when you want to save memory by not producing
all values at once, but want to go value by value (which to my knowledge
Racket's `for` variants do not do, but I'd like to be corrected,
I think having such migration pages for people coming from other
languages is a good idea. Maybe also should include basic programming
knowledge such as "a single linked list is not a vector", but then where
to begin? If such page says that some operations are slower on Racket
lists (append), then
I am not sure if anything in this
https://github.com/ZelphirKaltstahl/racket-markdown-blog/blob/master/blog/server.rkt#L51
helps you.
On Wednesday, January 30, 2019 at 4:42:57 PM UTC, cwebber wrote:
>
> It seems like it should be so simple, and like Racket has the tools
> already, but I can't
I've always wondered, why Racket uses Google groups and guesses, that it
is because of low setup effort required. In such cases the darker side
of lock in system shows: Not so easy to get away from them. When the
lights go out it is possible to lose everything. It's very similar to
the effect some
On 1/23/19 12:32 AM, Hendrik Boom wrote:
> On Tue, Jan 22, 2019 at 01:52:15AM -0500, George Neuner wrote:
>
>> I am arguing that, in computing, functions and procedures have no
>> significant difference, and that distinguishing them erroneously conflates
>> computing with mathematics and thus con
On 1/22/19 11:08 PM, George Neuner wrote:
>
> On 1/22/2019 2:31 PM, Zelphir Kaltstahl wrote:
>> If the terms procedures and functions in computing have no
>> significant difference, then why use two terms for the same thing, of
>> which one is already used in mathematic
If the terms procedures and functions in computing have no significant
difference, then why use two terms for the same thing, of which one is
already used in mathematics, enabling confusion to appear?
This would make a fine argument for not using the word "function" for
computing at all and kee
As far as I know contracts in Racket are evaluated at run time, for
example when calling a procedure from another module and the module has
a contract for the procedure, while types of typed Racket are evaluated
at read time. They seem to be independent concepts. I am not sure how to
use both of th
I have not tried the Goblins library yet, but it sounds great!
Also kudos for doing the free software thing! I hope you can keep it up and
that many people support you in the free software endeavors.
On Sunday, October 28, 2018 at 5:10:18 PM UTC+1, cwebber wrote:
>
> Hello all,
>
> I've made
Maybe I misunderstand, but doesn't
https://docs.racket-lang.org/reference/mpairs.html already solve this?
Unless it is a purely educational exercise of how to implement such a
thing of course.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To
Ah great to hear that!
At work I deal a lot with the Jupyter ecosystem and I think it has an
interesting future. It is good for Racket to be available there. I
personally have not used it so much for diagrams and visual things, but
maybe some day it will have some similar integration as Jupyter
) then it
> works correctly.
>
> Sam
>
> On Sun, Apr 22, 2018 at 4:40 PM, Zelphir Kaltstahl
> > wrote:
> > Ah OK, I understand that additional newline. Since the code matching the
> > regex is run before that newline gets in, the newline will be on the
> >
That is an interesting and probably much better way to do it.
Of course I did remember -0/42 … *clears throat* (not) :D
Thank you!
On Monday, April 23, 2018 at 12:03:38 AM UTC+2, Matthew Butterick wrote:
>
> On Apr 22, 2018, at 1:40 PM, Zelphir Kaltstahl > wrote:
>
> Ah OK, I
R.
Should I put this in a new question ("How to use regexp-match in TR?")
instead?
On 22.04.2018 15:15, Matthew Flatt wrote:
> At Sun, 22 Apr 2018 14:54:26 +0200, Zelphir Kaltstahl wrote:
>> I am sorry, I think I am still misunderstanding it.
>>
>> When I try:
>>
ction on an input port consumes non-matching
> input, which means that it consumes all input if a pattern that starts
> "^" doesn't match the beginning of the input.
>
> (This behavior is mentioned in the docs for `regexp-match`, but the
> docs have to say so many thi
I am trying to match a whole string, to be an integer number.
My thinking is, that an integer starts with a non zero digit and then goes
on with an arbitrary number of digits (including zero).
I put it in a regexp as follows:
(regexp-match #rx"[1-9]+[0-9]*" (current-input-port))
But this is not
send-print-pch))
> (place-printf send-print-pch
> "~v\n"
> (parallel-set-map (serial-lambda (x)
> (* x x))
> example-set
> send-print-pch)))
>
>
&
`serial-lambda` works under the hood. Each
> syntactic use of the `serial-lambda` macro is turned into a
> module-level structure type definition that implements
> `prop:procedure`. When a use is evaluated and a closure is allocated,
> it creates an instance of that structure type, pac
Today I wrote some example code for trying out `serial-lambda` from
`(require web-server/lang/serial-lambda)`. Here is what I currently have:
#lang racket
(require web-server/lang/serial-lambda)
(require racket/serialize)
(define to-send (serial-lambda (x) (* x x)))
(define to-send-2
(ser
I also think it would be great to have the material online at some later
point in time (I guess not simultaneously). Learning how to create a
language using Racket is one of the things I kept postponing so far,
because I think of it to involve a lot of difficult macro magic and
other difficult thin
(Lets try this answering to a topic via e-mail thing. Here goes …)
With a lot of help from people in the Racket user group the following
was recently created: https://github.com/ZelphirKaltstahl/work-distributor
Maybe its code can also be helpful to you.
--
You received this message because you
I finally managed to do what I want using the installer approach from Jack
Firth's Dockerfile:
~~
# DEBIAN IMAGE #
FROM debian:jessie
# META #
MAINTAINER "Zelphir
This looks very interesting! I am not that far yet, so I don't really have
any enhancement suggestions, but it is great to see some work being done in
this area.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group a
Thank you for this quick and easy solution, this help!
I am still curious however, why it is in such a way, that so many other
forms are available, but `match` must be required. I could imagine that
`match` is a complex thing under the covers, but I am not sure whether that
is the reason or som
I played a bit with lazy Racket and when I used `match`:
~~~
#lang lazy
(match 'a
['a 'a]
['b 'b])
~~~
In Emacs in racket-mode the `match` was underlined and I was told that:
~~~
match: unbound identifier in module
~~~
Is there truly no match possible in lazy Racket? What is the reasoning
Huh, that looks reasonable.
So far I've not used modules much, except the implicit one by:
~~~
#lang racket
~~~
So the example is helpful.
The tests are not in another file, but at least they are not inside a
wrapping procedure and are in a way separate.
Maybe I should have a look at the different
Sometimes I find myself thinking: "I should really write some tests for all
of this!"
But then I ask myself: "Uhm, how can I test some of the inner procedures of
this procedure?"
I sometimes use inner procedures when no other part of the code needs
access to some procedure and it fits purpose-w
I mostly like the text navigation features I have in Emacs. I also like
that I can run a shell inside Emacs and manage multiple buffers easily.
Installing different color themes is easy too, while in DrRacket I would
probably have to configure the colors myself (I might be wrong though, not
sur
Will "The Seasoned Schemer" be understandable for people who did not read the
"The Little Schemer"? And is what is in there directly applicable in Racket (I
guess it is, because of Racket's background, but I better ask beforehand!)
So far I've read some part of SICP (Chapter 1 & 2), part of Real
I looked at the code for a while again and think I now begin to understand it a
bit more:
I did not know `(let/ec` so I had to read about it. It says, that it is
equivalent to `(call/ec proc` or something, which is equivalent to
`(call-with-escape-continuation ...`. Uff … I don't know much abou
Just a few quick questions regarding the places code:
1. Is `?` like `if`? For me it says that it is an undefined identifier.
2. If I understand correctly, the place is looping and in each iteration is
looks if there is a message on the channel, which matches something. Is this
creating a lot of
Thanks for the example code, I'll try it soon!
The whole code is on my repository at:
https://github.com/ZelphirKaltstahl/racket-ml/blob/master/decision-tree.rkt
I tried with feature-visualizer, but did not save screenshots of the result.
Would it help showing them? I was not able to figure o
I tested using futures. While it is significantly faster than creating places,
it is still also significantly slower than the single threaded solution without
places and without futures:
~~~
(define (gini-index-futures subsets label-column-index)
(let ([futures (flatten (for/list ([subset (in-
On Saturday, August 12, 2017 at 12:21:19 PM UTC+2, Zelphir Kaltstahl wrote:
> I want to parallelize a procedure which looks like this:
>
> ~~~
> (define (gini-index subsets label-column-index)
> (for/sum ([subset (in-list subsets)])
> (for/sum ([label (in-list (list 0 1
I want to parallelize a procedure which looks like this:
~~~
(define (gini-index subsets label-column-index)
(for/sum ([subset (in-list subsets)])
(for/sum ([label (in-list (list 0 1))])
(calc-proportion subset
label
label-column-index
Yes that seems to be it, thanks!
--
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://group
I want to parallelize some program using places, so actually using multiple
cores.
To parallelize as much as possible on any given machine, I'd like to know how
many cores + effect of hyperthreading there are.
For example I have a CPU with 2 cores, but it supports hyperthreading, so that
I can
I've now implemented post pruning with 2 test cases as well.
--
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
I think I've now implemented most of the optimizations mentioned in this topic.
I also adapted my code to use some of the neat things I found in Daniel's code.
The implementation now supports most of the optimization parameters for
decision trees, which I found on:
http://scikit-learn.org/stabl
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 bette
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
per
> Gustavo:
>
>
>
> (string-split s #rx"\r?\n")
>
>
>
> Is that it?
>
> Dan
>
>
>
>
> On Fri, Jul 28, 2017 at 6:01 AM, Zelphir Kaltstahl
> wrote:
>
>
> On Wednesday, July 26, 2017 at 3:17:46 PM UTC+2, gustavo wrot
I had another idea for the implementation, which I tried to implement. I tried
to store in each node a procedure, which can be used when predicting data point
labels, so that I can simply get that from the struct and call it with the data
point and get back, whether I should go left or right at
On Wednesday, July 26, 2017 at 3:17:46 PM UTC+2, gustavo wrote:
> I read the solution of Daniel Prager and I have a few minor changes.
>
> * First I added a test that repeats `build-tree` 20 times, so the run
> time is approximately 1-2 seconds. This is not necessary, but times
> smaller than 1 se
I've come to the conclusion, that not assuming binary classification makes no
sense, since every n-class classification problem can be split into n binary
classification problems.
When assuming classes 0 and 1, the performance increases and I get to:
cpu time: 608 real time: 605 gc time: 68
Fo
tions other than assuming binary classification.
>
>
>
> Dan
>
>
> On Tue, Jul 25, 2017 at 6:46 AM, Zelphir Kaltstahl
> wrote:
>
>
>
>
> With my implementation of a list of vectors I only get down to:
>
>
>
> cpu time: 996 real time: 994 gc time:
On Monday, July 24, 2017 at 10:04:36 PM UTC+2, Daniel Prager wrote:
> Jon wrote:
> > Aside: if I read Daniel's solution correct, he avoids the first issue by
> >assuming that it's a binary classification task (that is, that there are
> >only two classes).
>
>
> Yep: I'm assuming binary classifi
On Monday, July 24, 2017 at 6:44:23 PM UTC+2, Matthias Felleisen wrote:
> > On Jul 24, 2017, at 12:37 PM, Zelphir Kaltstahl
> > wrote:
> >
> > In general I think available libraries are important for creating
> > attraction to a programming language. For e
Already fixed that `class-labels` issue, thanks, it was a quick fix today
morning. I already tested it with that change and it was way faster.
I thought about going for binary classification only while programming, but I
think I managed to keep it generic for multiple classes at least in most of
> - Are you running this code inside DrRacket? If so, have you timed the
> difference between running it with debugging enabled and with no
> debugging or profiling? (Language -> Choose Language... -> Details)
I am running from terminal with:
```racket -l errortrace -t FILE``` and
```raco test TE
Wow, thanks for all the feedback, I'll try to get most of the mentioned stuff
done and then post an update : )
> I teach trees and decision trees to freshman students who have never
> programmed before, and Racket’s forms of data and functions are extremely
> suitable to this domain.
I think t
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
I tried some simple examples of Typed Racket recently and then I thought I
could try some things with contracts too.
However, I do not seem to be able to contract-out any Typed Racket struct. For
example:
~~~
#lang typed/racket
(struct WordMetadata
([id : String]
[learned : Boolean]
[
On Friday, June 30, 2017 at 5:10:44 PM UTC+2, Matthew Butterick wrote:
> Is there a way to configure DrRacket so that it always prints the same
> full-length tracebacks that are visible on the command line? Here's an
> example of the same module run in both places.
On command line I usually don
On Friday, June 30, 2017 at 6:59:27 AM UTC+2, johnbclements wrote:
> > On Jun 29, 2017, at 17:33, Zelphir Kaltstahl
> > wrote:
> >
> > A while ago I started looking at Typed Racket and today I took a look again.
> >
> > The documentation says:
> >
&g
A while ago I started looking at Typed Racket and today I took a look again.
The documentation says:
> Typed Racket provides modified versions of core Racket forms, which permit
> type annotations. Previous versions of Typed Racket provided these with a :
> suffix, but these are now only includ
Thanks again, I think I got how to use it now.
Here is my example:
(define-container main-container (hsk-dispatch a-url))
(dispatch-rules! main-container
[("") #:method "get" overview-app])
(dispatch-rules! main-container
[("index") #:method "get" overview-app])
ts you define a container of routes that is used by your
> top-level and then various parts of your application inject their
> URL<->fun mappings into it.
>
> Jay
>
> On Tue, May 30, 2017 at 6:47 PM, Zelphir Kaltstahl
> wrote:
> > I have the following server specificati
I have the following server specification:
(define (start request)
;; for now only calling the dispatch
;; we could put some action here, which shall happen before each dispatching
(hsk-dispatch request))
(define-values (hsk-dispatch a-url)
(dispatch-rules [("") #:method "get" overview-ap
xml/pretty x) ;; turn XML into string with newlines and indentation
> and all — but see how the IDE renders it in the REPL
>
> (displayln (xexpr->xml/pretty x)) ;; print the same string — now the IDE is
> forced to render the printed output
>
> — Matthias
>
>
>
I have some HTML code, which I generate using x-expressions:
(string-append DOCTYPE-HTML5
"\n"
(xexpr->string
`(html
(body ((bgcolor "red"))
"Hi!" (br) "Bye!"
I don't like how the result looks in the sourc
Yep, that workaround seems to work, thank you.
I did not know about issues when deleting and adding children in an already
shown widget/window. It's good to be aware, that such can make a difference.
I noticed now, that although the GUI is still very fast, still being very
small, it flickers a
I am creating a little hobby project with Racket GUI classes. For that I got
the following code, which creates a frame%:
#lang racket/gui
(require table-panel
"vocabulary.rkt")
(provide build-gui)
(define (clear-children an-area-container)
(for ([child (send an-area-container get-ch
I seem to have a similar problem with the dispatch of static files. I posted it
on Stackoverflow. Could you take a look at it?
https://stackoverflow.com/questions/43027717/racket-servlet-serve-static-files
--
You received this message because you are subscribed to the Google Groups
"Racket Use
75 matches
Mail list logo