[racket-users] Racket Generic Graph Library: non-numerical edge weight/labels + Graphviz?

2020-02-23 Thread unlimitedscolobb
Hello, I'm using the wonderful graph library which can do tons of various graph-related tasks. However, I haven't found a way to attach non-numerical weights/labels to edges _and_ have them appear in the Graphviz rendering of the graph. Is it at all possible? I did see define-edge-property,

Re: [racket-users] Racket Generic Graph Library: non-numerical edge weight/labels + Graphviz?

2020-02-24 Thread unlimitedscolobb
hanging = to > equal? > > https://github.com/stchang/graph/blob/master/graph-lib/graph/graph-fns-graphviz.rkt#L59-L60 > > > Do you have an example I can work with? > > I opened an issue so feel free to reply there instead: > https://github.com/stchang/graph/iss

Re: [racket-users] Typed Racket: Casting to types containing type variables

2020-02-20 Thread unlimitedscolobb
Hi Ben, Thank you for your answer. On Thursday, February 20, 2020 at 3:29:15 AM UTC+1, Ben Greenman wrote: > > On 2/19/20, unlimitedscolobb > wrote: > > > > [] > > > > ;Type Checker: Type a could not be converted to a contract becaus

[racket-users] Typed Racket: Casting to types containing type variables

2020-02-19 Thread unlimitedscolobb
Hello, I'm trying to get something similar to the following code working: #lang typed/racket (: f (-> Integer Any)) (define (f x) (+ 1 x)) (: g (All (a) (-> Integer a))) (define (g x) (f x)) Of course, this gets me a type error: ;Type Checker: type mismatch ; expected: a ; given: Any ;

[racket-users] NixOS: (help map) does not find documentation

2020-04-14 Thread unlimitedscolobb
Hello, I noticed the following behaviour today: > (require racket/help) > (help map) Loading help index... ; help: no documentation found for: map provided by: "/nix/store/za0k7s00bg3v5sasyqalv12ii7pxjbjn-racket-7.6/collects/racket/base.rkt" ; Context: ;

Re: [racket-users] NixOS: (help map) does not find documentation

2020-04-16 Thread unlimitedscolobb
Hi Asumu and great thanks for your answer! On Thursday, April 16, 2020 at 12:42:46 AM UTC+2, asumu wrote: > > On 2020-04-14 15:53:09 -0700, unlimitedscolobb wrote: > >Turns out this file does not even exist on my machine, but > > > /nix/store/za0k7s00bg3v5sasyqalv1

Re: [racket-users] NixOS: (help map) does not find documentation

2020-04-17 Thread unlimitedscolobb
On Thursday, April 16, 2020 at 7:48:35 PM UTC+2, asumu wrote: > > On 2020-04-16 05:19:26 -0700, unlimitedscolobb wrote: > >I started a discussion on NixOS Discourse here: > > > https://discourse.nixos.org/t/racket-does-not-find-documentation-after-update/ >

[racket-users] Typed Racket: Generics and interfaces/subtyping

2020-04-25 Thread unlimitedscolobb
Hello, The Typed Racket Guide states "Most structure type properties do not work in Typed Racket, including support for generic interfaces." [0] Is that due to some incompatibility between the design of Typed Racket and structure type properties, or is it because somebody should just get

Re: [racket-users] Typed Racket: Generics and interfaces/subtyping

2020-04-25 Thread unlimitedscolobb
gn questions. Feel free to > ping me on Slack to discuss further. > > Sam > > On Sat, Apr 25, 2020 at 12:10 PM unlimitedscolobb > > wrote: > > > > Hello, > > > > The Typed Racket Guide states "Most structure type properties do not &

[racket-users] Re: Puzzler - A Language for Puzzle Games

2020-04-23 Thread unlimitedscolobb
Hi Alex, Sounds really interesting! I'm not into puzzle games myself, but I have some friends who could definitely be excited. I shared it on the Fediverse: https://bidule.menf.in/notice/9uKmWBX2f0i52XqwF6 - Sergiu On Thursday, April 23, 2020 at 12:51:41 AM UTC+2, Alex Owens wrote: > >

[racket-users] Re: Rhombus project plan

2020-04-28 Thread unlimitedscolobb
Hello everyone and thank you for this very interesting discussion! I'd like to share my opinion on parenthesized prefix syntax: I actually switched to Racket/Lisp because of it! This highly uniform structure best fits the shape of mind as of today. Now, I explicitly don't pretend to be

