<< 20-05-2022 >>

00:00:29FromDiscord<NiChrosia> oh, nice
00:00:30FromDiscord<NiChrosia> thanks
00:04:24FromDiscord<Elegantbeef> As the name implies they're sequential 😄
00:23:37FromDiscord<proton> https://media.discordapp.net/attachments/371759389889003532/977003627250085978/unknown.png
00:23:41FromDiscord<proton> https://media.discordapp.net/attachments/371759389889003532/977003646837461002/unknown.png
00:35:11*vicfred quit (Quit: Leaving)
00:37:28FromDiscord<Yardanico> ?
00:38:03FromDiscord<Yardanico> for offtopic stuff like rust we have #offtopic :))
00:45:25*lumo_e joined #nim
00:57:30FromDiscord<proton> ok, I'm aware of this, all messages I sent here is about Nim.This is a one of the trending of web3 research, suggestion for Nim ecosystem.
00:57:51FromDiscord<Yardanico> well it just seems quite weird, you send a screenshot with some github org without any explanation
00:58:47FromDiscord<proton> sorry, will with explanation afterwards.
01:01:17FromDiscord<Yardanico> also I think posting this stuff to #main is not the best idea - it's a real time chat, so things move quite fast and your message will be lost easily
01:01:21FromDiscord<Yardanico> a much better thing would be to post to https://forum.nim-lang.org/
01:01:32FromDiscord<Yardanico> especially for large posts involving suggestions
01:01:46FromDiscord<proton> I'm working with @xflywind , fixed issue of returning seq of nim-web3 and build a simple IPFS library with http, native IPFS client is hard.
01:02:11FromDiscord<proton> (edit) "http," => "http yesterday,"
01:03:09FromDiscord<proton> (edit) "I'm working with @xflywind , fixed issue of returning seq of nim-web3 and build a simple IPFS library with http ... yesterday," added "client"
01:03:39FromDiscord<proton> (edit) "build" => "built"
01:05:47FromDiscord<proton> I will take your advice, thank you!
01:08:10*droidrage joined #nim
01:21:04*qwestion joined #nim
01:37:18FromDiscord<sushie> is there a way to force something into another section much like `[[gnu::section(".patches")]]` through Nim?
01:37:25FromDiscord<sushie> (edit) "is there a way to force something into another section much like `[[gnu::section(".patches")]]` ... through" added "in c++"
01:38:16FromDiscord<sushie> (edit) "is there a way to force something into another section much like `[[gnu::section(".patches")]]` in c++ ... throughNim" added "but" | "Nim?" => "Nim instead?"
01:57:05*LuxuryMode quit (Quit: Connection closed for inactivity)
02:01:45FromDiscord<exelotl> @sushie you can do it with the `codegenDecl` pragma https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma
02:03:40FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3YbG
02:36:33*kenran joined #nim
02:36:42*kenran quit (Client Quit)
02:53:51*lumo_e quit (Ping timeout: 276 seconds)
03:07:37FromDiscord<sushie> Awesome thanks!
03:19:54*dithpri joined #nim
04:28:45*ltriant_ joined #nim
04:31:21*ltriant quit (Ping timeout: 276 seconds)
05:02:15madpropshttps://awesomekling.github.io/Memory-safety-for-SerenityOS/
05:02:25madpropsnew programming language
05:07:47FromDiscord<undel> ~~Why couldn't he use Nim?~~
05:17:32FromDiscord<Phil> Out of curiosity, is there a benefit to not using the LTO compiler flag, other than speeding up the compiler?↵If there isn't, why isn't it just a default for the nim-compiler to use when -d:release is set?
05:17:57FromDiscord<Phil> (edit) "compiler?↵If" => "compilation process?↵If"
05:18:22FromDiscord<Rika> Untested perhaps
06:00:28*PMunch joined #nim
06:08:42FromDiscord<ynfle> Doesn't work on macOS
06:13:20FromDiscord<Phil> lto you mean?
06:13:52FromDiscord<Elegantbeef> The `-d:lto` flag passes some flags which do not work with Clang, but lto can work on mac
06:14:26*toluene quit (Quit: Ping timeout (120 seconds))
06:15:52FromDiscord<Elegantbeef> First time using OOP pretty much ever and damn is it a shame that generic methods dont work
06:16:27*toluene joined #nim
06:21:05FromDiscord<Elegantbeef> \wait they do work? i cant tell it says they are deprecated and i swore i had an issue with them
06:21:25FromDiscord<Phil> Why would generics with nim objects not work?
06:21:40FromDiscord<Elegantbeef> methods
06:21:57FromDiscord<Phil> Ohhh right, methods did some dispatch thingy special I faintly recall
06:22:09FromDiscord<Elegantbeef> Yes they dynamically dispatch
06:23:59FromDiscord<Elegantbeef> I assume the issue with generic methods is that they cannot emiit the specialization code
06:42:44FromDiscord<Yardanico> In reply to @ynfle "Doesn't work on macOS": -d:lto flag specifically (as beef explained), LTO itself works fine on macOS
06:43:01FromDiscord<Yardanico> and Apple are probably using LTO for most, if not all, of their own software for macOS
06:52:36FromDiscord<ynfle> In reply to @Yardanico "-d:lto flag specifically (as": That's what I was referring to
06:53:22FromDiscord<Yardanico> yes, but it's no much different
06:53:34FromDiscord<Yardanico> `--passL:"-flto"` isn't that more characters :)
07:12:06FromDiscord<planetis> In reply to @ambient "how do i get": You need to do it manually, see how seqs_v2 does it or alignedAlloc
07:13:06FromDiscord<planetis> unfortunately it's not exported
07:19:35FromDiscord<Rika> In reply to @Yardanico "`--passL:"-flto"` isn't that more": I don’t understand why the define flag isn’t fixed yet
07:20:56PMunchWhat's the problem with the define flag?
07:24:18FromDiscord<planetis> -d:lto doesn't work for me
07:25:05FromDiscord<planetis> sent a code paste, see https://play.nim-lang.org/#ix=
07:26:08FromDiscord<planetis> but works without --cc:clang
07:27:29FromDiscord<planetis> ohh, already mentioned. always late to the party
07:32:02FromDiscord<Elegantbeef> It passes more than just `-flto` which doesnt work on clang without additional packages
07:44:00*PMunch quit (Quit: leaving)
08:01:06FromDiscord<Yardanico> it just forces the use of lld linker with clang for no reason
08:54:48*ltriant_ quit (Ping timeout: 246 seconds)
08:58:49*lumo_e joined #nim
09:18:51*PMunch joined #nim
09:37:39FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=3Ycz
09:38:18FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=3YcA
09:39:21FromDiscord<mratsim> In reply to @proton "I'm working with <@658563905425244160>": Talk with gogolxdong for IPFS on top of Nim
09:39:55FromDiscord<Bung> (edit) "https://play.nim-lang.org/#ix=3YcA" => "https://play.nim-lang.org/#ix=3YcC"
09:40:02FromDiscord<mratsim> In reply to @proton "": If you're interested in zero-knowledge in Nim, we're hiring cryptographers at Status
09:40:25FromDiscord<proton> I'm gogolxdong 😄
10:01:57FromDiscord<Bung> uh , nimsuggest runCmd is not gc-safe
10:28:52PMunch@Rika, try living somewhere where it's dark 24 hours a day for a couple of months a year and you'll soon want the effect as well
10:29:42FromDiscord<Rika> Given that then isn’t it now obvious why I don’t
10:29:57FromDiscord<Rika> I’ve lived in the tropics for most my life so
10:31:19PMunchMakes sense yeah
10:43:17FromDiscord<exelotl> In reply to @exelotl "<@442451195106426881> you can do": iirc lto can break this because it doesn't understand sections and other attributes
10:45:11FromDiscord<exelotl> or maybe its arm vs thumb that I'd doesn't understand
10:45:23FromDiscord<exelotl> (edit) "I'd" => "it"
11:25:14FromDiscord<d4rckh> how could i delete the elements of a sequence while iterating them?
11:25:48FromDiscord<Yardanico> you can't
11:25:58FromDiscord<Yardanico> instead make a copy of the seq and iterate over that copy and remove elements from the original seq
11:26:07FromDiscord<Yardanico> but don't forget that indexes will shift, so you have to account for that in some variable
11:26:41FromDiscord<d4rckh> hmm, that's weird
11:26:45FromDiscord<d4rckh> (edit) "hmm, that's weird" => "hmm"
11:48:25*ltriant joined #nim
11:59:11*vicecea quit (Remote host closed the connection)
11:59:39*vicecea joined #nim
12:04:02FromDiscord<exelotl> other solutions could be to loop backwards via `for i in countdown(s.len-1, 0):` then it's probably safe to delete `s[i]`
12:04:34FromDiscord<exelotl> or you can keep a separate list of indexes to delete, then delete them after you're done looping
12:05:21FromDiscord<exelotl> or you can set them to nil (or set some "dead" flag or empty value) and then do a 2nd pass over the seq to remove the dead items
12:07:00FromDiscord<arkt8> If keeping with Yardanico copy idea, a possible solution is instead of copy, create other list and add to it what shouldnt be deleted. At the end swap original list with the new.
12:10:30FromDiscord<exelotl> oh yeah that's a good one
12:14:05FromDiscord<VideoCarp> is procedural programming common in Nim?
12:14:44FromDiscord<exelotl> yeah, it's the preferred paradigm in a lot of ways
12:36:45*ltriant quit (Ping timeout: 244 seconds)
13:06:14FromDiscord<cschardt (Christof Schardt)> 7 @HJarausch\_gitlab f @\_discord\_168482749831708672\:t2bot.io↵lo @\_discord\_309937753699778561\:t2bot.io @\_discord\_300050030923087872\:t2bot.io @\_discord\_359071052397281280\:t2bot.io @\_discord\_359071052397281280\:t2bot.io jy
13:11:06FromDiscord<Rika> ??
13:18:55FromDiscord<exelotl> Looks like... a glitch in the matrix 😎
13:19:09PMunchUser is originally from Gitter it appears
13:20:27*PMunch quit (Quit: Leaving)
13:22:13*PMunch joined #nim
13:38:20*dithpri quit (Quit: '); DROP TABLE Users;--)
13:44:37*ltriant joined #nim
13:50:06*ltriant quit (Ping timeout: 272 seconds)
14:00:50*PMunch quit (Quit: Leaving)
14:13:32FromDiscord<tandy> what would be a better format for storing ordered information? OrderedTable or Table?
14:13:39FromDiscord<tandy> the information will be indexed by unix timestamp
14:14:11FromDiscord<tandy> im using a `seq` atm, but that has issues with duplicates
14:14:38FromDiscord<Andreas> In reply to @tandy "im using a `seq`": how about a set-type ?
14:14:46FromDiscord<tandy> hmm
14:14:50FromDiscord<tandy> thats a good idea
14:15:49FromDiscord<tandy> yea that works well, thanks i forgot those existed
14:18:16FromDiscord<Andreas> In reply to @tandy "yea that works well,": less overhead than a Table and as fast
14:18:52*ltriant joined #nim
14:20:29FromDiscord<tandy> only thing im not sure about with using a table / hashset is that i cant find the "first" item
14:21:18FromDiscord<Prestige> There's OrderedTable and OrderedHashSet iirc
14:21:20FromDiscord<Andreas> think, the SortedTable keeps the insertion order
14:21:30FromDiscord<tandy> because i was using the unix timestamps from the first and last item
14:21:30FromDiscord<tandy> i can just store it in the parent object tho
14:21:37FromDiscord<Andreas> (edit) "SortedTable" => "OrderedTable"
14:22:40FromDiscord<tandy> yeah but the problem with insertion order, is that i might insert "earlier" items after "later" items
14:22:46FromDiscord<Andreas> In reply to @tandy "i can just store": do you need a 'sorted' collection of timestamps ? or do you need to maintain the insertion-order ?
14:23:04FromDiscord<tandy> sorted collection, without duplicates↵(@Andreas)
14:23:16FromDiscord<tandy> i currently use a seq but that makes preventing duplicates complex
14:23:41FromDiscord<Andreas> In reply to @tandy "sorted collection, without duplicates": go with a SortedSet and use algorithm/sort after insert
14:23:48*ltriant quit (Ping timeout: 246 seconds)
14:24:09FromDiscord<Andreas> (edit) "insert" => "insert. Maybe there is a Set-Type that can do sorted inserts ?"
14:24:14FromDiscord<tandy> i gues i should do some benchmarking then
14:24:29FromDiscord<tandy> https://github.com/nim-lang/Nim/issues/11475
14:25:52FromDiscord<Andreas> so there is a 'poor-mans' SortedSet - i try this one
14:28:29FromDiscord<Andreas> or wrap a seq and overload the insert-operation, so that that a new seq-member is placed accordingly and your seq-member remain unique. Thats prob. the 'poor-mans'-approach. Simple
14:28:44FromDiscord<Andreas> (edit) "seq-member" => "seq-members"
14:32:42*LuxuryMode joined #nim
14:33:36FromDiscord<NWJodo> Interesante
14:42:11FromDiscord<tandy> sadly this doesnt allow adding / concatenating operations
14:42:15FromDiscord<tandy> you can only insert one at a time
14:43:51*lumo_e quit (Ping timeout: 244 seconds)
14:47:43FromDiscord<Andreas> In reply to @tandy "sadly this doesnt allow": hmm, year, it has to be this way by concept. Otherwise you'd give up on the guarantee to maintain a sorted-sequence of things. But you could add a 'merge'-proc that recieves a seq/set or whatever you want to insert and then insert the elements one after another..
14:47:52FromDiscord<Andreas> (edit) "year," => "yea,"
14:50:09FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Ydv
14:51:02FromDiscord<Phil> I mean, I'm aware I can just throw in untyped I think, but I would like to explicitly express that this template can be used with receiver being any sort of int or int-range
14:52:55FromDiscord<Phil> Scratch the untyped, even if I did that, it'll fail during the assignment since receiver will want the compile-time guarantee that it's being fed a value between 0 and 9 and I explicitly state in the "try" block that it'll be just an int
14:52:57FromDiscord<Phil> What a pain
14:54:44FromDiscord<Phil> I really don't want to copy paste the above template for every single possible range there is
14:54:50FromDiscord<Phil> (edit) "there is" => "I have"
14:55:43FromDiscord<Phil> Can I "turn off" the compile-time type-check on the range for this one instance?
14:55:59FromDiscord<Phil> (edit) "instance?" => "assignment? (`receiver = some(valueNode.str.parseInt())`)"
14:56:45FromDiscord<Phil> (edit) "Can I "turn off" the compile-time type-check on the range for this one assignment? ... (`receiver" added "Ideally making it a runtime check?"
15:14:22*lumo_e joined #nim
16:19:42FromDiscord<Forest> anyone know of modern Chipmunk2D bindings?
16:26:56*vicfred joined #nim
16:35:58*lumo_e quit (Ping timeout: 244 seconds)
17:36:49FromDiscord<spoon> sent a code paste, see https://play.nim-lang.org/#ix=3Yej
17:37:45FromDiscord<spoon> trying to use dimscord
17:38:07FromDiscord<Bung> https://github.com/bung87/nimlsp/runs/6528943601?check_suite_focus=true need help with this
17:38:31FromDiscord<Prestige> @spoon what's your code?
17:38:54FromDiscord<Bung> (edit) "this" => "this, async file readLine encounter `index out of bounds, the container is empty`"
17:38:55*hellstabber joined #nim
17:39:07FromDiscord<spoon> the only other lines in that file are creating a newDiscordBot() and doing `waitFor discord.startSession()`
17:40:07FromDiscord<Rika> full error
17:41:24FromDiscord<spoon> sent a code paste, see https://play.nim-lang.org/#ix=3Yen
17:41:55*hellstabber quit (Client Quit)
17:41:59FromDiscord<Rika> its not a closure
17:42:08FromDiscord<Rika> ah
17:42:08FromDiscord<Rika> no
17:42:11FromDiscord<Rika> o is not an option
17:42:13FromDiscord<Rika> it needs to be
17:45:41*hellstabber joined #nim
17:49:07FromDiscord<spoon> this works fine
17:49:08FromDiscord<spoon> sent a code paste, see https://play.nim-lang.org/#ix=3Yeq
17:49:32FromDiscord<Rika> yeah just change `o: Member` with `o: Option[Member]` i believe
17:49:39FromDiscord<spoon> ah, alright
17:51:29FromDiscord<spoon> yeah, that did it
17:51:38FromDiscord<spoon> tyty
17:57:52*xet7 quit (Remote host closed the connection)
17:59:04*xet7 joined #nim
18:01:03FromDiscord<retkid> can i make a table with any type
18:01:20FromDiscord<retkid> as in
18:01:21FromDiscord<Andreas> In reply to @retkid "can i make a": yep, its generic
18:01:29FromDiscord<retkid> table[string, untyped]
18:01:30FromDiscord<Rika> Not with many types in one table
18:01:31FromDiscord<Rika> No
18:01:33FromDiscord<retkid> sad
18:01:38FromDiscord<Rika> Make a varian
18:01:40FromDiscord<Rika> Variant
18:01:51FromDiscord<retkid> what be a "variant"
18:02:33FromDiscord<Rika> Object variant
18:02:46FromDiscord<demotomohiro> https://nim-lang.github.io/Nim/manual.html#types-object-variants
18:03:25FromDiscord<retkid> this is ugly
18:04:28FromDiscord<Rika> No you’re ugly smh
18:04:31FromDiscord<Prestige> What's your use case?
18:07:16FromDiscord<retkid> I'll just store it in as strings and case switch to case type
18:07:26FromDiscord<Rika> Have fun
18:07:33FromDiscord<retkid> In reply to @Rika "Have fun": im not
18:07:41FromDiscord<retkid> :D
18:18:09om3gaWell folks... I think the issue I'm strugling with is not with the code: https://0bin.net/paste/N+oZ1Hap#gcucBj9CmQnRqwgg8+zWjJHON6rqq-Uz+iZbRpV4vft
18:20:28*ltriant joined #nim
18:24:28om3gaI used the same code and lib before, and now it only works properly with integrated libasan.
18:24:41om3gaThe problem is with if 0 > FCGX_Accept_r(request.addr):
18:25:57*ltriant quit (Ping timeout: 276 seconds)
18:26:03om3gavar request is of type FCGX_Request and defined in thread proc scope
18:27:42om3gabut, I get the SIGSEGV: Illegal storage access. (Attempt to read from nil?), and debugger piontss me as described in above paste url, to some excpt.nim
18:28:50om3gais this bug? please suggest something. I tried different pragmas, shared memory for each thread to store ---"var request: FCGX_Request"---
18:29:12om3ganothing helps really.
18:54:05*kenran joined #nim
18:54:18*kenran quit (Client Quit)
19:08:27om3gahere is the link on latest example: https://drive.google.com/file/d/1Zuh6ekg6-J-MSC_15sXIXOjdYuEkXNQW/view?usp=sharing requires libfcgi (extra/fcgi in arch)
19:17:15FromDiscord<golova> Where can I view documentation for `size` pragma?
19:22:14*pro joined #nim
19:24:52FromDiscord<retkid> are filestreams too wonky for dange
19:24:53FromDiscord<retkid> (edit) "dange" => "danger"
19:24:57FromDiscord<retkid> or is my code too shit
19:25:01FromDiscord<retkid> well rather
19:25:13FromDiscord<retkid> is std/streams code too shit or is it mine
19:25:15FromDiscord<Rika> Does it work in release but not danger
19:25:20om3gagolova :https://github.com/nim-lang/Nim/issues/7674#issuecomment-383408234
19:25:22FromDiscord<retkid> i see that
19:25:35FromDiscord<retkid> it might be abusing pointers too much
19:25:41FromDiscord<Rika> ??
19:25:48FromDiscord<Rika> What?
19:26:01FromDiscord<retkid> not treating them well, not tucking them in and being nice
19:26:22FromDiscord<retkid> you gotta give them a lot of respect
19:28:35*def- quit (Quit: -)
19:28:51*def- joined #nim
19:35:44FromDiscord<retkid> hmm
19:35:49FromDiscord<retkid> it seems to have broken
19:44:20FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3YeR
19:44:36FromDiscord<Rika> no var can have a default value
19:44:39FromDiscord<Rika> it makes no sense
19:45:19FromDiscord<Rika> also `@[int]` is also wrong, that's a `seq[typedesc]` which also kinda doesnt make sense outside of compiletime
19:45:45FromDiscord<Andreas> ok, put `newSeq` in.
19:46:09FromDiscord<Andreas> (edit) "https://play.nim-lang.org/#ix=3YeR" => "https://play.nim-lang.org/#ix=3YeT"
19:46:21FromDiscord<Rika> still, no mutable parameter can have default values
19:47:37*lumo_e joined #nim
19:54:48FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3YeV
19:55:01FromDiscord<m4ul3r> (edit) "https://play.nim-lang.org/#ix=3YeV" => "https://play.nim-lang.org/#ix=3YeW"
19:56:16FromDiscord<stoneface> why not use a CountTable?
19:56:31FromDiscord<Andreas> In reply to @m4ul3r "How do I increase": yes, doesn't this work ? `nCounts["key1"].inc`
19:58:11FromDiscord<Rika> doesnt what you just wrote work?
19:58:22FromDiscord<Rika> the += 1 version should work, if not then...
19:59:04FromDiscord<m4ul3r> I'll switch to a count table and try that
19:59:11FromDiscord<stoneface> yeah that should work unless the table isn't mutable
19:59:31FromDiscord<m4ul3r> With what I wrote, I'm getting this error:↵`type mismatch: got <int, int literal(1)>`
20:02:45FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=
20:02:57FromDiscord<stoneface> what's `nCounts`? You have `nTable` initialized in your example but not `nCounts`
20:03:16FromDiscord<Rika> oh that is true
20:04:32FromDiscord<m4ul3r> It's the same my bad. nTable should actually be nCounts.
20:04:59FromDiscord<m4ul3r> I tried simplifying the code since it's at different mounts in the function
20:05:01FromDiscord<Rika> is it really var
20:05:29FromDiscord<m4ul3r> Yes, It is a var. Should it be something else?
20:05:40*lumo_e quit (Ping timeout: 272 seconds)
20:05:45FromDiscord<Rika> no thats fine
20:06:17FromDiscord<Rika> are these in the same module
20:07:41FromDiscord<m4ul3r> yes, I believe so, it's sitting in main
20:10:20*pro quit (Quit: pro)
20:11:35*hellstabber quit (Quit: Textual IRC Client: www.textualapp.com)
20:25:03FromDiscord<m4ul3r> I ended up finding my error and got it working with a count table instead
20:31:32FromDiscord<retkid> does streams get unstable with extremely large files
20:31:36FromDiscord<retkid> like 40 gb+
20:32:02FromDiscord<Rika> can you describe your problem instead
20:32:31FromDiscord<retkid> I need to wait for it to crash again to get the byte it read fromn
20:32:36FromDiscord<retkid> but
20:32:44FromDiscord<retkid> it just sigdevs read from nils
20:33:48FromDiscord<Rika> are you running fromdebug
20:33:50FromDiscord<Rika> (edit) "fromdebug" => "from debug"
20:34:01FromDiscord<Rika> do you know how to compile with ASan
20:36:01FromDiscord<retkid> In reply to @Rika "are you running from": If i ran from debug it would take a very long time
20:36:18FromDiscord<retkid> it takes like 30 minutes to happen as it is
20:36:19FromDiscord<Rika> then run the program without -d:release or danger but with --opt:speed
20:36:23FromDiscord<Rika> oh
20:36:29FromDiscord<retkid> with danger on
20:36:34FromDiscord<retkid> (edit) "danger" => "debug"
20:36:35FromDiscord<Rika> can i run it myself?
20:36:48FromDiscord<retkid> no
20:36:52FromDiscord<retkid> you'd need a 90 gb file
20:37:06FromDiscord<Rika> then can i get this file?
20:37:14FromDiscord<retkid> 6665:↵4638725592
20:37:17FromDiscord<retkid> so
20:37:29FromDiscord<retkid> thats position where it fails
20:39:17FromDiscord<Rika> this doesnt help, really
20:39:34FromDiscord<retkid> i was checking if it was a significant number lol
20:40:02FromDiscord<retkid> i was thinking it would be around 2^31 bit index but its not
20:40:07FromDiscord<retkid> (edit) removed "bit index"
20:48:57FromDiscord<retkid> ima try debug
20:49:01FromDiscord<retkid> and see if it gives me any more info
20:49:17FromDiscord<Rika> No I think it’s better to uh
20:49:29FromDiscord<Rika> Compile on danger and run under Valgrind
20:49:35FromDiscord<retkid> that wont work
20:49:37FromDiscord<retkid> im using streams
20:49:42FromDiscord<Rika> Why?
20:49:44FromDiscord<Rika> Huh?
20:49:45FromDiscord<retkid> danger wont compile
20:49:49FromDiscord<retkid> well it'll compile
20:49:52FromDiscord<retkid> but stop very quicklty
20:49:53FromDiscord<retkid> (edit) "quicklty" => "quickly"
20:49:55FromDiscord<Rika> That’s the point
20:50:03FromDiscord<Rika> Valgrind will catch the error
20:50:07FromDiscord<retkid> but then im debugging streams and not this issue in streams
20:50:13FromDiscord<Rika> What?
20:50:26FromDiscord<Rika> Isn’t that the point? I’m confused
20:50:40FromDiscord<retkid> danger stops far before this happens
20:50:43FromDiscord<retkid> it stops around 7
20:50:49FromDiscord<Rika> Then release
20:51:10FromDiscord<Rika> It doesn’t really matter where it stops, if it’s the same error then that would still help no?
20:51:36FromDiscord<retkid> im pretty sure its a problem with the position being int and not int64?
20:52:00FromDiscord<Rika> Integers are 64 if you’re compiling for 64
20:52:08FromDiscord<retkid> well
20:52:15FromDiscord<retkid> i cant set the position high enough
20:52:39FromDiscord<Rika> ?
20:52:56FromDiscord<retkid> I cannot input 4632762604 into the stream.setPosition
20:52:59FromDiscord<retkid> (edit) "I cannot input 4632762604 into the stream.setPosition ... " added "prc"
20:53:00FromDiscord<retkid> (edit) "prc" => "proc"
20:53:14FromDiscord<Rika> What does it say if you do
20:53:22FromDiscord<retkid> time mismatch, int not int64
20:53:50FromDiscord<retkid> and i cant cat it
20:53:52FromDiscord<retkid> (edit) "cat" => "cast"
20:54:18FromDiscord<demotomohiro> Adding 'i64 prefix like 10000'i64 doesnt work?
20:54:18FromDiscord<Rika> Convert it not cast
20:55:16*lumo_e joined #nim
20:56:10FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977313808102092850/unknown.png
20:56:27FromDiscord<Rika> I mean into an int
20:57:08FromDiscord<retkid> well i cant do int(x) because its out of range
20:57:19FromDiscord<retkid> i dont think putting it as a string to then parse it will work either
20:57:57FromDiscord<retkid> alright it might be time to start fucking with streams.nim
20:58:16FromDiscord<Rika> Then it sounds like streams has a size limit
20:58:34FromDiscord<Rika> !eval echo high int
20:58:37NimBot9223372036854775807
20:58:46FromDiscord<retkid> strange
20:58:52FromDiscord<Rika> Why would it be out of range
20:58:59FromDiscord<Rika> Are you on 32 bit?
20:59:29FromDiscord<retkid> i dont think its possible for me to be on 32bit
20:59:33*s0k1t left #nim (WeeChat 3.3)
20:59:59*lumo_e quit (Ping timeout: 244 seconds)
21:00:26FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977314881692905623/unknown.png
21:01:05FromDiscord<Rika> Lol what about uname -a
21:01:05FromDiscord<demotomohiro> `setPositionImpl: proc (s: Stream, pos: int)` Maybe it should be int64 not int for 32bit platform.
21:01:06FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977315046906531860/unknown.png
21:01:26FromDiscord<Rika> That looks way larger than you said before
21:01:42FromDiscord<retkid> Linux retkid 5.17.5-arch1-1 #1 SMP PREEMPT Wed, 27 Apr 2022 20:56:11 +0000 x86_64 GNU/Linux
21:01:46FromDiscord<retkid> cant be
21:01:52FromDiscord<Rika> I mean the number
21:01:54FromDiscord<retkid> unless i
21:01:55FromDiscord<retkid> like
21:01:58FromDiscord<Rika> Doesn’t look like the one you wrote
21:01:58FromDiscord<retkid> copied it wrong
21:02:08FromDiscord<Rika> You did
21:02:10FromDiscord<retkid> 4632822828
21:02:11FromDiscord<Rika> You pasted it twice
21:02:15FromDiscord<retkid> haha
21:02:30FromDiscord<retkid> a case of the sticky copy paste
21:03:53*LuxuryMode quit (Quit: Connection closed for inactivity)
21:05:33FromDiscord<retkid> doesn't work anyway it loads all of it into memory and i cant fit it
21:05:35FromDiscord<retkid> :eyerol]
21:05:35FromDiscord<retkid> ]
21:05:44FromDiscord<retkid> (edit) ":eyerol]" => "🙄"
21:06:56FromDiscord<retkid> could it be that streams is flooding my ram?
21:08:01FromDiscord<retkid> alright its valgrind time, my least favorite time of the month
21:08:12*lumo_e joined #nim
21:08:30FromDiscord<Rika> In reply to @retkid "doesn't work anyway it": i dont see why it would
21:08:41FromDiscord<Rika> fseek (the C function that it uses) doesnt do that
21:08:51FromDiscord<retkid> well it does
21:09:27FromDiscord<retkid> i don't know if its intentional or not but setting my position with that number dumped more data then the actual size i was seeking to (<6 gb)
21:23:28*ltriant joined #nim
21:24:19FromDiscord<demotomohiro> It seems passing large int literal to int parameter requires converting to int: https://play.nim-lang.org/#ix=3Yf9
21:25:43FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977321245404192828/unknown.png
21:27:22FromDiscord<Rika> sorry, i forgot to tell you
21:27:26FromDiscord<Rika> -d:useMalloc
21:27:50FromDiscord<retkid> i forgot about that
21:27:59FromDiscord<Rika> please add this too, maybe also --debugger:native and --stacktraces:on (if on danger)
21:28:04FromDiscord<Rika> (edit) "(if" => "(stacktraces"
21:28:06FromDiscord<Rika> (edit) "please add this too, maybe also --debugger:native and --stacktraces:on (stacktraces ... on" added "if"
21:28:20FromDiscord<retkid> im gonna see if danger is easily fixable / my fault
21:28:25FromDiscord<retkid> then im gonna do release
21:28:38*ltriant quit (Ping timeout: 272 seconds)
21:29:28FromDiscord<retkid> yea so theres a problem
21:29:41FromDiscord<retkid> i think it would take over 2 days to get where the error occurs
21:29:56FromDiscord<retkid> doing rough math
21:31:01FromDiscord<retkid> why does this always happen to me
21:36:15FromDiscord<Professor Actual Factual> sent a long message, see http://ix.io/3Yfe
21:37:17FromDiscord<retkid> every time i attempt to use nim in production, I end up here yelling at Rika about some edge of edge case scenario
21:37:27FromDiscord<Rika> its fine
21:37:31FromDiscord<Rika> these issues are interesting
21:37:45FromDiscord<retkid> this is the 3rd or 4th time now lol
21:38:02FromDiscord<Rika> In reply to @Professor Actual Factual "Idk if someone wants": prod is easy if you can make the libs yourself
21:38:11FromDiscord<Rika> aka if you have a team like status
21:38:18FromDiscord<Rika> otherwise its gonna be somewhat rough
21:38:46FromDiscord<retkid> i do agree
21:39:10FromDiscord<retkid> it depends on what you're doing and if stdlib covers your needs. There are external libraries, at time of dodgy quality
21:39:16FromDiscord<retkid> (edit) "time" => "times"
21:39:24FromDiscord<retkid> not to say the stdlib is perfect
21:40:53FromDiscord<retkid> if you have people to work with you and fix problems as they arise while not being unproductive, then it'll work. But its kinda like fighting against the wave. Damms and Dikes do exist, but they take a few thousand years of human time to be able to make
21:41:32FromDiscord<retkid> I'm by no means any expert on Nim, but thats been my experience. I love it to bits though.
21:43:14FromDiscord<Professor Actual Factual> I cant help shake off the hobbiest vibe tbh. I would really love to see more serious projects use nim in the future but in its current state i find it hard to do anything more complicated then clis and simple web apps.
21:44:04FromDiscord<spoon> all it needs is a good youtube tutorial series after nim 2 comes out
21:44:07FromDiscord<Rika> its hard for nim to grow if everyone who wants to use it for prod shuns it
21:45:26FromDiscord<Elegantbeef> I like the "It's got a small community so i wont use it"
21:47:22FromDiscord<Generic> my experience with libraries in Nim has been pretty good
21:47:26FromDiscord<Professor Actual Factual> In reply to @Elegantbeef "I like the "It's": Its a geniuine concern but not mine. The discord community had been more than helpful.↵↵I think its better worded as "a small community means little tooling" which is somewhat true, with the exception of communities like rust, where they are building everythting from scratch
21:47:39FromDiscord<Rika> In reply to @Professor Actual Factual "Its a geniuine concern": rust has a MASSIVE community
21:47:43FromDiscord<Rika> no comparison here
21:48:18FromDiscord<Rika> In reply to @Professor Actual Factual "Its a geniuine concern": "a small community means little tooling means i wont use it means a small community means little tooling means i wont use it means a small community....."
21:48:21FromDiscord<Professor Actual Factual> In reply to @Generic "my experience with libraries": Thanks for sharing, which domain does your work revolve against?
21:48:35FromDiscord<Generic> a few times I had to do something from scratch or translate some existing data structure
21:48:39FromDiscord<Professor Actual Factual> In reply to @Rika "rust has a MASSIVE": You have a point
21:49:21FromDiscord<Generic> In reply to @Professor Actual Factual "Thanks for sharing, which": emulation and games
21:50:04FromDiscord<Generic> I also wrote an assembler once
21:50:44FromDiscord<Generic> though I also already did more from scratch than most people do in C++
21:51:07FromDiscord<Zectbumo> why not unpack sequences into tuples? I don't get it
21:51:15FromDiscord<Zectbumo> !eval var s = @[[5],[6],[7]]; for (n,) in s: echo n
21:51:16NimBotCompile failed: /usercode/in.nim(1, 29) Error: wrong number of variables
21:51:30FromDiscord<Elegantbeef> Cause nim only has unpacking for tuples
21:51:43FromDiscord<Zectbumo> yeah, why?
21:51:52FromDiscord<Elegantbeef> Cause it only has unpacking for tuples
21:52:02FromDiscord<Generic> arrays/seqs only have a single type
21:52:08FromDiscord<Zectbumo> !eval var s = @[[5,1],[6,1],[7,1]]; for (n,_) in s: echo n
21:52:10NimBot5↵6↵7
21:52:13FromDiscord<Zectbumo> I just feel cheated here
21:52:31FromDiscord<Elegantbeef> The fact it works is a bug
21:52:43FromDiscord<Zectbumo> 🤦
21:52:47FromDiscord<Rika> a bug in that it is unintentional
21:53:02FromDiscord<Rika> i still dont know why this works
21:53:20FromDiscord<Elegantbeef> Probably that tuple unpacking just checks if `[0]` and `[1]` is valid but idk
21:53:24FromDiscord<Zectbumo> well can we expand this "bug" to cover more cases
21:53:29FromDiscord<Elegantbeef> I've not looked at the compiler's tuple unpacking logic
21:53:38FromDiscord<Elegantbeef> Yes writeup an RFC and submit it to the RFC repo
21:54:13FromDiscord<Elegantbeef> I personally like the premise of an unpack hook, to make it universally supported
21:54:39FromDiscord<Zectbumo> how would the unpack hook work?
21:55:31FromDiscord<Elegantbeef> You define a hook for your type it and the compiler uses it if it can
21:55:31FromDiscord<Elegantbeef> Otherwise it errors
21:55:32FromDiscord<Elegantbeef> So consider an sequence
21:55:37*dithpri joined #nim
21:56:01FromDiscord<Zectbumo> so you could unpack object attributes then with this hook
21:56:08FromDiscord<Zectbumo> (edit) "hook" => "hook?"
21:56:18*FromDiscord quit (Remote host closed the connection)
21:56:30*FromDiscord joined #nim
21:56:45FromDiscord<Elegantbeef> Then when you do `let (a, b, c) = mySeq`` it calls `=unpack(mySeq, 3)\`
21:56:47FromDiscord<Zectbumo> well I could do that already with yield
21:56:55FromDiscord<Elegantbeef> What?
21:58:07FromDiscord<Generic> I mean yeah theoretically tuple unpacking could be defined via items
21:58:25FromDiscord<voidwalker> ok so exporting a var in a .nim file, makes it available in another module that imports that .nim file. But what if I want a var from the main program available in a module, is that possible ? ↵I am trying to put the socket/messaging code of the app in a separate module, and not sure how I should make data from the main app module that imports "netserver.nim" available to it
21:58:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Yfi
21:58:56FromDiscord<Elegantbeef> Then import your main module from `subModule`
21:59:16FromDiscord<Elegantbeef> How?↵(@Generic)
21:59:51FromDiscord<Recruit_main707> In reply to @voidwalker "ok so exporting a": you probably would rather pass it as an argument to the needed functions no?
22:01:19FromDiscord<voidwalker> @Recruit_main707 I was trying to separate the socket/connections/messaging code in a module. Not sure if that's a good idea anyway, I suck at making stuff into modules.
22:01:59FromDiscord<voidwalker> And I was trying to access the main program's data/proc or whatever, to get it into the message request in the netserver module
22:02:04FromDiscord<Zectbumo> In reply to @Elegantbeef "What?": this is what I mean https://play.nim-lang.org/#ix=3Yfl
22:02:18FromDiscord<Elegantbeef> Sure but that's not unpacking
22:02:37FromDiscord<Zectbumo> makes unpacking moot
22:02:56FromDiscord<Elegantbeef> `let (n, ...m) = mySeq` could work with my hook idea
22:03:04*jmdaemon quit (Ping timeout: 248 seconds)
22:03:04FromDiscord<Generic> In reply to @Elegantbeef "How? (<@249581140363575297>)": by saying that tuple unpacking is defined as iterating through the first few elements and assigning them to the specified variables
22:03:19FromDiscord<Elegantbeef> Well that's not a good unpacking as it's not composable
22:03:29FromDiscord<retkid> In reply to @Rika "its hard for nim": +100
22:03:32FromDiscord<retkid> we are shuned
22:03:34FromDiscord<retkid> we are abused
22:03:36FromDiscord<retkid> we are outcasts
22:03:38FromDiscord<retkid> we are the FREAKS
22:03:46FromDiscord<Generic> though I forgot that tuples do not actually have items defined
22:03:52FromDiscord<Recruit_main707> In reply to @voidwalker "<@386230567571554305> I was trying": even without more context id advise you to try to do what i said, it probably is the way you want to go, and dont worry, we all have been there
22:04:01FromDiscord<Zectbumo> In reply to @Elegantbeef "`let (n, ...m) =": this would be cool
22:04:01FromDiscord<Elegantbeef> It means you can only unpack homgenous types
22:04:03FromDiscord<retkid> "just use python"↵"but you cant use clibraries"↵"is that PYTHON"↵"Why do this when I can use Rust"
22:04:13FromDiscord<Elegantbeef> If you want to unpack an object you couldnt do it with the items approach
22:04:17FromDiscord<retkid> (edit) ""just use python"↵"but you cant use clibraries"↵"is that PYTHON"↵"Why do this when I can use Rust"" => "sent a long message, see https://paste.rs/0uR"
22:05:00FromDiscord<Generic> then I would rather define the unpack hook as a macro though
22:05:10FromDiscord<Elegantbeef> It could be either
22:05:22FromDiscord<Elegantbeef> It just needs to be a callable bound to the type
22:06:05FromDiscord<retkid> imo nim
22:06:22FromDiscord<retkid> @Professor Actual Factual the biggest thing i hear against nim is "why nim when rust"
22:06:38FromDiscord<retkid> the only reason I can give is our macros are cooler
22:06:39FromDiscord<Rika> its a strange argument as well
22:06:48FromDiscord<retkid> but apart from that
22:06:51FromDiscord<retkid> its kinda apples and oranges
22:06:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Yfm
22:07:06FromDiscord<Rika> why would "... nim ... rust" be a valid argument and "... rust ... nim" not?
22:07:19FromDiscord<Elegantbeef> Cause NIm sucks rust good
22:07:25FromDiscord<retkid> well rust has more libraries and stuff
22:07:35FromDiscord<retkid> I think some people are
22:07:41FromDiscord<retkid> (edit) "I think some people are ... " added "bracket chauvinists"
22:07:47FromDiscord<voidwalker> ok Elegantbeef, so the point is that I have to do the var declaration before the module import, and have them import each other. That doesn't look like the right way to do it though
22:07:52FromDiscord<retkid> if it isn't a bracket language, its kiddy programming and not low level
22:08:07FromDiscord<Rika> lisp people seething
22:08:16FromDiscord<Rika> then again you could call parens "round brackets"
22:08:39FromDiscord<retkid> its still brackets, of some form
22:08:43FromDiscord<Elegantbeef> voidwalker delayed imports are the way to do recursive importing, it's generally only suggested when you need to
22:08:53FromDiscord<retkid> also Rika, its a pointer allocation problem lmao
22:09:04FromDiscord<Rika> howd you know
22:09:18FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977332210401181716/unknown.png
22:09:43FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977332317079093268/unknown.png
22:10:06FromDiscord<retkid> my baby brain didn't think it would get very large
22:10:10FromDiscord<Elegantbeef> Why are you using `create` for a reference type
22:10:15FromDiscord<Professor Actual Factual> sent a long message, see http://ix.io/3Yfp
22:10:29FromDiscord<Elegantbeef> `var output = new seq[person]; output[].setLen(myLen)`
22:10:46FromDiscord<Elegantbeef> you're allocating 8 bytes
22:10:53FromDiscord<retkid> In reply to @Elegantbeef "`var output = new": wait wait
22:11:01FromDiscord<retkid> this yields a pointer?
22:11:10FromDiscord<Rika> ref
22:11:11FromDiscord<huantian> new T returns ref T
22:11:13FromDiscord<Rika> it yields a ref
22:11:17FromDiscord<huantian> (edit) "new T" => "`new T`" | "ref T" => "`ref T`"
22:11:18FromDiscord<Elegantbeef> Use references instead of pointers cause it's 2022
22:11:18FromDiscord<Recruit_main707> too `newSeq[person](myLen)`
22:11:36FromDiscord<retkid> In reply to @Elegantbeef "Use references instead of": >:O
22:11:43FromDiscord<retkid> however you're right i dont need a pointer
22:12:10FromDiscord<Elegantbeef> You can always `Gcref output` and `cast[pointer](mySeq)` if you have user data
22:12:33FromDiscord<Elegantbeef> Userdata being type erased data like imgui or similar uses
22:12:57FromDiscord<retkid> no i had no need to fuck with manual allocation i just forgot refs existed
22:13:13FromDiscord<Elegantbeef> Lol
22:13:45FromDiscord<Elegantbeef> also create doesnt need a second argument you were allocating 64bytes
22:13:53FromDiscord<Elegantbeef> The entire point of create is that it allocates the `T`
22:14:02FromDiscord<voidwalker> In reply to @Elegantbeef "voidwalker delayed imports are": I am not sure if need to, certainly doesn't sound right. But what are the alternatives here (submodule handling connections/client messages loop, that needs to get data from the main program ?) Or maybe i should put the data in a separate module as well and import that. Or not use a module forthe server part but put it in main.. or.. ?
22:14:22FromDiscord<voidwalker> (edit) "In reply to @Elegantbeef "voidwalker delayed imports are": I am not sure if need to, certainly doesn't sound right. But what are the alternatives here (submodule handling connections/client messages loop, that needs to get data from the main program ... ?)" added "to reply back to clients"
22:14:26FromDiscord<Elegantbeef> Parent module supplies data for sub modules
22:14:44FromDiscord<Elegantbeef> If you can avoid global memory you'll be happy
22:14:55NimEventerNew thread by Dom96: Beware: phishing attempts on Nim users (PSA), see https://forum.nim-lang.org/t/9164
22:16:17FromDiscord<Rika> :MonkaS:
22:16:41FromDiscord<Elegantbeef> Is there really no authoritative wiki setting?
22:17:28FromDiscord<Andreas> hae, some nilly-willy can put hyperlinks into the wiki ? serious ?
22:20:04FromDiscord<dom96> the point of a wiki is to allow editing by anyone
22:20:25FromDiscord<retkid> kinda interesting someone is trying to phish programmers
22:20:52FromDiscord<Elegantbeef> Perhaps preventative measures are something that can be considered
22:20:53FromDiscord<retkid> the group of people most likely to see it coming
22:22:11FromDiscord<dom96> it certainly doesn't help that AVs falsely flag Nim on Windows
22:22:14FromDiscord<Andreas> In reply to @dom96 "the point of a": sounds to me as if you'd live somewhere in scandinavia ?
22:22:27FromDiscord<Rika> In reply to @dom96 "the point of a": really? why wouldnt there be a pr system like normal github though
22:22:32FromDiscord<dom96> so a fair chunk of Nim users might ignore a real problem
22:22:51FromDiscord<dom96> (edit) "problem" => "virus"
22:23:16FromDiscord<dom96> (edit) "so a fair chunk of Nim users might ignore a real virus ... " added "(if they get phished)"
22:23:24FromDiscord<dom96> In reply to @Rika "really? why wouldnt there": dunno, I guess that could be done
22:23:28FromDiscord<retkid> it doesn't help that I dont have an antivirus on linux
22:23:35FromDiscord<retkid> because i assume im smart enough not to install viruses
22:23:43FromDiscord<retkid> (edit) "viruses" => "viruses, the few that exist"
22:26:21FromDiscord<dom96> supply chain attacks are always scary unfortunately
22:26:30FromDiscord<dom96> I'm surprised they don't happen more often
22:26:42FromDiscord<retkid> they're pretty hard to do
22:26:51FromDiscord<retkid> they mostly get caught
22:27:19FromDiscord<retkid> https://nakedsecurity.sophos.com/2021/03/30/php-web-language-narrowly-avoids-dangerous-supply-chain-attack/
22:27:29FromDiscord<retkid> if this had gone through it would have been the largest in history
22:27:43FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3Yfs
22:29:01FromDiscord<dom96> In reply to @retkid "they mostly get caught": do they? There is many examples of them being successful: https://blog.sonatype.com/npm-project-used-by-millions-hijacked-in-supply-chain-attack
22:29:12FromDiscord<dom96> (edit) "successful:" => "successful, one such example:"
22:33:35*lumo_e quit (Quit: Quit)
22:33:41FromDiscord<retkid> saying npm got supply chained is like saying the sky is blue
22:33:58FromDiscord<retkid> every time i use npm i pray im not being phished
22:34:49FromDiscord<spoon> npm is wild, multiple people deleting hundreds of their repos for different reasons, the protestware incident
22:35:49FromDiscord<dom96> just a function of how popular it is surely, I'm sure the same risks exist in other ecosystems
22:36:43FromDiscord<retkid> I like to think every JS dev has bipolar disorder
22:36:53FromDiscord<retkid> and thats why npm is like thios
22:36:54FromDiscord<retkid> (edit) "thios" => "this"
22:37:12FromDiscord<spoon> there's also just a package for everything which relies on a package that relies on a package
22:37:14FromDiscord<spoon> <https://www.npmjs.com/package/is-even>
22:37:21FromDiscord<spoon> ^ relies on is-odd
22:38:16FromDiscord<retkid> https://www.npmjs.com/package/is-number
22:38:23FromDiscord<retkid> is number is the true dependency
22:38:24FromDiscord<Andreas> @dom96 does the wiki have a journal, where one can see who has added what and when ?
22:38:42FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977339610843725854/unknown.png
22:39:14FromDiscord<Andreas> (edit) "who" => "who" | "what" => "what" | "when" => "when"
22:39:38FromDiscord<dom96> In reply to @Andreas "<@132595483838251008> does the wiki": good question, I have no idea :)
22:39:52FromDiscord<dom96> all I can see is the revisions for a specific page
22:39:57FromDiscord<dom96> but nothing for the whole wiki
22:40:22FromDiscord<Andreas> In reply to @dom96 "good question, I have": this is Mickey-soft-lang, right ? they should be aware of crooks, spammers etc.
22:40:35FromDiscord<Andreas> (edit) "Mickey-soft-lang," => "Mickey-soft-county,"
22:41:03FromDiscord<dom96> "Mickey-soft-county"?
22:41:19FromDiscord<Andreas> In reply to @dom96 "but nothing for the": can you pull the revisions via a API ?
22:41:48FromDiscord<retkid> In reply to @Andreas "this is Mickey-soft-county, right": I choose to use the italian and pronounce it with a hard ch
22:41:56FromDiscord<Andreas> (edit) "In reply to @dom96 "but nothing for the": can you pull the revisions via a API ? ... " added "- then we should consider a 'spider' who looks for spurious edits"
22:42:30FromDiscord<retkid> @Rika idk if you'd know why, but, after about 2 gbs it starts to read exponentially faster
22:42:42FromDiscord<retkid> is this a cpu or ssd bottleneck
22:42:53FromDiscord<Rika> i dont know lol
22:43:27FromDiscord<retkid> kinda weird that there are over 50000 people with a wikipedia article and im no where near done
22:51:23FromDiscord<ambient> anyone on mac able to tell if its better to install nim through brew or website
22:56:06FromDiscord<Andreas> @dom96 https://docs.github.com/en/communities/documenting-your-project-with-wikis/about-wikis seems one can set access-preferences. I'm pretty sure one use some REST or Graph-QL-APIs to get these informations who did what when and if these 'contributions' shall stay in..
23:04:16*gsalazar quit (Ping timeout: 272 seconds)
23:07:50FromDiscord<Zectbumo> In reply to @ambient "anyone on mac able": I was told using choosenim is the way to go
23:08:30*Perryman quit (Remote host closed the connection)
23:09:12FromDiscord<Andreas> In reply to @Zectbumo "I was told using": brew worked for me, since i could not compile myself - Mojaves compiler is too old..
23:09:18FromDiscord<Elegantbeef> Choosenim or gitnim is the better way
23:09:31FromDiscord<Elegantbeef> Being able to easily change between versions is lovel
23:09:33FromDiscord<Elegantbeef> lovely\
23:12:08FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3Yfy
23:12:47FromDiscord<Elegantbeef> It doesnt even parse
23:12:58FromDiscord<ambient> tried to install with the curl / sh script, but failed "command unxz not found"
23:14:00FromDiscord<ambient> for fresh m1 mac
23:14:07FromDiscord<ambient> with brew and xcode command line utils
23:15:35FromDiscord<ambient> just fyi already installed xz, but something that might trip up people just wanting to play with new language on their mac
23:16:55FromDiscord<Zectbumo> In reply to @Elegantbeef "It doesnt even parse": oh because of the `,` can't be used as an identifier? I wonder why the backticks doesn't allow that
23:17:12FromDiscord<retkid> In reply to @Zectbumo "<@145405730571288577> what do you": it looks like boobs
23:17:48FromDiscord<Zectbumo> '''nim↵proc `(_,_,_)`(myType: MyType): (int, string) = (myType.a, myType.b, myType.c)↵'''
23:18:01FromDiscord<Zectbumo> (edit) "'''nim↵proc `(_,_,_)`(myType: MyType): (int, string) = (myType.a, myType.b, myType.c)↵'''" => "sent a code paste, see https://play.nim-lang.org/#ix=3YfA"
23:18:04FromDiscord<Zectbumo> now what does it look like?
23:18:26FromDiscord<Zectbumo> (edit) "https://play.nim-lang.org/#ix=3YfA" => "https://play.nim-lang.org/#ix=3YfB"
23:18:41FromDiscord<Elegantbeef> Total recall boobs
23:19:06FromDiscord<Zectbumo> I guess I don't need the `(_,_) because the return type already says how many tuple items are being returned
23:19:12FromDiscord<Zectbumo> (edit) "`(_,_)" => "`(_,_)`"
23:19:17FromDiscord<Elegantbeef> Well in the case of a proc variant it does
23:19:21FromDiscord<Elegantbeef> With a macro it wouldnt
23:19:35FromDiscord<Zectbumo> proc `()`(myType: MyType): (int, int, string) = (myType.a, myType.b, myType.c)
23:20:00FromDiscord<Zectbumo> (edit) "proc `()`(myType: MyType): (int, int, string) = (myType.a, myType.b, myType.c)" => "sent a code paste, see https://play.nim-lang.org/#ix=3YfC"
23:20:14FromDiscord<Elegantbeef> `=unpack` is better as it matches the preexisting type bound operators
23:21:06FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3YfD
23:21:17FromDiscord<Elegantbeef> What do you mean there is no `=`
23:21:28FromDiscord<Elegantbeef> `=name` is how nim defines type bound operations
23:21:35FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=
23:21:43FromDiscord<Zectbumo> ^--- has `=`
23:21:53FromDiscord<Elegantbeef> we have `=copy` `=destroy` `=trace`
23:21:57FromDiscord<Elegantbeef> The `=` is unrelated
23:22:03FromDiscord<Zectbumo> okay
23:22:22FromDiscord<huantian> it would be cool to see `items` and `pairs` also have that syntax but that's probably not happening
23:22:25FromDiscord<Elegantbeef> There are 4 type bound hooks already and unpack would add another
23:22:49FromDiscord<Zectbumo> `=unpack` it is then
23:22:50FromDiscord<Elegantbeef> Implicit items/pairs is broken for generics so yea
23:24:03FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3YfF
23:24:05FromDiscord<retkid> (edit) "https://play.nim-lang.org/#ix=3YfF" => "https://paste.rs/D2t"
23:24:17FromDiscord<Elegantbeef> Just go with the total recall 3 tits and carry on
23:25:02FromDiscord<Zectbumo> total recall response was great \:D
23:25:23FromDiscord<Elegantbeef> Thanks i try
23:25:44FromDiscord<retkid> imagine trinary computers
23:25:52FromDiscord<Elegantbeef> They exist
23:25:58FromDiscord<retkid> why do they exist
23:26:03FromDiscord<Zectbumo> 1,0,Z
23:26:26FromDiscord<Zectbumo> it's like a nil
23:26:28FromDiscord<Rika> because they wanted to try
23:26:34FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977351658839351296/unknown.png
23:26:51FromDiscord<retkid> https://tenor.com/view/steve-buscemi-gif-20922935
23:27:01FromDiscord<Rika> quit when
23:27:06FromDiscord<Rika> would be funny
23:27:29FromDiscord<retkid> In reply to @Rika "quit when": the when keyword?
23:27:35FromDiscord<Rika> ?
23:27:38FromDiscord<retkid> thats something that python would do
23:27:39FromDiscord<Rika> no 4-bit
23:27:45FromDiscord<retkid> ....
23:27:46FromDiscord<retkid> i hate it
23:27:49FromDiscord<Zectbumo> In reply to @retkid "why do they exist": to do fuzzy logic
23:27:54FromDiscord<Rika> quad bit -> quit -> "lol quit"
23:28:17FromDiscord<retkid> In reply to @Zectbumo "to do fuzzy logic": my name is fuzzy logic
23:30:05FromDiscord<retkid> So some people think they're cooler than binary and binary only happened because of mass manufacturing
23:30:34FromDiscord<Rika> a lot of things are only because theyre much easier to manufacture
23:31:04FromDiscord<retkid> i disagree because maybe they are cooler computationally but binary is the most efficient way of storing data so you'd end up loosing some of the power in encoding and decoding from ram, unless you want to have less ram
23:31:07FromDiscord<Generic> binary is cooler because you can shift to multiply/divide by powers of two
23:31:24*ltriant joined #nim
23:31:27FromDiscord<retkid> you can probably do something cooler with the third state
23:31:46FromDiscord<retkid> there is a mass produced tinary computer made by Samsung apparently
23:31:48FromDiscord<Rika> it would be difficult to design, though then again we got DDR to work
23:31:48FromDiscord<Elegantbeef> That works for any base it's just the power of the base↵(@Generic)
23:31:51FromDiscord<retkid> for research
23:32:02FromDiscord<Zectbumo> we might need a better error message than `Error: attempting to call routine: 'rows'`
23:32:15FromDiscord<retkid> In reply to @Rika "it would be difficult": DDR5 Is a testament↵ to humanity
23:32:21FromDiscord<Zectbumo> yes, yes I am attempting to call rows. what's the problem?
23:32:31FromDiscord<retkid> mass manufacture of DDR5 Is like a fucking miracle
23:33:20FromDiscord<retkid> In reply to @Zectbumo "we might need a": are you compiling on danger / release?
23:33:30FromDiscord<Zectbumo> no
23:33:38FromDiscord<Elegantbeef> compiling with those flags dont change the compiler error messages
23:33:47FromDiscord<retkid> ah
23:33:56FromDiscord<retkid> is this like that time i tried to compile 1000000000 spaces
23:34:18FromDiscord<Elegantbeef> What even are you compiling that the compiler doesnt give more info
23:34:23FromDiscord<Zectbumo> the problem is I tried calling rows, but rows doesn't exist as a proc since it's an iterator. but the message is confusing
23:34:34FromDiscord<retkid> ahhhh
23:34:52FromDiscord<retkid> well you're expected to know what you're calling is an iterator or a proc
23:34:53FromDiscord<Generic> In reply to @Elegantbeef "That works for any": yes I know, but dividing/multiplying by powers of two is just more useful than by powers of three
23:35:00FromDiscord<retkid> because
23:35:07FromDiscord<Zectbumo> it should say, `Error: rows not found, I do see:` and list iterators
23:35:15FromDiscord<Elegantbeef> No it should
23:35:26FromDiscord<Elegantbeef> say "Attempting to call iterator 'rows'"
23:35:34FromDiscord<Zectbumo> or that
23:35:49FromDiscord<Zectbumo> but it's not in the same namespace, so...
23:36:12FromDiscord<retkid> 1. To know you can use something called "rows" you'd have to have ↵ 1. seen code which uses it as an iterator ↵ 2. Have read it was a thing from the wiki, being used as an iterator
23:36:23FromDiscord<Elegantbeef> Or even "Attempting to call iterator `rows`, Iterators cannot be called like procedures." 😄
23:36:34*ltriant quit (Ping timeout: 272 seconds)
23:36:37FromDiscord<retkid> we can go more verbose
23:36:50FromDiscord<Elegantbeef> retkid compiler errors should tell you how to fix the issue not just there is an isssue
23:37:08FromDiscord<Zectbumo> I would like to see a --d:retkid flag
23:37:12FromDiscord<Elegantbeef> It doesnt need to be as indepth as elm or rust, but it should atleast make it clear
23:38:07FromDiscord<retkid> "You are attempting to call an ``iterable function`` (iterator), it cannot be called as it is required to be instantiated as instructions in a loop, rather than executed alone as a proc"
23:38:27FromDiscord<Rika> that doesnt read well no
23:38:29FromDiscord<Elegantbeef> it's not an iteratable function
23:38:38FromDiscord<retkid> is there a technical word for iterator
23:38:42FromDiscord<Elegantbeef> an iteratable function is a closure iterator
23:38:48FromDiscord<Elegantbeef> Yes an inline iterator
23:38:55FromDiscord<retkid> inline iterator
23:39:19FromDiscord<retkid> I think of them like functions called between the code below
23:39:29FromDiscord<Elegantbeef> \`"Cannot call iterator 'rows', it is an inline iterator that must be used in a for loop"
23:39:30FromDiscord<retkid> which define ``foo`` as they operate
23:39:44FromDiscord<Elegantbeef> They're not functions they're templates
23:39:58FromDiscord<retkid> im not talking in nim-terms
23:40:14FromDiscord<Zectbumo> or, I'm trying to call rows() and I forgot to import it
23:40:31FromDiscord<retkid> then it would yield undefined reference
23:40:33FromDiscord<Elegantbeef> If you forgot to import it there isnt much to say except "unknown identifier"
23:40:43FromDiscord<Zectbumo> exactly!
23:40:50FromDiscord<retkid> elegant beef has looked into the compiler too long
23:40:58FromDiscord<retkid> he remembers the exact wording
23:41:10FromDiscord<Zectbumo> https://discord.com/channels/371759389889003530/371759389889003532/977353812018888724
23:41:24FromDiscord<Rika> it says that in other words
23:41:42FromDiscord<retkid> my bias for elegant beef always being correct has been exposed
23:41:44FromDiscord<Elegantbeef> I mean the compiler knows `rows` it just knows you're misusing it
23:41:55FromDiscord<Rika> of what relevance would the "found :..." part be if the thing you used is undefined?
23:42:04FromDiscord<Zectbumo> maybe
23:42:11FromDiscord<retkid> !eval echo x
23:42:12NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'x'
23:42:21FromDiscord<Elegantbeef> Nim actualyl does suggest similar identifiers which is somewhat helpful
23:42:28FromDiscord<retkid> exactly he was right
23:42:46FromDiscord<Rika> personally havent found use in it but w/e, n=1
23:42:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3YfH
23:44:15FromDiscord<retkid> do you guys think nim would be more popular if we continued to support both brackets and whitespace
23:44:36FromDiscord<Rika> no
23:44:39FromDiscord<Elegantbeef> No
23:44:44FromDiscord<Zectbumo> no
23:44:50FromDiscord<Elegantbeef> No
23:44:55FromDiscord<Rika> beef you said no twice
23:44:59FromDiscord<Elegantbeef> Yes
23:45:08FromDiscord<Rika> no
23:45:09FromDiscord<Elegantbeef> Had to finish the pattern
23:45:09FromDiscord<Zectbumo> he gets two votes
23:45:20FromDiscord<Rika> can i have two too
23:45:29FromDiscord<Zectbumo> um, let's vote
23:45:34FromDiscord<retkid> what if nim only used curly braces
23:45:38FromDiscord<Elegantbeef> Anyway people that bitch about inane things probably wouldnt use it to begin with
23:45:40FromDiscord<Rika> i wouldnt be here if that was so
23:45:52FromDiscord<retkid> i learned nim because it didn't have braces
23:45:56FromDiscord<Elegantbeef> I came from C# so i'd still probably be here
23:45:57FromDiscord<retkid> but i think it would be popular
23:46:13FromDiscord<retkid> I came from bash python java
23:46:19FromDiscord<Rika> did you mean thought
23:46:24FromDiscord<Zectbumo> In reply to @retkid "what if nim only": why not both?
23:46:28FromDiscord<retkid> we did that
23:46:29FromDiscord<retkid> its bad
23:46:40FromDiscord<Elegantbeef> Let's have 2 concurrent parsers
23:46:43FromDiscord<Elegantbeef> That's going to end well 😄
23:47:37FromDiscord<retkid> as well as people would operate differently, some would like curly some would like white space, and if you copy code you gotta convert over
23:47:47FromDiscord<retkid> imagine a company where half the code is in white space and the other in curly
23:48:07FromDiscord<Zectbumo> I don't see why we can't have both↵`block { ... }` and `block: ...`
23:48:13FromDiscord<retkid> we did
23:48:20FromDiscord<retkid> we dont anymore
23:48:20FromDiscord<Zectbumo> and what happened?
23:48:27FromDiscord<retkid> In reply to @Elegantbeef "Let's have 2 concurrent": .
23:48:40FromDiscord<retkid> pita to add features and maintain
23:48:56FromDiscord<retkid> split community, other reasons
23:49:38FromDiscord<Zectbumo> hmm, well nim already has that same issue in various places. like identifiers for example
23:49:54FromDiscord<Zectbumo> or calling conventions
23:50:17FromDiscord<retkid> everybody writes code differently in nim
23:50:38FromDiscord<retkid> its a symptom of being a small language where people come from different languages and there is no one institution like college forcing it onto people
23:50:56FromDiscord<Zectbumo> I would just let the `{}` and still enforce the indentation as-is. so the `{}` is noop sugar
23:51:06FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977357833500782622/unknown.png
23:51:12FromDiscord<retkid> some people like me only write bad code
23:51:32FromDiscord<Zectbumo> what editor?
23:51:36FromDiscord<retkid> code
23:51:47FromDiscord<retkid> people may notice i lack my atom one theme
23:51:55FromDiscord<retkid> im too lazy to install it
23:52:46FromDiscord<Zectbumo> In reply to @retkid "code": that's impossible to google
23:53:04FromDiscord<Rika> its the brandless version of vscode
23:54:35FromDiscord<Zectbumo> the great thing about nim is choice, and the worst thing about nim is choice
23:54:35FromDiscord<retkid> code ide
23:54:54FromDiscord<retkid> the worst thing about nim is writing types al lthe time
23:55:01FromDiscord<retkid> (edit) "lthe" => "t he"
23:55:05FromDiscord<retkid> (edit) "al t he" => "all the"
23:55:12FromDiscord<retkid> choice is nowhere near on my mind
23:55:20FromDiscord<retkid> i think nim is one of the more linear languages
23:55:23FromDiscord<Rika> psst `using`
23:55:39FromDiscord<retkid> In reply to @Rika "psst `using`": que?
23:55:44FromDiscord<Rika> https://nim-lang.org/docs/manual.html#statements-and-expressions-using-statement
23:55:44*Guest95 joined #nim
23:56:35FromDiscord<retkid> thats not much better
23:56:45FromDiscord<Rika> why noit
23:56:47FromDiscord<Rika> (edit) "noit" => "not"
23:57:02FromDiscord<retkid> i mean especially when you're writing types for threads
23:57:08FromDiscord<Rika> what?
23:57:10FromDiscord<retkid> like
23:57:18FromDiscord<retkid> Thread[]
23:57:27FromDiscord<Rika> okay?
23:57:30FromDiscord<Rika> no idea
23:57:30FromDiscord<retkid> Thread[(a,b,c,d,e)]
23:57:44FromDiscord<retkid> then you pass your tuples around
23:58:08FromDiscord<Rika> its prolly not too difficult to make a macro that processes a proc into a Thread[] based proc
23:58:22FromDiscord<retkid> I've been meaning to do that
23:58:29FromDiscord<retkid> to automate all of the typing and just execute stuff on threads
23:58:43FromDiscord<retkid> but macros scare me so next time i dont wanna work on a project im gonna learn pytorch and not nim macros
23:59:02FromDiscord<retkid> also gotta learn more F#
23:59:14FromDiscord<VideoCarp> Macros are cool
23:59:19FromDiscord<retkid> they scary
23:59:27FromDiscord<Elegantbeef> They're really not
23:59:31FromDiscord<Rika> eh
23:59:34FromDiscord<Rika> theyre ok
23:59:54FromDiscord<Elegantbeef> In your case you iterate the proc's arguments replace any `var`/`ref` with `ptr` and make a tuple instead