--- Log opened Sat Sep 07 00:00:19 2019 |
01:01 | <&Reiver> | catalyst: That code is terrifying. :) |
01:06 | < catalyst> | yup x) |
01:06 | < catalyst> | especially for such a simple task |
01:23 | | celmin|away is now known as celticminstrel |
01:30 | <&McMartin> | Continuing to demonstrate why you're my consultant of last resort on C++ arcana |
01:31 | <&McMartin> | Meanwhile, I seem to have become my company's Technology Leader wrt Swift, which is slightly terrifying as I do not have the most experience with the language amongst our employees |
01:31 | <@celticminstrel> | (FTR, the S in SFINAE is "substitution", I think.) |
01:31 | <&McMartin> | However, I am a much better language lawyer and at least a somewhat better software architect than the ones with more language experience |
01:32 | <@celticminstrel> | AFAIK there is nothing that would satisfy the second paste. |
01:32 | <@celticminstrel> | I think something can totally be rolled for the more limited use case of "does object X have method Y", at least. |
01:33 | <@celticminstrel> | I wonder if what you want could be done with just template<typename T> std::ostream& operator<<(std::ostream& out, T const&) {out << "<unprintable>";} |
01:33 | <@celticminstrel> | Or would that complain "ambiguous overloads"? |
01:34 | < catalyst> | it's ambiguous because then both exist |
01:34 | <@celticminstrel> | Ah okay. |
01:34 | < catalyst> | well, no actually |
01:34 | < catalyst> | it just fails to compile because the nonprintable things have errors instantiating it |
01:35 | <@celticminstrel> | I imagine it'd be possible to use the trick in your first paste to make a type trait that you could then use in your second paste... |
01:39 | < catalyst> | indeed, it just takes more brain than I have left tonight :) |
01:40 | < catalyst> | although it might take a macro to make it general |
01:40 | <@celticminstrel> | Well, if you just want an is_printable type trait tho... |
01:40 | < catalyst> | I'd rather a has_operator really |
01:41 | <@celticminstrel> | Ah, I see. |
01:41 | < catalyst> | but that's a rabbit hole |
01:41 | < catalyst> | honestly I'm going to leave it as-is and work on other things =) |
01:41 | <@celticminstrel> | Well, it would need to be at leasdt has operator with signature. |
01:42 | < catalyst> | template<typename lhs, typename RHS |
01:42 | < catalyst> | oiops |
01:42 | <@celticminstrel> | Geh, stray D got in there... :( |
01:42 | < catalyst> | template<operator_type OP, typename LHS, typename RHS> |
01:42 | < catalyst> | where OP is some enum |
01:43 | < catalyst> | sorry, trying to type in between playing WoW X) |
01:43 | <@celticminstrel> | Y'know what would be cool. |
01:43 | < catalyst> | if C++ was a good language? |
01:43 | <@celticminstrel> | if constexpr(magic_value<T1> << magic_value<T2>) |
01:44 | < catalyst> | magic_value is std::declval |
01:44 | < catalyst> | hm |
01:44 | < catalyst> | no wait I see |
01:44 | <@celticminstrel> | Not sure about that... if it actually works with std::declval, sure, otherwise it'd have to be something else, right? |
01:44 | < catalyst> | you still need decltype in there to make sure it's not compiled though |
01:45 | <@celticminstrel> | I was imagining a custom type that defines all the operators to return true if that operator is defined by the parametrized types. |
01:46 | < catalyst> | perhaps |
01:46 | < catalyst> | that strikes me as Too Clever though rerally |
01:48 | <&McMartin> | Heh |
01:49 | <&McMartin> | This C++ migration project has a definite air of "how much less clever can we be plz" |
01:53 | <&McMartin> | Though "design some APIs which can be imported with equal ease into four different programming languages within the same statically linked binary" does offer some entertaining design problems all its own |
02:12 | < catalyst> | use C |
02:12 | < catalyst> | that's the answer :P |
02:34 | < Mahal> | regexcrossword.com |
04:23 | | catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has quit [[NS] Quit: Leaving] |
04:23 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
04:25 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
04:43 | <&McMartin> | Ironically, using C does not work as well as one might hope! |
04:45 | <&McMartin> | The lingua franca of the four languages is Objective-C, not C itself, because iOS. |
04:49 | <&[R]> | So, remember how I had to do really stupid shit to make a while-loop in xs that would read over a file line-by-line? |
04:50 | <&[R]> | If one doesn't mind shelling out to cat, one can do it more cleanly with a for loop instead: for line `` \n {cat FILENAME} { do-stuff-with $line } |
04:55 | <&[R]> | until-read version: < FILENAME {until {line = <=read; ~ $#line 0} { do-stuff-with $line }} |
04:59 | <&McMartin> | What's xs again? |
04:59 | <&[R]> | A shell |
04:59 | <&[R]> | The basic stuff actually has nicer syntax than bash does |
04:59 | <&[R]> | Just... sometimes it has really ugly syntax |
05:03 | <&McMartin> | Aha |
05:03 | <&McMartin> | Well, god-speed |
05:04 | <&[R]> | Thanks |
05:05 | <&[R]> | BTW, out of curiosity, which looks better to someone unfamiliar with xs? |
05:10 | <&McMartin> | I marginally prefer the former, assuming the \n is a real newline that you've typed as \n for IRC convenience |
05:12 | | Derakon is now known as Derakon[AFK] |
05:12 | <&[R]> | That's exactly how it'd appear in code |
05:13 | <&[R]> | `` is a built-in that takes two arguments: a separator and a command to run, it returns the output of the command split by the separator |
05:13 | <&McMartin> | In that case, both are well into "line noise" territory :( |
05:13 | <&McMartin> | I think the for loop still marginally beats it out |
05:13 | <&McMartin> | But I'm getting flashbacks to ???!!!??:!!?? here. |
05:13 | | * [R] doesn't get that reference |
05:13 | <@celticminstrel> | ??? |
05:14 | <&McMartin> | That is a valid Ruby expression, built out of the ?: ternary operator and the unary ? operatoar which converts a bare character to its code point. |
05:15 | <&McMartin> | And the traditional !-as-logical-negation operator. |
05:15 | <&McMartin> | In short, the structure is alien enough to my experience that I don't really succeed at parsing either one of the options and thus both remain similarly opaque. |
05:15 | <&[R]> | Ah |
05:16 | <&McMartin> | (It evaluates to false) |
05:16 | <&[R]> | Yeah, I'm not using syntax just because, I'm using it because it's the only way to do that... though I suppose I could call the hooks directly, but I do *not* think that'd improve readability |
05:16 | <&McMartin> | Yeah |
05:16 | <&McMartin> | This is honestly where the kinds of comments people hate turn out to be handy |
05:17 | <&McMartin> | viz |
05:17 | <&McMartin> | i++; // increment i |
05:17 | <&McMartin> | And yeah, but, like, that's only bad because it's a single core operation. |
05:17 | <&McMartin> | Using symbols that match their meanings in human arithmetic, more or less |
05:19 | <&[R]> | # run a for loop for $line where $line is each line in FILENAME using the separator-variant-backquote operator |
05:19 | <&[R]> | Something like that? |
05:19 | <&[R]> | BTW, here's everything the manpage has on ``: |
05:19 | <&[R]> | This variant backquote form binds $ifs to the given list of separators: |
05:19 | <&[R]> | `` separators fragment . |
05:20 | <&[R]> | (Note: the default backquote operator splits on $ifs) |
05:30 | <&[R]> | Hook version of for: for line <={%backquote \n {cat FILENAME}} { do-stuff-with $line } |
05:30 | <&[R]> | Hook version of until: < FILENAME {until {line = <=read; %cmp $#line 0} { do-stuff-with $line }} |
05:30 | <&[R]> | Neither looks any better than the original, and the for one even has to use the <= operator now (which does something very specific to xs, it's somewhat anologious to the backquote). Also I didn't actually test the until version, I might be using %cmp wrong. |
06:33 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Operation timed out] |
06:34 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
06:35 | < Yossarian> | https://drewdevault.com/2019/09/02/Interactive-SSH-programs.html |
06:38 | <&[R]> | OMFG |
06:38 | <&[R]> | I finally have the ability to upload packages I build to my repo in one command |
06:39 | <&[R]> | I no longer need to have my build server and my repo server be the same machine :) |
06:39 | <&[R]> | Yossarian: I do something similar for polman (each subcommand actually ssh's out) |
06:43 | <&[R]> | (polman being an internal command on my network) |
06:51 | <&[R]> | Ooph, actually I don't. I just do the restrict,command= bit |
07:06 | <&[R]> | https://twitter.com/iximeow/status/1170036086770286592 |
07:12 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
07:12 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
07:23 | | * [R] ends up checking 3 things off of his big list of horror |
07:24 | <&[R]> | And a fourth thing I ended up "doing" a few days ago |
07:33 | <&McMartin> | [R] Much belated: yeah, that was the kind of comment I was imagining |
07:54 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: .] |
08:07 | | Kindamoody[zZz] is now known as Kindamoody |
08:43 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
08:43 | | mode/#code [+o Syloq] by ChanServ |
09:50 | < Yossarian> | https://www.anandtech.com/show/13694/double-height-ddr4-gskill-zadak-2x32gb-ddr4-3200 |
09:51 | < Yossarian> | 2x height 1x channel |
09:52 | < Yossarian> | power usage is way up, but benchmarks look fine |
09:53 | < Yossarian> | two dimms one channel |
10:39 | <~Vorntastic> | That's kinda neat |
10:39 | <~Vorntastic> | I need to get me more RAM at some point |
10:40 | <~Vorntastic> | My original plan was 16 in 2 sticks but then I only put one in my cart. |
11:26 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
11:27 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
12:01 | | Degi [Degi@Nightstar-06n67v.dyn.telefonica.de] has joined #code |
13:37 | | Degi [Degi@Nightstar-06n67v.dyn.telefonica.de] has quit [Connection reset by peer] |
14:27 | <@gnolam> | https://twitter.com/kevincollier/status/1169704877896949762 |
14:27 | <@gnolam> | >_< |
14:29 | <@gnolam> | https://twitter.com/chrisoncode/status/1164969227083628544 |
14:54 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
14:54 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
15:52 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
15:54 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
17:26 | <@sshine> | https://ponychallenge.trustpilot.com/index.html |
17:27 | <@sshine> | a while ago I did a solution in python that used some A* library fitted to the maze's representation. |
17:27 | <@sshine> | now I'm doing a Haskell solution using Servant, and I'm not really sure if I should just do the same, or if I could do something else fun. |
17:28 | <@sshine> | nowhere does it say that I have to automate the path-finding. |
17:31 | <@sshine> | I thought, maybe a 3D screensaver like the old Windows maze one. |
17:43 | | Degi [Degi@Nightstar-06n67v.dyn.telefonica.de] has joined #code |
18:10 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Connection closed] |
18:11 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code |
18:11 | | mode/#code [+o himi] by ChanServ |
19:02 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
19:17 | < Yossarian> | That's something, sshine. |
19:20 | < Yossarian> | You might be able to render lightweight 3d Eye Of The Beholder type screensaver, proceedurally generated dungeon, some combat? |
19:20 | | * gnolam rarrrrrrrrghs at Microsoft. |
19:20 | < Yossarian> | Although that's sounding closer to a demo than a screensaver but, I have decent ideas. |
19:20 | <@gnolam> | Seriously, you've gone back to forcing Arbitrary Retarded Rollercoaster on people? |
19:21 | <@gnolam> | RESPECT MY GODDAMNED SETTINGS |
19:31 | <&[R]> | MS has always been bad with keeping people's settings |
19:34 | <@gnolam> | Specifically, the Windows 10 lock screen on my work computer is now saying that the time is 8:34. IT IS NOT. IT IS 20:34. |
19:34 | <&[R]> | lol |
19:34 | <&[R]> | 12-hour time is such ass |
19:35 | <&[R]> | 10:20 "See you in 5 hours!" 5:20 PM "Hi!" |
19:36 | <~Vornicus> | thats 7 hours |
19:36 | <&[R]> | Right |
19:37 | <&[R]> | Which is why 12-hour time is ass |
19:37 | <~Vornicus> | as a graveyard shift dude |
19:37 | <&[R]> | touche |
19:37 | <~Vornicus> | 24 hour time is for me no better |
19:38 | <&[R]> | People are always bitching that 24-hour time is "complicated", but really the math is so much simpler so long as you're not calculating over day boundries. |
19:38 | <&[R]> | My boss used to always need to take a sheet of paper and *draw a clock* to calculate how many hours we were on a job-site |
19:38 | <~Vornicus> | 24 hour time is only complicated because clocks are far too often 12 hour |
19:38 | <&[R]> | Only analogue ones |
19:38 | <~Vornicus> | yes |
19:39 | <~Vornicus> | *examines this code* okay something is fucky here, this can't be the only place that killing a critter is done. |
19:40 | <@gnolam> | [R]: people bitch that 24-hour time is complicated, seriously? |
19:40 | <&[R]> | Yeah |
19:41 | <&[R]> | I've had more than one boss bitch about it |
19:41 | <@gnolam> | I'm assuming those are the same people who defend imperial measurements as "easier to use". |
19:41 | <&[R]> | Also bunch of my family |
19:41 | <&[R]> | Ha, Canadian here, so... |
19:42 | <&[R]> | https://imgur.com/gallery/CMxSoHp |
19:43 | <~Vornicus> | This clearly takes a critter, spreads its shields across the map... but then it proceeds to hand out bonus points for every shield either player critter is carrying, and then advance the level. |
19:43 | <~Vornicus> | But only if it had shields on it in the first place; otherwise it just bails out and does none of those things. |
19:44 | <~Vornicus> | so this can't possibly be named kill_critter |
19:46 | <~Vornicus> | and it can't possibly be the only place critter shields get spread around |
20:04 | < Yossarian> | I'm reading up on vim and 'makeprg', I'm wondering if I could use that to lint (:make) interpreted code in python, lua, then if no errors, run in the REPL via :terminal in a horizontal buffer/split |
20:11 | < Yossarian> | 'cept not seeing :terminal, maybe this a neovim thing only or what i've read applies to a later version of vim? |
20:27 | < ErikMesoy> | Imperial measurements are easier to use, they have fewer syllables! :P But really, the best is hybrid system. I saw some workmen once - IIRC it was telephone pole stuff - using a tool that displayed distances in kilofeet. |
20:37 | <~Vornicus> | I dislike how the various "basic" systems all seem to insist on having one or another of the basic units be non-...unit? |
20:37 | <~Vornicus> | like there's the cgs system which uses centimeters for some reason and the mks system which uses kilograms for some different reason |
20:38 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
20:39 | < ErikMesoy> | Similar size/order of magnitude issues? 1 cubic c of water is 1 g, after all. |
20:41 | <~Vornicus> | and so your units like newtons and dynes all have in them a thing that is... uh... you can't just glom together the prefixes on your base units to figure out what the prefix is for your derived |
20:41 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code |
20:41 | | mode/#code [+o Alek] by ChanServ |
20:42 | <~Vornicus> | apparently there's a french one that was used for a while, meter - tonne - second which succeeds at letting that happen but nobody uses it any more? |
21:38 | | Derakon[AFK] is now known as Derakon |
22:20 | <&ToxicFrog> | mks is aggravating because "kilogram" is the actual base unit of mass, they just baked a prefix into it for some utterly baffling reason |
22:20 | <&ToxicFrog> | So mgs would have no prefixes, but would, in SI terms, have base units of 1 length, 1 time, and 1/1000 mass |
22:37 | <&McMartin> | SI is built around quantities suitable for text adventures |
22:37 | <&McMartin> | With perhaps the sole exception of the watt. |
22:37 | <&McMartin> | 1 C: The amount of charge that makes something a serious hazard in a text adventure |
22:56 | | Degi [Degi@Nightstar-06n67v.dyn.telefonica.de] has quit [Connection closed] |
22:57 | <&[R]> | gnolam: actually I just remembered an even sillier incident |
22:57 | <&[R]> | So, as you may or may not know, I run a D&D game over IRC, so I was recruiting. Now past experience has tought me that giving the game time with a timezone confuses people, and I ended up always just saying "it runs in X hours" |
22:58 | <&[R]> | This one paticular player wasn't quite understanding it |
22:58 | <&[R]> | Just completely unable to do the basic math |
22:59 | <&[R]> | Kept asking what time it actually ran instead, so I gave him the time with the timezone (my local time), that confused him more. |
23:00 | <&[R]> | "What time is it in my timezone?" "What's your timezone?" "My timezone." "Right... but what timezone are you in?" "My timezone." |
23:00 | < Yossarian> | is your timezone 14:53 right now? |
23:00 | <&[R]> | 1600 |
23:00 | <&[R]> | Many of my clocks are off |
23:00 | <&[R]> | Because yeah... |
23:01 | | * Yossarian shrugs |
23:01 | < Yossarian> | that puts you in mountain time? |
23:01 | <&[R]> | Correct |
23:03 | < Yossarian> | lazyntp client. gets geoip info from reported ISP and makes an assumption |
23:06 | <&[R]> | You installed that? |
23:31 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
23:47 | <@gnolam> | ErikMesoy: that is horrible. |
--- Log closed Sun Sep 08 00:00:20 2019 |