00:02:49 -!- tromp has joined. 00:02:51 -!- imode1 has quit (Ping timeout: 240 seconds). 00:03:10 -!- imode has joined. 00:03:21 -!- bradcomp has quit (Ping timeout: 240 seconds). 00:07:54 -!- tromp has quit (Ping timeout: 272 seconds). 00:10:07 fungot: YEOOIIOOIOA 00:10:08 arseniiv: where? i only see 5 00:10:33 fungot: there's more 00:10:33 arseniiv: ok then... seems udage is turing tarpit. power and expressiveness are independent. 00:13:26 YEOOIIOOIOA??? 00:15:18 -!- arseniiv has quit (Ping timeout: 256 seconds). 00:19:17 -!- erkin has quit (Remote host closed the connection). 00:53:17 -!- xkapastel has quit (Quit: Connection closed for inactivity). 00:55:33 How would I implement seeking for a specific ecliptic longitude of a body (or of a Arabic Part)? 00:56:47 -!- aloril has quit (Ping timeout: 244 seconds). 00:59:06 -!- imode has quit (Quit: WeeChat 2.2). 00:59:52 -!- xkapastel has joined. 01:00:50 -!- aloril has joined. 01:07:47 (Arabic parts have three parameters (called the "personal-point", "significator", and "trigger"). Some use rulers, lords, houses, constants, dispositors, and other Arabic parts, as their parameters. I do not intend to implement any other than the bodies that swe_calc() can calculate, as well as the Asc, MC, and constants 0 Aries and 0 Libra. Note that if the "personal-point" is held constant, you are effectively seeking an aspect.) 01:09:44 (Also, many use reversals, and some use stranger things such as "Lord of New or Full Moon Prior to Birth", "Cusp of House Uranus Occupies", "Use Jupiter if Saturn is combust", "Asc + Moon - (Sun + 144 + Pi)", etc. I don't know what most of these mean, and I also don't care and do not intend to implement any of these things.) 01:15:03 -!- Stryyker12 has joined. 01:15:18 -!- Stryyker12 has quit (Remote host closed the connection). 01:25:27 -!- ais523 has quit (Remote host closed the connection). 01:26:40 -!- ais523 has joined. 01:38:59 -!- benoliver99925 has joined. 01:39:52 -!- benoliver99925 has quit (Killed (Sigyn (Spam is off topic on freenode.))). 01:44:11 -!- boily has quit (Quit: IMPORT CHICKEN). 01:50:42 -!- tromp has joined. 01:55:47 -!- tromp has quit (Ping timeout: 268 seconds). 02:08:24 I don't like W3C's "Secure Contexts". I read a definition it is one of the four: * An origin using an authenticated scheme (https: or wss:) * An origin on the local computer using IP addresses in 127/8 (IPv4) or ::1/128 (IPv6) * An origin on the local computer using a scheme that the browser considers authenticated (file: and possibly packaged browser extensions) * An origin that the user has "configured as a trustworthy origin", through a us 02:08:48 My own opinion is that only the last one should be considered as a trustworthy origin and the others should not be. 02:27:14 [[Arrows]] https://esolangs.org/w/index.php?diff=57310&oldid=57308 * HereToAnnoy * (+1338) Langauge update (also, is there a grid table or do I have to make really long wikitables every time a program is written in this?) 02:27:42 [[Arrows]] M https://esolangs.org/w/index.php?diff=57311&oldid=57310 * HereToAnnoy * (+13) everytime i finish something 02:46:05 -!- u0_a101 has quit (Ping timeout: 240 seconds). 02:49:08 -!- u0_a101 has joined. 02:50:15 -!- ais523 has quit (Remote host closed the connection). 02:51:29 -!- ais523 has joined. 03:38:33 -!- tromp has joined. 03:42:57 -!- tromp has quit (Ping timeout: 240 seconds). 03:46:23 -!- nero7 has joined. 03:46:48 -!- nero7 has quit (Killed (Sigyn (Spam is off topic on freenode.))). 04:05:27 -!- ais523 has quit (Quit: quit). 04:08:43 -!- sleepnap has left. 04:33:16 -!- tromp has joined. 04:37:24 -!- tromp has quit (Ping timeout: 244 seconds). 04:42:50 -!- Nakato has joined. 04:43:09 -!- Nakato has changed nick to Guest27715. 04:44:31 -!- Guest27715 has quit (Remote host closed the connection). 05:27:09 -!- tromp has joined. 05:29:17 -!- ProClifo has joined. 05:32:10 -!- tromp has quit (Ping timeout: 272 seconds). 05:33:53 -!- ProClifo has quit (Ping timeout: 248 seconds). 05:44:57 -!- bads has joined. 05:45:21 -!- bads has changed nick to Guest55883. 05:46:41 -!- Guest55883 has quit (Remote host closed the connection). 06:34:28 -!- S_Gautam has quit (Quit: Connection closed for inactivity). 06:37:35 -!- jeggott0 has joined. 06:38:42 -!- tromp has joined. 06:39:06 -!- jeggott0 has quit (Remote host closed the connection). 06:43:13 any thoughts on baseline syntax needed for a relatively useful out-of-the-box language? I'm thinking var declaration/assignment, arithmetic ops, conditional evaluation, some kind of collection, functions, parens for eval order... 06:43:21 -!- tromp has quit (Ping timeout: 240 seconds). 06:43:43 braces for block scope, function bodies, loops, conditional eval 06:44:11 comparison ops 06:45:10 datatypes maybe bool, number, string, collection, function 06:46:38 any of that unneccessary? anything important missing? 06:49:02 i'm shooting for something reasonably expressive and multi-paradigm, pleasant to use, not something crazy like bf 06:54:05 ...but at the same time as minimal as it can be, for example one kind of loop should be enough (probably a while loop), and one kind of collection (maybe like lua's table?) 07:14:04 -!- erdic has quit (Ping timeout: 256 seconds). 07:14:56 -!- erdic has joined. 07:23:17 -!- xkapastel has quit (Quit: Connection closed for inactivity). 07:32:22 -!- S_Gautam has joined. 07:38:29 -!- tromp has joined. 07:48:36 I think you should need macros and byte arrays. And then is probably good enough I suppose 07:48:59 You might not need boolean type though, but perhaps can help to have null 08:13:31 zzo38: are you thinking preprocessor macros, or something else? 08:14:18 null is a good idea, can probably do away with booleans, null will be falsey and everything else truthy 08:18:33 Yes, that can work. Null is false and everything else can be true. About macros, I thought they could be either preprocessor macros or perhaps dynamic macros (depending on how the rest of the programming language is working); you don't need both 08:25:06 -!- XorSwap has quit (Quit: the creeping crawling chaos will return.). 08:25:24 I believe you though that one kind of loop will be enough (probably a while loop), and one kind of collection. Possibly the suitable flow-controls can be: if/else, while, goto, and return; nothing else is needed I think. I don't know what is you think though; you can figure out what you like to do it. 08:28:14 -!- erdic has quit (Ping timeout: 272 seconds). 08:28:48 -!- erdic has joined. 08:33:58 -!- erdic has quit (Ping timeout: 260 seconds). 08:40:34 -!- erdic has joined. 08:41:35 -!- DrJ23 has joined. 08:42:33 -!- DrJ23 has quit (Remote host closed the connection). 08:58:32 zzo38: i think you're right... not sure if goto is needed, but probably either goto or break/continue 08:58:56 should be a way to break out of loops without return 09:00:00 it makes me wonder if loops are really necessary, maybe something like a self-recursive function instead 09:01:10 -!- GeekDude has quit (Ping timeout: 256 seconds). 09:03:55 -!- GeekDude has joined. 09:05:13 Perhaps, but while and goto (and if/else and return) can make it convenient to program, even though they are not strictly needed. 09:06:30 yeah, for sure 09:08:49 zzo38: sent you a link :) 09:10:20 -!- SopaXorzTaker has joined. 09:11:41 -!- Guest74037 has joined. 09:16:22 -!- Guest74037 has quit (Ping timeout: 272 seconds). 09:26:56 -!- tromp has quit (Remote host closed the connection). 09:39:03 -!- jwhisnant21 has joined. 09:39:36 -!- jwhisnant21 has quit (Killed (Sigyn (Spam is off topic on freenode.))). 09:41:57 -!- S_Gautam has quit (Quit: Connection closed for inactivity). 09:46:09 -!- S_Gautam has joined. 09:51:50 -!- erdic has quit (Ping timeout: 272 seconds). 09:53:56 -!- atslash has joined. 10:04:14 -!- erdic has joined. 10:04:58 -!- GeekDude has quit (Ping timeout: 244 seconds). 10:06:24 -!- tromp has joined. 10:07:29 -!- tromp has quit (Remote host closed the connection). 10:07:45 -!- tromp has joined. 10:07:47 -!- GeekDude has joined. 10:08:35 -!- erdic has quit (Ping timeout: 244 seconds). 10:31:17 -!- erkin has joined. 10:44:26 -!- Random2 has joined. 10:46:34 -!- Random2 has quit (Remote host closed the connection). 11:00:59 -!- erdic has joined. 11:23:50 -!- vans12 has joined. 11:30:13 -!- vans12 has quit (Ping timeout: 244 seconds). 11:54:29 -!- wob_jonas has joined. 12:00:41 u0_a101: you can try to look at https://esolangs.org/wiki/Mouse or ... uh, there was some low-level language intended to be used as an embedded language that can directly access the memory space of the parent process and with like five types of registers and three-letter commands. 12:01:28 zzo38: what was that latter language and wasn't it one of yours? 12:10:54 https://esolangs.org/wiki/CLCLC-INTERCAL WTF, a dialect of Intercal without the unary bitwise operators? that's so strange 12:32:04 -!- SopaXorzTaker has quit (Remote host closed the connection). 12:33:08 -!- arseniiv has joined. 12:38:54 idea UTF-0 UTF-1 12:51:37 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client). 12:59:35 -!- erdic has quit (Ping timeout: 240 seconds). 13:03:20 how would you make that 13:03:49 unary would be easy but stupid, but utf-0? 13:11:32 UTF--1+i 13:11:51 -!- erdic has joined. 13:11:58 -!- SopaXorzTaker has joined. 13:12:12 Taneb: (rofl) 13:13:17 -!- xkapastel has joined. 13:47:39 -!- MDude has quit (Ping timeout: 244 seconds). 13:52:07 -!- BenLand100 has joined. 13:55:35 -!- BenLand100 has quit (Remote host closed the connection). 14:18:40 -!- ForexTrader has joined. 14:19:01 -!- ForexTrader has quit (Killed (Sigyn (Spam is off topic on freenode.))). 14:24:36 -!- SopaXorzTaker has quit (Remote host closed the connection). 14:32:21 -!- Metacity13 has joined. 14:32:49 -!- Metacity13 has quit (Remote host closed the connection). 15:17:23 There was an UTF-1, but it wasn't 1 as in "one bit", it was 1 as in "first". It's an appendix in the original (1993) ISO-10646, it's a multibyte encoding somewhat similar to UTF-8 except worse. 15:19:56 `quote worse 15:19:57 350) elliott: actually, it's worse right now, I'm in the USA where the solution to counterfeiting problems is "add more ink" eventually all US bills will just be solid green \ 385) No nasty sounds for a while now. Going to turn off and on and see if the numbers get worse. \ 524) You know how the arrow pierces your skin, rearranging and randomizing vital internal structure? Monads are like that, only 15:20:31 `quote 524 15:20:31 524) You know how the arrow pierces your skin, rearranging and randomizing vital internal structure? Monads are like that, only worse. 15:20:44 so much hate 15:23:42 (( 15:24:18 I’ll never try burritos then 15:24:27 if monads are also like them 15:25:35 -!- AnotherTest has joined. 15:30:47 Burritos and monads are both quite nice 15:31:07 I wouldn't want to confuse the two. 15:31:08 Although I tend to overfill them 15:31:17 And that just ends up messy 15:33:17 You should try to not have too many at the same time, too, to avoid bloat 15:39:10 So to paraphrase, monads are like burritos; if you stack them too high, the result is inevitably a mess? 15:39:26 Yes 15:39:46 Also a burrito inside a burrito is sometimes but generally not a burrito itself! 15:59:15 is there a ListT burrito which wasn’t done right until some time in the past? 16:12:10 Cale knows all about that I believe 16:31:33 -!- steveeJ20 has joined. 16:35:45 -!- steveeJ20 has quit (Ping timeout: 248 seconds). 16:46:34 Yeah, the ListT in MTL was (and is) incorrect. 16:47:01 wait, really? 16:47:22 rofl 16:48:00 Yeah, the things it produces are not law-abiding monads unless the monad you give it is commutative, which few monads are. 16:49:26 XD 16:49:28 amazing 16:54:55 -!- majestic25 has joined. 17:00:26 -!- majestic25 has quit (Ping timeout: 256 seconds). 17:05:31 how common is it for someone to make a monad named Nock for the lulz? 17:05:44 -!- sebbu2 has joined. 17:08:38 What is such monad meaning? 17:08:56 -!- sebbu has quit (Ping timeout: 256 seconds). 17:14:18 @google "you could have invented hylomorphisms" 17:14:19 No Result Found. 17:14:29 @google google 17:14:30 https://www.google.com/ 17:28:29 zzo38: its up to you to decide that. sometimes, there are names in want of things. 17:35:43 `? zzo38 17:35:44 zzo38 is not actually the next version of fungot, much as it may seem. 17:35:52 fungot: oh 17:35:53 int-e: i tried /topic in a .c file and see what happens :) they are probably talking more like 100 lines here, and then ' fnord' :p. but that doesn't help 17:36:30 (I have not "chatted" with fungot in a while) 17:36:31 int-e: where is the acid? where is it? bye! 17:36:45 fungot: why are you leaving so soon? 17:36:46 int-e: where is lisppaste? i've posted this before i do, be lazy and not check for the extent of your mathematical background. the 1st chapter of sicp. 17:51:19 fungot: I know where the acid is but I won’t tell you :P 17:51:19 arseniiv: are *all* concatenative languages functional? ( no, i'm sure) 17:51:20 -!- MDude has joined. 17:52:17 it's so surreal when fungot almost makes sense 17:52:18 int-e: well the exercise does describe named let adequately i think?) for the ' most jewish' towns in the red river valley, austin, and state indices could be stored 17:53:22 fungot: btw have you gained conscience already 17:53:23 arseniiv: well i could find about it online. but for people who are technically freelancers, but always doubted they really exist in simple examples. :( 17:53:39 yes 17:58:51 -!- ErrantEgo0 has joined. 18:00:42 -!- ErrantEgo0 has quit (Remote host closed the connection). 18:01:12 -!- variable has joined. 18:06:35 -!- SopaXorzTaker has joined. 18:06:52 fungot: как ты относишься к кириллице? 18:06:53 arseniiv: i've heard minion is perpetually disgruntled." i have quite a nice learning environment... 18:07:24 I feared it’d be worse 18:09:48 -!- erkin has quit (Remote host closed the connection). 18:14:19 arseniiv: it might be if fungot actually took context into account 18:14:19 int-e: was that a question in " the call/ cc's 18:27:14 -!- variable has quit (Quit: Found 1 in /dev/zero). 18:31:08 -!- Sgeo__ has joined. 18:35:14 -!- Sgeo_ has quit (Ping timeout: 276 seconds). 18:35:52 -!- Sgeo_ has joined. 18:38:57 -!- Sgeo__ has quit (Ping timeout: 240 seconds). 18:49:29 -!- Cale has quit (Read error: Connection reset by peer). 18:53:02 Are you good at the computer game I put on here a while ago? 19:02:35 -!- xset has joined. 19:02:57 -!- xset has quit (Killed (Sigyn (Spam is off topic on freenode.))). 19:15:00 -!- imode has joined. 19:16:40 high score 80 in the default mode... I don't think that's good 19:18:04 zzo38: where to find it? 19:20:33 http://zzo38computer.org/GAMES/MEGAPANE.ZIP 19:22:47 .exe :( 19:27:33 runs in dosbox 19:27:58 it's quaint 19:33:17 I will add some more options later 19:33:36 -!- atslash has quit (Quit: This computer has gone to sleep). 19:47:48 -!- SopaXorzTaker has quit (Remote host closed the connection). 19:56:41 int-e: zzo38: 35! 19:57:00 also, basic, really? :o 19:57:53 arseniiv: are you complaining because it's not esoteric enough? :P 19:58:21 no, no 19:59:18 I haven’t seen a classical (Q?)Basic code in, let me think… forever 20:00:30 ah, non-classic, no line numbers 20:00:38 but still not VB either 20:01:07 my first real programs were in VB6(( 20:01:13 Yes, it is written in BASIC. The source codes are public domain so you can do what you want with it (although the executable file may be copyright by Microsoft). That is what I use when writing programs on DOS (for native programs on Linux I use C). While there are some free BASIC compilers, they should be enhanced to support some of the commands they currently don't and support real mode 20:01:55 zzo38: also interesting game idea 20:02:34 uh I accidently reached 311 20:02:43 :oo 20:03:20 (and I mean that... I felt out of control the whole time) 20:04:00 44 at the second time 20:04:12 I think it’s pointless for me to continue :D 20:04:57 http://int-e.eu/~bf3/tmp/mph.png 20:06:19 (this is not a random file name: mph = mega pane highscore) 20:06:42 arseniiv: 44 is a more normal score :) 20:07:29 I feel a bit too slow for this game still 20:08:24 I like the solitaire mode that you get if you press "T" once 20:08:51 (where the board moves up every 8 moves you make) 20:08:55 -!- erkin has joined. 20:09:18 oh, I’ve missed that! 20:12:51 actually this part of the game is quite advanced... you can select a preset (0-9), change the settings, save it, and then it'll start recording highscores for that setting 20:13:29 reminds me remotely of the good old blockout game 20:13:40 50 on default solitaire 20:23:40 -!- FreeFull has quit (Quit: Rebooting for new kernel). 20:24:36 -!- ais523 has joined. 20:25:53 -!- FreeFull has joined. 20:28:43 -!- Cale has joined. 20:36:18 -!- lutki_ has joined. 20:38:04 -!- lutki_ has quit (Remote host closed the connection). 20:47:56 @messages? 20:47:56 Sorry, no messages today. 20:52:42 > let act i j = lift (tell [i]) `mplus` lift (tell [j]); x = snd . runWriter . runListT in (x (act 1 2 >> (act 3 4 >> act 5 6)), x ((act 1 2 >> act 3 4) >> act 5 6)) 20:52:43 error: 20:52:43 Variable not in scope: runListT :: a1 -> Writer c a0 20:52:56 @let import Control.Monad.List 20:52:57 Defined. 20:52:59 > let act i j = lift (tell [i]) `mplus` lift (tell [j]); x = snd . runWriter . runListT in (x (act 1 2 >> (act 3 4 >> act 5 6)), x ((act 1 2 >> act 3 4) >> act 5 6)) 20:53:01 ([1,2,3,4,5,6,5,6,3,4,5,6,5,6],[1,2,3,4,3,4,5,6,5,6,5,6,5,6]) 20:54:16 no messages today my love is gone away, the λ-bot stands forlorn a symbol of the dawn 20:54:53 qq 20:55:41 int-e: is @let global to all lambdabot? 20:55:57 all of* 20:56:17 @undef 20:56:18 Undefined. 20:56:19 arseniiv: yes 20:56:31 zzo38: something you said earlier had me briefly playing with the idea of a super-goto that could also pass values, and be returned to, receiving a value... but i gave up on that after about 30 minutes 20:56:56 -!- ErrantEgo14 has joined. 20:56:56 That seem would be difficult to implement, it seem to me. 20:57:18 yeah, i think you'd have to keep a stack of them to return 20:57:37 int-e: what one does when some imports are interfering with something, is there a way to un-import? 20:58:20 -!- ErrantEgo14 has quit (Remote host closed the connection). 20:58:22 actually goto seems hard to implement in general... how do you handle skipping past a var declaration, etc 20:59:05 arseniiv: @undef resets all @let commands 20:59:17 @where L.hs 20:59:17 what lambdabot has in scope is at http://silicon.int-e.eu/lambdabot/State/Pristine.hs 20:59:42 Yes, I do know of difficulties of implementing goto, but one way is to just disallow jumping past a variable declaration. Some programming language expect variable declarations at the beginning of a block, and if you cannot jump into a block then that is automatically the case. 20:59:54 arseniiv: @let adds stuff to a file L.hs; @undef copies Pristine.hs to L.hs, overwriting all @let changes 21:00:17 it's all very well designed and userfriendly. :P 21:00:18 u0_a101: all declarations within a block could be treated as its inseparable traits, occurring in the same code with runnable instructions only because of a, let’s say, “bad” design 21:00:57 int-e: it's all very well designed and userfriendly. :P => I see :::: 21:01:14 @let import qualified Control.Monad.List as CML 21:01:16 Defined. 21:01:30 > let t = lift . tell . (:[]); a i j = t i `mplus` t j; x = snd . runWriter . CML.runListT in (x (a 1 2 >> (t 3 >> t 4)), x ((a 1 2 >> t 3) >> t 4)) 21:01:32 ([1,2,3,4,3,4],[1,2,3,3,4,4]) 21:02:31 there could be an interesting er… game when someone privately sends @undef to lambdabot in the heat of someone else building a complex machiery in the chat 21:02:59 Anyway this is how ListT is broken: The order of effects of the base monad may change with the bracketing of >> (or >=>), breaking the corresponding associative law. 21:03:36 arseniiv: it has caused surprisingly few problems so far... people cope. 21:03:43 Yes, so it only transforms some monads and not all of them. 21:03:58 So it is not a real monad transfomer and only is partial 21:04:36 int-e: seems reasonable. Also I was half-joking :D 21:04:54 :t StateT IO 21:04:55 error: 21:04:55 • Data constructor not in scope: IO :: s -> m (a, s) 21:04:55 • Perhaps you meant ‘In’ (imported from Lambdabot.Plugin.Haskell.Eval.Trusted) 21:05:12 :k StateT IO 21:05:12 arseniiv: so, hoisting var declarations to top of block basically? i'f im understanding you right? 21:05:13 error: 21:05:13 • Expecting one more argument to ‘IO’ 21:05:13 Expected a type, but ‘IO’ has kind ‘* -> *’ 21:05:19 :k StateT IO Integer 21:05:20 error: 21:05:20 • Expecting one more argument to ‘IO’ 21:05:21 Expected a type, but ‘IO’ has kind ‘* -> *’ 21:05:25 :k StateT (IO Integer) 21:05:26 (* -> *) -> * -> * 21:05:44 :k IO Integer 21:05:46 * 21:06:13 u0_a101: yep, or think of declarations inside a runnable block like a nops 21:06:38 arseniiv: http://hackage.haskell.org/package/logict is "ListT done properly" borrowing from Cont (Codensity, Yoneda, yada-yada). 21:07:14 It also gets rid of the lists. 21:07:43 arseniiv: hmm, interesting idea :) 21:07:57 I've been having my own thoughts about things like error handling, backtracking, select(2), and the like 21:08:10 I think that there's a way to do it correctly, from a programmer's point of view 21:08:20 You could also disallow jumping to a label if there is a variable declaration between the goto and label 21:08:21 they are “runned” before all explicit runnable statements do, notwithstanding goto jumps, like a finalizer in try…finally statements is run after something almost always, even if something was thrown 21:08:21 and monads are heavily involved, but it's not quite the same 21:08:44 I think what you need is to collapse the whole mess of monads and monad transformers into a single universal monad that does everything 21:09:36 (unless the declaration in inside of a block that you are jumping out of.) 21:10:07 u0_a101: also it combines well with freedom to declare things precisely where you need them, and with lexical scoping too 21:10:52 zzo38: i think this is what lua does 21:11:07 Maybe; I don't know much about what Lua does. 21:11:09 can't jump past var declaration 21:11:10 one big inspiration is that ? from Rust is basically just do-notation, but nicer 21:11:10 -!- ais523 has quit (Remote host closed the connection). 21:11:22 -!- ais523 has joined. 21:11:24 Rust's x = a? is equivalent to Haskell's x <- a 21:11:34 also label must be visible to goto, lexically 21:11:39 or, well, except that Rust ? only supports Option and Either, making it easier to implement 21:12:07 int-e: seems I heard of it. Ah I wish I used Haskell more frequently 21:12:09 I guess ? is a postfix operator here? 21:12:26 or, hmm 21:12:30 Well, you should be allowed to jump past a variable declaration as long as you are jumping outside of the block where that variable declaration is. And, yes, of course the label must be visible to goto, too. 21:12:41 or is that, including the assignment, a single syntactic form? 21:13:21 FireFly: yes, it's a postfix operator 21:14:43 in Rust, it's results in x if its argument is Ok(x), x if its argument is Just(x), and if neither of those is the case, it exits the entire function, returning its argument unchanged 21:14:53 (assuming I got the syntax right there, I don't really know Rust) 21:15:16 the semantics are not quite right 21:15:20 but I personally see ? as more of a "convert the rest of the function into a lambda" operator 21:16:03 like, { f; a?; g } ends up being converted to { f; a.map(|| g) } 21:16:16 err 21:16:28 { f; x = a?; g } ends up being converted to { f; a.map(|x| g) } 21:16:43 where |x| is "lambda x." 21:16:53 this is exactly the same thing Haskell do-notation does 21:17:11 or, well, it's not /quite/ the same; do-notation is flatMap (i.e. >>=), not regular map 21:17:28 smalltalk forever 21:18:00 (I believe that's where the || notation comes from.) 21:18:25 ah interesting, I associate it with Ruby 21:18:55 anyway, it strikes me that most existing languages/APIs are very bad at common tasks like waiting for one of two unrelated events to happen 21:18:55 ais523: hmm 21:19:23 "wait until someone clicks the mouse or a particular socket receives a network packet" is very difficult with most programming frameworks 21:19:27 * FireFly nods 21:19:27 ais523: erlang should be good at that 21:19:48 well, the general solution involves a multiple threads and a blocking queu 21:19:54 *blocking queue 21:20:12 Yes, and SDL is also bad at that since not all events are SDL events and SDL can't give you a file descriptor for its events (although Xlib can). 21:20:14 I think this is the main reason threading became popular 21:20:23 The most recent case of "that sounds like monadic bind" for me is JS and "await" I think (well, I guess promises in general) 21:20:37 FireFly: yes, promises are a special case of this pattern too 21:21:46 JavaScript also has generator functions too 21:21:57 I think a well-designed language would use promises for all input, and have an any() operator/function that returned the value of whichever promise completed first, and blocked until one of them did 21:22:00 with appropriate error handling 21:22:20 what we get instead is a lot of ad-hoc select/poll/epoll calls 21:22:45 the UNIX way is to make everything a file descriptor; that's workable, but as zzo38 says, most libraries abstract things away from that model and have no way to abstract-invert them back into it 21:22:56 -!- sebbu2 has changed nick to sebbu. 21:23:08 haskell isn't terrible for this either... depending on your taste, using STM or using its light-weight threads (possibly hidden behind an abstraction like the 'parallel' package) 21:23:37 JS has a Promise.all which is a [Promise a] -> Promise [a] function that waits for all of them to complete; a buncha libraries had a Promise.race but I don't think it ended up being a standard thing ("wait until any settles, then settle with its value") 21:23:47 But you could implement it as a library function of course 21:24:12 FireFly: well, this is what an event loop is, effectively 21:24:14 in that case you could do like, const thing = await Promise.race([thing1, thing2]) which is kinda decent? 21:24:15 It's the OS interface that tends to be awful. (select, epoll... OS threads are usually too expensive) 21:24:18 API-wise 21:24:24 ais523: sure 21:24:27 you'd want the other, unfinished promises to continue though 21:24:38 this is what LogicT calls msplit 21:24:41 hm this is true 21:24:42 ais523: This sounds similar to the language I was talking about recently with things that affect the rest of the scope. 21:25:02 I guess "head" would be a good name, because list terminology seems to be what people have settled on for monads 21:25:02 JSZM uses generator functions for all I/O (it does not implement I/O itself; the application program must handle it; JSZM is only a library) 21:25:28 Which ended up being pretty SSAy, which is similar to CPS/monads. 21:25:39 Not all monads are list monads, although some have features like list monads, so in that case I suppose "head" seem good 21:25:52 zzo38: right, this is just about naming 21:26:19 Yes, for monads that are like list monads you can use the names for those features like those for lists. 21:26:21 people find "map" quite intuitive on general monads, for example 21:27:11 Yes, that applies to all monads. 21:28:00 naming things makes them easier to learn; I think most people have more of an intuitive idea of "flatMap" (i.e. map then flatten) than they do of ">>=", even though they're the same operation 21:28:11 (btw, is there a standard name for monad flattening?) 21:28:22 Multiplication? 21:28:54 @hoogle Monad m => m (m x) -> m x 21:28:55 Control.Monad join :: (Monad m) => m (m a) -> m a 21:28:55 Streaming join :: Monad m => m (m a) -> m a 21:28:55 Haxl.Prelude join :: Monad m => m (m a) -> m a 21:28:59 oh, "join" 21:29:22 Oh, in Haskell. Sure. 21:29:25 I mean, "flatten" would make sense to me if you call flatMap that? 21:29:31 right 21:29:41 I guess "join" sort-of makes sense on lists but it seems misleading for other things 21:30:05 But there's this spawn :: IO a -> IO (IO a) thing 21:30:07 @source Control.Monad.join 21:30:08 Unknown command, try @list 21:30:13 @src Control.Monad.join 21:30:13 Source not found. Take a stress pill and think things over. 21:30:14 :t (runIdentity .) . traverse . (Identity .) 21:30:14 Which spawns a thing in a thread and gives you and IO value you can use to wait for the result. 21:30:15 Traversable t => (a -> b) -> t a -> t b 21:30:16 @src Control.Monad join 21:30:16 Source not found. My mind is going. I can feel it. 21:30:25 There the name "join" matches the use of "join" in multithreading. 21:30:26 Still "join" is one of those operation of all monads, not only lists 21:30:56 shachaf: the thread "join" is bizarrely named too, though; it's more like "wait for termination and take the value" 21:31:09 zzo38: yes 21:31:09 Yes. 21:31:22 But it's funny that it ends up working in that context. 21:31:22 I personally think of monads as being formed of map, join, return 21:31:25 @src join 21:31:26 join x = x >>= id 21:31:31 (not part of the class) 21:31:53 haha, because Haskell treats >>= as the primitive, join is implemented by flatMap id 21:31:55 ais523: I mean, it kind of makes sense as a name, since you have two threads of execution, and it joins them into one, by waiting for one of them to terminate? 21:31:55 @src [] (>>=) 21:31:56 xs >>= f = concatMap f xs 21:31:56 Yes, that's the standard definition. 21:32:01 @src Maybe (>>=) 21:32:02 (Just x) >>= k = k x 21:32:02 Nothing >>= _ = Nothing 21:32:08 well "joins" in the sense of a drawn graph 21:32:17 yes, it's the opposite of "fork" 21:32:45 so join xs = xs >>= id = concatMap id xs = concat (map id xs) = concat xs 21:33:00 for lists. 21:33:53 hmm, I assume Haskell doesn't have a Lazy monad because it's lazy anyway? 21:34:03 laziness is a monad too, though 21:34:31 actually I guess it's just the identity monad in Haskell 21:34:36 Agda has a partiality monad. 21:34:48 I guess that's pretty different. 21:51:56 -!- AnotherTest has quit (Ping timeout: 272 seconds). 21:53:15 I think someone mention that a new feature in GHC can be made to treat both >>= and join as primitive and whichever one you do not define will be defined automatically by other one. 22:04:22 -!- tromp has quit (Remote host closed the connection). 22:14:30 -!- erkin has quit (Remote host closed the connection). 22:33:16 -!- tromp has joined. 22:37:44 -!- tromp has quit (Ping timeout: 256 seconds). 22:57:18 -!- w3stside15 has joined. 22:58:48 -!- w3stside15 has quit (Remote host closed the connection). 23:18:23 -!- tromp has joined. 23:22:41 -!- tromp has quit (Ping timeout: 248 seconds). 23:54:17 -!- gareth__24 has joined. 23:54:46 -!- gareth__24 has quit (Remote host closed the connection).