[racket-users] New lightweight termios package: rktermios

2020-09-21 Thread Dominik Pantůček
Hello Racketeers, as I learned that it is not possible to use the ansi package under CS, because the C extensions do not work under CS, I decided to put together a minimalistic termios wrapper using only Racket code. It provides the bare minimum to set the terminal to "raw" mode and should work

Re: [racket-users] Package index

2020-09-21 Thread Dominik Pantůček
Hi, I confirm the issue. I am already a registered user but adding a new package fails with: Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /pkgn/package/rktermios. Reason: Error reading from remote server

Re: [racket-users] Scribbling hexadecimal values

2020-09-19 Thread Dominik Pantůček
on })) > > Eric > > > On Fri, Sep 18, 2020 at 2:23 PM Dominik Pantůček > mailto:dominik.pantu...@trustica.cz>> wrote: > > Hello Racketeers, > > I am struggling to make scribble typeset default values in > proc-doc/names in hexadeci

[racket-users] Scribbling hexadecimal values

2020-09-18 Thread Dominik Pantůček
Hello Racketeers, I am struggling to make scribble typeset default values in proc-doc/names in hexadecimal. An example would be: (proc-doc/names name (->* () (integer?) void?) (() ((argument #x1f))) @{ some description }) ; yes, at-exp reader The same applies to values in nested

Re: [racket-users] new racket-lang.org website

2020-08-25 Thread Dominik Pantůček
improve this, that'd be > welcome. > > It may be that the right approach is to adjust the font sizes, as > 1080x1920 sounds really wide. Is it possible that's a retina-style > display and the logical number is actually 540 wide? Maybe that's a > better cutoff for

Re: [racket-users] new racket-lang.org website

2020-08-25 Thread Dominik Pantůček
site > thinks it is a normal machine (albeit uncomfortably narrow). If > things are slightly narrower you'll see the site changes. I am > attaching two screenshots from my phone.  > > Robby  > > > > > > On Tue, Aug 25, 2020 at 2:59 PM

Re: [racket-users] trying to use futures for some calculations

2020-06-17 Thread Dominik Pantůček
Hi Alex, I finally got to investigate the issue in depth. And there are two major problems blocking your implementation from running the futures in parallel. 1) Allocations of boxed flonums. I tried to get rid of those by allocating "scratchpad" flvectors and mapping everything onto them. The

Re: [racket-users] Re: trying to use futures for some calculations

2020-06-17 Thread Dominik Pantůček
I've looked at it only briefly (it's the end of the semester and grading is due soon). > > > I would *love* to be proven wrong on this, but I think it's rare to > be able to get decent parallelization in practice using futures. You > may have better results using places, but it will

[racket-users] Possible bug in vector-cas!

2020-05-30 Thread Dominik Pantůček
Hello Racketeers, it didn't take long before I hit another strange behavior when extensively using futures. The setup is relatively simple: I am processing a large fxvector/flvector and I am processing it on a line-by-line basis (the vectors themselves are width*height in nature). To avoid races

Re: [racket-users] Hunting a possible fsemaphore-post/wait bug

2020-05-24 Thread Dominik Pantůček
On 24. 05. 20 3:38, Matthew Flatt wrote: > At Sat, 23 May 2020 18:51:23 +0200, Dominik Pantůček wrote: >> But that is just where the issue is showing up. The real question is how >> the counter gets decremented twice (given that fsemaphores should be >> future

Re: [racket-users] Hunting a possible fsemaphore-post/wait bug

2020-05-23 Thread Dominik Pantůček
On 23. 05. 20 19:24, Matthew Flatt wrote: > I'm not sure this is the problem that you're seeing, but I see a > problem with the example. It boils down to the fact that futures do not > provide concurrency. > > That may sound like a surprising claim, because the whole point of > futures is to

[racket-users] Hunting a possible fsemaphore-post/wait bug

2020-05-23 Thread Dominik Pantůček
Hello again with futures! I started working on futures-based workers and got quickly stuck with a dead-lock I think does not originate in my code (although it is two semaphores, 8 futures, so I'll refrain from strong opinions here). I implemented a very simple futures-friendly queue using

Re: [racket-users] Cross-building Racket applications for 64bit Windows on Linux

2020-05-23 Thread Dominik Pantůček
cutables? >> >> https://docs.racket-lang.org/raco/cross-system.html >> >> >> Note that the "tarball" distributions at places like >> >>https://download.racket-lang.org/releases/7.7/ >> >> can be handy for setting up a . >>

[racket-users] Cross-building Racket applications for 64bit Windows on Linux

2020-05-23 Thread Dominik Pantůček
Hello Racketeers, although I am developing Racket applications on Linux, our customers are usually running Windows. The good thing about Racket (and racket/gui especially) is that it requires virtually no OS-specific code for many - even non-trivial - tasks. However it is not that straightforward

[racket-users] JIT and futures on aarch64

2020-05-16 Thread Dominik Pantůček
Hello fellow racketeers, after pushing futures on x86 and x86_64 to their limits (and helping fixing two bugs), I turned my focus on ARM. Apparently everything should work with 32bit arm without any hurdles (I am going to test that later today), however on aarch64 (64bit arm), there is no JIT and

Re: [racket-users] Another futures-related bug hunt

2020-05-09 Thread Dominik Pantůček
Hello, I'll add a lock at lines 1092-1096 of "newgc.c", and we'll see if that helps. should I open the issue or will you do it? (Speaking of race conditions...). I'll re-run the tests with the lock once it is in the repo - sometimes it takes hours for this bug to exhibit and with 8 HTs the

Re: [racket-users] Another futures-related bug hunt

2020-05-08 Thread Dominik Pantůček
Hello, The most useful information here is likely to be a stack trace from each OS-level thread at the point where the application is stuck. would this be enough to open an issue for that? (gdb) info threads Id Target IdFrame * 1Thread

Re: [racket-users] Another futures-related bug hunt

2020-05-08 Thread Dominik Pantůček
Hello, On 08. 05. 20 14:27, Matthew Flatt wrote: At Fri, 8 May 2020 09:34:32 +0200, Dominik Pantůček wrote: Apart from obvious strace (after freeze) and gdb (before/after freeze) debugging to find possible sources of this bug, is there even a remote possibility of getting any clue how can

[racket-users] Another futures-related bug hunt

2020-05-08 Thread Dominik Pantůček
Hello fellow Racketeers, my spare-time out-of-curiosity venture into using HPR (High-Performance Racket) for creating a software 3D rendering pipeline seems to be pushing the futures into rough edges. The scenario is sort of "usual": * 7 futures + 1 in RTT that form a binary tree * GUI

Re: [racket-users] Futures + threads SIGSEGV

2020-05-02 Thread Dominik Pantůček
anks again! Dominik > > [1] https://rr-project.org > > On Sat, May 2, 2020 at 7:56 AM Dominik Pantůček > wrote: >> >> Hello fellow Racketeers, >> >> during my research into how Racket can be used as generic software >> rendering platform, I've hit s

Re: [racket-users] Futures + threads SIGSEGV

2020-05-02 Thread Dominik Pantůček
lative computation in parallel. Usually if your code is too deep and keeps allocating "something" each frame, it goes back to the runtime thread for each allocation. Cheers, Dominik [1] https://docs.racket-lang.org/future-visualizer/index.html > > Dex > >> On May 2, 202

[racket-users] Futures + threads SIGSEGV

2020-05-02 Thread Dominik Pantůček
Hello fellow Racketeers, during my research into how Racket can be used as generic software rendering platform, I've hit some limits of Racket's (native) thread handling. Once I started getting SIGSEGVs, I strongly suspected I am doing too much unsafe operations - and to be honest, that was true.

Re: [racket-users] Rhombus project plan

2020-04-29 Thread Dominik Pantůček
Hi, I can't leave this without reaction... > >   To the point: what would make Racket2 the ultimate tool (for me): > > * Performance. Faster startup times, shorter execution times in > general. Optionally, a ‘lite’ version of Racket that compiles > directly to no-deps binaries,

Re: [racket-users] Question about generating urls with dispatch-rules from imported modules

2020-04-26 Thread Dominik Pantůček
Hello, just a quick and dirty hack I use to get the best of default dispatch-... for my use-case when dispatching API requests: (define-for-syntax (dispatch-api-case-helper stx) (syntax-parse stx (((method:id (path+args:expr ...) proc:id) rest ...) #`((("api" path+args ...) #:method

Re: [racket-users] Retro 3D maze with Pict?

2020-04-19 Thread Dominik Pantůček
Hi, On 19. 04. 20 11:42, Aidan Gauland wrote: > Would it be feasible to use Pict to create a very simplistic rendering > of a first-person perspective of a 2D maze, in the style of Scarab of Ra > for the old > B Macs? > I've created

Re: [racket-users] Unfinished S-Expressions in scribbled code blocks

2020-04-12 Thread Dominik Pantůček
12, 2020, 4:23 AM, Dominik Pantůček < > dominik.pantu...@trustica.cz> wrote: > > > Hello fellow Racketeers, > > I've started a small side project and as a part of that I want to write > some articles interspersed with code. Scribble was a natural choi

[racket-users] Unfinished S-Expressions in scribbled code blocks

2020-04-12 Thread Dominik Pantůček
Hello fellow Racketeers, I've started a small side project and as a part of that I want to write some articles interspersed with code. Scribble was a natural choice for that task. So I started with #lang scribble/manual as usual and after writing some text, I tried to do something like the

Re: [racket-users] Proxying websockets via web-server

2020-01-12 Thread Dominik Pantůček
d then use > normal inter-Racket communication like channels and stuff to work with > the rest of your Web application? > > Jay > > -- > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > On Thu, Ja

[racket-users] Proxying websockets via web-server

2020-01-09 Thread Dominik Pantůček
Hello everyone, I am working on an application that uses React.js[1] for front-end and Racket as HTTP back-end server. For production builds, the Javascript part is compiled using "npm build" which generates a directory full of HTML and Javascript files which are then included in the Racket

Re: [racket-users] Re: Inadvertedly requiring racket/unsafe/ops

2019-12-23 Thread Dominik Pantůček
k that this might be good to fix as well. Cheers, Dominik [1] https://github.com/racket/racket/pull/2975 On 15. 12. 19 11:13, Dominik Pantůček wrote: > Hi, > > On 15. 12. 19 2:57, Jack Firth wrote: >> I think that documentation fix is a good idea. > > I'll submit a PR to appropr

Re: [racket-users] ffi-lib and scribble/srcdoc

2019-12-23 Thread Dominik Pantůček
Hi, On 23. 12. 19 15:29, Sam Tobin-Hochstadt wrote: > What you're seeing is that `scribble/srcdoc` looks for the _binding_ > of `->` from `racket/contract` which is being shadowed by the version > of `->` from `ffi/unsafe`. I would do something like this: > > #lang racket > (require (rename-in

[racket-users] ffi-lib and scribble/srcdoc

2019-12-23 Thread Dominik Pantůček
Hello, apart from parallel sorting and working with unsafe ops, I stumbled upon a very strange behavior using ffi-lib: -->8-- #lang racket (require scribble/srcdoc) (provide (proc-doc/names a-struct? (-> any/c boolean?) (a) ("Returns true if a is a-struct"))) (struct

Re: [racket-users] Re: Inadvertedly requiring racket/unsafe/ops

2019-12-15 Thread Dominik Pantůček
me. Also it is nice - if you are in need of heavy optimizations - to see the list of unsafe ops in one place. Cheers, Dominik > > On Saturday, December 14, 2019 at 1:03:14 PM UTC-8, Dominik Pantůček > wrote: > > Hello, > > the documentation at > https://docs.racket-lan

[racket-users] Inadvertedly requiring racket/unsafe/ops

2019-12-14 Thread Dominik Pantůček
Hello, the documentation at https://docs.racket-lang.org/reference/fixnums.html is misleading at best. If you - as I did - use the suggested approach of requiring optimized (and unsafe) fx... operations from racket/unsafe/ops with: (require (filtered-in (λ (name) (regexp-replace

[racket-users] futures-sort update

2019-12-07 Thread Dominik Pantůček
Hello Racketeers, I am continuing my work on cleaning up our private source code and publishing it as a part of my futures-sort[1] package. Current state of the package is: - configurable parallelism depth - in-place parallel merge-sort of both vector and fxvector - parallel merge-sort with

Re: [racket-users] Vector length and indices contracts

2019-12-04 Thread Dominik Pantůček
On 04. 12. 19 20:21, Matthew Flatt wrote: > I think it makes sense to refine the contract to guarantee a fixnum > result for `vector-length`. > > This fact is currently documented in `unsafe-vetcor-length`, because > that's the layer where it has seemed sensible to talk about fixnums in > the

[racket-users] Vector lenght and indices contracts

2019-12-04 Thread Dominik Pantůček
Hello, looking at vector-length[1] documentation, it returns (exact-nonnegative-integer?). However, as far as I can tell, it returns (fixnum?). Also for subsequent contracts in the vector's documentation all indices are assumed to be (exact-nonnegative-integer?) but usually it is impossible on

Re: [racket-users] question re downloading a PDF file

2019-11-24 Thread Dominik Pantůček
Hi, On 24. 11. 19 13:01, Tim Hanson wrote: > hi, > > I need to fetch a number of PDF documents and wrote a bit of racket to make > it easier. The part that "downloads" is this: > > (let ([content >((compose port->string get-pure-port string->url) (url-for-doc > year

Re: [racket-users] Re: Parallel merge-sort leveraging futures

2019-10-10 Thread Dominik Pantůček
Hello, thanks everyone for helping me putting this into a reasonable shape. My short-term plans with futures-sort are currently to check how various construct could be improved (or'ing of touched futures is really just a quick hack for example). Also I'd like to investigate why it didn't work

Re: [racket-users] Re: Parallel merge-sort leveraging futures

2019-10-08 Thread Dominik Pantůček
Hi, On 08. 10. 19 6:58, Sam Tobin-Hochstadt wrote: > I've submitted a pull request fixing those errors and supporting > running in serial mode. thank you for that, it's already fixed. I am actually pulling this from our internal git repository and I imported older info.rkt into the Github one.

[racket-users] Parallel merge-sort leveraging futures

2019-10-07 Thread Dominik Pantůček
Hello, over the course of past few months I have been tasked with solving a (real-world) problem of sorting the sums of all possible combinations of numbers. Some boring accounting stuff revolving around invoices. As the total number of combinations is 2^N where N is the number of source numbers,

Re: [racket-users] scribble/srcdoc raised exception fix and class-doc syntax form

2019-09-27 Thread Dominik Pantůček
Hi, On 25. 09. 19 19:43, Dominik Pantůček wrote: > > On 25. 09. 19 19:32, Ben Greenman wrote: >>> Should I include a brief documentation in >>> scribble-doc/scribblings/scribble/srcdoc.scrbl within the same PR as well? >> >> Yes! > > Btw, looking at t

Re: [racket-users] scribble/srcdoc raised exception fix and class-doc syntax form

2019-09-25 Thread Dominik Pantůček
On 25. 09. 19 19:32, Ben Greenman wrote: >> Should I include a brief documentation in >> scribble-doc/scribblings/scribble/srcdoc.scrbl within the same PR as well? > > Yes! Btw, looking at the struct-doc and struct*-doc descriptions maybe I should actually provide class-doc and class*-doc

Re: [racket-users] scribble/srcdoc raised exception fix and class-doc syntax form

2019-09-25 Thread Dominik Pantůček
Hi, thank you for the quick response. On 25. 09. 19 17:11, Ben Greenman wrote: > These changes look great. Can you open a pull request for the > racket/scribble repo? > opened PR#212. > It looks like: > - `class?` would be a better contract than `any/c` Definitely makes sense, as the result

[racket-users] scribble/srcdoc raised exception fix and class-doc syntax form

2019-09-25 Thread Dominik Pantůček
Hello, as a heavy user of scribble/srcdoc I've always missed a defclass provide form equivalent. Therefore I wanted to implement my own. I decided to use thing-doc as a starting point and noticed that it raises misleading message if id is not an identifier. Minimal working example follows.