[racket-users] raco setup --fix-pkg-deps needs --avoid-main on NixOS

2020-05-16 Thread unlimitedscolobb
Hi Racket+NixOS-heads out there, I was trying to use `raco setup --fix-pkg-deps` to get the dependencies of my package automatically fixed, but it would fail with a lot of "cannot delete file" errors. That's because `raco setup --fix-pkg-deps` looks at all packages, including the system-wide

[racket-users] Gradual Typed Racket?

2020-03-21 Thread unlimitedscolobb
Hello, I come to Racket from Haskell and so far I am quite happy, as I feel freer to do some weird stuff from time to time, and I am absolutely in love with the Lisp-parens syntax. As a former Haskeller, one of the first things I tried was Typed Racket. It worked like a charm for small

Re: [racket-users] Gradual Typed Racket?

2020-03-23 Thread unlimitedscolobb
(contract-out)) in my code. - Sergiu On Monday, March 23, 2020 at 5:16:52 PM UTC+1, Ben Greenman wrote: > > On 3/21/20, unlimitedscolobb > wrote: > > Hello, > > > > I come to Racket from Haskell and so far I am quite happy, as I feel > freer > > to do some wei

Re: [racket-users] Gradual Typed Racket?

2020-03-24 Thread unlimitedscolobb
On Monday, March 23, 2020 at 9:59:22 PM UTC+1, Hendrik Boom wrote: > > On Mon, Mar 23, 2020 at 12:16:45PM -0400, Ben Greenman wrote: > > > > > Not sure about best practices, but I definitely prefer keeping typed > > and untyped code in separate modules. > > It can be veru useful to be able to

[racket-users] Re: “If you could have a wish granted, what would you like to see next in Racket?”

2020-07-24 Thread unlimitedscolobb
A more powerful Typed Racket: covering more of Racket (e.g. generics) and with type classes, as in Haskell. >From what I've seen though, work is underway in this direction, and I also plan to contribute once my Racket-fu is up to snuff. - Sergiu On Thursday, July 23, 2020 at 2:30:33 PM

[racket-users] Re: “If you could have a wish granted, what would you like to see next in Racket?”

2020-07-25 Thread unlimitedscolobb
> but I would be surprised if it was on par with Racket's macro and type system, but who knows? I worked through the Julia user manual last year and my impression is that their macro system is probably less powerful than Racket's, but that their types are more powerful than Racket's. When

[racket-users] Package typed/graph (was require/typed and opaque structures)

2020-12-25 Thread unlimitedscolobb
me. - Sergiu On Wednesday, December 23, 2020 at 11:59:16 PM UTC+1 unlimitedscolobb wrote: > Hello, > > Again, a question out of curiosity, because I think I found a solution, > but I'd like to have something more elegant. > > I'm trying to use the (untyped) Racket generic gra

[racket-users] compose in Typed Racket

2020-12-08 Thread unlimitedscolobb
Hello, I've found out that compose in Typed Racket has the type (: compose (All (a b c) (-> (-> b c) (-> a b) (-> a c which means that Typed Racket's compose can only combine two functions at a time. In untyped code, I tend to use compose to combine more functions (e.g., 7), so I wrote

Re: [racket-users] compose in Typed Racket

2020-12-09 Thread unlimitedscolobb
On Wednesday, December 9, 2020 at 11:50:26 PM UTC+1 Ben Greenman wrote: > > If the answer is no, is there any interest in including these three > > functions (as well as compose-5, 6, 7, 8) into Typed Racket? > > I think these would be excellent in a package. > > A package for compose-n and

[racket-users] Re: Cannot install packages in DrRacket

2020-12-03 Thread unlimitedscolobb
Hi Teo, I had this issue last week, and here's what I found: https://github.com/mbutterick/pollen/issues/239 TL;DR : raco pkg config --set catalogs https://download.racket-lang.org/releases/7.9/catalog/ "" I don't exactly what causes this issue, though. - Sergiu On Thursday, December 3,

Re: [racket-users] compose in Typed Racket

2020-12-10 Thread unlimitedscolobb
On Thursday, December 10, 2020 at 5:49:43 PM UTC+1 hen...@topoi.pooq.com wrote: > On Wed, Dec 09, 2020 at 10:16:16PM -0800, unlimitedscolobb wrote: > > > I'm not sure whether macros could be of use here. I'll give it a think. > > Idea: Have a look at parendown > https:/

Re: [racket-users] compose in Typed Racket

