<< 15-12-2020 >>

00:06:38*vicfred quit (Ping timeout: 264 seconds)
00:11:30FromDiscord<j-james> how could i force nim to use this findAll (https://nim-lang.org/docs/re.html#findAll.i%2Cstring%2CRegex%2Cint ) instead of this one (https://nim-lang.org/docs/re.html#findAll%2Cstring%2CRegex%2Cint )?
00:12:44FromDiscord<j-james> my regex is capturing this junk( `(captures: @[], namedGroups: ..., boundaries: 48 .. 143)`), and i think that's the problem
00:13:32Fish-Faceyou should get the same captures from those
00:13:52Fish-Facejust one is an iterator and one build the sequence instead if yielding one match at a time
00:15:58FromDiscord<isaacdonaldson> does nim async runtime use libevent? or some cross compatible nim implementation? (assuming those are the only 2 options?)
00:16:44FromGitter<jrfondren> https://play.nim-lang.org/#ix=2I5I <- proc vs. iterator
00:17:01FromDiscord<ElegantBeef> Aw i had an example wrote up and everything
00:17:02FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2I5J
00:17:37FromDiscord<ElegantBeef> Nim is smart enough to choose the iterator first, is basically what we show
00:18:05FromDiscord<ElegantBeef> Well depends on the context, but for for loops it chooses the iterator
00:18:31FromDiscord<j-james> but why does this code `for url in findAll(text, re("<http\\S+>")): echo url` create that earlier junk?
00:19:58FromGitter<jrfondren> it's not because you're calling the wrong thing. the proc findAll uses the iterator and adds the results to a seq
00:20:31FromGitter<jrfondren> but with that output... aren't you using 'regex' instead of 're'?
00:20:40FromDiscord<ElegantBeef> All the findalls return strings so i dont see why you're getting that behaviour
00:20:57FromGitter<jrfondren> look at which module you're importing
00:21:07FromGitter<ynfle> How do I declare a global variable?
00:21:14FromGitter<ynfle> Just `let in global scope?
00:21:18FromGitter<jrfondren> yeah
00:21:36FromGitter<ynfle> Can it be in `when isMainModule:`?
00:21:37FromDiscord<ElegantBeef> you can also use the `{.global.}` pragma if you want it to be a scoped global variable afaik
00:21:47FromGitter<ynfle> No I don't need that
00:21:58FromGitter<ynfle> Can it be declared after the routine that uses it?
00:22:15FromDiscord<ElegantBeef> With code reordering, probably, without no
00:23:37FromDiscord<dom96> the latter, it's all implemented in Nim
00:24:42FromDiscord<isaacdonaldson> why not use libevent? just curious
00:24:58FromDiscord<ObjectStateEqualsWin> Can I run nim code from vsCode?
00:25:28FromDiscord<ElegantBeef> With a nim extension you can run the current file with f6, though it's just running `nim c -r ./path/to/file` in your terminal
00:25:41FromDiscord<dom96> @isaacdonaldson more control and less dependencies
00:26:10FromDiscord<ElegantBeef> Yea pure nim is the way to go, as it doesnt require any extra licensing or libraries, just hit `nim c` ๐Ÿ˜„
00:26:18FromDiscord<aHaquer> @ObjectStateEqualsWin yes
00:26:38FromDiscord<aHaquer> Every major editor has nim at this point
00:26:55FromDiscord<aHaquer> Syntax highlighting I assume you mean
00:26:58FromDiscord<isaacdonaldson> @dom96 makes sense, dependencies are a killer to deal with, thanks for the reply
00:27:11FromDiscord<ObjectStateEqualsWin> nim : The term 'nim' is not recognized as the name of a cmdlet, function, script file, or โ†ตoperable program. Check the spelling of the name, or if a path was included, verify that the โ†ตpath is correct and try again.โ†ตWhen i type nim in cmd, nim comes up so I think I've done this right?
00:27:26FromDiscord<ElegantBeef> Close vscode and reopen
00:27:49FromDiscord<ElegantBeef> If that doesnt work, your vscode doesnt seem to be using your path
00:28:19FromGitter<ynfle> How can I pass a non sunk variable in to a `table`
00:28:26FromGitter<ynfle> Is there a copy routine?
00:28:36FromDiscord<shadow.> how do i have values as generic parameters? such as the first parameter in the `array` generic
00:28:57FromGitter<ynfle> @shadow. in a proc, type what?
00:29:10FromDiscord<isaacdonaldson> @ElegantBeef evented programming offers it self to some really cool opourtunites, especially with the data driven paradigm some people program in.
00:29:11FromDiscord<ElegantBeef> possibly `static[T]`, but i'm uncertain
00:29:17FromDiscord<shadow.> like in a type generic
00:29:48FromDiscord<shadow.> im making a `Bitset` type (for practice, ik its not practical) and i need a way to specify length in the generic
00:29:55FromGitter<ynfle> https://play.nim-lang.org/#ix=2I5M
00:30:10FromDiscord<shadow.> thank you
00:30:18FromDiscord<ElegantBeef> Oh shit i was right? ๐Ÿ˜›
00:30:33FromGitter<ynfle> Ya
00:30:37FromGitter<ynfle> Do it all the time
00:30:44FromGitter<ynfle> @ElegantBeeft
00:30:52FromGitter<ynfle> *Beef
00:31:04FromGitter<ynfle> Can you help my with `sink`ing a variable
00:31:35FromDiscord<ElegantBeef> I havent played around with that fancy stuff yet, but coulding you just do `let a: T = sinkVar`?
00:31:44FromDiscord<ElegantBeef> (edit) "coulding" => "couldnt"
00:32:17*aHaquer joined #nim
00:32:24FromDiscord<ElegantBeef> I just figure since views work like that, it could aswell
00:32:28FromDiscord<lockieluke3389> I found out i have to add `--cpu:i386` and `--os:Windows` to eliminate the issue
00:32:29FromGitter<ynfle> https://play.nim-lang.org/#ix=2I5N
00:32:45FromGitter<ynfle> @ElegantBeef
00:32:51FromDiscord<shadow.> fair enough
00:33:47FromDiscord<lockieluke3389> but don't know why i have to do that while others don't have to add the arguments
00:35:31FromDiscord<j-james> jrfondren: ah thank you, i am
00:35:37FromDiscord<j-james> time to refactor
00:35:57FromDiscord<ElegantBeef> Ynfle you're attempting to add to an immutable table
00:36:31*justsomeguy joined #nim
00:37:17FromGitter<ynfle> :facepalm:
00:37:17FromDiscord<ElegantBeef> It's an unhelpful error so i guess make an issue on github ๐Ÿ˜„
00:38:07miprihttps://play.nim-lang.org/#ix=2I5Q
00:38:48FromDiscord<ElegantBeef> Well idk if it's actually bug worthy, but there needs to be a more informative message when passing a `T to a proc that takes a var T`
00:39:06FromGitter<ynfle> Yup
00:39:25FromDiscord<lockieluke3389> why can a bot talk like human lol
00:39:33FromDiscord<ElegantBeef> Cause it's not a bot it's a bridge to IRC
00:39:40FromGitter<ynfle> @mipri, you can use this which would work for the gcs as well https://play.nim-lang.org/#ix=2I5R
00:39:48FromDiscord<lockieluke3389> oh that's why
00:40:12FromGitter<ynfle> @mipri, turns out that wasn't the issue
00:40:20FromDiscord<ElegantBeef> a `sink` var is a variable that's giving up ownership right?
00:41:01mipriI'm not saying that the gc is the issue. that paste has an example of an explicit copy (using assignment) and then suppresses the warning by .move'ing the parameter
00:44:02miprithere's also system.deepCopy, which you have turn on. from contact with Python I feel like there should be a less expension version, but Nim's deepCopy knows what types it's working with, it's probably fine.
00:46:29*vicfred joined #nim
00:51:35FromDiscord<fwsgonzo> @disruptek regarding serialization
00:51:35*abm quit (Quit: Leaving)
00:52:10FromDiscord<fwsgonzo> does it boil down to pointer, length?
00:52:49FromDiscord<fwsgonzo> I feel like serialization could be a first-class citizen in a modern language
01:02:11*vsantana joined #nim
01:07:20*vsantana quit (Quit: leaving)
01:16:33*Tanger joined #nim
01:19:11*regreg joined #nim
01:41:05ForumUpdaterBotNew thread by Salvipeter: Concat for linked lists?, see https://forum.nim-lang.org/t/7255
01:53:44FromDiscord<shadow.> sent a long message, see http://ix.io/2I6c
01:55:37mipri!eval import tables; var x = [0].toCountTable; echo x
01:55:39NimBot{0: 1}
01:56:03mipri!eval import tables; var x: CountTable[int]; x.inc 0; echo x
01:56:05NimBot{0: 1}
01:56:30FromDiscord<shadow.> newCountTable [0] seemed to work too
01:56:42FromDiscord<shadow.> is one preferred?
01:57:14miprione gives you a CountTable and one gives you a CountTableRef
01:58:21FromDiscord<shadow.> ohhh
01:59:39FromDiscord<shadow.> wow aoc day 10 part 2 really was not that hard
01:59:52FromDiscord<shadow.> or rather
01:59:54FromDiscord<shadow.> not many loc
02:01:03mipriyeah the first week+ was so easy that the most common problem was mishandling newlines and unexpected mutation
02:01:49FromDiscord<shadow.> lmao yeah
02:01:49FromDiscord<ElegantBeef> Newer ones are trending towards math to make it more complicated
02:01:53FromDiscord<shadow.> true
02:01:56FromDiscord<shadow.> today's was pretty easy tbh
02:02:05FromDiscord<shadow.> `set[0..35]` came in handy, thanks beef
02:02:13FromDiscord<shadow.> before i was just using uint64 and bitops lmfao
02:02:23FromDiscord<shadow.> but really, my part two for day 10 was just
02:02:28FromDiscord<shadow.> all of 5 lines
02:02:29FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2I6j
02:02:48FromDiscord<shadow.> that too i suppose
02:02:48FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2I6k
02:03:06FromDiscord<ElegantBeef> My part 2 was vastly dumber
02:03:49FromDiscord<ElegantBeef> Oh nvm that's day 10 ๐Ÿ˜„
02:09:59disruptekfwsgonzo: frosty is good enough for me, as long as you don't feed it obviously impossible input.
02:10:08disruptek!repo frosty
02:10:09disbothttps://github.com/disruptek/frosty -- 9frosty: 11serialize native Nim types to strings, streams, or sockets โ›„ 15 22โญ 1๐Ÿด
02:16:33FromDiscord<TheUnique> Probably a dumb question, but is there any benefit to choosing the cpp output instead of c other than interoperability? Does nim output c++ code that takes advantage of compiler optimizations not available for c, or is it c-style c++ code?
02:17:37mipriI've heard that exceptions might be better with cpp
02:17:58FromDiscord<ElegantBeef> I dont think that matters anymore with arc/orc using goto even on C
02:18:17FromDiscord<ElegantBeef> Unless the C++ exceptions are more descriptive
02:18:22FromDiscord<ElegantBeef> I really need to not speak
02:20:44FromDiscord<TheUnique> I might run some benchmarks someday just to see if there is any consistent and noticeable difference in performance. I was just wondering since I know c++ can be faster than c, but only if its written in a way that the compiler can take advantage of. If it's just c that a c++ compiler can compile, then it should be exactly the same.
02:20:58FromDiscord<TheUnique> (edit) "its" => "it's"
02:25:56FromDiscord<ElegantBeef> Lol ynfle, just playing around but hey this is a totally nice and not bodged in message https://media.discordapp.net/attachments/371759389889003532/788230325150154772/unknown.png
02:30:45FromDiscord<ElegantBeef> Do wonder if using ANSI codes for this type of stuff would be an accepted in a PR, as this gives a bit more indication where the error actually is https://media.discordapp.net/attachments/371759389889003532/788231544892424213/unknown.png
02:36:53*rockcavera quit (Remote host closed the connection)
02:51:22*justsomeguy left #nim (#nim)
02:57:33disruptekgoto exceptions remove the c++ advantage, and they are default with arc/orc.
02:57:58*mfiano quit (Ping timeout: 256 seconds)
02:59:36disruptekcpp has a disadvantage in that the backend is less tested and sometimes reveals codegen bugs that don't exist on the c side.
03:09:27*muffindrake quit (Ping timeout: 260 seconds)
03:11:29*muffindrake joined #nim
03:20:22*Tanger quit (Read error: Connection reset by peer)
03:20:23*Tlangir joined #nim
03:43:52*thomasross quit (Ping timeout: 256 seconds)
03:58:20FromDiscord<j-james> what exactly is up with this error?
03:58:24FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=2I6H
03:59:51FromDiscord<j-james> never mind, the `Regex` type from `re` is different from the `Regex` type from `regex`
03:59:53FromDiscord<ElegantBeef> Do you have `nre` and `re` imported?
04:00:10disruptekthere are only four different regexp packages to choose from.
04:04:08EvolverAs a user, what is the difference between ARC and ORC? When should I use which?
04:04:39disruptekuse orc unless you know you have no cycles that need breaking.
04:04:48disruptekalternatively, you can break cycles manually.
04:05:05Evolverso ARC doesn't have a cycle breaker then...? OK
04:05:14EvolverI'll skip ARC then.
04:05:17FromDiscord<ElegantBeef> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html if want more info about them
04:05:24disruptekright. that's the only difference between arc and orc.
04:05:50EvolverWill ORC become the default in the future?
04:05:51miprithat and the consequences of that difference, like cycle detection taking a harder to predict amount of time.
04:05:53disruptekyes.
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:15EvolverWhat is the difference between ORC and the gc of Swift?
04:06:29disruptekorc doesn't use atomic rc.
04:06:35*supakeen joined #nim
04:06:52EvolverIs that good or bad? what's the real world tradeoff?
04:06:53FromDiscord<ElegantBeef> Arc/Orc is like rust's GC
04:07:07disruptekit's not needed for nim.
04:07:44PrestigeHm I've seen some conversation of interfaces in Nim. Are concepts going to sort of fill that gap? Or what is the current plan/discussion?
04:08:13Evolverdisruptek: Overall, is the hard realtime gc of Nim (ORC) as good as that of Swift and Rust?
04:08:34disruptekwell, it's different.
04:09:08disruptekconcepts redesign is largely done but statics aren't a thing yet and we haven't really tested it /and/ we haven't completed support for the prior syntax.
04:09:20disruptekbut it solves a lot of problems, including performance issues, with the old concepts.
04:09:53disrupteki haven't worked on them yet. i don't need the new stuff for cps but i do need it for nimph.
04:10:02disrupteki probably won't ask that araq put them in before 1.8 though.
04:10:11disruptekbut that's about when i'd expect them to go in.
04:10:36disrupteki would say that arc/orc is waaay better than rust simply because it's so much easier to work with.
04:10:44disrupteki'm biased, of course.
04:11:01disruptekthere's a good talk that i saw recently about a language called, i think, lobster.
04:11:24disruptekit's a research lang. good video on the same sorta concept of lifetime tracking and moves, etc.
04:11:36EvolverIn what way is it easier to work with?
04:11:39miprihttp://strlen.com/lobster/ yeah.
04:12:01mipriEvolver: your code doesn't change (except that destructors become more reliable)
04:12:03disruptekit's easier to promote the behavior you want via simple annotations and hints that merely accelerate your code.
04:12:03FromDiscord<Rika> You don't need to write lifetimes.
04:12:23disruptekso you start off and it just magically works, and quickly. and then you can just optimize from there.
04:12:35Evolverso I can't do this in Rust?
04:12:36mipriso you can write code expecting the GC to take care of things, and then switch to orc and there's no longer a gc, but you don't need to change your code. It's an incredible ergonomics improvement.
04:12:48FromDiscord<Rika> You can with much more effort
04:13:16EvolverErgonomics is definitely why I'm learning Nim, so that's cool
04:13:17disruptekcode that i write that is /sympathetic/ to arc is often 3-5x faster than the earlier, naive gc, which was already tunable and (arguably) real-time friendly.
04:13:37disruptekyes, ergonomics is nim's main selling point, imo.
04:13:44FromDiscord<Rika> Then you add annotations and get even more speed
04:13:49disruptekright.
04:14:00disrupteki have no published a single line of code with sink annotations.
04:14:12disruptekthis is just what i get "for free".
04:14:22disruptekbut, run your own tests.
04:14:27disrupteklook at the output of expandArc.
04:14:28*lritter quit (Ping timeout: 260 seconds)
04:14:31disrupteklook at the C output.
04:14:42disruptekuse my mangling branch for legible symbol names.
04:14:49mipriyeah your code works, but you still might want to tune it to make it faster. This is a pretty striking difference from e.g. D where there is technically a 'no GC' option but it basically forks the language and much of your code breaks.
04:14:50disruptekthis isn't rocket science.
04:15:08*lritter joined #nim
04:15:38mipriwith Rust there just isn't a GC option to begin with. If you want to be a bit with Rust that means writing a bunch of explicit copies and using owned types so you don't have to bother with lifetimes, and using Rc containers and such.
04:15:41disruptekwith rust you /can/ achieve the same wins, but the cost is very high.
04:15:45mipri*if you want to be a bit lazy with Rust
04:16:01disruptektechnically, the wins are slightly better with rust in terms of memory consumption.
04:16:24disruptekbut, that's basically it.
04:16:43disruptekand the beauty of our approach is that it works so nicely with FFI, custom allocators, memory pools, and so on.
04:16:48mipriand when you go back to some lazy Rust and try to make it faster and avoid the copies, rather than orc's slight tuning, it's a pretty significant refactor.
04:17:05disruptekwe're going to be able to build these abstractions into the language in a way that isn't as cheap as rust.
04:17:17disruptek*efficient. ๐Ÿ˜‰
04:18:10disruptekalso, a lot of the impl really hasn't been optimized yet. there is a lot of room for free improvement going forward.
04:19:21FromDiscord<Rika> Get as close to rust efficiency without inheriting its "rust"; the cruft of lifetimes and stuff
04:19:44EvolverAre there so-called memory leaks in Nim? (if I use the default gc or ORC)
04:19:52disruptekyes.
04:20:02EvolverHow do I avoid them?
04:20:07mipriyou can leak memory just by using manual dynamic allocation and not cleaning up
04:20:17disruptekfile a bug report if you're able to reproduce the leak.
04:20:49PrestigeI had someone tell me earlier than Nim was slower than go, and even python. Then, they linked me to a benchmark that proved themself incorrect
04:20:53Prestigewas pretty funny
04:21:26FromDiscord<Daniel> bad code is always slower in any language
04:21:30Evolvermipri: any webpage that I can read to be careful not to leak?
04:21:35FromDiscord<ObjectStateEqualsWin> So I moved where nim was at and reset the paths. โ†ตHowever when I run in vscode it gets an error "Requested command not found:" pointing to where I use to have my file at.
04:21:36disrupteki just don't care. the fact is, we can usually get faster. we sit at a level where we can go down to asm if we have to.
04:21:46disruptekwe'll be the fastest eventually. ๐Ÿ˜‰
04:22:08FromGitter<iffy> I'm getting "Error: unhandled exception: errno: 2 `No such file or directory` [IOError]" when trying to do `stdout.writeLine "some stuff"` at the end of longish script (which executes numerous subprocesses). The strange this is, a subsequent `echo` succeeds. How can I debug this?
04:22:15PrestigeIt was faster than go in the benchmark, was just a funny thing
04:22:20disruptekobjectstatesomethingsomething: your choosenim uses shims which fuck everything up.
04:22:51mipriEvolver: nothing to recommend, sorry. I haven't heard that it's a big problem.
04:22:57FromDiscord<ObjectStateEqualsWin> Reinstall everything?
04:23:09disruptekare you on windows?
04:23:15FromDiscord<ObjectStateEqualsWin> Yeah
04:23:24disruptekwell, i think that's what windows people do.
04:23:58disruptekiffy: it's odd. i guess you're not redirecting output?
04:24:31FromDiscord<ObjectStateEqualsWin> All people use windows. Others are just penguins and monsters.
04:24:33disruptekevolver: basically, orc's design does not preclude the possibility of a leak, but it's unlikely.
04:26:23FromGitter<iffy> @disruptek: I'm not directing the main scripts output. Some subprocesses are started with `startProcess options={poStdErrToStdOut}`, some with `execCmd`, some `startProcess options={poParentStreams}` and some `execProcess`.
04:26:45disruptekwell, that probably has something to do with it.
04:27:45disruptekosproc isn't great. leorize is writing a new version; i dunno the status.
04:28:17FromGitter<iffy> That sounds like a great thing... so.. why does echo work after stdout.write didn't do you think?
04:29:07disrupteki dunno, but it's a good clue to what the problem is.
04:29:17disrupteki'd also test redundant writes, an earlier echo, and so on.
04:29:30disruptekpoParentStreams is probably your culprit.
04:29:39disrupteklinux, right?
04:30:55*narimiran joined #nim
04:31:27miprianyway I'd start with waiting on the subprocesses before printing, and stracing the parent
04:31:55FromGitter<iffy> macOS
04:31:59disruptekmaybe you need to flush stdout or something, too.
04:32:19mipriit migth also be that the reported error is a lie
04:33:46miprioserr.nim just has it a module-level var that maps to errno. so something fails, but something else resets errno before the string is read?
04:34:45FromGitter<iffy> mipri are you suggesting errno 2 is the wrong error number? Or you're suggesting that the echo succeeds because something resets errno?
04:35:28miprino, resetting errno wouldn't change echo succeeding
04:37:28FromGitter<iffy> okay. I just tried `echo` before failing `stdout.writeLine` and the echo succeeds. So echo -- stdout.writeLine -- echo. Both echos succeed and stdout.writeLine fails
04:38:29leorize[m]disruptek: the status is that i lost the entire thing thanks to a drive corruption
04:38:39disruptekwow.
04:39:26leorize[m]a lesson to start uploading early i guess
04:39:39mipriiffy: when echo succeeds, you're still seeing output, right?
04:40:10FromGitter<iffy> yes, that's how I'm judging it's success
04:40:31disruptekit's almost like stdout is getting remapped.
04:40:41disruptekwhat if you write to stdmsg()?
04:40:58mipridefinitely, strace it. you'll see what fd's being written to
04:41:01FromGitter<iffy> I'm going to trace next, but after that I'm wondering what will happen if I monkey patch and remove the checkErr
04:44:02mipriproc c_ferror(f: File): cint {.importc: "ferror", header: "<stdio.h>", tags: [].}
04:44:09mipriecho c_ferror(stdout)
04:45:10FromGitter<iffy> mipri: should I run that before and after the failing stdout.writeLine?
04:45:17mipribefore
04:45:28miprisince writeLine is running it after calling c_fwrite
04:45:58FromGitter<iffy> k, waiting for my trace to finish
04:48:10FromGitter<iffy> :( traced version did not exhibit the bug
04:58:47FromGitter<iffy> mipri: echo c_ferror(stdout) just prior to error echoed "1"
05:00:04mipriok, so the bug is that something's not clearing the error and stdout.writeLine is catching it
05:00:35miprialthough that's Operation not permitted
05:00:49*spiderstew_ joined #nim
05:02:05*spiderstew quit (Ping timeout: 258 seconds)
05:04:23FromGitter<iffy> If I do: `var errno {.importc, header: "<errno.h>".}: cint` in my own code, will I get the real global `errno`?
05:04:44miprithe same as if you had 'errno' in your C code, yeah
05:04:56FromGitter<iffy> My C is very, very, very rusty
05:05:34mipriwhat you might try is just clearing errno at that point of the program, and see if it works reliably
05:06:09miprithere's a clearerr you can import from stdio.h; checkErr uses it
05:14:36FromGitter<iffy> what on earth... errno spends most of its time in my program set to 2... I see that at some point it gets set, so I'm trying to narrow down what's setting it
05:16:51*vicfred quit (Quit: Leaving)
05:19:53*kungtotte quit (Quit: ZNC - https://znc.in)
05:20:07*kungtotte joined #nim
05:24:37*justsomeguy joined #nim
05:27:42FromGitter<iffy> I think the culprit (at least the thing that's setting errno to 2) is `fileExists`
05:28:36FromGitter<iffy> And then later, my stdout has some problem and errno is already set to 2? Does that seem plausible? It doesn't explain what problem my stdout is having, but it explains why it's errno 2
05:30:09FromGitter<iffy> https://play.nim-lang.org/#ix=2I7d
05:35:37FromGitter<iffy> But... shouldn't whatever error my stdout is having set a new value for errno?
05:41:53*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:42:01*njoseph joined #nim
05:42:47FromGitter<iffy> clearing the error myself and the code works fine
05:48:21*justsomeguy left #nim (#nim)
05:54:46miprilooks like that's not actually your problem though: https://play.nim-lang.org/#ix=2I7k
05:55:35*waleee-cl quit (Quit: Connection closed for inactivity)
05:59:14FromGitter<iffy> right
05:59:58FromGitter<iffy> I'm now thinking it's a `echo "stuff\n", somewhatlargestring` that's causing stdout to be put into an error state
06:04:16FromGitter<iffy> I can see that only a portion of `somewhatlargestring` is written to my terminal before the next-launched subprocess starts
06:06:03FromGitter<iffy> setStdIoUnbuffered() doesn't help
06:06:46FromGitter<iffy> `stdout.flushFile()` after the `echo` doesn't help either
06:07:08mipritry replacing the echo with stdout.writeLine
06:09:43miprisince you're using threads and starting processes while doing I/O. stdout.writeLine's definitely fputs(), which does locking I/O
06:12:51miprieh, although echo = echoBinSafe also locks stdout.
06:12:58FromGitter<iffy> Garbage... I think it's unittest doing something
06:13:17mipriwhat? this is all in unittest?
06:13:19FromGitter<iffy> Using stdout.writeLine I get `"Unhandled exception: errno: 35 `Resource temporarily unavailable` [IOError]"` stuffed into checkpoints
06:13:21FromGitter<iffy> yes
06:13:31mipriok, yes, unittest is absolutely doing stuff
06:15:29FromGitter<iffy> I'm looking through `unittest.nim` and I can't see where it's doing anything odd to stdout/stderr
06:15:48mipriI was trying to remember the last time there was a discussion about unittest being a slightly weird environment, but that conversation was with you
06:16:09disruptekunittest is slightly weird. it's why i had to whip out my testes.
06:16:54FromGitter<iffy> yes, that was me
06:16:57FromGitter<iffy> I see now that unittest is swallowing the Resource temporarily unavailable error. But I don't think unittest is the thing actually causing the error
06:18:56FromGitter<iffy> errr... well no, I don't know what I think. Using `echo` my string is printed to stdout truncated. Using `stdout.writeLine` I see errno 35
06:19:48mipri= Resource deadlock avoided
06:22:37FromGitter<iffy> Googling, I'm seeing Python users suggesting `fcntl(fileno, F_SETFL, os.O_NONBLOCK)` to make the file handle non-blocking.
06:23:31miprithat's not something you can just do. operations on the file need to expect it
06:24:24FromGitter<iffy> okay... so how come `echo` silently moves on instead of erroring out, but stdout.writeLine fails? Is it just an attempt to make `echo` never break your code?
06:24:51miprithe next thing I'd look at is writing to a file instead of stdout, and checking that file afterwards. but I really don't know what you're doing here
06:25:28FromGitter<iffy> I actually write the `somewhatlongstring` to a file just prior to writing to stdout. It successfully writes the whole string to the file.
06:27:19mipriecho's "very often used for debugging convenience" but it doesn't say it doesn't raise exceptions.
06:27:41disruptekit can raise.
06:28:02FromGitter<iffy> So is it a bug that echo causes stdout to be in a failure state for the next stdout.write call to die on?
06:28:13disruptekprobably, yes.
06:28:24FromDiscord<mratsim> @disruptek, one thing that baffles me in Nim vs Rust is that regarding memory consumption, the Rust client for Eth2.0 is using has much memory as the Go client which is 3x more than our client (like 200MB vs 600MB). And we have so many futures flying around that are heap allocated, I'm not too sure how Rust is using so much more.
06:29:45FromDiscord<mratsim> or 600MB vs 3.5GB according to here in the memory page: https://github.com/leobago/BSC-ETH2/blob/master/report/Clients_behaviour_report.pdf
06:30:02mipriwhen people get lazy with Rust they copy unnecessarily to have multiple owned values that might've worked just fine as a single value with some borrows
06:30:05disruptek600mb versus 3.5gb... pretty sure you're talking about real memory.
06:30:12disruptekexactly this.
06:30:21disruptekit's consuming more memory; it's just that simple.
06:30:38disruptekyou can't run your client in arc yet, correct?
06:30:43disruptekdue to chronos?
06:30:55FromDiscord<mratsim> no, Nim is 600mb and Rust is 3.5GB
06:31:00FromDiscord<mratsim> we are consuming less
06:31:03disrupteks/pretty sure/pretty soon/
06:31:21disruptekyes, that's what i meant. ๐Ÿคฃ
06:31:54FromDiscord<mratsim> We don't run our client in ARC because it's unproven and contrary to other features like static which broke at compile time, this one would break at runtime
06:31:55FromGitter<iffy> I'll see if I can make a sscce tomorrow
06:32:11FromDiscord<mratsim> Also we can't update to neither 1.2.8 or 1.4 because of regression in the Nim compiler
06:32:31FromDiscord<mratsim> it doesn't pass our test suite.
06:32:45disruptekwhich is the regression in 1.2.8?
06:33:14FromDiscord<mratsim> unsigned/signed conversion that raise
06:33:15narimiran@mratsim you already fixed it this night, i think
06:33:19disruptekwill you need another audit for arc?
06:33:40narimiran@mratsim: https://github.com/status-im/nim-libp2p/pull/485
06:33:42disbotโžฅ Fixing `RangeError` introduced in Nim v1.2.8
06:34:00disrupteki'm always surprised how big a pita unsigned is, honestly.
06:34:13FromDiscord<mratsim> we didn't audit the Nim compiler, but auditors did look into the generated C code.
06:34:44disrupteki guess that's good.
06:34:55disruptekthe codegen is cleaner, ime.
06:35:54FromDiscord<mratsim> Another issue that we need to fix before using 1.4 is understand why it introduce copies on the stack of heap object
06:36:43FromDiscord<mratsim> ah it has been fixed
06:36:47FromDiscord<mratsim> https://github.com/nim-lang/Nim/commit/74c687e395c946111652c7bef4780b0aa2391cbf
06:37:12FromDiscord<mratsim> this change was required to avoid a 11MB stack allocation ๐Ÿ˜ฎ https://github.com/status-im/nimbus-eth2/issues/1549#issuecomment-733151057
06:37:12disbotโžฅ [Nim devel] check_attestation requires 5MB of stack space
06:37:42disruptekyou say that like it's a /bad/ thing.
06:37:45FromDiscord<Gyllou> heya
06:37:47FromDiscord<mratsim> ah maybe not this, but a commit in this tree
06:37:57disrupteksup gyllou.
06:38:02FromDiscord<Gyllou> nm
06:38:16FromDiscord<Gyllou> i was wondering if anyone can explain how to get nimprof to work
06:38:29disruptekit's old and not really worth fucking with.
06:38:33FromDiscord<Gyllou> cant seem to get it to dump the stats
06:38:34FromDiscord<mratsim> if it was this one in particular it means that we have to explicitly put move in many situation (like C++)
06:38:37disruptekit does work ime, though.
06:38:49FromDiscord<Gyllou> okay, is valgrind better to use then?
06:38:54FromDiscord<mratsim> use perf
06:38:55disrupteki prefer perf these days.
06:39:06FromDiscord<Gyllou> okay cool
06:39:14FromDiscord<Gyllou> trying to profile these graphs
06:39:20disruptekmratsim: what, you manually move?
06:39:54disruptekgyllou: my mangling branch is helpful, but it may need a rebase.
06:40:00*aHaquer left #nim (#nim)
06:40:02FromDiscord<mratsim> @Gyllou: https://github.com/status-im/nimbus-eth2/wiki/Profiling
06:40:24FromDiscord<mratsim> @disruptek, referring to the Araq commit which manually moves in seq_v2
06:41:01FromDiscord<mratsim> I use either Intel Vtune or Apple Instruments or perf record + perf annotate.
06:41:27disruptekeventually, i will write something like instruments.
06:41:38FromDiscord<mratsim> example of Apple Instruments investigation here: https://github.com/nim-lang/Nim/issues/9514
06:41:39disbotโžฅ [Perf] Max/min are not inline and slow (7x slower than memory-bound implementation) ; snippet at 12https://play.nim-lang.org/#ix=2svy
06:42:02FromDiscord<mratsim> Intel Vtune uses perf underneath (or a custom kernel module they ship if you want)
06:42:15FromDiscord<Gyllou> gotcha, ill look into that then
06:42:24FromDiscord<Gyllou> preciate'cha
06:42:52FromDiscord<Gyllou> mratsim, i am still experimenting with it, but im building an hpc graph lib for nim
06:43:27FromDiscord<Gyllou> im testing out using tensor representations for this one gpu based implementation so im using arraymancer for my experiments
06:43:34FromDiscord<Gyllou> v cool package btw
06:43:59disruptekmratsim: i dunno how we can keep static stable longterm fwiw.
06:45:27FromDiscord<mratsim> The GPU tensor representation is this: https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/tensor/backend/cuda.nim#L76-L89
06:46:16FromDiscord<mratsim> well this exactly: https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/tensor/backend/cuda.nim#L53-L60
06:47:51FromDiscord<Gyllou> I am glad to not be dealing with cuda directly
06:48:00FromDiscord<Gyllou> it would make development much slower
06:48:27FromDiscord<mratsim> My issue with Cuda right now is the gnu++14 that Nim is passing since 1.2 since that preents NVCC from working
06:48:49FromDiscord<mratsim> but now I have a Cuda-enabled desktop which makes it more easy to work with Cuda
06:48:57FromDiscord<Gyllou> yea id imagine haha
06:49:03FromDiscord<mratsim> before I had to SSH into my server :/
06:49:08FromDiscord<Gyllou> ah gotcha
06:49:55FromDiscord<Gyllou> yea i work from my laptop, even though its a gaming laptop with a little gtx 1070, i often work in a linux vm. i ssh into my server to test most things though, but yea its a pain
06:49:58FromDiscord<Gyllou> hey
06:50:15FromDiscord<Gyllou> do you know about the SLIDE algorithm released earlier this year
06:50:26FromDiscord<mratsim> well I used to have a mac for dev so I didn't even have Cuda at all on it.
06:50:33FromDiscord<mratsim> no, what is it?
06:51:09FromDiscord<Gyllou> its a search-based hashing algorithm for deep learning. its optimized for cpu.
06:51:30FromDiscord<Gyllou> i plan to port it to nim early this next year
06:51:52FromDiscord<Gyllou> https://arxiv.org/abs/1903.03129
06:51:54FromDiscord<mratsim> Ah I think I read it
06:52:14FromDiscord<mratsim> I'm doing way more cryptography than deep learning this year.
06:52:29FromDiscord<Gyllou> yea, its just a dense layer implementation, but im hoping to extend it to convnets
06:52:38FromDiscord<mratsim> though I will probably need to do FFT for cryptographic bigint on GPU soon.
06:52:41FromDiscord<Gyllou> gotcha, yea thats outta my lane for sure
06:53:25FromDiscord<Gyllou> well im hoping to do an initial release of our graph lib in the next couple months
06:53:36FromDiscord<Gyllou> open source, because thats the classy thing to do
06:54:20FromDiscord<Gyllou> the big hurdle will be the distributed implementations, we will prolly leverage zmq for that
06:54:49FromDiscord<mratsim> One thing I want to do also is had Cuda support for Weave: https://github.com/mratsim/weave/issues/133
06:54:52disbotโžฅ Cuda scheduling ; snippet at 12https://play.nim-lang.org/#ix=2I7B
06:55:11FromDiscord<Gyllou> that would be awesome, weave is a beast dude
06:55:22FromDiscord<mratsim> so that you can manage multiple parallel tasks (in particular parallel computation graph processing for deep learning)
06:55:36*mbomba joined #nim
06:55:39FromDiscord<Gyllou> have you looked at any of that vulkan kompute stuff?
06:55:48FromDiscord<Gyllou> havent had a chance but seems cool
06:55:49FromDiscord<mratsim> distributed computing however is a bit hard to develop without a cluster at hand.
06:56:07FromDiscord<mratsim> Yes, someone finally sent me an AXPY example 3 months ago.
06:56:16FromDiscord<Gyllou> nice
06:56:23FromDiscord<mratsim> I mean, hacking textures to store tensors is so 2006
06:56:28FromDiscord<Gyllou> ikr
06:56:30FromDiscord<Gyllou> but still
06:56:33FromDiscord<mratsim> give me a vulkanMalloc.
06:56:50FromDiscord<Gyllou> if someone can put a nice api over it and its crossplatform ill use it
06:56:59FromDiscord<mratsim> also AMD HIP which is basically cuda syntax skin now works on CPU: https://github.com/ROCm-Developer-Tools/HIP-CPU
06:57:42FromDiscord<Gyllou> oh wow, thats interesting, ive like literally never touched any of the amd rocm stuff
06:57:56FromDiscord<Gyllou> ive heard its getting pretty good though
06:58:45FromDiscord<mratsim> didn't try yet. They need to overcome the 15 years first mover advantage of Nivida
07:01:10*PMunch joined #nim
07:01:20FromDiscord<Gyllou> yea that'll be a tough go, they need to partner more heavily with khronos, but
07:01:27FromDiscord<Gyllou> thats probably idealistic
07:02:51FromDiscord<mratsim> HIP doesn't need Chronos, it's basically transfrom cudaMalloc into hipMalloc, cudaMempy into hipMemCpy, ...
07:02:56FromDiscord<mratsim> Khronos
07:03:21FromDiscord<mratsim> Khronos is needed for fighthing against Microsoft DirectX ๐Ÿ˜‰
07:03:49FromDiscord<mratsim> and also Apple I guess
07:10:41ZevvI used to have an Apple I
07:10:48Zevvthe memories
07:11:07ZevvI can still smell it, or hear the disk steppers at bootup
07:11:08Zevvin my dreams
07:11:32FromDiscord<mratsim> Apparently when i was a toddler I crashed the Apple computer of my father.
07:11:33*habamax joined #nim
07:11:46FromDiscord<Gyllou> lol
07:12:18Zevvit had a "reset" button on the kyeboard, on the top right next to the backspace
07:12:25FromDiscord<Gyllou> eh ive always been a gamer so macs were never a thing for me
07:12:27Zevvthat brings up the boot rom
07:12:49Zevvit took me 4 years until i found you could do "0G" to have it resume where you left off
07:13:01FromDiscord<mratsim> Vim arcane magic
07:13:01Zevvthe months, maybe years, of code I lost because of that key
07:13:02FromDiscord<Gyllou> lol
07:13:06*mbomba quit (Quit: WeeChat 3.0)
07:13:15FromDiscord<Gyllou> jesus
07:13:18disruptekpffbt, i never had a drive.
07:13:19FromDiscord<Gyllou> eff that
07:13:27disrupteki had a cassette player.
07:13:57FromDiscord<mratsim> Ah, I remember that, we had introduction to computer in primary school and the keyboard had a cassette drive.
07:14:06disruptekmy little sister recorded her singing over my first program.
07:14:11disruptekbitch.
07:14:41disrupteki drowned her firstborn as payback.
07:14:44disruptektwins.
07:15:05FromDiscord<mratsim> Mother of Dragons, Queen of the Andalls and all?
07:15:24disruptekit's not true what they say about dragons.
07:15:34disruptekwait, what do they say about dragons?
07:16:31FromDiscord<Gyllou> why the ping?
07:16:42FromDiscord<Gyllou> ๐Ÿ˜›
07:16:58FromDiscord<mratsim> They say "here be dragons"
07:17:05FromDiscord<mratsim> pretty sure there are some in the Nim compiler
07:17:05disruptekoh.
07:17:10disruptekwell, that /is/ true.
07:17:15disruptekit's true what they say about dragons.
07:17:30FromDiscord<mratsim> https://github.com/nim-lang/Nim/search?q=dragons&type=issues
07:17:40FromDiscord<Gyllou> lol
07:17:42FromDiscord<mratsim> Apparently there are 4 sightings
07:49:12*mfiano joined #nim
08:15:19*regreg quit (Ping timeout: 272 seconds)
08:28:23Zevvmratsim: "C++ and Beyond 2012: Herb Sutter - atomic<> Weapons" is excellent
08:32:23Zevvwhat I do like is that it verifies most of what I think was right
08:32:44Zevvbasically that a lot of the stuff is just *so* hairy, you shouldn't even want to touch that unless you fully understand all the details
08:33:31disruptekdo you have a copy of the "parallel programming is hard" book?
08:34:05disruptekit's a free book, google it.
08:39:17FromDiscord<Gyllou> seems neato, just dl'ed it
08:39:40disruptekyeah, for what it is, i found it useful.
08:40:10disrupteki didn't remember what mratsim was saying about lock taint, though.
08:41:01disruptek"Locks are implemented using atomic instructions and
08:41:02disruptekmemory barriers, and often involve cache misses"
08:41:52disruptekhe must have something specific in mind.
08:43:55disruptekanyway, "i don't care."
08:52:20FromDiscord<fwsgonzo> so it can serialize any Nim structure?
08:53:23FromDiscord<mratsim> @fwsgonzo there is no pickle but yu can write one, or just import:export the marshal module.
08:56:09FromDiscord<mratsim> @disruptek, on Linux and Windows, locks, barriers, conditions variables are all using something called a futex as a primitive which in the kernel uses OS primitives (atomics iirc): https://eli.thegreenplace.net/2018/basics-of-futexes/
08:57:30FromDiscord<mratsim> Locks and conditions variables are just thin wrappers around the futexes. It's not well documented but this is the basic API of a fuex: https://github.com/mratsim/weave/blob/master/weave/primitives/futex_linux.nim#L19-L54
08:57:58FromDiscord<mratsim> suspend a thread (with optional timeout) and wake a thread.
09:05:46*Tlangir quit (Remote host closed the connection)
09:05:58disruptekfwsgonzo: it will serialize most stuff you're likely to use, yes, but i'm not sure what it will do with proc pointers. let me know. we can always improve it.
09:06:32FromDiscord<m0nsta> hi
09:06:37disruptekno.
09:06:46FromDiscord<m0nsta> https://play.nim-lang.org/#ix=2I8b are they both the same thing
09:07:02FromDiscord<m0nsta> cheer up disruptek: its one of the good days
09:07:05disruptekfwsgonzo: also, marshal is decidedly not worth even looking at.
09:08:07disruptekmratsim: that's helpful, but not encouraging.
09:10:19*regreg joined #nim
09:11:00disruptekwell, anyway... i think our goal has to be simplicity and elegance. the performance can always be wrung out later.
09:11:10disruptekmake it work, make it correct, make it fast.
09:11:31disruptekit'll be plenty fucking fast. probably the fastest shit out there.
09:13:37disruptekgonzo: finally, if frosty is kinda what you want but not quite, you might prefer treeform's flatty. it's same same but different.
09:20:21FromDiscord<m0nsta> also, can we have ref tuples ?
09:20:35FromDiscord<Rika> yes
09:20:48FromDiscord<Rika> you can make a ref tuple
09:20:49FromDiscord<m0nsta> followed by, how tf do i initialize a ref tuple
09:20:59FromDiscord<m0nsta> new (name: "lol") wont work
09:21:03*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:21:40FromDiscord<m0nsta> sent a code paste, see https://play.nim-lang.org/#ix=2I8i
09:21:48FromDiscord<m0nsta> gives an error that i needs a ref
09:21:50*abm joined #nim
09:22:04FromDiscord<m0nsta> i tried using `new`, ndada
09:22:06FromDiscord<Rika> Cat(name:lol)?
09:22:08FromDiscord<Rika> idk
09:22:26FromDiscord<m0nsta> cant use object constructor something somethig error
09:25:16FromDiscord<Rika> var c: Cat = new Catโ†ตc.name = "lol"โ†ตโ†ต?
09:26:28FromDiscord<m0nsta> that works
09:26:36FromDiscord<m0nsta> ๐Ÿ‘
09:27:10FromDiscord<m0nsta> also, if someone can tell me this ?
09:27:45FromDiscord<fwsgonzo> I probably want to use frosty, I just don't see many examples - and I'm completely newbie to Nim ๐Ÿ™‚
09:27:59FromDiscord<ElegantBeef> What do you mean are they both the same thing?
09:28:02FromDiscord<m0nsta> i can see non-ref parameters are immutable and the way to mututate is copy them inside the proc. but if i pass `var Non-ref` type, what ends up happeneing ?
09:28:03*spiderstew_ quit (Quit: ZNC 1.7.2+deb3 - https://znc.in)
09:28:17disruptekgonzo: ahh, just look at the README and the tests. it's dead simple.
09:28:21*spiderstew joined #nim
09:28:36FromDiscord<ElegantBeef> `var` parameters are fancy pointers to the original
09:29:04FromDiscord<m0nsta> so i _can_ mutate no-refs like that ?
09:29:11FromDiscord<m0nsta> (edit) "no-refs" => "non-refs"
09:29:19FromDiscord<ElegantBeef> That's the only way to mutate them without unsafe code inside eprocs
09:29:24FromDiscord<ElegantBeef> (edit) "eprocs" => "procs"
09:29:31FromDiscord<m0nsta> gotcha'
09:31:33FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2I8m unsafe version appended here
09:31:46*PMunch quit (Quit: leaving)
09:36:50FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2I8n
09:37:20FromDiscord<sealmove> is there something special about `seq[NimNode]` that makes it unable to wokr?
09:41:50FromDiscord<sealmove> or maybe it errors if p in `nil` because it can't map it?
09:42:44FromDiscord<ElegantBeef> You should only use `strval` or `$` on `nnkStrLit, nnkIdent, nnkSym, nnkCommentStmt` afaik
09:43:42FromDiscord<sealmove> it's weird because i don't get error when using normal loop like in the snippet above, but when i change it to use mapIt or collect it error
09:44:11FromDiscord<kenran> I'm trying to render an `X` with OpenGL and freetype, but what I'm getting is this. Does that maybe click with someone? I will try and make this easily reproducible later, but maybe someone of you has an idea by just seeing this mess. https://media.discordapp.net/attachments/371759389889003532/788340619931025418/foo.jpg
09:45:56FromDiscord<ElegantBeef> That just looks like a badly written to texture
09:46:36FromDiscord<ElegantBeef> It looks like it's trying something due to the slanted lines, but yea idk could be caused by a different format than expected
09:50:49FromDiscord<sealmove> @ElegantBeef do you mean mapIt or collect macros won't work because there is a chance the NimNode won't be of the correct kind?
09:50:57FromDiscord<sealmove> even if I know it will be?
09:52:01FromDiscord<ElegantBeef> Nah, i just was reinforcing the nil stance
09:54:18FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2I8q
09:54:29FromDiscord<ElegantBeef> It works afaik ๐Ÿ˜„
09:56:02*regreg quit (Ping timeout: 260 seconds)
10:06:16*quadrassel4321 joined #nim
10:06:20*quadrassel4321_ joined #nim
10:07:06*quadrassel4321_ left #nim (#nim)
10:09:46FromDiscord<lqdev> Araq: i've been reading your comment on RFC #300, and you said that "There is logic inside the compiler that specifies how the "main" Nim file should be found, but you don't have to use this, start the nimsuggest process with a directory and it will figure it out. If it gets it wrong, let's have more documentation and people should fix their projects."
10:09:55FromDiscord<lqdev> is there any way i can query the compiler itself about the main file?
10:10:26FromDiscord<lqdev> like, without having to launch nimsuggest. just wanna give it a directory and get the path to the main file
10:10:37FromDiscord<lqdev> orโ€ฆ run nim check on the directory tree
10:12:02*quadrassel4321 quit (Quit: Leaving)
10:14:19*Vladar joined #nim
10:35:44*regreg joined #nim
10:35:48FromDiscord<sealmove> is it ok if expressions used in `collect` have side effects?
10:40:13FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2I8C
10:40:46*Tanger joined #nim
10:41:30FromDiscord<haxscramper> Of course
10:41:41FromDiscord<sealmove> great, this is neat
10:41:48FromDiscord<haxscramper> Collect is just convenience wrapper for loop, nothing special
10:43:20FromDiscord<sealmove> what nim version does collect require?
10:43:36FromDiscord<sealmove> or how do I lookup such stuff? ๐Ÿ˜›
10:43:40FromDiscord<lqdev> 1.1
10:43:54FromDiscord<lqdev> you can look at the source code, there are .since annotations there
10:44:08FromDiscord<sealmove> nice
10:48:23FromDiscord<Cloufish> is there a remedy to string_variable.len type mismatch?
10:48:34Araqlqdev: no.
10:48:44FromDiscord<Cloufish> https://play.nim-lang.org/#ix=2I8K
10:48:46FromDiscord<Cloufish> like here
10:48:50Araqcould be useful to add
10:49:13FromDiscord<lqdev> where can i find the logic, at least so that i can reimplement it in my linter?
10:49:24FromDiscord<Rika> Connect the periods and the less than sign @Cloufish
10:50:12FromDiscord<Cloufish> okay thanks
11:02:45FromDiscord<mratsim> @sealmove This is a heresy, you should use pure functions and encapsulate side effects in monads.
11:03:28FromDiscord<sealmove> :< sounds hard
11:09:16FromDiscord<mratsim> some people become socialite, programmers should strive to become haskelite
11:09:43FromDiscord<m0nsta> are the module documentations are discarded strings instead of comments because comments require significant look-ahead while compiling ?
11:09:49FromDiscord<m0nsta> like here -> https://github.com/nim-lang/Nim/blob/devel/compiler/lambdalifting.nim#L17
11:10:35FromDiscord<mratsim> I think there was a time where there wasn't the ## comments and so discard was used
11:11:10FromDiscord<m0nsta> +1 for haskell
11:11:30FromDiscord<m0nsta> the elegence.
11:11:45*PMunch joined #nim
11:12:50FromDiscord<m0nsta> i am familiar with #[ ]# and normal # single lines comments. is there a ## variant too ?
11:12:59FromDiscord<Rika> Yes
11:13:05FromDiscord<Rika> That is a documentation comment
11:13:23FromDiscord<Rika> Double the # in the normal comment variants and you get a doc comment
11:13:26FromDiscord<m0nsta> syntax highlighted different, id guess ?
11:13:32FromDiscord<Rika> Not that I know of
11:13:33FromDiscord<mratsim> included in doc
11:14:14FromDiscord<m0nsta> like auto doc generators ? pandoc and likes
11:14:46FromDiscord<Rika> Nim has a doc gen, nim doc I believe
11:15:46PMunchYeah you can run `nim doc` on a file to generate the documentation for that file
11:15:52PMunchOr module rather
11:16:06FromDiscord<m0nsta> cool
11:16:29PMunchCompare https://nim-lang.org/docs/tables.html to it's source https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/collections/tables.nim and you can see how the documentation generation works
11:16:54PMunchOr of course read the DocGen tools guide: https://nim-lang.org/docs/docgen.html
11:21:19FromDiscord<m0nsta> i see
11:21:32FromDiscord<m0nsta> what do those `runnableExamples` do
11:21:59FromDiscord<m0nsta> they aren't in the docs afaics
11:23:05PMunchThey show up in the doc, and they are compiled and run during documentation generation
11:23:21PMunchSo you are sure that the examples you put in your documentation is up to date with the library
11:23:36*muffindrake quit (Quit: muffindrake)
11:24:13PMunchHave a look at `initTable` for example: https://nim-lang.org/docs/tables.html#initTable
11:24:51PMunchIt has an example, and if you look in the source https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/collections/tables.nim#L297-L300 that is a runnableExample block
11:25:18PMunchSo when you generate the documentation for the tables module it will run that example and make sure that it compiles and runs without error
11:25:54PMunchThis is why you see a lot of `assert` in Nim examples, because they would fail if the library changed so we know to update the examples :)
11:41:58FromDiscord<kenran> This is what I'm getting now. Disabling `GL_BLEND` prints the correct dimensions and positions of each letter. It's just the letter that's printed badly... I'll try and get the example code up later, but I don't really know where to ask, as #OpenGL is not really great for questions using Nim ๐Ÿ˜„ https://media.discordapp.net/attachments/371759389889003532/788370254317223946/foo_000.jpg
11:42:15FromDiscord<kenran> (edit) "now." => "now with blend enabled."
11:46:15FromDiscord<inv> sent a code paste, see https://play.nim-lang.org/#ix=2I95
11:46:27FromDiscord<inv> (edit) "https://play.nim-lang.org/#ix=2I95" => "https://play.nim-lang.org/#ix=2I96"
11:47:37*fanta1 joined #nim
11:47:42FromDiscord<lqdev> @inv you'll have to join the varargs to a single string, see `strutils.join`
11:47:52FromDiscord<lqdev> unfortunately it's not possible to append varargs to anything like that
11:52:09FromDiscord<inv> But here I see it is second: https://nim-lang.org/docs/manual.html#types-varargs
11:52:19FromDiscord<inv> (edit) "second:" => "second after file:"
11:52:49FromDiscord<lqdev> yeah, the first param the proc accepts is a File
11:53:08FromDiscord<lqdev> but here you're passing a log level, a string, and then varargs[string]
11:53:57FromDiscord<inv> You mean pass to log - got it
11:54:00FromDiscord<lqdev> you want something like this to pass a single `string` to the `varargs[string]` https://play.nim-lang.org/#ix=2I99
11:54:33FromDiscord<inv> Maybe template can help to avoid it
11:56:55FromDiscord<lqdev> not really
11:57:26FromDiscord<inv> hm. I cannot understand why, but ok, will use join, thx!
12:01:38*krux02 joined #nim
12:01:54*rockcavera joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:36*supakeen joined #nim
12:38:29*NimBot joined #nim
12:49:00*thomasross joined #nim
13:29:53Zevv"If you write a race, you're going straight to undefined behaviour land. Have a nice day"
13:29:56ZevvI like that one
13:29:57Zevvit's in my book now
13:30:13*abm quit (Quit: Leaving)
13:31:17*regreg quit (Ping timeout: 260 seconds)
13:34:49*thomasross quit (Quit: Leaving)
13:35:27*hmmm joined #nim
13:36:44hmmmhaLo
13:38:09FromDiscord<Ardek> LoHa
13:38:55FromDiscord<exelotl> henlo
13:40:48hmmm~disruptesque
13:40:49disbotno footnotes for `disruptesque`. ๐Ÿ™
13:40:59hmmmpls add command
13:41:40hmmm"the art of telling it as it is"
13:41:58FromDiscord<haxscramper> ~disruptesque is the art of telling it as it is
13:41:59disbotdisruptesque: 11the art of telling it as it is
13:42:05hmmmperfect :D
13:49:38FromDiscord<Deleted User 5bd78114> heya! I'm having some trouble trying to use Physac with Nim (i'm using Raylib) and i'm completely lost on how to even get started
13:49:55FromDiscord<Deleted User 5bd78114> (And it's Technisha btw just so you know-)
13:53:01PMunchWhy does it say "Deleted User" on IRC? :P
13:53:33FromDiscord<ache of head> on discord too ๐Ÿ˜ณ
13:53:36PMunchWhat exactly is the issue you're running into?
13:54:57Zevvmratsim you here
13:59:44FromDiscord<lqdev> PMunch: they set their display name to that on discord
14:01:51PMunch@lqdev, aah that makes sense
14:04:37FromDiscord<kenran> I've created a gist showcasing my blending problem: https://gist.github.com/kenranunderscore/d3e13e7bc84e5ce4d259a95354d97637โ†ตI'd appreciate any help debugging why this seems to do everything correctly except for rendering the actual letters. One strange thing is that a `.` is rendered correctly it seems.
14:05:25FromDiscord<kenran> It should be pretty self-contained, using only some packages in `nimble`, namely `opengl`, `glm`, `staticglfw` and `freetype`.
14:09:10FromDiscord<kenran> I'm suspecting something like lines 67 or 129, where I had to do lots of casts to satisfy the compiler and I'm not really sure if those types and `sizeof` calculations are actually equivalent to the C++ code.
14:12:55Araqtry to call opengl.loadExtensions() earlier
14:13:46Araqinstead of addr(face.glyph.bitmap.buffer)
14:13:51Araqtry face.glyph.bitmap.buffer
14:15:20*Tanger quit (Remote host closed the connection)
14:15:34FromDiscord<kenran> Araq: saved my day!! thank you so much! It was the buffer thing ๐Ÿ™‚
14:16:37PMunchAaaw, I was just about to suggest that :(
14:17:12PMunchI had just dug up the definition in the freetype library for that type
14:17:51Araqwow
14:17:58AraqI had no idea I'm this good
14:18:51FromGitter<iffy> bah, tracing is useless when debugging an issue with stdout if the tracer swallows stdout...
14:19:12PMunchWrite to stderr instead :P
14:19:22FromGitter<iffy> It swallows both
14:19:38FromGitter<iffy> And the problem doesn't manifest when traced
14:19:52PMunchOh, those are the best issues :P
14:20:05PMunchA friend of mine had an issue that only manifested when he didn't attach GDB to it
14:20:11PMunchWasn't even multi-threaded
14:20:16narimiranPMunch: when is today's stream? in about an hour?
14:20:24PMunchYup
14:20:45PMunchIt'll be a little later than usual today because I had to go to our office for a flu shot
14:20:57Araqcorona shot?
14:21:08PMunchBut I should be home and ready to go by ~3:30 UTC
14:21:17PMunchAraq, unfortunately not, just a regular flu shot
14:21:57PMunchI don't typically get one, but since it's so similar to Corona it would just be super inconvenient to get the flu because then I'd have to go into isolation until I had the results of my test back
14:22:33Araqah true. smart
14:24:56PMunchBut we're pretty shielded up here from the worst of it
14:25:08PMunchOnly 2k cases in Norway the past week
14:25:30supakeen(norway also only has what, 7m people? ;))
14:25:35Araqhere it's worse than it ever was and lockdown starts tomorrow
14:25:51supakeenbut, this does mesh well with the norwegian dislike for social contact!
14:25:54PMunchsupakeen, 5.3 :P
14:25:58supakeenyea, new lockdown here started last night
14:26:12supakeenshould've just given the speech in german if we follow germany in everything anyways
14:26:44FromDiscord<kenran> thanks for looking into it as well!
14:27:04Araqsupakeen, where are you from?
14:27:07PMunchsupakeen, haha, yeah the 1 meter rule we have is pretty much the distance I would keep to strangers anyways :P
14:27:28Zevveven to the majority of people I know
14:27:41PMunchOof, just looked up some statistics, Belgium is really hit hard..
14:28:01*waleee-cl joined #nim
14:28:05PMunchZevv, I mean I might sneak past someone or such at less than a meter
14:28:16PMunchSo it's still something I need to keep in mind, but it's not all that bad
14:28:16Zevv*quickly*
14:28:22supakeenAraq: I live in the Netherlands at the moment.
14:28:29PMunchAnd right now most things here are open, just not large gatherings and such
14:28:57supakeenWe have everything closed except essential stuff like the supermarket or drug store.
14:29:19supakeenThey did finally close schools as well, so it's starting to make a bit of sense at least.
14:29:59*mipri left #nim (#nim)
14:30:10PMunchThe schools here were closed, but have been open for quite a while now
14:30:34FromDiscord<shadow.> in usa rn, school is rotating 1 week in 1 week out
14:30:42FromDiscord<shadow.> as in 1 week in school 1 week online
14:30:48FromDiscord<shadow.> or rather, at least in east coast lol
14:30:53FromDiscord<shadow.> idk abt the rest of the us
14:31:06PMunchIn a tick tock pattern I assume?
14:31:12PMunchSo some children are in school all the time
14:31:22FromDiscord<shadow.> yup
14:31:24FromDiscord<shadow.> two groups
14:31:26PMunchMakes sense
14:31:36PMunchAt least it's easier to keep distance and such
14:31:40FromDiscord<shadow.> im just doing all online
14:31:50FromDiscord<shadow.> bc we literally get an email every week abt new cases in school
14:31:57FromDiscord<shadow.> i don't wanna be at that risk for no reason lol
14:32:12FromDiscord<shadow.> like 2-3 cases every week yet they don't close
14:32:12supakeenFriend of mine who works at a school got told that their school ahtes the going back and forth so they've decided to do everything online until summer break.
14:32:12PMunchYeah better to stay home if you have the ability to
14:32:19supakeenSo the teachers can actually prepare for it and make a good program.
14:32:20FromDiscord<shadow.> damn
14:32:21PMunchI have also been working from home for the past months
14:32:27FromDiscord<shadow.> same w my parents
14:32:30FromDiscord<shadow.> and brother
14:32:32PMunchEven though we basically have no cases
14:32:43supakeenBecause it's terribly hard to have mixed groups and then switch your schedule around a lot.
14:32:45PMunchThe northern part of Norway had 1 new case in the past day
14:32:47FromDiscord<shadow.> welp my town is kind of a red area for cases rn
14:32:48FromDiscord<shadow.> which sucks
14:33:17FromDiscord<Rika> My school does "some teachers have online only and some have both online and face to face"
14:33:18supakeenBut only 2 people live in the Northern part of Norway.
14:33:21supakeenExcept Tromso.
14:33:43FromDiscord<shadow.> this is my state currently https://media.discordapp.net/attachments/371759389889003532/788413483384832031/unknown.png
14:33:46FromDiscord<shadow.> not looking the best-
14:33:46FromDiscord<Rika> Rather I think only one of my professors are stubborn to not do face to face since there's like what 4 cases in total in the whole of my prefecture
14:34:42PMunchEy, we're 243k people!
14:34:58supakeenPMunch: You live in Tromso?
14:35:22PMunchYup
14:35:33supakeenHey nice, I've been to your village!
14:35:59PMunchIt's a town! :P
14:36:11PMunchWhen were you here? And why?
14:36:19PMunchI mean it's a nice place, but it's quite remote
14:36:29supakeenI was there in 2017 to see the Northern lights, I have a friend from Stavanger and we did the road trip from there up north.
14:36:37PMunchAaah right
14:36:42PMunchDid you see any?
14:36:42Zevvup *north*?
14:36:45Zevvcan you do that?
14:36:46Zevvfrom tromso?
14:36:57supakeenZevv: from stavanger to tromso is north ;)
14:37:01PMunchWe had some crazy ones a couple days ago
14:37:01supakeenbut you can drive to the nord cape
14:37:08supakeenwhich we considered
14:37:12Zevvthere is no such thing
14:37:15Zevvfake news
14:37:34supakeenbut stavanger to tromso was already a good 2500km or so
14:37:35PMunchJust looked it up, and my region (where we had 1 new case the past day) is about the size of Serbia
14:37:42supakeennorway is quite ... tall
14:37:55PMunchHaha, yeah it's a long country :P
14:37:59supakeenplus we did the coastal thing
14:38:03supakeenlook at all the fjords and thingies
14:38:18PMunchDefinitely more scenic, but quite a bit further
14:38:44supakeenbut norway is pretty awesome to visit, it wasn't on my list of things so early but i'm glad i did
14:39:26PMunchYeah it's a cool place
14:39:48PMunchAnd Zevv another thing that helps us stay apart is the crazy high fines for breaking the restrictions
14:40:18supakeenas if you need any more reason for staying apart :)
14:40:46PMunchโ‚ฌ1k for planning a party with more than 10 people. โ‚ฌ500 for attending such a party
14:40:59PMunchโ‚ฌ200 for not wearing a mask when it's required
14:41:24PMunchAnd โ‚ฌ20k to break quarantine if you've been travelling or have a positive test
14:42:26FromDiscord<Rika> hella fines
14:43:43supakeenplus norwegians sound really cute! it's like they sing to eachother
14:43:44FromGitter<iffy> Where can I find the source for `echo`?
14:43:54PMunchWell it means I can go climbing, pop by any store, work, and kids can stay in school
14:44:11PMunchsupakeen, haha yeah most people say that
14:44:12Araqiffy genEcho in the compiler/
14:44:54FromDiscord<kenran> don't they? I've been learning Swedish last year a tiny bit because I couldn't pronounce a trill R as needed in Norwegian... but I think Swedish always sounds a bit more funny while Norse is "cooler"
14:45:14FromDiscord<kenran> though I have to say Danish sounds the funniest to my German ear ๐Ÿ˜„
14:45:50PMunch@kenran, danish sounds so, idk, stuffy? Swedish is a bit more wibbly-wobbly than Norwegian
14:47:19FromDiscord<hugogranstrom> XD "wibbly-wobbly"
14:48:01PMunchBut wait, Swedish doesn't have trill Rs?
14:49:00PMunch@hugogranstrom, haha I don't know how else to describe it. It just sounds cute and playful in a slightly silly way
14:49:06FromDiscord<hugogranstrom> It's more of a stylistic touch if you want to emphasize a word. I think, I can't do it
14:49:29PMunchI guess that might be because most of the swedish I heard growing up was from children show :P
14:50:14FromDiscord<hugogranstrom> Totally understand, hard to describe. Norwegian sounds a bit jumpy
14:50:51supakeenis the trill r the r in the 'du er' or the r in the 'rulle' or the r in 'skarre'
14:51:56FromDiscord<hugogranstrom> Oh what children's show was it? I've heard most of my Norwegian from interviews with ski-persons
14:52:13PMunchThe one in rulle I guess, but isn't that the same one in skarre?
14:52:19PMunchDepends on the dialect I guess :P
14:52:31supakeeni think skarre is pronoucned more like skache
14:52:40supakeenbut i haven't spent a lot of time around norwegians :)
14:53:00PMunchRonja Rรธverdatter
14:53:08PMunchMostly, but I think there were some others
14:53:26PMunchsupakeen, haha, right your friends were from Stavanger
14:53:43PMunchWhere they actually do that (skarre is when you pronounce skarre as skache)
14:53:58supakeenthere we go :)
14:54:03PMunchIn my dialect you don't do that :P
14:54:15FromDiscord<hugogranstrom> Ronja is a classic :)
14:54:22supakeenanyways the rolled or trilled r sound in norwegian is what many languages have i think, just not english
14:54:37PMunch@hugogranstrom, I guess you have the same with Mumi?
14:54:53PMunchIsn't that pronounced in Finno-Swedish?
14:55:28PMunchsupakeen, that or the guttural R in French I think
14:55:43FromDiscord<hugogranstrom> Pmunch: yes it is. Finland-svenska has a really pleasent sound to it
14:55:50supakeenyea, r's are always the weird ones out
14:56:53PMunch@hugogranstrom, a Swedish friend of mine told me that the first time he met someone from Finland he thought they sounded really funny because they were talking like the Mummis (sp?)
14:57:09PMunchMoomins in English apparently..
14:57:39PMunchMumintrollet in Swedish and Mummitrollet in Norwegian, no wonder that one confused me :P
14:58:02*regreg joined #nim
14:59:39FromDiscord<hugogranstrom> Haha yeah a bit confusing.
15:00:25PMunchOh well, I'm heading home from work now. Hopefully the stream will be ready in about half an hour
15:00:27*PMunch quit (Quit: Leaving)
15:00:44FromDiscord<hugogranstrom> Finish people speaking finish sounds quite different to people talking finlandssvenska to me I think, I haven't really though about it much
15:01:24FromDiscord<hugogranstrom> Finish sounds harsher somehow
15:02:03FromDiscord<hugogranstrom> Or perhaps it's just that the narrators of Mumin talks very smoothly ๐Ÿ˜›
15:11:31FromDiscord<kenran> nor German. we have the skarre r sound a lot though
15:12:59FromDiscord<kenran> ah I always forget that replying doesn't have the same effect in this channel as in other discords ๐Ÿ˜„
15:14:46*hmmm quit ()
15:20:44jkenHey, not sure if this is the right channel for this, so tell me to go elsewhere if need be. I feel the need to evangelize nim and was wondering if anyone had any feedback on this article before I share it more broadly. https://buildsavvy.io/why-you-should-consider-the-nim-programming-language
15:22:17FromDiscord<dom96> > as tabs are used to denote blocks instead of curly braces.โ†ตs/tabs/indentation/ ๐Ÿ™‚
15:22:37jkenAh, amateur of me. Good catch.
15:23:04*PMunch joined #nim
15:23:30dom96also s/Extreamly/extremely/
15:23:52dom96I skimmed mostly but great article overall :)
15:24:05jkenThanks dom96! I really appreciate the feedback.
15:24:31FromDiscord<shadow.> @pietroppeter how'd you do today's? i'm interested
15:25:09ForumUpdaterBotNew thread by Freeflow: Seq, table. How to efficiently reference the last item, see https://forum.nim-lang.org/t/7256
15:31:17PMunchStream is live: https://twitch.tv/pmunche https://www.youtube.com/watch?v=QPj04KaEOVw
15:31:28PMunchLet's have a look at AoC day 15!
15:32:05PMunchnarimiran ^
15:32:12narimiranthanks!
15:33:09FromDiscord<shadow.> bet
15:33:27Araqjken, it's a nice read. you could show some snippets how Nim actually looks like
15:34:26jkenAraq, That's a great idea. I will provide some examples in the section discussing the syntax
15:34:46FromDiscord<shadow.> also, doesn't it also compile to obj c?
15:35:49FromDiscord<Rika> it does but i feel like ive only seen a handful of people using it practically (and not just "to try it)
15:36:05Araqjken, don't get me wrong. but copying some snippets like "here is count words in Nim"
15:36:46Araqisn't gonna cut it. I would show off some wxWidgets UI, or Fidget, or ...
15:37:00AraqSo that you can have nice screenshots
15:37:49Araqpick one UI library that has sexy example code, runs on your machine and produces a nice looking UI on the OS you're on.
15:38:47Araqand if you show off a terminal app I'll bite into my keyboard. :-)
15:39:02jkenwell now that's just tempting!
15:39:25jkenI will add some quality examples.
15:40:16FromDiscord<Rika> i'd like to see araq eating his keyboard though...
15:42:26*abm joined #nim
15:43:02Araqterminal applications and rogue-like games, my nemesis :-)
15:43:05FromDiscord<hugogranstrom> Code a ascii art of Araq eating his keyboard ๐Ÿ˜ฎ
15:43:07*waleee-cl quit (Ping timeout: 260 seconds)
15:43:07*kwilczynski quit (Ping timeout: 260 seconds)
15:44:52*sirn quit (Ping timeout: 260 seconds)
15:46:09*sirn joined #nim
15:46:36FromDiscord<pietroppeter> shadow: https://pietroppeter.github.io/adventofnim/2020/day15.html
15:46:49*waleee-cl joined #nim
15:47:12*kwilczynski joined #nim
15:48:35FromGitter<awr1> havent done day 15 yet but i feel like im getting aoc fatigue
15:49:07FromDiscord<shadow.> oo looks nice pietro
15:49:20FromDiscord<shadow.> https://play.nim-lang.org/#ix=2IaR
15:49:23FromDiscord<shadow.> here's mine @pietroppeter
15:54:11FromDiscord<pietroppeter> well, yours looks nicer, you even use collect! ๐Ÿ™‚ I see you are using a single table. I did try at the beginning but I ran into some bugs and switched to two tables and did not look back
15:54:38FromDiscord<pietroppeter> (not really bugs, just incorrect implementation)
15:59:05FromDiscord<shadow.> ah i see
15:59:11FromDiscord<shadow.> i basically had to like
15:59:14FromDiscord<shadow.> update the table
15:59:15FromDiscord<shadow.> lazily
15:59:54FromDiscord<shadow.> that way i could keep a backlog
16:00:18FromDiscord<shadow.> my brute force took around 1.5s with `-d:danger --passc:-flto`
16:00:20FromDiscord<shadow.> leemme try gc arc
16:00:43FromDiscord<kenran> Araq why are roguelikes your nemeses? Do you mean programming them or just looking at beautiful ascii/terminal UIs? :>
16:00:46FromDiscord<shadow.> ye 1.5-2s
16:00:47FromDiscord<shadow.> lol
16:00:50FromDiscord<shadow.> for part ttwo
16:01:27FromDiscord<pietroppeter> yep, well it does not only look nicer your solution, it is definitely better on all accounts!
16:02:16FromDiscord<pietroppeter> well done @PMunch !
16:02:43FromDiscord<pietroppeter> @PMunch: the interesting part here is that it is an interesting and not very well known sequence: https://oeis.org/A181391
16:03:00FromDiscord<pietroppeter> it was also features on a numberpile episode: https://www.numberphile.com/videos/van-eck-sequence
16:03:03FromDiscord<shadow.> van eck
16:03:04FromDiscord<shadow.> ye
16:03:34FromDiscord<pietroppeter> a variation of that (original van eck starts with a single 0)
16:04:37FromDiscord<shadow.> is there a way to do it with math?
16:04:41FromDiscord<shadow.> i'm going to assume no
16:04:49FromDiscord<pietroppeter> no, exactly
16:05:03FromDiscord<pietroppeter> in the numberphile episode they also mention there are a number of unproven things
16:05:04FromDiscord<shadow.> yeah this one was really intuitive
16:05:04FromGitter<iffy> mipri, disruptek: regarding that errno 2/errno 35 issue, this line: https://github.com/nim-lang/Nim/blob/d15f63a0f2d431a516601530196ac01c26e00f53/lib/system/io.nim#L801 is failing (the return value is often 0 or 1 when it ought to be the number of bytes written) and it sets the `ferror` state of stdout but doesn't do anything with it so that a later call to stdout.write encounters the error instead.
16:05:54FromDiscord<pietroppeter> @PMunch: they are prime numbers
16:06:09FromDiscord<pietroppeter> guaranteed by Chinese Remainder Theorem
16:06:13FromGitter<iffy> I'm not sure what the fix is other than "don't use echo." I can understand wanting echo to not die so that it can be used as a debugging tool, but it seems like not a good idea for a real application that might encounter errors writing to stdout
16:06:14FromDiscord<pietroppeter> coprime
16:06:54*aHaquer joined #nim
16:06:58FromDiscord<pietroppeter> you actually discovered the search by sieving algorithm for Chinese Remainder Theorem with your solution yesterday
16:07:11FromDiscord<pietroppeter> https://en.wikipedia.org/wiki/Chinese_remainder_theorem#Search_by_sieving
16:07:21FromDiscord<shadow.> pmunch: here's my day 15 if you wanna take a look lol https://play.nim-lang.org/#ix=2IaR
16:07:31FromDiscord<shadow.> eratosthenes?
16:07:58FromDiscord<pietroppeter> sieve is generic for algorithm of that kind
16:08:03FromDiscord<shadow.> eratosthenes just removes multiples going upwards
16:08:11FromDiscord<shadow.> i made an implementation in c++ awhile ago
16:08:20FromDiscord<pietroppeter> erathostenes is for generating sequence of primes
16:09:06FromDiscord<shadow.> yeye
16:11:08FromDiscord<shadow.> what was your day 13? that one was interesting
16:11:32FromDiscord<shadow.> pmunch
16:11:41FromDiscord<shadow.> ohh i musta missed
16:11:55FromDiscord<shadow.> https://play.nim-lang.org/#ix=2Ib4
16:11:57FromDiscord<shadow.> here's mine, kinda meh
16:12:28FromDiscord<shadow.> ye basically same haha
16:13:17FromDiscord<shadow.> nice nice
16:13:31FromDiscord<pietroppeter> @PMunch: for other days with tricky initial conditions, Eric mentioned the day with the seating area to be tricky to generate: https://www.reddit.com/r/adventofcode/comments/kawumg/2020_day_11_go_first_day_it_felt_like_a/gfd994x/?context=3
16:13:41FromDiscord<shadow.> both parts in one file
16:16:05FromDiscord<shadow.> https://play.nim-lang.org/#ix=2Ib6โ†ตthat's only part two if you want a fair size comparison
16:16:36FromDiscord<shadow.> 13
16:17:24FromDiscord<shadow.> only needed the second line lol
16:17:58FromDiscord<shadow.> bc multiply by 1 does nothing
16:18:25FromDiscord<shadow.> ye
16:18:47FromDiscord<shadow.> ohh fair fair
16:18:53FromDiscord<shadow.> prolly faster
16:19:26FromDiscord<Rika> who are you talking to
16:19:29FromDiscord<shadow.> yeahh i just start with while true because it lets me develop fasaer
16:19:32FromDiscord<shadow.> (edit) "fasaer" => "faster"
16:19:35FromDiscord<shadow.> pmunch is on stream
16:19:38FromDiscord<Rika> am i hallucinating or are you hallucinating
16:19:46FromDiscord<shadow.> idk i find it easier to visualize when i start with while true
16:19:48FromDiscord<shadow.> and increment a cursor
16:20:03FromDiscord<shadow.> lfmao or the ppl on discord
16:20:12FromDiscord<Rika> cant you chat on the stream chat
16:20:17FromDiscord<shadow.> uhhh
16:20:26FromDiscord<shadow.> i tried yt chat but i dont think i got a response lol
16:20:48FromDiscord<shadow.> ohh
16:20:53FromDiscord<shadow.> ill use twitch then
16:21:01FromDiscord<shadow.> makes sense
16:21:07FromDiscord<shadow.> u just need 5 monitors smh
16:21:28FromDiscord<shadow.> the 1.5s was on the part two of today's
16:21:35FromDiscord<shadow.> how it was just a brute force
16:22:24FromDiscord<shadow.> yeah i did `-d:release --passc:-flto`
16:23:03FromDiscord<shadow.> no idea
16:23:08FromDiscord<shadow.> i thought it was link time optimizations? or something
16:23:33FromDiscord<shadow.> filter out pythoner's using lists, ye
16:24:05*hnOsmium0001 joined #nim
16:27:31narimiranPMunch: enjoyable stream as always!
16:27:37PMunchHaha, sorry about that @Rika
16:27:40PMunchnarimiran, thanks :)
16:27:45PMunchToday was pretty easy though
16:27:55PMunchBut it's nice to have a little bit of both
16:28:53FromDiscord<shadow.> yeah i mean almost every day has been pretty easy other than like 10 / 13 part two
16:29:25PMunchYeah part1 is almost always super easy
16:29:26PMunchWhich is nice
16:29:42PMunchMeans you can do them even without much programming knowledge
16:30:59narimirani had trouble today with part 1 until it did what it should
16:31:05narimiranbut i always blame 6AM
16:31:36PMunchHaha
16:31:51PMunchI mean I did also struggle a bit, but that was just me messing it up :P
16:31:56FromDiscord<Avatarfighter> hello hello everyone ๐Ÿ˜„
16:32:00PMunchMy idea was correct
16:32:02FromDiscord<pietroppeter> @PMunch: how do I get your blog btw? peterme.net asks for authentication...
16:32:08narimiranPMunch: that was not a struggle
16:32:32PMunch@pietroppeter, it does?
16:32:38PMunchMaybe try https?
16:32:48PMunchhttps://peterme.net/
16:32:51FromDiscord<pietroppeter> ah! that was it
16:33:04PMunchIt should auto-redirect
16:33:16PMunchnarimiran, what do you mean, I lost minutes!
16:34:14FromDiscord<pietroppeter> weird, cannot reproduce the authentication message anymore...
16:34:17narimirani won't tell you how long it took me to solve part 1
16:34:29narimiranlet's just say you would be now still streaming pt.1
16:34:45PMunchHaha, that long ey :P
16:35:15PMunch@pietroppeter, there are some other things on that server which requires a login, so you must've somehow hit one of those
16:35:21PMunchMaybe check your history?
16:35:25narimiranPMunch: embarrassingly long
16:35:33PMunchWhat tripped you up?
16:35:58Zevvsorry narimiran, I dropped out already
16:36:15narimiranZevv: yeah, i've seen :'(
16:36:31Zevvkids at home is chaos in the house & in my head, and if these things take longer then an hour, I can't find the motivation
16:37:25narimiranZevv: then solve it in less than an hour. problem solved.
16:37:51Zevvsuure
16:37:55FromDiscord<pietroppeter> in the history I can see where it was redirecting me (https://www.peterme.net/?controller=AuthController&action=login) but now it does not allow me to go through because of certificates and stuff (I cannot even ovveride). previously I was seeing a login form
16:38:24PMunchHmm, strange
16:38:34PMunchThat is my kanban todo list :P
16:39:11FromDiscord<pietroppeter> yeah, I was not trying to snoop around, just trying to check the blog. Anyway all is good know on my side
16:50:28PMunch@pietroppeter, hope you find something you like :)
16:50:32*grorkster joined #nim
16:58:41FromDiscord<pietroppeter> oh there's much to like! I read it already in the past. Just wanted to check in last blogpost!
16:59:48PMunchNothing in the last one you didn't already know I think. It was mostly for the ones who never checks out IRC
17:00:08FromDiscord<pietroppeter> looking forward to the multithreading article. Next year I want to learn a bit more about that, on which I know very little currently
17:04:15PMunchThat one is tricky..
17:04:24PMunchI have the async one pretty much written up and ready to publish
17:04:40PMunchAlong with an introduction to the topic
17:04:55PMunchBut the world of threading in Nim is still quite a bit in flux..
17:04:55FromGitter<iffy> disruptek, mipri: I figured it out!!! One of the subprocesses I spawn with poParentStreams has been changing stdout to O_NONBLOCK. If I `discard fcntl(stdout.getFileHandle(), F_SETFL, origStdoutFlags)` after the process is done, there are no goofy stdout write errors. Should osproc be responsible for reverting flags? Probably not...
17:05:32FromGitter<iffy> Though it does leave the issue of `echo` messing up with `stdout` and leaving the errors for future (possibly distant) code to run into.
17:05:35PMunchWell, at least that's what I thought when I decided to wait with publishing them..
17:05:42PMunchBut not much has actually happened
17:05:59PMunchApart from Weave maturing a bit, however for some reason most people seem to not use it
17:06:03PMunchNot quite sure why though
17:06:25PMunchMaybe I should do one on "traditional" threading, and just a separate one on Weave
17:06:30disruptekiffy: worth filing an issue, i think. i knew it was poParentStreams. ๐Ÿ™
17:06:32PMunchBut first I have to go make dinner
17:06:39PMunchSee you guys later
17:06:39*PMunch quit (Quit: leaving)
17:06:55disruptekiffy: sorry that took up so much energy to solve.
17:08:56FromGitter<iffy> yeah... it was a bit frustrating, but I learned a lot of things :) Thank you for all your help!
17:10:16*a_chou joined #nim
17:12:24*a_chou quit (Client Quit)
17:15:27disruptekit would be helpful to add a comment in the osproc docs about how we don't revert flags.
17:18:39FromDiscord<mratsim> @PMunch, I don't think many people in the Nim community are in needs of multithreading for numerical/scientific computing.
17:19:56FromDiscord<mratsim> Basically those who would use Weave in the domains of:โ†ต- math, physics, data science/machine learningโ†ต- games, image processing,โ†ต- finance
17:20:02disruptekI don't think many people in the Nim community. [full stop]
17:20:07FromDiscord<mratsim> but if you need seq or strings, well ...
17:21:31FromDiscord<lqdev> good luck.
17:21:54FromDiscord<mratsim> I think the single most perf impactful dev to do would be to have a faster json in the stdlib https://github.com/kostya/benchmarks#json
17:32:23Zevvdisruptek: I know you dont care and all, but this <atomic> talk I do recommend. It covers some fundamentals I never found explained in one single place
17:32:40Zevvits a good 3 hours of your life spent
17:33:20*vicfred joined #nim
17:36:04FromDiscord<Zeus> What's the talk about?
17:37:38Zevvmemory models in "modern" c/c++ and hardware
17:38:04FromDiscord<Zeus> sounds fun
17:38:13*Zevv quit (Quit: Lost terminal)
17:38:33*Zevv joined #nim
17:38:41Zevvwhat locks *really* do, fence wise
17:39:08ZevvI had these fundamental details I never properly grasped
17:39:52Zevvacquire, release, barriers, what your does and does not guarentee
17:53:35FromDiscord<tinygiant> Anyone have any good examples of either using nim to manage a windows form or a nim module that can create forms? Just talking a pretty basic setup, with about 10 textboxes, 5 checkboxes and a dropdown or two. Thanks!
17:58:55disruptekzevv: i will see if i can get it in 160p.
17:59:03Zevvyou should
17:59:07ZevvI can send you the DVD
17:59:17Zoom[m]@tinygiant don't think there's anything specific for forms, you can try nigui or wNim, they are pretty easy to start
17:59:48Zoom[m]...with and get to a working stage
18:01:05disruptekzevv: did you get your delicate hands on that open-source book?
18:01:15Zevvwhich book was that again
18:01:30disruptek"parallel programming is hard"
18:01:51Zevvoh no I knew that. But it seems that my problem was that I just did not understand the underlying basics
18:02:12disruptek"is parallel programming hard, and, if so, what can you do about it?" -- paul e. mckenney
18:02:28Zevvkind-of understanding this now does not make it easier in practice, but it helps me to understand what I'm up against
18:02:42ZevvI *know* it's hard. That's why I decided not to thread 2 decades ago
18:02:48Zevvjust don't do it
18:03:00disruptekdon't judge the book at its cover.
18:03:03Zevvthere's only one mratsim
18:04:01ZevvAnd I now can drop terms like "SC-DRF" at parties
18:04:16Zevvthat'll make the ladies swarm on me
18:04:19FromDiscord<mratsim> I don't think it's harder than dealing with 1000 front-end devices and CSS stylesheets.
18:04:21disruptekholy shit, i can just download this video.
18:04:45FromDiscord<mratsim> it might even be easier to debug.
18:05:19Zevvjust don't ever lie to your compiler
18:05:24Zevvbecause it can't figure this out by itself
18:06:26FromDiscord<mratsim> and now you know why borrow checking "concurrency withut data race" is a lie ๐Ÿ˜‰
18:07:00ZevvI'm not enlightened yet, but I do have a bit of a hunch
18:07:12disruptekyeah, i have my doubts about that.
18:09:21FromDiscord<mratsim> The Rust borrow checker cannot do soundness check of acquire/release uses.
18:10:03Zevvso what does it do then
18:10:17disruptekno, not that part. i don't really understand why we can't hide information from the rest of the system with writes.
18:11:37FromDiscord<mratsim> it only tells you that "if the underlying data structure is well implemented" and there is this API that rely on having a single thread that have access to the producer or consumer side, then your program use is correct.
18:12:05FromDiscord<mratsim> so it guarantees you ownership / single access, like isolated
18:12:19Zevvright
18:12:23FromDiscord<mratsim> it doesn't guarantee you that the underlying implementation is correct and does not have the tool to do so.
18:12:42disruptekyawn.
18:13:11disrupteki don't /want/ to segregate my multithreaded continuations.
18:13:19FromDiscord<mratsim> btw, did you guys check Kotlin coroutines? Are they using the same principle as our CPS?
18:13:36disrupteki didn't look at kotlin, no.
18:13:59FromDiscord<Jake> is nim better than rust
18:14:09ZevvJake: you tell me
18:14:15disrupteki'm only really interested in ideas for csp impls now.
18:14:58Zevvwell, our current impl has proven to be sufficient, no?
18:15:30disrupteki don't really think of our impl as a final product, i think of it as a spec.
18:15:44Zevvsure, but the technology is proven, imho
18:15:48disruptekagree.
18:15:52Zevvthis can work
18:15:56Zevvbut it has warts and a smell
18:16:25disruptekit's a crude impl, no doubt. proofs of concept usually are.
18:16:47FromDiscord<Clyybber> disruptek: can you up to date me on carnac
18:16:54Zevvit's broken
18:16:56disrupteklook at the README.
18:17:19disrupteki changed the code so it works, but i shouldn't have had to do so.
18:17:39FromDiscord<Clyybber> just give me a repro
18:17:48disruptekthe test is the repro.
18:17:59FromDiscord<Clyybber> yeah, but one that fails
18:18:02FromDiscord<Clyybber> not one that works
18:18:07FromDiscord<Clyybber> I need one that fails
18:18:20disruptekfine, christ. i don't know how to make this much simpler.
18:19:01disrupteki just pushed tests/fails.nim
18:19:20*Zevv passes his purply crayon to disruptek
18:20:00FromDiscord<Clyybber> >includes testes
18:20:09FromDiscord<Clyybber> I can remove that right?
18:20:19disruptekif you want, sure.
18:20:38disruptekmy testes are quite virtuous, but if you insist...
18:20:42FromDiscord<Clyybber> it needs frosty?
18:21:10disruptekyes.
18:21:24FromDiscord<Clyybber> sigh
18:21:35FromDiscord<Clyybber> I thought I get something minimal
18:21:43disrupteki never said you would.
18:21:53disruptekwe're writing real software here.
18:22:19disruptekminimal tests are what got us here.
18:22:46FromDiscord<Clyybber> one needs to understand to fix
18:22:54FromDiscord<Clyybber> what does carnac use testes for and can I rip it out somehow?
18:23:04disrupteks/testes:/when true:/
18:23:15FromDiscord<Clyybber> eh s/testes/frosty
18:23:31disruptekyou can rip it out; just reimpl storeCache and loadCache.
18:23:39disruptekthat'll rip out supersnappy, too.
18:24:01FromDiscord<Clyybber> is strictFuncs required?
18:24:43disruptekextremely unlikely to be required for the test.
18:25:09Zevvyou could at least have minimized it for the man
18:25:11FromDiscord<Clyybber> so carnac memoizes to disk?
18:25:16disruptekyes.
18:25:52FromDiscord<Clyybber> Zevv: its the disruptecean bait
18:26:36disruptekits been sitting here for months and it's unsolved not because i didn't painstakingly go through and try to remove lines that i feel are irrelevent.
18:26:49disruptekor even irrelevant.
18:27:18FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> NIM
18:27:19FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> DM
18:27:24FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> how?
18:27:30disruptekindeed.
18:27:30FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> to have this kit? ๐Ÿ˜„
18:27:38FromDiscord<Clyybber> indeed.
18:28:04ZevvClyybber: anyway, just let me know if disruptek can help you out with anything. I'll be glade to have him help yo
18:28:08disruptekthe guy won't even read the README.
18:28:15ZevvREADYOU
18:29:23FromDiscord<Clyybber> this guy won't even minimize
18:29:42FromDiscord<Clyybber> advantages of minizing: immediately obvious if user or compiler error
18:29:50FromDiscord<Clyybber> immediately investigatable
18:29:58FromDiscord<Clyybber> and the biggest of all
18:30:17FromDiscord<Clyybber> if you put your filtyh echos in the compiler you don't get bombarded with irrelevant stuff
18:31:14Zevv"put your filtyh echos in the compiler" woohoo
18:31:30FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> supply signal
18:31:31FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> ?
18:31:36FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> can i have it?
18:31:41FromDiscord<Clyybber> yes.
18:31:45FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> how?
18:32:23FromDiscord<Clyybber> what?
18:33:02FromDiscord<Clyybber> do you want a network interface module?
18:33:09FromDiscord<Clyybber> because this discord is about the nim programming language
18:35:20FromDiscord<ache of head> there is no better / worse comparison
18:35:34FromDiscord<ache of head> both languages are great picks for certain situations
18:35:43Zevvsure there is. all languages are rated on a scale from 1 to 10
18:35:48ZevvNim is about 7.3
18:35:52FromDiscord<ache of head> at this point what you can do is just list the pros and cons of each and determine which one suits your needs
18:35:56Zevvbut I've heard rust is up to 8.5 these days
18:35:57FromDiscord<ache of head> what?
18:36:02FromDiscord<Clyybber> Zevv: I think you meant 7 + 3
18:36:08ZevvNo one told you? Rust is better then Nim
18:36:09Zevvreally
18:36:18FromDiscord<ache of head> lewl
18:37:00ZevvI have this team of collueges. They all insist on keeping doing C++. We have this weekly therapy hour where we do a book club, Code complete, the Pragmatic Programmer, stuff like that. I am no longer allowed to say the word Nim
18:37:16Zevvbecause a large portion of the problems they talk about does not concern me
18:37:17Zevvin Nim
18:37:30Araqyou're one of these guys
18:37:31Zevvbut no one took the effort to actually pick this up and see what the fuzz is about
18:37:39Araqsuper annoying
18:37:40FromDiscord<Avatarfighter> Does anyone know if there is a XDCC library ?
18:37:45Zevvreally is.
18:37:53Araqknow everything better
18:38:19ZevvSo they go humm about their const references. their shared and unique pointers.
18:38:48Zevv"buy why does your language not do the just right thing"
18:39:25Zevv(but then with the words in the proper order)
18:39:31disruptekclyybber: you should learn to improve your echos. then send the compiler results to a file and you can use an editor to navigate it.
18:39:44FromDiscord<ache of head> @Jake: if you're interested further / want a taste of both, i wrote an article once on the differences exactly between those two. i remember sending it here once and asking people to factcheck it, but i don't know how it holds up today. it was some time ago. if you're interested in spite of that, here you go: <https://dev.to/aachh/nim-v-rust-4kh5>
18:40:25Araqif it was written before Nim 1.4 it's mostyl irrelevant :P
18:40:25*habamax quit (Ping timeout: 264 seconds)
18:40:32Araq*mostly
18:40:34FromDiscord<Clyybber> disruptek: sure, I could search through 40000 lines of additional cruft, or I could take a minute to remove the 30 lines of code that create those 40000 lines
18:40:34FromDiscord<ache of head> yeah, that's what i meant
18:40:58disruptekclyybber: suit yourself.
18:41:13disruptekif someone hadn't broken dust, you coulda used that.
18:41:18FromDiscord<Avatarfighter> disruptek: how are your testes? any exciting changes to the package?
18:41:18FromDiscord<ache of head> i still think i was writing it kind of in favour of nim lol
18:41:20*Zevv passes the popcorn around
18:41:32FromDiscord<ache of head> this one guy in the comments freaked out about it a bit
18:41:37FromDiscord<Jake> @ache of head I already read it ๐Ÿ˜›
18:41:40FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> HHL
18:41:42FromDiscord<ache of head> NICE
18:41:44FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> verify
18:41:51FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> how to have this kit?
18:41:51FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> guys
18:41:56FromDiscord<ache of head> what?
18:42:06FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> i can t get the supply
18:42:07Zevvะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ: you are in the wrong place
18:43:00FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> tahts the server write?
18:43:18FromDiscord<ache of head> this is the server for nim, the programming language
18:43:43FromDiscord<Clyybber> but whaddabout the kit?
18:43:45FromDiscord<Ardek> formerly known as nimrod
18:43:52FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> how to have it
18:43:55FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> i join here
18:44:00FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> and i have a code
18:44:05Zevvaah the code
18:44:06FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> where to type the code
18:44:06Zevvwhat is it
18:44:14Zevvjust type it here in this window
18:44:17FromDiscord<Ardek> yes
18:44:18FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> HHD
18:44:22FromDiscord<Clyybber> inb4 leaks his product code
18:44:24FromDiscord<ache of head> ๐Ÿค”
18:44:37FromDiscord<Ardek> i am the guy that manages codes
18:44:48FromDiscord<Avatarfighter> Ardek lies that's disruptek's job
18:44:53FromDiscord<ache of head> XD
18:44:54FromDiscord<Avatarfighter> (edit) "lies that's" => "lies! That's"
18:44:58FromDiscord<Ardek> disruptek and ardek are the same person
18:45:03FromDiscord<ache of head> hot take
18:45:04FromDiscord<Ardek> name ends with same two letters
18:45:12FromDiscord<ache of head> but i like it
18:45:16FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> HHL
18:45:17FromDiscord<Clyybber> disruptek and ardek made the compiler jobless
18:45:20FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> i got new code
18:45:23FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> now what to do?
18:45:28FromDiscord<Clyybber> you go to google
18:45:30FromDiscord<Clyybber> search again
18:45:31FromDiscord<Ardek> send your credit card number
18:45:37FromDiscord<Avatarfighter> no no
18:45:37FromDiscord<ะ”ะถะธะฟะธะตัะฐะะธะœะฐะะฐะผะธั€ะฐ!> AHHAHAHA
18:45:39FromDiscord<haxscramper> Say something in disruptesque
18:45:39FromDiscord<Avatarfighter> do not send that
18:45:48FromDiscord<Avatarfighter> @Ardek we're going to need proof
18:45:52FromDiscord<Avatarfighter> send testes
18:45:56FromDiscord<Avatarfighter> everyone has seen his
18:46:07FromDiscord<Ardek> uhh my testes expand at compile-time
18:46:11FromDiscord<Ardek> :nimDog:
18:46:18FromDiscord<Avatarfighter> :disruptek:
18:46:23*natrys joined #nim
18:46:37FromDiscord<ache of head> testes
18:46:42FromDiscord<Ardek> peak comedy
18:46:55FromDiscord<Avatarfighter> god this channel just piqued
18:47:14FromDiscord<ache of head> all because of the codes.
18:47:58FromDiscord<Avatarfighter> mhm
18:48:33FromDiscord<Avatarfighter> Zevv: does nim-arduino still work?
18:51:35FromDiscord<Clyybber> disruptek: Wasn't the original carnac issue something with the backend?
18:51:58FromDiscord<Clyybber> I mean unsemmed code reaching the backend and triggering an assertion there
18:52:04disruptekidents are reaching the codegen.
18:52:14FromDiscord<dom96> hello, how's everybody doing?
18:52:20disruptekoh yeah, real good.
18:52:38FromDiscord<Avatarfighter> What's good dom
18:52:46FromDiscord<Avatarfighter> doing anything exciting today?
18:53:08FromDiscord<Clyybber> ok, I can repro without snappy and frosty
18:53:17disruptekclyybber: of course.
18:53:28FromDiscord<Clyybber> you never know
18:53:33disruptekyes, i do.
18:53:37FromDiscord<dom96> @Avatarfighter not sure yet, depends how far the reddit procrastination machine takes me, you?
18:54:12FromDiscord<Avatarfighter> @dom96 I'm currently wrapping the arduino libraries used to program my robot ๐Ÿ˜„ I'm hoping to have a maze solving program running on it today
18:54:55FromDiscord<Avatarfighter> Its for an assignment for my robotics class, they said you could use any programming language ๐Ÿคทโ€โ™‚๏ธ
18:55:33FromDiscord<dom96> Awesome, so here is what you should do. Write a brainfuck interpreter in Nim, then write the robot in brainfuck, ???, profit
18:55:46FromDiscord<Avatarfighter> Honestly
18:55:49FromDiscord<Avatarfighter> That would be fun lol
18:56:17FromDiscord<InventorMatt> @Avatarfighter i belive zevv's arduino library still works but it doesn't work on windows currently as it hangs forever when compiling so if you are on linux it should be fine
18:56:56*aHaquer left #nim (#nim)
18:57:07FromDiscord<Avatarfighter> @InventorMatt thanks for the warning about windows, I was wondering about that ๐Ÿ˜›
18:57:13*vicfred quit (Quit: Leaving)
18:58:01ZevvAvatarfighter[m]: I checked a month ago or so, then it worked
18:58:04ZevvI think I fixed something
18:58:17Zevvthat was a space-in-a-path thing IIRC
18:58:38FromDiscord<InventorMatt> @Avatarfighter no problem, also if you are writing robotics stuff in nim I have a nimbotics organization on github you can join and have your code posted there or help out with it
18:59:03FromDiscord<Avatarfighter> Zevv: thanks for the reply ๐Ÿ˜„
18:59:07Zevvhm not it's another problem; I fixed the space and hten something else popped up, but I don't have a windows box to test
18:59:09FromDiscord<Avatarfighter> @InventorMatt sounds awesome ๐Ÿ˜„
18:59:10Zevvhttps://github.com/zevv/nim-arduino/issues/2
18:59:12disbotโžฅ Doesn't work on native Windows ; snippet at 12https://play.nim-lang.org/#ix=2uPC
18:59:18Zevvalso, I don't recommend actually using this
18:59:19FromDiscord<Avatarfighter> I'm not sure your organization would enjoy my spaghetti though
18:59:20Zevvbut hey, what can I do
18:59:59FromDiscord<Avatarfighter> You don't recommend ๐Ÿ˜ญ !?
19:00:30FromDiscord<InventorMatt> @Avatarfighter it can't be worse than my spaghetti. I'm just trying to build up a robotics community in nim
19:00:39ZevvAvatarfighter[m]: real men don't arduino
19:00:43Zevvthey just cross-compile for avr-gcc
19:00:55FromDiscord<InventorMatt> https://github.com/Nimbotics
19:01:25Zevvbecause arduino is, well, for kids, right?
19:02:06FromDiscord<Avatarfighter> funny enough Zevv, I have a robot made for kids >:)
19:02:16Zevvmy man!
19:02:20ZevvI have a swing in the garden
19:02:37disrupteksex outdoors is one of life's great pleasures.
19:02:41FromDiscord<InventorMatt> a lot of universities use arduino in their classes
19:02:44FromDiscord<Avatarfighter> tire swing or-
19:02:47FromDiscord<Avatarfighter> disrutpek ๐Ÿ˜
19:02:57Zevvso tired of swinging
19:03:03disrupteklol
19:03:11disrupteka swinger's life is hard.
19:03:40*Jesin quit (Quit: Leaving)
19:04:08Zevvanyway, Avatarfighter: If you are targeting windows I'd appreciate a fresh look on this issue
19:04:29Zevvbecause I have 38 starry little friends on this project I just noticed
19:04:35FromDiscord<Avatarfighter> Oh I will not be touching windows without a pole
19:04:35disruptekwhich do you think sounds more impressive on my resume: `asshole`, or `arsehole`?
19:04:41Zevvand I decided that for repos with over 25 I will provide some level of support
19:04:51FromDiscord<Avatarfighter> 25 what
19:04:52FromDiscord<Avatarfighter> stars?
19:04:55FromDiscord<Ardek> sent a code paste, see https://play.nim-lang.org/#ix=
19:04:57FromDiscord<Avatarfighter> I can make that happen
19:11:03*hmmm joined #nim
19:13:20FromGitter<iffy> disruptek: I filed an issue for the echo problem: https://github.com/nim-lang/Nim/issues/16366 But I don't think I'll file an issue for the subprocess changing stdout to O_NONBLOCK problem. I've tested with Python and it behaves the same way (it lets child processes change stdout flags)
19:13:22disbotโžฅ echo may silently fail to write to stdout ; snippet at 12https://play.nim-lang.org/#ix=2Ick
19:13:52disruptekiffy: right; that should merely be documented, i think.
19:14:09*Vladar quit (Quit: Leaving)
19:14:19disrupteki mean, even if it doesn't get fixed, your issue might help someone. thanks. ๐Ÿ‘
19:16:58*Jesin joined #nim
19:18:55disruptekwhy the fuck does araq hate linux?
19:19:08FromDiscord<Clyybber> disruptek: Ugh, it works when I give it the astGenRepr
19:19:17disrupteki know.
19:19:33disrupteki tried passing it through layers of macros and that didn't help.
19:20:53FromDiscord<Quibono> Zevv Iโ€™m going to star all your stuff
19:21:09FromDiscord<Clyybber> he wouldn't recommend it
19:21:21FromDiscord<Avatarfighter> @Quibono that's the spirit, if enough of us star maybe we'll get good libraries ๐Ÿ˜›
19:21:26disruptek... you might ask what is a normal range for Disk I/O wait time? In our experience, anything from 1 to 5 is normal, 10 starts getting slow, 20 is really slow, and anywhere above 20 is really very slow. These values are a bit relative though ...
19:22:06FromDiscord<Quibono> _wants good libraries._
19:22:21FromDiscord<Avatarfighter> im teasing ofc
19:22:21FromGitter<bung87> define good
19:22:34FromDiscord<Avatarfighter> great question bung i wouldn't be able to
19:23:01FromGitter<bung87> :)
19:23:15FromDiscord<Avatarfighter> \:P
19:23:23FromDiscord<Quibono> Oooh this bitline thing seems nice
19:24:31ZevvQuibono: yeah, all 84 repos
19:24:33ZevvI deserve that
19:24:55*PMunch joined #nim
19:25:06FromDiscord<Quibono> Iโ€™m just starring the ones I actually like the sound of, if theyโ€™re in Nim. But I want the bitline one
19:25:20ZevvAlso, I think with modern SSDs, 6 is about the max I/O wait time I can go with
19:25:31Zevvbitline is abandoned
19:25:51Zevvbut feel free to inherit
19:26:09FromDiscord<Avatarfighter> 6 what zevv
19:26:14Zevv6 I/O wait time
19:26:32FromDiscord<Avatarfighter> ๐Ÿ˜ฐ i didn't even know wait time was measured in I/O
19:26:42FromDiscord<Quibono> Why did you abandon it zevv?
19:26:54disruptekhe found a younger model.
19:27:06disruptekher name is `tracy`.
19:27:13Zevvbecause someone pulled in another tool that does the job bitline was supposed to do. https://bitbucket.org/wolfpld/tracy/src
19:27:23disruptekshe's a looker.
19:27:24FromDiscord<Avatarfighter> does anyone know how to use nimterop
19:27:31FromDiscord<Avatarfighter> i read the readme but im lost
19:27:32Zevvbitline looks cooler though.
19:27:38Zevvbut it was almost done, so I lost interest
19:27:58PMunch@Avatarfighter, presumably someone does. But it's not me :P
19:28:07disrupteklol when you see the finish line, you're kinda like, "oh, is that all? pffbt, who cares."
19:28:08FromDiscord<Quibono> What still needs to be done?
19:28:18FromDiscord<Avatarfighter> PMunch: that's what someone who knows how to use nimterop would say
19:28:26Zevvdisruptek: sure, I bet it's not any different for you
19:28:37disruptekit's the same.
19:28:52Zevvit was cool to make the gui spiffy and to optimize it to display +20M events at 30fps
19:28:55Zevvthen it worked
19:28:58disrupteki soon as i figure out /what/ i can do with a tool, i'm done building it.
19:29:05Zevv*pooffff* goes the motivation
19:29:17disruptekyeah, like, what's the point?
19:29:21FromDiscord<Quibono> Lol
19:29:23ZevvThe only reason I kind of finished NPeg is all the cash it brings in
19:29:30disrupteklol
19:30:13disrupteki wonder if you start to create the tool because the problem sucks but then you realize that it's no longer a problem you care to solve.
19:30:21FromDiscord<Clyybber> Zevv: You are FAMOUS
19:30:25FromDiscord<Clyybber> I saw you in the filter proc
19:30:28FromDiscord<Clyybber> remember?????
19:30:34Zevvriiight
19:30:36FromDiscord<Quibono> _wants to use bitline for stock data._
19:30:57ZevvQuibono: be my guest. git clone should do the job
19:30:58disruptekquibono: that's why i like it.
19:31:39disruptekbut really, we should make it into the real time "golden" browser.
19:31:50FromDiscord<Avatarfighter> golden?
19:31:53FromDiscord<Avatarfighter> golden showers?
19:31:56FromDiscord<Avatarfighter> what is golden
19:31:56disruptekwe'll invent some datatype for nim program metrics and then browse them in bitline.
19:32:32disruptek!repo golden
19:32:33disbothttps://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim ๐Ÿ† 15 24โญ 0๐Ÿด
19:32:43FromDiscord<Clyybber> disruptek: 3 fucking lines
19:32:44*Jesin quit (Quit: Leaving)
19:32:45disruptekgolden was a little too ambitious for my skills at the time.
19:32:52FromDiscord<Quibono> Yeah I think Iโ€™ll play around with it.
19:32:52disruptekclyybber: let's see.
19:33:06Zevvclyybber: \o/
19:33:14FromDiscord<Clyybber> sent a code paste, see https://play.nim-lang.org/#ix=2Icr
19:33:15FromDiscord<Clyybber> this is enough to repro
19:33:29disrupteknow, was that so hard?
19:34:14Zevvwell, he complained a lot about it, so probably
19:34:14disrupteki'm at 16 i/o and wondering what the fuck is up.
19:34:30disrupteki'm, like, a little too stoned for sysadmin right now.
19:35:15disruptekbut, dude, think of it... we were using computers before you could have unix on your own local hardware.
19:35:30Zevvclyybber: why does our snippet replace * with
19:35:55FromDiscord<aHaquer> Golden would be ambitious for any point during my time on earth
19:35:56Zevv(a dot that does not want to copy & paste)
19:36:05disrupteknot only don't i have enough bandwidth for the playground, but i don't even have enough i/o to load the fucking page.
19:36:13FromDiscord<Clyybber> Zevv: I don't see the dots
19:36:20*grorkster quit (Remote host closed the connection)
19:36:27Zevvnevermind then. IT's the export marker that gets rewritten by something silly
19:36:36*Q-Master quit (Ping timeout: 240 seconds)
19:36:39FromDiscord<Clyybber> oh, huh
19:36:41disruptekahaquer: it's so simple now.
19:36:44FromDiscord<Clyybber> what the heck
19:37:46disruptekwe have a new, better key/value database. we have gram, a "properly simple" graph library. we have criterion for microbenches.
19:37:53*lritter quit (Quit: Leaving)
19:38:00disruptekit's just, the ecosystem is better prepared.
19:38:04FromDiscord<aHaquer> I wish to suckle from your breast of knowledge.
19:38:10Zevvdisruptek: http://ix.io/2Icr
19:38:11FromDiscord<Avatarfighter> ๐Ÿ˜
19:38:13disrupteki hadn't even begun gittyup at that time. or nimph.
19:38:40FromDiscord<Clyybber> disruptek: Tell me, why didn't you wrap everything in 100 when true: s?
19:38:52disruptekwhat?
19:38:56FromDiscord<Clyybber> go the extra mile
19:39:01disruptekman, i could go for a suckling right about now.
19:39:10FromDiscord<aHaquer> starts with style guide
19:39:40disruptekclyybber: why did you think you needed to look anywhere else.
19:39:43disrupteki'm just curious.
19:40:21FromDiscord<Clyybber> the voices are telling me to not trust the tests
19:40:22disrupteki told you what the app was. i provided a readme explaining how it worked. i provided small test programs that demonstrate the issue.
19:40:34disrupteki provided a from-scratch implementation.
19:40:35FromDiscord<Clyybber> nah, its fine; I'm just joking
19:40:39disruptekbut seriously.
19:40:40FromDiscord<Avatarfighter> Zevv: you said you would support nim-arduino because it has 25+ stars right
19:40:42FromDiscord<Clyybber> but its not exactly minimal
19:40:56ZevvAvatarfighter: "kind-of-support", if I remember correctly
19:40:59disrupteki showed you an actual example application that a nim programmer wants to write. an application that does not work.
19:41:17disrupteki did just about everything but rub your fucking nose in it.
19:41:39*Jesin joined #nim
19:41:40disrupteki even wrote comments.
19:41:46disruptekCOMMENTS, CLYYBBER!
19:41:47FromDiscord<Clyybber> commendable
19:42:04ZevvI've seen you write comments before
19:42:11disruptekit's under CI for fucks sake.
19:42:29disrupteki mean, am i out of my fucking mind here?
19:42:40FromDiscord<Avatarfighter> Zevv: ok so since you're now supporting nim-arduino do you have plans on shoving the nim c code straight into the arduino compiler
19:42:57FromDiscord<Clyybber> disruptek: I hate your comments; I deleted them all
19:43:03disrupteklol
19:44:30Zevvavatarfighter: euh, how should that work?
19:47:13FromDiscord<Avatarfighter> idk i was hoping you would find out ๐Ÿ˜›
19:47:26*cgfuh joined #nim
19:48:46disruptekzevv: let's make an auto-door and sell it on the internet.
19:49:00disruptekwe'll be billionaires.
19:50:13disruptekif you /look/ at our door, it opens. that's how it works.
19:50:33disruptekwe have a little camera. it looks at you. it watches the room.
19:50:36FromDiscord<Avatarfighter> stop stealing zevv from more important projects such as nim-arduino
19:50:38disruptekif you look at it, it opens.
19:50:56disruptekif you're not looking at it, it's uploading your naked video to teh interwebs.
19:51:03*aHaquer joined #nim
19:51:16disruptekthis project is gonna put nim-arduino on the map.
19:52:55disruptekwe'll have different spots that you look at to communicate your intention. like, "stay open", "stay closed", "lock", etc.
19:54:06disrupteki guess it's really "prop", right?
19:54:18*Q-Master joined #nim
19:55:19*muffindrake joined #nim
19:57:14disruptekour door also has a screen on it. with it, we can show you who is on the other side of the door.
19:57:38disruptekthe effect is that of an instant window.
19:58:25disruptekwhen we're not showing you who is outside, you can see other views...
19:58:40disruptekthe weather, for example. your latest texts.
19:58:47FromDiscord<Avatarfighter> ive got to say you've definitely put some thought into this
19:59:07disrupteknah, i'm just brainstorming.
19:59:28disruptekhow would you do it?
19:59:45disrupteki mean, what's /your/ idea for an auto-door?
20:00:52disruptekyou can see who is outside /any other door/.
20:01:04FromDiscord<Avatarfighter> well
20:01:08FromDiscord<Avatarfighter> i have no idea
20:01:15FromDiscord<Avatarfighter> i've never thought i needed an autodoor in my life
20:01:16disruptekor rather, who is /inside/ any other door.
20:01:30disruptekc'mon, everyone needs an autodoor.
20:01:50FromDiscord<Ardek> make an autodoor that opens automatically when you push it
20:01:57disruptekit's practically the defining characteristic of "future."
20:02:08disruptekname one future in which humans haven't eradicated doors?
20:02:20Zevvdisruptek: no, where we'er going we don't need futures, remember
20:02:34disruptekhave you ever seen a doorknob in a future film?
20:02:50Zevv"future film"
20:02:59disruptekyeah.
20:03:02disrupteka portrayal.
20:03:41disrupteki guess star wars is really about the past.
20:03:43disruptekfair enough.
20:03:47disruptekbut, you get my point.
20:04:14Zevvanyway, I just realized
20:04:17disruptekthe very definition of futuristic is that humanity has finally slain the knobs.
20:04:22Zevvwhen clyybber has this fixed
20:04:38disruptekhell will hath frozen over?
20:04:40Zevvare we done with CPS
20:04:44Zevvor does it need more work
20:04:51disrupteki don't know.
20:05:14disrupteki really don't remember how many bugs exist. i think there's another sym bug.
20:05:42disrupteksomething to do with substitution...
20:05:46hmmm~disruptesque
20:05:46disbotdisruptesque: 11the art of telling it as it is
20:06:01disruptekwhat is this?
20:06:03hmmm:3
20:06:27FromDiscord<kenran> how come everytime I check this channel there's this word again?
20:06:40disruptekwhat the hell are you talking about?
20:06:41hmmmtrending on twitter
20:07:05disrupteki must have missed something last night. ๐Ÿ˜
20:07:16FromDiscord<Ardek> yeah, washing your teeth
20:07:23disruptekgoddamnit.
20:07:44disrupteki could not figure out where all this blood was coming from.
20:07:51disrupteki was really losing my mind. thanks.
20:10:26FromDiscord<Clyybber> https://play.nim-lang.org/#ix=2IcH
20:10:51FromDiscord<Clyybber> interesting is that the fib2 call is required with the x-1
20:12:18disrupteki know.
20:12:39disruptekbut if you look at the node, it's helpful.
20:13:22disrupteklike, you get the crash, you instrument the node where it crashed. both arguments. then you see the structure that explains why they crashed.
20:15:00disruptekone thing i need to learn soon, if i don't get a job, is how to keep the stink off your beard.
20:16:56*narimiran quit (Ping timeout: 240 seconds)
20:18:06disruptekzevv: you really don't want to make autodoors with me?
20:18:17disrupteki think that would be a really fun business.
20:18:34Zevvi dont trust autodoors
20:18:40disruptekwhat?
20:18:47disruptekwait, are you a closet stormtrooper?
20:20:50FromDiscord<haxscramper> Is this an intended behavior on nested case objects with `requiresinit` or this is a bug: https://play.nim-lang.org/#ix=2IcM ?
20:25:07*regreg quit (Ping timeout: 260 seconds)
20:30:57FromDiscord<ajusa> Wait are you the guy who wrote the pattern matching PR?
20:30:57FromDiscord<myphs> I can cast a negative value to a `Natural`. What's the alternative to change the type but fail in case the value is out of range? OR: how to convert an array of ints to an array of Naturals without allowing negative values? Is there a shortcut?
20:32:03FromDiscord<haxscramper> yes
20:32:57FromDiscord<ajusa> Thanks so much for writing that, I look forward to it getting merged! Btw there was a small spelling mistake in the WIP article you had, I think it was 'fist' instead of 'first'
20:33:01disruptekyou mean, like, shorter than three lines?
20:35:07*mipri joined #nim
20:35:20disrupteki'm getting excited about these autodoors.
20:35:57FromDiscord<haxscramper> Fixed that one. How is the article by the way? It is not finished yet
20:36:01*kenran joined #nim
20:36:15FromDiscord<haxscramper> Or maybe some additional thoughts on use cases etc.
20:36:23FromDiscord<kenran> are there some more people who stream programming in Nim? from a while back I'm still following a couple, but lately I've only seen pmunch I think.
20:37:09PMunchNo one has yet to take up my AoC live challenge :P
20:38:21FromDiscord<ajusa> I liked it! I don't fully get/use macros, but I found the walk-through pretty helpful in understanding how the pattern matching could be used to solve a problem in Nim. Correct me if I am wrong, but there is no exhaustiveness checker in your implementation, right? Like the compiler doesn't warn if there are paths that aren't covered by the pattern matching?
20:39:41FromDiscord<myphs> I thought there must be something like cast[array[4, Natural]]([1, 3, 3, 7]) but with range checks in the language, but I haven't found it yet
20:39:59FromDiscord<haxscramper> No, there is no checking for all cases, mainly because of things like `[any @node is (kind: in {JString, JInt, JFloat)]` which are probably too hard to check
20:40:03disruptekzevv: btw, i wanted to ask you... did you ever run /tmp has your $HOME?
20:40:25disrupteks/has/as/, too.
20:40:47FromDiscord<haxscramper> I should probably start with simple example and then go to implementation.
20:41:00FromDiscord<haxscramper> I mean there is a lot of things that I can talk about too
20:41:22FromDiscord<haxscramper> For example this is probably single implementation that I know of which can pattern-match OOP objects
20:41:48FromDiscord<ajusa> Yeah, I think I might prefer just a general pattern matching tutorial/article rather than one focused on macros.
20:42:11FromDiscord<ajusa> Cause then I have to focus on two non-trivial topics: pattern matching and macros
20:43:38FromDiscord<haxscramper> What would you use it for mostly? I'm just having trouble coming up with adequate example of use case outside of working with AST and similar things. There are of course things like `Some(@capture) ?= optionalVal`, but those are just simpler helpers
20:44:17FromDiscord<haxscramper> I thought about something related to json etc, but honestly any json pattern matching just means you should use unmarchalling
20:44:38FromDiscord<haxscramper> And let compiler handle all checks and mappings to normal type for you
20:44:58FromDiscord<ajusa> I had to use OCaml in one of my classes recently to implement a programming language. Of course that was also operating on an AST lol. You might want to give a simple example of just replacing a general if statement with the pattern matching equivalent.
20:45:31FromDiscord<ajusa> Or building a super simple math language using pattern matching, like it takes in a string "1 + 2 3" and outputs the result
20:48:14PMunchUgh, translating Arduino stuff to Nim is such a pain
20:48:18FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2IcZ
20:48:19PMunchAll these hidden imports..
20:48:25PMunchUnless there's a better way..
20:52:30FromDiscord<ajusa> You're correct, including a parser implementation would be non-trivial :). Yeah, converting code like that seems like the easiest way to get someone to understand both pattern matching and how to do it in Nim. Article is pretty interesting, since the parsing is basically handled by JSON and evaluation would be where the pattern matching could step in.
20:55:01FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2Id0
20:58:09PMunchZevv, would your Arduino work help me at all here?
20:58:22PMunchI'm trying to get some code running on a Teensy 2.0
20:59:16FromDiscord<haxscramper> You would need to write helper macro that converts `field` to identifier (it is constant stirng) and uses it as field
20:59:19PMunchI just don't see why Nim requires all these imports while the Arduino IDE just appends #include <Arduino.h> and is done with it..
20:59:33PMunchI feel like I'm doing something wrong..
20:59:43FromDiscord<haxscramper> But should be possible to do with few lines of helpers
21:00:06disruptekis the "teensy 2.0" a vibrator? like sounds like my name for my girlfriend's ex.
21:00:26PMunchHaha, it's a microcontroller based on the atmega32u4
21:00:36FromDiscord<Recruit_main707> @haxscramper ok, thank you
21:00:40disruptekbut it controls more than just women?
21:00:56PMunchSo far it only controls my keyboard..
21:01:04disruptekahh.
21:02:41kenranare you creating something qmk-like in nim PMunch?
21:02:48PMunchThat's the idea
21:02:54Prestigeoh, sweet
21:03:30PMunchHave the keyboard all wired up, now I just need some firmware on it
21:03:55PMunchTried with QMK and it works great with one half
21:05:14kenranwhat's the problem with the other half? (not that I could help... I've built some boards, but I had PCB's)
21:05:22FromDiscord<sealmove> hi PMunch. I didn't implement anything yet but I did some very sweet code refactoring. The code is extremely managable now. I will push the code tomorrow.
21:05:58PMunchkenran, well I didn't connect them :P
21:06:15PMunchCurrently I have one half wired up to the Teensy, and another to an IO extender
21:06:52PMunchWhat I really want to try is to have both halves on IO extenders (that communicate over I2C), then one microcontroller which is hooked up to both of them
21:07:03FromDiscord<sealmove> I am thinking about introducing substreams. for example `s: x(5)` can mean "make a substream of 5 bytes out of the main stream and then use it to parse a string till its end". It will work with any type which is useful (especially with custom types that you want to have fixed size even if they don't use it up all).
21:07:54kenranthat sounds very interesting. I have no idea what an IO extender is, but getting rid of one microcontroller looks nice to me (unless such a piece were to cost more I guess)
21:08:47PMunchIO extender is pretty much just what it sounds like. It's an I2C device that allows you to address more pins than what you have available
21:09:29PMunch@sealmove, that sounds neat
21:09:46FromDiscord<sealmove> oh you like the substream idea? I am glad
21:10:09PMunchNot sure if I quite see the benefit of it..
21:10:17PMunchBut the refactoring sounds nice
21:11:08PMunchI mean `s: x(5)` is just the same as `s: x[5]` currently
21:13:36FromDiscord<sealmove> for one things you will have arrays of strings (`s: x(5)[6]`) means "array of 6 strings each one of length 5", and `s: x[6]` means 6 null-terminated strings. `s: x()` can give you 1 string that is terminated by next magic field and `s: x[]` can behave as it currently does.
21:14:29PMunchHmm
21:15:54FromDiscord<sealmove> oh and a single null-terminated string is simply `s: x`
21:19:46PMunchOh well, I'm off
21:19:50*PMunch quit (Quit: leaving)
21:21:03kenrandang, now that I've fixed the font loading and rendering, it would be the perfect time to actually implement this "better" instead of just dumping all the code in one proc. but as always: as soon as the knot is gone, motivation is gone too...
21:22:03*vicfred joined #nim
21:26:52FromDiscord<Avatarfighter> Zevv: im honestly flabbergasted as to how you made ur arduino wrapper, im struggling to wrap an array atm
21:32:20*junland quit (Quit: %ZNC Disconnected%)
21:33:11*junland joined #nim
21:36:00*muffindrake quit (Quit: muffindrake)
21:43:06Zevvhaha
21:44:05Zevvdid i ever ru /tmp as my home
21:44:11Zevvno i think i did not
21:44:19Zevvdid you?
21:46:24FromDiscord<ElegantBeef> Kenran what was the issue?
21:46:57*muffindrake joined #nim
21:47:22FromDiscord<kenran> https://gist.github.com/kenranunderscore/d3e13e7bc84e5ce4d259a95354d97637#file-textrendering-nim-L129
21:47:49FromDiscord<kenran> the last `addr` was too much
21:48:12FromDiscord<kenran> araq pointed it out after seeing the gist
22:01:31*aHaquer left #nim (#nim)
22:06:33*muffindrake quit (Quit: muffindrake)
22:07:07disruptekzevv: never as my desktop home, no.
22:10:24FromDiscord<Avatarfighter> hey disruptek have you ever used kubernetes
22:10:38disruptekno, i really hate that shit.
22:10:49FromDiscord<Avatarfighter> what do you use then
22:10:52disruptekyeah, i'm super opinionated and i haven't used it.
22:11:00FromDiscord<Avatarfighter> oh that's ok
22:11:08FromDiscord<Avatarfighter> do you use docker or things like that
22:11:17disrupteki mean, yeah, but i don't love this stuff.
22:11:28FromDiscord<Avatarfighter> yeah i feel that
22:11:32FromDiscord<Avatarfighter> ok that's all the questions i have
22:11:35FromDiscord<Avatarfighter> thanks dude
22:11:37disrupteklol
22:11:45FromDiscord<Avatarfighter> haha
22:12:09disrupteki will probably end up with a container approach in nigel. i can see a couple places. but i'll hate every minute of it.
22:12:29disrupteki use it for klee and it just feels like a fucking drag every damned time.
22:12:30FromDiscord<Avatarfighter> nigel >:)
22:12:37FromDiscord<Avatarfighter> did you make a repo for nigel yet
22:12:47disruptekit's private at the moment.
22:13:04FromDiscord<Avatarfighter> good, the world isn't prepared to see its logo
22:13:05disrupteknot sure i won't try to sell it.
22:13:34disrupteki should put that logo in the repo before i forget.
22:15:34FromDiscord<Avatarfighter> >:)
22:16:25*fanta1 quit (Quit: fanta1)
22:18:34*natrys quit (Ping timeout: 246 seconds)
22:24:18*kenran quit (Quit: leaving)
22:28:58Zevvthat's an interesting perspective. "Do you use kubernetes" "no" "oh, what do you use then?"
22:29:09ZevvWell, I run a machine, and that machien runs some shit?
22:29:28Zevvwho ever made up this cruft, this fantasy, this alternate fact, that kubernetes and docker solve stuff
22:29:54ZevvI mostly see people in my environment who know less then kids of the same age 10 years ago
22:30:03Zevvbecause if someone needs to fart, the use a docker container to do so
22:30:16FromDiscord<dom96> It solves problems...
22:30:18Zevvbut they have no single clue what's running in there, how to setup stuff themselves, to configure make install
22:30:19FromDiscord<dom96> ... if you're Google
22:30:42Zevvreally, I'm getting more and more peace of mind about job security
22:32:27disruptekit does solve some problems, but it does it with an abstraction that should not exist in the first place.
22:32:36disruptekthese problems were already solved.
22:33:03Zevvno, but the mindset is funny, "what do you use then?"
22:33:16Zevv(don't take that persoanlly avatarfighter :) )
22:34:07Zevva needed to do something with kafka the other day. "The team" told me to pull this docker container because it has all the stuff in there I need. I pull the thing, I need to type 12 commands, run a slow java shitshow.
22:34:20Zevvsick & tired I spend like 4 minutes finding a native debian alternative that "just runs" on my machine
22:34:26ZevvI now do everything 5 times faster
22:34:38Zevvand still, all the kids see me type, ignore me and run back to their docker container
22:34:47Zevvgood for you
22:34:50disruptek"but it's not reproducible"
22:35:45Zevvsee if i care
22:37:09FromDiscord<dom96> I can understand the value proposition of Docker if you've got a service that depends on multiple other services like an HTTP server that you want to set up.
22:38:04Zevvit's a mindset problem. We have this thing going where we hit kubernetes limits. only 1500 containers or something like that
22:38:20Zevvbut these kids put every. single. little. daemon. in their own container
22:38:28*mbomba joined #nim
22:38:30Zevvso for a session we now need 5 containers. that quickly adds up
22:38:37Zevvtechnically there is no single reason to just put it all in 1
22:38:44Zevvbut no, "that is the kubernetes way"
22:38:50Zevvand spinning up these pods take seconds
22:38:58Zevvi love it, really
22:39:32ZevvI *literally* replaced 2 containers full of shit with 5 lines of code running a few shell commands
22:39:34*Jesin quit (Quit: Leaving)
22:39:45Zevv"No we need a host CSI"
22:39:50ZevvI have no clue what that is or what that does
22:39:55FromDiscord<nikki> http://psdoom.sourceforge.net/
22:39:58ZevvI just do "mount"
22:40:03FromDiscord<nikki> could use this to kill some of those containers eh
22:40:22Zevv\o/
22:40:55Zevvthat's a *good* reuse of existing technology
22:41:36disrupteki just don't care. i just got another notice that they are auctioning off my possessions. at this point, yes, i'll reboot your containers for food.
22:42:23*Jesin joined #nim
22:42:24Zevvfair enough
22:43:09disrupteki mean, i can have software running on the same hardware with 1ms latency, on demand, with no scaling to manage. nothing to /do/.
22:43:16disruptekwhy do i give a shit about a container?
22:43:40FromDiscord<nikki> probably bc. if there's no real fun things to work on you gotta conjure up problems to solve
22:43:54Zevvoooh we got problems, trust me
22:44:12disrupteki think i'm just too stupid for this business.
22:44:18FromDiscord<nikki> oh no mean folks that are just making containers for no reason
22:44:40disruptekno country for old men
22:44:47FromDiscord<nikki> the business is largely also social, and creating problems that people pay you to solve works within that ๐Ÿ˜
22:44:49Zevvno country for old men
22:45:34ZevvI'm still the fastest kid on the block when it comes to strace, gdb, perf and the like. And all these tools don't give a shit about containers, because containers are an illusion anyway
22:45:39Zevvthere's no such thing
22:46:08Zevvbut I bet I did this rant before
22:46:15supakeenpretty sure they give a shit about containers as namespaced processes tend to not have cap_ptrace
22:46:23supakeenso you're probably at least turning that on
22:46:33Zevvnope, you just trace that stuff from the outside
22:46:43Zevvno problem at all
22:47:02supakeenoh sure yea that works
22:47:25Zevvin the land of the blind, here's zevv your one eyed bandit
22:48:11Zevv-> ZzzZz
22:48:28FromDiscord<sealmove> in what contexts should IOError be used? i guess i am asking what exactly "io" means ๐Ÿ˜›
22:50:24disruptek~Zevv is your one-eyed bandit
22:50:25disbotZevv: 11your one-eyed bandit
22:50:59disruptek~io is a moon of Jupiter
22:51:00disbotio: 11a moon of Jupiter
22:52:28miprithere are a bunch of syscalls that communicate memory blocks between your process and the kernel. This is incredibly slow, relatively speaking. Enough that control flow may as well be going all the way to Jupiter and back. Io is just a short name that fit that metaphor.
22:53:03miprithese syscalls also have a ton of different kinds of errors. Look up 'man 2 write'
22:53:45mipriyou should use IOError when the root of the error is a failure of one of those operations
22:53:56ZevvOSError
23:01:08FromGitter<deech> Is there something in the stdlib that extracts a bunch of enums from a bitmask?
23:05:34*nikki93[m] joined #nim
23:06:07miprihttps://play.nim-lang.org/#ix=2IdP
23:07:07miprithere's nothing else about enums in strutils, so I reckon there isn't
23:07:23FromGitter<deech> Ok, what if it was `enum A = 100, B=1`.
23:07:51miprithen you'd get an error about the enum being out of order
23:08:14mipribut B = 1, A = 100 would be fine. the 'X' is a good ways away from '1'
23:11:32disruptekwell, if it gets any closer, just fucking shoot it.
23:14:40FromDiscord<Clyybber> disruptek: Hey, tracked it down
23:14:53FromDiscord<Clyybber> compiler sees unsymmed "result = bla"
23:15:14FromDiscord<Clyybber> and thinks, great no need to sem it
23:15:23disruptekwhat?
23:15:39disrupteki feel like that's not really the correct take-away there.
23:15:48FromDiscord<Clyybber> but thats what is happening
23:15:54*hmmm quit ()
23:15:56disruptekwhere is the code?
23:16:13disruptekis it really in addResult?
23:16:24FromDiscord<Clyybber> I'm looking at semProcBody
23:16:29disruptekoh.
23:16:36FromDiscord<Clyybber> but actually hold on
23:17:21FromDiscord<Clyybber> the semExpr call there should sem it
23:20:35*cgfuh quit (Quit: WeeChat 2.9)
23:24:07disrupteki expected fib2 to be sem'd in fib2's body. maybe that's silly of me.
23:41:56*mbomba quit (Quit: WeeChat 3.0)
23:59:20*abm quit (Read error: Connection reset by peer)