IRC log for #brlcad on 20170626

00:21.26*** join/#brlcad infobot (~infobot@rikers.org)
00:21.26*** topic/#brlcad is GSoC students: if you have a question, ask and wait for an answer ... responses may take minutes or hours. Ask and WAIT. ;)
02:15.40*** join/#brlcad KimK (~Kim__@2600:8803:7a81:7400:7427:11e9:38a:213f)
03:47.01*** join/#brlcad gabbar1947 (uid205515@gateway/web/irccloud.com/x-hkjuqzuczvysxpcq)
06:53.04*** join/#brlcad teepee (~teepee@unaffiliated/teepee)
07:11.05*** join/#brlcad teepee (~teepee@unaffiliated/teepee)
07:41.08*** join/#brlcad teepee (~teepee@unaffiliated/teepee)
08:30.04*** join/#brlcad DaRock (~Thunderbi@mail.unitedinsong.com.au)
08:48.43*** join/#brlcad merzo (~merzo@user-94-45-58-139.skif.com.ua)
09:53.43*** join/#brlcad merzo (~merzo@user-94-45-58-139.skif.com.ua)
10:41.22*** join/#brlcad teepee (~teepee@unaffiliated/teepee)
10:48.41*** join/#brlcad Caterpillar (~caterpill@unaffiliated/caterpillar)
11:18.56*** join/#brlcad teepee (~teepee@unaffiliated/teepee)
13:28.45*** join/#brlcad yorik (~yorik@2804:431:f720:80d8:290:f5ff:fedc:3bb2)
14:45.08*** join/#brlcad kintel (~kintel@unaffiliated/kintel)
14:56.31*** join/#brlcad merzo (~merzo@94.45.58.139)
16:59.30*** join/#brlcad vasc (~vasc@bl14-42-37.dsl.telepac.pt)
17:00.02vaschi mdtwenty[m]
17:28.51mdtwenty[m]hey
17:30.31mdtwenty[m]so the other day i tried the goliath scene with a cl_uint[16] bitvector first and it would take too much time to weave the segments
17:32.23mdtwenty[m]so i started to make some changes to the weave kernel to use a list structure instead of the array
17:35.54mdtwenty[m]the solution with the list is fast, but i am still trying to find the cause for some missing partitions when testing with csg scenes evolving difference operations
17:37.45vascwell, the array is slow with your present code for several reasons
17:38.20vasclike that this:
17:38.21vasc+                pp = &partitions[offset];
17:38.21vasc+                //iterate over segments of partition
17:38.21vasc+                for (uint i = pp->segs_start_index; i < pp->segs_start_index + pp->segs_in_partition; i++) {                
17:38.21vasc+                    if (segs_in_pp[i].seg_sti == st_bit) {
17:38.22vasc+                        ret = 1;
17:38.24vasc+                        break;
17:38.26vasc+                    }
17:38.28vasc+                }
17:39.14mdtwenty[m]yes, also inserting partitions on the array
17:40.47mdtwenty[m]the solution with 2 ints to reference the back and forward partition is fast
17:40.59mdtwenty[m]compared with the array version
17:41.07vascwell
17:41.15vasci don't know if something like that can work really.
17:42.06vascdid you keep the other version you made friday someplace?
17:42.24vascthe one with the bitvector which didn't use whole segs but indexes
17:42.45vascalso
17:43.01mdtwenty[m]yes i made a backup with that version
17:43.11vascgood. keep that just in case.
17:43.24vascin fact send it to me.
17:45.53vascthe thing is, without profiling the code, it's hard to know it its better to use the list or the bitvector.
17:46.09vasclike, what's the min and max size of the lists, or the average.
17:46.41vascand how ofter is bu_ptbl_ins_unique used vs a plain list traversal
17:46.44vascand so on
17:47.51vascthis is something which could be found out by instrumenting the ANSI C code and printing an instruction count out or something like that.
17:48.46vascyou can't optimize the code without knowing the data and the access patterns
17:48.48mdtwenty[m]posted a file: weave_segs_cl_uint16.patch (51KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/gptQETCBWOirrbuoOVcaPlwv>
17:52.09vascso i think you should instrument the code and this out.
17:52.40vasc1) what's the min and max size of the lists, and the average. 2) how often is bu_ptbl_ins_unique used vs a plain list traversal.
17:53.07vasci suspect the list is only traversed in the bool_eval phase.
17:53.57vascright. take this example code:
17:53.59vasc+                pp = &partitions[offset];
17:53.59vasc+                //iterate over segments of ray
17:53.59vasc+                for (uint k=h[id]; k!=h[id+1]; k++) {
17:53.59vasc+                    if ((pp->segs[(k-h[id])/32] & (1 << (k - h[id]) % 32)) != 0) {
17:53.59vasc+                        RESULT_TYPE segp = segs+k;
17:54.00vasc+                        if (segp->seg_sti == st_bit) {
17:54.02vasc+                            ret = 1;
17:54.04vasc+                            break;
17:54.06vasc+                        }
17:54.08vasc+                    }
17:54.10vasc+                }
17:54.12vascyou're gonna execute this for every partition right?
17:54.21mdtwenty[m]yes
17:54.31mdtwenty[m]it checks for every partition
17:54.39vascthis is too slow i think this would be faster if the loop was inverted.
17:55.21vascforall i in 0..15
17:55.59vascyou check if there are set bits in that bitvector, and if there are
17:56.26vascthen you check if that segment's seg_sti is equal to the st_bit
17:56.47vascit seems slow right? coz its 16*32 iterations
17:56.54vascbut it's a sparse bitvector
17:57.13vascso you don't need to iterate over all bits, just the ones that are one
17:57.32mdtwenty[m]yes i could try that
17:57.37vascyou can use popcnt to know how many bits are set.
17:57.52vasceven better use ffs.
17:58.03vascthere isn't an ffs function in opencl but you can do one with clz.
17:58.08vasci mean
17:59.23vasclike
17:59.44vascyou iterate the bitvector
17:59.56vascand for each segs[i]
18:00.07vascyou use clz(pp->segs[i])
18:00.41vascand while its != 32
18:00.51vascyou extract that bit and test it
18:01.05vascor something like that.
18:01.34mdtwenty[m]hm yeah i will try that
18:01.35vasci think clz is like 1-cycle.
18:02.11vascits not perfect but it should be less bad.
18:02.23vascwe need to profile the code to know if its better to build the list or not.
18:02.26mdtwenty[m]but i also think that one of the problems is with inserting partitions in the partitions array
18:02.32mdtwenty[m]at least for huge scenes like the goliath
18:02.55vascpossibly. for that you need to use a linked-list instead of an array i guess.
18:03.29vascthe ANSI C code uses double-linked lists but i think you only need a single-linked list.
18:04.30vascbut i'm not sure.
18:05.13vascso you're working on that?
18:05.24mdtwenty[m]i started implementing a list to store the partitions, and the goliath scene would only take 0.55 sec or something IIRC, against the 40+ sec with the array version
18:06.25vascnice.
18:06.32mdtwenty[m]there is still some issues with some missing partitions for scenes with difference operators
18:06.52vascshow me the code and i can help debug if you want.
18:09.27mdtwenty[m]1 sec
18:14.05*** join/#brlcad ``Erik (~erik@pool-100-16-14-17.bltmmd.fios.verizon.net)
18:15.49mdtwenty[m]posted a file: weave_partitions_list.patch (53KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/aTomIMyTJtdGIWEZhzxmrMne>
18:15.52mdtwenty[m]ok this should be it
18:16.15mdtwenty[m]is still a work in progress
18:19.54mdtwenty[m]intersections and unions seems to be working
18:20.43mdtwenty[m]at least with the simple scenes that i have for testing
18:21.12mdtwenty[m]but without rt_boolfinal implemented it is hard to test with other scenes
18:22.50vascseems kinda wonky
18:28.13vasctake this:
18:28.14vasc<PROTECTED>
18:28.15vasc+    uint start_index = 2 * h[id];
18:28.15vasc+    tail_pp = append_partition_pp(partitions, ipartition, id, start_index);
18:28.15vasc+uint append_partition_pp(global struct partition *partitions, global uint *ipartition, size_t id, uint start_index)
18:28.15vasc+{
18:28.17vasc+    uint new = start_index + ipartition[id];
18:28.19vasc+    uint old = start_index + ipartition[id] - 1;
18:28.21vasc+
18:28.23vasc+    if (ipartition[id] == 0) {
18:28.25vasc+        //No partitions yet
18:28.27vasc+        partitions[new].back_pp = new;
18:28.29vasc+        partitions[new].forw_pp = new;
18:28.31vasc+        return start_index;
18:28.33vasc+    }
18:28.35vasc+
18:28.37vasc+    partitions[new].back_pp = old;
18:28.39vasc+    partitions[new].forw_pp = new;
18:28.41vasc+    partitions[old].forw_pp = new;
18:28.43vasc+    return new;
18:28.45vasc+}
18:28.47vascwhy not call as append_partition_pp(partitions+start_index, ipartition, id); instead?
18:28.55vascthat would eliminate one variable.
18:29.17vascas for the code in append_partition_pp....
18:30.15vascwhile it's not the case in this particular instruction
18:30.26vasci thought you needed to insert the element at the end?
18:30.53vascunless you're doing this like a C++ linked list
18:31.08vascwith a bogus node on the beggining which points to the end and start of list or something.
18:32.14vascalso you could just pass ipartition[id] since you never use each value seperately.
18:32.54vascoh right.
18:33.01vascipartition says how many partitions there are
18:33.04mdtwenty[m]noted! and yes i use only the functions to update the back_pp and forw_pp values
18:33.05vascso it points to the end of list
18:33.15vascwell
18:34.14vasci disagree with this:
18:34.15vasc<vasc> +    if (ipartition[id] == 0) {
18:34.15vasc<vasc> +        //No partitions yet
18:34.15vasc<vasc> +        partitions[new].back_pp = new;
18:34.15vasc<vasc> +        partitions[new].forw_pp = new;
18:34.15vasc<vasc> +        return start_index;
18:34.17vasc<vasc> +    }
18:34.32vasci think should be partitions[new].back_pp = partitions[new].forw_pp = 0;
18:34.52vascif there's nothing else in the list there's no next or prev node.
18:36.04vascin fact its better to just
18:36.22vasci think should be partitions[start_index].back_pp = partitions[start_index].forw_pp = 0;
18:36.30vascmakes it more explicity
18:36.35*** join/#brlcad teepee (~teepee@unaffiliated/teepee)
18:36.37vasc^H
18:36.59vascand this:
18:37.07vasc<vasc> +    partitions[new].back_pp = old;
18:37.07vasc<vasc> +    partitions[new].forw_pp = new;
18:37.07vasc<vasc> +    partitions[old].forw_pp = new;
18:37.10vasci think it should be
18:37.33vasc+    partitions[new].back_pp = old;
18:37.33vasc+    partitions[new].forw_pp = 0;+    partitions[old].forw_pp = new;
18:37.39vascor something
18:38.06vascthe circular references are kinda weird.
18:38.21vascso you basically know if its the end or start of the list because of the circular reference?
18:38.23mdtwenty[m]yes and i think the issue comes from that
18:38.48mdtwenty[m]ye that was my idea
18:39.17vascit can be done that way i guess, but usually we just say there's no next or prev with a null pointer.
18:39.19vaschm
18:39.23vascnow that i think about it
18:39.34vasc0 itself is a valid position in our case
18:39.39vascso you would have to use -1 or something
18:39.44vascor MAX_INT
18:40.30vascMAX_UINT ~0
18:40.42vasci guess your way also works
18:40.53vascits just not very conventional...
18:42.01mdtwenty[m]and i am having trouble when there is only 1 partition
18:43.55mdtwenty[m]i think it makes more sense having the forw and back set to 0 if there is no previous/next partition
18:45.05vascnah i can't be 0 because 0 is also a valid position
18:45.07vascit
18:45.37mdtwenty[m]j = partitions[head_pp].back_pp;  j != partitions[j].forw_pp; j = partitions[j].forw_pp)
18:45.41vascyour way of doing it with the circular references is ok.
18:45.59mdtwenty[m]when there is only 1 partition this for doenst work
18:46.46vascwtf.
18:47.11vaschm
18:48.43vascwell
18:48.55vascthe thing is your current code always skips the last element of the list from i see.
18:49.20vascinstead of using a while you need to use a do loop.
18:49.26vascand you need to check for an empty list.
18:49.29vascor something like that.
18:51.02vascif its a one element list it skips the one element. or would it you didn't have that ipartition[id] == 1 check in there.
18:51.13vascbut in lists > 1 it skips the last element in the list as well.
18:53.22mdtwenty[m]hm yes i see that
18:53.53vascor terminate the list with something other than a circular reference.
18:54.29vascotherwise you can't disambiguate between the last element and being past the last element.
18:54.53vascwithout extra checks.
18:55.39vascwe can use 0 because its also a valid position
18:55.41vascso
18:55.46vascMAX_UINT
18:56.04vascis NULL
18:57.39``Eriksweet jeebus, use a pastebin
18:58.12vascwe can talk private if you want.
18:58.27vascits just too small to use pastebin.
18:58.47``Erikpublic is good, but for gobs of code, chuck it on a paste bin (even if it's 3 lines) and shoot a link, then do edits/mods there or something :)
18:59.35vascthat's the thing though. I don't want to write code for him. :-)
18:59.38vascjust comment on it.
18:59.55vasci'm kinda overdoing it though i guess.
19:00.11``Erikif these back_pp and forw_pp linked list things are using the BRL-CAD linked list "stuff", there are macros for handling them, including an iterator iirc
19:01.37``ErikBU_LIST_FOR() et al... include/bu/list.h
19:02.44mdtwenty[m]this is opencl code
19:03.58``Erikah, 'k, cool, n/m me O:-) *wanders back off*
19:05.02vascwe should make some macros eventually.
19:05.46vascor at least inline functions.
19:09.16vascwe can't directly port the libbu macros. we don't have malloc().
19:09.29vascand we don't wanna do a malloc per node either.
19:10.00vascmemory allocation in opencl is done on the host code.
19:10.10vascthe device just uses memory.
19:35.43*** join/#brlcad ChanServ (ChanServ@services.)
19:35.43*** mode/#brlcad [+o ChanServ] by card.freenode.net
19:40.34mdtwenty[m]ok good news.. fixed the issues with that cycle and the code now seems to be working for all the test scenes i am using
19:42.51mdtwenty[m]i will add the code for the dynamic bit vector and optimize the bool_eval and will upload the patch later tonight
19:43.27mdtwenty[m]optimize the bool_eval = inverting the cycle as you suggested
19:46.44vascokay
20:34.27``Erikmdtwenty[m]: remember to test edge cases (last element, first element, after the last, before the first, ...) :)
20:34.53``Erikvasc: port malloc? :D it ain't magic *duck* :)
20:36.06vascwell, it's a performance hog to call it too often.
20:36.18vascwe're better off with regular memory pools.
20:38.56vascmalloc and free need to have support for variable blocks, degrag, etc, this has a negative performance impact.
20:39.14vascdefrag
20:47.20StragusI think of malloc/free like the rand() of memory management. Useful to get started, not for real code
20:47.41Straguswrote his own memory manager about a decade ago and never looked back
20:48.25vascmost of the time it's not necessary to have something which supports variable sized blocks anyway.
20:49.02StragusIndeed, and if all you need are constant sized blocks, you can have an overhead approaching zero bytes per block
20:49.11vascyes.
20:49.12Stragusmalloc() is darn wasteful
20:49.45vascit's also a problem if you call it once per element, because of all the possible system calls.
20:50.04vascmalloc implementations themselves usually buffer things.
20:51.01vascbut malloc isn't omniscient. the programmer usually has more details on the type of memory uses to make something better than that.
20:51.09StragusAnd that behavior depends on the libc/OS. Linux loves to buffer things for higher malloc() performance, FreeBSD and Windows free aggressively
20:51.28``ErikO.o your malloc doesn't have to smell or look anything like the unix alloca malloc (which is generally split into like 4 different impls, with phkmalloc and whatever the one glibc/linux uses as the two big open source ones)
20:51.44vascfirst game i programmed on was an ANSI C MUD, it came with its own custom allocator because of that.
20:51.57``Eriklike a diku?
20:52.01``Erikor circle?
20:52.04StragusBottom line, use your own memory manager, and make it NUMA-aware
20:52.11vascyes. a Diku Merc Envy MUD.
20:53.03vasci ran one of the MUDs in our campus.
20:53.39vascso i programmed custom classes and things like that.
20:53.53vascfirst time I did socket programming.
20:55.06``ErikStragus: I'd say that's bad advice for most programmers, most aren't able to do it better than the system and will introduce unnecessary and difficult bugs attempting, and the few that can will probably never hit that situation... you do weird shit, not everyone is as weird as you... :D
20:55.44vascmalloc is a nice tool to have, but i think a memory pool abstraction would have been good enough for most people.
20:56.07``Erikoff to the library and day care with me, Excelsior! https://www.youtube.com/watch?v=otOARxAOp2g
20:56.09gcibot[ Excelcior!.wmv - YouTube ]
20:57.43Stragus``Erik: Then people should use whatever is written by people who know that stuff. :) No use should rand() either, people grab the Mersenne Twister or any other fancy RNG of the day
20:58.23vascproblem with RNG is like you said with malloc, quality of implementation between OSes varies quite a lot.
20:59.11vascfunilly enough, that MUD also had its own custom RNG...
20:59.58vascalso its own custom string allocator.
21:00.03StragusI'll agree that rand() is a lot far worse than malloc()
21:00.43vascShared String Manager i think was the name they gave it.
21:01.34vasci've also seen games have their own disk I/O functions and things like that.
21:03.08StragusOf course. Any reasonable game should have a thread dedicated to asynchronous disk I/O
21:04.09vascthe network code in that MUD disabled naggle and did its own buffering.
21:05.05vascthat was kind of fun afterwards in classes.
21:05.11StragusThat Naggle buffering is terrible. You can feel the 200ms delay
21:05.39vascwe had to write a non-blocking program. like everyone did it with UDP, and i did it with non-block TCP
21:06.03vascthe teacher was kinda amazed i thought about it (we didn't learn that in class)
21:06.17vascwell i had seen it before...
21:06.45StragusI once wrote an online game too, browser-based... but it was entirely written from scratch in C, it was its own HTTP server
21:06.56vasccool.
21:07.04vasci thought about doing something like that once.
21:07.13StragusKind of crazy, it was so demanding in time and energy that I just gave it up one day
21:07.17vascMUDs are basically a sort of telnet server usually.
21:07.25StragusAlso, I didn't know what I was doing so the code was terrible
21:07.44vascwell HTTP has a lot of its own verbiage I guess.
21:07.57StragusWell, HTTP was just a tiny piece of the whole thing
21:09.16vasci thought about rewriting an http server, like lighthttpd or whatever it was called, or make an apache module out of it :-)
21:09.26vascor making an CGI
21:09.53StragusPeople expect a lot more interactivity from games these days
21:10.00StragusMine generated HTML 3.0 stuff, eh
21:10.17vascwell, those browser game can still be quite popular
21:10.22StragusIt had a few thousand players (up to 2002 or so?), and I actually changed my online nickname because I felt bad answering questions from people who knew about it and asked where I had disappeared
21:10.34vascheh
21:10.40StragusAdministrating an online game is a _lot_ of trouble
21:10.59vasci had enough trouble with like 100 college MUD players.
21:11.22vascwhen I was a Freeciv administrator we did have a game server... but I wasn't the main guy administrating it so...
21:12.04vascstill I think it was useful to interact with the game players to figure out where to advance the game next, so I guess I messed with it more than the average maintainer.
21:12.10StragusI had set up an alert where the mods could make my computer play music to wake me up in the middle of the night if there was some serious problem/bug needing attention
21:12.22vascsheesh.
21:12.48vasci just let it crash and restarted it later :-)
21:13.05vascthat's one good thing about games, people know stability isn't always up to scratch :-)
21:13.19StragusYou feel bad about that when you have 4000 players logging in many times a day :)
21:13.38StragusSo yes, it was way too stressful, but it was a good learning experience
21:13.40vascwe did have an auto-restart script.
21:14.19vascand perioric saves.
21:14.23vascperiodic
21:14.45vascone of the first things I did with Freeciv was rewriting the network code.
21:14.51vascit didn't use non-blocking sockets.
21:14.55StragusDarn
21:15.18vascit was really bad because it has simultaneous moves.
21:15.45vascsometimes people had lousy dial-up connections, their connection froze, and the OS timer was like 5 minutes.
21:15.54vascuntil it disconnected them.
21:15.56StragusMy HTTP thing was a single thread, non-blocking sockets. It ran pretty smoothly, the whole universe "ticks" were taking 5 seconds (so the server would delay HTTP requests for 5 seconds every 10 minutes)
21:16.31vascyeah if it's well programmed its quite amazing the amount of connections you can multiplex with non-block TCP.
21:16.45vascpeople dismiss it too easily.
21:17.07StragusWell, you don't really want to go beyond a thousand sockets per thread
21:17.21vascFreeciv only has like, I dunno the limit now, but usually people played with like 16 player or 8.
21:17.59StragusI tried Freeciv and disliked many things about the gameplay
21:18.21vascwell i only enhanced it, i wasn't one of the original authors :-)
21:18.31Stragus:) Right
21:18.47vasci wrote a game client basically.
21:18.58vascat least that's how i started.
21:19.15StragusI still occasionally get brief dreams about writing a game. The last time was in 2013, I did that: http://www.rayforce.net/newproject024.png
21:19.34vascthere's a lot of things i didn't like but it became really hard to refractor it without breaking backwards compatiblity.
21:19.48StragusThe hydrography is actually computed by darn Computation Fluid Dynamics, with a water cycle and underground flow
21:20.03vascit looks nice.
21:20.35StragusI think I am way too perfectionist to ever finish something
21:20.50vascthat's half the work to do a simple flight sim or strategy god game.
21:21.19StragusThese trees? http://www.rayforce.net/newproject032.png  -  Procedurally generated from 200k triangles, then reduced by an algorithm to an optimal set of just 8 triangles to represent the best geometry with the least distorsion possible
21:21.32StragusAnd that algorithm was like 7k lines
21:22.00StragusI need to learn _not_ to aim for the best job I can do. Because it takes too darn long
21:22.05vascwell good foliage can be really complicated. that's why most game engines used SpeedTree SDK...
21:22.23vascand i'm saying game engines not games.
21:22.58StragusI have a hard time using people's code, when I feel like I could write better
21:23.07StragusThe problem is that "writing better" can take months
21:23.32vasci've wanted to design my own computer programming language more than once.
21:23.45vascit's not like i haven't written a compiler before.
21:24.14StragusI wouldn't personally go down that route
21:24.18Stragushugs and cuddles C
21:24.46vascwell i've written design specs more than once. but never actually liked one of my language designs enough to go through with it.
21:25.34StragusI would add a few keywords to the C language, to provide more contextual information to the compiler to produce better assembly
21:25.39StragusBut I wouldn't write a new language
21:26.38vascwell.
21:27.00vasci had like module declaration and implementation like Modula-2, syntax like C, advanced array support.
21:27.10vascand I think I added SIMD to the specs.
21:27.44StragusGNU C has vector extensions
21:27.53Stragusthinks of GNU C as the one true C
21:27.57vascit does. but opencl is a lot better.
21:28.37StragusYes well, that targets different hardware, with completely different approaches and algorithms
21:30.23vascI mixed Pascal/Modula-2 and C
21:30.25vascso it was like
21:31.03vascfunc xpto(a, b, c: int) : (a, b: int)
21:31.25vasc{}
21:32.07StragusAny advantage over C besides a different syntax? :)
21:32.36vasclike you can see it supports multiple value return in functions.
21:32.44vasceven if it's just syntatic sugar anyway..
21:32.50vascyou can do that with a C struct.
21:32.57StragusMultiple return values is good
21:33.45StragusI wish C also had statements like  break continue;  instead of having to use goto
21:34.08vasci think i had that at one point, like break 2; or something.
21:34.11StragusAnd __attribute__((__may_alias__)) should be in the standard instead of that silly union thing
21:34.31vascbut it seemed kinda messed up.
21:35.35vasci agree that it would be better to have some more control flow mechanisms.
21:36.08vasci can't say i'm a fan of C declarations though. or should I say C++ declarations.
21:36.17vascbecause if you look at K&R declarations they're nothing like that.
21:36.25StragusAnd I really would like to be able to tell the compiler the probability of each branch
21:36.44Stragus__builtin_expect() is too absolute, it's like 100% or 0%
21:37.04StragusAnd compilers should obey the "register" keyword, darn it
21:37.32vascthing is sometimes there's register spills. so the compiler disables or ignore the hint.
21:37.51StragusAnd if you have a switch() without a default case and the input value isn't handled, it should be undefined behavior
21:38.06StragusI don't want a darn bound check every time I put a switch()
21:38.12``Erikpats swift O:-)
21:38.35Stragusvasc: The hint is just ignored now because "compilers know better"
21:39.21vascwell I looked at Nim some time ago ``Erik but it just seemed to have an overly complicated syntax.
21:39.49vascas for Swift is seems layered on top of the rest of the Apple runtime.
21:39.51vascit
21:40.42StragusI want more low-level control, and all new fancy languages "designed to replace C" tend to move _away_ from that
21:40.44vascand Go has a garbage collector so...
21:40.52vascexactly.
21:41.00vascthey're pseudo-systems programming languages.
21:41.13vascthey're Java wannabees rather than C replacements.
21:41.24``Eriknim kinda smells pythony
21:41.40vasclike Go, it seems to be used mostly for what Java was used, network servers and the ilk.
21:42.00``Erikvasc: yeh, I've been doing ios code lately, so apple stack, arm cpu, etc...
21:42.10vascoh right forgot to mention Rust
21:42.17``Erikcommon lisp on the back end because I'm twisted
21:42.34vasci actually liked Common Lisp.
21:42.57vascyou might hate it or love it, but the syntax makes sense for what it does.
21:43.06vascand it just feels right.
21:43.27vascproblem is when you have to interact with the rest of the system, quite often its designed in C.
21:44.43vascoh right the complicated syntax is Rust, not Nim
21:45.11vascNim's issue is garbage collection
21:46.02vascwhenever someone claims to have written a "systems programming language" and then they add a garbage collector the features list.
21:46.09vascit's a hint they don't have a freakin clue.
21:46.51vasci mean its nice to just ignore memory allocation on a lot of programs
21:47.02vascbut not on systems.
21:48.05vasci can guess what Linus would say about rewriting the kernel to use a garbage collected language.
21:48.55vascand as much as I hate Wirth, at least he followed people's advice and actually tried to write an OS kernel with his later languages.
21:49.59vascwhich is why Module-2 is so much better than Pascal. except it was too late for people to care about it.
21:50.03vascModula-2
21:53.05vascother than C and OpenCL i like Python and Lisp
21:53.27vascJava is kinda ok.
21:53.47vascthe frameworks are mostly horrible, horrible.
21:54.25vascJava itself, I think its good for what it was designed for, the only wart is the type system.
22:01.38vascoops gotta go
22:24.22*** join/#brlcad teepee (~teepee@unaffiliated/teepee)
22:32.11*** join/#brlcad kintel (~kintel@unaffiliated/kintel)
23:08.16StragusWoohoo, the first AMD Epyc motherboard is out, no dual-socket yet... It supports 1 tetrabyte of RAM though, and 7 PCIe slots for a couple GPUs

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.