code logs -> 2017 -> Mon, 14 Aug 2017< code.20170813.log - code.20170815.log >
--- Log opened Mon Aug 14 00:00:02 2017
00:19 Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:19 mode/#code [+qo Vornotron Vornotron] by ChanServ
00:20 Vornucopia [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:22 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
00:24 Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
00:25 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
00:25 mode/#code [+o mac] by ChanServ
00:27 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
00:27 mode/#code [+o macdjord|slep] by ChanServ
00:27 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
00:29 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
00:38 Vornucopia is now known as Vornicus
00:38 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:39 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
00:39 mode/#code [+o macdjord] by ChanServ
00:41 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
00:42 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
00:42 mode/#code [+o mac] by ChanServ
00:44 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
01:04 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
01:05 mode/#code [+o macdjord] by ChanServ
01:06 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
01:13 Reiv [NSkiwiirc@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
01:21 RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has quit [Ping timeout: 121 seconds]
01:22 ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
01:22 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
01:22 mode/#code [+o mac] by ChanServ
01:25 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
01:27 Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
01:32 Jessikat [Jessikat@Nightstar-bcpb26.dab.02.net] has joined #code
01:36
<~Vornicus>
I seek guides for ECS
02:08
<~Vornicus>
specifically ones that cover designing things that are amenable to implementation in same
02:35 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
02:36 mode/#code [+o macdjord|slep] by ChanServ
02:38 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Operation timed out]
02:38 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
02:38 mode/#code [+o macdjord] by ChanServ
02:40 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
03:08 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
03:08 mode/#code [+o mac] by ChanServ
03:11 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
03:11 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
03:11 mode/#code [+o macdjord] by ChanServ
03:13 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
04:00 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
04:00 mode/#code [+o mac] by ChanServ
04:03 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
04:05 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
04:05 mode/#code [+o macdjord] by ChanServ
04:05 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
04:06 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
04:06 mode/#code [+o mac] by ChanServ
04:09 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
04:47 Degi [Degi@Nightstar-9fd2g1.dyn.telefonica.de] has quit [Connection closed]
05:01 Derakon is now known as Derakon[AFK]
05:40 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
05:41 mode/#code [+o macdjord|slep] by ChanServ
05:43 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
06:16 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
06:16 mode/#code [+o mac] by ChanServ
06:17 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
06:31 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
06:31 mode/#code [+o macdjord] by ChanServ
06:33 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
06:58 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
06:58 mode/#code [+o mac] by ChanServ
07:01 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
07:09 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
07:09 mode/#code [+o macdjord] by ChanServ
07:11 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
07:21 ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has joined #code
07:25 macdjord is now known as macdjord|slep
07:37 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [[NS] Quit: Wenn ist das Nunstück git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput]
07:45 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
07:45 mode/#code [+o macdjord] by ChanServ
07:51 celticminstrel [celticminst@Nightstar-4r2i8l.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:58 Jessikat` [Jessikat@Nightstar-lacm38.dab.02.net] has joined #code
08:01 Jessikat [Jessikat@Nightstar-bcpb26.dab.02.net] has quit [Ping timeout: 121 seconds]
14:05 celticminstrel [celticminst@Nightstar-4r2i8l.dsl.bell.ca] has joined #code
14:05 mode/#code [+o celticminstrel] by ChanServ
14:28 Jessikat [Jessikat@Nightstar-341e0t.dab.02.net] has joined #code
14:32 Jessikat` [Jessikat@Nightstar-lacm38.dab.02.net] has quit [Ping timeout: 121 seconds]
15:11 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
15:11 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:11 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:40 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
15:41 mode/#code [+o mac] by ChanServ
15:43 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
15:46 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
15:46 mode/#code [+o Reiv] by ChanServ
16:40 celticminstrel [celticminst@Nightstar-4r2i8l.dsl.bell.ca] has quit [Operation timed out]
16:43 celticminstrel [celticminst@Nightstar-1vj9md.dsl.bell.ca] has joined #code
16:43 mode/#code [+o celticminstrel] by ChanServ
17:44 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
18:56
<&jeroud>
The only ECS I know offhand is Amazon's Elastic Container Service, and I wouldn't touch that without significantly more remuneration than anyone is likely to want to give me.
19:21 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
19:21 mode/#code [+o Reiv] by ChanServ
19:32 Degi [Degi@Nightstar-6sb4ii.dyn.telefonica.de] has joined #code
19:33
<~Vornicus>
Entity Component System
19:33
<~Vornicus>
I'm looking for in-depth guides on how to design for it.
19:34
<&jeroud>
Ah.
19:42 Jessikat` [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
19:48 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
20:03 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:03 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:06 * [R] stares at this Java library
20:06
<&[R]>
Wonders why the hell Java is still lacking anything like C's macros
20:07
<@celticminstrel>
Java devs believe in verbosity.
20:07
<&jeroud>
Because C's macros are one of the most terrible ideas in the history of programming.
20:07
<@celticminstrel>
Also that.
20:08
<&jeroud>
But if you want Java without most of the verbose and terrible bits, write Clojure code.~
20:08
< ToxicFrog>
The real question is why doesn't it have anything like Lisp's macros, a question we should ask of every language
20:09
<&[R]>
Remind me how lisp's macros work? Also why they aren't "terrible" like C's supposedly are?
20:11
<&jeroud>
[R]: Because they are more structured than free text replacement.
20:12
<&jeroud>
IIRC, they are implemented as AST transforms or something.
20:12
<&jeroud>
They if they compile at all, they are guaranteed to produce legal (although not necessarily sensible) code.
20:12
< ToxicFrog>
Yeah
20:12
< ToxicFrog>
A Lisp macro is a function that takes an AST as input and returns a new AST
20:12
<&jeroud>
*So if they
20:13
< ToxicFrog>
And runs at compile time
20:13
< ToxicFrog>
So you have the full power of the language available and whatever it returns is guaranteed to be well-formed (although not necessarily semantically useful)
20:13
<&jeroud>
This is the only sensible way to implement macros.
20:15
<&[R]>
Would that in theory allow you to cut down on the amount of text needed to make an instance of an anon Runnable-like? (This specific one also needs some of Java's magic comments, whatever they're called)
20:15
<&jeroud>
It means you can't use macros to add new syntax or anything, but they are easy to reason about.
20:15
<&[R]>
Since a function on its own wouldn't be legal Java
20:16
< Jessikat`>
which is awful
20:16
<&jeroud>
[R]: A lisp-style macro invocation looks like a function call.
20:16
<&[R]>
That doesn't answer my question :p
20:16
<&jeroud>
[R]: Do you mean annotations?
20:17
< ToxicFrog>
jeroud: I'm not sure it's the only way; I've played around with a lua macro system that gives you access to the CFG and lexicon the compiler uses, and changes to it take effect immediately, and that worked out pretty well
20:17
<&[R]>
I could not tell you. It's the @symbol stuff that Java reads from comments.
20:17
< ToxicFrog>
And this does permit you to add new syntax, which is often more convenient in a language like lua that, you know, has syntax
20:17
<&[R]>
Which BTW, I must admit is amazingly braindead.
20:17
< Jessikat`>
reads from comments x_x
20:17
<~Vornicus>
I don't understand why you want macros at all
20:17
<~Vornicus>
Like - functions are things
20:17
< ToxicFrog>
Vornicus: it lets you implement new special forms
20:18
< Jessikat`>
because macros (in the LISP sense) are the most powerful abstraction mechanism. they're just functions on code.
20:18
<&[R]>
Vornicus: because I don't want to type or copy/paste 50 characters whose only purpose is to say "here's a function"
20:18
<&jeroud>
So instead of a pile of Runnable boilerplate, you'd call a make_runnable(some, params) function that returns a Runnable.
20:18
< Jessikat`>
except it's guaranteed to be replaced at compile time
20:19
<&jeroud>
Except presumably the macro syntax would let you do thing like add function bodies.
20:19
< ToxicFrog>
Vornicus: in particular, a macro lets you write a "function" that does not evaluate its arguments, which is important when those arguments shouldn't be unconditionally evaluated
20:19
< ToxicFrog>
E.g. you can't implement `if` without something like that
20:19
< Jessikat`>
it's a function
20:19
< Jessikat`>
no need for scare quotes D:
20:19
< ToxicFrog>
Ok, fair
20:19
<&[R]>
What scare quotes?
20:19
<&[R]>
Oh nm
20:21
<&jeroud>
A macro is basically just a function that runs at compile time.
20:21 * Jessikat` is increasingly of the opinion that compile time is an illusion
20:21
< ToxicFrog>
Vornicus: for a real world example, macros let me write something like (defmogrifiers (regex [capturing-groups...] body...)...) and have that turned into an ordered map of regex -> function that operates on the regex's capture groups
20:21
<&jeroud>
Presumably in Java you'd need a convenient lambda syntax for them to be useful.
20:22
< Jessikat`>
this creates that syntax though, no?
20:23
< ToxicFrog>
And the whole thing into a single top-level function definition that, given a line of text, returns the result of calling the first matching function on it.
20:23
< ToxicFrog>
Which ofc you can do without macros, but you end up with a lot of boilerplate.
20:23
<&jeroud>
Jessikat`: The syntax would need to either be part of the language in general or part of the macro syntax if you want to include code in your macro invocation.
20:24
< Jessikat`>
not if the code was part of a block
20:24
< Jessikat`>
actually I guess Ruby has some of this capability as part of its invocation syntax
20:24
< Jessikat`>
huh
20:24
< Jessikat`>
either way, every language is wrong, even Lisp
20:25
<&jeroud>
The more dynamic languages don't really need macros in the same way.
20:25
< ToxicFrog>
Every language is wrong, but some are wronger than others~
20:25
< Jessikat`>
every language is wrong, but some are C++
20:25
<&jeroud>
For example, Python's decorators serve much the same purpose.
20:26
<&jeroud>
They are, in fact, explicitly functions that take a class or a function as a parameter and return a class or function.
20:28
< ToxicFrog>
jeroud: they can't modify the function they take as a parameter, though, only wrap it.
20:28
<&jeroud>
They can do whatever they like to it.
20:29
< ToxicFrog>
They can't change how it behaves internally, or inject new control flow at all of its call sites
20:29
< ToxicFrog>
They can't do compile-time consistency checking of its arguments
20:29
<&jeroud>
They can if they want to muck about in its code objects. :-P
20:29
<&jeroud>
And they can do runtime checking, etc.
20:30
< ToxicFrog>
In fact, it occurs to me that the only languages I've seen that have real macros have been dynamically typed.
20:31
<&jeroud>
Good point.
20:31
<&McMartin>
I still need to experiment with Rust's system.
20:31
<&jeroud>
Although... Doesn't Rust have macros?
20:31
<&McMartin>
It's had several forms of them, and there's still one large gap it has
20:32
<&McMartin>
... though apparently this gap is shared with most other macro systems and in particular it covers a thing I thought Haskell did, but it doesn't.
20:32
<&McMartin>
(specifying your own 'derives' rules)
20:32
<&jeroud>
Rust is back on my "to look at again when it matures a bit" pile.
20:32
<&McMartin>
The last time I looked at Rust macros they looked like an uglier version of Scheme's (syntax-rules) special form.
20:33
< ToxicFrog>
jeroud: it didn't last time I looked, I think, but that was a while ago and it's under constant development.
20:33
<&McMartin>
It has a feature in stable now it calls macros
20:33
<&jeroud>
Specifically, the machine must take care of all the boring lifetime maintenance.
20:33
<&McMartin>
It's always *had* them, though, because it needed them to be able to handle things that look like printf.
20:34
<&McMartin>
jeroud: It's better at that now than it was, but if you mean "all" you will wait forever
20:34
< ToxicFrog>
jeroud: anyways, going back to my original point, python decorators are different-in-kind from lisp macros both in what they can do and in when they execute.
20:34
<&McMartin>
Rust is specifically for the usecase of "I want to use lifetime semantics to handle memory management and I want it enforced by the compiler"
20:34
<&jeroud>
I'm happy to get compiler errors when the lifetime stuff is wrong.
20:35
<&McMartin>
It is more aggressive about lifetime elision now.
20:35
< Jessikat`>
*more*?
20:35
<&McMartin>
But a lot of things that look reasonable still require tracking lifeimes.
20:35
< Jessikat`>
oh, right
20:35
<&jeroud>
But if I pass two things with a lifetime into another thing, I don't want to have to manually write a bunch of lifetime declarations.
20:35
<&McMartin>
Some of these are common enough patterns that it will decide what you must have meant if you say nothing in a way that is not actually the most general assumption and might not have been what you wanted.
20:36
<&McMartin>
As long as you're matching a related discipline, that will now work.
20:36
<&McMartin>
But you have to match that discipline, because the type system does not demand it.
20:37
<&McMartin>
(That is, if you leave it blank, you get something more restrictive than some things that can be specified.)
20:37
<&McMartin>
(But they've done this because it usually works out.)
20:38
<&McMartin>
Here we go.
20:38
<&McMartin>
https://doc.rust-lang.org/book/second-edition/ch10-03-lifetime-syntax.html
20:38
<&McMartin>
Search for the phrase "end of the three rules"
20:42
<&McMartin>
So the main case where you still have to specify lifetimes is something like fn f(x: &i32, y: &i32) -> &i32
20:42
<&McMartin>
The plausible assumption is that the returned reference shares the lifetime of one of the two arguments but it doesn't know which one and it's not willing to assert the two input arguments have a matching lifetime either.
20:58 Jessikat`` [Jessikat@Nightstar-pftoq3.dab.02.net] has joined #code
21:01 Jessikat [Jessikat@Nightstar-341e0t.dab.02.net] has quit [Ping timeout: 121 seconds]
21:03 Jessikat`` [Jessikat@Nightstar-pftoq3.dab.02.net] has quit [Ping timeout: 121 seconds]
22:00
<@celticminstrel>
...so wait, does that mean C++ templates are a little like Lisp macros?
22:01
<@celticminstrel>
I also recall using something called "macros" in UCB logo. It looked exactly like a procedure, but effectively ran in the context of the caller, allowing it to declare local variables or something.
22:01
<&McMartin>
C++ templates fail the criteria originally listed in that while the compiler does check them and is aware of them while checking, it is still a textual replacement and not an AST-level operation.
22:02
<@celticminstrel>
I see.
22:13 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
22:13 mode/#code [+o macdjord] by ChanServ
22:14
< ToxicFrog>
celticminstrel: LOGO is in fact a lisp variant, so it would not surprise me to discover that it has full power macros.
22:15 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
22:16 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
22:16 mode/#code [+o mac] by ChanServ
22:17
<@celticminstrel>
From what I recall they don't sound much like "a function taking an AST and returning an AST", though...
22:18 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
22:20
< ToxicFrog>
They look pretty similar to that in practice: https://turing.cs.hbg.psu.edu/LOCAL/ucblogo/ucbl_9.htm
22:21
<@celticminstrel>
I see.
22:22
<@celticminstrel>
Oh, I'd forgotten they operated by returning a list of instructions...
22:24
<@celticminstrel>
"Lisp users should note that Logo macros are NOT special forms."
22:24
< ToxicFrog>
Huh.
22:53
<&McMartin>
Logo is a wacky Lisp dialect on several metrics.
22:54
<&McMartin>
Dynamic scoping by default being one of the major ones, yes~
22:55
< ToxicFrog>
I learned recently that bash locals use dynamic scope.
22:57
<&McMartin>
By reading about it or by a script exploding due to SURPRISE DYNAMIC SCOPE
22:58 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
23:01 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
23:01 mode/#code [+o Reiv] by ChanServ
23:02
<~Vornicus>
what is dynamic scope?
23:02
<&McMartin>
Lexical scope is where you can see the local variables of the function that defined you
23:02
<&McMartin>
Dynamic scope is where you can see the local variables of the function that *called* you
23:03
<~Vornicus>
ah
23:03
< ToxicFrog>
McMartin: by reading about it
23:26 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
23:26 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:26 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:49 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
23:49 mode/#code [+o macdjord] by ChanServ
23:50 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
23:51 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
23:51 mode/#code [+o Reiv] by ChanServ
23:52 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
--- Log closed Tue Aug 15 00:00:04 2017
code logs -> 2017 -> Mon, 14 Aug 2017< code.20170813.log - code.20170815.log >

[ Latest log file ]