IRC channel logs

2022-11-21.log

back to list of logs

<cow_2001>i kind of want to make a bunch of tutorial videos teaching programming languages
<cow_2001>upload to youtube or whatever
<cow_2001>it'll show how to open the browser and open the programming language's reference manual
<cow_2001>that's it
<cow_2001>a sort of a joke series
<old>How to learn Java in 1 minute
<old>kind of what Derek Banas does on YT
<old>cow_2001: Have you wen through the whole Emacs introduction yet?
<cow_2001>not yet. only 22.29% by ~point / buffer-size
<cow_2001>old: :| https://0x0.st/olJc.el
<cow_2001>there is probably something there already exactly for that
<cow_2001>how to rtfm. actually, i have my own weird reading setup. i use a text to speech.
<old>My modeline usually show the percentage yes
<cow_2001>mode-line-percent-position :|
<old>yes!
<old>But only work for the buffer, not a info manual
<cow_2001>oh, no. it shows only narrowing
<cow_2001>info sections are narrowing of the whole *info file buffer
<cow_2001>i'm thoroughly sleep deprived. going to bed. ~____~
<old>By the end of the week you should be done with the intro and can start the official manual :p
<ArneBab>Do you know whether it would be possible to do something like a borrow-checker in Guile just to avoid creating garbage?
<flatwhatson>ArneBab: yes guile already does some data-flow analysis for unboxing numbers, this is vaguely similar
<ArneBab>flatwhatson: do you mean this could be fully automated? If the compiler knows, maybe there could be a compiler warning that one could enable?
<ArneBab>⇒ linting for potential data races?
<flatwhatson>ArneBab: i think in theory this kind of thing is possible yes, though i'm not sure how effective it can be in a dynamic language
<ArneBab>flatwhatson: maybe something like (define-borrowing (fun . args) rest ...) could allow pushing parts of the program into a strictly verified mode where memory can be re-used safely without creating garbage.
<ArneBab>flatwhatson: though it might be even more useful to be able to activate performance linting by the compiler: “;;; could not optimize XY because condition YZ cannot be ensured.”
<ArneBab>⇒ tell me if I could add an if so the compiler knows the values that are possible and optimize it much better.
<ArneBab>and *can*
<dsmith-work>Monday Greetings, Guilers
<spk121>dsmith-work: heya
<dsmith-work>borrow checker for guile? Woah.
<dsmith-work>An annoying (to me) thing about rust is the lifetme annotations needed to help the compiler out.
<dsmith-work>I underatand the need, but it make the code harder to read, for me.
<dsmith-work>I can't imagine how all that would work or look for Scheme code.
<dsmith-work>One of the nice things about Haskell is that the type of a fuctions is separate from the defintion.
<dsmith-work>All the algol family of langs have the types intertwingled
<dsmith-work>I guess clues can be taken from Common Lisp
<spk121>I've spent the last couple of months seeing if I could make 64-bit Guile + Windows + guile-ncurses happen
<spk121>It has been annoying, but, I'm 90% there. So many untested corner cases...
<dalepsmith>jgart: (Your messages do not appear in #guile)
<dalepsmith>That is indeed intersting.
<dalepsmith>Has special forms for references
<dalepsmith>And a `&x` reader macro for `(ref x)`
<antipode>sneek: later tell old: The idea is that '%with-resource' would be moved into Guile proper, and that Guile-Fibers would override it.
<sneek>Got it.
<old>ah yes that would work
<old>sneek: badbot
<ArneBab>dalepsmith: what did jgart write?
<ArneBab>spk121: that sounds great!
<ArneBab>(90% there)
<dalepsmith>jgart
<dalepsmith>Could we implement a carp look a like in guile?
<dalepsmith>jgart
<dalepsmith> https://github.com/carp-lang/Carp
<dalepsmith>s/jgart//, s/jgart//
<ArneBab>I wrote a simple not-well-scaling priority queue to solve a Dijkstra-challenge in advent of code: https://www.draketo.de/software/advent-of-wisp-code-2021.html#day-15-puzzle-2-pq — most of the time is spent traversing the list item-by-item in let-recursion. Is there a way to reduce that time without changing to a tree-structure? (I want to get the constant factors down, not the scaling — how to improve the scaling is clear)
<dthompson>ArneBab: you can use a binary heap as a priority queue, if you're okay with a mutable data structure.
<dthompson>but yes, it would involve a tree structure.
<dthompson>though there is a clever implementation of binary heaps that can store the tree as a flat vector.
<old>Why can't I see jgart messages?
<old>But some can?
<dthompson>I can't see them either
<ArneBab>dthompson: a heap is the scaling one, yes. Fram what I’ve seen (text above the code) a pairing heap or a binomial heap woulp provide best performance, while a fibonacci-heap is still somewhat competitive and provides better scaling in theory.
<ArneBab>s/Fram/From/
<lilyp>old: probably some matrix bridge issue
<dthompson>ArneBab: for whatever it's worth, here's the binary heap implemenation I use for priority queues in my game library. it gets used for coroutine scheduling. https://git.dthompson.us/chickadee.git/tree/chickadee/data/heap.scm
<ArneBab>dthompson: thank you! I had searched for a ready-made heap but did not find any …
<old>lilyp: okay thanks
<ArneBab>dthompson: I just found out that the purely functional queues in http://www.brics.dk/RS/96/37/BRICS-RS-96-37.pdf actually do provide a hint how to decrease keys, but it’s O(log n), because it uses a second queue with deleted elements.
<ArneBab>and delete-min is o(log n)
<dthompson>sounds nice
<ArneBab>yes, but even their pseudo-code is roughly 3x your code :-)
<dthompson>uh oh :)
<ArneBab>(my simplest O(n) implementation is just 37 lines of code …)
<dalepsmith>old: No one on #guile can see the messages because jgart (and others) have not identified to libera nickserv. #guile currently only lets identified users speak.
<dalepsmith>You can join #guile from matrix, but then you need to make the extra step of identifying.
<old>I see
<old>Then what's the point joining #guix from Matrix if you're not identifying yourself?
<old>Since nobody can see your message
<spk121>Let's all go back to AOL Instant Messenger
<singpolyma>spk121: sounds too newfandled for us ;)
<dsmith-work>old: Everyone on matrix can see.
<dsmith-work>old: But yeah, not much point.
<old>ahhh okay
<old>only the cool kids on matrix can see
<old>me poor IRC user can't
<old>Matrix could identify itself I guess on a channel?
<old>I've never used matrix so really I don't know what it is
<old>a kind of bridge for all instand messaging thing?
<singpolyma>old: it's not a bot, it's effectively a client. So every user gets their own TCP socket to IRC etc
<old>okay so user can in theory identify themself through it
<dalepsmith>Yeah it's not hard. The info is here: https://libera.chat/guides/faq#can-i-connect-with-matrix
<old>I see
<old>jgart[m]: identify yourself!
<dalepsmith>The important bit is `/msg @NickServ:libera.chat help` and then do the IDENTIFY dance just like you would on libbera
<singpolyma>Really, you have to use the bot message version of identify? Wow
<dalepsmith>Also usually adds a [m] to you nick, but that's easy to change too.
<dsmith-work>singpolyma: On libera, I need to have a little chat with nickserv every time I connect. erc handles that for me, but it still needs to happen.
<dsmith-work>By "libera" I mean irc on libera
<singpolyma>dsmith-work: if you have a modern IRC client that is not required. You can use SASL
<dsmith-work>Ahh, cool
<haugh>Just starting with Records, only used SRFI-9 so far. Can I inspect records to pull things like field names and associated procedures? Would this require getting into lower level APIs like Structures or even using the object system? Is wanting this a sign that I'm doing something wrong? Big fan of the GNU extension to SRFI-9, btw.
<haugh>I think this need would be met by understanding how to pattern match record fields but I don't get it
<haugh>Alright, I get it