IRC channel logs


back to list of logs

<spk121>daviid: oh yes, of course. Gotta have gtk3 for events. But with glib and gobject by itself, I think you can do main loops with socket events, but, that's about it.
<daviid>spk121: ok, it was jut to confirm, tx
<akhetopnu>Is there a built-in macro in guile for transforming code a.k.a. pipeline operator that would transform this (>> 2 (add 1 ?) (add ? 3)) into (add (add 1 2) 3)?
<chrislck>akhetopnu check out srfi-171 I think
<dsmith>sneek: botsnack
<dsmith>sneek: later tell dsmith-test hey
<sneek>Got it.
***dsmith is now known as dsmith-test
<sneek>Welcome back dsmith-test, you have 1 message.
<dsmith-test>sneek: later tell dsmith hey
<sneek>Got it.
***dsmith-test is now known as dsmith
<sneek>Welcome back dsmith, you have 1 message.
<sneek>dsmith, dsmith-test says: hey
<dsmith>sneek: botsnack
<dsmith>sneek: version
<sneek>Sneeky bot running on Guile version 3.0.0 using bobot++ 2.3.0-darcs
<dsmith>sneek: seen wingo
<sneek>I last saw wingo on Jan 17 at 01:51 pm UTC, saying: what did you change? :).
<sneek> 23:23:43 up 2 days, 1:37, 1 user, load average: 0.00, 0.01, 0.06
<sneek>Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux
<sneek>Yey, back home again!
<d4ryus>How can i get the pid of a process spawned by open-pipe so i can terminate it? there is port/pid-table, but a comment in the code says its deprecated
<manumanumanu>d4ryus: There is an unexposed procedure from (ice-9 popen) called open-process. Import that: (define open-process (@@ (ice-9 popen) open-process)). That returns 3 values: an output port, an input port and the pid
<manumanumanu>(but double check the order of the ports...)
<manumanumanu>I don't know why that isn't exposed, since closing one of the pipes returned from popen is not possible, so implementing piping using it does not work.
<manumanumanu>IIRC there was some work to expose it, but it went nowhere.
<manumanumanu>I will submit a patch for it when I am finished with my for loops.
<d4ryus>manumanumanu: nice :) thank you
<lloda>manumanumanu: that is which has been sitting there with a patch for quite a while
<lloda>wingo asked for doc but the patch is essentially only doc so I'm not sure what's missing
<lloda>looks committable to me
***ng0_ is now known as ng0
<str1ngs>hello daviid I seemed have run into a with webview load-changed signal. If I have more then one view. only the first views signal is called. I have put this example together as you will see. view-b 'load-changed is never called. here is the scheme example The C example here does not have this problem.
<str1ngs>daviid: into a issue*
<apteryx>is there something I can use to separate a list in two lists, one with filtered items and the other minus filtered items? Such as could be obtained by successively using `filter' then `remove' using the same predicate, but in one time?
<erkin>I don't think so, but I don't think it'd be too hard to write one with two accumulators with a `values' in the tail.
<erkin>Something like this:
<erkin>Like R6RS div-and-mod.
<daviid>str1ngs: how do i trigger the problem? in any case, it doesn't look like your event variable is bound to a gdk event, but just a symbol?
<daviid>i can't find the documentatin about webkitwebview and its singals
<daviid>looking here
<manumanumanu>apteryx: partition?
<manumanumanu>(partition even? '(1 2 3 4)) => (2 4) (1 3)
<manumanumanu>from srfi-1
<dsmith>apteryx: Was going to mention srfi-1. *Lots* of cool stuff in there.
<manumanumanu>apteryx: I have a partition-all somewhere that partitions a list into N amounts of lists, where N is as large s the different values returned by the predicate.
<manumanumanu>so if even? in my example would have returned 'bananas for the number 1 you would get the result (1) (2 4) (3). If you want to I can go look for it.
<manumanumanu>implemented using hash-tables, so it is pretty trivial.
<emys>hey, under guile 3.0, changing language in the repl fails for me.
<emys>,L brainfuck
<manumanumanu>apteryx: but yeah, folloing dsmith's advice: srfi-1 is mandatory reading if you want to work with lists
<emys>for example doesn't work and complains about a missing `language-title` or something (sorry, didn't keep the error message
<emys>going back to 2.2, it works
<mwette>emys: on 2.9.8 for me: "Unbound variable: language-title"
<mwette>and before that "While executing meta-command:"
<daviid>str1ngs: it doesn't sound like a g-golf problem, g-golf does not trigger nor block signals
<daviid>str1ngs: you should be a lot more carefull about the way you name things - all args of all your signals have 'wrong naes' - this makes it quite difficult to even just read the code
<str1ngs>daviid: my variable names are fine. please consider this as a bug report. thank you
<daviid>str1ngs: the destroy signal callback single arg is a widget (pointer from the gtk point of view), in this case, a <gtk-window> instance, not an event - it would be better to keep event to name args that receive a <gdk-event> or subclass instance
<daviid>str1ngs: but i have no idea why view-b does not receive its signal
<str1ngs>daviid: gtk-window is derived from gtk-widget. and had nothing the the issue I'm reporting.
<mwette>emys: I think this may have do w/ change to records; (system base syntax) has change wrt how the record containing language-title is created.
<daviid>str1ngs: as i said, there is nothing in g-golf that 'blocks' signals
<mwette>emys: I reported as bug, #39196
<str1ngs>daviid: with g-golf you can not have two webviews that use load-changed at the same time. I'm sorry you don't like my example. write your own examples. that is my bug report.
<matijja>Does web client has support for socks proxy?
<daviid>str1ngs: where is the webview and signal doc?
<erkin>Is the #{foo bar}# syntax unique to Guile?
<civodul>erkin: i think so
<daviid>str1ngs: i think i found why view-b does not respond to its signals, at a lower level, as expected, it recieves them
<daviid>i'll cook a patch
<rndd>Hi everyone
<daviid>str1ngs: I pushed a fix, please try and let me know if it effectively solves the problem
<rndd>Could anybody tell how to compile static binaries that can be transferred?
<rndd>Or mention part in manual i should read? 0_0
<rndd>Or maybe example of doing that ?
<rndd>Okay ;(
<erkin>Why are newcomers on IRC so impatient? ;-P
<zig>guix pack something is the answer to the question
<civodul>uh, Guile 3 segfaults during build on ARMv7:
<zig>lloda: re, please reply LGMT if it is good for you. FWIW, this is my patch, I can LGMT tho ;)
<zig>I need to pratice...
<zig>it is been a while, a people keep asking how to do what this patch make public.
<renken>hi, what text editors are extensible in guile?
<renken>searching the web can't seem to output much useful results
<ZombieChicken>there is/was an emacs written in guile, though I don't know what it's status currently is
<zig>cc erkin
<ZombieChicken>Ah. Good ol' termbox
<zig>renken: I did not try it with guile 3.0, it probably rusty!
<erkin>ZombieChicken: I'd like to see Guile Emacs revived sometime.
<zig>renken: there is also zile-on-guile, but never succeed to make it do what I want (there is too much C code ;)
<erkin>I'm currently poking around to see if there's any interest in starting a project to continue development on Guile Emacs.
<ZombieChicken>isn't Guile and elisp more-or-less incompatable?
<ZombieChicken>I recall issues with the nil/false values, at the very least
<erkin>Guile Emacs doesn't seek to replace Elisp with Guile.
<zig>they were some fixes in guile to make it more compatible, like the existence of nil.
<ZombieChicken>yeah, but I recall that the difference in how the languges work was causing problems at some point
<erkin>I don't think that should cause a problem much, since ideally you don't want to comingle the languages too much.
<zig>ZombieChicken: like dynamic scoping?
<ZombieChicken>tbh, not sure why you'd want to use elisp when you can use scheme
<erkin>If we can implement Tcl on Guile, why not Elisp?
<renken>thanks for the help zig, I think zile is something interesting
<zig>ZombieChicken: +1
<ZombieChicken>zig: I'm just recalling issues I heard about before and thought I'd mention them
<erkin>Anyway, the idea is replacing the opaque and crufty C interpreter at the heart of Emacs with a clean Guile implementation.
<ZombieChicken>Guile hopes to be the one-stop-interpreter for a bunch of languages, doesn't it? Or at least let you run more than just Scheme?
<erkin>That would yield 1. a better garbage-collector, 2. natively compiled Elisp modules, 3. multithreading, 4. overall better performance, 5. maintainable code, 6. tail-call optimisation (Emacs is full of dirty hacks to avoid hitting the stack depth limit when recursing over beefy procedures)
<erkin>Ideally, you'd be able to write modules in either Guile or Emacs Lisp.
<zig>Maintaining a fork of emacs: I think the cost outweights to benefits.
<ZombieChicken>Oh, #6 there would be nice. Makes one wonder why Emacs doesn't do that already. Even CL implementations have TCO...
<zig>using a trampoline?
<erkin>zig: I think #5 will eventually outweigh it but it might be too late by then.
<zig>#5 you would still have to maintain elisp.
<erkin>I mean, Guile Emacs was, at its conception, meant to replace GNU Emacs.
<zig>By a lone dev without leadership over the original project.
<erkin>I'm fairly sure if things somehow magically turn out well and Guile Emacs is completed in pristine completion, rms wouldn't have any qualms christening it as the official.
<erkin>It was his idea in the first place anyway.
<mwette>emys: I found a fix: add language-title and language-name to the #:autoload (system base language) entry in system/repl/command.scm
<zig>the thing is that every year there is a few new editors, that gain steam. It is not clear to me as schemer or guiler why I would like my editor to be written in a mix of elisp and guile.
<erkin>Why do you prefer it written in a mix of C and Elisp then?
<zig>maybe it is a case for 50 years old running and it is the Good Thing, instead of my NIH and re-inventing the wheel.
<erkin>Literally everyone who's seen the internals of Emacs curse at the decades of hacks accumulated in there. (Especially the display code.) It's going to be have to be rewritten (either from the ground or in chunks) sometime but no one wants to touch it.
<erkin>There's a difference between reinventing the wheel and cleaning up spaghetti on a better platform.
<zig>I just read some thing like that, I was not sure about the state of the code...
<zig>since I do not have a first hand view.
<mwette>elisp is dynamically scoped, I believe; scheme is lexically scoped
<zig>speaking of display code, I have been struggling with that myself. I am wondering how emacs manage to have both terminal interface and rich gtk interface.
<ZombieChicken>Honestly, do we really want/need an emacs replacement? How about just writing an editor that can be embedded properly and can properly call userland over a selection of the file? Yeah, it'll break $OLD_TYMEY_USER's workflow. Let them use Emacs until it implodes
<erkin>It's not an Emacs replacement.
<erkin>It's an Emacs cleanup project, if you will.
<erkin>zig: There's more to just curses and GTK in there actually. It still supports Athena and Motif. Both of which surprisingly work well actually.
<ZombieChicken>iirc, it's not GTK, just kinda-sorta GTK with some straight up X hacks in there
<drakonis>erkin: there is interest
<ZombieChicken>which is why emacs doesn't work with Wayland
<zig>oh no!
<erkin>Yeah, it's way too deeply tangled in X11 code.
<erkin>And no one can untangle it because... xdisp.c is >35k lines of C code.
<ZombieChicken>35k? There are operating systems with fewer lines of code...
<erkin>Note that xdisp.c isn't the only portion of the display code.
<zig>erkin: I will say it: what is the advantage of cleaning up emacs, instead of starting from scratch in pure guile?
<ZombieChicken>still being able to use modules that were written over the last 40 years?
<erkin>zig: That's a good question, honestly. I'd say the benefit is preserving existing functionality. Despite the massive amount of C in there, Elisp makes up large majority of Emacs's functionality.
<erkin>In addition, you'd get to use existing Emacs modules as well.
<ZombieChicken>Anyone here familiar with migrating code from Racket to Guile?
<drakonis>execute a slow transition into guile over the decade
<erkin>So ideally, it'd be a completely seamless drop-in replacement.
<erkin>The end user wouldn't notice anything.
<erkin>Other than speed up maybe.
<drakonis>it would also make emacs into a guile frontrunner, its great for marketing
<erkin>Yeah, good point.
<ZombieChicken>drakonis: So long as the initial releases break nothing whatsoever.
<drakonis>make sure all the big software still runs fine
<tazjin>is there a library for generic DNS lookups? (e.g. for TXT records) thought to ask before writing bindings to res_query or something
<zig>tazjin: what is rez_query? isn't getaddrinfo a dns resolver?
<tazjin>zig: getaddrinfo only resolves addresses (A records and such), but I need other information from DNS
<mwette>Are you guys aware of
<tazjin>zig: res_query -
<zig>tazjin: I looked up, res_query, btw it would be nice to have a guile only dns resolver for guile fibers to be able to resolve dns asynchronously.
<erkin>mwette: Oh yeah, I've seen that. Never got to use it myself though, since I don't really write much C.
<drakonis>that's for embedding emacs-y software into things
<zig>tazjin: IIRC DNS protocol is UDP... should be manageable and guile has udp ports.
<drakonis>its a unique thing
<erkin>ZombieChicken: I'd try to reduce the Racketisms into R6RS (using #lang r6rs) and then move it over to Guile.
<drakonis>erkin: ring up dlowe on lobsters if you want to get someone else who's interested in working on this
<tazjin>zig: I'd currently prefer not to write one from scratch, I'm a common lisper just exploring guile and need to do DNS stuff for my example project
<drakonis>he's interested
<ZombieChicken>erkin: Yeah. Do you happen to know if there is anything comparable to Racket's gvector (growable vector)?
<mwette>zig: IIRC, at the lisp-C border emacs functions have compile-time switch to implement against X11 or (n)curses
<zig>speaking of editor, someone recommended me the design of "hemlock"
<ZombieChicken>yeah. I think that's an emacs in CL
<erkin>I tried Hemlock before.
<erkin>It comes from the same lineage as Zmacs, the Lisp Machine Emacs.
<erkin>It's got a few interesting features. For instance instead of `M-x eval-buffer' it's `Extended command: Evaluate Buffer'
<ZombieChicken>iirc, the underlying design of zmacs/hemlock would let it do things gnu emacs wouldn't be able to do well. Being written in CL and having no security features has it's advantages
<erkin>ZombieChicken: I just checked gvector.rkt
<erkin>It's an abstraction over vector.
<ZombieChicken>325 line abstraction. Thanks for the link, but you really didn't need to go through all that trouble
<erkin>I was curious. ;-P
<erkin>Yeah, it comes with a bunch of macros for iterating over it, some code for marshalling, some contracts etc.
<erkin>You can most likely trim it under 100 lines.
<ZombieChicken>honestly, I'd probably be better off accepting list as the One True Data Structure and do everything with that (and take the hit performance hit) since it would likely be the most portable across Scheme implementations
<zig>so, in fact, looking at emacs or guile-emacs code will be useful for my future self. I will probably means that I am in.
<zig>erkin: what is the plan regarding guile-emacs? Do you have idea on how to get started? outside reading emacs manual :p
<ZombieChicken>I'm using gvecs in a (tiny) editor I've cobbled together to save display time
<erkin>There's also Edwin, written in MIT/GNU Scheme.
<ZombieChicken>but who really needs O(1) access times?
<ZombieChicken>(and by tny, I mean it's a subset of ed's functionality)
<zig>ZombieChicken: for what purpose are you using growable vectors?
<erkin>zig: Not sure yet. The first steps would be surveying the state of the code in both branches, comparing the changes, acquainting myself with the codebase, then going through the TODO list.
<erkin>It might be more feasible to dike out the Elisp interpreter in Guile, get it working in isolation, clean and polish it, then embed it back in there.
<ZombieChicken>zig: Storing the file. One line per entry, cut at the /n. Displaying any series of lines should be ~O(1) instead of O(n)
<zig>erkin: where are the sources?
<zig>ZombieChicken: why is it growable?
<ZombieChicken>zig: To allow one to add lines to the file?
<erkin>It's five years behind the main branch, and on Guile v2.0.
<rekado>I’d like to use LOAD to load a source file that’s written in a language other than Scheme. Is this possible?
<ZombieChicken>It let me (hopefully) avoid having to copy the entire data struct whenever an addition is made
<dsmith>iirc, guile currently *does* have some internal support for elisp around the #f '() nil differnces.
<erkin>IIRC the version of Guile used in Guile Emacs contained patches that never made it upstream.
<rekado>I wasn’t able to figure out how to do this, so I’m using a horrible work around to compile the file first and then use LOAD-COMPILED.
<erkin>This one.
<ZombieChicken>erkin: What's that?
<erkin>How different editors implement lines.
<ZombieChicken>Ah. Thanks
<ZombieChicken>but I'm pretty dedicated to the route I've gone. I was asking about guile and gvecs for no other reason than we were discussing editors and was quickly pondering whether or not attempting to port my code over might help some other purpose
<erkin>Ah, I see.
<zig>(also rewriting is the noob approach, arguably)
<ZombieChicken>Depends on what one starts with, or how old it is
<ZombieChicken>erkin: Thanks for the link, though. It was interesting
<erkin>I'll see how DrRacket does it.
<ZombieChicken>Go for it, but I'm not particularly interested. I have my own ideas on how to do things, and havn't seen it through enough yet to watch it blow up
<erkin>Just out of curiosity.
<ZombieChicken>Yeah, that's certainly fine, and I'm listening if you run into something interesting
<zig>ZombieChicken: there pfds finger trees, if you want to quickly insert stuff between two indices or remove one row completly while keeping the order.
<zig>zig: that is what is used in azul.scm
<zig>for representing the text buffer...
<ZombieChicken>zig: pfds?
<erkin>DrRacket uses a very complicated system of heterogeneous data structures.
<ZombieChicken>what is a finger tree? some flavor of b-tree?
<erkin>Editors can contain "snips" that contain images, richly formatted text objects or other editors.
<ZombieChicken>erkin: I'm not suprised. DrRacket can also be really slow in some cases
<erkin>Yeah, I suppose that's the price to pay.
<ZombieChicken>and yeah, it handles image inlining, at least in the output. I've no interest in doing something like that
<ZombieChicken>Hell, the 'editor' I have completely barfs if you try to read in, then write out, something that isn't text.
<ZombieChicken>Tried it with a PDF. I think it dropped about a megabyte of data SOMEWHERE
<erkin>Text is held in "string-snip" objects that contain the string with positional and stylistic metadata, and can be marshalled into text in a format called WXME.
<erkin>And... the editor holds the snips in a linked list!
<erkin>There we go.
<ZombieChicken>zig: Thanks.
<dsmith>Hmm. scm_memory_error seems to have gone away with no mention of a replacement in NEWS
*dsmith is working on scwm once again