IRC channel logs

2017-10-01.log

back to list of logs

<amz3`>I have copy of that
<amz3`>random_numbers: no it's different
<amz3`>random_numbers: the diff is that about JS Objects which are convert to hash tables instead of alist
<random_numbers>Ah that's a shame.
<random_numbers>Any publicly available repo that has it? Because the gitlab one apparently requires permissions or doesn't exist anymore.
<amz3`>random_numbers: https://framagit.org/a-guile-mind/culturia/blob/master/src/json.scm
<dustyweb>random_numbers: https://gitlab.com/dustyweb/guile-sjson
<dustyweb>-sjson, not -json
<MuteParrot>Is there a convienent way to (export ...) all the getters and setters generated by GOOPS classes that reside in a module?
<random_numbers>Ah right, sjon exists.
<random_numbers>Thanks amz3`, dustyweb
<daviid>random_numbers: https://savannah.nongnu.org/git/?group=guile-json
<daviid>ah, but that is not the same project as the one developped by dustyweb
<daviid>better ask dustyweb , the login gitlab to access is a 'mistake', i'm pretty sure of that
<random_numbers>daviid: Yeah, dustyweb answered with the right link a few lines above.
<daviid>so many guile-json repos ...
<random_numbers>It's a common use-case and the current Scheme library environment favors reinventing the wheel.
<daviid>ok, didn't see dustyweb answer, tx
<random_numbers>Or that's the impression I get at least.
<dustyweb>hey, I didn't totally reinvent the wheel... I used davexunit's code as a basis ;)
<random_numbers>So yours uses hash-tables or a-lists?
<dustyweb>fashes or alists
<dustyweb>but it may be adjsuted soon to support other options for the map bit
<random_numbers>fashes?
<dustyweb>the current fashes support is kinda hashed in
<dustyweb>random_numbers: yeah functional hashmaps
<random_numbers>dustyweb: Oh. That sounds interesting. Part of which SRFI?
<dustyweb>none
<random_numbers>dustyweb: Your very own implementation. Nice.
<dustyweb>it's a library written by wingo, mostly based on clojure's datastructure design iirc, and I bundled it
<dustyweb>not my work
<dustyweb>I just bundled it
<random_numbers>So, what's the Scheme-y term for docstrings?
<amz3`>docstring
<mwette>random_numbers: https://gitlab.com/dustyweb/guile-sjson
<random_numbers>mwette: Ah, thanks though dustyweb already answered before.
<mwette>random_numbers: good news
<random_numbers>Indeed. As it seems XML APIs are disappearing. I don't think I'll miss them too much.
<Apteryx>Hello Guile! Where is match-lambda defined?
<daviid>Apteryx in (ice-9 match)
<daviid>Apteryx: note this module actually uses match.upstream.scm ...
<Apteryx>thanks!
<daviid>wc!
<Apteryx>I'm a bit confused with matching a symbol which happens to be bound to a record. I'd like to match the symbol itself if possible. Should my match pattern by something like ('symbol) ?
<Apteryx>e.g., supposing the symbol is named texinfo-5, should my match be (('texinfo-5) ... ?
<daviid>Apteryx: not using record so much, but there are examples in guix, and according to the doc, you'd do something like
<daviid>(match texinfo-5 (($ <record-ame> pat_1 ... pat_n) your code here))
<daviid>Apteryx there is an example in the doc actually, look at match doc ... define-record-type person ...
<daviid>section 7.7 pattern matching ...
<Apteryx>yep I'm looking at this one... looks like they omit the <...> around the package symbol?
<Apteryx>but I see instances in guix where it's being used. hmm.
<Apteryx>(with <, >)
<daviid>the package?
<daviid>surrounding record names with '<' and '>' is merely a convention
<Apteryx>oh, I see! Sorry, package is a guix specific.
<live_the_dream>im trying to package guile 2.2 for an android project called termux. im just wondering about cross compiling guile
<live_the_dream>is compiling 32 bit hosts from 64 supported or will i have to compile guile in 32 bit first ?
<random_numbers>Any recommendation for SSL/TLS libraries for guile for HTTP-GET/POST kinda stuff?
<random_numbers>Guess I'm gonna go with gnutls
<amz3`>héllo :)
<janneke>hey amz3`
<amz3`>I need to work with epoch...
<amz3`>i need to convert epoch in seconds to epoch in days
<amz3`>any idea?
<amz3`>I think it's just a division
<janneke>amz3`: if you don't need to be accurate and don't care about leap seconds, sure simply divide
<amz3`>tx!
<amz3`>it's for gathering some stats in my blog
<amz3`>but I guess nginx logs will do, I just need to configure the referer thing
<amz3`>seems like its the default nginx configuration
<amz3`>the thing is only, it ain't perfect but it does the job
<amz3`>s/only/online/
<amz3`> http://presence.hyperdev.fr/post/58FL3FUK
<amz3`>I can go back on hack on something extra ;)
<m3tti>i've got 2 questions. first what is your main editor for writing scheme and is anyone using scheme for web apps??
<amz3`>m3tti: 0) emacs 1) yes, see http://presence.hyperdev.fr/post/58FL3FUK it's written in scheme (both frontend and backend)
<m3tti>emacs because of the inferior lisp shell?
<amz3`>m3tti: emacs because it's my default editor, but honestly, I don't use often the scheme integration called geiser
<janneke>amz3`: you don't use geiser?!
<amz3`>janneke: not really, i seldom use. The only feature I use, is macro expansion but I seldom write macros
<janneke>interesting...i guess geiser (next to paredit, of course) is what moved two juniors away from their modern editors and got them hooked on emacs
<amz3`>m3tti: why do you ask?
<amz3`>m3tti: honestly from my point of view, any editor will do
<m3tti>i was a former emacs user but i've switched to vim
<m3tti>because i love the movements in vim
<m3tti>i know there is evil mode
<m3tti>but its not the same
<janneke>yeah, movements in vi are amazing
<m3tti>and somehow i've the feeling that emacs is driving away from its cli editor stuff
<m3tti>most of the tools i've seen uses the gui part of emacs
<m3tti>that was my main reason to switch to neovim to be correct
<m3tti>and the second question is because i like to write apis and i wasn't sure if there are any good scheme web frameworks/libraries out there
<m3tti>and if you are looking for stuff for scheme google and co aren't a big help
<m3tti>mostly you don't find anything about scheme
<m3tti>and i don't know why scheme is awesome
<m3tti>simple and awesome
<m3tti>it's like lisp but more simple :D
<m3tti>no nasty for loops :D
<dustyweb>hello #guile!
<m3tti>and what is the reason for guile over chicken scheme or gambit
<m3tti>hi dustyweb
<janneke>hey dustyweb
<ft> https://wingolog.org/archives/2013/01/07/an-opinionated-guide-to-scheme-implementations
<m3tti>thanx ft
<ft>m3tti: ^- that one may help. wingo is one of the Guile maintainers.
<m3tti>i love oppinionated blog posts
<janneke>dustyweb: was just thinking..with the OO hype coming to an end, iwbn if we had something better than records and less OO than GOOPS. Any ideas there?
<dustyweb>janneke: GOOPS is pretty nice! And I think with wingo's recent work on git master to unify the underlying structure of GOOPS and records, that puts us in a good place
<dustyweb>use records when you use speed
<dustyweb>use goops when you want dynamic live hackability
<janneke>dustyweb: GOOPS /is/ pretty nice. I'm using it with only #:getter and I like define-method better than (define (o) (match o (($ <...>))))
<dustyweb>OO definitely experienced an irritating amount of hype, but I also consider anti-OO to be a kind of hype... after all "what is an object"? http://www.mumble.net/~jar/articles/oo.html
<dustyweb>one of the nicest things GOOPS gives us is its generic methods. But I think there's room for more exploration in the generic methods space
<dustyweb>after all generic methods are effectively the same as how pattern matching is used in languages like Haskell, but done at runtime rather than compile time
<dustyweb>haskell / ML-ish lanugages
<janneke>dustyweb: do you have a (lambda (o <class>)) macro? i've been thinking of writing something like that
<dustyweb>janneke: oh interesting
<dustyweb>janneke: though in that case why not use match-lambda?
<janneke>we also need define-method-public ... those things make me wonder if any but you and I use GOOPS ;-)
<dustyweb>can generic methods really be used without being bound to a generic?
<dustyweb>you can use generics without defining them at a toplevel
<dustyweb>and I used such recently
<dustyweb>they're objects that can be passed around
<dustyweb>but you do need to append to them
<dustyweb>hence why I'm not sure how you'd do it with lambda
<janneke>hmm, I'm still scared of match-lambda prolly from the time i was scared by macros ... will have a look
<dustyweb>match-lambda is super nice and I use it all the time :)
<dustyweb>as for "more room for experimentation in generics"
<janneke>yeah
<dustyweb> http://groups.csail.mit.edu/mac/users/gjs/6.945/psets/ps03 and http://groups.csail.mit.edu/mac/users/gjs/6.945/psets/ps04 from http://groups.csail.mit.edu/mac/users/gjs/6.945/index.html
<dustyweb>are worth reading/exploring
<dustyweb>Sussman plays with a predicate-based generics system
<dustyweb>unfortunately making it fast means appending caching to an object
<m3tti>is it better to use define-record or could i use alists
<m3tti>or plists
<m3tti>cause i'm used to that kind of datastructure in javascript with json objects
<janneke>dustyweb: skimming through those pdf's...so "we"'re still experimenting...that's pretty amazing
<dustyweb>m3tti: you can always use what you choose; alists are easy to follow and serialize but their access is O(n)
<dustyweb>janneke: yes that class' problem sets are pretty incredible
<dustyweb>I wish I could take it
<janneke>also, i stopped watching wingo and guile master since 2.2.0; that was a mistake :-)
<janneke>yeah
<m3tti>and records or that goops
<m3tti>what are goops
<dustyweb>m3tti: GOOPS is an "object oriented" system for Guile; it's very similar to Common Lisp's CLOS
<dustyweb>m3tti: it's nice because it's very live hackable and provides generic methods
<dustyweb>m3tti: records are fast and minimalist, and (srfi srfi-9 gnu) provides immutable records
<dustyweb>m3tti: IMO if you don't know what you want:
<dustyweb> - want to explore as you go? start with GOOPS
<dustyweb> - know you need speed? use records
<dustyweb> - know you need immutability and speed? use immutable records
<dustyweb> - want minimalism? use alists
<m3tti>just wanted to know whats possible
<dustyweb>these days I start with GOOPS and refactor to something else if appropriate
<m3tti>i was used to alists
<dustyweb>alists work and are there for you if you want them
<m3tti>and currently i'm working on an card game
<dustyweb>m3tti: give GOOPS a try.. generic methods may save you a lot of work
<dustyweb>but!
<dustyweb>that's just a recommendation. do as you want!
<dustyweb>janneke: btw one way to do the predicate based dispatch would be to use object properties
<dustyweb>but!
<dustyweb>er, the caching for
<dustyweb>but I get a weird sense that nobody else uses object properties in guile :)
<dustyweb>also, checking a list of predicates is inherently linear I think, though could be organized to move "hot" predicates to the top
<dustyweb>on the trie
<janneke>dustyweb: i guess i have some affinity for minimalism, esp. because of developing mes
<janneke>i'm using a kind of goops--, and iwbn to have records++ grow towards that
<dustyweb>janneke: I think that's what's happening now :)
<janneke>assuming records++ is just a couple of macros that any simple scheme can run
<dustyweb>janneke: though! you could make predicate generics which are very minimalist
<dustyweb>I would think in < 100 SLOC
<janneke>yeah, i haven't really looked at that and stuck with records...
<dustyweb>and then you could use anything with them.. alists, goops, records
<janneke>iwbn to investigate that
<dustyweb>you can even use prime? as a check ;)
<dustyweb>granted then you *really* want caching ;)
<janneke>i actually wrote an extension to `match' that would transparently handle goops/records and `typed lists'
<dustyweb>oh! I read an interesting paper recently that suggested adding *macro* generics
<janneke>not unlike your serialization thingy '(type-symbol slot1 slot2 ...)
<dustyweb>so that match could be extensible :)
<dustyweb>janneke: so IMO that was pretty interesting
<janneke>hmm, macro generics ... whoa
<dustyweb>janneke: yes, I wish I could find the paper! I found it to be very interesting.
<dustyweb>and in fact it used match as an example of where generics would be useful
<dustyweb>and how without generics macros are very "rigid"
<dustyweb>ie you can't add the GOOPS matching example you suggested or any other new syntax without forking the pattern matcher
<cmaloney>(tzag)
<dustyweb>hi cmaloney
<cmaloney>How goes?
<dustyweb>cmaloney: ok! geting some client work done from the airport.
<cmaloney>Cool!
<cmaloney>Flying home or heading out to more fun?
<dustyweb>cmaloney: heading to Rebooting Web of Trust
<dustyweb>which should be a lot of fun
<dustyweb> https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust-fall2017/ look how many cool papers there are to read! :)
<cmaloney>dustyweb: Oh cool. So it's both business and pleasure :)
<dustyweb>cmaloney: yup :)
<cmaloney>That's awesome
<rekado>does anyone here have an idea what I can do to avoid problems with Guile compilation on a machine with 192 CPU cores and 1.5TB RAM?
<rekado>can I trick Guile into assuming fewer resources?
<rekado>I’ve already tried “taskset -c 0 …” to only allow it access to one CPU, but that didn’t help
<rekado>(this is related to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27476)
<stis>hej guilers!
<amz3`>1.5TB of RAM that's a lot...
<rekado>amz3`: it sure is!
<taylskid>wilo[m]:
<taylskid>wilo[m]: oh crap I'm sorry, I did not mean to highlight you