!EjsgbQQNuTfHXQoiax:matrix.org

BQN

678 Members
The BQN array programming language, an APL descendant33 Servers

Load older messages


SenderMessageTime
1 Jun 2023
@_discord_724421839924756480:t2bot.ioelcaro It is... I'm really just comparing array langs to things like Numpy (addition in this specific case). I've never had much exposure to Numpy, so it's interesting.
eg. doing something like 1‿2+(2‿3‿4⥊0) in Numpy requires the shapes match, like array([[[1]],[[2]]]) + zeros([2,3,4]) (or you can create additional nestings, eg. array([1],[2])[:, newaxis])
Is this what is truly meant as "rank polymorphism"? I know some people often refer to it when showing, eg. 1 + 1‿2‿3‿4‿5, which I think is often referred to as "broadcasting"
00:13:51
@_discord_724421839924756480:t2bot.ioelcaro * It is... I'm really just comparing array langs to things like Numpy (addition in this specific case). I've never had much exposure to Numpy, so it's interesting.
eg. doing something like 1‿2+(2‿3‿4⥊0) in Numpy requires the shapes match, like array([[[1]],[[2]]]) + zeros([2,3,4]) (or you can create additional nestings, eg. array([1],[2])[:, newaxis])
Is this what is truly meant as "rank polymorphism" in BQN et al? I know some people often refer to it when showing, eg. 1 + 1‿2‿3‿4‿5, which I think is often referred to as "broadcasting"
00:15:06
@mlochbaum:matrix.orgMarshall In APL or J the only difference between a plain number and a list is the rank; that use doesn't make as much sense in BQN because they have different types (for (<1) + 1‿2‿3‿4‿5 it would). 00:16:28
@mlochbaum:matrix.orgMarshall It's definitely true that + is rank polymorphic, and changing the right argument rank/shape in 1‿2+(2‿3‿4⥊0) shows that. 00:19:17
@dzaima:matrix.orgdzaima rank polymorphism is a property of a function that can only be observed by multiple different invocations of it; so e.g. 1‿2 + 3‿2⥊4 itself doesn't display rank polymorphism, but that along wih 1‿2 + 4‿3‿2⥊4 does, as it displays that + doesn't have just one set of argument ranks that it can accept 00:23:53
@dzaima:matrix.orgdzaima(the question gets slightly more complicated in statically-typed languages)00:24:27
@_discord_724421839924756480:t2bot.ioelcaro Thanks, that first sentence makes perfect sense...
but those 2 examples you posted don't work?
00:26:15
@dzaima:matrix.orgdzaimaoh duh, wrote the shapes in reverse00:26:36
@_discord_724421839924756480:t2bot.ioelcaro OK... got it 00:27:18
@dzaima:matrix.orgdzaima(am typing on phone about to go sleep, can't be bothered to test things or think properly)00:29:16
@_discord_724421839924756480:t2bot.ioelcaro All good 00:29:29
@_discord_275096085981298703:t2bot.iozyx thanks a lot. i'll give the windows terminal preview a look, and the header solution is clever. i'll try that too 03:30:26
@_discord_671689100331319316:t2bot.ioBrian E#0926 compiling worked with a warning and some env-var stuff printing.
after moving the dlls to the same directory as the bqn.exe, when i run bqn test.bqn (test.bqn containing a hello world program) it just stalls for like 10 seconds and then stops.

i need to stop now though, i need to get ready for a driving test soon! only a fake test for training, not the actual last one.
12:49:31
@dzaima:matrix.orgdzaima presumably you're not on the develop branch, which should be better? 12:50:38
@_discord_671689100331319316:t2bot.ioBrian E#0926 ahhh i am not. i am on master. i'll test that on the bus ride in about an hour 12:51:06
@_discord_671689100331319316:t2bot.ioBrian E#0926 tested develop branch, and still same issue.
when using bqn it does nothing, doesn't even allow typing into the command prompt for about 10 seconds and then the process stops. when using bqn test.bqn same thing, locks up for about 10 seconds and then stops, with no output. i made sure test.bqn has lf line endings.
14:01:41
@_discord_671689100331319316:t2bot.ioBrian E#0926 wait... it works on powershell! 14:02:21
@_discord_671689100331319316:t2bot.ioBrian E#0926 both work on powershell, not on cmd 14:02:39
@_discord_671689100331319316:t2bot.ioBrian E#0926 oh nevermind! powershell just reaches for the enviroment variable global bqn instead of the local one... so ./bqn test.bqn still same issue and same with ./bqn 14:03:44
@_discord_671689100331319316:t2bot.ioBrian E#0926 * oh nevermind! powershell just reaches for the enviroment variable global bqn instead of the local-folder one... so ./bqn test.bqn still same issue and same with ./bqn 14:03:58
@dzaima:matrix.orgdzaima does ./bqn --help do anything? 14:15:26
@_discord_671689100331319316:t2bot.ioBrian E#0926 it locks up too 14:27:01
@_discord_671689100331319316:t2bot.ioBrian E#0926 i said earlier that they all lock up for about 10 seconds but rn they're consistently delaying for 3 seconds. idk if that helps. 14:28:17
@_discord_671689100331319316:t2bot.ioBrian E#0926 and this applies to all 3 commands that I've tested. 14:29:01
@dzaima:matrix.orgdzaima presumably some crash handler running 14:29:09
@dzaima:matrix.orgdzaima oh, I call cbqn_init(); at the start of main before the arg parsing anyway if replxx is enabled, so if something there is to blame, it'd be hit anyway. I guess if that's the case, it'd be worth trying to build without replxx, but I don't really think that'd help 14:29:59
@_discord_671689100331319316:t2bot.ioBrian E#0926 i'll try 14:46:48
@_discord_671689100331319316:t2bot.ioBrian E#0926 oh i may be stupid. i didn't move the newly built bqn.exe into the test folder 14:50:59
@_discord_671689100331319316:t2bot.ioBrian E#0926 oh yay it works!! 14:53:14
@dzaima:matrix.orgdzaimajust got it working in a windows vm too14:53:54

There are no newer messages yet.


Back to Room ListRoom Version: 6