IRC channel logs

2021-07-12.log

back to list of logs

***chris is now known as Guest2263
***apteryx_ is now known as apteryx
<rlb>What's the "main" python dialect project right now?
***rt is now known as robin
<sarna>can one extend match somehow in guile? something like https://docs.racket-lang.org/reference/match.html#%28form._%28%28lib._racket%2Fmatch..rkt%29._define-match-expander%29%29 in racket
<leoprikler>sarna: not simply… you can write your own match, but basically everything else will need to be handled in terms of ?
<sarna>leoprikler: got it, thanks
<sarna>also, is it just me or is guile really fast at loading code? in racket every import came with a startup time penalty, in guile everything's stable no matter how much stuff I import
***apteryx_ is now known as apteryx
<leoprikler>I think there are some noticeable delays with particularly big things like Guix, but subjectively it feels quite fast too.
<sarna>guix executes in 0.144s for me, that's reasonably fast for a huge chunk of code
<sarna>meanwhile loading racket alone (not racket/base) and printing "hello" takes 0.304s
<leoprikler>Overall Guile's performance is somewhere in the middle
<leoprikler>there are both faster and slower Schemes
<sarna>yeah, just talking about load/startup times here
<sarna>which ones are the fast ones now, by the way? chez and gambit?
<leoprikler>Gambit, Chez, Cyclone, MIT, Guile
<leoprikler>We're number five, baybee
<leoprikler>And we're dominating chudnovsky and pi :)
<sarna>are you talking about https://ecraven.github.io/r7rs-benchmarks/ ?
<sarna>last run was on guile 3.0.4 :^)
<ecraven>I hope to finally do a new run soon :-/
<sarna>talk about devil! :D
<lloda>you can use array-cell-ref or array-slice on any axes by using transpose-array on the arguments
<lloda>but i stopped trying to build on make-shared-array bc it's not a good interface
<lloda>why call an arbitrary function to find some affine transform coefficents? it's easier/safer/faster to give the coefficients directly
<RhodiumToad>eh... not sure
<RhodiumToad>some of the things I've done with make-shared-array would not have been easy as just coefficients
<jlicht>does guile have something similar to python generators?
<lloda>you can have some function that computes the coefficients for you, for some specific use
<lloda>that's probably what you do with make-shared-array anyway, bc it's so cumbersome at point of use
<dsmith-work>Monday Greetings, Guilers
<lampilelo>jlicht: you can create a closure that will store some state, e.g. (define (make-iter) (let ((num -1)) (lambda () (set! num (1+ num)) num))), or if you need something that behaves like a list, use streams from srfi-41
<jlicht>lampilelo: that is what I did now, but after looking at my ugly code I suddenly realised this is basically what generators could/(should?) be used for.
<dsmith-work>!uptime
<sneek>I've been running for 5 days
<sneek>This system has been up 1 week, 4 days, 4 hours, 33 minutes
<Noisytoot>!uptime
<vijaymarupudi>jlicht: You can use delimited continuations to have generators similar to python
<vijaymarupudi>the function creating the generated would need to call reset, and the function yielding needs to call shift
<jlicht>vijaymarupudi: thanks!
<vijaymarupudi>jlicht: thinking about it, I think it would be easier to use % and abort from ice-9 control instead, abort is pretty much yield, and % is pretty much next() (as in python)
<jlicht>vijaymarupudi: already got all the toys I need now :-)
<RhodiumToad>I think for generator-type stuff you want shift/reset and not %/abort
<RhodiumToad>the details of where the prompt is re-established matter