Re: [racket-users] Re: Structured Concurrency in Racket

2019-10-09 Thread Zelphir Kaltstahl
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

Re: [racket-users] Re: Structured Concurrency in Racket

2019-10-09 Thread Zelphir Kaltstahl
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

Re: [racket-users] Re: Structured Concurrency in Racket

2019-10-09 Thread Zelphir Kaltstahl
> 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

[racket-users] Re: Structured Concurrency in Racket

2019-10-08 Thread Zelphir Kaltstahl
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

Re: [racket-users] Name of undefined identifier as string in macro

2019-08-04 Thread Zelphir Kaltstahl
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,

[racket-users] Name of undefined identifier as string in macro

2019-08-03 Thread Zelphir Kaltstahl
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

[racket-users] Re: On Fire and Brimstone, Gnashing of Teeth, and the Death of All that is Holy

2019-07-24 Thread Zelphir Kaltstahl
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

[racket-users] Re: Racket2 possibilities

2019-07-22 Thread Zelphir Kaltstahl
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

[racket-users] Re: Help with generators from python land!

2019-02-23 Thread Zelphir Kaltstahl
> 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

Re: [racket-users] Help with generators from python land!

2019-02-21 Thread Zelphir Kaltstahl
> (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

[racket-users] Re: How do you make students submit programming assignments online for automatic tests?

2019-02-21 Thread Zelphir Kaltstahl
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

Re: [racket-users] Help with generators from python land!

2019-02-21 Thread Zelphir Kaltstahl
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,

[racket-users] Re: Python's append vs Racket's append and helping novices understand the implications

2019-02-03 Thread Zelphir Kaltstahl
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

[racket-users] Re: Serving my web application and some static files

2019-02-01 Thread Zelphir Kaltstahl
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

[racket-users] Re: Beginning of the end for googlegroups?

2019-01-26 Thread Zelphir Kaltstahl
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

Re: [racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-22 Thread Zelphir Kaltstahl
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

Re: [racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-22 Thread Zelphir Kaltstahl
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

Re: [racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-22 Thread Zelphir Kaltstahl
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

[racket-users] Re: Are contracts incompatible with Typed Racket?

2018-12-16 Thread Zelphir Kaltstahl
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

[racket-users] Re: Goblins, and actor model library for Racket, gets its first release

2018-10-29 Thread Zelphir Kaltstahl
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

[racket-users] Re: Please HELP ME! Programmers at scheme, i am calling you ! :D

2018-05-12 Thread Zelphir Kaltstahl
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

[racket-users] Re: Jupyter Racket Kernel - iracket

2018-05-01 Thread Zelphir Kaltstahl
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

Re: [racket-users] Regexp question matching a whole string

2018-04-27 Thread Zelphir Kaltstahl
) 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 > >

Re: [racket-users] Regexp question matching a whole string

2018-04-27 Thread Zelphir Kaltstahl
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

Re: [racket-users] Regexp question matching a whole string

2018-04-22 Thread Zelphir Kaltstahl
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: >>

Re: [racket-users] Regexp question matching a whole string

2018-04-22 Thread Zelphir Kaltstahl
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

[racket-users] Regexp question matching a whole string

2018-04-22 Thread Zelphir Kaltstahl
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

Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-16 Thread Zelphir Kaltstahl
   send-print-pch)) >   (place-printf send-print-pch >     "~v\n" >     (parallel-set-map (serial-lambda (x) >     (* x x)) >       example-set >   send-print-pch))) > > &

Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Zelphir Kaltstahl
`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

[racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Zelphir Kaltstahl
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

[racket-users] Re: The Racket School 2018: Create your own language

2018-03-21 Thread Zelphir Kaltstahl
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

[racket-users] Re: Non-blocking place get

2018-02-22 Thread Zelphir Kaltstahl
(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

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

2018-01-01 Thread Zelphir Kaltstahl
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

[racket-users] Re: [ANN] Porting PAIP's Prolog interpreter from Common Lisp to Racket - Part 2

2017-12-26 Thread Zelphir Kaltstahl
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

Re: [racket-users] match in Lazy Racket?

2017-12-08 Thread Zelphir Kaltstahl
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

[racket-users] match in Lazy Racket?

2017-12-08 Thread Zelphir Kaltstahl
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

[racket-users] Re: Unit test inner procedures

2017-11-27 Thread Zelphir Kaltstahl
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

[racket-users] Unit test inner procedures

2017-11-27 Thread Zelphir Kaltstahl
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

[racket-users] Re: Alternatives to DrRacket

2017-11-27 Thread Zelphir Kaltstahl
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

[racket-users] Re: Need help with parallelizing a procedure

2017-08-22 Thread Zelphir Kaltstahl
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

[racket-users] Re: Need help with parallelizing a procedure

2017-08-19 Thread Zelphir Kaltstahl
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

[racket-users] Re: Need help with parallelizing a procedure

2017-08-16 Thread Zelphir Kaltstahl
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

[racket-users] Re: Need help with parallelizing a procedure

2017-08-14 Thread Zelphir Kaltstahl
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

[racket-users] Re: Need help with parallelizing a procedure

2017-08-13 Thread Zelphir Kaltstahl
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-

[racket-users] Re: Need help with parallelizing a procedure

2017-08-12 Thread Zelphir Kaltstahl
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

[racket-users] Need help with parallelizing a procedure

2017-08-12 Thread Zelphir Kaltstahl
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

Re: [racket-users] Get number of CPUs / Cores

2017-08-08 Thread Zelphir Kaltstahl
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

[racket-users] Get number of CPUs / Cores

2017-08-08 Thread Zelphir Kaltstahl
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

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

2017-08-07 Thread Zelphir Kaltstahl
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

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

2017-08-01 Thread Zelphir Kaltstahl
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

[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 bette

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
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

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

2017-07-27 Thread Zelphir Kaltstahl
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

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

2017-07-27 Thread Zelphir Kaltstahl
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

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

2017-07-25 Thread Zelphir Kaltstahl
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

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

2017-07-24 Thread Zelphir Kaltstahl
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:

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

2017-07-24 Thread Zelphir Kaltstahl
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

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

2017-07-24 Thread Zelphir Kaltstahl
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

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

2017-07-24 Thread Zelphir Kaltstahl
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

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

2017-07-24 Thread Zelphir Kaltstahl
> - 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

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

2017-07-24 Thread Zelphir Kaltstahl
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

[racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Zelphir Kaltstahl
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

[racket-users] Typed Racket and Contracts

2017-07-01 Thread Zelphir Kaltstahl
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] [

[racket-users] Re: how to get full tracebacks in DrRacket?

2017-07-01 Thread Zelphir Kaltstahl
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

Re: [racket-users] Typed Racket Type Annotations - Best Practices?

2017-06-30 Thread Zelphir Kaltstahl
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

[racket-users] Typed Racket Type Annotations - Best Practices?

2017-06-29 Thread Zelphir Kaltstahl
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

Re: [racket-users] Racket Webserver add routes outside of dispatch-rules

2017-06-02 Thread Zelphir Kaltstahl
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])

Re: [racket-users] Racket Webserver add routes outside of dispatch-rules

2017-06-02 Thread Zelphir Kaltstahl
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

[racket-users] Racket Webserver add routes outside of dispatch-rules

2017-05-30 Thread Zelphir Kaltstahl
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

Re: [racket-users] How to pretty print HTML?

2017-05-28 Thread Zelphir Kaltstahl
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 > > >

[racket-users] How to pretty print HTML?

2017-05-28 Thread Zelphir Kaltstahl
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

Re: [racket-users] Bug in table-panel% ?

2017-04-24 Thread Zelphir Kaltstahl
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

[racket-users] Bug in table-panel% ?

2017-04-23 Thread Zelphir Kaltstahl
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

Re: [racket-users] Errors in url dispatch of static files

2017-03-28 Thread Zelphir Kaltstahl
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