zenspider
2019-2-27 08:31:42

@lexi.lambda I also mean racket/date, which doesn’t even have an equivalent of string->date


hoshom
2019-2-27 09:34:01

Should I make an issue on github for the partition thing? Or is it something non-trivial to solve properly.. I checked the repo and the relevant part looks like this: [partition (-poly (a b) (cl->* (-> (asym-pred b Univ (-PS (-is-type 0 a) -tt)) (-lst b) (-values (list (-lst a) (-lst b)))) (-> (-> a Univ) (-lst a) (-values (list (-lst a) (-lst a))))))] And I’ve no idea what to make of that.


lexi.lambda
2019-2-27 13:48:35

@zenspider Indeed, but given that racket/date is essentially nonexistent, turning it into a good datetime API would essentially mean reimplementing gregor. So just use gregor! But maybe it should be more clearly advertised.


pnwamk
2019-2-27 13:49:24

@hoshom I’ve only briefly thought about it, but I’m pretty sure it would be a non-trivial fix


pnwamk
2019-2-27 13:50:53

Currently Typed Racket can see that the string? predicate does indeed recognize strings, but it fails to completely capture the notion of “not a string” in a type, which would likely be necessary to support partition completely. A possible workaround would be to use filter twice (once with string? and once with number?).


hoshom
2019-2-27 14:19:10

@pnwamk I’m using the my-partition function I wrote above, as a workaround, works out for me. Anyway, I suppose you’re right, but Typed Racket sure does seem like it can do the thing you’re talking about, like how it understands what to expect in the else branch of a cond expression when using union types.


pnwamk
2019-2-27 14:21:46

@hoshom random notes: on the for/fold function, there’s a #:result keyword you can use to reverse the lists as the final step if you want to maintain order (see the docs) or you could use for/lists. And yes, Typed Racket can reason about negative type information generally, but not within a single type currently. I’m not sure if that’s clear enough… I’m essentially saying you’re right it seems like it should but it just falls short (because it does not feature negation types I believe).


hoshom
2019-2-27 14:23:58

Yes, the #:result keyword is super handy, I sorely missed that one before it was introduced. Back then I only used to do things like adventofcode in Racket.


pnwamk
2019-2-27 14:24:31

(I added it because I was losing my mind doing it after so many for/folds, lol)


hoshom
2019-2-27 14:24:57

haha, thanks! :smile:


hoshom
2019-2-27 14:26:07

Anyway, maybe some day I’ll understand types, racket and typed racket well enough to contribute. Until then, I’ll keep bugging people here :blush:


hoshom
2019-2-27 14:26:41

Rather a kind lot, you people are.


a.nastaev
2019-2-27 14:50:23

jerome.martin.dev
2019-2-27 18:09:06

Hey, I’m trying to write scribble documentation for a language, but the language can be used both as a #lang and by (require). I tried using @defmodule and @defmodulelang, but I get an error saying tags are duplicated… I’d like to have a section of the doc about the #lang usage, and one about the (require) usage.


jerome.martin.dev
2019-2-27 18:10:46

Any idea how to do that?


jerome.martin.dev
2019-2-27 18:11:22

(I have a hard time understanding the documentation for defmodule & co)


samth
2019-2-27 18:26:43

@jerome.martin.dev most languages like that do use the #lang version (see slideshow, racket/gui, etc)


jerome.martin.dev
2019-2-27 18:28:22

@samth Then, is there a way to render the module block without redefining a module in scribble?


samth
2019-2-27 18:28:38

not sure what you mean


jerome.martin.dev
2019-2-27 18:29:10

well, when you define a module with @defmodule, it renders a block showing (require module-name) package: package-name


jerome.martin.dev
2019-2-27 18:29:49

I’d like to be able to show that again and again when I’m in a section of the documentation requiring that module


samth
2019-2-27 18:30:25

you might need the no-declare versions



jerome.martin.dev
2019-2-27 18:34:05

mmmh, I still get the issue if I use no-declare multiple times


jerome.martin.dev
2019-2-27 18:36:41

I get “WARNING: collected information for key multiple times”


jerome.martin.dev
2019-2-27 18:38:17

in slideshow, the modules are slightly different : @defmodulelang*/no-declare[(slideshow/widescreen)] @defmodule*/no-declare[(slideshow/widescreen/base)]


jerome.martin.dev
2019-2-27 18:38:36