2020-12-10 Thread unlimitedscolobb
On Thursday, December 10, 2020 at 9:51:50 PM UTC+1 Ben Greenman wrote: > >> A package for compose-n and compose-3 to like 10 or 20? > > Yes > > I like the idea of _small packages that do one thing_ better than > _one-stop all-utility packages_ ... but do what you think makes sense. > Sounds

[racket-users] require/typed and opaque structures

2020-12-23 Thread unlimitedscolobb
Hello, Again, a question out of curiosity, because I think I found a solution, but I'd like to have something more elegant. I'm trying to use the (untyped) Racket generic graph library from my Typed Racket code: #lang typed/racket (require/typed graph [#:opaque Graph graph?]

Re: [racket-users] compose in Typed Racket

2020-12-16 Thread unlimitedscolobb
On Thursday, December 10, 2020 at 6:01:52 PM UTC+1 unlimitedscolobb wrote: > On Thursday, December 10, 2020 at 5:49:43 PM UTC+1 hen...@topoi.pooq.com > wrote: > > A macro might be able to generate either of the above from >> (comp f g h k) >> . >> > Indeed.

Re: [racket-users] compose in Typed Racket

2020-12-16 Thread unlimitedscolobb
t; > On Wed, Dec 16, 2020 at 1:37 PM unlimitedscolobb > wrote: > >> On Thursday, December 10, 2020 at 6:01:52 PM UTC+1 unlimitedscolobb wrote: >> >>> On Thursday, December 10, 2020 at 5:49:43 PM UTC+1 hen...@topoi.pooq.com >>> wrote: >>> >

Re: [racket-users] Scribble and main.rkt

2020-12-22 Thread unlimitedscolobb
Thanks a lot, that's perfectly clear and worked for me! I'll go with main.rkt though, because requiring the package is simpler this way. - Sergiu On Tuesday, December 22, 2020 at 3:46:03 PM UTC+1 Ben Greenman wrote: > > Is it correct that calling the main file of the package something else >

[racket-users] Scribble and main.rkt

2020-12-21 Thread unlimitedscolobb
Hello, This is mainly a question out of curiosity, because I think I figured out how to do what I want. I'm setting up a small (8 functions and 2 macros) package called typed-compose. I called the main file typed-compose.rkt (not main.rkt) and put the following in the preamble of

[racket-users] Generics vs. Classes?

2020-11-08 Thread unlimitedscolobb
Hi, A general knowledge question: what would be the typical use cases of Racket generics vs. the typical use cases of Racket classes? Am I correct in assuming that I can do everything with classes what I could do with generics, and that generics have made their way into the language before

[racket-users] Re: Generics vs. Classes?

2020-11-08 Thread unlimitedscolobb
ect on your API surface. If > you don't need to support arbitrary user implementations, you can avoid > generics and classes altogether and use structs whose fields contain > functions. > > On Sunday, November 8, 2020 at 6:12:37 AM UTC-8 unlimitedscolobb wrote: > >> Hi, &

Re: [racket-users] Historical note.

2020-11-09 Thread unlimitedscolobb
On Monday, November 9, 2020 at 1:51:05 AM UTC+1 Kieron Hardy wrote: > > > On Nov 8, 2020, at 2:58 PM, Hendrik Boom wrote: > > > >> On Sun, Nov 08, 2020 at 12:47:11PM -0800, unlimitedscolobb wrote: > >> The idea of having structs whose fields contain func

[racket-users] hash-filter: PR or not PR

