Skip to content

Instantly share code, notes, and snippets.

Alex Harsányi alex-hhh

Block or report user

Report or block alex-hhh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alex-hhh
alex-hhh / tz-lookup-results-7.3.md
Last active Aug 3, 2019
tz-lookup performance results using Racket 7.3
View tz-lookup-results-7.3.md

https://alex-hhh.github.io/2019/08/timezone-lookup.html

These are the test results when running the tests mentioned in the above blog post against Racket 7.3, I did not run the first test, as it takes way too long. These results indicate that Racket 7.3 is faster than Racket-on-Chez used for the measurements in that blog post, but the aim of the blog post was not to measure the performance difference between Racket versions. Since the results are interesting, I decided to move them here, rther than discard them.

You can run the tests yourself, see https://github.com/alex-hhh/time-zone-lookup-tests

Bounding Boxes (2)

@alex-hhh
alex-hhh / world-map.rkt
Last active Aug 20, 2019
World Map, standard-fish competition 2019
View world-map.rkt
#lang racket
(require json racket/draw math/base)
(define (lat-lon->map-point coordinates)
(match-define (list lon lat _ ...) coordinates)
(define-values (x y) (values (degrees->radians lon) (asinh (tan (degrees->radians lat)))))
(list (/ (+ 1 (/ x pi)) 2) (/ (- 1 (/ y pi)) 2)))
(define (draw-polygon dc polygons)
(define path
View example0.rkt
#lang racket
(require json)
;; Example 0: Load and manipulate the Timezone GeoJSON file
;; You will also need to download timezone data from:
;;
;; https://github.com/evansiroky/timezone-boundary-builder/releases
;; Copyright (c) 2019 Alex Harsányi
@alex-hhh
alex-hhh / pwgen-gui.rkt
Created Mar 27, 2019
Password Generator Gui
View pwgen-gui.rkt
#lang racket/gui
;; Copyright (c) 2019 Alex Harsányi
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions:
View pwgen.rkt
#lang racket/base
;; Copyright (c) 2019 Alex Harsanyi
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions:
@alex-hhh
alex-hhh / colormap.rkt
Last active Mar 20, 2019
plot color maps
View colormap.rkt
#lang racket
(require racket/draw
racket/promise
plot
plot/utils
pict)
;; These color maps correspond to the Matplotlib 3.0.3 qualitative color maps
;; with the same names. See
;; https://matplotlib.org/examples/color/colormaps_reference.html
@alex-hhh
alex-hhh / dynamic-select.rkt
Created Feb 15, 2019
Dynamic Item Selection
View dynamic-select.rkt
#lang racket/gui
(define font-faces (get-face-list))
(define my-combo-field%
(class combo-field%
(define (construct-menu)
(let ((menu (send this get-menu))
(prefix (send this get-value)))
View irisk-full.sql
with recursive
TS(this_week, prev_week) as (
select date('now', '-280 days', 'weekday 1') as this_week,
date('now', '-280 days', '-7 days', 'weekday 1') as prev_week
union all
select date(this_week, '+7 days', 'weekday 1') as this_week,
date(prev_week, '+7 days', 'weekday 1') as prev_week
from TS
where strftime('%s', this_week) < strftime('%s', 'now')),
SE(week, rDist, rDuration, rTss, bDist, bDuration, bTss, sDist, sDuration, sTss) as (
@alex-hhh
alex-hhh / report.md
Created Jan 31, 2019
Racket CS performance testing using ActivityLog2
View report.md

A Racket blog post was published recently outlining the performance of Racket-on-Chez implementation. There was a discussion on the racket-users list, which prompted me to do some testing of my own.

Testing overview

A while ago I wrote a profiler to analyze the performance of various

You can’t perform that action at this time.