IRC channel logs

2016-07-30.log

back to list of logs

<MorrisSzyslak>Hello
<MorrisSzyslak>How do I make symbol from a char ? by example I have #\\a and I want 'a. Is it possible ?
<ijp>yes, but it's a two step process char->string->symbol
<ijp>(string->symbol (string #\\a))
<MorrisSzyslak>ok thanks
<MorrisSzyslak>I look at the documentation
<MorrisSzyslak>thanks ijp, it works
<amz3>davexunit: hi! Can I use sly on a x200 laptop?
<amz3>I am considering buying a x200 or t400 from minifree since my current x60 can't do the job
<amz3>it overheats
<nalaginrut>amz3: for gaming, I would suggest MSI GS40
<amz3>nalaginrut: wow, looks cool :)
<random-nick>how do I macroexpand only once?
<random-nick>I want to debug a macro I wrote and I want to see what does it expand to
<random-nick>hm, I wrote a macro using the defmacro system but I have no clue on how I would implement it with syntax-case
<random-nick> http://paste.lisp.org/display/321692
<random-nick>also, paste.lisp.org is confusing :/
<paroneayea>scheming a new name for my guile activitystreams library https://identi.ca/cwebber/note/xzHKBozSSLeUkoBflY-W8g
<paroneayea>I guess pubstrate wins :)
<cmhobbs>hey folks! elementary question here. i'm on debian jessie and i've installed guile 2.0.11 from apt (with the -dev package). i'm trying to build guile-gtk and it's complaining about not finding the guile headers ( guile/gh.h: No such file or directory) any idea what knob i should frob on ./configure to get it pointed to the right location?
<cmhobbs>also, any advice on building a simple gui program with guile would be much appreciated
<cmhobbs>i'm going with guile-gtk because it was recommended on the mailing list
<nalaginrut>ACTION has done many works for guile-lua-rebirth, maybe it's an article for it now, and a preview release
<nalaginrut>the table implementation is missing, I need some time
<galex-713>guile-lua?
<galex-713>Does it exist?
<cmhobbs>interesting
<ijp>there is a branch for lua, I was probably the last person to touch it, and it's not usable
<ijp>that should cover the most obvious questions
<nalaginrut>I've rewritten one https://github.com/NalaGinrut/guile-lua-rebirth
<ijp>the main issue was the parser, the rest was mostly fine
<amz3>hello :)
<ijp>you didn't need to redo everythin
<ijp>code worked, the tests ran, it was just unusable from the repl
<nalaginrut>that's not a thing I care about, my implementation is better
<ijp>well I can't comment on that
<nalaginrut>you don't have to
<nalaginrut>I rewrite it to make sure all things could be workable someday
<nalaginrut>ACTION go to bed zzZZZ...
<amirouche>!
<amz3>that sounds rude
<amz3>or maybe not
<amz3>sometime rewriting is easier
<paroneayea>cmhobbs: can't answer your question at all, but I've been thinking about a desktop application running with guile also, so I'll be interested to see what happens..
<cmhobbs>i never could get guile-gtk to install, i'm trying to install guile-gnome
<cmhobbs>guile and tk is a lost cause because gwish isn't a thing anymore, i don't think
<cmhobbs>i know it's possible because sly uses guile-gl, i think, and it makes gui windows
<cmhobbs>getting guile-gnome running is a crazy mess at the moment. the mailing list thread i made earlier this month does not increase my confidence
<cmhobbs>i'm kind of considering going back to common lisp at this point. guile either works really well for me or fights me the entire way
<paroneayea>cmhobbs: sorry to hear it :(
<paroneayea>hope it resolves!
<random-nick>hello, can someone tell me how would I make this macro with syntax-case instead of define-macro? http://paste.lisp.org/display/321692
<ijp>how much do you know about syntax-case?
<cmhobbs>thanks
<cmhobbs>oddly enough, i think guile-gnome installed but maybe int he wrong place
<cmhobbs>ACTION tweaks configure
<random-nick>ijp: not much, I've only read the manual and the examples in the manual
<ijp>and have you tried writing it for yourself yet?
<ijp>there is essentially two orthogonal parts to syntax-case, the pattern matching, and syntax objects
<random-nick>no, I have no idea how to do it so I wrote it in define-macro
<paroneayea>random-nick: I recommend playing around with the examples in the manual... it's a great way to learn
<paroneayea>assuming you use define-syntax-rule(s), the thing you write will look pretty similar to the generated code, with some stuff being substituted in the pattern
<random-nick>well I understand syntax-rules
<ijp>I really wish people didn't use anaphora as their first example, anaphora are cancer
<ijp></hyperbole>
<ijp>doing this example right requires writing that macro *very* differently
<random-nick>well aif is the first syntax-case example in the manual...
<ijp>yes, it is -_-
<ijp>well, early, not first
<random-nick>the first one is just the syntax-rules example translated to syntax-case
<ijp>I know
<ijp>doing aif right means using syntax parameters, because the normal way doesn't really compose
<ijp>maybe someone should go over greg hendershott's macro tutorial and see what can be reused
<ijp>random-nick: your example isn't really much more complicated to write than the aif in the manual, have a go and I'll post mine
<ijp>once you've tried it for yourself, compare with http://shift-reset.com/pastes/acond.scm.html
<ijp>there are better ways to write this, but we can save that lesson for another time
<random-nick>ijp: I tried to do it but failed http://paste.lisp.org/display/321720
<ijp>that one fails for an interesting reason
<paroneayea>hm
<paroneayea>tried to give a symbol prefix to my pseudo-types that wasn't used by anything else with $
<paroneayea>like $Activity, $Like
<paroneayea>discovered that geiser autocompletes it just fine... unless using connect-to-guile
<paroneayea>guess I can drop the prefixes...
<ijp>short answer is that you can't straightforwardly write macros that reuse unhygienic macros like aif
<ijp>(hence syntax parameters)
<ijp>incidentally, you notice this if you use guile's define-macro too
<ijp>(I have a "fix" that makes it do the "right thing" more often but I never got around to submitting it)
<ijp> (http://shift-reset.com/pastes/define-macro.scm.html was where I left it for those interested)
<ijp>ACTION pops stack
<ijp>random-nick: basically, in order to maintain proper abstractions, macros don't use symbols, but syntax objects, and syntax objects record which macro expansion they were introduced in
<ijp>so to get the correct scope for an introduced binding, you need to make sure you have access to something introduced in the initial expansion
<ijp>(or use syntax parameters)
<ijp>if someone wants to play around with the above define-macro, I'll try to get it ready for the next release
<guile-gnome>cmhobbs: fwiw, here is an app using guile-gnome: http://www.altosw.be/kise/
<paroneayea>thanks guile-gnome :)
<guile-gnome>:)
<cmhobbs>thanks, indeed
<paroneayea>guile-gnome: are you daviid?
<guile-gnome>nope :)
<amz3>cmhobbs: I think you need to follow the instructions from guile-gnome website to build guile-gnome
<cmhobbs>i managed to build/install guile-gnome from the readme, i just don't have it in my GUILE_LOAD_PATH at the moment
<cmhobbs>i need to reinstall
<cmhobbs>but i'm setting up a minetest server for my son at the moment, so it'll have to wait :D
<OrangeShark>cmhobbs: I think usually you have to change the prefix in ./configure to the directory of your GUILE_LOAD_PATH
<cmhobbs>OrangeShark: yep
<ijp>(defun (abomination n) #0#=(unless (zero? n) (format #t "ABOMINATION ~a\\n" n) (set! n (- n 1)) . #0#)) hangs
<ijp>I'm not saying this code should work, I just want to know why it hangs
<ozzloy>who's the person to notify about typos in skribilo docs?
<ozzloy> http://www.nongnu.org/skribilo/doc/user-3.html#scheme-syntax " Users and encouraged to look at examples in the Skribilo source for additional details." probably should be "Users *are* encouraged..."
<daviid>ozzloy: subscribe to and send an email their ML: skribilo-users <skribilo-users@nongnu.org>, with a patch even better ...
<mark_weaver>ijp: I guess macro expansion would fail to terminate there.
<mark_weaver>(not to mention compilation itself)
<ijp>mark_weaver: I tried quoting it, but that didn't change anythin
<mark_weaver>reading cyclic data is only supported on the r7rs-wip branch
<ijp>who's working on that? I'd like them to explicitly error if it happens in *code*