in my case, they have exactly the same name


jerome.martin.dev
2019-2-27 18:53:27

I almost got it to work by using @defmodule[@racketmodname[rilouworld/quest] #:no-declare #:packages ("rilouworld")] but I still get something weird. It renders as: (require (racketmodname rilouworld/quest)) package: rilouworld The inner expression is not interpreted :disappointed:


samth
2019-2-27 19:00:31

can you just put rilouworld/quest there?


jerome.martin.dev
2019-2-27 19:05:29

WARNING: collected information for key multiple times


jerome.martin.dev
2019-2-27 19:05:35

:confused:


jerome.martin.dev
2019-2-27 19:06:25

the no-declare argument looks like it’s not taken into account when specifying an actual module


jerome.martin.dev
2019-2-27 19:07:13

jerome.martin.dev
2019-2-27 19:07:54

The syntax usage looks really weird to me, because depending on the type of what you pass to the first argument, it behaves differently


jerome.martin.dev
2019-2-27 19:22:00

Ok, I’m starting to think it’s not possible :disappointed:


jerome.martin.dev
2019-2-27 19:32:18

Ok, I checked the output using the macro-stepper. It seems the macro is working fine, but the bug happens later on when trying to generate links


jerome.martin.dev
2019-2-27 19:42:24

YES, I GOT IT!


jerome.martin.dev
2019-2-27 19:43:05

I had to add #:link-target? #f to prevent generating another link


jerome.martin.dev
2019-2-27 19:43:28

:tada:


abmclin
2019-2-27 20:21:43

when doing raco pkg install on a BSD system I’m getting SSL not available, check 'ssl-load-fail-reason is there a way to access and print that variable in REPL without needing to run the internal mzssl.rkt module directly? I was hoping the variable would be printed to the debug logger but am not finding anything in the logger’s output.


soegaard2
2019-2-27 20:32:32

@abmclin Which version of Racket are you using?


abmclin
2019-2-27 20:32:42

Racket 7.2


soegaard2
2019-2-27 20:33:09

Okay. Ought to be fine.


abmclin
2019-2-27 20:33:27

I’m thinking possible something is misconfigured on this FreeBSD system related to SSL but don’t have much to go on to figure out possible causes


soegaard2
2019-2-27 20:34:14

The only similar error I find on Google, is: https://github.com/mbutterick/pollen/issues/52


soegaard2
2019-2-27 20:34:37

Here the issue was “I have checked the difference between my previous working installation and the new one. I chose the wrong platform in the racket download page. I am in x86_64 and installed the i386 version. Re-installing the right one solves the issue.”


abmclin
2019-2-27 20:35:07

hmm, this Racket was installed from the ports


abmclin
2019-2-27 20:35:27

if it’s some version mismatch issue, might need to contact the port maintainer


soegaard2
2019-2-27 20:35:46

I would try the official installer from: https://download.racket-lang.org/


soegaard2
2019-2-27 20:36:03

Then if that works, contact the port maintainer.


soegaard2
2019-2-27 20:37:58

But - full disclosure - I have never tried Racket on FreeBSD. Using the official installer have solved other problems in the past though.


abmclin
2019-2-27 20:47:01

just FYI there is no installer available for Unix variants, compile from source is the only possible option. I haven’t had this particular issue before though. The pollen issue page told me how to find ssl-load-fail-reason and I see the problem is it’s not able to find libcrypto.so and libcrypto.so.5 is the installed version on this system. Hmm wondering if adding a symlink for libcrypto.so will resolve it


samth
2019-2-27 20:47:26

@abmclin it’s possible that this is a new error because we just made https unconditional (as in earlier today)


soegaard2
2019-2-27 20:47:33

The compile from source with prebuilt packages is the one I am thinking of.


abmclin
2019-2-27 20:47:45

oh that could explain why this error is only now just popping up



samth
2019-2-27 20:47:57

if you can comment there that would be helpful


soegaard2
2019-2-27 20:48:01

(That’s why I asked about the version number)


hoshom
2019-2-28 04:37:15

Does anyone know how shared interacts with typed/racket? I need to make this kind of an expression work: #lang typed/racket (struct Foo ([a : Number] [b : Foo]) #:mutable #:transparent) (shared ([#{a : Foo} (Foo 1 b)] [#{b : Foo} (Foo 2 a)]) a)