!cxPCiPlsXnajakSrqd:matrix.org

Array languages

885 Members
General discussion about APL-like array languages. See #array:matrix.org for other rooms23 Servers

Load older messages


SenderMessageTime
16 Jan 2025
@brodobree:matrix.org@brodobree:matrix.org left the room.22:32:53
18 Jan 2025
@_discord_718551566336000090:t2bot.iojam3943598 How is a two-pointers problem like https://leetcode.com/problems/container-with-most-water/description/ done in arraylang? 21:45:02
@_discord_1071186743283437599:t2bot.iojanmakoso I would approach this type of problem with an outer product 21:47:15
@_discord_1071186743283437599:t2bot.iojanmakoso You could use scans I believe 21:47:28
@_discord_768182477449592832:t2bot.iomiku.rb i remember seeing a blog post for this exact problem. i think it used a scan 21:47:35
@_discord_1071186743283437599:t2bot.iojanmakoso Not sure if it would work 100% without trying it 21:47:48
@mlochbaum:matrix.orgMarshall Maybe something like, for each column, find the leftmost taller (or equal) column using a max-scan and binary search. This will always include the maximal container if its shorter side is on the right. Do the same in the other direction and you have the answer. 22:01:07
@mlochbaum:matrix.orgMarshall bqn)
{βŒˆΒ΄π•©Γ—(↕≠𝕩)-(⌈`𝕩)⍋𝕩-1}{π”½βŒˆπ”½βˆ˜βŒ½} 1β€Ώ8β€Ώ6β€Ώ2β€Ώ5β€Ώ4β€Ώ8β€Ώ3β€Ώ7
22:06:48
@bqnbot:matrix.orgBQNBot Marshall 49 22:06:49
@dzaima:matrix.orgdzaima (bridge had dropped:)
South: i remember seeing a blog post for this exact problem. i think it used a scan
janMakoso: Not sure if it would work 100% without trying it
South: nevermind, it was for lc 42
polylokh: "Learn K, Idiom by Idiom" starts with this problem, https://nsl.com/k/training/idioms_K3.pdf
South: it also was not a blog post, it was on r/apljk https://www.reddit.com/r/apljk/comments/1axf4tk/leetcode_trapping_water_problem/
South: wow, this seems like a great resource
janMakoso: Uiua solution with outer product: /β†₯β™­Γ—/-Β°β‰Β°βŠ‘βŠžβ†§.
polylokh: yeah, it's a bit similar to aplcart with examples and commentary. https://aplcart.info/ does have some examples now, the 'play' button pulls an example up in tio.run.
22:10:18
@mlochbaum:matrix.orgMarshall (The 𝕩-1 is to get Bins to not count equal entries as greater, but it's a little unfortunate because it won't work on floats. Using βŒ½βŠΈβ’ and subtracting from ≠𝕩, which reduces to {βŒˆΒ΄π•©Γ—(β†•βŠΈ-≠𝕩)+(⌈`𝕩)βŒ½βŠΈβ’π•©}, avoids that problem.) 22:12:22
@mlochbaum:matrix.orgMarshall Trapping Rain Water isn't the same as this container thing, but I did a fast segmented version of that a few months back in the BQN channel. 22:15:35
21 Jan 2025
@_discord_226638098522570754:t2bot.iolkuty joined the room.17:01:28
@_discord_292750210755461121:t2bot.iohd3625 Guys I'm standing in the shower as we speak 20:04:32
@_discord_292750210755461121:t2bot.iohd3625 Having a shower thought, what is some good knowledge a array programmer should have? 20:05:07
22 Jan 2025
@_discord_768182477449592832:t2bot.iomiku.rb changed their profile picture.00:10:12
@hermetian:matrix.orghermetianGenerally more specific questions are more likely to catch people’s attention. What have you been using array languages for?09:44:39
@loke:dhsdevelopments.comloke hermetian: as a calculator 09:47:21
@hermetian:matrix.orghermetian Heh. This was meant as a response to hd3625’s question. Oh, was this discussed already? 09:48:37
@loke:dhsdevelopments.comlokeOh I see09:48:58
@_discord_292750210755461121:t2bot.iohd3625 I wanted to try testing out the using for graphics programming 11:41:55
@_discord_292750210755461121:t2bot.iohd3625 Using OpenGL or whatever libraries are available 11:42:28
@_discord_292750210755461121:t2bot.iohd3625 I think array programming has uses far outside math in practical applications 11:43:35
@_discord_292750210755461121:t2bot.iohd3625 Like using the language to calculate everything and doing certain idk how to do in BQN using the C FFI and pass through functions I wouldn't know how to create in the language 11:44:34
@_discord_671689100331319316:t2bot.iobrian_e that's basically what rayed-bqn is for, the graphics lib i'm making in bqn 11:45:07
@_discord_671689100331319316:t2bot.iobrian_e [link](https://github.com/Brian-ED/rayed-bqn) 11:46:16
@_discord_292750210755461121:t2bot.iohd3625 I see your library and would love to use it when I'm not so fresh πŸ˜… in the space 11:46:17
@_discord_671689100331319316:t2bot.iobrian_e sure 11:46:28
@_discord_292750210755461121:t2bot.iohd3625 I don't think I can do something like fizz buzz yet 11:46:31
@_discord_292750210755461121:t2bot.iohd3625 I'm gonna try today 11:46:59

Show newer messages


Back to Room ListRoom Version: 6