Re: [racket-users] Re: Experience with REST APIs in Racket

2018-04-12 Thread 'Paulo Matos' via Racket Users
On 12/04/18 11:45, Jack Firth wrote: > I think this is an area where Racket's ecosystem could be significantly > improved. However, this would probably only be worth the investment for > those developing on both the client and server side of multiple > services. Do you have plans to develop your

[racket-users] Experience with REST APIs in Racket

2018-04-11 Thread 'Paulo Matos' via Racket Users
Hi, I am interested in developing a Racket wrapper for hetzner cloud rest api. This is a REST API defined in: https://docs.hetzner.cloud/ I however, have no experience with accessing REST APIs in racket much less developing one. 1. Are there any examples out there of wrapping rest apis in

Re: [racket-users] Profiling places

2018-03-28 Thread 'Paulo Matos' via Racket Users
On 28/03/18 10:23, 'Paulo Matos' via Racket Users wrote: > True, I can confirm that. I will open an issue on this. Done #2019. https://github.com/racket/racket/issues/2019 -- Paulo Matos -- You received this message because you are subscribed to the Google Groups "Racket User

Re: [racket-users] Profiling places

2018-03-28 Thread 'Paulo Matos' via Racket Users
On 27/03/18 17:18, Vincent St-Amour wrote: > On Tue, 27 Mar 2018 07:55:08 -0500, > 'Paulo Matos' via Racket Users wrote: >> >> I was trying to confirm my suspicion that profile needs to be manually >> setup in each place for profiling. > > Right. Each plac

Re: [racket-users] Profiling places

2018-03-27 Thread 'Paulo Matos' via Racket Users
On 27/03/18 14:55, 'Paulo Matos' via Racket Users wrote: > > 1. setup a profile command line argument that's passed to places-profile.rkt > 2. send a flag indicating if we need profiling in any-double? > 3. then use profile-thunk on the function if profiling is required,

[racket-users] Profiling places

2018-03-27 Thread 'Paulo Matos' via Racket Users
Hello, I was trying to confirm my suspicion that profile needs to be manually setup in each place for profiling. So I created (based on the example in the manual) ;; places-profile.rkt #lang racket (define (main) (define p (dynamic-place "any-double.rkt" 'place-entry)) (for ([i

Re: [racket-users] not a number is a number

2018-03-22 Thread 'Paulo Matos' via Racket Users
On 22/03/18 10:10, Tim Jervis wrote: > I was amused but not surprised, if that makes sense, and I agree that it > is clear elsewhere. > > I was thinking a few extra bytes for another example in the > documentation for number? might be worthwhile, and in the same tutorial > spirit of the comment

Re: [racket-users] Prefab and contracts

2018-03-21 Thread 'Paulo Matos' via Racket Users
On 21/03/18 08:46, 'Paulo Matos' via Racket Users wrote: > Thanks for pointing that out. I hadn't noticed that. It certainly sounds > like an issue to me. > Opened #2001: https://github.com/racket/racket/issues/2001 -- Paulo Matos -- You received this message because you are s

Re: [racket-users] Prefab and contracts

2018-03-21 Thread 'Paulo Matos' via Racket Users
> > I am a little surprised that the contracted vector can't be converted to > an immutable-vector like other mutable vectors for use as a place > message though. > Thanks for pointing that out. I hadn't noticed that. It certainly sounds like an issue to me. > > On Tue, Ma

[racket-users] Prefab and contracts

2018-03-20 Thread 'Paulo Matos' via Racket Users
Hello, In a similar comment to my previous thread, I am yet again surprised at this: a.rkt: #lang racket (provide (struct-out foo)) (struct foo (a b) #:prefab) b.rkt: #lang racket (require "a.rkt") (place-message-allowed? (foo 1 2)) This works! However, try to provide in a.rkt foo like

Re: [racket-users] Prefab and mutable

2018-03-20 Thread 'Paulo Matos' via Racket Users
On 20/03/18 12:50, Philip McGrath wrote: > The reference section on "Reading Structures" has more relevant details: > http://docs.racket-lang.org/reference/reader.html#%28part._parse-structure%29 > > -Philip > Thanks for your help on this. I will have a read. -- Paulo Matos -- You

Re: [racket-users] Prefab and mutable

2018-03-20 Thread 'Paulo Matos' via Racket Users
then send > the serialized representation across the place channel.> Yes, that seems to be the alternative, thanks. > -Philip > > On Tue, Mar 20, 2018 at 5:39 AM, 'Paulo Matos' via Racket Users > <racket-users@googlegroups.com <mailto:racket-users@googlegroups.com>>

[racket-users] Prefab and mutable

