code logs -> 2021 -> Tue, 23 Mar 2021< code.20210322.log - code.20210324.log >
--- Log opened Tue Mar 23 00:00:19 2021
00:29
<@Reiv>
Help me with some basic math?
00:30
<@Reiv>
If I have something worth $400, and it is now $500, it's gone up in value by 25%. If $500 were to drop to $400, that's a 20% drop.
00:30
<@Reiv>
I cannot remember the actual formulas to work out the latter beyond the intuitive math >_>
00:31
< ErikMesoy>
change value divided by starting value
00:31
< ErikMesoy>
100/500 = 0.2 = 20%
00:33
<@Reiv>
right, thank you
00:59
<&[R]>
Have a system that won't power on, mobo is getting power for RGB lights, but when I close the power-on circuit nothing happens, no fan spin, power supply fan doesn't ramp up, just... nothing.
00:59
<&[R]>
Any ideas what to do?
01:08
<~Vornicus>
F
01:15
< Mahal>
replace PSU, replace motherboard
01:25
<@Reiv>
Replace PSU. If nothing, salvage hard drives and consider state of modern case technology vs current for building the new machine. >_>
02:24 abudhabi [abudhabi@Nightstar-75a9fn.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
02:25 abudhabi [abudhabi@Nightstar-ivpm6u.adsl.tpnet.pl] has joined #code
02:34 Degi [Degi@Nightstar-454h01.pool.telefonica.de] has quit [Operation timed out]
02:37 Degi [Degi@Nightstar-h8g749.pool.telefonica.de] has joined #code
04:16
<@celticminstrel>
I think Spotlight is broken… :/
04:16 celticminstrel [celticminst@Nightstar-rh8g14.dsl.bell.ca] has quit [Client exited]
04:27 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
04:28 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
04:29 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
04:29 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
05:32 celticminstrel [celticminst@Nightstar-rh8g14.dsl.bell.ca] has joined #code
05:32 mode/#code [+o celticminstrel] by ChanServ
05:32
<@celticminstrel>
I think Spotlight is broken… :/
05:36
<@celticminstrel>
It uses 100% CPU and several GB of memory until the system runs out of swap space, then, just before the system is forced to suspend other programs it backs off (or maybe the system terminates it, I’m not sure) and then it all starts again.
05:36 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds]
05:38
<@celticminstrel>
Maybe it’ll eventually quiet down, I dunno…
05:39
<@celticminstrel>
I can’t imagine it being good for the SSD if it doesn’t tho…
05:48
<&McMartin>
Frustrating progress on my ST nonsense. https://bumbershootsoft.wordpress.com/2021/03/23/line-a-flood-fills/
06:03 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
06:03 mode/#code [+o Reiv] by ChanServ
06:33 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
07:06
<@celticminstrel>
Oh? It actually did finally calm down…
07:06
<@celticminstrel>
Still seems broken for it to do this in the first place tho…
08:30
<@sshine>
in PHP it makes sense to write '$foo[$bar] ?? null'
08:31
<@sshine>
because the null-coalescing operator also catches array index error exceptions :-D
08:45
< catalyst>
things in php make sense?!
08:54 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
08:54 mode/#code [+o himi] by ChanServ
09:12
<@sshine>
catalyst, I should say that that piece of code actually does something that isn't equivalent to $foo[$bar]
09:14 Kindamoody is now known as Kindamoody|afk
09:35
<@sshine>
what do you tell someone who wants to name a class IntegrationConnectionTypeToDataConnectionImplementationMapping?
09:35
<@sshine>
I said "this is way too long!" and he said "OK, how about IntegrationConnectionTypeToDataConnectionClassNameMapping?"
09:35
<@sshine>
which is... shorter!
09:36
<@sshine>
MaybeI'llSpeakLikeThisToProveAPointFactoryConnectionMapper
09:36
<~Vornicus>
i mean it does do what it says on the tin
09:36
<~Vornicus>
probably
09:36
<~Vornicus>
if you're bitching about the name being long
09:37
<@TheWatcher>
That some pure, distilled Java API there.
09:38
<@TheWatcher>
All you need now is a singleton factory to create IntegrationConnectionTypeToDataConnectionImplementationMapping so it can be called IntegrationConnectionTypeToDataConnectionImplementationMappingFactorySingleton
09:38
<@TheWatcher>
Possilby as an interface that needs implementation.
09:40
<@sshine>
it certainly is more descriptive than 'Blerb'.
12:15
<@gnolam>
https://twitter.com/j_opdenakker/status/1374075366625705984
12:19
< catalyst>
things that don't need to be classes: everything
12:20 * catalyst runs away to Rust
12:52 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
12:53 catalyst [catalyst@Nightstar-761cgj.dab.02.net] has joined #code
12:57 Alek [Alek@Nightstar-kaiguq.il.comcast.net] has quit [Ping timeout: 121 seconds]
13:00
<@celticminstrel>
Meanwhile, UnrealHeaderTool complains if a class name is more than 32 characters long.
13:01 Alek [Alek@Nightstar-kaiguq.il.comcast.net] has joined #code
13:01
<&[R]>
Like when the bank complains your password is more than 8 characters long
13:01
<@celticminstrel>
Not quite the same…
13:19
<~Vornicus>
Big talk for something that's already 16 characters long
13:23
<@celticminstrel>
Heh
13:26 catalyst [catalyst@Nightstar-761cgj.dab.02.net] has quit [Ping timeout: 121 seconds]
13:27 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
14:29 Kindamoody|afk is now known as Kindamoody
14:43 * Vornicus grumps at complicated unit tests that end up giving "true != false" as the result
14:44
< catalyst>
handy
14:44
< catalyst>
that's really letting you know the details that is
14:46
<@TheWatcher>
I mean, it's accurate. Just about as useful as a concrete parachute.
--- Log closed Tue Mar 23 15:36:22 2021
--- Log opened Tue Mar 23 15:36:28 2021
15:36 TheWatcher [chris@GlobalOperator.Nightstar.Net] has joined #code
15:36 Irssi: #code: Total of 27 nicks [17 ops, 0 halfops, 0 voices, 10 normal]
15:36 mode/#code [+o TheWatcher] by ChanServ
15:36 Irssi: Join to #code was synced in 16 secs
16:06
<@sshine>
TheWatcher, if (complicated expression) { assert (true != false); }?
16:07
<@sshine>
catalyst, haha yeah, totally not a fan of classes. I think that when using classes as first-class modules, that can be fine. most programming languages don't yet have excellent module systems.
16:08
<~Vornicus>
in this particular case it's "the actual test case is a huge array, and if any of the entries isn't the same, return false"
16:10
<&[R]>
What languages actually have good module systems?
16:10
<@sshine>
[R], 1ML? ;) https://people.mpi-sws.org/~rossberg/1ml/
16:10
<~Vornicus>
16:11
<&ToxicFrog>
Here we have quite a lot of work put into test libraries to handle stuff like that, so it would be something like:
16:11
<@sshine>
it's a PoC rework of Standard ML, haha.
16:11
<&ToxicFrog>
ASSERT_THAT(test_array, EqualsContainer(expected_array))
16:11
<&ToxicFrog>
and the error would be something like "contents of test_array do not match contents of expected_array: test_array has the following [missing/extra] elements: ..."
16:11
<&ToxicFrog>
But this is possible because we have an entire team that just writes test infrastructure for everyone else to use
16:11
<@sshine>
Vornicus, I recall climbing this hill a couple of times. it somehow never ends up as nicely as when using a modern test library that does colorized diffs and cutting to the part that differs if the structure is big.
16:12
<~Vornicus>
in my particular case it'd be nice if it gave ... ... uh ... how do I put this.
16:14
<@TheWatcher>
A million dollars?~
16:14
<~Vornicus>
the test inputs are a mesh, and the function calculates the area of a thing on the mesh; the case is the area of all such things on the mesh. ...which would be *much more helpful* if the test went "this entry is wrong, here is the data this entry should be working from" where that data is a much much smaller portion of the mesh
16:15
<@sshine>
[R], but if we disregard purely researchy languages and only consider something used in production somewhere, OCaml has the best module system that I know. Jane Street re-did the standard library using higher-order modules: https://ocaml.janestreet.com/ocaml-core/v0.12/doc/base/index.html -- e.g. you have a Set module that can take another module as parameter that contains the element type and its ordering
16:15
<@sshine>
function.
16:15
<~Vornicus>
so I can 1. see what the right answer is and 2. sit down with Excel and see if I can calculate the right answer and 3. sit down with the debugger and see if I am seeing the data I need it to
16:16
<@sshine>
Vornicus, right.
16:17
<@sshine>
Vornicus, so I meant to display the right and the wrong answer, but use ANSI colors to highlight the difference, like in GitHub diffs.
16:18
<~Vornicus>
yeah that would help a *little* but in this case it's "every entry is wrong because you did not math correctly" which also isn't helpful at all
16:18
<@sshine>
oh, right :)
16:25
<@sshine>
[R], https://dev.realworldocaml.org/maps-and-hashtables.html#scrollNav-1-3 -- Map.of_alist_exn (module String) ["foo",1; "bar",2; "snoo",0];; disregarding the syntax and naming in OCaml, here is a Map module that exposes a type Map.t that takes as parameter the 'key and 'value, but also a third type tying this kind of map to the module that is responsible for comparing the 'key. so you have a generic
16:25
<@sshine>
dictionary type that won't let you accidentally mix a case-sensitive and a case-insensitive dictionary.
16:26
<@sshine>
I think Python's modules are also very neat because imported modules get mixed in with the values. but maybe they're a little unpredictable, too.
16:50 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code
17:20
<@sshine>
question: at an old job we had some gettext functions besides __() that provided a number of variations like __f('You are number %d.', n), __x('Agreement Number:', 'Derived from Danish "Aftalenummer"'). can anyone tell me if those were added locally on top of Gettext's __(), or are there standard extensions to __()? I can't seem to find any references to functions beyond __().
17:23
< Yossarian>
Anyone her work with graphviz a bunch? How do you get digraph to draw left to right instead of top-to-bottom? I've tried rankdir=LR but maybe like, my diagram needs sub diagrams?
17:25
< Yossarian>
I'm trying to use graphviz to draw basic design diagrams and this particular digram would be drawn better left to right.
17:29
< Yossarian>
seems like `neato` supports more fine-tune parameters
17:30
<@sshine>
Yossarian, like this? https://tinyurl.com/hhcavpkk
17:31
<@sshine>
and yeah, could be that sub-graphs are the way to go if you want some part horizontal and then fit that part into a bigger graph that isn't only horizontal.
17:31
<@sshine>
(also, I haven't touched graphviz in 10+ years, so I may be blatantly misunderstanding what you're doing.)
17:31
< Yossarian>
yeah like that
17:32
< Yossarian>
https://stackoverflow.com/questions/1554635/graphviz-how-to-have-a-subgraph-be-left-to-right-when-main-graph-is-top-to-bot seems to have some answers as well
17:32
< Yossarian>
sshine: and then inserting another graph or element under "start" ?
17:33
< Yossarian>
oh
17:35
< Yossarian>
https://tinyurl.com/graphviz2
17:35
<@sshine>
ohhh.
17:36
< Yossarian>
however, the rendering is backwards in this case, you want to tell it to draw the bottom first...
17:36
<@sshine>
yeah, having sub-graphs with rankdir="LR" inside a graph with rankdir="TB" didn't work.
17:36
< Yossarian>
cut and paste start2's charting to the top
17:36
<@sshine>
yeah, loses control over rendering
17:37
< Yossarian>
the rendering in this case could be described as FIFO
17:37
< Yossarian>
but I know there is a way to make subgraphs which might let me reverse that?
17:38
<@sshine>
https://tinyurl.com/35eahsrs
17:38
< Yossarian>
so the way it is described in the file is not FIFO but rather ah
17:38
<@sshine>
when I change the order of those sub-graphs in the source, they seem to change order in the rendering. not sure if that's what you were thinking about.
17:39
< Yossarian>
but G2 is drawn last, still FIFO ordering
17:39
<@sshine>
do you mean that it shows up in the source code first?
17:40
< Yossarian>
yeah, now just the minor (very minor point) of making it draw G1 first
17:40
< Yossarian>
this way it is easier to read and go back to and modify
17:40
< Yossarian>
the way I figure graphviz is that if I want to make simple design diagrams then I don't have to rely on some GUI tool to do such a thing
17:42
< Yossarian>
but dot's raw output if you just used 'dot graph.dot' will draw whatever comes first, there must be a way to order around that for ease of managing the file itself. Like I said, it is a minor point but still
17:43
< Yossarian>
I believe there is a way to order 'em via rank
17:45
< Yossarian>
like
17:46
<@sshine>
I seem to recall that 'dot' gives you less control of the output, but nicer input syntax, and that Tikz provides you with very exact rendering options, but only afaik for LaTeX, and complicated input syntax.
17:46
<@sshine>
I never dug into how to make 'dot' work beyond the basics
17:47
< Yossarian>
https://tinyurl.com/rankingGraph
17:47
<@sshine>
ahhh, so by specifying the vertices in the right order before connecting them does it?
17:48
<@sshine>
neat :)
17:48
<@sshine>
but does it also affect rendering order?
17:48
< Yossarian>
I still don't know what that means though.
17:48
< Yossarian>
mmmm, not sure
17:48
<@sshine>
what 'p a' means?
17:48
<@sshine>
it just means "let there be vertices 'p' and 'a'" without specifying edges.
17:49
< Yossarian>
yeah, looks like if you change Format to plain you get a good idea without the verbosity of 'raw output'
17:49
< Yossarian>
I tried ranking the subgraphs but it draws G1 and G2 vertices instead
17:51
<@sshine>
and yeah, the raw SVG output, at least, renders the first one of those first, even though it visually gets rendered last.
17:52
< Yossarian>
I was wondering if there was a nicer way to issue rank of what gets drawn first
17:52
< Yossarian>
graphviz's documentation is actually quite... hefty. Long.
17:52
< Yossarian>
Because you don't just have dot as a renderer, you have neato and all the other things.
17:54
< Yossarian>
But my understanding too is graphviz is used to render visual outputs of lots of things, not just making LateX documents but like... for data stuff people use graphviz apparently
17:55
< Yossarian>
https://stackoverflow.com/questions/46743365/graphviz-subgraphs-order
17:56
< Yossarian>
{ 1 2 } -- b -- { 10 11 };
17:58
< Yossarian>
interesting but still in that stackoverflow, the last entry does have groupings near the top
17:59
< Yossarian>
if I interpret the node numbers the way I have for setting p a, then from going left to right, the right most ranked thing (written in this fashion) will be drawn first
18:00
< Yossarian>
and then if you try to attach say in our example we've been tinyurl-ing back and forth, attach at the end b -> q
18:01
< Yossarian>
the ordering of `p a` actually does the reverse of what we want, remove `p a` and it will draw a-> b -> c subgraph first
18:02
< Yossarian>
or if you wanted to attach the middle node of each subgraph together, p subgraph gets offset
18:03
< Yossarian>
if you select a "head" element though, that doesn't happen
18:04
< Yossarian>
hmmm, aren't there other types of lines to use to draw besides -> ?
18:06
< Yossarian>
but sshine you got the basic LR format going for me, so thank you. This online tool is useful. I might have to write a script for my editor that upon any changes or saving of the file that it executes renderer var $file -T x11
18:19
< Yossarian>
sshine: thanks for your preliminary work on getting rankdir=LR; working, now I need to read the graphviz documentation on ranking subgraph drawing order as well as some other things.
18:20
< Yossarian>
If one were to understand graphviz very well and use ctags or exuberant ctags and use a script to render the relationship between functions, classes, etc in the ctag file to .dot file, that'd be pretty wicked
18:21
< Yossarian>
HTML is an output, I wonder if you could have element give you a command upon clicking on it and bring you to the file in which it is contained but in terms of HTML that seems unlikely
18:21
< Yossarian>
the kind of design document stuff I want to draw is very simple stuff so I don't have to draw it by hand on paper and take a picture or scan it.
18:22
< Yossarian>
So, again, thanks. If anyone else here has more knowledge of graphviz and such please lemme know. Seems like a pretty useful tool to get to know.
18:25
<@sshine>
Yossarian, I think you can get other types of lines by annotating them, yes
18:28
< Yossarian>
but the FIFO drawing of subgraphs can reverse itself if you link elements between the two graphs
19:03
< Yossarian>
https://graphs.grevian.org/reference
19:26
< Yossarian>
sshine: if you were curious, here is an example of how {rank= } works: https://tinyurl.com/digraphRank
19:27
< Yossarian>
almost does draw LR but what I can't see is how to modify lines to be straight
19:28
< Yossarian>
I also wonder if rank can be applied to names of subgraphs
19:35
< Yossarian>
https://tinyurl.com/RankLRcomedout so if you do the ranks if you want the two ranked graphs connected in some way, it actually does follow a LR ranking, uncomment LR and you will get default TB ordering.
19:45
< Yossarian>
Other than that, I wonder how to make edges straight. I suppose I'll have to read the documentation.
20:32
< Yossarian>
https://gitlab.com/graphviz/graphviz/-/issues/1592 did I fix this guy's issue? https://tinyurl.com/graphvizGitlabFix
20:49 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
23:00 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
23:00 mode/#code [+o himi] by ChanServ
23:12 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: WeeChat 2.9]
23:13 Kindamoody is now known as Kindamoody[zZz]
23:21 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
23:21 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
23:31 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
23:31 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
--- Log closed Wed Mar 24 00:00:20 2021
code logs -> 2021 -> Tue, 23 Mar 2021< code.20210322.log - code.20210324.log >

[ Latest log file ]