!laJBzNwLcAOMAbAEeQ:matrix.org

k

423 Members
Discussion about the various k languages14 Servers

Load older messages


SenderMessageTime
27 Jan 2023
@_discord_862741749276606524:t2bot.ioOmar Antolín It's "while x is odd apply the non-function 0 to x". 18:41:32
@_discord_136969229730709504:t2bot.ioYkulvaarlck#2329 doesn't 0/ try decoding as base 0 or something 18:41:36
@_discord_136969229730709504:t2bot.ioYkulvaarlck#2329 hold on 18:41:38
@_discord_862741749276606524:t2bot.ioOmar Antolín So, if x is even the while loop doesn't run at all. If x is odd, you get an error when you try to call 0 as if it were a function (with argument x). 18:41:40
@_discord_624974820840308737:t2bot.ioColTim#5847 hmm, that must be it, even if there's the int\x or intList\x "verby" overloads 18:41:42
@_discord_136969229730709504:t2bot.ioYkulvaarlck#2329 ngn/k isn't even working for me right now 18:41:47
@_discord_136969229730709504:t2bot.ioYkulvaarlck#2329 i can't tell what's not loading correctly 18:41:49
@_discord_136969229730709504:t2bot.ioYkulvaarlck#2329image.png
Download image.png
18:42:19
@_discord_136969229730709504:t2bot.ioYkulvaarlck#2329 magically fixed itself on the 7th reload 18:42:48
@_discord_862741749276606524:t2bot.ioOmar Antolín Yay, I got it right! 18:43:32
28 Jan 2023
@_discord_624974820840308737:t2bot.ioColTim#5847 I wonder if there are actual uses for a do/while version of a "verby" adverb overload 00:07:52
@_discord_624974820840308737:t2bot.ioColTim#5847 like converting a list to a same-length string of spaces with 1" "/list 00:10:33
@_discord_624974820840308737:t2bot.ioColTim#5847 * like converting a list to a same-length string of spaces with 1""/list 00:10:55
@_discord_624974820840308737:t2bot.ioColTim#5847 that could be a fun code golf prompt... 00:11:32
@_discord_624974820840308737:t2bot.ioColTim#5847 or (1)0 0/list to get back a list of 0Ns 00:15:03
@_discord_624974820840308737:t2bot.ioColTim#5847 ha! found a fun parsing bug I guess 00:15:58
@_discord_624974820840308737:t2bot.ioColTim#5847 45 60 1.0 versus 45 60 1.0 00:16:06
@dzaima:matrix.orgdzaima you sure that's not a feature? :) 00:16:44
@_discord_624974820840308737:t2bot.ioColTim#5847 I don't wanna know! 00:18:15
@_discord_624974820840308737:t2bot.ioColTim#5847 0 1.0 2 is another example where changing the number of spaces on either side of the 1.0 changes the result 00:18:33
@_discord_624974820840308737:t2bot.ioColTim#5847 I guess it's like, if the left-most part of the strand (prior to the first double/multiple space) is parseable as a floating point list it works 00:23:18
@_discord_624974820840308737:t2bot.ioColTim#5847 e.g. 0 1.0 2 3.0 4.0 5, where 0 1.0 is parsed as a floating point list on its own. all the stuff to the right then also gets parsed as part of the strand 00:23:53
@_discord_624974820840308737:t2bot.ioColTim#5847 but if the left most part (prior to the first double/multiple space) is just integers, if something after contains a floating point number, it'll break 00:24:20
@_discord_624974820840308737:t2bot.ioColTim#5847 this is still beaten by ""?x though, sad 00:26:58
@_discord_613847106993782835:t2bot.ioGarklein#9297 is there a way to use ngn/k to run a script coming from stdin? 01:48:51
@_discord_613847106993782835:t2bot.ioGarklein#9297 is there a general way to do that on linux without having to save the script to a temporary file? 01:50:30
@_discord_687763954050793501:t2bot.ioRaul (Miller) In this context, how is "running interactively" different from "running a script coming from stdin"? 01:56:05
@_discord_687763954050793501:t2bot.ioRaul (Miller) (In other words, I think the basic difference is prompting, and I think that it should not prompt when stdin is not a tty.) 01:56:53
@_discord_687763954050793501:t2bot.ioRaul (Miller) (but I'm not in a position to test this right now, and I might have overlooked something) 01:58:00
@dzaima:matrix.orgdzaima generally, there is foo <(bar) to pipe the result of bar into a temp pseudo-file and provide a path to that as an argument to foo, but it seems bar can't read from stdin, nor does ngn/k like such a pseudo-file source arg, so this is entirely useless here 01:59:29

There are no newer messages yet.


Back to Room List