2020-10-30 Thread unlimitedscolobb
Hi, I am currently using hash tables a lot, so inevitably I end up writing general functions. I wrote the following `hash-filter`: ``` (define (hash-filter ht #:predicate [predicate #f] #:predicate/key [predicate/key (if predicate

[racket-users] Re: hash-filter: PR or not PR

2020-10-31 Thread unlimitedscolobb
tering-values pred) #:into into-hash) ; > Filter values > (transduce (in-hash-entries ht) (filtering-keys pred) #:into into-hash) ; > Filter keys > (transduce (in-hash-entries ht) (filtering (lambda (e) (pred (entry-key e) > (entry-value e #:into into-hash) ; Filter key-value e

[racket-users] Re: Typed Racket: require macros from untyped modules

2021-01-03 Thread unlimitedscolobb
a in the enclosing module doesn't work (a is required without a type), but macro works fine. Getting back to thinking and trying. - Sergiu On Sunday, January 3, 2021 at 9:22:16 PM UTC+1 unlimitedscolobb wrote: > Hello, > > How can I require macros coming from untyped modules into type

[racket-users] Typed Racket: require macros from untyped modules

2021-01-03 Thread unlimitedscolobb
Hello, How can I require macros coming from untyped modules into typed modules? Intuitively I'd expect that to be possible in a way or another because such imports don't seem to violate any safety guarantees, but maybe I'm missing something. - Sergiu -- You received this message because you

[racket-users] Re: [ANNOUNCE] New package typed-compose

2021-01-10 Thread unlimitedscolobb
#'(ann (λ (f ...) (λ (x) body)) T))])) > > (define compose-3 (make-compose 3)) > (define compose-4 (make-compose 4)) > ;; and so on > > > > On Monday, January 4, 2021 at 12:52:11 PM UTC-8 unlimitedscolobb wrote: > >> Hello, >> >> I am glad to announce typed-compo

[racket-users] [ANNOUNCE] New package typed-compose

2021-01-04 Thread unlimitedscolobb
Hello, I am glad to announce typed-compose, a small package defining some utilities for composing functions in Typed Racket: https://pkgd.racket-lang.org/pkgn/package/typed-compose Typed Racket's compose only takes two arguments, because in general it is difficult to specify that the return

[racket-users] Re: Racket v8.1

2021-06-08 Thread unlimitedscolobb
Hi Greg, I can run Racket on my Android phone via https://github.com/t184256/nix-on-droid , but last time I tried I couldn't get raco to work because of some weird file paths in Android/Termux. I have never tried running DrRacket though. - Sergiu On Tuesday, June 8, 2021 at 12:40:12 AM

Re: [racket-users] Package install conflicts on the Racket package catalog

2021-05-05 Thread unlimitedscolobb
he 404s -- e.g. is there a command to generate the > conflicts locally? > > Thanks, > > > > On Sun, May 2, 2021 at 6:59 AM unlimitedscolobb > wrote: > >> Hi Jay, >> >> Thanks a lot for helping me read that file! >> >> I didn't know Sc

Re: [racket-users] Package install conflicts on the Racket package catalog

2021-05-06 Thread unlimitedscolobb
one of which is the development > branch. It's true that it hasn't been updated recently, but that's the > idea. > > Got it, thanks! - Sergiu > Sam > > > On Wed, May 5, 2021 at 4:08 PM unlimitedscolobb > wrote: > > > > Hi, > > > > I

[racket-users] Package install conflicts on the Racket package catalog

2021-05-01 Thread unlimitedscolobb
Hello, I checked my package https://pkgd.racket-lang.org/pkgn/package/typed-compose recently and noticed that it listed some "Conflicts" in the field "Most recent build results". On the other hand, the separate field "Conflicts" slightly above says "None". When I open the log shown in "Most

Re: [racket-users] Package install conflicts on the Racket package catalog

2021-05-02 Thread unlimitedscolobb
are in a kind of "global" > namespace. > > Jay > > -- > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > > -- > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostr

[racket-users] hash->list with try-order? (like hash-map)

2021-10-12 Thread unlimitedscolobb
Hi, I wrote myself this little function: (define (hash->ordered-list h) (hash-map h cons #t)) which uses the try-order? argument of hash-map. Is there a reason for hash->list not have an optional argument try-order? Or perhaps having such a standalone function would be better? I was

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-20 Thread unlimitedscolobb
Hi, Thank you George for your answer. On Wednesday, October 13, 2021 at 5:37:39 PM UTC+2 gneuner2 wrote: > > On 10/12/2021 7:01 PM, unlimitedscolobb wrote: > > I wrote myself this little function: > > > > (define (hash->ordered-list h) > > (hash-map

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-23 Thread unlimitedscolobb
On Thursday, October 21, 2021 at 11:26:16 AM UTC+2 gneuner2 wrote: > > On 10/20/2021 5:53 PM, unlimitedscolobb wrote: > > I have two main use cases for producing an ordered list from a hash table: > > 1. A canonical way to pretty print a hash table: In my projects, I carry

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-23 Thread unlimitedscolobb
On Friday, October 22, 2021 at 6:45:18 PM UTC+2 david@gmail.com wrote: > On Thu, Oct 21, 2021 at 5:26 AM George Neuner wrote: > >> >> On 10/20/2021 5:53 PM, unlimitedscolobb wrote: >> >> >> > You can get a lot of mileage out of the 'set' datatype, whic