<< 11-01-2024 >>

00:12:45FromDiscord<arathanis> `strictDefs` does not like try-except blocks
00:12:52FromDiscord<arathanis> I guess that is why it is experimental
00:18:28FromDiscord<Elegantbeef> @arathanis what's the code?
00:19:30*Batzy joined #nim
00:20:34FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=html>
00:23:39FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=html>
00:24:13FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=html>
00:24:22FromDiscord<arathanis> (edit)
00:24:26FromDiscord<arathanis> But that doesn't seem right
00:24:35FromDiscord<arathanis> (edit) "But that doesn't seem right ... " added "that only that should work"
00:24:51*cnx quit (Read error: Connection reset by peer)
00:25:45FromDiscord<hugop707> hlsee: idk shit about arraymancer, but maybe using the same dummy_output for both causes that?
00:43:51FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#ix=html>
00:44:10FromDiscord<Elegantbeef> `newString` has `\0`
00:44:13FromDiscord<Elegantbeef> `\0` is not empty
00:44:25FromDiscord<arathanis> You allocated space for 32 characters but it is still an empty string
00:44:51FromDiscord<girvo> Yeah that's counter-intuitive IMO
00:45:06FromDiscord<arathanis> not really, you just need to adjust how you are thinking about it
00:45:08FromDiscord<girvo> with respect to isEmptyOrWhitespace specifically anyway
00:45:11FromDiscord<arathanis> you asked for a new box that holds 32 items
00:45:15FromDiscord<arathanis> then asked if the new box is empty
00:45:18FromDiscord<girvo> Yes I understand why lmao
00:45:56FromDiscord<girvo> It's still counter-intuitive with respect to isEmptyOrWhitespace 🙂
00:46:30FromDiscord<arathanis> I guess we will just disagree there, nothing wrong with that 😄
00:46:46FromDiscord<girvo> Here's a question for you
00:46:54FromDiscord<girvo> To make what I'm saying clearer
00:47:31FromDiscord<girvo> A string that is _truly_ empty (as per an english language definition of empty haha). `""`. But because it's a string it's always `\0` trailing, follow? Would that be true or false for isEmptyOrWhitepace?
00:48:10FromDiscord<arathanis> You mean a string that has space allocation for zero characters?
00:48:27FromDiscord<Elegantbeef> An empty string has a length of 0, what the heap data contains is unimportant
00:49:02FromDiscord<girvo> Right, but the proc itself is checking whether it's whitespace so it _is_ checking the heap data etc etc
00:49:11FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
00:49:12FromDiscord<Elegantbeef> Consider this
00:49:35FromDiscord<girvo> I absolutely 100% promise this will trip people up lol
00:49:35FromDiscord<Elegantbeef> if `setLen` does not clear the data (it's an implementation detail afterall) it'll never be empty
00:49:52FromDiscord<Elegantbeef> I mean I disagree cause `\0` is not empty
00:49:53FromDiscord<girvo> Because of the naming/documentation of isEmptyOrWhitespace specifically, not the semantics
00:50:03FromDiscord<arathanis> the proc asks the question:↵> Is this string devoid of characters or are all the characters whitespace characters?
00:50:06FromDiscord<girvo> In reply to @Elegantbeef "I mean I disagree": Now _that_ is unintutive
00:50:16FromDiscord<girvo> (and I understand why! others won't)
00:50:17FromDiscord<Elegantbeef> It's a Nim string not a Cstring
00:50:40FromDiscord<Elegantbeef> I mean document it 😛
00:50:42FromDiscord<girvo> In reply to @arathanis "the proc asks the": "and \0 doesn't count!"
00:50:52FromDiscord<Elegantbeef> `\0` does count
00:50:53FromDiscord<arathanis> In reply to @girvo ""and \0 doesn't count!"": by definition it doesn't, correct
00:50:53FromDiscord<girvo> In reply to @Elegantbeef "I mean document it": I already am 😛
00:51:03FromDiscord<girvo> In reply to @arathanis "by definition it doesn't,": Right, which is unintuitive haha
00:51:08FromDiscord<Elegantbeef> `\0` is a character
00:51:30FromDiscord<Elegantbeef> Well thanks for documenting it, but yea I think the implementation is fine
00:51:42FromDiscord<girvo> The implementation is absolutley fine
00:51:45FromDiscord<girvo> I never suggested otherwise
00:52:11FromDiscord<girvo> Documentation needs to be clearer, because this will absolutely trip up those who do not understand as much as you guys do.
00:52:22FromDiscord<Elegantbeef> hey `\0` is not special! 😛
00:52:52FromDiscord<arathanis> I'd assume `empty` is defined as having a length of 0
00:52:55FromDiscord<girvo> In reply to @Elegantbeef "hey `\0` is not": depends on the context ;P
00:53:05FromDiscord<Elegantbeef> Nim does not treat `\0` special to be fair
00:53:07FromDiscord<arathanis> so newString allocates space for 32 character but sets the length to zero?
00:53:17FromDiscord<girvo> In reply to @Elegantbeef "Nim does not treat": yeah thats totally fiar
00:53:34FromDiscord<arathanis> or is it counting `\0` as a non-whitespace character?
00:54:11FromDiscord<girvo> In reply to @arathanis "so newString allocates space": Its specifically the combination and interplay of: "is this string empty, or is it all whitespace which to a human also means empty?" and yet "all \0 bytes" which to a human would _also_ be an "empty" string (void of anything useful) fails that test
00:54:21FromDiscord<girvo> In reply to @arathanis "or is it counting": it counts it as non-whitespace as far as I can tell
00:54:37FromDiscord<girvo> Which, again, is totally fair. Just needs to be clearer in the docs for this I think 🙂
00:54:53FromDiscord<arathanis> In reply to @girvo "it counts it as": this is correct, the definition of `Whitespace` in `strutils` does not contain `\0`
00:55:01FromDiscord<Elegantbeef> Girvo I think the only people this will trip up is you embedded folk/low level weirdos 😛
00:55:18FromDiscord<girvo> In reply to @Elegantbeef "Girvo I think the": Theres dozens of us! dozens!
00:56:07FromDiscord<girvo> But nah, I can see web devs not understand what newString(1234) is really doing and then being surprised that isEmptyOrWhitepsace is false on a brand new "empty" (to them) string
00:56:34FromDiscord<Elegantbeef> Perhaps, but I do not know
00:59:53FromDiscord<girvo> Not that it matters (because this is _very_ just an embedded/low level weirdo thing) but it's amusing that newStringOfCap(anything).isEmptyOrWhitespace is `true` lol. I know why, just again, it's unintuitive.↵↵Does the stdlib/strutils have a proc that checks for "is all nul bytes"?
01:00:30*cnx joined #nim
01:00:43FromDiscord<Elegantbeef> `allCharsInSet({'\0'})` 😄
01:01:24FromDiscord<girvo> fine 😛
01:03:41FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=html>
01:04:08FromDiscord<arathanis> 😄
01:04:21FromDiscord<Elegantbeef> Fuck do I hate `allCharsInSet` though
01:04:26FromDiscord<Elegantbeef> It's the most specific code...
01:04:28FromDiscord<arathanis> (edit)
01:04:40FromDiscord<arathanis> yeah lol
01:04:50FromDiscord<arathanis> (edit)
01:05:38FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
01:13:53FromDiscord<huantian> Why do you use a concept for col but not to check
01:14:22FromDiscord<Elegantbeef> Cause `Checkable[T]` is an awful thing to encode
01:46:04FromDiscord<kreatoo> sent a code paste, see https://play.nim-lang.org/#ix=html>
01:49:39FromDiscord<Elegantbeef> Use `echo` instead of `stdout`
01:50:27FromDiscord<MDuardo> We were talking about that early↵I had the exact opposite problem
01:50:37FromDiscord<kreatoo> how does stdout.writeline have this issue but echo doesnt
01:50:45FromDiscord<Elegantbeef> echo is threadsafe
01:51:09FromDiscord<kreatoo> what if i want to use styledwriteline then?
01:51:24FromDiscord<kreatoo> do i use echo and do the color manually?
01:51:27FromDiscord<Elegantbeef> Use a lock to block
01:51:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
01:51:45FromDiscord<kreatoo> what do yo u mean by a lock
01:51:47FromDiscord<kreatoo> oh
01:51:52FromDiscord<Elegantbeef> `std/locks`
01:52:25FromDiscord<kreatoo> never heard of it before, ig ill check it out
01:52:26FromDiscord<kreatoo> thanks
01:57:20FromDiscord<hugop707> Consider making the jobs channel a Forum channel
01:57:31FromDiscord<hugop707> (discord specific)
01:59:25*rockcavera quit (Read error: Connection reset by peer)
02:00:10*rockcavera joined #nim
02:00:10*rockcavera quit (Changing host)
02:00:10*rockcavera joined #nim
02:13:34*iamzim joined #nim
02:14:33FromDiscord<kreatoo> sent a code paste, see https://play.nim-lang.org/#ix=html>
02:14:48FromDiscord<kreatoo> it messes up the terminal completely
02:15:49FromDiscord<odexine> Initialise probably shouldn’t be in the thread
02:16:20FromDiscord<odexine> And I assume with lock already does the lock release when you exit the code block, so I assume it’s redundant?
02:16:42FromDiscord<kreatoo> fair
02:17:07FromDiscord<odexine> So yeah just move initialise lock outside the thread and remove the release I think is the fix
02:17:42FromDiscord<kreatoo> well↵i put initLock right down the var threadLock↵and removed release↵but now its showing one bar at a time
02:18:25FromDiscord<kreatoo> sent a code paste, see https://play.nim-lang.org/#ix=html>
02:21:47FromDiscord<odexine> well if youd like i made a progress bar library years ago with this functionality (maybe i'll get to fixing it because of you xd)
02:22:09FromDiscord<odexine> https://github.com/de-odex/suru yeah maybe ill take a look at this again next week
02:23:19FromDiscord<kreatoo> yeah ive seen that before but didnt use it because it wasnt thread safe :p
02:24:55FromDiscord<odexine> :baqua: sorry its been a few years as ive said
02:25:12FromDiscord<odexine> iirc i did make a threaded portion on it, though yeah im not sure how well it works anymore
02:25:21FromDiscord<odexine> you could prolly just derive ideas from my code
02:26:37FromDiscord<odexine> In reply to @kreatoo "Am I doing this": the problem is that you're still locked while sleeping, so no other bar can modify the stdout
02:27:43FromDiscord<odexine> you cant naively do a cursorup 1 while also wanting other bars to modify, you have to thread-safely take note of the current cursor position and move it to the correct location in each of the threads
02:28:47*iamzim left #nim (#nim)
02:28:47FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=html>
02:29:02FromDiscord<odexine> the lock goes in each thread ofc
02:29:16FromDiscord<odexine> set the location too after moving, sorry
02:29:32FromDiscord<odexine> ill be going for now
02:30:05FromDiscord<kreatoo> sent a code paste, see https://play.nim-lang.org/#ix=html>
02:30:08FromDiscord<kreatoo> modified it like this
03:18:17entikanwow panda3d is working really well with nim
03:18:42entikanI've translated some of my work into nim and omg
03:18:58entikanfreedom from the retardation that is current day python
03:20:46entikanseriously python is slowly turning into a neo-feudilist-technocratic-capitalist nightmare
03:21:38FromDiscord<ringabout> Is there a Nim wrapper for panda3d?
03:21:51entikanLOOKING AT YOU PEP-668 and 2FA pypi
03:23:08entikan@ringabout yeah, though it's very much wip (I'm probably the first adopter but rdb is very helpful) https://github.com/rdb/nim-panda3d
03:23:37FromDiscord<ringabout> Thank yu!
03:23:37entikanI've been translating my work to nim for the past few days and it's been liberating
03:23:42FromDiscord<ringabout> (edit) "yu!" => "you!"
03:24:42entikanplease give rdb much love! They're a bonified genius and spending their free time on me nerdsniping nim ;)
03:26:52entikanand it's working fwiw
03:27:07entikanI haven't had to look back at python, it's glorios
03:27:10entikanglorious*
03:27:27entikanyou just have to be a bit more verbose at parts
03:27:41entikanas is nim
03:28:27entikanimagine, doing all these nested loops!
03:30:49FromDiscord<Elegantbeef> Just write an iterator instead of nested loops 😄
03:32:11entikanwhatever the case, nim blows python out of the water in that space
03:32:54entikanI mean, python would have forced me to use a lookup table or hashTable, and fair enough, but sometimes you just want to CRUCH NOM NOM NOM
03:34:36entikannim would just go "muhaha is that all you got foolish mortal" and python just starts crying
03:34:55FromDiscord<leorize> and then you also use lookup tables in nim and get 10x perf \:p
03:39:02entikanyeh and pep-668 and 2FA pypi is a pythong trend I don't care about (exact opposite)
03:39:14entikanlets ye forget
03:39:17entikanlest
03:40:01entikanI'm extremely pretentious in that I used to love python when it was an underdawg
03:40:09entikanbut now it's like starbucks
03:40:18FromDiscord<leorize> 2FA is actually good so \:p
03:40:19FromDiscord<leorize> luckily with nim you go through your github account which would have 2FA already anyways
03:41:01entikannot a fan of github either, microsoft trash. I hope they take codeberg.org
03:41:25FromDiscord<leorize> and pep-668 is pretty much just python catching up with the rest of the world
03:41:43*rockcavera quit (Remote host closed the connection)
03:41:48entikan669 catching up in a way that doesn't make any sense imo
03:41:57entikaneuh 8
03:42:19entikanyou notice immediately there's no dutch BDFL
03:43:09FromDiscord<leorize> 668 looks sane to me
03:43:20FromDiscord<leorize> it's not like nim's bundling approach is that much different from venv
03:43:31entikanthe problem 668 adresses is sane, the solution is retarted
03:44:19entikanlike "the sun is hot" yes ok sure "the solution is to put ice-cubes in your pants" euh....idk I euh...
03:45:02entikanpipx?
03:45:21entikanpipx is alias for "put icecubes in pants..."
03:46:27FromDiscord<leorize> pipx is just python's version of "we can't compile our software into one executable"
03:46:40FromDiscord<leorize> at least it works \:p
03:47:11FromDiscord<leorize> but know that while you can host your code repo anywhere you do need a github account to publish packages to nimble directory
03:47:28entikanso nimble is a microsoft bitch?
03:47:44NimEventerNew Nimble package! highlightjs - highlight.js bindings for Nim, see https://github.com/Ethosa/highlightjs
03:47:48entikanconcerning
03:48:43entikanso nimble is "I'll trust you if you manange to scam microsoft" which sadly is an improvement to pipx but not by much
03:49:18entikangood to know techno-feudalism is winning still in the nim space
03:49:44FromDiscord<hugop707> gitlab doesnt work for nimble?
03:49:44FromDiscord<leorize> which is just a name -\> url lookup table
03:49:44FromDiscord<leorize> but the database is on github so you can't avoid that
03:50:01entikanI'm on codeberg.org
03:50:45entikanand irc as you can see
03:50:49FromDiscord<.bobbbob> for anyone familiar with prolouge, how would I set the secure flag on a session cookie?
03:50:49entikanomg computers
03:51:11entikanI am -this- close to just give up on computers and give computers to microgoogle
03:52:07FromDiscord<leorize> it does, i'm talking about the registry, which is hosted at\: https://github.com/nim-lang/packages↵(@hugop707)
03:52:50FromDiscord<hugop707> ah ok
03:53:02entikanwho's dick do I have to suck to make nim less dependent on microcock?
03:53:35FromDiscord<Elegantbeef> Nim is dependant on microsoft?
03:53:38entikannible is
03:53:42entikannimble
03:53:55entikanI should have added the ble
03:53:56FromDiscord<Elegantbeef> No it's not
03:54:14FromDiscord<Elegantbeef> you can use a custom registry with any git repo anywhere
03:54:32entikanpinky swear?
03:54:47FromDiscord<Elegantbeef> Yes you can configure you're own registry
03:55:13entikanif that is true I can cry from happiness
03:55:30entikannot even being facetious
03:55:54FromDiscord<hugop707> as leorize said, its just the database
03:55:59entikanthe world is in a dark place and @Elegantbeef you make it sound like there's hope
03:56:03FromDiscord<Elegantbeef> your own\
03:56:27entikannim might just the hope
03:56:59FromDiscord<.bobbbob> In reply to @.bobbbob "for anyone familiar with": oh and also if its possible to check for a file upload being too large in prologue instead of showing an error page at from nginx?
03:57:03FromDiscord<hugop707> diehard capitalist world hater? Im the opposite but i can respect the determination of living by your beliefs
03:57:04entikannim is like the ironman movie with the hope and the I am ironman and the hoigenflaven
03:58:22entikan@hugop707 I am actually in favor of low-level capitalism. I just don't like this weird neo-feudalism technocratism microsoft/meta/alphabet shit we got going on.
03:58:35entikanand apple also, but who cares
03:58:55entikanapple is sucking its own dick perpetually which is fine
03:59:13entikanit will eat itself like the snake of oribolotalisiousness
03:59:26entikanI am very drunk thank you
04:00:50entikanimagine a world where every form of expression came with a 30 second unskippable add and all your private data
04:01:06entikantthis is where we're at and it won't stop untill we go "waaaaait a minute"
04:01:12entikanand nobody is going that
04:01:19entikan#wakeUpSheepleOMG
04:01:35entikanit'll only get worse
04:02:04entikanyou're right I was just on shrooms and had my third eye squeeky cleaned but that has only a marginally amount to do with it
04:02:35entikanI truly believe nim is on the cusp here between good and evil
04:02:54entikankeep your political opinions out of my programming languages, but we can make a difference here
04:03:05FromDiscord<hugop707> is he tripping or the bridge isnt showing something he is seeing?
04:03:30entikanmost of the bridge I'm seeing is rainbow fountains coming out of my eyeballs
04:03:44FromDiscord<leorize> this is the case where you tell them to move to #nim-offtopic
04:04:30entikanet tu... I guess I'll shut up but remember this 5 years from now and then tell me I'm wrong.
04:04:50entikan*zips lips*
04:08:52entikannim is great though, I translated most of my recent python code and it just works
04:12:07*azimut quit (Ping timeout: 240 seconds)
04:21:33entikanhttps://yewtu.be/watch?v=VatYrw0uqjU
04:49:33entikanhm...
05:03:32FromDiscord<Phil (he/him)> Hmmmmm
05:03:40FromDiscord<Phil (he/him)> It might make sense to change the threading tests to use testament
05:03:52FromDiscord<Elegantbeef> https://www.youtube.com/watch?v=kvd5Mrjq3jc
05:04:03FromDiscord<Elegantbeef> That's my response to all the hmmming
05:04:25FromDiscord<Phil (he/him)> That way I could run all the sanitizers and so on that I could possibly want in one test-suite
05:04:30FromDiscord<Phil (he/him)> Any thoughts on that?
05:05:34FromDiscord<Phil (he/him)> I'm saying that does not belong in the nim-channel and in the Nim Offtopic channel.↵(<@709044657232936960_entikan=5b=49=52=43=5d>)
05:06:20FromDiscord<Elegantbeef> A single test solution is always nicer
05:06:50FromDiscord<Phil (he/him)> I'm saying that does not belong in the nim programming language channel and more in the Nim Offtopic channel.
05:08:00FromDiscord<Phil (he/him)> That might give me the strategy on how to sneak in asan into the threading test-suite
05:08:37FromDiscord<Phil (he/him)> But first things first, got to get my current changes that include tsan merged first
05:09:52*adigitoleo quit (Ping timeout: 258 seconds)
05:10:00*mhcat quit (Ping timeout: 256 seconds)
05:10:00*mronetwo quit (Ping timeout: 256 seconds)
05:10:07*casaca quit (Read error: Connection reset by peer)
05:11:01*noeontheend quit (Ping timeout: 276 seconds)
05:12:06FromDiscord<Phil (he/him)> btw. leorize, what are your use on using testament to be able to run multiple sanitizers? Do you guys prefer different tools for that kind of thing?
05:12:53NimEventerNew Nimble package! tailwindcss - Tailwind CSS bindings for Nim, see https://github.com/Ethosa/tailwindcss-nim
05:13:22FromDiscord<Phil (he/him)> I'll repeat it over and over again, Ethosa is nuts
05:13:39FromDiscord<Phil (he/him)> Hyper productive
05:14:02FromDiscord<leorize> usually I just use balls, I consider testament too much of a pain to use anywhere but the compiler
05:14:30FromDiscord<leorize> for your case testament matrix feature should work, as long as you provide a `nim.cfg` with various `-d:` flags like `-d:useAsan` or `-d:useTsan`
05:14:56FromDiscord<Phil (he/him)> Hmmm how likely is it I'd get using balls past the powers that be?
05:15:40FromDiscord<leorize> well, even balls doesn't do asan/tsan, only valgrind, helgrind and drd
05:16:18FromDiscord<leorize> you can do a poor man's matrix by making `ttest_asan.nim` that is basically `include ttest` and a `ttest_asan.nim.cfg` containing `-d:useAsan` \:p
05:17:23FromDiscord<leorize> given that you're working on a compiler adjacent project, I'd say to use testament because compiler people don't like disruptek and his creations
05:17:24FromDiscord<Phil (he/him)> Ah, hmm.↵I mean I used testament before, I have it in my mapster lib where I run my test-suite with and without compile-time validation flags.↵Not sure if the complexity might be too much
05:18:13FromDiscord<leorize> i'll just warn you\: once you use balls, you can't go back \:p
05:18:20FromDiscord<Elegantbeef> Araq uses balls for Atlas
05:18:26FromDiscord<Phil (he/him)> Balls it is
05:18:42FromDiscord<Phil (he/him)> I was hesitant because typically you want to have unified tooling everywhere
05:18:53FromDiscord<Phil (he/him)> But if we're at the point where core tooling by core members already uses balls
05:18:56FromDiscord<leorize> make sure linux have valgrind installed if you want valgrind tests
05:19:01FromDiscord<Phil (he/him)> Then the cat is already out of the bag and I'm not a wallbreaker
05:19:07FromDiscord<Elegantbeef> Actually he might only use balls as an oddity test idk
05:19:08FromDiscord<Phil (he/him)> or convention breaker more like it
05:20:02FromDiscord<ringabout> In reply to @Elegantbeef "Araq uses balls for": That's interesting, though `balls` has been broken in testament tests for years.
05:20:15FromDiscord<Elegantbeef> All I can say is it's in there https://github.com/nim-lang/atlas/tree/master/tests
05:20:18FromDiscord<Phil (he/him)> I mean, for the most part I'll just emphasize balls more when I open the issue about introducing asan.↵I'm pretty sure it'll be a similar adventure to this one
05:20:19FromDiscord<leorize> nah, atlas has its own test runner
05:22:05FromDiscord<ringabout> The balls testing prevents me from adding `cps` to important packages.
05:22:45FromDiscord<Phil (he/him)> So basically the timeline either way is\:↵● get my tsan PR merged↵● Open an issue about introducing asan as well, suggesting either balls or testament↵● Make a PR with balls in the meantime, potentially refactor to testament if the issue discussion concludes that threading will not use balls
05:22:59FromDiscord<leorize> idk what is testament doing for balls not to work
05:23:22FromDiscord<ringabout> > /home/runner/work/Nim/Nim/pkgstemp/bump/tests/tbump.nim(6, 8) Error: cannot open file: balls
05:23:53FromDiscord<Phil (he/him)> I think even with that limitation it should be fine, because threading itself does not need CPS inclusion I think↵(@ringabout)
05:24:02FromDiscord<leorize> right, most disruptek projects doesn't specify balls as dependencies
05:24:15FromDiscord<Phil (he/him)> ... requires block missing?
05:24:15FromDiscord<leorize> it's expected to be installed by anyone who want to run tests
05:24:39FromDiscord<leorize> it's intentional because balls uses cps so we don't want that cyclic dep or nimble go boom
05:24:40FromDiscord<Phil (he/him)> I mean, that's just silly. You have a dev dependency, specify it
05:24:58FromDiscord<leorize> and also, nim is very prone to breaking cps
05:24:59FromDiscord<ringabout> Yeah, I remember it was a path issue or something. But I will try to install balls ebfore running the test
05:25:07FromDiscord<ringabout> (edit) "ebfore" => "before"
05:25:07FromDiscord<Phil (he/him)> Ah, cyclic dependency
05:25:08FromDiscord<Phil (he/him)> Hm
05:25:44FromDiscord<leorize> balls is pretty big, dependency count wise
05:25:58FromDiscord<leorize> and uses cutting edge nim tech
05:26:07FromDiscord<Phil (he/him)> In that case I'd still want a comment about it in the nimble file
05:26:12FromDiscord<leorize> works 99% of the time, unless devel acts up
05:27:24FromDiscord<leorize> https://github.com/nim-works/cps/blob/af6dac5c183677f3d8db9e9e0fbf88c7ff7390d0/cps.nimble#L6-L7
05:27:30FromDiscord<leorize> looks like these days it's in task requires
05:27:48FromDiscord<Phil (he/him)> Ahhhh that I can get behind
05:28:04FromDiscord<leorize> but cps doesn't have a test task xd
05:28:04FromDiscord<Phil (he/him)> Wait, declared?
05:28:12FromDiscord<Phil (he/him)> I only know defined, the heck is declared doing
05:28:33FromDiscord<leorize> defined works with `-d:`, declared means it must be a symbol like a function
05:29:44FromDiscord<Phil (he/him)> Hmmmmmmm
05:30:07FromDiscord<Phil (he/him)> Thinking this through step by step, I'd still kinda need matrix for the san steps, though it definitely is nice to get the grinds for free
05:30:19FromDiscord<Phil (he/him)> Ah, not matrix, I mean testament
05:30:34FromDiscord<leorize> or you can open an issue in balls to get asan and co integrated
05:30:37FromDiscord<Phil (he/him)> That or I write my own "runTest" proc that repeats test-runs with the sanitizer flags
05:31:16FromDiscord<ringabout> A test task would be great. Then I don't need to copy the test command from CI
05:31:38FromDiscord<leorize> lol there's already an enum for it in balls, just the runtime code is not written
05:32:59FromDiscord<leorize> well looks like disruptek already added asan/tsan support
05:34:57FromDiscord<ringabout> In reply to @ringabout "A test task would": https://github.com/nim-lang/Nim/pull/23196 if this passes, I would add cps later
05:35:34FromDiscord<leorize> you're running the test wrong, it should be `balls --path:.`
05:36:29FromDiscord<leorize> if balls doesn't work with devel, try `#v4` branch
05:39:16FromDiscord<ringabout> Thanks, I will check the CI later
05:44:59FromDiscord<Phil (he/him)> Still made a github issue about it, because it's useful to have a general statement about that somewhere out there in the project. Even if it's just the issue.↵If he confirms it is in there, I'd suggest adding a list to the README.md which tools are being used
06:08:04FromDiscord<ringabout> In reply to @leorize "you're running the test": I think it's the issue of testament https://github.com/nim-lang/Nim/actions/runs/7484737856/job/20372040352?pr=23196↵> balls --path=.↵> /bin/sh: 1: balls: not found
06:08:09FromDiscord<ringabout> (edit) "the" => "an"
06:08:55FromDiscord<leorize> I think it's just that nimble binary folder is not in PATH
06:10:33FromDiscord<zectbumo> In reply to @Elegantbeef "Speaking of <@157415492812800000> need": I'm playing with it now. recompiling differences and changing tests. I'm now believing that I'm not sure I fully understand what I asked for and what was done.
06:20:34FromDiscord<zectbumo> I'm not entirely sure `t = a.sym.ast.typ` is correct since it's getting the type of the sym(bol?) and not the enum value type(?)
06:22:02FromDiscord<Elegantbeef> Instantiated statics change their symbol's type
06:22:42FromDiscord<Elegantbeef> I mean the code worked in the examples provided
06:23:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:24:42FromDiscord<Elegantbeef> `T.ast` may also worl
06:24:44FromDiscord<Elegantbeef> work\
06:24:55FromDiscord<zectbumo> okay so what I'm seeing is if I call `test[Stdout]()` then `echo T` says Stdout.↵but if I use the default method `proc test[T:Files = Stdout]()` and call it `test()` then `echo T` says `Files`
06:25:18FromDiscord<zectbumo> (edit) "okay so what I'm seeing is if I call `test[Stdout]()` then `echo T` says Stdout.↵but if I use the default ... method" added "type"
06:25:27FromDiscord<Elegantbeef> Can your provide the code example again?
06:27:03FromDiscord<zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:27:29FromDiscord<Elegantbeef> You didnt write `static`
06:27:36FromDiscord<zectbumo> which I thought, would ... oh
06:28:04FromDiscord<zectbumo> `static Stdout`? still `Files`
06:28:20FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:28:26FromDiscord<Elegantbeef> Works fine
06:28:35FromDiscord<Elegantbeef> `= ...` was unimplemented to it appears one also needs to implement a check there
06:28:47FromDiscord<zectbumo> okay. that works. I see
06:28:59FromDiscord<zectbumo> static Files, what does that do?
06:29:13FromDiscord<Elegantbeef> Forces files to be a static value
06:29:38FromDiscord<Elegantbeef> Actually in hindsight that's a non issue Nim allows passing values where types would be
06:29:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:30:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:30:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:30:49FromDiscord<zectbumo> that's what I thought, but I'm not sure I can make sense of it
06:31:22FromDiscord<Elegantbeef> `T: Files` is just a generic parameter that expects a type
06:31:36FromDiscord<Elegantbeef> `T: static Files` says "This is a generic parameter that expects static value"
06:34:16FromDiscord<zectbumo> so how do you write:↵`proc testG[T: static Files | int = Stdout] =`
06:34:29FromDiscord<Elegantbeef> `static[Files or int]`
06:34:34FromDiscord<Elegantbeef> If that compiles
06:34:37FromDiscord<arathanis> Beef, did you find anything about `strictDefs` from my code snippet earlier?
06:35:48FromDiscord<Elegantbeef> Nope I only looked at the example
06:35:54FromDiscord<zectbumo> testG() works but testG[int]() gets error `Error: cannot instantiate: 'testG[int]'`
06:35:55FromDiscord<Elegantbeef> I expected it to work, did it work with `let`?
06:36:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:36:24FromDiscord<arathanis> I didn't check with let, thought I would have to refactor it w/ let cause of scoping rules
06:36:35FromDiscord<zectbumo> oh right, I didn't give it a static int
06:36:37FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:36:57FromDiscord<arathanis> It mostly seems like it doesn't consider `try-except` blocks correctly in the analysis for determining if assignment is done
06:37:01FromDiscord<Elegantbeef> These are all nice test cases I hope to see you colesce into a proper test
06:37:05FromDiscord<arathanis> I even tried raw `except` to capture everything
06:37:32FromDiscord<zectbumo> so earlier, I meant, how do I give it either a static Files or int type. oh, maybe that is mixing types
06:37:33FromDiscord<Elegantbeef> You might need a `{.noReturn.}` inside the except, do not recall though if that can be used on code blocsk
06:37:54FromDiscord<arathanis> I can experiment with that. What is the proper way to declare that?
06:38:11FromDiscord<Elegantbeef> Ah sorry it only is for procs
06:38:55FromDiscord<Elegantbeef> Actually yea I now remember using `strictdefs` with `let` and just manually assigning it inside of my code
06:41:04FromDiscord<Elegantbeef> It's silly that you can have try except expressions but not strict defs + try except
06:47:12FromDiscord<zectbumo> is there a way in the docs to show me all procs that have the first argument type File?
06:48:42FromDiscord<Elegantbeef> Nope
06:48:59FromDiscord<zectbumo> sounds like another feature I need to build 😛
06:50:48FromDiscord<leorize> it used to exist I think
06:51:06FromDiscord<zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html>
06:51:26FromDiscord<Elegantbeef> `stdout` is not a a static value
06:51:44FromDiscord<Elegantbeef> Generic parameters have to be compile time constants
06:51:53FromDiscord<zectbumo> ok
06:52:20FromDiscord<zectbumo> what I probable want is FileHandle then
06:52:26FromDiscord<zectbumo> (edit) "probable" => "probably"
06:52:52FromDiscord<Elegantbeef> I mean you can just use an `static range[0..2]` and then do `cast[FileHandle]` and write to it
06:53:10FromDiscord<zectbumo> I'll try that
06:57:28FromDiscord<zectbumo> In reply to @leorize "it used to exist": that's what I thought too
07:21:59*PMunch joined #nim
07:32:49*advesperacit joined #nim
07:48:27FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=html>
07:48:52FromDiscord<gyatsoyt> i only have 2 brain cells left now
07:49:16*synaps3 joined #nim
07:58:19FromDiscord<pmunch> sent a code paste, see https://play.nim-lang.org/#ix=html>
07:59:00FromDiscord<pmunch> (edit)
07:59:14FromDiscord<pmunch> @gyatsoyt, something like that?
08:01:05FromDiscord<gyatsoyt> yea
08:01:16FromDiscord<gyatsoyt> tyy
08:02:23FromDiscord<odexine> slightly wrong i believe
08:02:41FromDiscord<odexine> indentation wrong after the first stdout.write
08:03:27FromDiscord<gyatsoyt> In reply to @odexine "indentation wrong after the": fixed it myself
08:03:45PMunchAh, yes. That's what I get for manually trying to fix the indent :P
08:06:32FromDiscord<ca_lobo_14153> Can anyone tell me where nim is pulling the configs from when compiling? I seem to get an extr 'lib' when it tries ot open the '/usr/lib/nim/system.nim' file... '''dietpi@DietPi:~$ nim c -d:ssl ./downloadAndParse.nim ↵Error: cannot open '/usr/lib/nim/lib/system.nim' '''
08:07:42FromDiscord<ca_lobo_14153> (edit) "Can anyone tell me where nim" => "sent a long message, see <!doctype html> <html lang=en> <head> <meta charset=utf-8> <title>&nbsp;</title> </head> <style> body { font-family: monospace; margin: 2em; } </style> <body> <p>ix.io" | "pulling the configs from when compiling?" => "taking a break &#127867;</p>" | "I seem to get an extr 'lib' when it tries ot open the '/usr/lib/nim/system.nim' file...
08:08:03FromDiscord<ca_lobo_14153> (edit) "long message," => "code paste," | "<!doctype html> <html lang=en> <head> <meta charset=utf-8> <title>&nbsp;</title> </head> <style> body { font-family: monospace; margin: 2em; } </style> <body> <p>ix.io is taking a break &#127867;</p> <img src="/underconstruction.gif" width="200px"> </body> </html>" => "https://play.nim-lang.org/#ix=html>"
08:08:17PMunchWell the `nim/lib/system.nim` part is typically correct
08:08:25PMunchIt seems like you have installed Nim incorrectly
08:09:28PMunchAnd Nim prints out the configs it uses while compiling
08:09:30FromDiscord<ca_lobo_14153> yep... built v2.0.2 and installed/uninstalled twice... once for /usr/local/bin and again for /usr/bin I've review the install.sh file and it seems to be correct... hence the question
08:09:56PMunchI would highly recommend installing via Choosenim
08:10:17FromDiscord<leorize> are you using the Debian package?
08:10:19FromDiscord<ca_lobo_14153> I would except Odroid N2+ is not a supported arch
08:10:52PMunchYou could certainly put these files in unconventional places and get Nim to work, but there are many third party tools which expect things to be in certain places
08:11:00PMunchAh, that's a shame
08:11:53FromDiscord<leorize> what arch is odroid n2+?
08:12:07FromDiscord<leorize> if it's arm then nightlies got binaries
08:12:14FromDiscord<ca_lobo_14153> previous used Debian 1.0.xx ARM64
08:12:23FromDiscord<leorize> and, uh, don't ever use install.sh
08:12:35FromDiscord<leorize> it doesn't work and will always give you broken nim
08:12:43FromDiscord<MDuardo> I use the `nim` package from the repos↵It works fine
08:12:49FromDiscord<ca_lobo_14153> ok... that's the problem then leorize... 🙂
08:12:59FromDiscord<ca_lobo_14153> I used install.sh to install...
08:13:05FromDiscord<leorize> just unpack the nightlies archive and add the bin folder to PATH
08:13:11FromDiscord<leorize> no magic required
08:13:20FromDiscord<MDuardo> Yeah, easy
08:14:09FromDiscord<ca_lobo_14153> ok I will try that tommorrow... thanks for the pointer... can someone "fix" the install instructions on nim-lang to prevent newbies like me from going off into the weeds with install.sh?
08:14:14FromDiscord<MDuardo> Or if you regret, see the bash script and deleted whatever it put on your computer and install Nim with a normal executable
08:15:19FromDiscord<MDuardo> Maybe open a discussion on GitHub?
08:16:29synaps3hi all, decided to try nim
08:17:29FromDiscord<odexine> welcome
08:17:45FromDiscord<Phil> Cheers
08:18:40FromDiscord<albassort> we are here to help :)
08:19:39*jjido joined #nim
08:31:57*synaps3 quit (Quit: WeeChat 3.0)
08:31:59FromDiscord<MDuardo> Ask right away
08:33:10*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
08:39:39FromDiscord<ca_lobo_14153> Ok opened a bug in Nim on install.sh....
08:40:16FromDiscord<ca_lobo_14153> question regarding Choosenim support - there doesn't seem to be much maintenance on choosenim these days...
08:40:45FromDiscord<leorize> dom left nim so all of their projects are now unmaintained
08:41:05FromDiscord<leorize> and no one stepped up to continue the work
08:41:05FromDiscord<ca_lobo_14153> is it worth opening an issue for the following....
08:41:07FromDiscord<Phil (he/him)> I can only state how it works for me on arch Linux\: Without issue over the last \~2 years I think.↵Swapping between devel and stable "just worked"
08:42:31FromDiscord<ca_lobo_14153> ok, I will not bother then... @Phil how do you swap?
08:42:44FromDiscord<ca_lobo_14153> my OS/Arch are :
08:42:45FromDiscord<MDuardo> I believe it could be solved just by adding the binary to the home directory in .bashrc↵(@ca_lobo_14153)
08:43:21FromDiscord<ca_lobo_14153> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:43:47FromDiscord<Phil (he/him)> I typically just use `choosenim devel`, `choosenim stable`, `choosenim 1.6.10`, `choosenim update devel`, `choosenim update stable`
08:44:17FromDiscord<Phil (he/him)> choosenim jumps to that version.↵↵choosenim update x in the case of devel and stable will update what you currently have to the most recent devel/stable versions
08:47:30PMunchYeah I think the main reason no-one has stepped in to take over choosenim is because it "just works"
08:47:59FromDiscord<ca_lobo_14153> LOL... in my case... just works = " not supported"
08:48:00PMunchIf it stops working I'll likely fork it myself
08:48:11PMunchWell yeah, the no support issue isn't great
08:48:29PMunchBut I think that's just a matter of there not being binaries built by the Nim CI
08:49:12FromDiscord<ca_lobo_14153> problem isn't the binaries... I built it and all the test passed... issue is the install is FUBAR'd
08:49:31PMunchWell yes, but that's not a choosenim issue
08:50:39FromDiscord<Phil (he/him)> ~~Lets provide a nim snap so it can compile on all systems~~
09:26:27FromDiscord<bigcatnova> how do i make a design a gui in nim
09:26:32FromDiscord<bigcatnova> (edit) "a" => "and"
09:27:17FromDiscord<Elegantbeef> You can use owlkettle if you want to use GTK, there are some QT libraries for qml and QT 6
09:27:31FromDiscord<Elegantbeef> You can also use webui and similar packages if you are that disposition
09:28:31FromDiscord<bigcatnova> In reply to @Elegantbeef "You can use owlkettle": thanks ill use owlkettle
09:29:28FromDiscord<bigcatnova> is it native though? if someone wants to use my compiled nim program with a gui, do they need to install anything beforehand
09:29:33FromDiscord<bigcatnova> (windows 10/11)
09:29:59FromDiscord<Elegantbeef> You'd have to ship gtk with it
09:30:01FromDiscord<Elegantbeef> Or statically link it
09:30:24FromDiscord<bigcatnova> ok thanks
09:30:52FromDiscord<Elegantbeef> No clue how easy it is to statically link it on windows I know it's annoying to link GTK from linux to windows
09:32:06FromDiscord<MDuardo> I heard from GTK devs that it's a bit painful to make GTK to work on Windows
09:32:21FromDiscord<Elegantbeef> It's not that difficult to make it work
09:32:46FromDiscord<Elegantbeef> Think they only ship their stuff with msys though
09:33:29FromDiscord<bigcatnova> so its more than just dlls required?
09:33:34FromDiscord<Elegantbeef> https://can-lehmann.github.io/owlkettle/docs/installation.html
09:33:37FromDiscord<Elegantbeef> Not for usuers
09:33:38FromDiscord<Elegantbeef> users\
09:33:54FromDiscord<Elegantbeef> For developers you follow the installation guide
09:34:52FromDiscord<Phil> What can RickBaretto say, except, you're welcome
09:35:12FromDiscord<bigcatnova> In reply to @Elegantbeef "For developers you follow": okay i got it now
09:36:11FromDiscord<MDuardo> Just like when you need to download some stuff on Cargo when you build Rust projects↵↵Binaries are clean and dependency free
09:36:29FromDiscord<Elegantbeef> Well they're not dependency free since they depend on gtk 😛
09:37:25FromDiscord<Elegantbeef> You need to statically link to gtk to make the dependency free but that also means gpl would like a word
09:37:25FromDiscord<Elegantbeef> them\
09:37:33FromDiscord<bigcatnova> is there a better library for gui development in nim? owlkettle doesnt seem great for windows users
09:38:11FromDiscord<loloof64> Hi ! I'm having an issue in a Nim+WebUi project. The fact is that I get a runtime error, but it does not help me to debug : even using gdb it's worse. If I can I'll create a thread in order to give more details
09:38:15FromDiscord<Elegantbeef> https://nimble.directory/search?query=ui
09:38:37FromDiscord<Elegantbeef> Do you have a minimum reproduction of your issue?
09:38:41FromDiscord<bigcatnova> In reply to @Elegantbeef "https://nimble.directory/search?query=ui": oh thanks
09:40:41FromDiscord<MDuardo> I've never tried to make an GUI outside a browser↵↵I will try Owlkettle tomorrow
09:40:53FromDiscord<Elegantbeef> It's a very nice library imo
09:40:57PMunchbigcatnova, Gtk should be fine for Windows users
09:41:09FromDiscord<Elegantbeef> @loloof64 just ask your question here
09:41:36FromDiscord<loloof64> Yes thank you, otherwise I've found how to create a thead.
09:42:15FromDiscord<Elegantbeef> The Nim community is spread across multiple chats so discord threads will only get a subset of eyes on
09:42:36FromDiscord<loloof64> Thank you, so I'm creating a project in Nim with WebUI, with the following main code
09:43:01FromDiscord<loloof64> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:43:42FromDiscord<loloof64> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:44:23FromDiscord<loloof64> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:45:21FromDiscord<Elegantbeef> I do not have the toml so I'm also getting a SIGSEGV 😄
09:45:30FromDiscord<Elegantbeef> But that aside it works fine on my OS
09:45:30FromDiscord<loloof64> I guess it is something related to the Toml.loadFile call, but I don't know exactly how to solve it. Indeed the file does not exists for now, but I've tried to try/catch.
09:45:42FromDiscord<Elegantbeef> You cannot try catch nil refs
09:45:46FromDiscord<loloof64> ok
09:45:52FromDiscord<loloof64> thanks I understand better
09:45:55FromDiscord<Elegantbeef> Check if the file exists first
09:46:07FromDiscord<loloof64> yes, thank you 🙂
09:46:26FromDiscord<Elegantbeef> But the code likely should not crash if the file does not exist
09:47:05FromDiscord<Elegantbeef> I'd suggest making a min reproduction of the error and submitting to the tomlserialisation repo
09:47:27FromDiscord<loloof64> Yes, thank you 🙂
09:47:33FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:47:55FromDiscord<griffith1deadly> (edit)
09:48:00FromDiscord<loloof64> Thank you. I'll try this way 🙂
09:48:06FromDiscord<griffith1deadly> (edit)
09:48:13FromDiscord<griffith1deadly> (edit)
09:48:20FromDiscord<griffith1deadly> (edit)
09:48:30FromDiscord<Elegantbeef> Well technically with Nim's new default intialisers you should do `var settings = default GameSettings`
09:49:19FromDiscord<loloof64> Trying right now 🙂
09:49:37FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:49:47FromDiscord<Elegantbeef> This is a tinge funny
09:50:10FromDiscord<nnsee> well, I wanted to fork choosenim, even bought `getnim` domains, but people here told me that someone's already doing that
09:50:14FromDiscord<nnsee> but apparently not
09:50:33FromDiscord<Elegantbeef> gitnim exists
09:50:58FromDiscord<Elegantbeef> http://gitnim.com/ infact
09:51:54FromDiscord<onigirimental> is there some tutorial about sending data to and from C++ with threads or coroutines on both sides?
09:52:27*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
09:52:41FromDiscord<onigirimental> lets say I want gui application thread and some http client thread that will do downloads while gui thread continues handling events
09:52:49FromDiscord<Phil> Like a nim thread sends something to a C++ thread?
09:52:57FromDiscord<onigirimental> yes
09:53:14FromDiscord<onigirimental> and receiveing data back
09:53:30FromDiscord<griffith1deadly> In reply to @onigirimental "lets say I want": then you can use threads and channels, but idk about C++ part
09:54:00FromDiscord<onigirimental> it should be some mutant with high level of emit usage
09:54:17FromDiscord<loloof64> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:55:19FromDiscord<Phil> I have honestly no clue on how to do that.↵I'd honestly keep the code bases separated and have the c++ code run as a process
09:55:26FromDiscord<Phil> Then you can talk to that process via sockets IIRC
09:55:38FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:55:45FromDiscord<loloof64> (edit)
09:55:56FromDiscord<Phil> (edit) "that.↵I'd" => "that @onigirimental .↵I'd"
09:56:24FromDiscord<Elegantbeef> What an oddly specific thing to have a tutorial for 😄
09:56:24FromDiscord<Elegantbeef> If you want to be a pro Nim programmer drop the `return`
09:56:25FromDiscord<Elegantbeef> Also you're not using `path`
09:56:25FromDiscord<Elegantbeef> I feel like any sane person would just wrap the C++ code with a C header and then call that from Nim
09:56:27FromDiscord<griffith1deadly> In reply to @isofruit "Then you can talk": or ipc (pipes)
09:56:56FromDiscord<Phil> That's beyond me, I experimented with inter-process-communication once via sockets and that was in python
09:56:58FromDiscord<Phil> So eh
09:57:22FromDiscord<Phil> I work on inter-thread-communication right now but trying to do that between 2 programming languages seems wild to me, not sure how to achieve that properly
09:57:54FromDiscord<loloof64> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:58:37FromDiscord<loloof64> Oh, just forgot that level has to be -1 and not 0 by default
09:59:07FromDiscord<loloof64> (edit) "Oh, ... just" added "I"
09:59:39FromDiscord<Elegantbeef> @onigirimental are you attempting to use a specific library/program or is this just a weird thing you're doing? 😄
10:04:11FromDiscord<loloof64> In fact I plan to communicate with a chess uci engine. And for the GUI part, I'm using WebUi.
10:04:27FromDiscord<loloof64> https://webui.me/docs/2.4/#/
10:04:58FromDiscord<loloof64> https://fr.wikipedia.org/wiki/Universal_Chess_Interface
10:06:31FromDiscord<loloof64> Oups sorry, I did not notice that the previous message was not for me : apologizing
10:13:33FromDiscord<onigirimental> In reply to @Elegantbeef "<@1194940244659810375> are you attempting": I will use pure Nim without additional libraries, xmake as build system and https://github.com/linuxmint/xapp with its system tray functionality
10:16:56PMunchBut why though?
10:17:12FromDiscord<onigirimental> why not?
10:17:25PMunchIt's a cumbersome way to go about things?
10:19:23FromDiscord<onigirimental> my goal is desktop app
10:19:28FromDiscord<onigirimental> there is no other way arount
10:20:11FromDiscord<onigirimental> of course you can do multiple processes, pipes and other stuff, but it's very bad performance-wise and makes cross-compilation a lot harder
10:20:13PMunchUhm, there are many ways of creating apps
10:20:24PMunchAnd doing it manually with emit is about the worst possible one
10:21:02FromDiscord<Elegantbeef> Using Nim as a C++ frontend is a horrifically funny nerdsnipe
10:21:09FromDiscord<mratsim> In reply to @onigirimental "of course you can": Are your users typing at nanoseconds speed?
10:21:39FromDiscord<mratsim> Nim is a better C++ build system, bite me
10:21:39FromDiscord<onigirimental> it's implemented using emit everywhere, you're just using additional abstractions that wont make things easier
10:22:08FromDiscord<mratsim> I replaced cmake with Nim here: https://github.com/mratsim/agent-smith/blob/a2d9251/third_party/ale_build.nim#L65-L83
10:22:59FromDiscord<Phil> ~~nimble task are the best build system, bite me~~
10:23:03FromDiscord<Phil> (edit) "task" => "tasks"
10:23:21PMunchonigirimental, that's like writing stuff in assembly because abstractions won't make things easier.. The whole point of an abstraction is to make something easier
10:23:47PMunchI might just completely misunderstand what you're trying to do, but what I think you're doing is absolutely bonkers
10:24:02FromDiscord<mratsim> In reply to @onigirimental "lets say I want": just use async?
10:24:03FromDiscord<onigirimental> the button in gtkmm is Button, the button in gintro abstraction is Button, what's simpler?
10:24:35PMunchHuh?
10:25:08FromDiscord<onigirimental> @mratsim how nim's async would work with c++?
10:26:01FromDiscord<mratsim> usually you split between compute tasks and IO tasks.↵↵Compute tasks make progress by using your CPU, IO tasks make progress by waiting on data.↵Both http download (waiting on network) and GUI (waiting on user inputs) are about waiting, and multiple threads won't speed anything, the communication overhead actually will make things slower.
10:26:12FromDiscord<Phil> I don't understand the constellation and which bits and bobs are C++ here.↵I'm getting progressively more confused as we talk
10:26:16FromDiscord<mratsim> In reply to @onigirimental "<@570268431522201601> how nim's async": `nim cpp` will compile Nim in C++ mode.
10:26:42FromDiscord<mratsim> now, what's the C++ part of your code?
10:27:36FromDiscord<onigirimental> i don't have any code yet, just searching for examples. We still need Nim primitives to make generated c++ talk with written nim code
10:27:39FromDiscord<Phil> Like, I am working on multithreading and a lib for easy long-running "threadServers"
10:27:56FromDiscord<onigirimental> (edit) "i don't have any code yet, just searching for examples. We still need Nim primitives to make generated c++ talk with written ... nim" added "ASYNC"
10:27:57FromDiscord<Phil> That you can ping with messages and that support async and can do whatever
10:28:10FromDiscord<Phil> And may have their own threadpool for task parallelism
10:28:26FromDiscord<Phil> But I can't imagine how C++ interop would work
10:28:55FromDiscord<Phil> C++ would need to be passed a ptr to a channel and understand the channel implementation, which sounds already too far fetched to me
10:29:13FromDiscord<onigirimental> but one thing i can tell for sure is that gtk has it's own thread
10:29:24FromDiscord<Phil> gtk has its own thread and its own tools for parallelism
10:29:44FromDiscord<Phil> Strictly speaking, if you use gtk you shouldn't even be using nim tools for multithreading unless gtk has no abstraction
10:29:49FromDiscord<mratsim> In reply to @onigirimental "i don't have any": Nim calls C++ or C++ calls Nim?
10:29:59FromDiscord<Q-Master> just write a nim proc which will put something to channel↵(@Phil)
10:30:00FromDiscord<Phil> GTK provides procs to dispatch tasks and has its own GAsyncQueue
10:30:52FromDiscord<onigirimental> In reply to @mratsim "Nim calls C++ or": both. nim calls c++ to start gui thread; gui thread calls Nim sending some data on user input events; nim thread does some downloads to c++ thread to update gui
10:31:24FromDiscord<Phil> Then use GAsyncQueue, spawn your own thread with a while-loop that polls GAsyncQueue or sth
10:31:26FromDiscord<onigirimental> the main function is on nim's side
10:31:56FromDiscord<mratsim> In reply to @onigirimental "both. nim calls c++": write a queue in either C++ or Nim, write the header for C++, write a wrapper for Nim (if the queue was written in C++)
10:32:10FromDiscord<Phil> In reply to @mratsim "write a queue in": Since GTK comes with a queue for that I'd suggest using that
10:32:18FromDiscord<mratsim> In reply to @isofruit "Since GTK comes with": yes fair enough.
10:32:21FromDiscord<Phil> No need to reinvent the wheel if your car already comes with some
10:32:40FromDiscord<mratsim> In reply to @isofruit "No need to reinvent": _reinventing the wheel since 2017_
10:33:07FromDiscord<Phil> if your car already comes with some
10:33:11FromDiscord<onigirimental> car is definitely not designed for writing bindings for its parts)
10:33:15FromDiscord<Phil> Plenty of cars without wheels out there
10:33:26FromDiscord<mratsim> In reply to @isofruit "*if your car already": Nim used to have std/threadpools 😉
10:33:44FromDiscord<Phil> Yeh and now we have like 3 libs with subtle differences for the same 😛
10:34:31FromDiscord<mratsim> I'm writing a weave-io though I will likely rename it, because the dash becomes underscore
10:35:34FromDiscord<mratsim> for now it lives here: https://github.com/mratsim/weave-io↵↵I need to change the worker queues to FIFO for fairness and latency↵I also need to add a global queue on top for tasks that comes from any threads.
10:36:19FromDiscord<mratsim> Then I will look into dealing with blocking tasks like reading from stdin, might have a dynamic pool of threads, unsure yet on how to detect blocked threads or long-running threads.
10:36:48FromDiscord<mratsim> or maybe just provide a `spawnBlocking` for tasks that will be stuck
10:37:31FromDiscord<ieltan> very interesting stuff for the curious: https://github.com/blackmius/uasync
10:37:52FromDiscord<ieltan> it's async/await based on io_uring 🙂
10:40:57FromDiscord<Phil> In reply to @mratsim "I'm writing a weave-io": Looking forward to eventually using it with threadbutler
10:41:13FromDiscord<Phil> Once, in the far future, when all of the tech-stack I need to rely on is correct and safe
10:44:22FromDiscord<kiloneie> In reply to @isofruit "Yeh and now we": Yeah that was me confused a few days ago...
10:47:03Amun-Rais using emit the only way to catch JS exception?
10:55:57FromDiscord<9ih> how ass of an idea is it to use Nim for graphics programming (game engine type beat)?
10:56:08FromDiscord<9ih> or is that quite reasonable
10:58:46PMunchI'd say it's quite reasonable
10:59:15PMunchMight even go as far as to say it's a great idea
10:59:33FromDiscord<Clonkk> Well I know there are bindings to Raylib, Godot and Unreal.out there. I think Beamdog has developed and shipped game using Nim AFAIK↵(@9ih)
11:00:23FromDiscord<9ih> I just have an awfully specific use case that I wanted to use C for, but alas C graphics development on Windows is a bit of a strange business, especially since I want to get emscripten involved
11:01:14FromDiscord<9ih> but with the way that Nim has JS as a target natively and I don't need to worry about including libraries like ICU (I think Nim has good unicode support?), I think it's looking like a good option right now
11:02:21Amun-RaI'm writing image viewer port for js target (using canvas)
11:02:47FromDiscord<griffith1deadly> In reply to @9ih "I just have an": naylib then or sokol-nim
11:03:04PMunch@Clonkk, wait what?
11:03:06FromDiscord<griffith1deadly> both support emscripten as i recall
11:04:06FromDiscord<9ih> well chances are I won't need emscripten with nim
11:04:09PMunchI have heard that they have used some Nim for internal tools and such, but have they actually released a game written in Nim?
11:04:33FromDiscord<9ih> since I can just choose between webgl bindings or opengl bindings backend surely
11:04:39FromDiscord<9ih> (edit) "since I can just choose between webgl bindings or opengl bindings backend ... surely" added "depending on the target"
11:04:46FromDiscord<9ih> and then compile to C or JS
11:07:42Amun-Rathat's how I catch js exceptions in js target: https://dpaste.com/H4FEMRNEY; I think I'll write a proper macro/template for that
11:12:19FromDiscord<mratsim> In reply to @Clonkk "Well I know there": Beandog has shipped tooling for NeverwinterNights but the game is not in Nim, unless there is another game I'm not aware of?↵↵https://github.com/niv/neverwinter.nim
11:12:26FromDiscord<mratsim> (edit) "Beandog" => "Beamdog"
11:14:46PMunchWell they do appear to have a new game out..
11:17:07FromDiscord<ieltan> anyone has ressources on wrapping c libraries that does their own async ?
11:19:12PMunchI mention it briefly here: https://peterme.net/wrapping-c-libraries-in-nim.html
11:21:16PMunchAnd the bindings from that article can be found here: https://github.com/PMunch/libcoap
11:22:12PMunchIt's mostly a matter of manually creating Futures and registering the file handles with the async runtime
11:23:32FromDiscord<ieltan> alright, thanks ! 🙂
11:23:39PMunchhttps://github.com/PMunch/libcoap/blob/master/src/coap.nim#L231-L244
12:01:18*azimut joined #nim
12:02:58*azimut quit (Remote host closed the connection)
12:03:34*azimut joined #nim
12:09:12FromDiscord<Phil> Alrighty, finally on lunchbreak
12:09:35FromDiscord<Phil> In reply to @onigirimental "car is definitely not": Out of curiosity, looked at GAsyncQueue yet?
12:10:00FromDiscord<Phil> For message queue between the GTK-eventloop happening in your C++ code and the planned thread-"server" in nim for sending messages to?
12:11:13_________Amun-Ra: you can catch the exception in nim, like this: https://paste.gg/p/anonymous/d4958e8819f140dea8b2f30e0e30a9a8
12:32:32*jjido joined #nim
12:45:19*rockcavera joined #nim
13:07:25FromDiscord<nnsee> btw Phil I solved the problem I had last night with Prologue
13:08:03FromDiscord<nnsee> it was a gcsafe-related error, adding the gcsafe pragma explicitly to my callback made the compiler actually spit out an actionable error that wasn't nonsense
13:15:18*casaca joined #nim
13:17:44FromDiscord<Phil> Oh crap did I entirely forget about your problem?
13:17:55FromDiscord<Phil> Sorry, I have goldfish memory
13:18:15FromDiscord<Phil> (edit) "Sorry, I have goldfish memory ... " added "when I'm on sth else"
13:18:36FromDiscord<Phil> Basically turns me into a 50:50 coinflip machine on if I'll remember sth that occurred while I was on tunnelvision
13:21:39*mronetwo joined #nim
13:21:49*mhcat joined #nim
13:22:55*noeontheend joined #nim
13:24:06*adigitoleo joined #nim
13:24:28*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
13:42:07*noeontheend quit (Ping timeout: 260 seconds)
13:42:35*mronetwo quit (Ping timeout: 260 seconds)
13:42:46*adigitoleo quit (Ping timeout: 258 seconds)
13:43:02*casaca quit (Ping timeout: 268 seconds)
13:43:03*mhcat quit (Ping timeout: 260 seconds)
13:51:32*mhcat joined #nim
13:51:37*noeontheend joined #nim
13:51:45FromDiscord<nnsee> In reply to @isofruit "Oh crap did I": it's fine, you seemed busy
13:51:54*mronetwo joined #nim
13:51:57*adigitoleo joined #nim
13:56:11*adigitoleo quit (Ping timeout: 258 seconds)
13:56:13*mronetwo quit (Ping timeout: 264 seconds)
13:56:18*noeontheend quit (Ping timeout: 260 seconds)
13:56:52*mhcat quit (Ping timeout: 276 seconds)
14:04:51Amun-Ra_________: JsError, I'm going to give it a try, thanks :)
14:18:42FromDiscord<nnsee> In reply to @isofruit "Oh crap did I": you can still help me - i'm being dumb with threads and i don't know how to fix it
14:19:22Amun-Ra_________: works like a charm :)
14:26:19FromDiscord<Phil> In reply to @nnsee "you can still help": Ping me in an hour post work
14:43:04FromDiscord<onigirimental> In reply to @isofruit "Out of curiosity, looked": i will implement gtk-independent solution based on iso c or c++
14:43:31FromDiscord<onigirimental> or even wrap nim's async things to be callable from c
14:45:30FromDiscord<Phil> I don't think we have an AsyncQueue yet 😄
14:45:52FromDiscord<Phil> I only suggested GAsyncQueue because I think it makes the most sense - Your C++ wrapper for GTK likely already knows it and very likely so will gintro
14:46:06FromDiscord<Phil> And even if not, writing your own bindings to it should be a thing of 10 minutes
14:46:23FromDiscord<Phil> For a comparatively complex component you'd otherwise need to invest some considerable testing for
14:46:32FromDiscord<Phil> That's a pretty hefty tradeoff in your favour
14:46:54FromDiscord<onigirimental> https://nim-lang.org/docs/system.html#Channel
14:46:55FromDiscord<Phil> (edit) "That's a pretty hefty tradeoff in your favour ... " added "by just using somebody else's stuff. Particularly from somebody that you already depend on anyway"
14:47:15FromDiscord<Phil> In reply to @onigirimental "https://nim-lang.org/docs/system.html#Channel": Yeah but that's only going to work by either blocking or polling
14:47:45FromDiscord<onigirimental> this is exactly what synchronization primitive should do
14:47:50FromDiscord<Phil> And I don't think it's too crazy to use GAsyncQueue since I think your c++ should already have access
14:52:16FromDiscord<Phil> In reply to @onigirimental "this is exactly what": I guess I just also want a "push" solution 😄
14:54:04FromDiscord<onigirimental> mutex with array of items will do, just don't lock it for too much
14:54:38FromDiscord<Phil> I mean, that's still a "pull" solution where you poll the queue
14:54:54FromDiscord<Phil> I was more thinking a "push" solution where the queue has a callback to execute on your thread when a message arrives
14:54:55FromDiscord<onigirimental> from other side you push
14:55:42FromDiscord<leorize> you can just write this part yourself on top of any queue \:p↵(@Phil)
14:55:45FromDiscord<onigirimental> callback is executed when one of threads lock the queue and takes value
14:55:59FromDiscord<Phil> In reply to @leorize "you can just write": mratsim already offered to blatantly steal from him
14:57:25FromDiscord<onigirimental> i'm doing things my wrong way anyway, i believe emit is the best interop
14:58:41FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html>
15:01:26FromDiscord<leorize> that means you have a memory corruption and should use address sanitizer
15:02:12FromDiscord<griffith1deadly> fun
15:11:04FromDiscord<requiresupport> how do define when chronos is used for async and when asyncdispatch is used in your code. If i want to support both
15:18:03*PMunch quit (Quit: Leaving)
15:18:38FromDiscord<bigcatnova> does dimscord support slash commands
15:19:28FromDiscord<griffith1deadly> In reply to @bigcatnova "does dimscord support slash": yes
15:20:15FromDiscord<griffith1deadly> https://github.com/ire4ever1190/dimscmd?tab=readme-ov-file#slash-commands
15:21:52FromDiscord<bigcatnova> thanks
15:23:46FromDiscord<nnsee> something is seriously fucked up with my async postgres connection pool and i don't know what
15:24:05FromDiscord<nnsee> every sql request has a delay of almost exactly 1 second in each async procedure
15:25:33FromDiscord<bigcatnova> what is the asterisk () used for in variable definition
15:25:44FromDiscord<nnsee> for exporting them
15:25:50FromDiscord<bigcatnova> like this `var variable: string = ""`
15:25:52FromDiscord<nnsee> so if you `import` it from another module, you can access them
15:25:57FromDiscord<bigcatnova> In reply to @nnsee "so if you `import`": ohh
15:27:20FromDiscord<Robyn [She/Her]> In reply to @nnsee "every sql request has": Sounds odd...
15:29:25FromDiscord<nnsee> i'm sure it's some polling going haywire somewhere but i have no clue what i'm looking for exactly
15:31:23FromDiscord<nnsee> maybe i should just ditch the async connection pool and just create one connection for each thread
15:31:29FromDiscord<nnsee> and use db_connector directly
15:36:46FromDiscord<Robyn [She/Her]> Go ahead if you think that's the best idea
15:49:16FromDiscord<nnsee> it just seems like a lot of overhead for barely any benefit at this scale
15:58:10FromDiscord<Phil> Oh wow, work took a bit, alrighty now I'm available
15:58:57FromDiscord<Phil> In reply to @requiresupport "how do define when": Generally chronos usage should be indicated via the chronos flag.
15:59:02FromDiscord<Phil> Asyncdispatch actually mentions that one
15:59:07FromDiscord<Phil> Let me go look for it
15:59:23FromDiscord<Phil> https://nim-lang.org/docs/asyncdispatch.html#multiple-async-backend-support
16:00:20FromDiscord<Phil> sent a long message, see <!doctype html>
16:01:26FromDiscord<Phil> In reply to @nnsee "i'm sure it's some": Okay, you had a thread thingy
16:02:53FromDiscord<Phil> In reply to @requiresupport "how do define when": Note, if you want to provide users the option to use both std/asyncdispatch and chronos, then you need to basically have the same module 2 times:↵once for chronos, once for asyncdispatch, and both need to be able to coexist side by side
16:03:00FromDiscord<Phil> (edit) "In reply to @requiresupport "how do define when": Note, if you want to provide users the option to use both std/asyncdispatch and chronos, then you need to basically have the same module 2 times:↵once for chronos, once for asyncdispatch, and both need to be able to coexist side by side ... " added "if imported in the same module"
16:03:26FromDiscord<Phil> (edit) "In reply to @requiresupport "how do define when": Note, if you want to provide users the option to use both std/asyncdispatch and ... chronos,the" added "chronos (because e.g. one lib forces them to use" | "chronos (because e.g. one lib forces them to usechronos, ... then" added "the other std/asyncdispatch),"
16:03:51FromDiscord<requiresupport> In reply to @isofruit "Note, if you want": oh I thought I could have them in the same file but just add a bunch of `when defined...`
16:04:24FromDiscord<Phil> In reply to @requiresupport "oh I thought I": You absolutely can, see the second paragraph of what I posted.↵That just means that if a user is forced to use both otherwise they'll have problems with your lib ^^
16:05:24FromDiscord<requiresupport> so my question is how to use `when defined(...)` so that when a user compiles with `-d:asyncBackend=chronos` it would compile my chronos code
16:06:19FromDiscord<Phil> Generally you can access the value of a "defined" flag, see here:↵https://nim-lang.org/docs/nimc.html#compiler-usage-compileminustime-symbols
16:07:04FromDiscord<nnsee> In reply to @nnsee "maybe i should just": yeah, doing this made everything much, much faster
16:07:34FromDiscord<nnsee> and the code a bit simpler since i no longer have to keep track of the connection index from my connection pool when using transactions (`BEGIN .. COMMIT` etc)
16:11:34FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:11:51FromDiscord<Phil> In reply to @nnsee "yeah, doing this made": Async connection pool?↵Why not just a single connection pool with a lock?
16:12:08FromDiscord<requiresupport> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:13:49FromDiscord<nnsee> In reply to @isofruit "Async connection pool? Why": a combination of the fact that i had already created an async connection pool when i realized that prologue creates `nproc` amount of threads and each of them gets their own pool, not understanding how gcsafe and threadvar works, etc
16:13:51FromDiscord<nnsee> general stupidity, really
16:14:05FromDiscord<Phil> 😄
16:14:24FromDiscord<Phil> If you want you can take a look at tinypool
16:14:43FromDiscord<Phil> It's what norm's connection pools are based on (albeit norm's are far more flexible)
16:15:07FromDiscord<Phil> In fact you could also use norm's connection pools.↵In the end a connection pool really is just a seq of connections with a lock
16:36:57FromDiscord<maker_of_mischief> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:37:04FromDiscord<maker_of_mischief> https://media.discordapp.net/attachments/371759389889003532/1195043711491510372/17049910239804519.png?ex=65b28e2f&is=65a0192f&hm=a60aa8f8b69bd7cde95220a442bfb27b15ad6b407fc385faa7602045242b9a1f& https://media.discordapp.net/attachments/371759389889003532/1195043711730589797/17049910239804519.png?ex=65b28e2f&is=65a0192f&hm=2b89858cd59e9a4cfaacff0bd59b94b129ad4c5458582edc127e92cf521e8fc8&
16:38:47FromDiscord<maker_of_mischief> does len interact with strings differently based on bytes or something???
16:38:53FromDiscord<maker_of_mischief> does the unicode arrow do it?
16:39:11FromDiscord<maker_of_mischief> oh https://media.discordapp.net/attachments/371759389889003532/1195044246596632576/17049911519932178.png?ex=65b28eaf&is=65a019af&hm=00ca70f70cbf990db4e6a2a36ec0c033e914e14e2663cc23c9d35943c0cac6d4&
16:39:17FromDiscord<maker_of_mischief> it was the unicode doing it
16:41:35FromDiscord<Phil> The power of unicode!
17:17:53FromDiscord<MDuardo> sent a code paste, see https://play.nim-lang.org/#ix=html>
17:20:10FromDiscord<Phil> In reply to @MDuardo "How do cleanly end": I mean, typically if nothing happens you juts get exitcode 0 afaik
17:21:37FromDiscord<MDuardo> But can you stop this from happening if you force the program to quit?↵↵SIGINT\: Interrupted by Ctrl-C.↵Error\: execution of an external program failed
17:22:25FromDiscord<Phil> I don't think you can, but I might be wrong here.↵This is more a general question about how to "sense" an interrupt
17:22:47FromDiscord<Phil> It feels like you shouldn't be able to because Ctrl-C should be unstoppable and function independent of the application
17:23:08FromDiscord<Phil> But then again, vim exists and you sure as hell won't get out of that one with CTRL + C
17:25:16FromDiscord<Phil> In reply to @MDuardo "But can you stop": https://nim-lang.org/docs/segfaults.html#c_signal%2Ccint%2CCSighandlerT↵This might be of interest here
17:25:37FromDiscord<Phil> https://stackoverflow.com/questions/17766550/ctrl-c-interrupt-event-handling-in-linux↵Combined with this
17:33:21FromDiscord<MDuardo> sent a code paste, see https://play.nim-lang.org/#ix=html>
17:45:50FromDiscord<bigcatnova> possible to use a custom file description when compiling? windows
17:56:16NimEventerNew thread by jasonfi: 9999999999999999.0 – 9999999999999998.0, see https://forum.nim-lang.org/t/10866
18:03:53*jmdaemon joined #nim
18:10:37*jmdaemon quit (Ping timeout: 264 seconds)
18:12:32*zgasma joined #nim
18:22:43*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
18:24:31*xutaxkamay joined #nim
18:32:06*jmdaemon joined #nim
18:32:44FromDiscord<nnsee> In reply to @isofruit "It *feels* like you": ctrl-c isn't uncatchable at all, it's designed to be catched so the application can cleanly shut down
18:33:04FromDiscord<Phil> In reply to @nnsee "ctrl-c isn't uncatchable at": I mean yeah, I posted sighandler bindings below 😛
18:33:10FromDiscord<Phil> Once I realized that is
18:49:30Amun-RaNim has its own ^C hook handler
18:49:39Amun-Ravide setControlCHook
19:02:58*jmdaemon quit (Ping timeout: 264 seconds)
19:04:19FromDiscord<griffith1deadly> In reply to @griffith1deadly "what could that mean?": fixed by `--d:useMalloc` lol
19:05:17Amun-Ra-d=usemalloc switches nim to use malloc every time nim allocated a memory
19:06:32Amun-Rawithout it the default is mmap
19:07:13FromDiscord<Robyn [She/Her]> In reply to @Amun-Ra "without it the default": I thought it was using Nim's own allocator
19:07:15Amun-RaI mean on posix systems, dunno what's the default on window
19:07:49Amun-RaRobyn: Nim on linux allocates a chunk of memory with mmap and than it allocated parts of it internally
19:07:59Amun-Raallocates*
19:08:33FromDiscord<Robyn [She/Her]> Ah
19:08:50FromDiscord<Robyn [She/Her]> Unrelated to what I said before, but I'm genuinely wondering if I should take another crack at Nim on the JVM
19:09:20Amun-Rais that a thing?
19:09:30Amun-RaI'm currently playing with js target
19:09:37Amun-Raecma one and nodejs one
19:11:56FromDiscord<Phil> Generally -d:useMalloc is a good idea
19:13:24Amun-Ratrue
19:13:44FromDiscord<Phil> If you use multithreading it becomes mandatory
19:13:52FromDiscord<Phil> Because the default allocator isn't race-free
19:14:03Amun-Ranim is very elastic in many fields
19:14:11FromDiscord<Phil> At least it pings up with tsan in some circumstances which -d:useMalloc fixes
19:14:12Amun-Raelastic → flexible (?)
19:22:37FromDiscord<khazakar> In reply to @Amun-Ra "elastic → flexible (?)": sort of yeah
19:24:24Amun-Rain polish "elastyczny" means both
19:24:39FromDiscord<khazakar> W sumie racja 😉
19:24:44Amun-Ra:D
19:25:16FromDiscord<khazakar> Nie spodziewałeś się tego, co? 😄
19:25:26Amun-Ra"góra z górą…" ;)
19:25:31FromDiscord<khazakar> 😉
19:27:43*azimut quit (Ping timeout: 240 seconds)
19:29:20Amun-Rakhazakar: how long have you been writing in nim? :)
19:29:42FromDiscord<khazakar> In reply to @Amun-Ra "<@1068255412840845362>: how long have": Not that long, learning it after python. Then exploring other languages.
19:30:47*azimut joined #nim
19:32:49Amun-Rasame here, more/less
19:33:23Amun-RaI was thinking of starting a project using nim
19:33:34Amun-Raand I finally started one
19:37:19*azimut quit (Ping timeout: 240 seconds)
19:43:10*azimut joined #nim
19:48:38FromDiscord<Robyn [She/Her]> Nope, but it could be↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
19:49:11Amun-Rabut, why? ;)
19:49:41Amun-RaRobyn: btw, I had successfully ported nim program on AmigaOS for m68k cpus :)
19:50:07*azimut quit (Ping timeout: 240 seconds)
19:51:00FromDiscord<Robyn [She/Her]> My only reason would be Minecraft modding \:P↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
19:51:20Amun-Rawe all got different priorieties :)
19:53:07FromDiscord<Robyn [She/Her]> Oh nice!↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
19:54:16*azimut joined #nim
19:55:49*jmdaemon joined #nim
20:07:37*jmdaemon quit (Ping timeout: 264 seconds)
20:19:37*rockcavera quit (Remote host closed the connection)
20:25:10*mahlon quit (Remote host closed the connection)
20:26:31*azimut quit (Ping timeout: 240 seconds)
20:28:25*azimut joined #nim
20:31:45*mahlon joined #nim
20:33:06*rockcavera joined #nim
20:36:12FromDiscord<Robyn [She/Her]> Yeah haha
21:11:47*jmdaemon joined #nim
21:31:43*azimut quit (Ping timeout: 240 seconds)
22:01:43*azimut joined #nim
22:15:26*mahlon quit (Quit: PotatoTech)
22:20:46*mahlon joined #nim
22:46:26*advesperacit quit ()
23:37:31FromDiscord<kiloneie> Is this crashing for anyone else ?↵https://nim-lang.org/docs/hcr.html
23:39:39FromDiscord<mengu> In reply to @kiloneie "Is this crashing for": if you're asking about the web page, no
23:39:51FromDiscord<zectbumo> are you doing the sdl example?
23:39:58FromDiscord<kiloneie> yeh
23:40:28FromDiscord<kiloneie> i got someone else's example via opengl, which worked till i changed vec4 then it crashed on a loop
23:40:44FromDiscord<kiloneie> so i decided to take the official one... i don't even get to see a window
23:41:00FromDiscord<kiloneie> the error is... i can't understand it
23:42:04FromDiscord<kiloneie> "initialier element is not constant" that's mostly what i can read
23:44:17FromDiscord<kiloneie> `note: (near initialization for 'NTIv2EGx6zLiZFblvraKNRmL1cg_.destructor')↵compilation terminated due to -fmax-errors=3.`
23:47:13FromDiscord<kiloneie> hmm i think this was made before ORC, setting mm to refc gets rid of most of the problems, the i got now is "could not load: nimhcr.dll" from what i briefly read, is that in order for hot code reloading to work, it compiles to dll
23:54:28FromDiscord<khazakar> In reply to @kiloneie "hmm i think this": Good candidate for issue at GH I think
23:55:46FromDiscord<kiloneie> possibly, unless someone has a solution in the next 30 minutes before i got to bed
23:55:46FromDiscord<Elegantbeef> I believe HCR does not work with orc
23:55:49FromDiscord<Elegantbeef> Not that it really worked otherwise
23:56:41FromDiscord<kiloneie> from what i've seen it worked(no idea how well...)