<< 15-02-2022 >>

00:04:42*rb quit (Ping timeout: 250 seconds)
00:12:12*rwb joined #nim
00:16:48FromDiscord<abdu> How to declare/define/initialize sequence of array↵i.e. flexible size array of a fixed sizxe array type ?
00:17:19FromDiscord<Elegantbeef> `let mySeq = newSeq[array[size, T]](seqSize)`
00:26:17FromDiscord<Bloss> has anyone tried making exceptions work with --gc:orc in DLLs? i can't even catch them
00:26:55FromDiscord<Elegantbeef> You'd need to catch exceptions inside the dll
00:27:02FromDiscord<Bloss> yeah that's what I'm trying to do
00:27:10FromDiscord<Bloss> it just exits
00:27:47FromDiscord<Elegantbeef> You are trying to catch exceptions the dll is raising right?
00:28:19FromDiscord<Bloss> no
00:28:46FromDiscord<abdu> In reply to @Elegantbeef "`let mySeq = newSeq[array[size,": newSeq is in module what ?
00:28:49FromDiscord<Bloss> I am using try/except inside the DLL, but the except block is never reached, when an exception is raised it just quits entirely
00:28:52FromDiscord<Elegantbeef> I dont think you can catch exceptions across the DLL boundry
00:29:07FromDiscord<Elegantbeef> `newSeq` is a procedure
00:29:17FromDiscord<Bloss> In reply to @abdu "newSeq is in module": system, it is imported by default
00:32:45FromDiscord<Bloss> ok it actually works, i messed up something really simple
01:47:22FromDiscord<hector> In reply to @krisppurg "Well, is it located": Step 1: Stop using Windows
02:05:54FromDiscord<Rika> We don’t know how you installed the compiler
02:06:20FromDiscord<Rika> Uninstall it with information given from the way you installed it
02:06:33*neurocyte0917090 quit (Ping timeout: 252 seconds)
02:22:26NimEventerNew question by pooooky: Compiler throws &#39;no return type declared&#39; even though the function returns, see https://stackoverflow.com/questions/71120422/compiler-throws-no-return-type-declared-even-though-the-function-returns
02:28:46FromDiscord<abdu> sent a code paste, see https://play.nim-lang.org/#ix=3PDO
02:29:10FromDiscord<abdu> (edit) "https://play.nim-lang.org/#ix=3PDO" => "https://paste.rs/0dk"
02:29:25FromDiscord<Elegantbeef> What are you trying to do, that's not valid Nim code in any regard
02:30:27FromDiscord<abdu> (edit) "https://play.nim-lang.org/#ix=3PDQ" => "https://play.nim-lang.org/#ix=3PDP"
02:31:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3PDR
02:39:26*krux02 quit (Remote host closed the connection)
02:40:25FromDiscord<Arathanis> what are the rules for infix procs
02:40:26FromDiscord<Arathanis> (edit) "procs" => "procs?"
02:40:44FromDiscord<Arathanis> im trying to experiment it out but its very hard to determine what kind of proc name can be used as an infix, symbolic only?
02:44:01FromDiscord<ynfle> In reply to @Arathanis "im trying to experiment": Symbolic and div and mod.
02:44:12FromDiscord<ynfle> It talks about it in the manual
02:50:25FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#lexical-analysis-operators
02:53:28FromDiscord<Arathanis> ok, so anything made entirely of the symbols on the Operator characters plus "div" and "mod" explicitly
02:53:37FromDiscord<Arathanis> (edit) "on" => "in"
02:54:52FromDiscord<Elegantbeef> well `mod` `div` `as` `of`
02:54:53FromDiscord<Arathanis> well theres more I guess but I think I get it. I can override the explicit ascii infixes for my own types, or I can define wholly new ones as long as they are composed entirely of operator characters
02:55:03FromDiscord<Arathanis> `in` `notin` `shl` `shr` are in there too
02:55:15FromDiscord<Elegantbeef> `and or not xor shl shr div mod in notin is isnot of as`
02:55:20FromDiscord<Elegantbeef> full list
02:56:18FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3PDW
02:56:25FromDiscord<Elegantbeef> you need backticks
02:56:40FromDiscord<Elegantbeef> All operators require backticks to strop their usage
02:56:43FromDiscord<Arathanis> right cause they are lexicographically special it wont even compile without the backticks
02:56:56FromDiscord<Arathanis> it will think im trying to say `proc in (e: ElemType...)`
02:56:57FromDiscord<Elegantbeef> Yep
02:57:06FromDiscord<Elegantbeef> dont use `in`
02:57:09FromDiscord<Elegantbeef> make a `contains` proc
02:57:11FromDiscord<Arathanis> use contains
02:57:16FromDiscord<Arathanis> and let the in template do its magic
02:57:20FromDiscord<Elegantbeef> Yep
02:57:41FromDiscord<Elegantbeef> Many operators are inferred thanks to template magic
02:57:56FromDiscord<Arathanis> yeah,
02:58:08FromDiscord<Arathanis> i always forget which comparison operator you need to define, is it `>=`?
02:58:19FromDiscord<Elegantbeef> think it's `<`
02:59:13FromDiscord<Elegantbeef> This just reminds me how lovely a small core language really is 😀
02:59:50*arkurious quit (Quit: Leaving)
02:59:53FromDiscord<Elegantbeef> So many things can be done in user space and dont require special support
03:00:02FromDiscord<Arathanis> you are right https://media.discordapp.net/attachments/371759389889003532/942978530638180392/unknown.png
03:00:18FromDiscord<Arathanis> it doesnt mention <=
03:00:26FromDiscord<Arathanis> surely that is an accidently omission
03:00:51FromDiscord<ynfle> Probably
03:01:22FromDiscord<Elegantbeef> PR time for arathanis 😛
03:02:38FromDiscord<Valdar> Is a seq guaranteed to be contiguous?
03:02:52FromDiscord<Elegantbeef> Yes
03:03:16FromDiscord<Valdar> how does it handle .add?
03:03:16FromDiscord<Elegantbeef> @abdu\: thanks to your forum post i can say the answer is `thisStr = str[^3..^1]`
03:03:18FromDiscord<Arathanis> turns out you have to define `<=` as well
03:03:32FromDiscord<Arathanis> so its not omitted by accident
03:03:52FromDiscord<Elegantbeef> if adding a value goes over the capacity it'll allocated and move the sequence to more memory
03:04:11FromDiscord<Elegantbeef> The seq is basically `(len, cap, ptrToData)`
03:04:20FromDiscord<Elegantbeef> if len goes over `cap` it has to realloc
03:04:21FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3PE0
03:05:08FromDiscord<Valdar> Thx Beef. I thought that must be it, but i couldn't find a definitive answer in the docs
03:05:30FromDiscord<Elegantbeef> Yea someone needs to document strings explicitly
03:06:28FromDiscord<ynfle> In reply to @Elegantbeef "Yea someone needs to": @Valdar was talking about seq
03:06:36FromDiscord<Elegantbeef> Strings and seqs
03:06:37FromDiscord<Elegantbeef> Same shit
03:06:54FromDiscord<ynfle> Implementation detail
03:06:54FromDiscord<Elegantbeef> Not documented on their internal data or how they work
03:07:08FromDiscord<Arathanis> sounds like they are implemented in a similar fashion to python collections
03:07:22FromDiscord<Arathanis> as far as len vs cap goes
03:07:24FromDiscord<Elegantbeef> That's how you implement dynamic sized collections
03:07:41FromDiscord<Arathanis> yeah it works out for the best that way
03:07:44FromDiscord<Elegantbeef> There arent really many good alternatives for memory/performance
03:07:51FromDiscord<Valdar> and both strings and seqs are heap, right?
03:07:53FromDiscord<Elegantbeef> Linked lists are god awful 😀
03:07:55FromDiscord<Arathanis> you are trying to find the sweet spot between the two
03:07:56FromDiscord<Elegantbeef> Yes
03:08:09FromDiscord<Arathanis> linked lists are pretty bad until nothing else will do
03:08:14FromDiscord<Arathanis> but until then
03:08:15FromDiscord<Arathanis> they suck lol
03:08:21FromDiscord<Elegantbeef> Anything dynamic tends to be heap allocated
03:08:39FromDiscord<Valdar> 👍
03:08:47FromDiscord<Elegantbeef> Just a nature of how dynamic stuff works
03:08:48FromDiscord<Elegantbeef> \Also why `newSeq` and `newString` are used 😀
03:09:13FromDiscord<Elegantbeef> `new` denotes heap allocation, though it seems the convention is only if the base type allocates
03:09:23FromDiscord<Elegantbeef> Look at tables/hashsets for `init` being used
03:09:38FromDiscord<Elegantbeef> Whatcha doing valdar? 😀
03:09:57FromDiscord<Valdar> how about newSeqOfCap? still heap?
03:11:03FromDiscord<Valdar> Working on a game/engine. Just trying to decide on structuring nodes atm
03:11:04FromDiscord<Elegantbeef> Yep
03:11:15FromDiscord<Elegantbeef> The only difference is that's a given size allocation
03:11:24FromDiscord<Elegantbeef> If you want static heap stuff use `array[Size, T]`
03:11:47FromDiscord<Elegantbeef> You can wrap an array rather quickly for a "growable" collection
03:11:55FromDiscord<Elegantbeef> I thought you were valdar which is why i asked
03:12:08FromDiscord<Valdar> haha, what gave it away?
03:12:22FromDiscord<Elegantbeef> Eh just guessed based off you
03:12:31FromDiscord<Arathanis> `newSeq` and `newString` are there for when you know, or have an idea, of the size but you are going to need but are going to add the data piecemeal right? So you aren't slamming your performance with reallocation/copy
03:12:58FromDiscord<Elegantbeef> What a minute valdar isnt vladar 😀
03:13:01FromDiscord<Valdar> you might have me confused with vladar?
03:13:05FromDiscord<Valdar> yep
03:13:07FromDiscord<Elegantbeef> Yea
03:13:27FromDiscord<Elegantbeef> Thought it was odd you were asking about memory stuff
03:13:43FromDiscord<Valdar> I'm too quiet for anyone to be that perceptive 🙂
03:14:23FromDiscord<Elegantbeef> Yes arath that's the purpose
03:14:37FromDiscord<Elegantbeef> You have a size you think your data will fit in and want to assume that it does
03:14:57FromDiscord<Elegantbeef> This way you dont over allocate unless you really need to in the small cases
03:15:07FromDiscord<Arathanis> or under alloc
03:15:14FromDiscord<Elegantbeef> The issue with heap isnt where it is but when you need to grow it it's slow
03:15:52FromDiscord<Arathanis> so does newSeq allocate a large amount but set the len to 0?
03:15:57FromDiscord<Arathanis> so you just fill in the hugely allocated space?
03:16:07FromDiscord<Elegantbeef> it allocates 64 elements
03:16:10FromDiscord<Arathanis> i guess it initializes to the types default value too
03:16:20FromDiscord<Elegantbeef> well 64 elements by default
03:16:58FromDiscord<Elegantbeef> there is `newSeqUnintialized` if you want to alloc without 0ing
03:17:06FromDiscord<Valdar> so what would be the benefit of using cap?
03:18:31FromDiscord<Elegantbeef> If the size matches perfectly you use the least amount of memory
03:19:14FromDiscord<Elegantbeef> If the size is larger than what you need you never allocate again
03:19:45FromDiscord<Elegantbeef> Like i said the issue with dynamic memory is always growing it, it's a slow process, you have to as the OS for more memory, copy your memory over and then add an entry
03:19:47FromDiscord<Elegantbeef> It's slooooooow
03:20:06FromDiscord<Elegantbeef> Static is almost always better if you can do it
03:21:06FromDiscord<Valdar> yeah, slow is what i'm trying to avoid.
03:21:54FromDiscord<Valdar> ok, that makes sense, if it's larger than I would need...
03:22:20FromDiscord<Valdar> nut I can Never overfill, right. it'll seqfault?
03:22:28FromDiscord<Valdar> but
03:22:36FromDiscord<Elegantbeef> Overfill what?
03:22:40FromDiscord<Valdar> the cap
03:23:02FromDiscord<Elegantbeef> Well if you give a cap larger than your system has memory it'll give you an out of memory message and crash
03:23:36FromDiscord<Valdar> no, i mean if I cap at 100 and try to add 101
03:23:49FromDiscord<Valdar> for example
03:23:59FromDiscord<Elegantbeef> It'll grow the sequence and add the extra one
03:24:03FromDiscord<Elegantbeef> capacity doesnt make it static
03:24:19FromDiscord<Elegantbeef> It just says "allocate precisely this much since i think i need it"
03:24:24FromDiscord<Elegantbeef> it's still just a seq
03:24:57FromDiscord<Valdar> oh, I must have read the docs wrong then
03:25:16FromDiscord<Elegantbeef> Arrays are static sizes and ungrowable
03:25:30FromDiscord<Elegantbeef> Sequences are always growable, but allocate a fixed size and have a fixed growth rate without your intervention
03:26:38FromDiscord<Elegantbeef> like `var a = newSeq[int]()` is going to allocated enough memory for 64 integers
03:26:44FromDiscord<Elegantbeef> allocate\
03:27:11FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3PE4
03:27:31FromDiscord<Elegantbeef> No error since it'll grow on the 65th element to be large enough for 128 element if i recall correctly
03:27:54FromDiscord<Arathanis> sequence can grow until the computer runs out of memory. The point of `newSeq` and `newSeqOfCap` is for when you don't know exactly how much space you need but you have an idea, you can allocate that space and then do what you need with it (copy into it, start processing, etc) without tanking your performance if the seq needs to grow in size which kicks of a realloc -> copy
03:28:03FromDiscord<Elegantbeef> Yep
03:28:23FromDiscord<Elegantbeef> `var data = newSeqOfCap[int](65)` means the above wouldnt allocate more than once, in the first example there are two allocations
03:30:57FromDiscord<Elegantbeef> As is typical "Beef says stuff that confuses more than it helps" 😛
03:31:02FromDiscord<huantian> is there a way I can get strscans to match any one of multiple strings?
03:31:25FromDiscord<Elegantbeef> use a custom matcherr
03:32:12FromDiscord<huantian> k
03:32:34FromDiscord<Elegantbeef> You could also match the pattern then check the string after
03:33:32FromDiscord<Valdar> I KNOW I read somewhere that adding past a cap would cause an error, but it's not in the official docs, so it must have been someone's blog or something. I just tried it and you're right. Works with no error. Thx for clearing that up
03:34:03FromDiscord<Rika> Are you sure you weren’t reading about an array
03:34:05FromDiscord<Arathanis> In reply to @Valdar "I KNOW I read": they were probably talking about arrays
03:34:09FromDiscord<Elegantbeef> Perhaps you're thinking of indexing arrays
03:34:10FromDiscord<Valdar> I'm sure
03:34:20FromDiscord<Elegantbeef> `default(array[3, int])[4]`
03:34:29FromDiscord<Valdar> No, it was def seqofcap
03:34:44FromDiscord<Elegantbeef> Well you were lied to
03:34:53FromDiscord<Valdar> I Was
03:35:18FromDiscord<Valdar> I'll see if I can find it
03:36:32FromDiscord<huantian> does std have something that can split a string into chunks of 3, or perhaps slicerator
03:36:45FromDiscord<Elegantbeef> chunks of 3 what?
03:36:58FromDiscord<huantian> sorry chunks of 3 chars
03:37:13FromDiscord<huantian> eg "abcdef" -> ["abc", "def"]
03:37:20FromDiscord<Rika> Doesn’t (3rd party) itertools have that
03:37:43FromDiscord<Elegantbeef> You'd need to write an iterator but sliecerator does have the `group` macro
03:38:44FromDiscord<Elegantbeef> Itertools is probably the go to then
03:42:47FromDiscord<huantian> 👍
04:06:02*supakeen quit (Quit: WeeChat 3.4)
04:06:31*supakeen joined #nim
05:12:10FromDiscord<evoalg> Rika is right, the itertools lib has "chunked"↵(@huantian)
05:14:39FromDiscord<evoalg> I have no idea if `for x in numbers.chunked(3)` does unnecessary copies ... if it does then "group" from slicerator would be more efficient
05:15:00FromDiscord<Rika> Optimise only when you need to...
05:16:11FromDiscord<Arathanis> Yes, listen to Donald Knuth
05:16:13FromDiscord<Arathanis> (edit) "Knuth" => "Knuth."
05:16:28*wyrd quit (Remote host closed the connection)
05:16:46*wyrd joined #nim
05:17:46FromDiscord<evoalg> it leaves a bad taste in my mouth if it does unnecessary copies ... even python does it right ... so it's reasonable to assume it's doing it efficiently. When I find it's not, it doesn't feel right
05:18:05FromDiscord<huantian> I mean it shouldn’t be too hard to check
05:19:22FromDiscord<huantian> It seems to just be yielding slices in a while loop, that shouldn’t make copies right?
05:19:33FromDiscord<Rika> Whichever you think is best. I will not care if it copies or not until it severely affects my runtime
05:19:45FromDiscord<Elegantbeef> That's the way to live
05:20:06FromDiscord<Rika> If I want speed then sure but usually I don't care
05:20:34FromDiscord<evoalg> I thought the whole point of slicerator lib being made was because slices does make copies instead of iterating?↵(@huantian)
05:20:37FromDiscord<Arathanis> What is the best way to initialize all the the elements of a seq?
05:20:50FromDiscord<Arathanis> Specifically a sequence of arrays
05:20:56FromDiscord<Elegantbeef> `newSeqWith` from sequtils
05:21:22FromDiscord<Elegantbeef> I mean it's one part of slicerator is the non allocating slices
05:22:17FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3PEh
05:22:26FromDiscord<Arathanis> i think newSeqWith is the way im going to do it, but I am wondering if there is a way to do the above
05:22:30FromDiscord<Rika> mitems
05:22:53FromDiscord<Arathanis> lmao i knew about mitems woops
05:26:32FromDiscord<Arathanis> im surprised that newSeq takes len as Natural but newSeqWith uses int
05:33:09termerIs the discord<->irc bridge broken?
05:33:16termercan anyone see this message
05:33:22FromDiscord<Elegantbeef> Yes
05:33:25termerSweet
05:33:31termerdoes anyone have any experience with asyncnet
05:33:44FromDiscord<Elegantbeef> So that means Matrix -\> Discord -\> IRC is working 😛
05:34:02FromDiscord<Elegantbeef> What's the actual question?
05:34:07termerI'm trying to figure out the difference between a natural disconnect and a close(AsyncSocket) call
05:34:17termerBecause a natural close causes recv calls to return
05:34:22termerand close() causes them to hang forever
05:34:42termerthis is making my application hang
05:36:36FromDiscord<Elegantbeef> Wonder if it's the `SafeDisconn`
05:36:43termernot quite sure
05:36:54termerhow would I tell it not to use that
05:37:06FromDiscord<Elegantbeef> `flags = {}`
05:38:13termerOne odd effect this is having is also seemingly making accept(AsyncSocket) hang as well
05:38:16termerit's very very odd
05:38:27termerNope, same effect with no flags
05:38:56termerThere's something messed up with close() I think because the documentation doesn't even line up with the proc definition
05:39:06termerIt doesn't return a Future anymore
05:40:37termerRight now, a call to close(AsyncSocket) will just make everything hang
05:41:02termerincluding unrelated calls like accept(AsyncSocket) on the server accept loop
05:41:41termerActually, I'm going to do some more testing
05:42:04FromDiscord<Elegantbeef> Well the best thing to do imo is make a minimal reproduction
05:42:06termerYup that's what's happening
05:42:09termerAll right
05:59:39FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3PEk
06:05:44FromDiscord<Arathanis> sent a code paste, see https://paste.rs/Eus
06:06:29FromDiscord<Arathanis> (edit) "https://paste.rs/1wF" => "https://play.nim-lang.org/#ix=3PEo"
06:07:13FromDiscord<Arathanis> (edit) "https://play.nim-lang.org/#ix=3PEo" => "https://play.nim-lang.org/#ix=3PEp"
06:08:08FromDiscord<Arathanis> or maybe it does, sometimes it... doesn't
06:08:08FromDiscord<Arathanis> hmm
06:11:25termerElegantBeef https://play.nim-lang.org/#ix=3PEs
06:11:36termerHere is a minimal example of my issue
06:11:57termerThere are two ways I close the socket here, and they both have different side effects
06:12:26termerThe first is an async timers implementation I wrote, which is what I'm using in my real world code
06:12:57termerThe second is an async proc that closes it, and running that with asyncCheck
06:14:38termerUsing the timer, all asyncnet procs that are being `await`ed will hang, including unrelated ones such as accept(AsyncSocket) for the server
06:14:55termerUsing the proc, the entire program will crash due to an OSError with the message "Bad file descriptor"
06:15:10termerThe stack trace only leads to the accept() call, which is confusing
06:15:26termerNot the accept call, sorry
06:15:39termerThe accept loop proc call
06:46:51*rockcavera quit (Remote host closed the connection)
07:02:27termerhttps://forum.nim-lang.org/t/8918
07:02:42termerHere's a thread I made on my issue with more information and attempts
07:02:45FromDiscord<Rika> Moderated
07:02:53FromDiscord<Rika> Prolly need to wait a bit
07:32:43FromDiscord<pietroppeter> Since the mermaids are cool in GitHub and HN I thought nim(ib) should have a say: https://pietroppeter.github.io/nblog/drafts/mermaid_diagram.html
07:43:07FromDiscord<kevin> Is there a Nim alphabetical sort somewhere?
07:43:30FromDiscord<kevin> sorry, numerical sort
07:44:06FromDiscord<kevin> so instead of `4, 400, 5, 512` it should be `4, 5, 400, 512`
07:44:12FromDiscord<Elegantbeef> `std/algorithm`?
07:46:57FromDiscord<Elegantbeef> !eval import std/algorthim; echo [4, 400, 5, 512].sorted
07:46:58NimBotCompile failed: /usercode/in.nim(1, 11) Error: cannot open file: std/algorthim
07:47:11FromDiscord<Elegantbeef> Maybe if i could spell
07:47:14*PMunch joined #nim
07:56:49FromDiscord<kevin> i guess my problem was i needed to `parseInt()` my strings before i tried to `sort()` them 🤷
07:58:01FromDiscord<Elegantbeef> `sortedByIt(it[0])`
07:59:49FromDiscord<haxscramper> In reply to @kevin "i guess my problem": you can supply custom comparator function
08:00:04FromDiscord<haxscramper> `sort(theArray) do(a, b: string)`
08:00:47FromDiscord<haxscramper> https://nim-lang.org/docs/manual_experimental.html#do-notation
08:01:36FromDiscord<haxscramper> sadly `do` does not work like `->` from sugar, so you still have to spell the argument types
08:15:43*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
08:19:08*jmdaemon joined #nim
09:02:07*vicecea quit (Remote host closed the connection)
09:02:37*vicecea joined #nim
09:18:30*m5zs7k quit (Read error: Connection reset by peer)
09:18:30*oisota quit (Quit: Ping timeout (120 seconds))
09:18:45*oisota joined #nim
09:18:51*m5zs7k_ joined #nim
09:27:19*jjido joined #nim
09:27:46*m5zs7k_ is now known as m5zs7k
09:31:18FromDiscord<hugogranstrom> In reply to @pietroppeter "Since the mermaids are": Oh la la! That wasn't very much code you had to add to support it! 🤯 Does this mean I'll have to add Mermaid syntax highlighting to NimiBoost now? 🤣
09:39:12*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:10:24NimEventerNew Nimble package! nim_chacha20_poly1305 - xchacha20_poly1305, chacha20, poly1305, see https://github.com/lantos-lgtm/nim_chacha20_poly1305
10:21:19FromDiscord<abdu> How to convert string type to bool data type the simplest ?
10:24:44PMunchparsebool?
10:25:47PMunch@abdu, it all depends on what kind of bool you want
10:25:51PMunchRelevant: https://forum.nim-lang.org/t/8906#58185
10:29:19*Gustavo6046 joined #nim
10:43:57NimEventerNew question by itil memek cantik: right syntax to have Nim string type to bool type, see https://stackoverflow.com/questions/71125023/right-syntax-to-have-nim-string-type-to-bool-type
10:45:17FromDiscord<Rika> Sigh
10:45:28FromDiscord<Rika> Didn’t PMunch answer that
10:50:18supakeenyes.
12:02:36*jmdaemon quit (Ping timeout: 240 seconds)
12:06:01*supakeen quit (Quit: WeeChat 3.4)
12:06:31*supakeen joined #nim
12:11:49*krux02 joined #nim
12:18:07PMunchAah, now I see why you where talking about Mermaid earlier: https://forum.nim-lang.org/t/8906#58185
12:18:11PMunchhttps://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/
12:18:13PMunchWhoops wrong link
13:35:11*arkurious joined #nim
15:01:57*PMunch quit (Quit: Leaving)
15:10:35FromDiscord<QueenFuckingAdrielle> is it true that arraymancer and laser are no longer being maintained?
15:15:06FromDiscord<deeuu> In reply to @QueenFuckingAdrielle "is it true that": Might wanna ask in the #science channel
15:16:48FromDiscord<frankzig> Guys I'm using Nimpy to build a python library, ↵↵this library uses a lot of global variables which hold sequences and other types of objects. ↵then via nimpy I expose the methods to handle this objects.
15:16:57FromDiscord<frankzig> Is this risky for the GC?
15:17:22FromDiscord<frankzig> do I risk that nim GC decides to eat up this objects while I'm using the library in python?
15:23:25*anddam quit (Quit: WeeChat 3.4)
15:27:18FromDiscord<pietroppeter> In reply to @hugogranstrom.nim "Oh la la! That": well, next step is to actually produce the string starting from Nim object (e.g. an object representing a dependency graph or other stuff). this would save you from highlighting the syntax... 😄
15:30:22FromDiscord<b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3PGs
15:34:03FromDiscord<hugogranstrom> In reply to @pietroppeter "well, next step is": Ahh, sounds really nice 👌😁 (wouldn't have been too hard to highlight it now that I think about it. Basically a copy-paste of the markdown highlighting in nbCode blocks)
15:40:51*anddam joined #nim
15:44:53arkanoidI've successfully acquired RTC clock writing ioctl device arg using just bit shifting and ffi, great!
15:45:11arkanoidI mean, I've used NO ffi
16:30:36*icebattle joined #nim
17:17:31*sagax joined #nim
17:34:13*Gustavo6046 quit (Quit: Leaving)
17:38:26FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3PGY
17:39:51FromDiscord<ynfle> It's not a range
17:40:06FromDiscord<ynfle> For the iterator, you can use `countup`
17:40:22FromDiscord<ynfle> For the set, you can use the `sugar.collect` macro
17:40:54FromDiscord<Arathanis> kk thnx
17:41:28FromDiscord<Arathanis> use countup, add collect when doing it with a set
17:44:30FromDiscord<Arathanis> looks like collect only works with a hashset? this might be something I need to do manually
17:44:34FromDiscord<Arathanis> thats fine, its not too much work
17:47:54*rwb is now known as rb
17:51:51nrds<Prestige99> hmm playground down
17:58:04FromDiscord<kevin> is there a good way to check for asyncSocket timeout?
17:58:55FromDiscord<kevin> e.g.: If the socket doesn't connect in like 5 seconds, send a message saying the connection timed out
18:00:12FromDiscord<kevin> sent a code paste, see https://play.nim-lang.org/#ix=3PHa
18:01:05FromDiscord<kevin> I think I'm doing this check wrong though because if the socket doesn't connect right away it blocks all other async functions
18:02:04FromDiscord<kevin> (edit) "https://play.nim-lang.org/#ix=3PHa" => "https://play.nim-lang.org/#ix=3PHd"
18:03:49nrds<Prestige99> Is the playground not down for you?
18:16:05FromDiscord<ynfle> In reply to @nrds "<Prestige> Is the playground": Down for me
18:18:46FromDiscord<Arathanis> You could use repl.it in the interim. I do most of my online nim noodling there over the playground.
18:20:13FromDiscord<ynfle> I much prefer local
18:21:49FromDiscord<Arathanis> Agreed. But I figured since the playground was being talked about we were pretty firmly in the realm of online editors.
18:22:28FromDiscord<Arathanis> ive got a `noodling` dir in my homedir with a folder for all the languages im playing with just for this kind of thing
18:23:40FromDiscord<ynfle> In reply to @Arathanis "ive got a `noodling`": I just make standalone files
18:24:48FromDiscord<Arathanis> im just noodling on something somewhat specific so I either name a file or folder what that specific thing is so its easy for me to reference if I want to integrate it into a project in some capacity
18:25:12FromDiscord<Arathanis> like when I decided to start actually playing with nim's macro system I had↵`$HOME/noodling/nim/nmacros.nim`
18:25:32*Gustavo6046 joined #nim
18:25:48FromDiscord<ynfle> In reply to @Arathanis "like when I decided": Right. I just usually do macrotest.nim etc.
18:25:57FromDiscord<ynfle> (edit) "macrotest.nim" => "`macrotest.nim`"
18:26:08FromDiscord<Arathanis> that makes a lot of sense to me
18:26:39FromDiscord<Arathanis> i have a bad habit of flooding a directory with too many files unless I enforce some extra organization on myself haha
18:26:51FromDiscord<Arathanis> so my folder structure is kind of their for future me's benefit
18:27:28FromDiscord<Arathanis> and for a good ol' `ll $HOME/noodling/nim | ack macros`
18:31:19FromDiscord<ynfle> Lol. Make sense
18:32:09*cyraxjoe quit (Ping timeout: 252 seconds)
18:32:44*cyraxjoe joined #nim
18:34:10FromDiscord<ckennedy> Anyone have experience with SDL2 on OSX M1? I compiled SDL2, but I'm getting `'/usr/local/lib/libSDL2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')` when I try to run the Nim executable.
18:40:05FromDiscord<auxym> no experience, but it sounds like you compiled libSDL2 for x86_64 instead of M1
18:40:22FromDiscord<auxym> oh wait no
18:40:24FromDiscord<auxym> that's weird
18:49:54*PMunch joined #nim
18:51:03FromDiscord<ckennedy> so compiling SDL2 after running `/usr/bin/arch --x86_64 /bin/zsh --login` got it working
18:52:31*jjido joined #nim
18:56:20FromDiscord<ckennedy> which is weird because `nim c` in the arm64 shell seems to be producing an x86_64 binary?
18:59:40PMunchWhy wouldn't it?
18:59:51PMunchSorry, I just joined so I can't see what you've typed before
19:00:19Amun-RaPMunch: arm64 not amd64 ;>
19:00:28PMunchOooh
19:02:14*rockcavera joined #nim
19:02:14*rockcavera quit (Changing host)
19:02:14*rockcavera joined #nim
19:12:24FromDiscord<auxym> In reply to @ckennedy "which is weird because": you might have to pass --cpu:arm to the compiler? and perhaps the compiler execs for that cpu. Not sure how toolchains work on m1
19:40:04*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
19:48:34FromDiscord<ckennedy> @auxym weirdly `--cpu:arm64` seemed to have no affect. It failed with the same message prior to using `/usr/bin/arch`, and it still has no effect after as well (though it works with or without).
19:51:11FromDiscord<haolian9 (高浩亮)> hi, what TArg should be for `proc foo(a: int, b: string) {.thread.}`?
20:04:34*jmdaemon joined #nim
20:36:07FromDiscord<johndo3> Hey does anyone have any good docs for nimpy? The GitHub examples are straight forward but not thorough. Implementation is simple enough but when you start to get in the weeds all they have is a “faq” section…
20:50:16FromDiscord<leorize> a thread proc can only receive one argument
20:53:19FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3PI7
20:59:40FromDiscord<reilly> Normally I would just pass these values into IMGUI and let it handle everything, but I need to populate the `content` field ahead of time.
21:19:40PMunchSafely? Don't use a cstring..
21:49:00*PMunch quit (Quit: leaving)
22:30:49FromDiscord<reilly> I don't really have a choice, so I'll take what I can get.
22:36:04FromDiscord<Mysterysib> Hi
22:36:15FromDiscord<Mysterysib> Is anyone using IntelliJ Idea / Jetbrains for nim?
22:36:20FromDiscord<Mysterysib> I need help getting it to work
22:41:58FromDiscord<JSONBash> what are the supported `--os:` options?
22:42:56FromDiscord<JSONBash> i am looking for the macos one
22:49:36FromDiscord<JSONBash> i think it is `--os:macosx`
23:21:19*wyrd quit (*.net *.split)
23:21:19*jmdaemon quit (*.net *.split)
23:21:19*cyraxjoe quit (*.net *.split)
23:21:19*icebattle quit (*.net *.split)
23:21:19*supakeen quit (*.net *.split)
23:21:19*vicecea quit (*.net *.split)
23:21:20*mjsir911 quit (*.net *.split)
23:21:20*oddish quit (*.net *.split)
23:21:20*dtomato quit (*.net *.split)
23:21:20*nrds quit (*.net *.split)
23:21:20*xiamx quit (*.net *.split)
23:21:20*nixfreaknim[m] quit (*.net *.split)
23:21:20*GnuYawk quit (*.net *.split)
23:21:21*Gustavo6046 quit (*.net *.split)
23:21:21*arkurious quit (*.net *.split)
23:21:21*rb quit (*.net *.split)
23:21:21*adium quit (*.net *.split)
23:21:21*fowl quit (*.net *.split)
23:21:22*systemdsucks quit (*.net *.split)
23:21:22*blackbeard420 quit (*.net *.split)
23:21:22*syl quit (*.net *.split)
23:21:22*def- quit (*.net *.split)
23:21:22*tinystoat quit (*.net *.split)
23:21:22*flynn quit (*.net *.split)
23:21:22*happycorsair[m] quit (*.net *.split)
23:21:22*cheer[m] quit (*.net *.split)
23:21:23*ecs quit (*.net *.split)
23:21:23*nisstyre quit (*.net *.split)
23:21:23*droidrage quit (*.net *.split)
23:21:24*Yardanico_ quit (*.net *.split)
23:21:24*robertmeta quit (*.net *.split)
23:21:24*tk quit (*.net *.split)
23:21:24*Onionhammer quit (*.net *.split)
23:21:25*GreaseMonkey quit (*.net *.split)
23:21:25*oprypin quit (*.net *.split)
23:21:25*notchris quit (*.net *.split)
23:21:25*NimEventer quit (*.net *.split)
23:21:25*joast quit (*.net *.split)
23:21:25*cornfeedhobo quit (*.net *.split)
23:21:25*toothlessgear quit (*.net *.split)
23:21:25*ormiret quit (*.net *.split)
23:21:25*lucerne quit (*.net *.split)
23:21:26*k0mpjut0r quit (*.net *.split)
23:21:26*koltrast quit (*.net *.split)
23:21:26*LyndsySimon quit (*.net *.split)
23:21:26*greyrat_ quit (*.net *.split)
23:21:27*Schnouki quit (*.net *.split)
23:21:27*dv2 quit (*.net *.split)
23:21:27*redj quit (*.net *.split)
23:21:27*ldlework quit (*.net *.split)
23:21:27*termer quit (*.net *.split)
23:21:27*euantorano quit (*.net *.split)
23:21:28*om3ga quit (*.net *.split)
23:21:28*Nuc1eoN quit (*.net *.split)
23:21:28*crem1 quit (*.net *.split)
23:21:28*qwestion quit (*.net *.split)
23:21:28*averell quit (*.net *.split)
23:21:29*meowray quit (*.net *.split)
23:21:29*kayabaNerve_ quit (*.net *.split)
23:21:29*ehmry quit (*.net *.split)
23:21:29*lain quit (*.net *.split)
23:21:29*jkl quit (*.net *.split)
23:21:30*ssiyad quit (*.net *.split)
23:21:30*dv^_^ quit (*.net *.split)
23:21:30*mal`` quit (*.net *.split)
23:21:31*Amun-Ra quit (*.net *.split)
23:21:31*gshumway quit (*.net *.split)
23:21:31*madprops quit (*.net *.split)
23:21:31*djanatyn quit (*.net *.split)
23:21:31*rp1 quit (*.net *.split)
23:21:31*FromDiscord quit (*.net *.split)
23:21:32*Zevv quit (*.net *.split)
23:21:32*Ekho quit (*.net *.split)
23:21:33*rockcavera quit (*.net *.split)
23:21:33*sagax quit (*.net *.split)
23:21:33*anddam quit (*.net *.split)
23:21:33*oisota quit (*.net *.split)
23:21:33*m5zs7k quit (*.net *.split)
23:21:33*arkanoid quit (*.net *.split)
23:21:33*mahlon quit (*.net *.split)
23:21:33*xet7 quit (*.net *.split)
23:21:33*[R] quit (*.net *.split)
23:23:40*jmdaemon joined #nim
23:23:40*rockcavera joined #nim
23:23:40*cyraxjoe joined #nim
23:23:40*Gustavo6046 joined #nim
23:23:40*sagax joined #nim
23:23:40*icebattle joined #nim
23:23:40*anddam joined #nim
23:23:40*arkurious joined #nim
23:23:40*supakeen joined #nim
23:23:40*m5zs7k joined #nim
23:23:40*oisota joined #nim
23:23:40*vicecea joined #nim
23:23:40*wyrd joined #nim
23:23:40*rb joined #nim
23:23:41*arkanoid joined #nim
23:23:41*mahlon joined #nim
23:23:41*adium joined #nim
23:23:41*systemdsucks joined #nim
23:23:41*blackbeard420 joined #nim
23:23:41*syl joined #nim
23:23:41*def- joined #nim
23:23:41*tinystoat joined #nim
23:23:41*flynn joined #nim
23:23:41*fowl joined #nim
23:23:41*rp1 joined #nim
23:23:41*tk joined #nim
23:23:41*xet7 joined #nim
23:23:41*[R] joined #nim
23:23:41*mjsir911 joined #nim
23:23:41*oddish joined #nim
23:23:41*ldlework joined #nim
23:23:41*dtomato joined #nim
23:23:41*droidrage joined #nim
23:23:41*kayabaNerve_ joined #nim
23:23:41*qwestion joined #nim
23:23:41*FromDiscord joined #nim
23:23:41*Nuc1eoN joined #nim
23:23:41*ehmry joined #nim
23:23:41*nrds joined #nim
23:23:41*Zevv joined #nim
23:23:41*crem1 joined #nim
23:23:41*lain joined #nim
23:23:41*nixfreaknim[m] joined #nim
23:23:41*xiamx joined #nim
23:23:41*happycorsair[m] joined #nim
23:23:41*cheer[m] joined #nim
23:23:41*GnuYawk joined #nim
23:23:41*Onionhammer joined #nim
23:23:41*jkl joined #nim
23:23:41*nisstyre joined #nim
23:23:41*ecs joined #nim
23:23:41*robertmeta joined #nim
23:23:41*Yardanico_ joined #nim
23:23:41*lucerne joined #nim
23:23:41*ormiret joined #nim
23:23:41*toothlessgear joined #nim
23:23:41*cornfeedhobo joined #nim
23:23:41*joast joined #nim
23:23:41*NimEventer joined #nim
23:23:41*notchris joined #nim
23:23:41*oprypin joined #nim
23:23:41*GreaseMonkey joined #nim
23:23:41*redj joined #nim
23:23:41*dv2 joined #nim
23:23:41*Schnouki joined #nim
23:23:41*greyrat_ joined #nim
23:23:41*LyndsySimon joined #nim
23:23:41*koltrast joined #nim
23:23:41*k0mpjut0r joined #nim
23:23:41*om3ga joined #nim
23:23:41*euantorano joined #nim
23:23:41*termer joined #nim
23:23:41*meowray joined #nim
23:23:41*averell joined #nim
23:23:41*mal`` joined #nim
23:23:41*dv^_^ joined #nim
23:23:41*ssiyad joined #nim
23:23:41*djanatyn joined #nim
23:23:41*madprops joined #nim
23:23:41*gshumway joined #nim
23:23:41*Amun-Ra joined #nim
23:23:41*Ekho joined #nim
23:23:46*enyc quit (Max SendQ exceeded)
23:24:03*enyc joined #nim