***apteryx_ is now known as apteryx
<topoi>When using (string-match "\." ".") I get the error "illegal character in escape sequence: #\." - doesn't "." need to be escaped with "\"? <topoi>^-- Ohh, nevermind; "\" itself has to be escaped. ; ) <apteryx>any idea why waiting for a pid from Shepherd's fork+exec-command (from the (shepherd service) module) takes multiple seconds? ,time (let ((pid (fork+exec-command '("sh" "-c" "echo 'hello!'")))) (waitpid pid)) --> ;; 2.436732s real time, 0.013448s run time. 0.000000s spent in GC. <apteryx>2.43 s to fork a shell and print hello, every time <ahungry>clojure ecosystem, having all of maven/the jvm available, and npm/nodejs, is quite a bit bigger. Syntax wise, I like clojure, but guile/scheme has some beauty in it's simplicity <alextee>being able to use java libraries sounds pretty nice <daviid>alextee: if that's what you want, then imo, kawa is much better then clojure - here i just wanted to point 'to the existence of lokke' <alextee>thanks, I'm just looking for a web dev language to learn and stumbled upon clojure. I think I'll focus on the popular ones that have more support, like clojure. guile seems like it's great for C integration but I'm not sure how powerful it is for web dev (considering there's not too many popular libraries) <flatwhatson>any thoughts about vectorization/SIMD support for guile? i guess it would need to start with teaching lightening to emit the instructions? <leoprikler>apteryx: it looks like you're setting up a shell within a shell, how long would it take to just run "echo hello"? <apteryx>the hello comes out quickly but the waitpid seems to linger <emestee>what'd be the nicest way to represent two dimensional coordinates? '(x y)? (x . y)? <RhodiumToad>(x . y) is one cell while (x y) is two, so there's some advantage in the first; but a record might be preferable <b4285>a list is a container for isomorphic element, so i'd go with tuples, i.e. (x . y) <b4285>i don't know what i am talking about, shouldn't use the word "isomorphic" <RhodiumToad>there's probably a good argument for using immutable records for something like that <taw10>Arguably it doesn't matter, because the real representation should be abstracted away anyway? Start with a single cons cell, then switch to something like a GOOPS class if/when you realise that you want to have other ways of accessing the value, e.g. polar coordinates (c.f. SICP section 2.4)? <RhodiumToad>hmm. the docs say that immutable records can't be mutated even via struct-set!, but the code says they can be <RhodiumToad>define-immutable-record-type is a bit simpler than defining your own set of abstract accessors for a cons cell <RhodiumToad>of course for two dimensions you could also just use a complex number <ArneBab>emestee: '(x . y) uses less memory than '(x y) or a two-element record, you might want to benchmark (1 . 2) and the record. <ArneBab>,time (let loop ((s 100000000) (v '(1 2 3 . 4))) (when (not (zero? s)) (cdr (cdr (cdr v))) (loop (- s 1) v))) <ArneBab>(define-record-type <v> (v a b c d) v? (a va) (b vb) (c vc) (d vd)) <ArneBab>,time (let loop ((s 100000000) (vt (v 1 2 3 4))) (when (not (zero? s)) (va vt) (loop (- s 1) vt))) <ArneBab>emestee: '(x . y) uses less memory than '(x y) or a two-element record, you might want to benchmark (1 . 2) and the record. <ArneBab>,time (let loop ((s 100000000) (v '(1 2 3 . 4))) (when (not (zero? s)) (cdr (cdr (cdr v))) (loop (- s 1) v))) <ArneBab>lampilelo: if it had been more lines, I would have. for 4 lines I prefer having them in the history <emestee>thanks I am going to experiment with this <emestee>I assume cdr for a tuple would be slightly faster too? <chris>emestee: profiling is the only way to answer. guile devs will usually optimize code iff profiling supports it. <chris>mostly you'd be better off using a srfi-9 record <ArneBab>emestee: (cdr '(a . b)) => b; (car (cdr '(a b)) => b ; that is the speed difference ***mattrw is now known as mwette
***zap1 is now known as zap
<lampilelo>IF it's confirmed to work, seems like a no-brainer, the person that posted it will probably use it ***even2 is now known as even
<dsmith>lampilelo: Never heard of arc before. Is it old? ***KindOne_ is now known as KindOne
***KindOne_ is now known as KindOne
<apteryx>what could couse such autoload failures? ;;; Failed to autoload %precious-signals in (shepherd service): <apteryx>;;; In procedure resolve-interface: no binding `%precious-signals' in module (shepherd service) <sneek>Welcome back civodul, you have 2 messages! <sneek>civodul, apteryx says: hey! I was wondering what happens with autoloaded modules w.r.t. to 'source-module-closure'? Seems they might not be added? I've been debugging a problem when I lazy bind (shepherd service) and something seems amiss. <sneek>civodul, apteryx says: ah, I see extract-dependencies in (guix modules) has a case to cover #:autoload <civodul>apteryx: that suggested the (shepherd service) module that was loaded lacks '%precious-signals' <civodul>maybe because it comes from an older version? <civodul>'source-module-closure' takes #:autoload into account <apteryx>could be, I'm replaying a service start slot 'by hand' with my root user, it's not exactly a tightly controlled environment <civodul>note the default #:select? of source-module-closure, though <civodul>the qemu syntax for port forward is terrible <apteryx>the qemu syntax *for anything* I'd add ;-) <apteryx>it seems purely designed as the low-level engine of higher level interfaces such as virt-manager, and it shows <civodul>(funnily, both started by the same person :-)) <civodul>so i'd copy the syntax from our <virtual-machine> code <apteryx>perhaps QEMU is sensitive to the order in which options are given