2018-03-20 Thread 'Paulo Matos' via Racket Users
Hi, I was quite surprised by a 'feature' of prefab mutable structures: #lang racket (struct f (a b) #:prefab #:mutable) (place-message-allowed? (f 1 2)) (place-message-allowed? #s(f 1 2)) I was expecting both to return true but to my amazement it was not the case. The one created with

Re: [racket-users] places opens too many files

2018-03-16 Thread 'Paulo Matos' via Racket Users
On 16/03/18 13:52, Matthew Flatt wrote: >> But even more surprised that given I only open one >> open (the null) port for stdout and stderr I still get the system error. > > There's no avoiding an OS-level file descriptor for each of stdin, > stdout, and stderr. Even if you supply an existing

[racket-users] places opens too many files

2018-03-16 Thread 'Paulo Matos' via Racket Users
Hi, I was playing around with places and decided to try to spawn 200 places. #lang racket (define (kaboom) (define null-port (open-output-nowhere)) (define ps (for/list ([i (in-range 200)]) (define-values (p _1 _2 _3) (place* #:in #f #:out null-port

[racket-users] Clarification on unknown identifier obtained with dynamic-require

2018-03-14 Thread 'Paulo Matos' via Racket Users
Hello, I was just playing with units and requires. The idea is to require a module to obtain a unit. This module lives in a path known by the user. So the user enters a path at run-time, the dynamic-require acquires the unit which is then linked with another unit and invoked. It goes like this:

Re: [racket-users] Incorrect error reporting

2018-03-14 Thread 'Paulo Matos' via Racket Users
On 14/03/18 13:01, Matthew Flatt wrote: >> >> Should this be reported as a bug? > > Yes, that's a bug. The `command-line` form should check the constraint > that a "-h" flag is disallowed, instead of generating a bad call to > `parse-command-line`. > Created issue #1989

[racket-users] Incorrect error reporting

2018-03-14 Thread 'Paulo Matos' via Racket Users
Hello, I was trying to understand the imap module so I created the following script called main.rkt inside a src/ folder. The file looks like this: #lang racket/base (require racket/function net/imap) (define (start-server user pass host port) (define-values (conn total new)

[racket-users] Style guide linter

