←2019-06-30 2019-07-01 2019-07-02→ ↑2019 ↑all
00:02:50 -!- b_jonas has quit (Quit: leaving).
00:27:24 <zzo38> How to reset the file system journal? I get error messages such as "JBD2: Spotted dirty metadata buffer (dev = sda3, blocknr = 0). There's a risk of filesystem corruption in case of system crash." Will resetting the journal fix this error? The filesystem is working OK despite the error message.
00:36:06 <zzo38> (Also, can I reset the journal without losing data?)
01:12:21 <shachaf> Silly syntax question: Is there a language that uses sigils for types?
01:12:40 <kmc> how do you define a sigil
01:13:01 <kmc> when people complained about Rust having ~T and @T and &T they usually called 'em sigils
01:13:03 <shachaf> Well, I mean any syntactic marker other than uppercase.
01:13:05 <kmc> and &T still exists
01:13:15 <kmc> and C++ has it too
01:13:16 <shachaf> Oh, I mean marking that something is a type syntactically.
01:13:19 <kmc> ah
01:13:35 <kmc> i don't know
01:13:54 <shachaf> kmc: I used to think that your assessment of C++ as an esolang was a bit silly but nowadays I mostly think it's just true.
01:14:30 <shachaf> (I mean, I used to think it was slightly true and somewhat silly. But now I think it's much more clearly true.)
01:16:43 <kmc> what changed your mind?
01:17:49 <shachaf> Something like realizing what a scow C++ is and how it got to be that way.
01:17:58 -!- arseniiv_ has quit (Ping timeout: 246 seconds).
01:18:15 <zzo38> BASIC uses suffixes for types (although you can also use AS to specify types), and so does OAA (a compiler that targets the OASYS text adventure games VM)
01:19:00 <shachaf> My story for things like templates is, originally they added some simple template features that weren't that terrible, just a replacement for C macro templates or something.
01:19:11 <kmc> like A$ for a string?
01:19:41 <kmc> shachaf: SFINAE is maybe the prototypical example in my mind of a feature that turned out to be much more useful than intended, in a bizarre way
01:19:50 <shachaf> Then because of the (legitimate!) latent demand for metaprogramming features, people started doing complicated things with templates.
01:19:51 <zzo38> Yes, A$ names a string variable in BASIC.
01:20:05 <kmc> Haskell typeclasses are sort of like that too but the unanticipated applications of typeclasses are mostly fairly reasonable to use
01:20:27 <shachaf> The C++ committee saw people doing these things, and instead of adding reasonable metaprogramming features, they decided to add tempalte features to allow for even more ridiculous metaprogramming nonsense.
01:20:36 <shachaf> Yep, things like SFINAE.
01:20:39 <kmc> pretty much
01:20:47 <zzo38> (In OAA, not only are there suffixes for data types, but also prefixes; for example ,A$ means a local string variable, and %A$ is a global string variable, and &A$ is a method that returns a string.)
01:20:49 <kmc> otoh, it means that C++ metaprogramming is much more type-aware than many languages' systems
01:20:51 <shachaf> And now everyone is stuck in this absurd local optimum which is so far from anything reasonable.
01:21:08 <kmc> the ability to do compile-time dispatch on various properties of a type is very powerful
01:21:12 <kmc> and very useful in a systems language
01:21:23 <kmc> to enable optimizations, etc
01:21:39 <kmc> there is probably a way to design a sensible type-aware metaprogramming system
01:21:41 <kmc> but
01:21:47 <shachaf> Anyway there's the esolang attitude of "given these ridiculous constraints, how can I accomplish all sorts of things?" that leads people to enjoy template metaprogramming.
01:21:59 <kmc> it sounds like a hard problem to me
01:22:00 <shachaf> It's not about doing good engineering but about solving fun puzzles.
01:22:06 <kmc> macro systems are already hard enough and they are not type-aware
01:22:10 <kmc> (for the most part)
01:22:25 <shachaf> C++ templates can't even be parsed without instantiating them. It's so bad.
01:22:27 <kmc> and I don't just mean "knowing the types of generated expressions" but things like type traits.
01:22:30 <kmc> this is true
01:22:34 <kmc> the syntax is wretched
01:22:44 <shachaf> By the way I agree that pretty much the same thing happened in Haskell.
01:22:47 <kmc> but as weird as templates are
01:22:55 <kmc> they have some essentially unique capabilities
01:23:04 <shachaf> There were some reasonable type system features and then people were all about doing things in the type system and writing in this silly Prolog variant.
01:23:14 <kmc> that are very useful in C++'s niche
01:23:16 <shachaf> (Meanwhile C++ people are writing in this silly ML variant. Golly.)
01:23:17 <zzo38> I had the other idea (I mentioned before), types with characteristics, and the values of characteristics of types can be macros; this can be used for type-aware metaprogramming.
01:23:18 <kmc> yes that is true
01:24:15 <shachaf> I suspect macros or code generation are much better than a lot of uses of C++ templates.
01:24:25 <kmc> many of them
01:24:31 <zzo38> (Such type-aware metaprogramming actually becomes mandatory to get it to work at all, although most of it is put in standard header files (both system-dependent and system-independent), so you normally do not need to deal with it.)
01:24:31 <kmc> but many others can't be done with code generation
01:24:32 <shachaf> Did you know edwardk once implemented IEEE floating point arithmetic in C++ templates to generate constants or something?
01:24:55 <kmc> e.g. the ability to provide one of multiple implementations of a generic function depending on some property of the type(s) it is instantiated with.
01:25:04 <kmc> which, again, is really useful in high performance systems code
01:25:11 <shachaf> This is 100% about solving fun puzzles rather than solving actual problems.
01:25:40 <shachaf> I think static dispatch based on types is a reasonable feature but C++ has such a bad implementation of it.
01:25:43 <int-e> with enough templates you can compile straight into c-like code that the compiler can actually digest...
01:26:11 <shachaf> Another way that C++ is ridiculous it that it pretty much requires an optimizer to generate reasonable code.
01:26:20 <shachaf> C code is pretty much fine with no optimizations.
01:26:41 <kmc> I wonder if maybe metalanguages (whether designed or evolved) are the wrong way to do things, and instead we should have languages with no meta/object-level distinction, which have powerful introspection facilities, and compile-time partial evaluation
01:26:53 <kmc> C++ already has powerful constexpr too
01:27:02 <kmc> this would avoid the need for both
01:27:27 <kmc> a simplistic way to put this is to have eval as a constexpr function
01:27:36 <kmc> which wouldn't necessarily be present at runtime
01:27:39 <kmc> i mean, probably wouldn't be
01:27:57 <shachaf> Zig's "comptime" seems pretty reasonable to me and it's a much simpler language than C++.
01:28:10 <kmc> shachaf: re optimizations, while that is inconvenient, it is not a design flaw of C++ but rather a consequence of the problem it's trying to solve, which is much different from the problem C is trying to solve
01:28:15 <kmc> C is a low-abstraction language
01:28:17 <zzo38> kmc: I think that is good for interpreted languages, but programming languages that compile code into native code I think will need the ability to do separate metaprogramming (although metaprogramming could be done using the same programming language as the mainly compiled code, if needed).
01:28:26 <kmc> C++ is a very high-abstraction language which nevertheless tries to produce C-level performance
01:28:37 <kmc> this means a huge need for optimizing out those abstractions
01:28:40 <shachaf> I think it's clearly true that you should be able to run arbitrary code in the same language at compiletime (though I could think of some arguments against it, I guess).
01:28:41 <kmc> it's the same in Rust
01:28:48 <kmc> even though Rust is less insane than C++ in many ways
01:29:51 <shachaf> I think if you had macros or something generating reasonable C-style code instead of templates, you could get much better performance for abstractions.
01:29:55 <kmc> zzo38: I am thinking in terms of Futamura projections, where a compiler is a partial evaluator for an interpreter
01:30:07 <shachaf> Anyway I'm not opposed to optimization, I just think C++ has a pretty bad attitude toward it.
01:30:18 <int-e> . o O ( Futurama projections. )
01:30:22 <kmc> shachaf: that wouldn't allow you to (for example) turn chains of iterator HOFs into flat loops
01:30:27 <kmc> which is something both C++ and Rust can do
01:30:34 <shachaf> The C++ coroutine proposal says that coroutines sometimes need to allocate but they expect that an investment of $x million into research-level optimizations will make that not a problem.
01:30:35 <kmc> int-e: good news, everyone!
01:30:41 <kmc> lol
01:31:19 <shachaf> By the way I think my current opinion on optimizations is that they should never change asymptotic performance of code, only constant factors.
01:32:06 <shachaf> This means that e.g. tail-call elimination is bad -- if you want tail calls to turn into jumps, you should have a language construct that guarantees a jump and fails if it's not possible (because of a destructor or whatever).
01:32:19 <int-e> ?!
01:32:19 <lambdabot> Maybe you meant: v @ ? .
01:32:38 <int-e> So you're looking at all the resources, including stack usage, here?
01:32:52 <shachaf> I think so?
01:33:11 <shachaf> Of course this depends on your goal. If you don't care about predictable software it probably matters less.
01:33:15 <int-e> I was going to agree, but tail call optimization is so benign... and hard to get wrong... I want it.
01:33:22 -!- Lord_of_Life has quit (Ping timeout: 268 seconds).
01:33:35 <shachaf> I want it too! So there should be some kind of language construct that guarantees it.
01:34:24 <shachaf> I suspect tail recursion is just in a language like C or C++, though. Much better to write while (true).
01:34:39 <shachaf> Tail call elimination is more useful for mutually recursive things like parsers.
01:35:38 <kmc> there's a proposal for Rust that's been kicking around for a long time
01:35:41 <kmc> for a syntax like "become f(x)"
01:35:50 <shachaf> Yes, that's the kind of thing I mean.
01:35:53 <kmc> this would be a tail call to f(x), but also runs destructors /before/ the call
01:36:00 <kmc> so it has different semantics from a normal call
01:36:02 <shachaf> (Assuming it means what it looks like, I haven't seen the proposal.)
01:36:10 <shachaf> Oh, not what I was thinking of, but that works too.
01:36:14 <kmc> which is why it can't be done as an optimization
01:36:18 -!- Lord_of_Life has joined.
01:36:20 <kmc> and that's probably wise
01:36:27 <zzo38> LLVM allows explicitly specifying tail calls or not tail calls.
01:36:39 <shachaf> That seems like a pretty strange feature to me.
01:36:41 <kmc> in a lot of cases, it's fine to run destructors before the tail call, and of course anything moved into the tail call isn't destroyed
01:37:55 <zzo38> (Since my idea of the program language is that you can use all features of LLVM, this means that specifying explicitly the tail call or not tail calls is possible to do.)
01:38:42 <kmc> since Rust has memory safety by default, destroying stuff before the tail call isn't going to get you in trouble wrt passing a pointer to that stuff
01:39:31 <shachaf> kmc: By the way, I was thinking about something you said a while ago, about the benefits of dynamically typed programming languages.
01:39:37 <kmc> (and that extends to things like RAII lock objects too, because the only way to access the thing protected by a lock is through the lock object or a reference whose lifetime is tied to the lock object)
01:39:41 <kmc> (which is a really cool design)
01:40:24 <shachaf> You gave some examples that I don't remember, but one of them was something like "copy all the fields of object x into object y that has a different type".
01:41:09 <shachaf> I think something like that is much better covered with some kind of dynamic-ish compiletime code that generates statically-typed runtime code to actually copy the fields.
01:42:35 <shachaf> There's no reason you couldn't write "for each field of object x", it just has to be a compiletime loop rather than a runtime loop.
01:42:47 <shachaf> I feel like this is true for a lot of the benefits of dynamically-typed languages.
01:42:47 <kmc> yes but should we even have such a distinction
01:42:56 <kmc> or write a runtime loop and rely on the compiler to optimize it
01:43:04 <kmc> possibly with an annotation to throw a compiler error if it can't
01:43:08 <shachaf> A runtime loop that uses reflection?
01:43:11 <kmc> yeah
01:43:29 <shachaf> I'm a bit skeptical.
01:43:34 <kmc> that's what i expected
01:43:44 <kmc> based on your opinions above re: C++'s reliance on optimization
01:43:45 <shachaf> If nothing else, I want it to be a type error at compiletime if one of the fields in x doesn't exist in y.
01:43:59 <kmc> that can be arranged
01:44:07 <shachaf> Oh, that argument isn't on performance grounds.
01:44:09 <kmc> it would be a "runtime error" in the constexpr engine
01:44:15 <kmc> which is a compile-time error
01:44:26 <shachaf> OK, so that sounds like the right thing?
01:44:30 <kmc> and again, you can say such and such function must evaluate out at compile time
01:44:37 <kmc> so you won't get any surprise runtime errors
01:44:43 <kmc> but semantically, you only have object-level code and no meta-code
01:44:45 <kmc> idk
01:44:50 <shachaf> I'm happy with writing "compiletime for (name, type : fields(x)) { ... }"
01:44:55 <kmc> this conversation is very interesting but i think i will go do other things
01:44:57 <kmc> <3
01:45:27 <shachaf> It seems kind of odd to require that thing to always be interpretable with runtime semantics, since there are all sorts of things the compiler has access to that the running program might not.
01:45:33 <shachaf> sgtm
01:48:00 <shachaf> kmc: You probably didn't see my conversation about arguments the other but I have a bunch of ideas of things along those lines that could exist easily at compiletime but don't make much sense at runtime.
01:48:57 <shachaf> I don't think macros that operate on an AST really make sense at runtime, but you could easily have them at compiletime (with the same language).
01:50:10 <shachaf> `? cats
01:50:13 <HackEso> Cats are cool, but should be illegal.
01:50:55 <zzo38> Yes, and is what I intended you can have macros that operate on the AST at compile time only
01:52:54 <shachaf> ASTs aren't the only kind of value I'm thinking of, though.
02:03:59 <zzo38> Yes, there are other stuff that you can do too, such as types and type characteristics
02:15:15 <kmc> fexprs
02:15:18 <kmc> fexprs are love
02:15:23 <kmc> fexprs are you
02:19:05 <esowiki> [[Don't]] M https://esolangs.org/w/index.php?diff=63815&oldid=63813 * A * (+66)
02:24:05 <Hooloovo0> fexpr is you
02:32:42 <shachaf> In general there are many language features you can use to do compiletime-ish things at runtime.
02:33:53 <shachaf> Often they have different semantics, and almost always different performance, so I'm not sure whether always making the code look identical is particularly valuable.
02:34:33 <shachaf> Ironically C++ is quite bad at a simple thing I want to be able to do, which is to pass an argument either at compiletime when it's known or at runtime or at runtime when it's not.
02:36:22 <shachaf> (It's ironic because I think that kind of thing is nominally what C++ is trying to accomplish.)
02:39:36 <kmc> well that's one reason why people rely so much on inlining
02:39:39 <kmc> but it's not ideal, yes
02:40:46 <shachaf> Well, I'm also thinking of the variant where something is either a field on a struct or a value known at compiletime.
02:41:05 <shachaf> E.g. the size of an array.
02:41:43 <shachaf> Even a lot of inlining won't prevent the value from being needlessly stored in memory.
02:41:48 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63816&oldid=63803 * A * (-19) I have to make edits every day.
02:43:44 <shachaf> maybe i'll cook some delicious food
02:55:15 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=63817&oldid=63816 * A * (+2823) /* Write some nonsense here */
03:10:09 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63818&oldid=63817 * A * (-332) /* The magic of H */
03:13:38 <zzo38> In my NNTP client software I put in the following SQL code: INSERT INTO `NEWSGROUPS`(`NAME`, `LAST`) SELECT `NAME`, `LAST` FROM `_UPDATEGROUPS` WHERE 1 ON CONFLICT(`NAME`) DO UPDATE SET `LAST` = EXCLUDED.`LAST`; the conflict is actually guaranteed; it will never add new rows to the table. Is this the best way or is there a better way to do what I am trying to do here?
03:15:26 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63819&oldid=63818 * A * (-209) /* H */
03:23:27 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63820&oldid=63819 * A * (+1189) /* H Reference */
03:24:56 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=63821&oldid=63820 * A * (+15) /* Adding if statements and functions without adding any keywords */
03:32:38 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63822&oldid=63821 * A * (-71) /* H Quine via adding one operator */
04:03:25 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63823&oldid=63822 * A * (+166) /* H Quine via adding one operator */
04:12:37 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63824&oldid=63823 * A * (+192) /* H Quine via adding one operator */
04:16:02 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63825&oldid=63824 * A * (+18) /* H Quine via adding one operator */
04:45:56 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63826&oldid=63825 * A * (+73) /* H Quine via adding one operator */
05:10:24 <kmc> shachaf: http://www.worldinhome.com/what-is-language-c/
05:10:27 <kmc> "In an effort to keep up the movability of each the C and C++ languages, the Yankee National Standards Institute (ANSI) developed a type of consistency for C and C++ programming."
05:20:21 <shachaf> i'm cooking delicious food and it's going to be tg
05:25:14 -!- sprocklem has joined.
05:39:22 <kmc> ooh, what is it
05:42:31 <shachaf> some nonsense with onions and tomatoes and rice and a trillion spices
05:47:10 <kmc> that sounds nice
05:48:09 <shachaf> it's going to be so good
05:59:52 -!- xkapastel has joined.
06:07:52 <kmc> I hope you enjoy it :)
06:08:29 <shachaf> it is good but i think i used too much water for the rice
06:08:55 <shachaf> i was going to award myself a billion points for this dish but i think i'm only going to give myself about 2 million
06:09:05 <shachaf> it's still tg
06:09:57 <kmc> I'm tired from a busy weekend and I'm going to sleep
06:10:09 <kmc> I hope to earn a billion sleep points
06:10:16 <shachaf> good night
06:10:39 <kmc> you too :)
07:49:13 -!- APic has quit (Ping timeout: 245 seconds).
08:09:25 -!- mniip has quit (Read error: Connection reset by peer).
08:11:27 -!- mniip has joined.
08:14:07 -!- AnotherTest has joined.
08:55:34 -!- salpynx has joined.
09:25:27 -!- arseniiv_ has joined.
09:27:56 -!- arseniiv_ has changed nick to arseniiv.
09:28:39 <arseniiv> @metar UWUU
09:28:40 <lambdabot> UWUU 010900Z 32006MPS 9999 OVC011 15/14 Q1003 R32L/0///60 NOSIG
09:29:05 <arseniiv> what kind of summer is THAT
09:29:59 <arseniiv> it seems the Earth tilted overnight in an unfortunate fashion and I am now living in a polar region
09:58:48 -!- xkapastel has quit (Quit: Connection closed for inactivity).
10:09:52 <ski> shachaf : "This means that e.g. tail-call elimination is bad" -- so you want "proper tail recursion", rather than TCO ?
10:11:27 <shachaf> Do I?
10:11:36 <shachaf> What is "proper tail recursion"?
10:13:01 <ski> imho, it's somewhat of a misnomer, since it's not about recursion, per se
10:14:01 <ski> it's a language property in Scheme, that an implementation is to be able to handle an unbounded number of active tail calls, in bounded space (so it's about operational semantics)
10:14:23 <ski> doesn't mandate a particular way to implement that
10:14:59 <ski> the point is that it's not an optimization, something which an implementation may or may not choose to do. it's something you can rely on
10:16:58 <ski> also, given that there's a relatively simple lexical (conservative) check you can do in your head to check if a call is in tail position wrt to some wrapping context, it's something you can practically use
10:19:05 <shachaf> As I mentioned, I don't think tail recursion is very important, at least in a language like C -- you can just write while (true).
10:19:41 <shachaf> I think I'm fine with the "foo() { return bar(); }" always being two stack frames. Or it can always be one stack frame, as long as it's predictable.
10:20:15 <shachaf> In a language like C++, "foo() { Thing x; return bar(); }" could run the destructor for x after bar(), in which case it looks like a tail call but isn't.
10:20:42 <ski> iirc MIT Scheme (?) keeps around the last hundred or so calls to (distinct) procedures, for debugging purposes, which is fine. and Chicken produces C code which never returns normally (using CPS. instead the "stack" is GCed and compacted, when full, iirc. so it's basically a heap)
10:21:00 <shachaf> I was suggesting a version of "return" where it's an error if it can't be implemented with a jump instead of a call.
10:21:32 <ski> i agree about predictability
10:21:55 * ski nods
10:22:24 <shachaf> I have the same opinion about things like fusion in Haskell.
10:22:48 <ski> yes
10:23:12 <shachaf> I don't really like "best-effort" optimizations that people need to rely on. If you want your thing to be compiled into a particular thing, you should express it in terms of something that guarantees it.
10:24:23 <ski> my ideas about "unboxed variants" (by which i don't mean putting the tag in a separate register) are going in the direction of having the system complain statically if you don't get the expected fusion / virtual data structures you expect
10:24:34 <ski> aye
10:25:35 <shachaf> What are your ideas about "unboxed variants"?
10:25:55 <shachaf> I can't remember whether you told me once when I was all about wanting unboxed sums in GHC.
10:27:26 <ski> "Multi-return function call" by Olin Shivers in 2004-09,2006-0[79] at <http://www.ccs.neu.edu/home/shivers/citations.html#mrlc>, which is about multiple alternative continuations, and a notion of "semi-tail calls"
10:28:01 <shachaf> Right, I remember you were saying something about multiple continuations.
10:28:37 <ski> i had an example (translated from that paper into, imho, more suitable terms) in pseudo-Haskell, on <lpaste.net> ..
10:29:03 <shachaf> Can't trust anyone.
10:29:21 * ski smiles
10:29:27 <shachaf> There was one paste I would refer to every couple of years on hpaste.org, but fortunately I downloaded a copy before it disappeared.
10:29:45 <shachaf> Oh, maybe sometime you can help me think about efficient implementation of coroutines. I feel like almost no one implements them in the right way.
10:30:57 <ski> imagine if you had a function with e.g. return type `Either Integer [Integer]'. it's common for a caller to immediately do a `case' analysis on the result (or else just pass the result on, for its caller to check, &c.)
10:31:36 <shachaf> In that case you can pass continuations, right.
10:31:58 <shachaf> Isn't the cost of an indirect jump instead of a call-return and conditional jump pretty high?
10:31:59 <ski> so the idea is that we take the continuation of the call, which consists of this `case' (with some wrapping context), and we unbox it, passing the branches as separate, alternative, return points
10:34:08 <ski> well, if you're doing recursive loops, it can commonly be the case that you'd just pass on most of the return points, unchanged (that'd be a semi-tail call). and so if you return via such a continuation, you'd skip most of the activation frames which would otherwise have to interpret the tag
10:34:43 <ski> (so this seems a little bit related to codensity, yes)
10:35:19 <ski> but it would remain to be seen how well it would work out in practice, yes
10:35:52 <esowiki> [[Special:Log/upload]] upload * Cortex * uploaded "[[File:Cheese Dodecahedron.jpeg]]": Cheese Dodecahedron.
10:36:26 <shachaf> Hmm, what would the code for that look like?
10:36:44 <shachaf> I'm imagining something where the alternative would also be a lot of tail calls with no case analysis except at the end.
10:36:55 <ski> i also have a feeling that one could involve composable continuations here, to get "unboxed lists" (e.g.), in which the list structure is virtual. iow we'd get a kind of fusion, with static error if we don't get the fusion we expect
10:37:04 <esowiki> [[User:Cortex/Cheese Dodecahedron]] N https://esolangs.org/w/index.php?oldid=63828 * Cortex * (+59) Created page with "[[File:Cheese Dodecahedron.jpeg|thumb|Cheese Dodecahedron]]"
10:38:15 -!- brett-soric has joined.
10:42:29 <ski> i'm imagining using ordinary pattern-matching syntax, e.g. with `case', but on values of a type of another kind. there'd possibly need to be some extra syntax for passing on the same alternative continuation
10:44:03 <ski> if you have a call `case foo ... of Left# x -> ..x..; Right# y -> Right# y', the intention is to pass on the `Right#' continuation to `foo ...', not eta expanding it. so it would perhaps be nice to have some more obvious way to indicate that
10:45:38 <ski> (if one could "use function extensionality" to write that branch simply as `Right# -> Right#', then that might work nicely)
10:46:48 <ski> i'm not really sure of what situation with "lot of tail calls with no case analysis except at the end" you were imagining ?
10:49:07 <ski> (btw, instead of `Either# Integer [Integer]', you can use `forall o. (Integer -> o) -> ([Integer] -> o) -> o'. but then you have to use explicit CPS. and perhaps not allowing them to be just any old function would allow more efficient implementation ?)
10:50:42 <ski> oh, and i should probably try to look more into different implementations of coroutines. what would you say is better and worse ways that have been used ?
10:57:22 <int-e> `? password
10:57:23 <HackEso> The password of the month has been erroneously sent to the NSA. We apologize for the inconvenience.
10:57:40 <int-e> . o O ( The password of the month is highly controversial. )
11:00:19 <shachaf> ski: I have wondered about something related to this, now that I think of it, where you pass multiple return addresses to a function.
11:00:29 <shachaf> I don't remember the context right now, though.
11:01:50 <shachaf> Let me see.
11:02:31 <shachaf> I'm not sure I can say everything about coroutines, but I can say a bit. This is in the context of a C-like language.
11:03:37 <shachaf> One approach, of course, is to allocate a stack for each coroutine, and switch between them with a function call that saves and restores a few registers (including the stack pointer and return address).
11:04:09 <shachaf> This is nice because you can just call any old function and even a nested function might switch away from the coroutine and then switch back later.
11:04:39 <shachaf> (For example asynchronous I/O is one application of this -- you can make functions that look just like calls that block a thread but they're just blocking the coroutine -- functioning as a userspace thread.)
11:06:08 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63829&oldid=63826 * A * (+136) /* H Reference */
11:09:52 <shachaf> This has a few downsides, mostly related to this being an unexpected use of the stack pointer.
11:10:35 <shachaf> You have to allocate some amount of stack space up-front, and the compiler and non-coroutine-aware functions have no reason to be sparing with it.
11:12:18 <shachaf> Worse, if you have a lot of coroutines, every time you do a context switch, your stack probably won't be in the cache. If you call some function that uses a bunch of stack space that doesn't need to be saved between context switches, that'll be a bunch of unnecessary cache misses.
11:17:47 <shachaf> Does that seem reasonable?
11:18:58 * ski nods
11:23:03 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=63830&oldid=63829 * A * (+43)
11:24:10 <esowiki> [[User:A/H spec]] N https://esolangs.org/w/index.php?oldid=63831 * A * (+3212) Created page with "== H Reference== Credits to [https://codegolf.meta.stackexchange.com/questions/2140/sandbox-for-proposed-challenges/17827#17827 Programming Puzzles and Code Golf StackExchange..."
11:24:12 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=63832&oldid=63830 * A * (-3213)
11:24:20 <shachaf> Oh, you were still here.
11:25:05 <shachaf> So the thing a coroutine does, of course, is implement a state machine, where the state is represented in the stack.
11:26:12 <shachaf> So you might implement it yourself manually -- struct Coroutine { enum State state; int x; char y; bool z; }; or something.
11:26:30 <shachaf> And the question is how to get the compiler to generate that for you.
11:26:55 <shachaf> Then your program can keep using the regular stack for regular things, and only use the "coroutine stack" for things that explicitly need to be saved between calls.
11:27:34 <shachaf> In fact the compiler can probably generate something more efficient than that struct, because it can do standard liveness analysis and allocate space in the state struct better.
11:28:22 -!- brett-soric has left.
11:28:28 <shachaf> So it might look more like struct Coroutine { enum State state; char buf[REIFIED_STACK_SIZE]; };, where the compiler allocates space out of buf.
11:28:58 <shachaf> Another thing is that "enum State" could just be an instruction pointer.
11:29:21 <shachaf> That seems like the sort of thing you'd want. Right?
11:29:41 <ski> hm, i suppose i'm not following how this state machine thing connects to the "pass the baton" view of coroutines ?
11:30:47 <shachaf> A concrete example would be useful here.
11:31:03 <shachaf> What do you mean by "pass the baton"?
11:31:14 <shachaf> (I mean a concrete example from me, of course.)
11:35:50 <esowiki> [[Esolang:Community portal]] M https://esolangs.org/w/index.php?diff=63833&oldid=58895 * A * (-4) "PPCG" is not called that anymore... I can only find this reference.
11:36:08 <shachaf> @time
11:36:10 <lambdabot> Local time for shachaf is Mon Jul 1 04:36:08 2019
11:36:19 <shachaf> I think I'll go to sleep and say more later.
11:36:23 <esowiki> [[User:A/H spec]] M https://esolangs.org/w/index.php?diff=63834&oldid=63831 * A * (-4)
11:36:41 <ski> i mean instead of having a caller and a callee, and the caller calls the callee, possibly passing some parameters, and the callee eventually returns some results to whatever caller called it -- so that the caller "knows" the callee, but not vice versa, and also the callee is "subordinate" to the caller, so that there's a fairly assymetric relationship
11:37:44 <ski> you'd have two (or more) coroutines which execute for a bit, and then pass on information (and control, the "baton") to the other coroutine, which then finds itself in a more symmetrical relation to the first one
11:39:18 <shachaf> Right, there are at least two sorts of models of coroutines, one which is more like userspace threads, and one where they activate each other explicitly.
11:39:41 <shachaf> I'm not quite sure whether they need to be treated differently or not.
11:40:20 <shachaf> But I think either approach I mentioned should work for either one?
11:40:38 <shachaf> So far what I said is really just about how to store the state.
11:40:41 <ski> yea, it's not really clear to me either
11:40:57 <ski> i didn't really follow the second approach
11:41:49 <shachaf> Because I was very vague about it, is why.
11:42:25 <ski> if you need to sleep, i probably shouldn't be keeping you up
11:42:38 <shachaf> I need a few concrete examples of the different styles to explain this well, and I don't have any.
11:42:46 * ski nods
11:42:54 <shachaf> Let's say you have Python-style generators as another (?) sort of style.
11:43:35 <shachaf> foo() { for (int i = 0; i < 10; i++) { yield(i); } }
11:43:47 <shachaf> Hmm, I'll make it a bit more complicated.
11:44:16 <ski> sortof like a lazy list, or backtracking a la Prolog, i suppose (i don't know enough details of quirks and limitations of Python-style generators to compare well)
11:44:23 <shachaf> foo() { for (int i = 0; i < 10; i++) yield(i); for (int j = 0; j < 5; j++) yield(j); }
11:44:29 <shachaf> Oh, then maybe it's not a great example. :-)
11:44:38 <shachaf> But you can see easily enough what that does.
11:44:42 <ski> yes
11:44:51 <shachaf> To make it work in the framework above, you can imagine something like this:
11:45:45 <shachaf> enum State { ONE, TWO, DONE }; struct Coroutine { enum State state; int i; int j; };
11:46:13 <shachaf> init_coroutine(struct Coroutine *c) { c->state = ONE; c->i = 0; }
11:47:40 <shachaf> int step_coroutine(struct Coroutine *c) { int v; switch (c->state) { case ONE: v = c->i++; if (c->i == 10) { c->state = TWO; }; break; case TWO: v = c->j++; if (c->j == 5) { c->state = DONE: }; break; default: assert(0); }; return v; }
11:48:17 <shachaf> Oh, I forgot, the c->i == 10 case should also set j to 0. (And if this was implemented more efficiently they'd be stored in the same memory.)
11:48:34 <shachaf> This is an extremely boring contrived case, I should come up with a realistic one.
11:50:44 <ski> i think i was thinking of a similar example (`(++)'), when i was playing with refactoring `[a]' to `forall o. (exists s. (s,s -> o,s -> a -> s)) -> o'
11:53:46 -!- salpynx has quit (Remote host closed the connection).
11:58:17 <shachaf> OK, I'll really go to sleep now.
11:59:14 <ski> good night, pleasant dreams
12:00:54 <shachaf> kmc probably racked up 600 million sleep points by now
12:00:56 <shachaf> i'm so far behind
12:09:55 -!- APic has joined.
12:15:25 -!- mniip has quit (Read error: Connection reset by peer).
12:16:40 -!- mniip has joined.
12:31:00 <Taneb> I'm racking them up right now
12:39:38 <esowiki> [[User:A/H spec]] M https://esolangs.org/w/index.php?diff=63835&oldid=63834 * A * (-1) /* H Quine via adding one operator */
12:41:01 <esowiki> [[User:A/H spec]] M https://esolangs.org/w/index.php?diff=63836&oldid=63835 * A * (-188) /* H Quine via adding one operator */
12:56:09 -!- arseniiv_ has joined.
12:59:13 -!- arseniiv has quit (Ping timeout: 245 seconds).
13:03:40 -!- xkapastel has joined.
13:21:29 <esowiki> [[ThisIsTheFoxe]] N https://esolangs.org/w/index.php?oldid=63837 * ThisIsTheFoxe * (+77) can I redirect a page like that? .-.
13:22:49 <esowiki> [[User:ThisIsTheFoxe]] M https://esolangs.org/w/index.php?diff=63838&oldid=63786 * ThisIsTheFoxe * (-2) style change
13:24:18 <esowiki> [[ThisIsTheFoxe]] M https://esolangs.org/w/index.php?diff=63839&oldid=63837 * ThisIsTheFoxe * (-15) redirect allowed? .-.
13:25:13 <esowiki> [[User:ThisIsTheFoxe]] M https://esolangs.org/w/index.php?diff=63840&oldid=63838 * ThisIsTheFoxe * (+1) /* DubDubMachine */
13:28:02 <esowiki> [[User:ThisIsTheFoxe]] M https://esolangs.org/w/index.php?diff=63841&oldid=63840 * ThisIsTheFoxe * (+180) about me .-.
13:28:23 <esowiki> [[User:ThisIsTheFoxe]] M https://esolangs.org/w/index.php?diff=63842&oldid=63841 * ThisIsTheFoxe * (-4) /* About Me */ semantics .-.
13:32:35 <esowiki> [[Esolang:Introduce yourself]] M https://esolangs.org/w/index.php?diff=63843&oldid=63769 * ThisIsTheFoxe * (-10) Updated my signature
13:33:48 <esowiki> [[ThisIsTheFoxe]] https://esolangs.org/w/index.php?diff=63844&oldid=63839 * ThisIsTheFoxe * (-62) I am stupid. Pls `rm this.page`
13:34:19 -!- Lord_of_Life_ has joined.
13:35:27 -!- Lord_of_Life has quit (Ping timeout: 245 seconds).
13:35:32 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
13:38:23 <esowiki> [[ThisIsTheFoxe]] https://esolangs.org/w/index.php?diff=63845&oldid=63844 * ThisIsTheFoxe * (+12)
13:41:11 <esowiki> [[ThisIsTheFoxe]] https://esolangs.org/w/index.php?diff=63846&oldid=63845 * ThisIsTheFoxe * (+54) pls dilet dis
13:55:46 <esowiki> [[L33t]] https://esolangs.org/w/index.php?diff=63847&oldid=30840 * ThisIsTheFoxe * (+4577) added a few examples
13:57:38 <esowiki> [[L33t]] https://esolangs.org/w/index.php?diff=63848&oldid=63847 * ThisIsTheFoxe * (+285) /* Fibbonacci */
13:58:53 <int-e> . o O ( poor ais523 )
14:05:42 <esowiki> [[DubDubMachine]] https://esolangs.org/w/index.php?diff=63849&oldid=63791 * ThisIsTheFoxe * (-44) /* Examples */
14:06:19 <esowiki> [[DubDubMachine]] M https://esolangs.org/w/index.php?diff=63850&oldid=63849 * ThisIsTheFoxe * (+2) finished cat program
14:30:29 <esowiki> [[DubDubMachine]] https://esolangs.org/w/index.php?diff=63851&oldid=63850 * ThisIsTheFoxe * (+293) Added more examples
14:32:08 <esowiki> [[DubDubMachine]] M https://esolangs.org/w/index.php?diff=63852&oldid=63851 * ThisIsTheFoxe * (+12) /* Cat program */
14:43:58 <arseniiv_> how do you think, is it possible to build an arbitratry tree′ in Punctree?
14:44:56 -!- arseniiv_ has changed nick to arseniiv.
14:59:05 <int-e> arseniiv: _ + ~ should be enough to build an arbitrary context?
15:00:01 <int-e> (Would you mind terribly if I replaced all "tree'" by "context"?)
15:00:12 <arseniiv> no, I wouldn’t
15:01:31 <arseniiv> hm I seemed to have a time to forget full semantics of +
15:01:50 <arseniiv> maybe yes, then
15:12:23 <int-e> arseniiv: Hmm, do you intend to treat 2 t t' as a zipper? (I think not.)
15:13:18 <int-e> (i.e., a pair where the second component is a context)
15:13:43 <arseniiv> int-e: no, I didn’t intent
15:13:56 <arseniiv> though I don’t know if I’ll change my mind :D
15:14:13 <arseniiv> s/intent/intend
15:15:07 <int-e> I mean I'm going over the whole text right now anyway... so I'll change that u != _ to u = 2 t' t there.
15:15:36 <int-e> (I'm only up to "In this language there are no trees [...]"...)
15:15:39 <arseniiv> where specifically?
15:17:35 <int-e> arseniiv: I'd hope that text snippet is unique? It's at the start of the paragraph.
15:17:49 <int-e> In this language there are no trees, but remember that ''u′'' = 2 ''t′'' ''t'' is a context, and a zipper is a pair isomorphic to ''u''. So further we’ll treat ''u′'' = 2 ''t′'' ''t'' as a zipper (''t′'', ''t''), too.
15:17:57 <arseniiv> I didn’t find it :D
15:18:00 <arseniiv> ah, that one
15:19:21 <arseniiv> I was searching the wrong thing
15:19:52 <arseniiv> you are right
15:20:30 <arseniiv> don’t know why I overgeneralized it that time
15:21:28 <esowiki> [[Punctree]] M https://esolangs.org/w/index.php?diff=63853&oldid=63814 * Arseniiv * (+13) /* Values */ degeneralization
15:23:49 <int-e> aaaargh
15:25:53 <int-e> arseniiv: why why why did you edit when I announced that I was editing...
15:26:58 <esowiki> [[Punctree]] https://esolangs.org/w/index.php?diff=63854&oldid=63853 * Int-e * (+90) Main change: tree' --> context. But I did some proof-reading as well.
15:27:12 <arseniiv> int-e: I thought you hadn’t yet started
15:27:15 <int-e> arseniiv: (mediawiki is terrible at merging)
15:27:37 <arseniiv> sorry :)
15:27:53 <int-e> anyway, there you go... please review, and feel free to revert if you disagree
15:28:45 <arseniiv> only if to check what proofreading entailed
15:29:58 <int-e> Ah. Θ ::= T | T′ is wrong now. But I'll wait for you.
15:36:49 <arseniiv> i think it’s all good, thank you. BTW I do think “context” is actually easier to read. Though originally I treated π₁ and π₂ as solely tree operations, maybe placing α, β there makes a better note that they are no good for a context
15:37:15 <int-e> arseniiv: And sorry for that outburst... it was mostly theatrical, but I'm not sure whether IRC carried that part of the message.
15:37:37 <arseniiv> int-e: which one?
15:37:44 <int-e> "<int-e> aaaargh"
15:38:15 <esowiki> [[Punctree]] M https://esolangs.org/w/index.php?diff=63855&oldid=63854 * Int-e * (-2) /* Values */ fixup: T -> C
15:38:27 <int-e> esowiki: wanna learn unicode?
15:38:28 <arseniiv> I might not notice it for what it is. Ah, that one. No, it’s totally okay
15:39:47 <arseniiv> it was fun when esowiki mentioned <where is that letter…> edits
15:40:21 <arseniiv> now I feel like it just can’t find those characters in time like me now
15:41:33 <arseniiv> Tifinagh letters are nice
15:42:52 <arseniiv> like you’re in a dream and trying to read some latin/cyrillic/greek text and then you notice it’s all not quite right
15:43:14 <int-e> I mostly don't bother with Unicode. I'd need to investigate X11 input methods... I played around with scim ages ago but never grew used to it, and the fact that the behavior depends on the toolkit was annoying.
15:43:45 <int-e> When I do use Unicode I use gucharmap. So it's *very* slow and tedious.
15:44:11 <arseniiv> (why do I use Windows charmap at all? There are better programs to search characters, with better name search even)
15:44:31 <arseniiv> oh, a Windows one is at least fast
15:44:50 <arseniiv> though maybe when using a pretty small font
15:46:11 -!- Lord_of_Life has quit (Excess Flood).
15:46:33 <arseniiv> usually I input characters I may need with AutoHotkey, but I hadn’t bothered adding that reversed F to the script
15:47:27 -!- Lord_of_Life has joined.
15:48:31 <arseniiv> here it is, finally: Ⅎ — and no one needs it now
16:07:08 -!- MDude has joined.
16:09:18 <int-e> arseniiv: "bars are invisible" ... if we have ... | x | as the stack, can we pop the x from underneath the bar?
16:09:48 * int-e isn't sure what the bars are all about tbh.
16:10:40 <arseniiv> int-e: yeah we can
16:11:07 <arseniiv> yes, bars were a mistake. I should have made something like pointers to elements of the stack instead
16:34:50 -!- yharnam has joined.
16:45:00 <int-e> arseniiv: Hmm, what does eval() do, exactly? Run the code, then inspect the top of the stack? Is the top of the stack kept?
16:45:54 <int-e> (Is the modified stack kept or is the original stack restored? "When evaluating a code block, no special things are done to the stack before or after it." is not entirely clear.)
16:47:58 <arseniiv> oh, there’s another inaccuracy. eval(body) and eval(else_) were intended to be simply “run and that’s all”, but eval(cond) is “run and then pop the value”. It definitely needs to be rewritten, I’ll do something
16:48:08 <arseniiv> int-e: ^
16:49:04 <arseniiv> in the interpreter I actually popped after “eval”(cond) and didn’t do anything after “eval”(body/else_)
16:49:30 <arseniiv> oh, “else_” with an underscore is what I called it in Python
16:51:23 <arseniiv> I’ll promote that description to a subsection
16:59:26 <int-e> arseniiv: http://paste.debian.net/1089917/ is s start of an interpreter but I didn't bother with the bars, and I have not tested anything
17:00:00 <int-e> hmm hmm
17:01:25 <arseniiv> int-e: nice! Don’t you want to represent C as a zipper-without-a-subtree though? (isomorphic to [(Direction, T)] where data Direction = L | R)
17:02:12 <arseniiv> though with singly-linked lists it will be undesirable for some operations
17:04:39 <zzo38> Now downloading articles from the server is implemented in bystand.
17:06:31 <int-e> arseniiv: I didn't really consider that.
17:06:56 <int-e> arseniiv: I find what I have easier to think about.
17:08:12 <esowiki> [[Punctree]] M https://esolangs.org/w/index.php?diff=63856&oldid=63855 * Arseniiv * (+523) /* Syntax */ + Loop command
17:08:42 <arseniiv> aaah I was going to preview it and clicked the wrong button
17:10:27 -!- sprocklem has quit (Ping timeout: 245 seconds).
17:11:50 <esowiki> [[Punctree]] M https://esolangs.org/w/index.php?diff=63857&oldid=63856 * Arseniiv * (+38) /* Loop command */ now it looks as intended
17:12:08 <arseniiv> hopefully it will be less confusing
17:13:07 <arseniiv> also how do you find my mix of C-like and Pascal-like syntax in pseudocode?
17:13:22 <arseniiv> isn’t it lovely
17:14:02 -!- Phantom_Hoover has joined.
17:19:19 <zzo38> Is there a fgets() function that allocates the memory needed to store it, in some program?
17:22:10 <int-e> arseniiv: From an efficiency perspective you are probably right that one should represent contexts as a sequence of pairs like that... and then use Data.Seq or something similar that offers efficient concatenation and destruction on both ends.
17:23:17 -!- xkapastel has quit (Quit: Connection closed for inactivity).
17:23:51 <arseniiv> int-e: though, I started with tree-like definition too
17:24:16 <int-e> KISS
17:24:17 <arseniiv> (and then I got unsatisfied and changed to a zippery one)
17:24:43 <arseniiv> main complexities in my code are from elsewhere, BTW
17:25:10 <int-e> I bet you can go crazy trying to optimize the stack representation
17:34:26 <arseniiv> hm I tried that for some extent but surrendered and made it a literal stack of values and bars
17:35:07 <arseniiv> and then after each stack action, two topmost bar positions are recalculated
17:37:11 <arseniiv> hopefully I’m not Knuth enough
17:39:50 -!- xkapastel has joined.
17:40:06 <int-e> What's bad about being Knuth? Aside from his age, perhaps.
17:47:09 <arseniiv> many microoptimizations
17:47:12 <arseniiv> doing them
17:48:03 <zzo38> I think Knuth is a good computer programmer
17:48:07 <arseniiv> also writing a book which almost no one else could continue
17:48:25 <arseniiv> agree he is good
17:48:54 <zzo38> Yes, I want to read the book; I have read a few and it is good.
17:48:59 <arseniiv> and he had an influence on the world
17:49:38 <arseniiv> but I’m glad I’m not him. Two Knuths would be tg :P
17:50:04 <int-e> arseniiv: I'll grant that he's not modern. He grew up at a time when all those microptimizations made a difference.
17:50:26 <int-e> Nowadays... that has become rare.
17:50:30 <arseniiv> agree too
17:50:40 <arseniiv> on both of those
17:51:20 <int-e> (what's cheaper... 10h of software engineering time or buying an extra AWS instance for running a 50h computation?)
17:51:52 <zzo38> I will use microoptimizations when writing in assembly language especially.
17:52:55 <arseniiv> though I talked with a couple of people for whom such optimizations were a must for a reason (small microcontrollers and a code to search for graphs with specified rare properties)
17:53:00 <zzo38> (And found a lot of existing code that is not optimized so well.)
17:53:23 <int-e> Microoptimizations pay off when they are reused often in computation bottlenecks. So... in hardware, in compiler output, in some drivers.
17:53:54 <int-e> Microcontrollers for mass produced items probably still count.
17:54:39 <arseniiv> yeah, bottleneck argument is basically a specialized “optimize after profiling” argument
17:55:19 <zzo38> The trick that I used to speed up address decoding and bank switching in Famizork is one that I don't know if anyone else has used it.
17:59:09 <zzo38> Also, in some kind of computers, you can use unofficial instructions for optimizations.
18:00:22 <int-e> arseniiv: Hah. How often does the term "software stack" occur in TAoCP?
18:01:47 <arseniiv> int-e: I presume less than once?
18:02:44 <int-e> I'm honestly not sure.
18:03:49 <int-e> But if it does occur I expect that it will be a counterpart to "hardware stack" which could either refer to built-in push, pop, call, ret (operating on memory), or to some limited stack built into the CPU.
18:05:10 <zzo38> MMIX uses a register stack.
18:08:44 <esowiki> [[Deadfish]] https://esolangs.org/w/index.php?diff=63858&oldid=63774 * Areallycoolusername * (+8) /* Implementations */
18:08:46 -!- yharnam has quit (Remote host closed the connection).
18:11:17 <zzo38> And, on MMIX the return address is not stored in the register stack; only the local registers are.
18:19:51 -!- b_jonas has joined.
18:20:04 <b_jonas> `olist 1169
18:20:07 <HackEso> olist 1169: shachaf oerjan Sgeo FireFly boily nortti b_jonas
18:24:58 <esowiki> [[Deadfish]] https://esolangs.org/w/index.php?diff=63859&oldid=63858 * Areallycoolusername * (+23) /* Implementations */
18:28:15 -!- Guest17850 has quit (Changing host).
18:28:15 -!- Guest17850 has joined.
18:28:17 -!- Guest17850 has changed nick to lizzie.
18:33:53 <zzo38> Does GNU linker support linking time assertions in the program?
18:34:08 <zzo38> Does LLVM support it?
18:41:31 <b_jonas> oh nice, int-e's complains about arseniiv's esolang writeup overlap with mine
18:43:53 <b_jonas> zzo38: re fgets, do you mean malloc-allocates the space at each call? if so, yes, called getline.
18:45:50 <zzo38> O, yes, it is. It says they were originally GNU extensions but are now POSIX.
18:46:15 <shachaf> kmc: how many sleep points did you earn
18:48:02 <kmc> shachaf: not that many :(
18:48:04 <kmc> I dunno
18:48:07 <b_jonas> zzo38: re fgets, do you mean malloc-allocates the space at each call? if so, yes, called getline.
18:48:10 <kmc> maybe I should drink less caffeine
18:48:14 <b_jonas> shachaf: re sigils, besides BASIC, there's also INTERCAL
18:48:33 <b_jonas> zzo38: yes, it originates from gnu libc
18:48:37 <shachaf> kmc: oh no
18:49:11 <shachaf> kmc: i award you 800 million cuddly points
18:49:23 <shachaf> consolation prize
18:49:40 <kmc> aww
18:49:42 <kmc> hugs
18:49:43 <shachaf> b_jonas: Does BASIC even have identifiers that refer to types?
18:49:56 <zzo38> Yes, INTERCAL also uses sigils for types, with prefix instead of a suffix like BASIC
18:49:57 <b_jonas> zzo38: related gnu libc extensions are asprintf, and the "a" flag in scanf (which actually technically conflicts with the C standard definintion, because "%a" is supposed to be equivale to to "%g", but glibc definitely has priority there)
18:50:09 <b_jonas> shachaf: that depends on which BASIC dialect you ask
18:50:21 <zzo38> BASIC does have names of types, such as INTEGER and LONG and so on.
18:50:41 <zzo38> where % is INTEGER, & is LONG, ! is SINGLE, and # is DOUBLE.
18:50:45 <b_jonas> shachaf: newer versions of BASIC do have identifiers that refer to types, older ones don't
18:51:53 <shachaf> But I'm not talking about using a sigil to indicate what the type of something is.
18:52:06 <shachaf> I'm talking about indicating syntactically whether an identifier is a type.
18:52:20 <shachaf> For example Haskell uses an uppercase letter.
18:52:38 <arseniiv> zzo38: I remember something like $ for string also, is it from another Basic dialect?
18:53:21 <zzo38> Yes, $ is for strings.
18:53:34 <zzo38> (I forgot that one)
18:53:51 <zzo38> shachaf: No, there is no such thing in BASIC.
18:54:17 <arseniiv> for each string, Basic awards us a $
18:54:19 <zzo38> (A variable can also have the same name as a structure type in BASIC.)
18:54:37 <arseniiv> we need writing long string-heavy programs
18:58:04 <zzo38> The "OAC" compiler for OASYS text adventure game system has no sigils and no reserved words either, and uses type names without any syntactic indication. The "OAA" compiler does uses sigils, both prefixes and suffixes.
18:58:07 <zzo38> Suffixes are @ for a pointer to a object, # for a integer (either 16-bits or 32-bits), $ for a index into the string table, ^ for a pointer (only for locals and return values), and nothing for void (only for return values).
18:58:26 <esowiki> [[User:ThisIsTheFoxe]] https://esolangs.org/w/index.php?diff=63860&oldid=63842 * Total Vacuum * (+0)
18:59:07 <zzo38> Prefixes are , for locals (including arguments), . for properties, & for methods, * and ? for classes, % for global variables, and ! for preallocated objects.
18:59:42 <zzo38> And, unlike BASIC, the prefix and suffix alone are sufficient you do not need to add letters in between.
19:06:03 <esowiki> [[Deadfish]] https://esolangs.org/w/index.php?diff=63861&oldid=63859 * Areallycoolusername * (+5) /* C++ Codegolfed */
19:37:58 -!- MDude has quit (Ping timeout: 245 seconds).
19:38:30 -!- FreeFull has joined.
20:08:57 -!- user24 has joined.
20:37:21 -!- atslash has quit (Quit: This computer has gone to sleep).
20:58:52 -!- AnotherTest has quit (Ping timeout: 252 seconds).
22:16:31 -!- user24 has quit (Quit: Leaving).
22:18:18 -!- uplime has changed nick to ^.
22:24:26 -!- nfd has joined.
22:26:52 -!- nfd9001 has quit (Ping timeout: 252 seconds).
22:51:20 <b_jonas> `? bitcoin
22:51:22 <HackEso> bitcoins are coins that have been drilled through with a bit, and can be strung together in long chains. This practice dates to ancient China, and the Chinese remain experts in bitcoin manufacturing. A chain can support up to 21 million coins before breaking.
22:54:06 <shachaf> `cwlprits bitcoin
22:54:12 <HackEso> Jafët
22:54:31 <b_jonas> A bitcoin also means a coin of which a criminal bites off a small part to obtain a small amount of gold, but then passes the coin on as if it had the full original value. Isaac Newton invented a machine that puts a regular ridged pattern around the edge of the coin so that bitcoins can be easily recognized.
22:54:34 <shachaf> wow, that must've been a century ago
22:54:37 <shachaf> `dowg bitcoin
22:54:38 <HackEso> 10459:2017-03-20 <Jafët> learn bitcoins are coins that have been drilled through with a bit, and can be strung together in long chains. This practice dates to ancient China, and the Chinese remain experts in bitcoin manufacturing. A chain can support up to 21 million coins before breaking.
22:55:04 <shachaf> Why did Isaac Newton invent it?
22:56:51 <b_jonas> shachaf: his job was catching counterfeiters
22:58:23 <b_jonas> also maybe it helped his alchemy experiments
23:09:30 <zzo38> I thought he invented it because he was made master of the mint, which was done because the mint could mostly run by itself, but he insisted to do something about it anyways.
23:10:15 <int-e> `? password
23:10:17 <HackEso> The password of the month has been erroneously sent to the NSA. We apologize for the inconvenience.
23:10:43 <int-e> . o O ( This was your second monthly password reminder. )
23:14:51 <b_jonas> don't look at me, unless you want another random dictionary words password like I set the last time
23:15:45 <shachaf> `learn The password of the month is int-e's job.
23:15:47 <HackEso> Relearned 'password': The password of the month is int-e's job.
23:16:16 <int-e> I guess that's a fair assessment.
23:16:36 <int-e> But now I have 39 days to plan my revenge!
23:16:51 <int-e> 30.
23:16:53 <shachaf> Is this month 39 days long?
23:16:54 <shachaf> Ah.
23:17:36 <int-e> No, the keyboard jumped.
23:17:58 <int-e> (It's the only explanation! My typing is perfect!!!1)
23:19:28 <b_jonas> The password of the month is notable housing compliment vitamin.
23:24:55 -!- b_jonas has quit (Quit: leaving).
23:28:15 <shachaf> `? july
23:28:16 <HackEso> july? ¯\(°​_o)/¯
23:28:27 <shachaf> July is the month of the password.
23:51:32 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).
23:51:54 <int-e> . o O ( cute: http://paste.debian.net/1089950/ )
23:53:12 <shachaf> int-e: oh no, they got your deployment-config.json
23:54:08 <int-e> yeah wtf is that anyway
23:54:39 <arseniiv> oh, it seems the interpreter started working!
23:54:57 <arseniiv> °> +a
23:54:57 <arseniiv> [Compile error] Unknown character ‘a’ at 1.
23:55:57 <arseniiv> just kidding. It can do more
23:56:48 <arseniiv> also it’s quite polite and says bye on exit
23:57:02 <int-e> https://github.com/amoussard/sftp-deployment/issues/130
23:57:36 <shachaf> presumably deployment-config is the opposite of employment-config
23:58:37 <int-e> hmm https://github.com/IanEdington/deploy-php/blob/master/deployment-config.json#L16
23:58:59 * ski was about to remark on how far the `0' key is from the `9' key
23:59:19 <int-e> ski: yes, they're miles and miles apart... if you use the numeric keypad
23:59:38 <shachaf> I haven't used a computer with a numeric keypad in years.
23:59:59 <int-e> my computer doesn't have a numeric keypad either ;-) my keyboard does.
←2019-06-30 2019-07-01 2019-07-02→ ↑2019 ↑all