IRC channel logs

2022-12-08.log

back to list of logs

<stis>dystopian future here we come ...
<stis> http://itampe.com/pig-and-dinnner.html
<stis> http://itampe.com/taking-the-blue-pill.html
<stis> http://itampe.com/food-fight.html
<stis> http://itampe.com/life-and-death.html
<stis>To show some more store telling capabilities
<stis>unmatched-paren: ^^
<haugh>Christ, that pig poem is dark
<haugh>If your language, tooling, and business domain are so bloated that you need to merge and iterate the entire public zeitgeist in order to write boilerplate productively, automating that last part isn't going to save you.
<haugh>My whole skill in life is intuiting the unnecessary elements of inter-organizational systems. Writing the appropriate prompt is already the hard part.
<stis>haugh: k
<haugh>stis, ask it to justify the burden of proof
<stis>haugh: https://justpaste.it/3n4ks
<stis>QUESTION: can you justify the burden of proof
<haugh>See, it can only collate. The important part of my prompt is the idea that law and justice are separate; that the law has an obligation to justice that it can fail. The body of work about the phrase "burden of proof" is overwhelmingly legal doctrine, so AI (as we currently understand it) can't help us.
<stis>No ChatGPT is not about logic, it fails when the content is heavy in logic, although it seam to be better but still not correct when it comes to programming questions.
<stis>see https://twitter.com/mkawia/status/1600226074406793216
<stis>It's a better google where you can make more involved questions in natural language
<stis>It seam to synthesize from a vast library of pre made information and then combine bits and pieces.
<haugh>So the only way this is really useful to me is if I'm struggling with a solved problem and if I trust the library. I avoid both of these conditions
<haugh>Not that this won't have a huge impact, but I'm already doing everything I can to stay out of the domains where it's the most relevant.
<stis> https://www.engraved.blog/building-a-virtual-machine-inside/
<stis>tip from milia in ##prolog
<stis>Well you can use the system to lookup syntax elements quickly and use it as an advanced doc query machine.
<stis>like: Give an example using a floating point type of better precition than double in C
<stis>and you will get the name of the type, and the header file associated with it in one go
<stis>But we are heading now for a mess with copy pasta, thats for sure.
<stis>haugh: ^^
<flatwhatson>ChatOverflow
<haugh><stis> "QUESTION: can you justify the..." <- No! It's circular. The objectivity of justice (and therefore the equality of Man's unalienable rights) depends on the burden of proof: there is no proof of universal purpose, so all assumed purposes have equal value. The burden of proof, as ChatGPT pointed out, is based on the assumed purposes of a given legal system, whose correctness is (hopefully) measured by its objective justice.
<haugh>This is the root of the problem with what we currently call AI. By what authority is utility measured? We ultimately use force whose asymmetrical distribution is indistinguishable from random chance.
<haugh>This is not a new problem. I hope that this manifestation of information technology convinces large groups of people that a lot of what we're currently wasting time on is actually a set of solved problems with arbitrary judges, but honestly it scares the shit out of people to the point where they stop thinking about it and just talk about bans.
<haugh>Also not a new problem
<haugh>I'll reverse my position on this entirely if it can explain gnu-build-system, though
<flatwhatson>it does a half-decent job at writing basic guix packages
<haugh>does it know how to structure a project around guile-build-system //~//~//
<haugh>stis, forget the philosophy, ask it to explain the demarcation of guix/build
<flatwhatson>haugh: guile-build-system is pretty straightforward, it builds & installs .scm files under project root by default
<flatwhatson>you can specify #:source-directory argument if you want to restrict it to eg. a "lib" or "src" directory in your project
<haugh>Yes I see people using it in practice but I've been trying to dissect the code all week, which appears to be complicated by the build/build-system dichotomy. How does it install documentation?
<haugh>We have install-documentation, validate-documentation-location, delete-info-dir-file, install-license-files, and compress-documentation
<flatwhatson>haugh: look at guix/build/guile-build-system.scm
<haugh>install-documentation invokes install-file, which is defined in build/utils.scm, invoking copy-file
<haugh>is that ftw?
<flatwhatson>copy-file is in guile
<flatwhatson>but the important bit is that install-documentation searches for files matching documentation-file-regexp and puts them in $out/share/doc
<haugh>flatwhatson, project root is by default the same directory searched for guix.scm?
<flatwhatson>haugh: it's the root of the source directory. eg. if your package source is a git checkout, it's the root of the checkout. if it's a local-file, it's the path you named there
<haugh>AH
<haugh>thank you very much
<flatwhatson>haugh: if it helps, i have an example guix.scm for a project using guile-build-system: https://gitlab.com/flatwhatson/guile-gemini/-/blob/main/guix.scm
<haugh>yeah you linked me this last week, that's why I've been interrogating you :)
<flatwhatson>oh right ':)
<haugh>I just wish it were officially documented, but I understand it's reasonable to assume anyone in that section will already be relatively comfortable with the GNU way
<flatwhatson>probably just someone needs to improve the docs
<haugh>It's all good and I really appreciate the help
<haugh>Found this in ice-9/documentation.scm:178
<haugh>(memq (string-ref entry len) '(#\newline))
<haugh>and I'm wondering why the use of memq and a literal list instead of just eq? and the char, as in
<haugh>(eq? (string-ref entry len) #\newline)
<lilyp>memq can more easily be expanded, I guess
<lilyp>if you ever need to account for idiot newlines
<haugh>so it's the same in terms of memory comparison?
<lilyp>wdym memory comparison?
<lilyp>memq does use eq? below the surface if that's what you mean
<haugh>ballin'
<dokma>Syntax error:
<dokma>unknown file:1:33: body should end with an expression in form (let ((options (getopt-long scm-argv (quote ((database-path (single-char #\d) (value #t))))))) (define database-path (option-ref options (quote database-path) #f)))
<dokma>Why can't I use define in the body of the let?
<dokma>If I replace the define with a (display 1) it works.
<dokma>ane: ^^^
<lloda>dokma: you need to have at least one expression in the let body. The define doesn't count
<dokma>lloda: define isn't an expression?
<lloda>it's not
<lloda>you cannot do e.g. (define a (define b 1))
<dokma>Oh, I see...
<dokma>What is the way to get values from guile to C? A string for example.
<dokma>I'm trying to nail it in the manual at the moment.
<lloda>>>>>>>> bb58612 (Fix constexpr issues in ra::)
<dokma>lloda: ^^^
<lloda>sorry
<lloda>dockma: https://www.gnu.org/software/guile/manual/html_node/Conversion-to_002ffrom-C.html#index-_002ascm_005fto_005futf8_005fstringn
<dokma>tx!
<lloda>damn i can't type today
<lloda>yw
<dsmith-work>Thursday Greetings, Guilers
<garbados>feliz jueves guilers
<garbados>are there good resources for learning about asynchronous programming in guile? i have an issue where a function expects a synchronous return, but my implementation needs to make asynchronous calls to get the correct value, and i'm stumped trying to figure out the correct semantics
<old>By asynchronous you're talking about system signal such as SIGUSR1? Or maybe userspace threads like guile-fibers?
<garbados>old: asynchronous like promises, like i have a function to which i supply a callback which receives the desired value, but that higher function doesn't return anything useful in itself
<garbados>i think i got a fix with call-with-prompt though
<old>Use `ice-9 futures` ?
<old>(touch (future (+ 1 1)))
<daviid>garbados: fwiw https://github.com/ChrisVine/guile-a-sync3/wiki
<daviid>and https://www.gnu.org/software/8sync/
<garbados>links much appreciated, thank you
<daviid>welcome! and fibers was mentioned before as well, here is it's home https://github.com/wingo/fibers/wiki/Manual
<daviid>sneek: guile-software?
<sneek>I've heard guile-software is at http://sph.mn/foreign/guile-software.html
<cwebber>what's the proper way to re-raise a caught exception with its stack so it can be resumed and explored with the debugger?
<cwebber>I have the exception
<cwebber>(raise-exception ...) is clearly not enough though
<old>I don't think it's raise-exception that mandate if the stack is unwind or not, but with-exception-handler
<cwebber>hm
<old> -- Scheme Procedure: with-exception-handler handler thunk [#:unwind?=#f] [#:unwind-for-type=#t]
<cwebber>yeah
<cwebber>I just really don't understand that api
<dthompson>it's confusing!
<civodul>'catch' could have two handlers: a post-unwind handler and a pre-unwind handler (the latter being optional)
<civodul>with-exception-handler lets you choose whether to unwind or not
<stis>Hello guilers!
<dthompson>civodul: with-exception-handler doesn't completely replace catch and other older API procedures, which is what tripped me up last time I was working on exception handling code.
<civodul>in boot-9.scm, catch is implemented in terms of with-exception-handler
<dthompson>ah, it was something else, then... it's been awhile.
<civodul>now, all this is a bit confusing
<civodul>there's also another with-*-handler...
<civodul>wait
<civodul>yes, with-throw-handler
<civodul>that one predates with-exception-handler and it's weird
<civodul>best to ignore it
<civodul>that's my strategy at least :-)
<civodul>and then there's srfi-34 'guard'
<civodul>amazing
<dthompson>civodul: I have a case where I need with-exception-handler *and* with-throw-handler
<civodul>ah, good luck
<dthompson>it works, but it feels clunky.
<civodul>in Guix it's still catch, guard, and a tiny bit of with-exception-handler
<dthompson>I'd have to dive back in to get all the details straight and explain what's going on, but the issue is around stack capture.
<dthompson>I have error handling code that captures the stack for errors happening in an event loop, allowing an attached repl to open a debug repl for that stack. with-exception-handler alone isn't sufficient to make it work.
<dthompson>with-throw-handler allows for passing a pre-unwind handler.
<civodul>right, the manual reads: "It’s not possible to exactly express ‘with-throw-handler’ in terms of
<civodul>‘with-exception-handler’, but we can get close."
<dthompson>civodul: yup. I guess it's just odd to me that the manual seems to suggest that with-throw-handler is part of the "old" API, but the new API has no replacement.
<cow_2001>there are so many collection data types in guile. it's the first time i've ever heard of vlists.
<cow_2001>a list of exponentially longer and longer vectors
<stis>Hmm I made my custom wrirte work again, I can write 10M doubles to /dev/null
<stis>guiles internal does 1M
<stis>Both are C code.