2018-03-11 Thread 'Paulo Matos' via Racket Users
Hi, I found the style guide a really great idea and generally very useful (although it's a shame the lack of content on the section of classes). I have started a small script to check source code style based on the style guide. Simple things like spaces at the end of lines, lack of newline at

[racket-users] Enable logging for all descendants

2018-03-07 Thread 'Paulo Matos' via Racket Users
Hi, Is there a way to enable logging for a logger and all its descendants? #lang racket (define-logger lt) (define (create-sublogger name) (make-logger name lt-logger)) (parameterize ([current-logger (create-sublogger 'foo)]) (log-debug "hello")) (log-lt-debug "goodbye") I would have

Re: [racket-users] Re: Getting young children started with Racket

2018-03-05 Thread 'Paulo Matos' via Racket Users
On 04/03/18 13:31, Prabhakar Ragde wrote: > > I used Racket with both my children at age 9. Here is a short writeup > about it originally posted to this mailing list. > > https://web.archive.org/web/20080612194829/http://home.adelphi.edu/sbloch/class/hs/testimonials/prabhakar.shtml > > In

Re: [racket-users] Debugging racket applications

2018-03-05 Thread 'Paulo Matos' via Racket Users
On 05/03/18 17:42, Greg Hendershott wrote: >> OK, doing racket -l errortrace -t as suggested in >> http://docs.racket-lang.org/errortrace/quick-instructions.html helps. > > The equivalent in racket-mode is to set `racket-error-context` to `'high`: > > >

Re: [racket-users] Debugging racket applications

2018-03-05 Thread 'Paulo Matos' via Racket Users
On 05/03/18 16:20, Matthias Felleisen wrote: > > All debugging aids impose a performance penalty. Always. > > Well, maybe I didn't clarify my comment. However, setting -g on a gcc build does not impose performance penalties. Simply adds debug information (making compile-time slower and

Re: [racket-users] Debugging racket applications

2018-03-05 Thread 'Paulo Matos' via Racket Users
On 05/03/18 15:28, 'Paulo Matos' via Racket Users wrote: > > Is there anything I can try to improve backtrace generation? > OK, doing racket -l errortrace -t as suggested in http://docs.racket-lang.org/errortrace/quick-instructions.html helps. Does errortrace introduce a performanc

[racket-users] Debugging racket applications

2018-03-05 Thread 'Paulo Matos' via Racket Users
Hi, I have been using Greg's racket mode and racket on the command line to start my application. One of the most frustrating/infuriating things about full time racket programming at the moment is debugging. For example, here's a run of my program: $ racket

[racket-users] Getting young children started with Racket

2018-03-03 Thread 'Paulo Matos' via Racket Users
Hello, I have a 7yo daughter currently in 1st grade (Germany) and she was given a password for the school computer. Having never touched a computer before she is now being introduced to typing and the mouse. I wonder if anyone has any experience with the following: 1. Is it useful for a child

Re: [racket-users] Generating automatic testsuites using a macro

2018-02-23 Thread 'Paulo Matos' via Racket Users
On 23/02/18 15:13, 'Paulo Matos' via Racket Users wrote: > That's true, thanks for pointing it out. I only just noticed you could > generate test-suites and test-cases at runtime with make-testcase and > make-testsuite. Therefore I will actually be doing this without a macro. > H

Re: [racket-users] Generating automatic testsuites using a macro

2018-02-23 Thread 'Paulo Matos' via Racket Users
On 23/02/18 15:20, Philip McGrath wrote: > The "Introduction" from the syntax/parse docs > (http://docs.racket-lang.org/syntax/stxparse-intro.html), is very good > in the spirit of the Racket Guide and also explains why you want to use > syntax/parse. Between that and the "Examples" section, I

Re: [racket-users] Generating automatic testsuites using a macro

2018-02-23 Thread 'Paulo Matos' via Racket Users
efore I will actually be doing this without a macro. However, it's always very useful to attempt this macro katas. :) Thanks, > -Philip > > On Fri, Feb 23, 2018 at 7:11 AM, 'Paulo Matos' via Racket Users > <racket-users@googlegroups.com <mailto:racket-users@googlegroups.com>

Re: [racket-users] Generating automatic testsuites using a macro

2018-02-23 Thread 'Paulo Matos' via Racket Users
On 23/02/18 14:56, Matthew Butterick wrote: > >> On Feb 23, 2018, at 5:11 AM, 'Paulo Matos' via Racket Users >> <racket-users@googlegroups.com> wrote: >> >> This fails because the i in the body of the test case does not exist at >> run-time. I understan

[racket-users] Generating automatic testsuites using a macro

2018-02-23 Thread 'Paulo Matos' via Racket Users
Hi, I am trying to get a macro working to generate an automatic testsuite. I have shrank my example to: #lang racket (define-syntax (gen-testsuite stx) (syntax-case stx () [(_ n) #`(test-suite "Automated suite" #,@(for/list ([i (syntax->datum #'n)])

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

2018-02-22 Thread 'Paulo Matos' via Racket Users
On 22/02/18 01:02, Robby Findler wrote: > You can create a thread and wait simultaneously on the place channel > value and also on some channel that the various workers use to check > in and see if a value is available. Here's a very simple instantiation > of this idea. > Thanks. That looks

[racket-users] Non-blocking place get

2018-02-21 Thread 'Paulo Matos' via Racket Users
Hi, I am trying to use places to parallelize several long running algorithms that can run in parallel. All of these are optimizing a function F(X1, ..., Xn) using different algorithms and need to communicate between themselves. The initial thing I thought about was having a master creating all

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

2018-02-21 Thread 'Paulo Matos' via Racket Users
Thanks for the note, I am now following those PRs. On 21/02/18 14:01, Matthew Flatt wrote: > At Wed, 21 Feb 2018 08:22:30 +0100, "'Paulo Matos' via Racket Users" wrote: >> If I port chez to riscv, would this make automatically racket work >> under riscv[...]?

Re: [racket-users] in-src documentation: why not?

2018-02-20 Thread 'Paulo Matos' via Racket Users
On 20/02/18 23:34, Ben Greenman wrote: > file/gif is from the draw-lib package > > https://github.com/racket/draw/blob/master/draw-lib/file/gif.rkt > Thanks. But it doesn't seem to use srcdoc contrary to what's said in the docs. -- Paulo Matos -- You received this message because you are

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

2018-02-20 Thread 'Paulo Matos' via Racket Users
Hello, I would be interested in having racket working natively on RISC-V. I am involved in the RISC-V community and have one of the initial RISC-V boards with Linux support: https://www.sifive.com/products/hifive-unleashed/ I have a feeling that with development of racket 7 ongoing I should

Re: [racket-users] #lang rust

2018-02-20 Thread 'Paulo Matos' via Racket Users
On 20/02/18 07:21, Neil Van Dyke wrote: > If someone is looking for a challenging and interesting `#lang` project... > > Build a `#lang rust`.  https://www.rust-lang.org/ > +1 > You might first implement mapping the non-checking semantics to Racket > code (so that you can run valid Rust

[racket-users] in-src documentation: why not?

2018-02-20 Thread 'Paulo Matos' via Racket Users
Hi, I was just wondering about why most racket software seems to prefer out of source documentation - is it due to lack of tools (maybe a poor scribble/srcdoc) or some other reason? On the other hand, as I navigate the world of scribble, I read: https://docs.racket-lang.org/scribble/srcdoc.html

Re: [racket-users] Typed Racket and performance impact

2018-02-19 Thread 'Paulo Matos' via Racket Users
On 19/02/18 17:39, Ben Greenman wrote: > Hi Paulo, > > I hope you try using Typed Racket. If the performance turns out to be > a problem, we can try to help. > > > Here are some other experiences that people have shared on the list: > >

Re: [racket-users] Typed Racket and performance impact

2018-02-19 Thread 'Paulo Matos' via Racket Users
On 19/02/18 17:10, Matthias Felleisen wrote: > >> On Feb 19, 2018, at 9:45 AM, Paulo Matos wrote: >> >> Thanks, interesting to see that fully typed programs run faster though. > > When I say “fully typed” you need to understand that some basic Racket > code may never be

Re: [racket-users] Typed Racket and performance impact

2018-02-19 Thread 'Paulo Matos' via Racket Users
On 19/02/18 13:18, Matthias Felleisen wrote: > > This characterization is still good: > > — fully typed programs might run significantly faster than untyped programs > (30%) > — the performance of partially typed programs is all over the map (10% slower > to 1% slower) > — it remains

[racket-users] Typed Racket and performance impact

2018-02-19 Thread 'Paulo Matos' via Racket Users
Hi, There was a time, many moons ago, not too far from the initial implementations of typed racked when Sam was working on it that moving from Racket to Typed Racket had a huge impact on performance. Nowadays that might not be the case. I also noticed that using typed racket might in itself

Re: [racket-users] Replacing nodejs with Racket... possible?

2018-02-12 Thread 'Paulo Matos' via Racket Users
s://github.com/vishesh/racketscript/blob/master/README.md > <https://github.com/vishesh/racketscript/blob/master/README.md> > > Haven’t used it myself, but I probably will, the next time I need > something written in JS. > > John > > > > O

[racket-users] Replacing nodejs with Racket... possible?

2018-02-10 Thread 'Paulo Matos' via Racket Users
Hi, I am far from being a web dev so please bear with me. I need to do a simple web interface with two text areas side-by-side in order to test-drive a commercial product from a web interface. The user writes on the left side. The content is driven through a server side app (in racket but I don't

[racket-users] macro guard on variable type

2018-01-25 Thread 'Paulo Matos' via Racket Users
Hi, I am trying to wrap some logging procedures into macros. I have a logger for my application which I define as: (define-logger sap) Then I want to define a macro that possibly receives an extra argument which is the part of the application that's issuing the logging message. So, if logging

Re: [racket-users] Re: New wiki page ‘friends of Racket’

2017-11-13 Thread 'Paulo Matos' via Racket Users
On 30/10/17 00:18, Alex Harsanyi wrote: > > You could add ActivityLog2 (https://github.com/alex-hhh/ActivityLog2) to > that list (Disclaimer: I am the author). > > If you want to try out the application and need some data files to > import, you can find some in the "test/test-data" folder.

Re: [racket-users] Plumbum for racket

2017-10-25 Thread 'Paulo Matos' via Racket Users
On 24/10/17 20:40, Jon Zeppieri wrote: > Featured at the recent RacketCon: > http://docs.racket-lang.org/rash@rash/index.html > Thanks guys, I think rash is pretty much what I was looking for. -- Paulo Matos -- You received this message because you are subscribed to the Google Groups

[racket-users] Plumbum for racket

2017-10-24 Thread 'Paulo Matos' via Racket Users
Hi, In Python I see myself using plumbum (https://plumbum.readthedocs.io/en/latest/) on a regular basis to do shell related stuff instead of messing with subprocesses. Is there anything remotely like this for racket? Kind regards, -- Paulo Matos -- You received this message because you are

Re: [racket-users] European Racketeers and conferences

2017-10-20 Thread 'Paulo Matos' via Racket Users
Perfect! Just added myself. Shame not more people in Europe though. :) On 17/10/17 19:15, Ben Greenman wrote: > I just changed the map settings so anyone can edit it. > > If you'd like to add your city to the map: > > 1. Look for "racketeers.csv" in the menu > 2. Click the "vertical dots" to

Re: [racket-users] Re: European Racketeers and conferences

2017-10-20 Thread 'Paulo Matos' via Racket Users
On 25/08/17 01:51, Greg Hendershott wrote: > Crazy idea: RacketCon 2018 in Reykjavik Iceland. > > Relatively neutral travel distance from Europe and (at least Eastern > half of) US. > > (IIUC September would be more affordable than August, and less rainy > than October.) > Great idea, would

Re: [racket-users] European Racketeers and conferences

2017-08-23 Thread 'Paulo Matos' via Racket Users
On 22/08/17 16:20, Daniel Brunner wrote: > Hey Matthew, > > I live in Germany and use Racket for teaching students, teaching our > apprentices (dual education system in Germany) and use it "in > production" for some tasks. > In Germany as well - Nuernberg to be precise. I learned Racket back

<    1   2