Learned that #drracket has a package enabling vim mode and I'm in heaven. :)

https://github.com/takikawa/drracket-vim-tool

GitHub - takikawa/drracket-vim-tool: Vim-like editing for DrRacket

Vim-like editing for DrRacket. Contribute to takikawa/drracket-vim-tool development by creating an account on GitHub.

GitHub
@racketlang
I love these Easter eggs in #DrRacket
Happy King Kamehameha I Day!
#DrRacket #easteregg
Did you know Racket runs on the Raspberry Pi?
IDE, compiler, libraries and documentation included for stand alone use.
32-bit ARMv6 VFP (built on Raspbian) at https://users.cs.utah.edu/plt/snapshots/current/installers/racket-8.17.0.2-arm-linux-cs.sh via https://snapshot.racket-lang.org
@raspberrypi.com @Raspberry_Pi #raspberrypi #racketlisp #lisp #drracket
Finally I'm starting to get a bit more comfortable with all those parentheses and I'm starting to make my own changes in the code without #DrRacket complaining at every single step 💪

Racket - the Language-Oriented Programming Language - version 8.15 is now available from https://download.racket-lang.org

See https://blog.racket-lang.org/2024/11/racket-v8-15.html for the release announcement and highlights. #DrRacket #Racket #RacketLanguage

Download Racket

I've been making progress with learning #Racket and #Scheme. I did add the csv-reader package to #DrRacket to help me along.

One of the report files has well over 100 rows. So it takes 1024MB of memory just to read it in. I haven't really begun to use #lambda on these lists yet. I'm interested to see how the performance compares to my #python scripts.

I got inspired to study #Scheme and I installed #drracket. Over 20 years ago I worked with #DSSSL, a subset of Scheme.

My goal is to write some scripts to parse large CSV files. I've used #Python for similar tasks.

I was talking with the teacher of the statistics class today and trying to convince him (along with myself, so: convince us) that we could teach everything with one language: Racket. So I got distracted trying to learn enough statistics to tranlsate R-code into Racket Code.



#lang racket
(require plot)
(require math/distributions)
;; R to Racket
;; ; Ztable, ZScore ??
;; ; (curve(dnorm(x, mean=0, sd=1), from=-4 to=4)
;; ; abline(v=qnorm(p=0.025, mean=0, sd=1)) ;; a=0.05(5%)とした場合
;; ; abline(v=qnorm(p=0.975, mean=0, sd=1))

(define n-d-0-1 (normal-dist 0 1))
(cdf n-d-0-1 0.025) ;; https://docs.racket-lang.org/math/dist_dist-objects.html
;; ; 0.509972518195238
(inv-cdf n-d-0-1 0.025) ;; https://docs.racket-lang.org/math/dist_dist-objects.html
;; ; -1.9599639845400538
(inv-cdf n-d-0-1 0.975) ;; 1.9599639845400536
#;(define (n-d-0-1-pdf x)
  ((distribution-pdf n-d-0-1) x))
;; (n-d-0-1-pdf -4) ;; 0.00013383022576488534
;; (n-d-0-1-pdf 4)  ;; 0.00013383022576488534
#;(plot (function n-d-0-1-pdf)
      #:x-min -4
      #:x-max 4)
(define cdf-inv-0025 (inv-cdf (normal-dist 0 1) 0.025))
(define cdf-inv-00975 (inv-cdf (normal-dist 0 1) 0.975))

(plot (list
      (function (distribution-pdf (normal-dist 0 1)))
      (lines (list (vector cdf-inv-0025 0) (vector cdf-inv-0025 .4)))
      (lines (list (vector cdf-inv-00975 0) (vector cdf-inv-00975 .4)))
      ); end list of plot functions
      #:x-min -4 #:x-max 4
      #:out-file "norm-dist-inv-cdf-1.png")

;; ; https://www.medi-08-data-06.work/entry/2018/12/18/232204
;; ; https://r-coder.com/normal-distribution-r/
;; ; https://www.statology.org/dnorm-pnorm-rnorm-qnorm-in-r/
;; ; cdf, inverse-cdf https://docs.racket-lang.org/math/dist_dist-objects.html

;; (require math/statistics) ;; quantile
;;(quantile 0.025 < n-d-0-1) ;; no good, how to get xs from normal-dist??





##racket-lang ##DrRacket ##StatisticsRacket

Was soll das für function composition sein, wenn nicht mal

| (compose flip flip) == identity

stimmt und mir dafür Arity-Error entgegen wirft.

Kurz in #ghci geprüft, und glücklich geworden.

#Racket #DrRacket #Scheme #Haskell