sorawee
2020-1-26 13:45:47

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


eric.e.dodd
2020-1-26 13:46:13

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


ben
2020-1-26 15:30:38

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
2020-1-26 16:05:13

@yuhsien77 has joined the channel


yuhsien77
2020-1-26 16:07:03

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


soegaard2
2020-1-26 16:30:41

Thanks for noticing!


p.kushwaha97
2020-1-26 16:56:30

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.


p.kushwaha97
2020-1-26 16:59:08

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


p.kushwaha97
2020-1-26 16:59:28

Something similar to python’s json.dumps


soegaard2
2020-1-26 17:00:08

Is the recipient a Racket program?


p.kushwaha97
2020-1-26 17:06:37

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


soegaard2
2020-1-26 17:10:34

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.


p.kushwaha97
2020-1-26 17:47:27

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.


p.kushwaha97
2020-1-26 17:48:07

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


soegaard2
2020-1-26 18:46:17

@p.kushwaha97 I believe the answer is no.


p.kushwaha97
2020-1-26 19:54:42

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



p.kushwaha97
2020-1-26 20:04:09

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.


p.kushwaha97
2020-1-26 20:10:59

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?


massung
2020-1-26 20:24:27

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


zalp.rogue
2020-1-26 20:25:51

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


p.kushwaha97
2020-1-26 20:27:07

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


p.kushwaha97
2020-1-26 20:47:24

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?


p.kushwaha97
2020-1-26 20:59:58

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?


samdphillips
2020-1-26 21:00:31

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


notjack
2020-1-26 22:34:47

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


notjack
2020-1-26 22:47:26

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


notjack
2020-1-26 22:48:32

It’s noisy to read and easy to misuse


ryanc
2020-1-26 23:21:28

Yes, this is a good place to ask.


deactivateduser60718
2020-1-26 23:30:44

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


deactivateduser60718
2020-1-26 23:31:38

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
2020-1-26 23:31:48

soegaard2
2020-1-26 23:56:15

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


notjack
2020-1-27 04:02:06

This is a great package! Excellent work


matias
2020-1-27 04:06:43

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


brightzhang
2020-1-27 04:35:21

@brightzhang has joined the channel


samdphillips
2020-1-27 04:44:08

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


matias
2020-1-27 04:51:37

thanks


matias
2020-1-27 04:51:49

that looks like it could work


matias
2020-1-27 04:53:43

is there not an equivalent of fseek for ports?



p.kushwaha97
2020-1-27 07:50:18

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).


p.kushwaha97
2020-1-27 07:50:28

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