IRC channel logs

2018-03-26.log

back to list of logs

<manumanumanu>amz3: it is not a stream library. It is more general than that. You could for example just transduce a single value, which means you can re-use transducers. You could do a (compose (mapper 1+) (filterer odd?)) and not just use it to transduce a list, but also have it as a processing step just about anywhere, regardless of if it uses lists or vectors or anything like that
<mbakke>Noob question: how would I go about transforming a list like '("a" "b" "c") to '("a" "ab" "abc")?
<mange>Completely unhelpful, but in Clojure it could be (next (reductions str "" '("a" "b" "c"))). I can't see anything immediately that would help you do it in Guile.
<amz3>idk
<spk121>I came up with this, but it isn't pretty. You should be able to do something nicer with 'fold', maybe.
<spk121> https://paste.gnome.org/pvs6si4tv
<chrislck> https://pastebin.com/q4edB7zH works too
<mange>I played around with it briefly trying to use fold, and I struggled to come up with anything nice.
<mange>chrislck: Strictly that should probably use map-in-order (although in Guile they're the same thing, I believe).
<chrislck>well this is the first time I see map-in-order but, yes
<amz3>mbakke: that's 3, 2, 1-gram of "abc"
<amz3>but that said, on top of my head I don't know the algorithm
<chrislck>I can't believe it... 7 months after working through SICP+HtDP+TLS I'm now a graybeard :-o
<amz3>here is the answer to this question in python https://stackoverflow.com/q/17531684/140837
<amz3>i prefer spk121 answer
<amz3>because it doesn't rely on set!
<spk121>hmm. paste.gnome.org messed up my indentation.
<mbakke>Thanks for the answers :)
<guile-guest9>Hi, all. How can I obtain the type information of scheme array from c? I want to get the value of scheme array and put it to a math library, but first I need to know the type of array values.
<spk121>well, you first need to make sure that you created a 'typed array'. Then you can use scm_array_type(). It returns a 'vectag' like 'u32 or 'f64
<guile-guest9>Thanks, I read the doc about scm_array_type, but it didn't make it clear that what exactly is vectag and how can I read it from SCM type.
<spk121>if (scm_is_true (scm_eqv_p (scm_array_type (array), scm_from_latin1_symbol ('u32))) then /*use uint32_t */
<spk121>or something like that
<guile-guest9>Thanks, I will try it now. :)
<miqlas>Hi guys,
<miqlas>just reporting back: guile landed in HaikuDepot: http://kitchen.haiku-os.org/master/x86_64/logviewer.html?buildruns/1117/builds/10188.log
<miqlas>One can now install it trough our "appstore"
<davexunit>interesting!
<miqlas>it is a log from one of our builder bot. they taking the fresh recipes and building and packaging the softwares accordingly.
<miqlas>kein hexenwerk.
<civodul>neat
<civodul>s/guys/people/ BTW :-)
<civodul>what's the value of '%host-type' on Haiku?
<miqlas>civodul: how can i check it?
<miqlas>#guile %host-type ?
<miqlas>civodul: $1 = "x86_64-unknown-haiku"
<miqlas>my uname -a is : Haiku shredder 1 hrev51856 Mar 17 2018 14:24:19 x86_64 x86_64 Haiku
<miqlas>shredder is the default, btw
<civodul>cool
<civodul>what libc is it?
<miqlas>a standard c library?
<miqlas>Haiku have it in libroot, linked automatically against everything. I know that for sure, but nothing else actually.
<civodul>ok
<civodul>i mean it's not based on an existing libc, is it?
<miqlas>civodul: can i ask where this question comes from?
<civodul>curiosity :-)
<miqlas>afaik i haven't told anything about libc.
<civodul>ok, np :-)
<miqlas>independently, i got actually a problem with our libc (actually glibc) in fish, but i don't think it is relevant here.
<miqlas>Still fighting with debugger
<miqlas>lemme know if somebody can help, btw.