--- Log opened Sun Apr 23 00:00:05 2017 |
00:01 | <@himi> | As you said, it's more verbose assembler with a better type system |
00:02 | <&McMartin> | Yeah, BBC BASIC and QBASIC both have actual functions and local variables and such, and even the mid-1980s dialects at least had while loops |
00:02 | | Jessikat [Jessikat@Nightstar-prdp4d.dab.02.net] has joined #code |
00:05 | <~Vornicus> | :( |
00:05 | <@himi> | I keep having to put in xx5 lines to do printf debugging |
00:07 | <&McMartin> | Literally why you go ahead in steps of 10 |
00:11 | <~Vornicus> | ok let's see if I can put this into normal people words and then maybe I can find my way around. I have a list of things with associated numbers. The list never changes, nor do the numbers. My function needs to refer to this list, get the number, and do a calculation based on that. |
00:12 | <&McMartin> | Define it with a list literal |
00:12 | <&McMartin> | Define the map with Map.fromList |
00:12 | <&McMartin> | But honestly, you can probably just write your own four-line alist lookup system |
00:13 | <~Vornicus> | "can probably" entails understanding enough of the syntax here that I can even begin reading the manual. It hasn't worked yet. |
00:13 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Connection closed] |
00:13 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
00:13 | | mode/#code [+o macdjord] by ChanServ |
00:14 | <&McMartin> | That in turn means maybe don't use maps yet |
00:28 | | Jessikat` [Jessikat@Nightstar-vmae0r.dab.02.net] has joined #code |
00:31 | | Jessikat [Jessikat@Nightstar-prdp4d.dab.02.net] has quit [Ping timeout: 121 seconds] |
00:32 | | * McMartin attempts to merge four different assembly language modules from three different projects into one program |
00:32 | <&McMartin> | It's too bad I didn't stick to a fixed ABI over all my random programs for the past ten years~ |
00:34 | <&McMartin> | Fortunately, the hardware's so primitive there's not much to control~ |
00:36 | <~Vornicus> | ok, alternative. since the function takes in an element of my list of things, I could technically just write a pattern for each thing. That feels rather *dumb* though considering how much of it would be otherwise identical |
00:39 | <&McMartin> | Have you gotten to the point where you see patterns that look like "h:t"? |
00:46 | <~Vornicus> | Seen those, a little. |
00:46 | <~Vornicus> | it's how you glom a thing on to the start of a list. |
00:58 | <~Vornicus> | Not that I've done any list manipulation. But my inability to figure out the basics here has really put a damper on my attempts to learn by doing exercises. |
01:03 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
01:24 | | * McMartin finally gets his VIC-II wrangling sorted out |
01:24 | <&McMartin> | This is both more and less horrifically abusive than I had hoped and/or feared. |
01:48 | < RchrdB> | Arennnnn't there a few open-source BASIC implementations these days? Cross-platform ones with rather good, Pascal-like performance? |
01:49 | | * Vornicus examines. |
01:50 | < RchrdB> | I had a vague recollection that one or more of the BASIC implementations used to do okay on the Computer Language Benchmarks Game but that's been rebooted a few times and I don't think it's in there any more. |
01:54 | <~Vornicus> | So: I have the type that's the names of my things, and the numbers, I go Orbits = fromList [(Mercury, 0.24), ...] etc, and that gives me a map, I suppose, and then when I need it I go... Orbits ! Mercury to get the number. |
01:57 | < RchrdB> | Sure that works. |
01:57 | <~Vornicus> | I think. |
01:57 | <~Vornicus> | Maybe. |
01:57 | <~Vornicus> | which is apparently also a thing |
01:59 | < RchrdB> | in Data.Map, there's ((!) :: Map k a -> k -> a), which takes a map and a key and returns the value or throws an exception if the value is absent. |
02:00 | < RchrdB> | There's also (lookup :: Map k a -> k -> Maybe a) which takes a map and a key, and returns (Just value) if the key is present or (Nothing) otherwise |
02:02 | < RchrdB> | you need to have IO in order to catch a thrown exception |
02:02 | < RchrdB> | but you can pattern match on (Just x) vs (Nothing) from pure code |
02:35 | <~Vornicus> | ok wtf |
02:36 | <~Vornicus> | Now it's complaining about either mismatched brackets (of which there are none) or indentation (of which the only stuff in the file is the stuff that I was given) |
02:38 | <~Vornicus> | apparently I get the basic syntax so entirely wrong that it can't explain what I'm supposed to be doing |
02:39 | | PinkFreud [WhyNot@Pinkfreud.is.really.fuckin.lame.nightstar.net] has quit [A TLS packet with unexpected length was received.] |
02:46 | | * Vornicus frustrates in general 'cause this really should be easier. |
02:51 | <~Vornicus> | cryyyyptiiiiiic error messageeeees |
02:52 | <~Vornicus> | This is part 2 of why I haven't learned any new languages in a while. |
03:13 | <~Vornicus> | https://gist.github.com/DUznanski/13169c437eae9de3d795ab844b8ce744 |
03:23 | <~Vornicus> | I know I must be doing something wrong. I have no fucking idea what. |
03:42 | | Derakon[AFK] is now known as Derakon |
03:57 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code |
03:57 | | mode/#code [+o PinkFreud] by ChanServ |
03:57 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: leaving] |
03:58 | | PinkFreud [WhyNot@Pinkfreud.is.really.fuckin.lame.nightstar.net] has joined #code |
03:58 | | mode/#code [+o PinkFreud] by ChanServ |
03:58 | | * Vornicus gives up, goes to do something he can technically make progress on like washing dishes. |
04:31 | <&McMartin> | RchrdB: The issue with those is that they are not the dialect in which your article from 35 years ago provided software. |
04:32 | < RchrdB> | Might be less translation work than C even then. |
04:34 | <&McMartin> | That *also* said |
04:34 | <&McMartin> | I have to admit I haven't really found one\ |
04:35 | <&McMartin> | QB64 does not perform to my standards, Brandy relies too heavily on interpretation and a simulated display window |
05:06 | | * Vornicus has washed the dishes, duo'd his lingos, and poked mongo, now to see if he can figure out what the fuck he's missing. |
05:12 | | Derakon is now known as Derakon[AFK] |
05:24 | <~Vornicus> | makes no sense. Got a thing that looks exactly like all the other things that make maps, and this one doesn't work. Got a thing that looks exactly like all the other things that index maps, and -- well, I guess since the creation of the map didn't work neither would that. |
05:31 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
05:34 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
05:34 | | mode/#code [+o Alek] by ChanServ |
05:42 | | * Vornicus goes a hunting |
05:45 | <~Vornicus> | okay. Ord apparently means I need an ordered data type for my keys, which means that I need to tell it ... somewhere, that the keys should be considered ordered ...somehow. |
05:47 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code |
05:47 | | mode/#code [+o himi] by ChanServ |
05:51 | | * Vornicus tries a couple things he sees on the internet, none of them work. |
06:10 | <~Vornicus> | -- in order for Ord to work I need to write an Eq function, which in this case appears to require I sit down and write all 36 or perhaps 64 comparisons, which... sounds like a bad day. |
06:10 | <~Vornicus> | There Must Be A Better Way |
06:11 | <&McMartin> | This is basically a tuple of types that are themselves ordered, right? |
06:11 | <&McMartin> | ... though IIRC floating point numbers are *not* ordered, because NaN |
06:12 | <~Vornicus> | in order to allow map to use it I have to make it ordered |
06:14 | <~Vornicus> | ---or apparently I can just tell it to derive eq and that works. god |
06:15 | <~Vornicus> | This one piece of information took six hours to find |
06:35 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Operation timed out] |
06:36 | <&McMartin> | Blargh. 1Mhz just isn't frickin' fast enough to drive a 40x25 display |
06:46 | | * McMartin makes a list of ways to cheat in increasing order of sacrifices to make |
06:47 | | Kindamoody[zZz] is now known as Kindamoody |
06:58 | | Jessikat [Jessikat@Nightstar-k9388v.dab.02.net] has joined #code |
07:00 | | Jessikat` [Jessikat@Nightstar-vmae0r.dab.02.net] has quit [Ping timeout: 121 seconds] |
07:18 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
07:18 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
07:24 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
08:09 | | Jessikat [Jessikat@Nightstar-k9388v.dab.02.net] has quit [[NS] Quit: Bye] |
08:17 | <&jeroud> | Vornicus: This is one of the reasons I vastly prefer OCaml to Haskell for my functional programming needs. |
08:17 | <&jeroud> | Oh, he's not here. |
11:03 | | Kindamoody is now known as Kindamoody|out |
11:36 | <&ToxicFrog> | I should try ocaml someday |
11:37 | <&ToxicFrog> | But these days I just clojure all day every day, except when I don't |
11:46 | <&jerith> | If you're ever in .NET land (which you probably aren't), F# might be an easier dialect to get into. :-) |
11:49 | <&ToxicFrog> | I'm never in .NET land. |
11:51 | | celticminstrel [celticminst@Nightstar-5tb53u.dsl.bell.ca] has quit [Ping timeout: 121 seconds] |
11:51 | | celticminstrel [celticminst@Nightstar-mb6eve.dsl.bell.ca] has joined #code |
11:51 | | mode/#code [+o celticminstrel] by ChanServ |
13:10 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [[NS] Quit: ] |
13:28 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
13:28 | | mode/#code [+o JustBob] by ChanServ |
13:30 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [[NS] Quit: ] |
13:31 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
13:31 | | mode/#code [+o JustBob] by ChanServ |
16:46 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
16:46 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
16:47 | | RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has quit [Ping timeout: 121 seconds] |
16:50 | | RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has joined #code |
17:27 | | ErikMesoy [Bruker@Nightstar-hq72t5.customer.cdi.no] has quit [Connection closed] |
17:49 | | ErikMesoy [Bruker@Nightstar-hq72t5.customer.cdi.no] has joined #code |
17:49 | | mode/#code [+o ErikMesoy] by ChanServ |
18:09 | | Derakon[AFK] is now known as Derakon |
19:57 | | Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
20:44 | | Kindamoody|out is now known as Kindamoody |
23:35 | | Kindamoody is now known as Kindamoody[zZz] |
--- Log closed Mon Apr 24 00:00:06 2017 |