
Just paste error messages here and if people know what’s going on they might help

raco setup: making: <pkgs>/deinprogramm-signature/deinprogramm/signature (DeinProgramm - Signatures)
raco setup: in <pkgs>/deinprogramm-signature/deinprogramm/signature
raco setup: in <pkgs>/htdp-lib/stepper/private
raco setup: in <pkgs>/gui-lib/framework
raco setup: in <pkgs>/gui-lib/mred
raco setup: in <pkgs>/gui-lib/framework/private
raco setup: in <pkgs>/scribble-lib/scribble
raco setup: in <pkgs>/scheme-lib/scheme/unit/lang
raco setup: in <pkgs>/scheme-lib/scheme/unit
raco setup: in <pkgs>/syntax-color-lib/syntax-color
raco setup: in <pkgs>/gui-lib/mrlib
raco setup: in <pkgs>/gui-lib/mrlib/hierlist
raco setup: in <pkgs>/scheme-lib/scheme/signature/lang
raco setup: in <pkgs>/tex-table
raco setup: in <pkgs>/gui-lib/mrlib/private
raco setup: in <pkgs>/scheme-lib/scheme
out of memory
make[1]: *** [Makefile:221: install-cgc] Error 255
make[1]: Leaving directory '/usr/people/edodd/buildstuff/racket-7.5/src'
make: *** [Makefile:119: install] Error 2

Otherwise, with a new account that has an email address, recovery works.
I think the nav item should say “Password Recovery” though, instead of the current: <li class="nav-item active"><a class="nav-link" href="/password-recory">Password-Recory</a></li>

@yuhsien77 has joined the channel

Hello! I’m looking for some help with writing a macro. Is this the place to ask?

Thanks for noticing!

Similar to toString()
in Java or __repr__
in python. I hoped there would be an easy way where I could just define a function that returns a string and that would be it, but printer extension looks a bit complex.

Is there a simple way to convert racket data types (primitives + structs + hashmaps) to json for dumping? The json
module doesn’t seem to be for this

Something similar to python’s json.dumps

Is the recipient a Racket program?

Nope, recipient would be external scripts (not written in racket)

If the recipient were Racket, you could have used serialize
. But if you must use json
then you need an initial conversion from a general Racket value into a value supported by the Json library. I think you need to write that part.

I think a general purpose library to do that would be quite useful. If I end up implementing this I’d be sure to release it.

Another question: is set->list
determinisitc? i.e. guaranteed to return the elements in same order every time?

@p.kushwaha97 I believe the answer is no.

What is the (1 . < . 2)
way of writing called? Is there a doc page specifying what forms can be written this way?


Ah. I understand now. It’s a reader level thing. So (1 . list . 3 4)
evaluates to '(1 3 4)
. Clever. So I guess it’s only useful for (nested) binary operations.

Question: Is it idiomatic use this? e.g. if I use (var-name-which-may-be-confused-as-a-function . < . y)
consistently throughout the codebase, could another racket programmer find it jarring to read?

Personally, I’d find it jarring. When I see .
in a list, I think cons: (cdr '(a . b)) ;=> 'b

The racket style guide doesn’t say anything about infix operators either https://docs.racket-lang.org/style/index.html

Also seeing how documentation is buried deep, I suppose this may not be that well-known a feature

When I use typed code from some untyped code, I get the following error : Type Checker: could not convert type to a contract;
; function type has two cases of arity 3
I see that this is because racket cannot infer types for one of my variables (it’s a lambda parameter). But why should type checker complain about an imported module when I’m running an untyped file? Shouldn’t this only report when there is an actual violation?

Found 8.3 https://docs.racket-lang.org/ts-guide/caveats.html. This is sad. Why can’t racket proceed without contracts? If the typed module typechecks, and untyped module provides arguments of wrong types, then isn’t untyped module at fault?

Yes it is the untyped modules fault. But it’s the contract system that enforces this.

No I mean, why do you want to? Not that it’s unreasonable to want to, I’m just curious

@p.kushwaha97 I recommend not using the .
-based infix notation

It’s noisy to read and easy to misuse

Yes, this is a good place to ask.

New package announcement: kinda-ferpy
(require kinda-ferpy)
(define x (stateful-cell 1))
(define y (stateful-cell 1))
(define sum (stateful-cell (λ _ (+ (x) (y)))))
(displayln (sum)) ; 2
(y 8)
(displayln (sum)) ; 9

It implements the spreadsheet metaphor in a convenient way. It’s not a full functional reactive programming interface, but I find it super helpful for writing build pipelines.


@deactivateduser60718 Great idea. This is much easier to use than a full FRP language.

This is a great package! Excellent work

is it possible to get the printer to output all numbers as hex?

@brightzhang has joined the channel

I don’t think you can with the default printer. You could probably do it with a custom handler: https://docs.racket-lang.org/reference/Writing.html#%28def._%28%28quote._~23~25kernel%29._port-write-handler%29%29

thanks

that looks like it could work

is there not an equivalent of fseek for ports?


But since contract generation fails, isn’t it better to not have the contracts at function level, default to only runtime type safety checks (the more primitive contracts that ensure = can’t be used on non numbers), instead of causing a compilation error?
If compiler gets in the way of you writing a program that you know is correct, then it’s alright when you’re using types but not alright when you’re not using types. When you’re using a typesystem it makes sense to let the burden fall on the programmer to ensure type safety / add casts. But if you’re not using a typesystem, the assumption should be — let user do what they want, and check violations only dynamically (if they arise).

I’ll open an issue if this discussion is useful.