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