code logs -> 2020 -> Thu, 06 Aug 2020< code.20200805.log - code.20200807.log >
--- Log opened Thu Aug 06 00:00:44 2020
00:08
< catalyst>
shit, I really am a good programmer
00:10
<~Vornicus>
hell yeah you are
00:32 Kindamoody is now known as Kindamoody[zZz]
01:38 Degi [Degi@Nightstar-rjru4d.dyn.telefonica.de] has quit [Operation timed out]
01:39 Degi [Degi@Nightstar-4jcp09.dyn.telefonica.de] has joined #code
02:14 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
02:37 bluefoxx [fuzzylombax@Nightstar-gmbj85.vs.shawcable.net] has quit [Connection closed]
02:41 bluefoxx [fuzzylombax@Nightstar-gmbj85.vs.shawcable.net] has joined #code
03:28 catalyst_ [catalyst@Nightstar-2pbq3i.dab.02.net] has joined #code
03:31 catalyst [catalyst@Nightstar-l4kab6.dab.02.net] has quit [Ping timeout: 121 seconds]
03:43 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [Ping timeout: 122 seconds]
03:52 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
03:52 mode/#code [+o Reiv] by ChanServ
03:59 bluefoxx [fuzzylombax@Nightstar-gmbj85.vs.shawcable.net] has quit [[NS] Quit: I broke it again! Rebooting...]
04:08
<&McMartin>
Welp, looking at this prototype, Ocaml is not the tool for the job
04:08
<&McMartin>
And honestly, this should probably just be managed in Python, just... better Python than I used before.
05:18
<@sshine>
how do you run a docker image interactively?
05:19
<@sshine>
$ docker container run myimage bash -i
05:19
<@sshine>
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
05:19
<@sshine>
bash: no job control in this shell
05:19
<@sshine>
root@9b85bc0aec8f:/cardano-node# exit
05:19
<@sshine>
I mean, I'm sure this is a good thing eventually, but right now it's a bit annoying. :)
05:37
<@mac>
sshine: The docker container has to already be running and doin whatever its main pprocess does before you can log in.
05:37
<@mac>
If the container is up, `docker exec -it my_container bash`
05:40
<@mac>
Alternately, you can do `docker run -it my_image bash` to create a new, temporary container from the same image and run it interactively. However, be aware that this is *a different container made from the same image*, not the original container; anything you do in there will NOT affect the existing container.
05:41
<@sshine>
mac, ah, thanks. yeah, I'm just exploring the container, no interest in saving anything.
05:41
<@sshine>
mac, this is a build container and I'm trying to locate the executable I just built ;-)
05:42
<@sshine>
I managed to find it using 'docker container run my_image find / -name cardano-cli -type f'
07:08 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
07:08 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
07:08 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
07:47 celticminstrel [celticminst@Nightstar-79nr02.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:13 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code
08:13 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
08:29 Kindamoody[zZz] is now known as Kindamoody
08:49 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [[NS] Quit: Deep inside, every housecat believes themself to be just a temporarily embarrassed tiger.]
08:55 macdjord [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
08:55 mode/#code [+o macdjord] by ChanServ
08:59 macdjord is now known as macdjord|slep
09:25 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code
09:35 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [[NS] Quit: brb]
09:35 Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
09:35 mode/#code [+o Kimo|autojoin] by ChanServ
09:35 Kimo|autojoin is now known as Kindamoody
09:38 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [[NS] Quit: brb]
09:38 Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
09:38 mode/#code [+o Kimo|autojoin] by ChanServ
09:39 Kimo|autojoin is now known as Kindamoody
09:58 catalyst [catalyst@Nightstar-bm91s4.dab.02.net] has joined #code
10:01 catalyst_ [catalyst@Nightstar-2pbq3i.dab.02.net] has quit [Ping timeout: 121 seconds]
10:15 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Client exited]
10:15 Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
10:15 mode/#code [+o Kimo|autojoin] by ChanServ
10:15 Kimo|autojoin is now known as Kindamoody
12:16 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [[NS] Quit: Leaving]
13:18 celticminstrel [celticminst@Nightstar-79nr02.dsl.bell.ca] has joined #code
13:18 mode/#code [+o celticminstrel] by ChanServ
13:28
< Kizor_>
I've been reading about the theory of object-oriented programming. The material says you have to design classes top-down: first you decide on its purpose and scope, then chart what operations it needs, then define those operations in a way that sets sensible boundaries and ensures they work together, etc. Only then do you implement the things.
13:29
<@sshine>
Kizor_, what are your thoughts on that?
13:30
< Kizor_>
As a newb, my thoughts are: How do you know you'll be able to accomplish what you decide? And if you can't get something to work, do you just have to go back and change its design and the design that led to that and the design that led to that, and how are you supposed to keep track of that?
13:30
<@sshine>
Kizor_, in my opinion, the OOP movement took credit for a lot of basic thinking. kind of like Christianity gobbled up a bunch of god myths into one super-god. :) there's a lot to be said about planning and structuring your programs that does not involve the defining properties of OOP, such as: objects, classes, inheritance, methods.
13:30
< Kizor_>
Do you just have to know enough language that you know you'll be able to accomplish what you plan.
13:30
< Kizor_>
*?
13:31
<@sshine>
Kizor_, ah. I think before you can plan with any precision, you have to have some idea of how it's done. so the first voyages over the atlantic didn't have an ETA, or even an estimated destination. ;-)
13:32
< Kizor_>
This sounds like you're expected to make battle plans that survive contact with the enemy.
13:32
<&[R]>
Kizor_: I've seen a few APIs just add methods to a class as the versions grow on
13:33
<@sshine>
Kizor_, I think one approach is to develop gradually, focus on the central piece and grow from there, apply lots of feedback as early as possible. (there is some old saying that the longer you wait fixing something, the more expensive it gets to fix.)
13:33
<@gnolam>
So, this is more project management than anything else - and is completely orthogonal to the concept of object-oriented programming.
13:34
<@sshine>
I've experienced that one business/economics guy at work is a much better software project manager than I am. :)
13:34
< Kizor_>
sshine: That sounds reasonable, and I
13:34
< Kizor_>
'm not seeing any space for gradual development in what the material says.
13:35
< Kizor_>
You decide on what to do, then you decide on what that's going to take, then you decide on what those are going to take, etc., etc.
13:35
<@sshine>
Kizor_, there's a lot of "software development methodologies" around that try to address the planning problems you're exploring.
13:35
< Kizor_>
There's no space for gradual development, as you must get it right the first time.
13:35
< Kizor_>
Which is fucking terrifying.
13:35
<&[R]>
Yeah, that's bullshit
13:35
<@gnolam>
Right, so there's theory and there's practice.
13:36
<&[R]>
The first plan is never right
13:36
<&[R]>
You have to adjust the plan as you go
13:36
<@sshine>
I read about a few of those methodologies when I was studying but couldn't find my way to apply them meaningfully. personal experience is key.
13:37
<@sshine>
so I've found that if I don't keep a lot of paper in front of my keyboard and make daily checklists, I completely loose track of what I'm doing. :)
13:37
<@sshine>
s/loose/lose/
13:37
<@gnolam>
And methodologies is where people have *very* strong opinions.
13:38
<@sshine>
I've found that you can avoid people with SCRUM written in their foreheads.
13:38
<@gnolam>
There's a joke one of my professors used to tell when it came to this: "Q: What's the difference between a terrorist and a methodologist? A: You can negotiate with a terrorist."
13:38
<@sshine>
(I have no opinion for or against SCRUM. maybe I'm scrumming and I don't even know it!)
13:38
<@sshine>
gnolam, hehe.
13:41
< Kizor_>
Right. So go carefully through what this material says and write down a summary, then toss the ideas out the window and damn well bang on your code until it works.
13:41
< Kizor_>
Study software development methodologies when I have more experience.
13:41
<@gnolam>
And this is one of the things that "agile development" was intended to solve. Instead of making a big, detailed plan and then rigidly sticking to that no matter what, you only plan ahead just as much as you need for [insert time interval here], and then you see where you are, make a new plan, and go back and improve the old stuff as necessary.
13:42
<@sshine>
Kizor_, I read a book called "Prefactoring" which was supposedly a pun on "Refactoring" which is a more well-known methodology. I picked the book because it had fewer pages, and the biggest take-away from the author was to focus on the language and needs of the people who will use your software. so ask them early and often if things work.
13:42
<@gnolam>
This being methodology, people then took the concept and ran with it and created what amounts to various religions.
13:45
<@sshine>
Kizor_, as for structuring code properly (as gnolam says, somewhat orthogonal to project management) is also something you are much better off learning about under apprenticeship.
13:45
<@gnolam>
It must be noted that much of it was in reaction to methodologies that didn't actually say what they thought they said (the prime example being the much vilified Waterfall Method).
13:46
< Kizor_>
sshine: Yeah, a friend of mine worked on software for the Ministry of Education, and had a full-time job translating between Geek and Bureaucrat to make sure what they were building was what the client needed.
13:47
< Kizor_>
Also nearly rammed a MP with one of the electric scooters they have in the parliament building.
13:47
<@sshine>
a lot of people you'll encounter in industry lean towards getting the job done quickly. the following PR is essentially changing two bytes, but look at the amount of pedantry and dialogue: https://github.com/exercism/haskell/pull/713 -- I learned so much here. :)
13:48
<&[R]>
I've seen some claim that waterfall was a strawman made by agile proponents
13:49
<@gnolam>
Kizor_: aaanyway. If you're just coding yourself, or teaching yourself coding, use whatever method you're comfortable with. Plan out everything. Plan nothing. Code upside-down while wearing a tutu. You'll probably learn something either way.
13:49
<@gnolam>
But do make at least some plans, because the planning itself will teach you things. And it will teach you even more if you take notes on what then happened when the proverbial battle plan and enemy made contact.
13:49
<@sshine>
Kizor_, there are situations where "what the client wants" is not well-defined and partial failure is the only option. this is often the case for government-funded projects in my country. we have a long history of multi-million (sometimes billion) dollar projects that close without a product. why large government-funded software projects fail is a subject of fruitless research.
13:50
<@gnolam>
Textbooks are textbooks, and will always say that This Is The One True Way To Do It.
13:50
<@sshine>
[R], I was about to mention the waterfall model and refrained as I realized nobody ever defends it, and so it is a strawman. I was going to say "nobody sends a space rocket halfway into space", but that isn't even true any more. :)
13:52
<@sshine>
gnolam, I think agile is somewhat a pantheon where some people will say agile, and others will say extreme programming, and yet others will say scrum, and then you can disagree about the details, but waterfall is bad.
13:52
< Kizor_>
gnolam: That bit about using the plans you want sounds like sound advice. Thank you. Including the bit about making at least some plans, because even I know that desperately shotgunning your project at 3 AM until it works does little to prevent further problems or teach you what was wrong.
13:53
<@sshine>
personally I'm in favor metaphor-oriented programming like Homespring: http://jeffreymbinder.net/misc/hs/hs.html
13:56
<@sshine>
Kizor_, something I do is try to map out the core concepts into data types (where OOP'ers might say objects or classes). a lot of applications can be structured in layers so that you have a layer that deals with business logic, a layer that deals with data access, and a layer that deals with presenting. MVC (or one of its many hybrids as employed by many web-frameworks) would call this the "M" part, but many
13:56
<@sshine>
development frameworks automate e.g. the data access and split the presentation into "C" and "V" or other complications.
13:57
<@sshine>
Kizor_, the business logic is going to be at the middle, so changing it requires more refactoring. so it is good to make early because you get a chance to re-model it before too much of the surrounding application (UI, controllers, whatnot) start to depend on it.
14:01
<@sshine>
https://i.imgur.com/TqTTsDC.png -- Danish government websites have scaling problems, so you have to wait in line to access certain websites in peak periods. :-D
14:02
<@sshine>
it is hilarious. I just try to imagine if Google or Spotify were like that.
14:02
<@sshine>
or YouTube. "sorry, too many people are watching right now." I think Netflix downscaled their default resolution when Covid-19 broke out.
14:03
<&Reiver>
So-called Waterfall: Honestly the only practical method if you're dealing with enterprise-level systems in which any change to the user requires mass retraining of frontline staff
14:04
<&Reiver>
You build to spec, and by god you have to deliver to spec because that spec is what people have been trained to expect in the spec
14:04
<&Reiver>
Agile is great when you're allowed to figure things out as you go along. That isn't always the case. Sometimes software is a project, and you'd better believe it falls into the framework thereof.
14:06
<&Reiver>
And regarding the Danes: Govt websites can't always automatically enjoy the same convinience as other web services, because said web services use cloud software that may or may not be considered suitably secure.
14:07
<&Reiver>
(Less an issue in modern AWS and similar systems, where 'govt control' is a valid pack you can pay for, but)
14:07
<&Reiver>
((eg, we have govt data in AWS these days and basically they've pinky-sweared that the data never sits on a server outside Australia, etc, which is apparently Sufficient For Our Laws... but if you can't promise that, we can't use you))
14:46
< Kizor_>
Okay, I'm done writing things down from that discussion now. Thanks, folks.
15:10 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:10 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:18
<@abudhabi>
https://www.youtube.com/watch?v=FyCYva9DhsI
16:31 catalyst [catalyst@Nightstar-bm91s4.dab.02.net] has quit [Ping timeout: 121 seconds]
16:53 catalyst_ [catalyst@Nightstar-6hkccs.dab.02.net] has joined #code
17:02 bluefoxx [fuzzylombax@Nightstar-gmbj85.vs.shawcable.net] has joined #code
17:03 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
17:13 celticminstrel [celticminst@Nightstar-79nr02.dsl.bell.ca] has quit [Connection closed]
17:59 celticminstrel [celticminst@Nightstar-79nr02.dsl.bell.ca] has joined #code
17:59 mode/#code [+o celticminstrel] by ChanServ
18:37 * TheWatcher sets about rebuilding Project Shinar
22:43
<&McMartin>
Riddle me this, Batman:
22:43
<&McMartin>
# function x -> int_of_string @@ List.hd x;;
22:43
<&McMartin>
- : string list -> int = <fun>
22:43
<&McMartin>
# function x -> int_of_string @@ List.hd @@ x;;
22:43
<&McMartin>
- : string list -> int = <fun>
22:43
<&McMartin>
# int_of_string @@ List.hd;;
22:43
<&McMartin>
Error: This expression has type 'a list -> 'a but an expression was expected of type string
22:54 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
22:58 catalyst [catalyst@Nightstar-gb5vov.dab.02.net] has joined #code
23:00 catalyst_ [catalyst@Nightstar-6hkccs.dab.02.net] has quit [Operation timed out]
23:07
<&jeroud>
Kizor_: The opposite of "top down" design is "bottom up", where you start by building small low-level things and then combine them into bigger high-level things once you know how they work.
23:09
<&jeroud>
I find that to be more convenient for exploratory programming where I have a vague idea of the problem I want to solve, but the APIs or protocols or data formats I'm using are new to me.
23:11
<&jeroud>
McMartin: I can't remember whether @@ binds more or less tightly than function application.
23:16
<&jeroud>
Oh, right. It's right-associative rather than left-associative.
23:18
<&jeroud>
So "f x y" is "(f x) y" whereas "f @@ x @@ y" is "f (x y)".
23:22
<&McMartin>
Yeah, it's mostly for "less tightly bound"
23:22
<&McMartin>
The part that baffles me is that I can't get a runnable function out of it in point-free form.
23:23
<&McMartin>
(`int_of_string @@ List.hd x` also works fine)
23:32
<&jeroud>
The point-free thing only works where "(expression) args" gives you what you want.
23:33
<&jeroud>
Which isn't the case here.
23:34
<&jeroud>
You'll need some kind of additional trickery to inject the arg into the "middle".
23:37
<&jeroud>
"x |> List.hd |> int_of_string" is nice, but doesn't give you a function of x to pass around.
23:41 Kindamoody is now known as Kindamoody[zZz]
23:48
<&McMartin>
That makes sense
23:54 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
23:54 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
--- Log closed Fri Aug 07 00:00:45 2020
code logs -> 2020 -> Thu, 06 Aug 2020< code.20200805.log - code.20200807.log >

[ Latest log file ]