←2019-10-31 2019-11-01 2019-11-02→ ↑2019 ↑all
00:00:24 <oerjan> <kmc> is the concept of pregret related to the concept of type II fun? <-- huh. i feel like i've never learned to do that.
00:04:31 -!- FreeFull has quit.
00:17:35 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).
00:36:50 -!- imode has quit (Ping timeout: 240 seconds).
00:47:46 -!- tromp has quit (Remote host closed the connection).
00:48:19 -!- tromp has joined.
00:53:29 -!- tromp has quit (Ping timeout: 276 seconds).
00:54:08 -!- tromp has joined.
00:58:38 -!- tromp has quit (Ping timeout: 245 seconds).
01:07:39 -!- imode has joined.
01:12:12 -!- oerjan has quit (Quit: Nite).
01:22:50 -!- zzo38 has quit (Ping timeout: 240 seconds).
01:35:55 -!- tromp has joined.
01:40:56 -!- tromp has quit (Ping timeout: 276 seconds).
01:52:36 -!- Soni has joined.
01:52:53 <Soni> 1. make esoteric language month 2. publish pure-sed doom port
01:53:19 <imode> I'd do it.
01:53:24 <Soni> (there is pure-sed tetris, after all)
01:54:46 <imode> what.
01:57:55 <Soni> https://github.com/uuner/sedtris/blob/master/sedtris.sed
02:44:23 <ArthurStrong> Wondering, if it's been generated using pack of scripts of written as is
02:50:42 <ArthurStrong> She's got a career at Google: https://careers.google.com/stories/julia-on-growing-her-career-at-google/
02:52:28 <imode> good.
03:24:08 -!- tromp has joined.
03:28:38 -!- tromp has quit (Ping timeout: 245 seconds).
04:42:27 -!- quintopia has joined.
05:10:59 -!- imode has quit (Quit: WeeChat 2.6).
05:11:16 -!- imode has joined.
05:12:27 -!- tromp has joined.
05:13:18 -!- imode has quit (Client Quit).
05:13:36 -!- imode has joined.
05:15:14 -!- imode has quit (Client Quit).
05:15:29 -!- imode has joined.
05:17:23 -!- tromp has quit (Ping timeout: 276 seconds).
05:35:46 -!- imode has quit (Quit: WeeChat 2.6).
05:36:04 -!- imode has joined.
05:38:11 -!- erdic has quit (Ping timeout: 276 seconds).
05:40:09 -!- erdic has joined.
06:02:28 -!- MDude has quit (Ping timeout: 268 seconds).
06:39:14 -!- tromp has joined.
06:43:38 -!- tromp has quit (Ping timeout: 245 seconds).
06:44:44 <aji> Soni: what are you doing here
07:02:36 -!- MDude has joined.
08:27:08 -!- tromp has joined.
08:31:25 -!- tromp has quit (Ping timeout: 252 seconds).
08:39:33 -!- tromp has joined.
09:22:26 -!- imode has quit (Ping timeout: 276 seconds).
09:46:16 -!- atslash has joined.
09:50:54 -!- arseniiv has joined.
09:53:26 -!- kspalaiologos has joined.
09:54:24 -!- kspalaiologos has quit (Client Quit).
09:54:36 -!- kspalaiologos has joined.
09:55:28 -!- kspalaiologos has quit (Client Quit).
09:55:42 -!- kspalaiologos has joined.
11:29:05 <Soni> aji: who are you
11:29:32 <Soni> (and, more importantly, why do you care)
11:49:08 <esowiki> [[User:CMinusMinus]] N https://esolangs.org/w/index.php?oldid=66902 * CMinusMinus * (+155) Created page with "Welcome to my Esolang-page! My name is Jonas, im 16 and from Germany (Yeah I know...). I already made some stuff, I am going to upload it here later... Bye"
11:49:27 <esowiki> [[User:CMinusMinus]] https://esolangs.org/w/index.php?diff=66903&oldid=66902 * CMinusMinus * (+24)
12:53:53 <b_jonas> oh I get it! they're called a ket-tle because when you start to boil the water, they hiss like a cat
12:54:10 <b_jonas> should have been spelled cat-tle but that's already used for a different word
13:06:53 <fizzie> `? kittegory
13:06:54 <HackEso> A kittegory is just a small category.
13:09:44 <fizzie> `mkx bin/just//grwp '\(is\|are\) just' | sed -e 's/:/ ::= /;s/$/\n/' > tmp/just && url tmp/just
13:09:46 <HackEso> bin/just
13:09:47 <fizzie> `just
13:09:48 <HackEso> https://hack.esolangs.org/tmp/just
13:32:56 <b_jonas> `? char
13:32:57 <HackEso> Char is a prominent component of charcoal.
13:39:43 <b_jonas> `? long
13:39:44 <HackEso> Long is the Chinese word for dragon.
13:40:10 <b_jonas> the other type words of C don't seem to have a wisdom: int, short, float, double, bool, _Bool, complex, _Complex, atomic, _Atomic
13:40:26 <b_jonas> we do have one for pointers though
13:40:31 <b_jonas> oh, and
13:40:32 <b_jonas> `? void
13:40:34 <HackEso> Nothing to see here
13:43:42 <kspalaiologos> `? void *
13:43:43 <HackEso> void *? ¯\(°​_o)/¯
13:43:59 <kspalaiologos> `? punpckhqdq
13:44:00 <HackEso> punpckhqdq? ¯\(°​_o)/¯
14:00:40 -!- aloril has quit (Ping timeout: 265 seconds).
14:57:23 <lf94> What language would you guys use to implement something new, that will be supported for the next 50 years?
14:57:31 <lf94> C?
14:57:56 <lf94> Basically I want to write a virtual machine for unreal script, and want it to live until at least I'm dead
14:58:40 <int-e> Fortran? Cobol?
14:58:53 <kspalaiologos> C
14:59:01 <kspalaiologos> c'mon, it's never going to die
14:59:23 <myname> it should, though
15:00:14 <int-e> I was not objecting to C, I merely wanted to offer some alternatives.
15:01:05 -!- aloril has joined.
15:05:32 <lf94> I don't want to use C because of bad type system, complex ecosystem, etc
15:05:38 <lf94> I was thinking lisp would probably be better
15:05:56 <kspalaiologos> you might end up like Reddit
15:06:18 <lf94> lol
15:06:34 <lf94> I want to use Rust, but Rust heavy as fuck.
15:06:44 <lf94> So I keep coming back, staring at Zig from a distance.
15:07:00 <lf94> I've actually used Rust for ~2 years now
15:07:03 <int-e> Honestly though... take any established language and chances are good that you can still run it 50 years from now. It may involve two layers of emulation.
15:08:00 <lf94> I should find a C with RAII and strong type system
15:08:04 <int-e> Oh, let's add vendor-neutral to the criteria.
15:08:15 <lf94> But in an adhoc fashion
15:08:26 <lf94> So that it can all be removed to compile with C compiler
15:08:38 <b_jonas> C
15:08:48 <int-e> Swift, golang... such things might still disappear very quickly if the corresponding company ever goes under.
15:09:42 <b_jonas> `? C
15:09:43 <HackEso> C is the language of��V�>WIד�.��Segmentation fault
15:11:28 <int-e> (I don't really expect either of those two to disappear.)
15:12:00 <lf94> int-e: thoughts on Zig?
15:12:09 <lf94> The developed it in a year basically
15:12:13 <lf94> The guy*
15:12:47 <lf94> int-e: what about JavaScript :^)))
15:14:31 <lf94> Lately I've been thinking more and more about interpreted languages
15:14:33 <int-e> lf94: I actually thought of that but hoped that nobody else would.
15:14:49 <int-e> lf94: Unfortunately I suspect it's here to stay as well.
15:15:04 <lf94> Basically an interpreted language trade-offs memory
15:15:09 <int-e> I don't know Zig.
15:15:22 <lf94> A compiled language typically needs more memory
15:15:32 <lf94> But you get way more control of the underlying system
15:15:40 <int-e> lf94: That's not really true anymore because of JITs.
15:15:53 <lf94> How complex is JIT
15:16:25 <int-e> (And Javascript would not be as dominant if people hadn't gone crazy in JIT compilation for JS a decade ago.)
15:16:26 <lf94> A compiled language, in the most basic case, is just turning language feature X into assembly Y
15:16:53 <lf94> Now with LLVM, I think there is no reason NOT to make it compiled
15:17:41 <int-e> Extrinsically JIT compilers use fairly crazy amounts of memory... they compile several versions of the same code, collect runtime profiling information to identify hot spots, require garbage collection... it adds up.
15:17:47 <lf94> int-e: check out Zig, for me. Your opinion matters a lot.
15:17:59 <b_jonas> I wouldn't trust javascript, because all the people who use javascript make programs that they throw away five or ten years ago, so you can't trust the language and its interpreters to be stable enough
15:18:26 <int-e> (Hmm, should've used a full stop rather than an ellipsis... those two sentences were not logically connected.)
15:18:34 <int-e> lf94: I really don't do requests.
15:18:47 <lf94> I guess with emulation, you can emulate compilers
15:18:58 <b_jonas> I recommend https://esolangs.org/wiki/UM-32 since it's based on like a thousand year old cult who made computers out of sand
15:19:19 <lf94> It would be cool to have some sort of crazy optimizing lambda calculus compiler
15:19:31 <lf94> int-e: Sorry, I didn't mean to offend
15:20:02 <int-e> Oh I'm not offended.
15:21:59 <b_jonas> that or MMIX, whose tagline is "a RISC computer for the third millennium", and people will be reading TAOCP fifty years from now so they'll also be interested to emulate MMIX
15:22:22 <lf94> I was going to target subleq vm
15:22:27 <lf94> as an alternative
15:22:32 <lf94> but it'd probably be very very slow.
15:22:34 <b_jonas> but C is pretty much the best option
15:23:04 <lf94> I should bundle tiny C compiler source with the project
15:23:09 <lf94> so someone can bootstrap
15:25:44 <b_jonas> lf94: the hard part is not the compiler or core language, but then environment and system access
15:25:52 <lf94> yeah...
15:25:58 <lf94> and C makes that the easiest
15:26:39 <b_jonas> C and unix together, yes
15:28:02 <lf94> https://en.wikipedia.org/wiki/History_of_programming_languages
15:28:06 <lf94> Man, this is pretty sad
15:28:17 <lf94> After the 70s everyone's been making garbage collected languages
15:28:38 <lf94> (Minus D, Swift and Rust)
15:29:38 <b_jonas> just look at how we unix people run unix programs on windows. sure, they don't integrate well into the environment, because they can like only access files if all characters in their names are in the locale-dependent default codepage, and you have to patch system() statements to add two double-quotes before the name of the program and one double-quote after the name of the program that you execute,
15:30:22 <b_jonas> and they can't printf floating-point numbers properly, but the end result is that with all that patching, you can usually run those programs, and windows libc supports them because there's a need for it
15:30:56 <b_jonas> every future system will support C and unix basics, so you can easily port programs from it, even if the system looks so different that you can't access its native resources to the fullest
15:30:58 <lf94> Is it difficult to re-implement C+
15:30:59 <lf94> ?
15:31:11 <b_jonas> even if it has to run the whole C program in an emulated virtual 32-bit address space etc
15:31:25 <b_jonas> it might be inefficient, but that doesn't matter when you're running old programs
15:31:53 -!- kritixilithos has joined.
15:35:18 <lf94> Thoughts on Ada?
15:36:54 <b_jonas> also document the parts of your program that may have to be ported in the future, like Knuth does in TeX/Metafont/SGB. these are the parts that access the system or do IO, the parts that make some assumption that need not be true in all C environments, and the parts that they may want to optimize in a nonportable way
15:37:23 <b_jonas> that's what makes TeX/Metafont/SGB portable enough: you don't have to touch most of the code to port, just those specific parts
15:39:40 <lf94> b_jonas: interesting
15:39:46 <lf94> TeX is written in what?
15:39:54 <lf94> I thought it was Knuth's own lang
15:43:03 <fizzie> I think it's written in WEB, yes.
15:45:43 <b_jonas> it's written in CWEB
15:46:07 <fizzie> Is it? I thought it was just WEB, and used Web2C.
15:46:08 <b_jonas> which lets you combine the core with local "patch files" that replace the system-dependent parts (or any parts you want really) of the C code
15:46:20 <b_jonas> and then you compile the resulting code with a C compiler
15:46:26 <b_jonas> fizzie: I dunno
15:46:35 <b_jonas> fizzie: SGB is written in CWEB then
15:46:40 <int-e> WEB is Pascal based.
15:46:48 <b_jonas> I haven't really tried to look at how TeX is implemented
15:46:56 <fizzie> int-e: Right, but I think TeX systems use web2c instead.
15:47:05 <fizzie> https://ctan.org/pkg/web2c?lang=en
15:47:16 <int-e> fizzie: I'm sure it has been ported to CWEB
15:47:44 <fizzie> Well, the principle is language agnostic, anyway.
15:49:44 <b_jonas> I guess for portability we should count 6502 too. everyone will know how to emulate it with all its undocumented instructions and quirks of the NES and commodore 64 graphics and sound hardware, even 50 years from now.
15:50:21 <b_jonas> https://www.linusakesson.net/games/stranded64/index.php argues for using the commodore 64 for future portability
15:50:58 -!- imode has joined.
15:53:59 <b_jonas> so write the program in the form of an NES cart. just remove its battery if it has battery-backed SRAM, because it's easier to put a new battery in 50 years from now than to clean up the spilled battery acid and repair the PCB
15:54:01 <int-e> Hmm, interesting. I was under the misconception that TeX had been ported to CWEB. Apparently not... (or maybe that happened and was abandoned).
15:56:17 <b_jonas> target the NTSC version though, people might not be able to get a PAL NES so easily anymore that far into the future
15:57:37 <b_jonas> oh yeah, writing the program _in_ TeX or Metafont (as opposed to _like_ TeX or Metafont) is an option too
15:57:53 <b_jonas> people will be able to find interpreters for those 50 years from now too, even if they don't use them for their original purpose anymore
15:59:03 <b_jonas> the problem is, writing a program in those languages is an exercise in masochism
15:59:27 <b_jonas> they're not as useful for general-purpose programming as the NES, commodore 64, C and unix, or MMIX
16:00:18 <b_jonas> lf94: Knuth's own languages are MIX with various extensions, MMIX, PL/MIX, and possibly PL/MMIX. TeX is written in none of those.
16:01:02 <esowiki> [[MIX (Knuth)]] https://esolangs.org/w/index.php?diff=66904&oldid=63414 * B jonas * (+4)
16:01:20 <esowiki> [[MMIX]] https://esolangs.org/w/index.php?diff=66905&oldid=52406 * B jonas * (+4)
16:01:34 <esowiki> [[Gb gates RISC]] https://esolangs.org/w/index.php?diff=66906&oldid=53641 * B jonas * (+4)
16:01:49 <esowiki> [[PL/MIX]] https://esolangs.org/w/index.php?diff=66907&oldid=66502 * B jonas * (+4)
16:02:38 <fizzie> I was almost expecting you were adding "TeX is not written in it." in each of those articles.
16:02:43 <fizzie> But maybe that's more of a `wisdom thing to do.
16:03:32 <esowiki> [[1.1]] https://esolangs.org/w/index.php?diff=66908&oldid=59206 * B jonas * (+4)
16:04:29 <b_jonas> ``` cat wisdom/pe*taneb* # like that entry?
16:04:30 <HackEso> Taneb is not elliott, a rabbi, Mark Zuckerberg, James Bond, Queen Elizabeth the first, or anyone older than Queen Elizabeth the Second. Pending approval: Shigeru Miyamoto.
16:04:58 <b_jonas> languages that TeX isn't implemented in?
16:05:43 <int-e> lf94: you should get shachaf's opinion on Zig since it doesn't have exceptions
16:05:57 <lf94> shachaf: opinion pls
16:06:05 <fizzie> That, and some other entries about inventions.
16:06:12 <int-e> but other than that... nothing really exciting to me. and this competition on hello world program size is getting boring
16:07:07 <fizzie> I've been writing Go lately, and Zig's `errdefer` would've come in handy a couple of times.
16:08:01 <int-e> I'm hoping for some serious consolidation in the near future.
16:08:33 <int-e> Having dozens of C-like languages that all have their own minor innovation is stupid.
16:09:58 <int-e> Maybe LLVM made writing compilers a bit too easy.
16:10:06 <esowiki> [[Gb gates RISC]] https://esolangs.org/w/index.php?diff=66909&oldid=66906 * B jonas * (-1)
16:10:34 <b_jonas> I still recommend C++ and rust
16:10:58 <b_jonas> not for the program that needs to be portable to 50 years from now
16:11:05 <b_jonas> for more ordinary programs
16:11:08 <imode> rust has tempted me recently. I resist its temptation.
16:11:58 <b_jonas> imode: C++ then
16:12:31 <imode> meh.
16:12:37 <imode> python, C, and Go for me.
16:13:53 <b_jonas> imode: python is fine too for many purposes
16:27:44 -!- kritixilithos has quit (Ping timeout: 260 seconds).
16:30:19 -!- grumboo has changed nick to grumble.
16:51:24 <Soni> forget C-likes
16:51:27 <Soni> use sed
16:52:01 <imode> I tried.
16:52:11 -!- kritixil1thos has joined.
16:52:58 <Soni> I tried rust but gave up on it after a while
16:53:59 <Soni> rust .so's crash on reload
16:56:04 <Soni> it does have good docs tho
17:09:42 -!- clog has quit (Ping timeout: 268 seconds).
17:22:58 <kspalaiologos> simple yet functional Forth dialect?
17:23:06 <kspalaiologos> with emphasis on ease of parsing
17:23:31 <kspalaiologos> anything will suffice as long as you can perform basic stuff and it's not so hard to parse/implement
17:26:05 <imode> kspalaiologos: forth has "dialects" by way of definitions, not inherent language features. I have a forth-like that compiles to C and also has an interpreter.
17:26:22 <kspalaiologos> how long is the interpreter?
17:26:46 <imode> 369 lines of python.
17:27:13 <imode> the compile-to-C stuff is even shorter, summing at around 100 lines.
17:27:21 <imode> iirc, anyway.
17:27:25 <kmc> Soni: how much of a compiler from a C-lke language can you implement in sed?
17:27:31 <kmc> that'd be fun
17:27:34 <kmc> compiling C with regexes
17:28:55 <imode> scratch that, the compile-to-C stuff is 230 lines, with the preprocessor being 88 lines of python.
17:29:21 <imode> I minimized it earlier.
17:32:23 <imode> kspalaiologos: the underlying language kind of looks and behaves like brainfuck. the interpreter implements 44 instructions, and that includes a semi-janky preprocessor.
17:32:38 <imode> 75% of these instructions aren't really required.
17:32:50 <kspalaiologos> the underlying language kind of looks and behaves like brainfuck - I blindly take it
17:32:59 <kspalaiologos> open source?
17:33:35 <imode> https://repl.it/repls/ImpressiveMagentaDestination
17:33:41 <imode> here's the interpreter.
17:34:50 <imode> https://hatebin.com/manaefqdti here's a prefix expression evaluator.
17:35:07 <imode> complete with variables.
17:35:25 <kspalaiologos> why did you bundle the macro preprocessor in
17:35:34 <imode> convenience.
17:35:42 <kspalaiologos> the language looks way more fun than stinky macros
17:36:16 <imode> mainly because I didn't want to type ,$1,$?]:$~$[. over and over.
17:36:22 <imode> for `else`.
17:36:53 <imode> feel free to remove the macro system.
17:37:00 <imode> it's just an instruction.
17:37:06 <imode> you don't have to use it.
17:39:43 <lf94> ok guys
17:39:50 <lf94> where the frig do I start with language design
17:39:52 <imode> I'm adding concurrency to the language as well kspalaiologos.
17:40:03 <lf94> Should I follow some online course?
17:40:07 <imode> lf94: think about the thing you want to write. figure out how to write it.
17:40:29 <kspalaiologos> lf94, dragon book
17:40:37 <kspalaiologos> look at some simple languages like B
17:40:48 <kspalaiologos> and try writing a lexer, parser and a -O0 codegen for it
17:41:10 <kspalaiologos> you may start out with lex + yacc
17:41:24 <imode> nothing needs to involve those tools.
17:41:29 <kspalaiologos> sure
17:41:33 <lf94> I want to learn proper language design
17:41:33 <kspalaiologos> but it's a good idea to use them
17:41:38 <lf94> Not just off-my-seat stuff
17:41:40 <kspalaiologos> ^ doesn't matter at all
17:41:40 <imode> "proper language design".
17:41:46 <imode> hahaha.
17:41:48 <kspalaiologos> when you write parser by hand
17:41:51 <imode> that's funny.
17:41:53 <kspalaiologos> you are going to do it wrong 100%
17:42:02 <kspalaiologos> just use the ready tools as you start off
17:42:04 <lf94> Why is that kspalaiologos
17:42:08 <kspalaiologos> cus you gonna die with painful death soon
17:42:17 <lf94> I will use lex + yacc if that's what's typically doen.
17:42:18 <kspalaiologos> I speak from my experience
17:42:19 <imode> no, please, write a parser. it's entertaining.
17:42:29 <kspalaiologos> ^ he probably doesnt know all the theory
17:42:33 <lf94> My goal is simple core + type system.
17:42:37 <imode> pardon me fuckboy?
17:42:48 <kspalaiologos> he has no idea how to describe syntax, what is EBNF, what type of parsers there are
17:42:49 <kspalaiologos> I
17:42:54 <kspalaiologos> 'm speaking about lf94, not you
17:43:03 <imode> lmao I'm just kidding.
17:43:19 <lf94> You describe syntax with EBNF dont you?
17:43:27 <kspalaiologos> sure
17:43:29 <imode> you can describe it, yeah.
17:43:35 <lf94> single pass, multi pass, etc parsers
17:43:43 <imode> there's a pretty wide gradient with how complex language syntax can actually be.
17:43:58 <imode> some just require bare tokenization, like forths.
17:44:12 <imode> others are based on involved grammars.
17:44:32 <imode> all parts of the gradient are valid, it just depends on what you value.
17:45:06 <imode> starting in language design usually has someone ask "what do you value in a programming language?"
17:45:35 <imode> so, what do you value, lf94.
17:46:11 <lf94> I value a language which can map to assembly nicely
17:46:30 <lf94> It must have lambdas / anonymous functions
17:46:40 <lf94> It must have first class for list operations
17:46:56 <kspalaiologos> lisp x lambda calculus?
17:47:01 <kspalaiologos> very easy one to lex and parse IMO
17:47:08 <lf94> It must not be garbage collected
17:47:16 <imode> that can be anything from a forth to a C dialect to picolisp.
17:47:34 <lf94> It will be more like APL
17:47:41 <imode> forth-like it is, then.
17:47:43 <kspalaiologos> ah yes
17:47:49 <kspalaiologos> the C dialect
17:48:00 <kspalaiologos> I remember myself writing C89 compiler targeting brainfuck lol
17:48:35 <imode> when designing a language it's important to keep the "semantic gap" in mind.
17:48:53 <imode> i.e how far away on the abstraction hierarchy are you away from the bottom or the top.
17:49:01 <imode> I optimize for a small gap.
17:49:34 <lf94> I want a systems level APL-like language.
17:49:44 <lf94> Also: https://meta.stackexchange.com/questions/25840/can-we-stop-recommending-the-dragon-book-please lol
17:50:06 <imode> so when you're talking about anonymous functions, etc. that's a reasonably high level language feature. but you also want it to map to assembly..
17:50:27 <lf94> I mean it all boils down to assembly anyway, no matter the language.
17:51:01 <imode> I have anonymous functions. but because I value a small semantic gap as well as making multiple language features pull double duty, they're implemented as something more general: concurrently executing processes.
17:51:48 <lf94> list comprehensions I think will be a prime piece of my language
17:51:48 <imode> and because of that small semantic gap, translating that to assembly is pretty trivial, involving minimal boilerplate.
17:51:59 <imode> why do you value list comprehensions.
17:52:13 <lf94> Because they allow you to generate lists in a very precise way.
17:52:21 <imode> wait until you see dictionary comprehensions. :P
17:52:23 <lf94> And all programming is just manipulating lists on some leel.
17:52:33 <lf94> well there are monad comprehensions too.
17:52:36 <lf94> It's all the same shit
17:52:54 <lf94> But imagine...a byte, 0x39, is also just a list.
17:53:07 <imode> any language can have list comprehensions because list comprehensions aren't that 1. complex or 2. valuable in some scenarios.
17:53:21 <lf94> [x & 0x1; x <- 0x39]
17:53:30 <lf94> AND bitwise op on all bits of 0x39
17:55:02 <lf94> It should be a language where everything is a list/string/sequence
17:55:05 <imode> wouldn't... that just be 0x39 & (~0)
17:55:17 <lf94> yes, but in your case, you are specifically working with 8-bit byte
17:55:21 <lf94> now how do you 9 bit? :)
17:55:28 <imode> it's an upcast.
17:55:32 <imode> you change nothing.
17:55:37 <lf94> [x & 0x1; x <- 0b111011101]
17:55:43 <imode> ~0 = 111111.....
17:55:45 <lf94> I just specify 9 bits
17:56:13 <lf94> next
17:56:18 <imode> like I said, try it in C with various types.
17:56:26 <lf94> imode: how do you split 101 out the middle?
17:56:30 <imode> you don't have to change anything. so I don't see your point.
17:56:38 <lf94> 1101 let's say (more unique)
17:56:40 <imode> what do you mean "split 101 out the middle".
17:56:47 <lf94> 111011101
17:56:55 <lf94> X1101XXXX
17:56:57 <lf94> that
17:57:04 <imode> what, you just want that section?
17:57:08 <lf94> yea
17:57:36 <lf94> > upcast
17:57:38 <lambdabot> error:
17:57:38 <lambdabot> • Variable not in scope: upcast
17:57:38 <lambdabot> • Perhaps you meant one of these:
17:57:39 <lf94> > and
17:57:40 <lambdabot> <[Bool] -> Bool>
17:58:02 <imode> (0bX1101XXXX >> 4) results in 0bXXXXX1101.
17:58:12 <lf94> But you cannot do that in C
17:58:19 <imode> uh, yeah. you can.
17:58:23 <lf94> You can specify 9 bits?
17:58:37 <imode> I can't specify 9 bits. but I can use a 16 bit value.
17:58:55 <lf94> Maybe that is better...
17:58:58 <lf94> X)
17:59:25 <imode> like I get it, it'd be interesting if you could work per-bit. but you can easily build this kind of stuff in any given language.
18:00:14 <imode> I can build custom control flow structures for it in mode, for example.
18:00:40 <imode> $1234 for each-bit to-string display repeat
18:01:22 <imode> each-bit extracts a bit. to-string converts that bit to a string. display displays the string.
18:01:30 <imode> the `for` is just aliased to `begin`.
18:02:20 <lf94> How would each-bit work
18:02:33 <lf94> gets an index or somethnig?
18:03:11 <lf94> Man maybe I should just start implementing a lisp
18:03:14 <imode> well, my language is a forth-like, and as such assumes some state that each word (function, if you like) takes as input, changes, and then returns as output.
18:03:37 <lf94> Compiled lisp that targets LLVM IR
18:04:07 <lf94> Then add ad hoc type system
18:04:08 <imode> so if we expect the source number to be on top of the stack/head of the queue, we can say at every iteration, we duplicate it and bitwise AND it with 1.
18:04:22 <imode> until the number is zero.
18:04:33 <lf94> to me type system is so important these days, for anything sane
18:04:42 <lf94> How would mode add a type system?
18:04:55 <imode> how would a forth add a type system?
18:05:11 <imode> there's a lot of ways you can do it. look at Factor for an example. it's statically typed iirc.
18:05:26 <imode> whoops, nope. it has strong dynamic typing.
18:05:34 <imode> https://en.wikipedia.org/wiki/Factor_(programming_language)
18:06:37 <kspalaiologos> ah yes
18:06:47 <kspalaiologos> clicking on stackexchange link showed me that my rep bumped by +200
18:07:23 <kspalaiologos> https://codegolf.stackexchange.com/a/191482/61379
18:07:31 <kspalaiologos> a lot of effort and processing power has been put here lol
18:09:23 <lf94> imode: I've looked at Factor too.
18:09:31 <lf94> Man plang theory is so fucky.
18:09:52 <lf94> "forth is good" "NO FORTH IS BAD" "forth is bad..." "wait, no, this person is convincing me otherwise again"
18:10:52 <b_jonas> oh also,
18:11:21 <b_jonas> UM-32 and GML have a lot of independent implementations, but don't use that as a heuristic for what's going to be useful 50 years from now,
18:11:38 <b_jonas> because most of them have already fallen off the web, and even the ones that haven't have probably bitrotten away
18:11:58 <b_jonas> oh right, postscript
18:12:00 <b_jonas> did we mention postscript?
18:12:09 <b_jonas> that's also a candidate, though not a very good one
18:12:10 <lf94> imode: can forth be compiled
18:12:18 <imode> lf94: sure. mine is.
18:12:24 <imode> directly to C.
18:15:42 <imode> lf94: wanna see the for each-bit thing in action.
18:16:22 <lf94> Not right now :)
18:16:23 <lf94> https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blob;f=extra/spheres/spheres.factor;hb=HEAD
18:16:35 <lf94> This is like some C mix
18:18:17 <imode> https://hatebin.com/agluuirids
18:19:10 <imode> https://repl.it/repls/UnfoldedBaggyPiracy here it is, compiled and run.
18:19:42 <b_jonas> lemon!
18:19:44 <b_jonas> darn it
18:19:49 <b_jonas> I knew I was forgetting to buy something
18:19:53 <b_jonas> I should have bought lemons
18:19:58 <b_jonas> for fresh lemon juice on the fish
18:22:38 <kspalaiologos> did I just get the joke?
18:24:39 <imode> for any iteration, the queue looks like <bit> <source-number>. you can do anything with the bit, including accumulate it, but at the next iteration, we expect the source-number to be at the head of the queue.
18:24:56 <imode> computing the sum of all the bits is pretty easy.
18:26:45 <kspalaiologos> I've got an algorithmic question
18:27:10 <kspalaiologos> i've got given a std::vector of two integers
18:27:22 <kspalaiologos> the integers are aranged in pairs
18:27:32 <imode> std::vector<std::pair<int, int>> ?
18:27:36 <kspalaiologos> yes.
18:27:39 <imode> neat.
18:28:06 <kspalaiologos> now, I have to assign number to these integers, so the ones in pair have unique numbers whether it's possible.
18:28:33 <kspalaiologos> what is the most efficient way of calculating how many ways are there to do that?
18:28:35 <imode> can't seem to parse that, can you rephrase.
18:28:49 <imode> calculating permutations of pairs?
18:28:58 <kspalaiologos> let's do it the other way
18:29:05 <kspalaiologos> let's assume the number is a person
18:29:11 <kspalaiologos> we have a vector of couples
18:29:32 -!- FaeFly has changed nick to FireFly.
18:29:38 <kspalaiologos> now, we have to assign some character trait to each of these
18:29:45 <kspalaiologos> so the ones in couples have different character traits
18:30:06 <kspalaiologos> let's assume all the people are polygamic so one person can have multiple partners
18:30:24 <kspalaiologos> how many ways are there
18:30:46 <kspalaiologos> to assign a different character trait for each person, so the people in couples have different character traits, when possible?
18:31:09 <imode> I don't know what "character traits" are but this is a permutation problem.
18:31:39 <kspalaiologos> it's just a feature of a person
18:32:25 <imode> you're handed a set of pairs. form a set of people from those set of pairs. then calculate all possible pairings of two people.
18:32:53 <imode> n choose k.
18:33:08 <imode> https://stackoverflow.com/questions/18859430/how-do-i-get-the-total-number-of-unique-pairs-of-a-set-in-the-database
18:33:23 <b_jonas> kspalaiologos: character traits? like that crazy template argument to std::string in the C++ standard library?
18:33:23 <kspalaiologos> huh, I don't think this is the case
18:33:33 <kspalaiologos> b_jonas, no lamo
18:33:35 <kspalaiologos> *lmao
18:33:53 <imode> no ordering, no repeats means n choose k.
18:33:56 <kspalaiologos> let's look at this example
18:34:03 <kspalaiologos> assume the following couples
18:34:16 <kspalaiologos> A B, B C, A C, C D
18:34:26 <kspalaiologos> now, if we had three possible character traits for these
18:34:33 <kspalaiologos> there are 12 ways to assign them to these people
18:34:50 <imode> so it's really a triple.
18:35:01 <kspalaiologos> we can also have ten character traits
18:35:04 <kspalaiologos> or twelve
18:35:11 <b_jonas> also I should have fried the fish on a higher temperature
18:35:12 <imode> but it's a triple. where the third element is a list.
18:35:51 <kspalaiologos> now I don't really understand
18:36:00 <imode> n!/k!(n - k)!
18:36:11 <imode> but segmented. kind of.
18:36:20 <kspalaiologos> in which way segmented?
18:36:32 <kspalaiologos> can you point me to a formula that can calculate the result of example I've given?
18:36:38 <imode> you want all possible triples of (X, Y, Z).
18:36:40 <kspalaiologos> I'll figure out reest myself
18:36:50 <imode> X and Y are a couple, Z is a character trait.
18:36:59 <kspalaiologos> each of these has a character trait
18:37:00 -!- kritixil1thos has quit (Ping timeout: 260 seconds).
18:37:09 <kspalaiologos> and if there is a couple, its best when they have different traits
18:37:12 <imode> you are underspecifying your problem.
18:37:19 <imode> explain it in clear language.
18:37:20 <kspalaiologos> I have specified it before
18:37:32 <kspalaiologos> alright, again
18:37:43 <kspalaiologos> I've got a set of pairs
18:38:00 <kspalaiologos> I have to assign a number to each element of every single pair
18:38:20 <kspalaiologos> i have to calculate, how many ways are there, to assign them
18:38:26 <kspalaiologos> with a few gotchas
18:38:49 <imode> do you want duplicates.
18:38:56 <kspalaiologos> a) in a pair, it would be the best, if every element has different number
18:39:01 <kspalaiologos> b) pairs don't repeat
18:39:31 <kspalaiologos> c) there is actually given upper limit for a number to assign
18:39:42 <kspalaiologos> (with a set of pairs, obviously)
18:39:55 <kspalaiologos> let's review these pairs
18:39:59 <kspalaiologos> A and B is the first pair
18:40:04 <kspalaiologos> B and C is the second pair
18:40:09 <kspalaiologos> A and C is the third pair
18:40:09 <imode> so the possible combinations of n items arranged into k sets is n!/(k! * (n - k)!)
18:40:40 <imode> 10 items arranged into pairs is 10!/(2! * (10 - 2)!)
18:40:43 <kspalaiologos> ^ are you following the rule that items in a pair should get different numbers assigned?
18:40:52 <kspalaiologos> also, you're given the number of pairs
18:40:54 <imode> I'm just presenting n choose k.
18:41:08 <kspalaiologos> you just need to calculate how many ways are there to assign number to each element of pair
18:41:33 <imode> here's a better question: where did this come from.
18:41:43 <imode> is this some kind of programming challenge.
18:41:59 <imode> it sounds almost like a math puzzle.
18:42:05 <kspalaiologos> not a programming challenge per se, I just need to get better algorithm on my hands
18:42:05 <imode> for undergrads.
18:42:12 <kspalaiologos> because the one I've got isn't quite right
18:42:19 <kspalaiologos> and takes way too long to execute
18:42:34 <imode> well whatever it is it's not so much an algorithm moreso an expression of the variables that make up your problem..
18:43:12 <imode> so each pair has two people in it, and each person gets assigned a number, but the numbers have to be different.
18:43:24 <imode> both within the pair and outside the pair.
18:43:47 <imode> so A = 1 and B = 2 holds regardless of who A and B pair up with, right.
18:44:29 <imode> in which case you still have n-choose-k because A and B can just be labeled with unique numbers. changing the names of the items of each pair doesn't change the problem.
18:44:53 <kspalaiologos> so how do I use this in my algorithm, because I'm pretty much lost now
18:45:42 <kspalaiologos> four given pairs, AB BC AD CD, and I may assign to every leter a number from 1 to 3
18:45:51 <Soni> kmc: as long as you limit yourself to ASCII x86 instructions, sure why not
18:46:05 <kspalaiologos> how do I calculate how many ways are there to do that, given that people in pairs need to have different numbers
18:46:09 <imode> count the number of unique people in your vector of pairs (add them to a set and compute the count of elements in the set), then feed that into count!/(2! * (count - 2)!)
18:46:21 <imode> where ! is factorial.
18:46:21 <Soni> ever heard of a certain "executable paper"?
18:46:28 <kspalaiologos> alright
18:46:30 <esowiki> [[THCA]] N https://esolangs.org/w/index.php?oldid=66910 * Moon * (+421) Begin page. Need to build a few templates
18:47:58 <imode> it may be different but that's at least a starting point.
18:48:16 <kspalaiologos> I'll think about it
18:48:32 <imode> because I'm still unsure as to the results you want.
18:48:39 -!- FreeFull has joined.
18:49:47 <imode> given AB,BC,AD,CD, assign a number to each letter such that, when each letter is substituted for its number, the pair is unique (i.e no pairs like (1, 1)).
18:49:53 <imode> is this closer to the thing you want.
18:50:00 <kspalaiologos> yeah
18:50:12 <kspalaiologos> and I need to calculate amount of ways a number can be assigned to them
18:50:17 <imode> alright, then what I gave you doesn't work.
18:50:38 <kspalaiologos> and the maximum number to assign is given
18:50:57 <imode> so you have your set of labels, the set 1 to N, where N is your given.
18:51:03 <imode> and you have your set of pairs.
18:51:18 <kspalaiologos> yes
18:51:39 <imode> can two letters have the same number but be in different pairs.
18:52:21 <kspalaiologos> e.g. pairs: AB CD, then yes, A=C=1 B=D=2 is a valid solution
18:52:40 <imode> that complicates things a bit.
18:53:02 <esowiki> [[Template:TernTrue]] N https://esolangs.org/w/index.php?oldid=66911 * Moon * (+162) Ternary True
18:54:34 <esowiki> [[Template:TernUnkwn]] N https://esolangs.org/w/index.php?oldid=66912 * Moon * (+165) Ternary Unknown
18:54:44 <imode> the stupidest thing that could possibly work is brute force search.
18:54:53 <imode> have you tried that.
18:54:57 <kspalaiologos> yes
18:55:04 <kspalaiologos> unsatisfying results
18:55:04 <imode> can I see some code.
18:55:17 <esowiki> [[Template:TernFalse]] N https://esolangs.org/w/index.php?oldid=66913 * Moon * (+162) Ternary False
18:55:24 <kspalaiologos> I'll send you over when I get to the PC I've been using
18:55:32 <imode> sure.
18:55:41 <shachaf> lf94: What sort of opinion do you want?
18:55:42 <imode> this problem has more than likely been solved somewhere before.
18:56:16 <lf94> shachaf: Do you think Zig is a viable long term lang?
18:56:28 <kspalaiologos> ^ heard about it
18:56:36 <imode> no.
18:56:39 <kspalaiologos> yet can't help, I don't know zig
18:57:05 <shachaf> I think Zig is going in a promising direction? I like a lot of the things they're doing.
18:57:10 <imode> universal long-standing concepts need to be simple enough and popular enough to withstand erosion by time.
18:57:23 <imode> zig has none of those characteristics. but it is nice.
18:57:58 <shachaf> I don't know what the question means. Certainly Zig is (rightly) pretty volatile right now.
18:59:54 <kspalaiologos> imode, any ideas?
19:00:05 <kspalaiologos> if none, I'll just settle on my bruteforce probably
19:00:09 -!- kritixil1thos has joined.
19:00:32 <imode> kspalaiologos: let me get back to you on that.
19:01:01 <kspalaiologos> yeah, sure
19:01:56 <imode> I'm sure this problem has a name somewhere.
19:02:12 <imode> wait.
19:02:17 <imode> isn't it just graph coloring.
19:02:40 <kspalaiologos> it could be
19:02:42 <imode> https://en.wikipedia.org/wiki/Graph_coloring
19:02:50 <kspalaiologos> yeah lol
19:02:52 <kspalaiologos> thats it
19:02:54 <imode> draw out the pairs as a graph, change the numbers to colors.
19:03:07 <imode> thank god for doodle paper.
19:03:49 <imode> well there you are. you're looking for the possible colorings of a graph.
19:03:56 <kspalaiologos> doodle paper?
19:04:00 <kspalaiologos> what's this
19:04:06 <imode> yeah I have a notepad that I just sketched your problem out on.
19:04:59 -!- clog has joined.
19:06:26 <esowiki> [[Template:Tern2InLogicTable]] N https://esolangs.org/w/index.php?oldid=66914 * Moon * (+376) 2 Input Logic Table
19:10:19 <esowiki> [[THCA]] https://esolangs.org/w/index.php?diff=66915&oldid=66910 * Moon * (+177) AND table.
19:13:42 <kspalaiologos> so I need to calculate chromatic polynomial.
19:13:51 <kspalaiologos> I shouldn't have slept at math lessons
19:16:48 <esowiki> [[THCA]] https://esolangs.org/w/index.php?diff=66916&oldid=66915 * Moon * (+9)
19:19:27 -!- oerjan has joined.
19:28:40 -!- MDude has quit (Quit: Going offline, see ya! (www.adiirc.com)).
19:30:08 <esowiki> [[THCA]] https://esolangs.org/w/index.php?diff=66917&oldid=66916 * Moon * (+21)
19:33:03 -!- imode has quit (Ping timeout: 264 seconds).
20:07:45 -!- kspalaiologos has quit (Quit: Leaving).
20:12:19 -!- kritixil1thos has quit (Quit: leaving).
20:18:00 <oerjan> <lf94> It must have lambdas / anonymous functions <lf94> It must not be garbage collected <-- i have the impression combining those two features is particularly hard
20:19:06 <oerjan> because once anonymous functions are first class, deciding life time becomes undecidable without GC
20:23:05 <b_jonas> oerjan: deciding the lifetime is undecidable period. garbage collector is just the generally accepted good approximation that we accept, in taht you have to write your program such that it doesn't take consume much memory if you keep everything that a mark-and-sweep garbage collector couldn't prove unused
20:24:10 <arseniiv> what strategy C++ uses to work with lambdas’ lifetimes?
20:24:16 <b_jonas> so now if you write programs in certain ways, you have to explicitly mark some references as weak or as weak-keyed for the gc to be able to free stuff up
20:25:18 -!- Phantom_Hoover has joined.
20:28:52 <int-e> oerjan: GC is totally optional, you can run out of memory instead.
20:29:27 <b_jonas> or require more help from the program than you need with a GC
20:29:29 <oerjan> thanks nitpickers
20:29:50 <oerjan> you're not wrong
20:31:15 <oerjan> but anyway, i think my point was that without GC it's going to need a far more technical solution to even get close, which lf94 probably doesn't want to implement
20:31:30 <lf94> maybe lambdas are a mistake
20:31:32 <lf94> :v
20:31:50 <arseniiv> lambdas are good
20:33:50 <lf94> named lambdas are just functions :v
20:35:48 <arseniiv> sure, scoped function definitions and first-class functions are not much worse
20:42:06 <oerjan> (and still need GC)
20:44:04 <arseniiv> how does C++ treat closures’ lifetime?
20:45:12 <arseniiv> as it doesn’t have a default GC, does it try something else to leak memory in these cases less?
20:45:26 <shachaf> Why would it leak memory?
20:46:06 <shachaf> C++ lambdas are just a function together with an autogenerated struct.
20:46:22 <shachaf> The struct can either have copies of things you capture or pointers to them.
20:48:18 <arseniiv> hm maybe I ask not what I mean to ask
20:49:03 <shachaf> ask not what you mean to ask, but what your ask means
20:49:09 <arseniiv> let’s say, are lambdas in general different?
20:49:27 <arseniiv> from the kind one has in C++
20:51:47 <arseniiv> s/lambdas/closures
20:52:26 <arseniiv> hm I should logread that tomorrow
20:55:44 <kmc> 13:28 < int-e> oerjan: GC is totally optional, you can run out of memory instead.
20:55:47 <kmc> https://groups.google.com/forum/message/raw?msg=comp.lang.ada/E9bNCvDQ12k/1tezW24ZxdAJ
20:56:37 <kmc> arseniiv: at a broad conceptual level C++ lambdas (and Rust lambdas, which are very similar) are like lambdas in other languages
20:56:42 <kmc> they can be called, they have captures
20:57:00 <kmc> since these are languages with explicit memory management, things can be captured by value or by mutable or immutable reference
20:57:14 <kmc> (by value meaning by move or copy, depending)
20:57:40 <kmc> in Rust the lifetime of reference captures is checked by the compiler. so you cannot return a closure which refers to something on the stack of the function which made it
20:57:57 <kmc> in C++ of course there is no such checking and that would be undefined behavior (perhaps the compiler can warn in some simple cases, but it's not guaranteed)
20:58:10 <kmc> the unusual thing about lambdas in these languages is that they use static dispatch by default
20:58:25 <kmc> a function that takes a closure will have a generic/templated type
20:58:44 <kmc> template <typename T> void use_closure(T closure) { ... closure(); ... }
20:59:05 <kmc> when you call use_closure([]() { ... })
20:59:46 <kmc> it makes a struct type for the lambda, containing its captures (nothing in this case), implements operator() for that type, and instantiates the templated use_closure() at that type T
21:00:21 <kmc> that struct type cannot be named, which is why 'auto' is not only a convenience in C++ but is essential
21:00:41 <kmc> there are no function pointers involved in calling a lambda this way, and the lambda body can be inlined into the function it's passed to, and all sorts of optimizations performed
21:01:05 <kmc> and that's why you can make a chain of higher order functions like map, filter, etc. and it compiles down to a flat loop (if the compiler is smart enough)
21:01:08 <kmc> very cool
21:01:20 <kmc> in Rust you'd do fn use_closure<T: Fn()>(closure: T)
21:01:33 <kmc> which is basically the same except that Rust has a trait system so you can say that the type T must be a function taking and returning nothing
21:01:39 <kmc> you could also have Fn(int) -> char
21:01:51 <kmc> now there is another tricky thing
21:02:07 <b_jonas> kmc: right. and the drawback is that, unless you write the both standard library and the compiler in tricky ways to optimize this, you'll end up with twenty copies of the red-black-tree rebalancing function compiled into your binary
21:02:15 <b_jonas> and ten copies of a mergesort
21:02:27 <kmc> when the closure is created, you can move non-copyable types into the closure
21:02:33 <kmc> but when it's called, can you move them *out*?
21:02:38 <kmc> this is why Rust has Fn, FnMut, and FnOnce
21:02:48 <kmc> when called they take &self, &mut self, and self, respectively
21:03:02 <kmc> so FnOnce can move out of its captures (and therefore such a closure can only be called once)
21:03:17 <kmc> FnMut can mutate its captures, Fn can only read them
21:03:30 <kmc> C++ has a similar thing but it's too arcane for me to remember
21:03:43 <kmc> now this is all well and good but sometimes you *want* dynamic dispatch
21:04:01 <kmc> fortunately this can be done using each language's respective dynamic dispatch features without anything particularly special to functions
21:04:43 <kmc> in C++ every lambda's type is a subclass of std::function so you can upcast &my_unnameable_lambda_type to &std::function<whatever> and pass that pointer around
21:04:50 <kmc> in that case operator() is a virtual call
21:05:03 <arseniiv> <kmc> C++ has a similar thing but it's too arcane for me to remember => yeah I heard something about lambdas which could only read their arguments in C++
21:05:03 <b_jonas> kmc: no, that's not how std::function works I think
21:05:04 <kmc> in Rust you use the "trait object" feature which, again, creates a vtable
21:05:11 <b_jonas> in C++
21:05:11 <kmc> b_jonas: isn't it?
21:05:20 <b_jonas> well, I'm not really sure
21:05:26 <b_jonas> because I don't use std::function in C++
21:05:33 <kmc> okay
21:05:37 <kmc> so why did you say that
21:05:49 <shachaf> Converting to std::function does a heap allocation, right?
21:06:00 <kmc> shachaf: I think so, yes
21:06:08 <kmc> but you can also use it by reference without that?
21:06:12 <kmc> i'm not totally sure
21:06:15 <kmc> I may be wrong with what I said above
21:06:20 <shachaf> Man, all this C++ nonsense is nonsense.
21:06:31 <kmc> in Rust you can make heap-allocated trait objects as well as by-reference ones
21:06:39 <shachaf> also what's the benefit of writing map and filter instead of for and if
21:06:44 <b_jonas> shachaf: no, not necessarily, in modern libstdc++ it has like one or two pointer of space reserved in the std::function itself, and if the function object fits there then it won't allocate
21:06:48 <kmc> Box<dyn MyTrait> vs &dyn MyTrait
21:06:50 <b_jonas> like how std::string is implemented these days
21:06:53 <kmc> b_jonas: yeah
21:07:08 <b_jonas> but without where std::string is now no longer trivially swappable
21:07:17 <kmc> Box is like C++'s std::unique_ptr so it has automatic, deterministic deallocation but can't be copies
21:07:29 <b_jonas> without the drawback where std::string is no longer trivially swappable or trivially move-assignable
21:07:43 <b_jonas> it has to check if it has to rewrite a pointer that points inside itself
21:07:47 <kmc> Rust also has refcounted types, the cool thing there is that there are both thread-local and multithreaded versions, the former is faster, and the compiler will error if you try to share them between threads
21:07:51 <kmc> so that's pretty neat
21:08:05 <kmc> whee
21:08:09 <kmc> infodump
21:08:18 -!- myndzi has joined.
21:08:23 <kmc> shachaf: if you want a real puzzle try making an exception-safe variants library in C++ without heap allocation
21:08:31 <b_jonas> kmc: and they both work with heap-allocated arrays, with the help of some cleverly hidden magic
21:08:31 <shachaf> exceptions are scow
21:08:41 <b_jonas> dynamic length arrays that is
21:08:46 <shachaf> -fno-exceptions
21:09:24 <b_jonas> oh, I had a weird dream by the way
21:10:08 <shachaf> What are variants, and what's a variants library?
21:10:20 <b_jonas> I dreamed that I found a case where using exception throwing and catching is actually useful, not because I have to interface with a preexisting library whose interface involves exceptions, but because that's intrinsically what the control flow was like
21:10:24 <kmc> shachaf: sum types
21:10:25 <b_jonas> shachaf: tagged unions
21:10:34 <b_jonas> yeah, sum types
21:10:39 <shachaf> Why would that need heap allocation?
21:10:55 <shachaf> It's just some data.
21:11:32 <b_jonas> kmc: can you take the C++ standard library route where if an exception is thrown then the variant can end up empty even if an empty branch isn't declared, or do you want a variant that does double-buffering?
21:11:42 <kmc> b_jonas: that's one issue yes
21:11:50 <b_jonas> kmc: and how exception safe do you want? can move assignment or swapping throw too?
21:11:59 <kmc> shachaf: for one thing there is trickery when you change the type and the constructor of the new type throws
21:12:02 <kmc> i don't know
21:12:10 <kmc> chris was explaining why it's so tricky and he convinced me at the time, but i forgot the details
21:12:13 <kmc> anyway, bbl
21:12:15 <kmc> <3
21:12:16 <shachaf> this is why i use c
21:12:23 <b_jonas> see you kmc
21:12:55 <shachaf> all the c++ trickery is a self-made problem
21:13:03 <shachaf> you gotta sfinae the recursive templates
21:13:48 <b_jonas> shachaf: can you do that in constexpr land yet?
21:17:26 <b_jonas> shachaf: anyway, C++ used to be hard, but it's almost solved now. we just need these few more language extensions into the standard and then it will be a very easy to program and versatile language where you can just write programs naturally
21:17:48 <olsner> :D
21:17:57 <shachaf> Whew!
21:18:05 <olsner> the essence of c++ is something like creating worse problems so you can pat yourself on the back for coming up with more complicated solutions
21:18:52 <b_jonas> olsner: oh, as in "I know, I'll just use C++! Now he has two problems."
21:19:13 <int-e> . o O ( plus 1 for every language revision )
21:34:17 <arseniiv> lol
21:42:55 -!- imode has joined.
21:45:15 * oerjan spots a myndzi
21:45:31 <oerjan> `? myndzi
21:45:32 <HackEso> myndzi used to keep us all on our feet.
21:45:37 <oerjan> ^celebrate
21:45:37 <fungot> \o| c.c \o/ ಠ_ಠ \m/ \m/ \o_ c.c _o/ \m/ \m/ ಠ_ಠ \o/ c.c |o/
21:45:47 <oerjan> looks a bit defunct, though
21:58:30 <int-e> hmm, which bot went with that
21:58:50 <int-e> oh
22:03:36 <b_jonas> \o/ _o_
22:06:50 -!- Phantom_Hoover has quit (Ping timeout: 276 seconds).
22:08:05 <imode> a thought just occurred to me.
22:09:28 <imode> to do iteration through something, all you have to do is 1. spawn a process and send your ID to it. 2. send your collection to the process. 3. drop the handle to the process. 4. `receive` in a loop.
22:09:52 <imode> the generating process can send you data, but you can't send data to it.
22:10:00 <imode> but you don't need to.
22:10:11 <imode> interesting.
22:47:50 <shachaf> `pbflist
22:47:51 <HackEso> pbflist: shachaf Sgeo quintopia ion b_jonas Cale kmc
22:48:34 <kmc> lol
23:11:35 <b_jonas> shachaf: please use an url with pbflist, because afterwards it's hard to tell which strip came out when and so hard to tell whether a strip has been listed yet
23:11:45 <b_jonas> right now you probably mean https://pbfcomics.com/comics/the-treat/
23:17:57 <imode> in fact... you could probably define a `bitvector` word that takes a number and, upon request, sends you back the next bit in the number...
23:18:50 <shachaf> I'd rather not, but I can refrain from pbflisting at all
23:46:07 <oerjan> eep, sub-zero forecast
23:46:28 <shachaf> @metar KOAK
23:46:28 <lambdabot> KOAK 012253Z 30008KT 10SM CLR 22/M01 A3010 RMK AO2 SLP194 T02171011
23:52:25 <int-e> . o O ( sub zero is a no-op )
23:54:44 -!- b_jonas has quit (Remote host closed the connection).
←2019-10-31 2019-11-01 2019-11-02→ ↑2019 ↑all