On Fri, Jan 15, 2021 at 08:13:58PM +0100, Davide BERTOLOTTO wrote:
> In a more functional way:
Oh, I see! The original question was about pipes. Directly in Lisp it is of
course easier. I would use 'replace':
(sort
(in "5.input"
(make
(while (line)
Thank you Alexander for the quick and detailed answer and Davide for
the repository link.
For day 5 my try using Alexander's advice is:
(in '(sh "-c" "tr FBLR 0101 < 5.input | sort -r")
(let N (bin (line T))
(prinl "Part one " N)
(loop
(NIL (= (dec 'N) (bin (line T)))
(prinl "Part two
January 15, 2021 7:21 PM, "Christos Gitsis" wrote:
>
> Is there a way to do this and get the result:
> -> ("0001110111" "1000110111" "1100110100")
> ?
https://envs.sh/BF.l
This is my code how i *feel* this task.
(mike)
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
In a more functional way:
(de proc-char (C)
(case C
("B" 1)
("R" 1)
("F" 0)
("L" 0)))
(de proc-str (S)
(pack (mapcar 'proc-char S)))
(de proc-file (F)
(let Inp (filter 'and (split (in F (till)) "\n"))
(mapcar 'proc-str
Hi Christos,
> $ tr FBLR 0101 < 5.input # or cat 5.input | tr FBLR 0101
This could be
(pipe
(in "5.input"
(out '(tr "FBLR" "0101") (echo)) )
(make
(until (eof)
(and (line T) (link @)) ) ) )
> And finally I want to add one more preprocessing step,
Hello,
I am learning picolisp and in the context of solving an exercise (from
Advent of Code 2020) I have stumbled upon this question.
Given an input file named 5.input with contents:
BFFFBBFRRR
FFFBBBFRRR
BBFFBBFRLL
Say I read the contents into a list with e.g.
: (in "5.input"
(make
Whats is llvm version?
> On Jan 15, 2021, at 08:03, Henrik Sarvell wrote:
>
>
> Hi Alex,
>
> I'm trying to compile newest PicoLisp but get this:
>
> henrik@henrik-tuf:/feting/Downloads/picoLisp-21.1/pil21/src$ make
> Intrinsic has incorrect argument type!
> void (i8*, i8*, i64, i1)*
Hi all,
short reminder of tomorrow's PilCon :)
As ever on a third Saturday, let's meet at 16:00 UTC on
https://meeting.itship.ch/PilCon
☺/ A!ex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe