<< 20-08-2019 >>

00:21:08*ng0 quit (Quit: Alexa, when is the end of world?)
03:13:07*rockcavera quit (Remote host closed the connection)
03:49:04*endragor joined #nim
03:54:26FromGitter<Obround> How do you create a custom IndexError? I tried inheritance but it didn't work.
03:55:18*chemist69 quit (Ping timeout: 252 seconds)
03:57:15*chemist69 joined #nim
03:59:08*dddddd quit (Remote host closed the connection)
04:19:38*laaron- quit (Remote host closed the connection)
04:22:11*laaron joined #nim
04:38:49FromDiscord_<DeltaPHC> If I'm starting a new project and don't mind the bleeding edge builds, is newruntime worth using right now? I know a similar question was asked, but I'm more wondering about how complete it is for real world use
04:42:46*nif quit (Quit: ...)
04:42:55*nif joined #nim
04:43:46*fjellfras joined #nim
04:44:33*nsf joined #nim
04:50:44*actuallybatman quit (Ping timeout: 272 seconds)
05:16:14*laaron quit (Remote host closed the connection)
05:16:57*laaron joined #nim
05:27:28*actuallybatman joined #nim
05:34:48*narimiran joined #nim
06:08:37*LargeEpsilon_ joined #nim
06:12:04*solitudesf joined #nim
06:17:28AraqDeltaPHC: it's worth giving it a try
06:23:37*PMunch joined #nim
06:25:21FromGitter<arnetheduck> https://github.com/arnetheduck/nlvm/pull/14 - dwarf exception handling for `nlvm` - not ready yet but getting close to an initial version - comments welcome
06:30:46Araqdid you know you can use --lib:path to override the location of system.nim?
06:31:48Araqnot directly related but could be very useful for nlvm
06:32:21FromGitter<arnetheduck> yeah, but I just need a small extension to it for now - I don't want to rewrite all of it , so I'd have to find some way to turn the table and import nim's system.nim
06:35:06FromGitter<arnetheduck> in this particular case, I guess part of the problem is that `system.nim` is pretty crowded with features and needs exception support so there's an order-of-import issue as well
06:41:42Araqsystem.nim simply needs even more include files :P
06:41:55Araqthen you can create your own system.nim by including the stuff that you need
06:42:01*krux02 joined #nim
06:48:28FromGitter<arnetheduck> that's pretty much what's needed to make nim a serious `wasm` language, much more so than for `nlvm`
06:48:36ZevvBwaaah, error message of the day "A nested proc can have generic parameters only when it is used as an operand to another routine and the types of the generic paramers can be inferred from the expected signature."
06:52:01FromGitter<arnetheduck> that said, I admire musl for recognising that in the case of a standard library that almost never changes, there's incredible value to eschew a lot of common code advice and for example favour simple code over complicated when jungles and include patterns, even if it sometimes adds a tiny bit of work to duplicate a symbol across a few files when updating it
06:59:01Araqyeah, you have your double standards. When I do the same it's because I don't write code from "first principles"
07:00:00*gmpreussner quit (Quit: kthxbye)
07:02:29FromGitter<arnetheduck> define the principles, then we can discuss them ;)
07:04:29*gmpreussner joined #nim
07:08:23FromGitter<arnetheduck> "When will it be finished? ⏎ ⏎ ```When there's nothing left to remove." - musl faq ;)``` [https://gitter.im/nim-lang/Nim?at=5d5b9c67beba830fffcab340]
07:10:41FromGitter<arnetheduck> why is `nil` a type btw?
07:28:19Zevvleorize[m]: here?
07:30:08leorize_o/
07:30:10*leorize_ is now known as leorize
07:30:29Zevvola! I just realized a github issue would be better then an IRC comment, so just posted :)
07:31:44*terps joined #nim
07:32:12*laaron quit (Remote host closed the connection)
07:32:24leorizewell I do know a way, but that'd have to wait
07:32:32leorizeI'm rewriting major parts of nim.nvim
07:32:34Zevvyes, about three seconds would be good
07:32:47Zevv:)
07:33:04Zevvrewriting, already!
07:33:23leorizethe current nim.nvim code is literally hacks I added togheter until stuff starts working :P
07:33:37ZevvAnd of course Vim8 support
07:33:46leorizeno :P
07:33:49Zevvbwaah
07:33:54leorizebut it's now easier than ever to add vim8 support :P
07:33:58leorizethe code is much much cleaner
07:34:01Zevvthen *do* it :)
07:34:08Zevvit will triple your user base
07:34:11leorizeI don't use vim :P
07:34:12*laaron joined #nim
07:34:19narimiranZevv: 4 new users?
07:34:35Zevvimagine, leorize, the man offering the one true Nim integration with the legendary Vim editor
07:34:50leorizelol
07:34:52Zevvyour math doesn't add up btw
07:34:55FromGitter<arnetheduck> solve `_ * 3 == 4` for integers, narimaran ;)
07:35:00Zevvright :)
07:35:03narimiran4 **new** users
07:35:19FromGitter<arnetheduck> fair
07:35:23narimiran1 = zevv, 2 = narimiran, 3, 4, 5, 6 = four new users
07:36:25FromGitter<arnetheduck> you win :)
07:36:30narimiran:)
07:42:07*ikan-keli_ quit (Ping timeout: 245 seconds)
07:43:16*ikan-keli_ joined #nim
07:43:39leorizewell I have 33 stars so... 33 users?
07:44:13narimiran"there are dozens of us! dozens!!"
07:44:25leorizevimscript is so terrible...
07:44:54leorizeI could write this plugin in Nim, actually
07:44:59*terps quit (Ping timeout: 250 seconds)
07:52:15*shomodj joined #nim
07:55:46*laaron quit (Remote host closed the connection)
07:58:16*laaron joined #nim
08:01:12PMunchI use Nim in Vim, but I don't think I use your plug-in :(
08:01:29Zevvno, because it only supports nvim
08:01:38PMunchAh
08:01:42Zevvwhile he is only a hair away from adding vim support
08:02:18ZevvI now have a split ecosystem on various of my machines, all because of leorize
08:02:35PMunchWell I really just use the Vim plug-in to get syntax highlighting, and nimlsp for the rest
08:02:51Zevvi must admit having nimsuggest is nice
08:03:36Zevvalthough I now sometimes feel like traveling by subway to a new city. I go all over the place, but I'm never exactly certain how I got there
08:03:59ZevvI do miss the traveling, the scenery and just getting to know the landscape
08:04:25leorizeif I ever support vim, it would have feature parity with nimlsp + vim plugin...
08:04:36Zevv"mind the gap", and poof you're there
08:07:51leorizecurrently I don't think vim users miss out too much without my plugin, so if you want to motivate me to add vim support, you'd need a good reason :p
08:23:41*user0 joined #nim
08:23:53*user0 is now known as user0224
08:24:47leorizeZevv: the nimsuggest error highlighting group is nimSugUnknown
08:25:13leorizeyou can add an autocmd to clear the highlight
08:25:40leorizethen setup a timer or use the CursorHold event to reactivate the highlight later on
08:27:27*floppydh joined #nim
08:30:16*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:31:50*user0224 quit (Quit: user0224)
08:33:37Araq"When there's nothing left to remove." also happens when "There is no user left"
08:33:52*user0225 joined #nim
08:36:49Zevvthen you have reached nirvana. no users, no bugs
08:37:32Zevvimagine, zero issues and PRs on github
08:37:39Araqyou've described Oberon. Nothing in there to remove, no bugs, no users.
08:37:54Zevvleorize: tahanks, will try that
08:40:54*laaron quit (Remote host closed the connection)
08:46:28*laaron joined #nim
08:59:35*shomodj joined #nim
09:11:23*terps joined #nim
09:13:55*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:22:18*shomodj joined #nim
09:50:18*ng0 joined #nim
09:50:47*ng0 quit (Client Quit)
09:51:03*ng0 joined #nim
09:58:23*user0225 quit (Quit: user0225)
10:04:58FromGitter<arnetheduck> well, on that topic we were discussing a way to turn issues into PR:s - there's plenty of bugs that could be turned into test cases already (like https://github.com/nim-lang/Nim/issues/11941) - we added the blacklist feature to testament not long ago and in `nlvm` I use that to track incompatibilities with upstream, but we could start adding these snippets as failing test cases already even if the fix needs more
10:04:58FromGitter... surgery
10:07:16*terps quit (Ping timeout: 264 seconds)
10:11:50*mattmurr left #nim ("User left")
10:14:58*terps joined #nim
10:17:00Araqdid you just describe shashlick's tissue tool?
10:23:47FromGitter<arnetheduck> never heard, link?
10:29:56*actuallybatman quit (Ping timeout: 248 seconds)
10:31:35Araqhttps://github.com/genotrance/tissue
10:34:44*LargeEpsilon_ quit (Ping timeout: 248 seconds)
10:37:14*LargeEpsilon_ joined #nim
10:38:36FromGitter<arnetheduck> ah ok. yeah something like that but ideally instead of creating an issue in the Nim issues repo, I'd create a PR with a test case instead that would stay in the Nim repo so it's easier to work on it.. something like the "ignored" tests, but it could actually run the tests and see if maybe by accident they've been fixed.. these could also be backported to different nim versions to find out how broken they are
10:38:48*elrood joined #nim
10:51:14*LargeEpsilon_ quit (Ping timeout: 244 seconds)
10:53:29*dddddd joined #nim
10:53:50FromGitter<alehander42> btw Araq, https://forum.nim-lang.org/t/5103 i dont understand this
10:54:07FromGitter<alehander42> many some strutils methods have ok usages (even if often they are overused)
10:54:18FromGitter<alehander42> arguing they are *always* hacks is bizarre to me
10:55:25FromGitter<alehander42> the best way to split text by whitespace is .. by using splitWhitespace, and there are often cases one doesnt need to support a 5page-spec-based format
10:56:15*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:56:44FromGitter<alehander42> (but yeah i agree that it would be good to popularize a more powerful alternative!)
10:56:53*shomodj joined #nim
10:58:44*dddddd quit (Ping timeout: 248 seconds)
11:00:24*dddddd joined #nim
11:02:51*LargeEpsilon_ joined #nim
11:05:47*clyybber joined #nim
11:06:18*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:06:51*shomodj joined #nim
11:11:31*shomodj quit (Ping timeout: 258 seconds)
11:16:58Araqsplit is not the same as splitWhitespace
11:17:33Araqand the fact that it's grown a 'maxsplit' parameter means for abuse
11:17:43Araq*it's for abuse
11:19:51*fjellfras quit (Quit: Leaving)
11:21:58Araqand I've dealt with way too many broken CSV files in the past to encourage 'split', it's not a "high level tool", it's the wrong tool much like regexes is the wrong tool for parsing
11:22:37Araqmuch like using hash tables as the foundation for an object sytem is the wrong tool
11:23:57Araqor like string concats are the wrong tool to generate valid XML.
11:24:17FromGitter<zah> Not strictly related, but I'm pretty sure our faststreams library will give a pretty significant performance boost to the benchmark discussed in the forum. Here are some results for another compression format: ⏎ https://github.com/status-im/nim-snappy/pull/1
11:25:20*LargeEpsilon_ quit (Ping timeout: 244 seconds)
11:25:41Araqshould we also make SQL generation by string concats more convenient to do? I mean, newbies do it and SQL injections are totally not a thing
11:26:32Araqand hey, in Python I can easily construct SQL queries via '+' so why can't I in Nim?
11:28:22FromGitter<alehander42> Araq, but we dont deprecate regex .. because it is useful for *some* tasks. the language can't decide such a very high level thing as "is this usage of split correct" for the users
11:28:34clyybberzah: How is faststreams so much faster than stdlib streams?
11:28:49clyybberAnd is there any way to incorporate the improvements into the stdlib?
11:28:51Araqsure but I can decide "you're a moron if you use split and so we don't spend effort on optimizing it further"
11:29:10FromGitter<alehander42> and this wouldn't be a very smart decision :(
11:29:19Araqit's not slow btw
11:29:44*LargeEpsilon joined #nim
11:29:58FromGitter<alehander42> the code generation thing also doesnt seem as a great argument: i can write a very type-safe sql library which still uses internally some form of string formatting/concat
11:30:50*laaron quit (Remote host closed the connection)
11:31:01FromGitter<zah> I will provide more details at some point in the README, but the main idea is that the most common operations are not "virtual" (they don't use dynamic dispatch). The faststreams offer several ways for you to manage a buffer and the virtual operations are invoked only when the buffer is fully populated or consumed ⏎ ⏎ If the very common case of working with memory buffers or memory-mapped files, there is no dynamic
11:31:01FromGitter... dispatch at all, ever.
11:32:25clyybberAh ok, with your 'from mem' idea it will essentially be dynamic dispatch though wont it?
11:32:43Araqthis whole discussion is just your usual "I don't want to be told I've been doing things wrong", but you have and if you disagree, just continue to use 'split', I have no power over you.
11:33:11FromGitter<arnetheduck> on a disk, whether your calls are virtual or not matters little.. split is slow predominantly because it solves the problem eagerly and returns a seq of all things
11:33:16FromGitter<zah> @Clyybber, what do you mean when you say my "from mem" idea?
11:33:17*stefanos82 joined #nim
11:33:35FromGitter<zah> split can be and already is an iterator
11:33:48clyybberzah: This: https://github.com/status-im/nim-faststreams/blob/master/faststreams/input_stream.nim#L55
11:34:17*laaron joined #nim
11:34:21FromGitter<zah> ah, this comment is about lifetime tracking and memory safety
11:34:39clyybberAt compiletime?
11:34:44FromGitter<zah> Currently, Nim doesn't have enough features to prove that the usage of the faststreams API is always safe
11:35:05FromGitter<arnetheduck> takes 10ms to read a block from a normal ssd - you must be doing something pretty bad with your virtual calls for them to show a measurable difference ;)
11:35:15*laaron quit (Remote host closed the connection)
11:35:36FromGitter<zah> I've promised to write an RFC about it. I've talked about it here for example: ⏎ https://github.com/nim-lang/Nim/pull/11824#issuecomment-515061902
11:35:39FromGitter<arnetheduck> oh, there's a split proc too. keep forgetting these don't share namespace
11:36:27*laaron joined #nim
11:37:04Araqand before it comes up... yes if only Nim has firstclass support for slicing... Here is the thing: In Python the split also materializes the substrings, go figure.
11:37:51Araqand the JVM's strings had support for it and they removed it again to save 8 bytes per string instance
11:38:06FromGitter<bevo009> @leorize one thing I forgot to mention about your nim plugin ⏎ When you exit and it prints that exit line, it doesn't print a new line ⏎ So your prompt ends up way across the screen: ⏎ ```nimsuggest instance for project: `/c/a/nim/nimcpp/01/' exited with exitcode: 0@ bevo  DAW  c  a  nim  nimcpp  01  $ ``` [https://gitter.im/nim-lang/Nim?at=5d5bdb9d53490e334d2bbeed]
11:38:13clyybberzah: I would love to read the RFC
11:39:21FromGitter<zah> @arnetheduck, if you don't believe in the overhead, look at the numbers in the issues I linked
11:39:47FromGitter<arnetheduck> nah slicing is 00's, to keep up with last year you have to do SSO on your strings
11:40:00AraqRust doesn't do SSO
11:40:05Araq:P
11:40:26FromGitter<arnetheduck> that's it, I'm abandoning it
11:40:37Araqlol
11:40:47FromGitter<alehander42> Araq, i also use join
11:40:51FromGitter<alehander42> :(
11:41:05FromGitter<alehander42> and not the sql one! the sql one is too complicated
11:41:48FromGitter<alehander42> no , really, i agree that some of those are overused, but that doesnt mean a fast string-handling lib is a bad thing
11:42:31clyybberShouldn't we use views/openarray for split?
11:42:42FromGitter<zah> We'll soon say SSO is so 2010s, use a shadow stack instead :P
11:42:50Araqcan't, the language support isn't there, clyybber
11:43:12Araqwe do have the right builtins to do it though and the right amount of borrow checking
11:43:14FromGitter<arnetheduck> @zah of course, as a programmer it's always good to throw in an unnecessary for loop with some dumb code inside so you have something to optimize later on, good for job security if nothing else :) but speedups on virtual calls simply means you're making too many virtual calls
11:43:24clyybberAraq: So whats missing?
11:43:28FromGitter<zah> Yes, basically my RFC is about how to relax the rules and add support for `openarray` as return type
11:43:44clyybberAh, thats missing
11:44:13Araqalehander42: it's fine, I need a break, bbl
11:45:53FromGitter<zah> @arnetheduck, in a typical parsing and lexing, it's convenient to consume the input byte by byte. If you are not careful, you can end up with a bunch of virtual calls for every byty (say when you are reading a compressed and encrypted input stream0
11:46:22FromGitter<zah> 1) bunch of virtual calls for every byte *
11:47:06clyybberAh, btw Araq, zah did you find a common denominator on the typedesc/bind many/once issue?
12:01:52*revere quit (Ping timeout: 264 seconds)
12:02:01*revere joined #nim
12:02:14*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
12:03:32*laaron joined #nim
12:06:19*laaron quit (Client Quit)
12:06:47*laaron joined #nim
12:11:12*laaron quit (Client Quit)
12:11:56*laaron joined #nim
12:14:51*laaron quit (Client Quit)
12:16:50*shashlick joined #nim
12:17:12*laaron joined #nim
12:19:10*laaron quit (Client Quit)
12:20:22*Kaivo quit (Quit: WeeChat 2.5)
12:21:23*laaron joined #nim
12:22:12*Kaivo joined #nim
12:26:12*laaron quit (Client Quit)
12:28:11*laaron joined #nim
12:32:21*laaron quit (Remote host closed the connection)
12:36:47shashlick@arnetheduck - BTW tissue can also also create a test case and PR from an issue
12:37:00shashlickSee the -p flag
12:37:32FromGitter<alehander42> so is await sleepAsync(0) a good pattern in asyncdispatch
12:37:54FromGitter<alehander42> to just skip a bit of the event loop (so a function can check for an "interrup operation" flag)
12:38:47dom96what's the use case?
12:39:08*laaron joined #nim
12:39:28dom96no matter the use case I would classify it as a hack
12:39:43dom96but I'd like to know what the use case is so we can figure out an alternative
12:40:11FromGitter<arnetheduck> shashlick, neat! does it just grab the first code block from the issue?
12:46:19FromDiscord_<exelotl> Say I wanted to use Nim to make a cross platform 3D game, what would be the best library to use? Are there any solid options?
12:47:08FromGitter<kayabaNerve> @alehander42 If cannot do yet, sleepAsync(1).
12:47:15FromGitter<kayabaNerve> dom96: I use it all the time.
12:47:25FromGitter<kayabaNerve> tryRecv from a channel jumps to my mind.
12:47:41FromGitter<kayabaNerve> I have no idea when the channel will send but I can't hang my thread until then.
12:48:08FromGitter<kayabaNerve> So I try to receive. If it fails, I do an async sleep for 1 ms. I have no idea if 0 is a valid value, but if it is, I'll move over.
12:48:40dom96yeah, that's a bad pattern. But we need awaitable channels to fix it
12:48:52dom96you'll be burning your cycles waiting on the channel to get data
12:50:51FromGitter<alehander42> so basically i have a function in one of my components that does an eventually fuzzy search throught a lot of stuff
12:51:05FromGitter<alehander42> so i want to be able to interrupt it when new search characters arrive
12:51:30FromGitter<alehander42> so i wanted to basically check if another call was made (which sets a flag) after each loop
12:51:53FromGitter<alehander42> but for that , i want to free the loop often, so the new eventual call(which sets this flag) can happen
12:52:12FromGitter<alehander42> (the internal search routine is sync tho)
12:52:14dom96for that you should probably use an AsyncEvent
12:52:39clyybberexelotl: I'd say bgfx or using opengl or vulkan directly
12:53:57FromGitter<alehander42> so, i create an async event and i trigger it when the new query comes
12:54:17FromGitter<alehander42> but how do i stop my previous async function with that event
12:55:14*i7sDream joined #nim
12:55:33FromGitter<alehander42> thanks @dom96 i ll take a look
13:07:57leorize@bevo009 that's just how neovim works
13:08:44leorizethe last message print doesn't have a newline in it for whatever reason
13:08:57FromDiscord_<exelotl> Hmm yeah bgfx does look like a good option, though the C++ bindings haven't been updated in a while, are the C99 bindings any good?
13:10:06shashlick@arnetheduck - ya by default but you can specify the snippet number
13:10:17shashlickeither from main issue block or a comment
13:13:29FromGitter<zetashift> @exelotl @zacharycarter made those not sure if there are any blockers using it with Nim 0.20
13:13:41FromGitter<zetashift> IIRC there shouldn't be any problems
13:16:03Araqclyybber, yeah, the spec is clear now and so it's clear how to fix 'typedesc' bugs
13:16:23Araqnow somebody needs to write it down / update the spec so that it's precise
13:18:16clyybberCool.
13:18:37clyybberBtw, Araq, where can nkBreakState appear?
13:19:29Araqin closure iterators
13:19:41*endragor quit (Remote host closed the connection)
13:19:52clyybberCan't it be implemented as a flag?
13:20:15clyybberIt's a bit annoying having to skip it in ifStmtBranch conditions
13:21:32shashlickyou can now use nimble to install cmake on windows - https://github.com/genotrance/cmake
13:21:48shashlicknimble as an app installer 😉
13:22:18shashlickbut mainly so that we can make it easier to do wrappers
13:23:34livcdshashlick: do you think I could take winim and nimterop and translate code like this ? https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-formatmessage
13:24:17shashlickya these structs are easy
13:25:33*shomodj joined #nim
13:28:10livcdthat would save me a lot of time
13:28:31shashlickwell, looking at winbase.h, it is huge
13:28:56shashlicklivcd == khchen?
13:29:02livcdnope
13:29:45Araqclyybber, flags are worse than node kinds IMO
13:30:04Araqat least with the node kinds you can encouraged to enumerate them
13:30:17Araqwhich means you thought about it and it's more likely to be correct
13:31:21clyybberFair enough
13:32:57*abm joined #nim
13:38:33shashlick@livcd - http://ix.io/1SOJ
13:38:52shashlickjust a quick run on winbase.h (without recursing into includes)
13:39:35shashlickand not setting any #define
13:40:05*rockcavera joined #nim
13:41:50livcdshashlick: i meant running it against this: https://glot.io/snippets/ff7k6usq1s
13:42:41shashlickthat won't work - nimterop doesn't work on implementations, just for wrapping
13:42:48livcdahh ok
13:42:48shashlickyou can try c2nim
13:43:05PMunchHmm, I get an "Illegal storage access. (Attempt to read from nil?)" but trying to echo out the reference shows it is not nil
13:43:12PMunchAnd what I'm trying to read is an int field
13:44:14livcdI dont need it to be perfect
13:44:22livcdjust good enough
13:46:25shashlickya i don't intend going beyond processing header files in nimterop because the goal is to only wrap and not convert C to Nim
13:46:51shashlickc2nim should work for what you need
13:48:03*terps quit (Ping timeout: 264 seconds)
13:56:33*laaron quit (Remote host closed the connection)
13:59:26*laaron joined #nim
14:08:04FromGitter<alehander42> i dont understand the event pool well
14:08:31FromGitter<alehander42> so, when i do await a function and i do a `sleepAsync`, it seems to all work normally
14:08:58FromGitter<alehander42> but if i asyncCheck it, it seems after the first `sleepAsync`, the pool never goes back to the same async function call
14:13:28*PMunch quit (Remote host closed the connection)
14:14:28FromGitter<alehander42> ok, nvm, i need to await `future1 and future2`
14:14:30FromGitter<alehander42> in my case
14:32:14*laaron quit (Remote host closed the connection)
14:34:23*laaron joined #nim
14:36:34*terps joined #nim
14:40:52*LargeEpsilon quit (Ping timeout: 245 seconds)
14:47:32*lkw quit (Ping timeout: 248 seconds)
14:55:15*terps quit (Ping timeout: 264 seconds)
14:56:50*nsf quit (Quit: WeeChat 2.5)
15:07:02*LargeEpsilon joined #nim
15:07:36*abm quit (Ping timeout: 272 seconds)
15:22:53*terps joined #nim
15:30:41*endragor joined #nim
15:31:15*wildtrees joined #nim
15:47:52*laaron quit (Remote host closed the connection)
15:48:16*endragor quit (Remote host closed the connection)
15:52:48*endragor joined #nim
15:54:13*terps quit (Ping timeout: 250 seconds)
15:55:27*LargeEpsilon quit (Ping timeout: 245 seconds)
15:58:21*arecaceae quit (Remote host closed the connection)
15:58:45*arecaceae joined #nim
15:59:00FromGitter<zacharycarter> exelotl: the C99 bindings I produced for BGFX should work for the most part - although they need occasional updating as the BGFX api changes every so often, usually in minor ways
15:59:28FromGitter<zacharycarter> keep in mind - BGFX is just a rendering API - if you want something that has more features you may want to check out Magnum or The Forge
16:00:08*gangstacat quit (Quit: Ĝis!)
16:06:56FromGitter<zacharycarter> hmm - so... should I do tile based terrain in my RTS game or go for something more realistic?
16:08:03*gangstacat joined #nim
16:08:09clyybberTile based and hexagonal :D
16:08:15FromGitter<zacharycarter> currently I have tile based terrain implemented, but I'm wondering if I should do something more like - https://github.com/bkaradzic/bgfx/blob/master/examples/41-tess/screenshot.png
16:08:42clyybberWhats the theme of your RTS?
16:08:44FromGitter<zacharycarter> hexagonal is definitely out - when I say tile based I mean like warcraft 2 / starcraft
16:08:50clyybberAh
16:09:22FromGitter<zacharycarter> it's going to be sci-fi - that's really the only theme it has going yet since I don't have any assets
16:09:55*terps joined #nim
16:10:15clyybberThat screenshot looks really cool
16:10:31clyybberbbl
16:10:34*clyybber quit (Quit: bbl)
16:10:58FromGitter<zacharycarter> I agree - I think I'll give the subd tessellated terrain a go
16:11:05FromGitter<kayabaNerve> I'm getting a ton of these: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5c1b99d03a7c63e666b872]
16:11:13FromDiscord_<treeform> zacharycarter, wow you have bgfx working. I tried getting that to work and hand issues.
16:11:27FromGitter<zacharycarter> I've used bgfx with Nim for years :)
16:11:37FromGitter<kayabaNerve> Moving a var placement, supplying a value of 0, discarding... they affect things just enough to remove them
16:11:49FromGitter<zacharycarter> treeform: what are you writing Istrolid in?
16:11:52FromGitter<kayabaNerve> But they're annoying as hell and require multiple compiles to find the fix.
16:11:53FromGitter<zacharycarter> what language I mean, ust ooc
16:12:29FromGitter<kayabaNerve> Anyone have ideas? Mainly appearing on devel but I'm also getting GC errors on stable
16:12:57FromDiscord_<treeform> Istrolid is written in CoffeeScript and runs on the browser. For my next project I am using nim.
16:13:04FromGitter<zacharycarter> nice
16:13:21FromDiscord_<treeform> Right now I have a glfw+openGL+openAL thing working.
16:13:25FromGitter<zacharycarter> btw - I was reading your lockstep is dead article earlier today - I'm going to be starting on network code for my RTS game soon so it was a good read
16:13:40FromGitter<zacharycarter> @kayabaNerve - wait so you're saying if you remove a var or move code around things work?
16:13:48FromGitter<zacharycarter> if that's the case it sounds like memory corruption maybe?
16:13:58FromDiscord_<treeform> I tried bgfx spend forever trying to get it compiled and when it did it got garbled screen so I gave up.
16:14:23FromGitter<zacharycarter> well - I can help you with that when you are ready :)
16:14:31FromDiscord_<treeform> zacharycarter, actually for my next RTS I am trying to do lockstep.
16:14:41FromDiscord_<treeform> So maybe I have grown a little or nim is better for such things.
16:14:45FromGitter<kayabaNerve> It sounds like it's a perfect storm to me. I declare var junk: int. Later it breaks again. Then I declare var junk: int = 0. It works again.
16:14:52FromDiscord_<treeform> Maybe I don't belive what I said 100% any more.
16:14:58FromGitter<zacharycarter> are you interfacing with C code @kayabaNerve ?
16:15:02FromGitter<kayabaNerve> It does sound corrupted, yet I don't know why it would be or how to fix it :P Have any ideas?
16:15:04FromGitter<zacharycarter> or C++?
16:15:10FromGitter<kayabaNerve> C++ but I haven't touched the bindings in months
16:15:13FromGitter<zacharycarter> are you on windows or linux?
16:15:17FromGitter<kayabaNerve> Linux
16:15:29FromGitter<zacharycarter> maybe run your executable through valgrind and see what comes up?
16:15:38FromGitter<kayabaNerve> I also haven't touched the C++ for months to be clear
16:15:43FromGitter<zacharycarter> hmm
16:15:46FromGitter<kayabaNerve> ... I think December
16:16:02FromGitter<zacharycarter> https://github.com/nim-lang/Nim/wiki/Hunting-crashes:-The-ultimate-guide
16:17:00shashlickquestion - how do you folks typically deal with C/C++ libraries - do you install it using your package manager and wrap that or download source directly from main repo
16:17:25FromDiscord_<treeform> shashlick, source directly every-time
16:17:27shashlickand how does it vary across OS - linux makes the above easy, maybe brew does too on OSX, and good ol' windows with nothing
16:17:34FromGitter<zacharycarter> treeform: well - I haven't started writing any network code yet so I don't have any opinions yet :P I guess I'll take your decision to go back to lockstep and run with it then
16:17:50FromDiscord_<treeform> shashlick, yeah I use windows where package mangers suck.
16:18:26FromGitter<zacharycarter> actually Microsoft made something useful
16:18:35FromDiscord_<treeform> zacharycarter, it all comes down to floats. And how you use them. If you PM me on discord we can talk about it more. I plan to write an update to my blog soon.
16:19:12shashlickthanks treeform - do you do use ./configure? i have a working nimarchive wrapper that calls configure that works on linux/osx but needs MSYS on windows
16:19:28FromGitter<zacharycarter> https://github.com/Microsoft/vcpkg
16:19:28FromGitter<zacharycarter> it doesn't need MSYS
16:19:31FromGitter<zacharycarter> it needs autoconf
16:19:44FromDiscord_<treeform> shashlick, not really. I have not tried wrapped large C++ projects.
16:19:46shashlicki have msys on my main machine but a second win box just has mingw so no auto tools are present
16:19:55FromGitter<zacharycarter> maybe try scoop?
16:19:55shashlickand it isn't easy to install them
16:20:15FromDiscord_<treeform> shashlick, i usually just use nim's {.compile x.} stuff.
16:21:01shashlickokay i'm asking mainly to improve the nimterop user experience
16:21:39FromDiscord_<treeform> shashlick, I think you helped me to wrap the steam SDK one. I still don't have a good solution for it.
16:21:48FromDiscord_<treeform> thats the largest C++ thing I tried to wrap
16:21:58FromGitter<zacharycarter> do those bindings work btw?
16:22:07FromGitter<zacharycarter> I want to use the steamworks sdk in my game
16:22:10shashlicksee https://github.com/genotrance/nimarchive/blob/nimterop/nimarchive/archive.nim for example - it builds liblzma, zlib and libarchive using configure
16:22:32shashlickbut i'm wondering if i need to take on the headache of enabling users to get configure working on their systems
16:22:43shashlicklike i said, for lin/osx, it is just a command away
16:22:49shashlickbut not sure for windows
16:23:05FromGitter<zacharycarter> I think you just assume the user has autoconf working and leave it at that
16:23:06shashlickwhich is why i created https://github.com/genotrance/cmake last night as an experiment
16:23:09FromDiscord_<treeform> windows is sux for development, but thats where 98% of my players are...
16:23:41FromDiscord_<treeform> zacharycarter, this is what I have: https://github.com/treeform/steamworks/blob/master/src/steamworks.nim
16:23:57FromDiscord_<treeform> I just manually wrapped the functionality I needed.
16:24:00FromGitter<zacharycarter> gotcha
16:24:24*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:24:54FromDiscord_<treeform> SteamSDK uses this odd c++ CallBackSync classes. Where you create the C++ class but the vtable is pointing to your code. Its really hard to create in nim. Basically had to emit C++.
16:25:04*LargeEpsilon joined #nim
16:25:26FromDiscord_<treeform> They also use macros to expand STEAM_CALLBACK to some thing strange.
16:25:31FromDiscord_<treeform> Very hard to wrap...
16:26:10*Yardanico joined #nim
16:30:28FromGitter<Obround> How do you create a custom IndexError? I tried inheritance but it didn't work.
16:35:40leorizewhat do you mean by a custom IndexError?
16:35:46lqdev[m]@Obround what do you mean 'didn't work'? please elaborate on your problem
16:36:03FromGitter<alehander42> do linux pipes somehow escape quotes
16:36:38disruptekwhat's a `linux pipe`?
16:38:19FromGitter<alehander42> anonymous pipes
16:40:07leorizewell they don't care whatever data you fed them
16:40:59FromGitter<zacharycarter> treeform: this is one reason I'm strongly considering using C++ for my project - I don't feel like maintaining / writing / dealing with C++ code that is difficult to wrap which I inevitably will
16:41:56FromGitter<zacharycarter> by maintaining and writing - I meant bindings for that C++ code
16:42:57FromGitter<alehander42> leorize, hm, i get some additional `\`
16:43:12FromGitter<alehander42> around '"'
16:43:54leorizemust be done by whatever sending / receiving that data
16:44:35FromGitter<alehander42> hm, it seems so to me, i'll debug more
16:44:37*floppydh quit (Quit: WeeChat 2.5)
16:45:21*terps quit (Ping timeout: 250 seconds)
16:45:56FromDiscord_<treeform> zacharycarter, I think interfacing with this steam SDK would be just as hard from C++ code. They made some crazy decisions.
16:46:22FromDiscord_<treeform> zacharycarter, I feel like nim is better then C++ in every way.
16:47:11FromGitter<zacharycarter> well - it does have certain advantages but so does C++
16:47:25FromGitter<zacharycarter> if it was better than C++ in every way, I think everyone who uses C++ would be using Nim
16:47:34FromDiscord_<treeform> this is another route to interface with steamSDK: https://github.com/addictgamer/steamworks-c-wrapper
16:48:07FromDiscord_<treeform> I should give this thing another try.
16:48:33FromGitter<zacharycarter> I think once Nim gets through some of the changes it's going through now and some of the more experimental features mature it will be a language that's hard to content with
16:48:47disruptekor compete with, even.
16:48:56FromGitter<zacharycarter> contend is what I meant
16:48:59FromGitter<zacharycarter> or compete with yes
16:49:17FromDiscord_<treeform> Your right single advantage C++ has over nim is that simply, more people know C++ and it is easier to hire those people.
16:49:29FromGitter<zacharycarter> it's also more mature, has a wider ecosystem
16:49:51disruptektooling
16:49:51FromGitter<zacharycarter> *much wider
16:49:54FromGitter<zacharycarter> yeah
16:50:10FromDiscord_<treeform> Most of C++ code I have seen in the wild kind of sucks.
16:50:27FromDiscord_<treeform> There is so much excellent C code but not so much in C++ land.
16:50:54FromGitter<zacharycarter> true
16:52:44FromDiscord_<treeform> I think same thing is happening to JavaScript. I used to like JS when it just made your webpages more interactive and the browser compatibility was fixed in like 2010. But now JS is where C++ is. Too much crappy code everywhere. Huge complex frameworks. Huge complex build systems.
16:53:03*endragor quit (Remote host closed the connection)
16:54:02FromDiscord_<treeform> I feel like single biggest problem we have in programming is people using libraries upon libraries without understanding how anything works.
16:54:20FromDiscord_<treeform> I feel like I can write stuff from scratch and nim and truly understand.
16:54:37FromDiscord_<treeform> I feel like I can write stuff from scratch in nim and truly understand.
16:54:58*LargeEpsilon quit (Ping timeout: 244 seconds)
16:58:00disruptekmaybe that's because in nim, you have to write everything from scratch and understand it; there are no libraries upon libraries hiding that abstraction.
16:58:25FromDiscord_<treeform> yes, exactly. It's almost a feature.
17:00:10FromGitter<zacharycarter> until Nim gets popular and then you have the same thing to worry about :P
17:03:14ZevvI have a set {'p','q'} which get dumped by quote do as {112, 113}, and now gets interpreted as a set[uint16], crashing the nim vm. How would I fix that?
17:05:08*wildtrees quit (Ping timeout: 248 seconds)
17:05:48disrupteksounds like a compiler bug to me.
17:06:37Zevvbwah
17:10:02*LargeEpsilon joined #nim
17:14:30lqdev[m]@treeform @disruptek my friends are saying 'you should just use a library for [topic here], duh' but I prefer writing code myself. I want to understand what I'm doing, so that I have full control, and Nim is perfect for that
17:14:59*wildtrees joined #nim
17:20:01*ZORR0W quit (Ping timeout: 250 seconds)
17:20:15FromGitter<kayabaNerve> If my Nim app prints "out of memory" and exits, yet I have plenty of RAM available...
17:20:51FromGitter<kayabaNerve> I mean, this may be an overall Linux question, except I've been fighting with GC errors for hours now.
17:22:56*abm joined #nim
17:28:47*i7sDream quit (Ping timeout: 245 seconds)
17:31:08*clyybber joined #nim
17:32:24clyybberAraq You there?
17:32:42clyybberDo you know why tests fail for 32bit there: https://github.com/nim-lang/Nim/pull/11926
17:33:04*Yardanico quit (Remote host closed the connection)
17:43:48FromDiscord_<treeform> kayabaNerve, when you ask for some thing really big it might fail without taking the RAM first. Like ask for 800GB and it might exit with "out of memory" even though you have 32GB.
17:44:00*terps joined #nim
17:49:38FromGitter<kayabaNerve> treeform: This shouldn't ask for more than a few GB (I do have an LMDB instance up?) and I have 60+ available.
17:50:21FromGitter<kayabaNerve> I think it's just another GC bug for me to cry over. Once I fix my algo, I'm going to work on eradicating those...
17:57:18FromDiscord_<treeform> kayabaNerve, I have tried blaming GC many times, but it turned out to be my fault every time.
17:59:18FromDiscord_<treeform> like here: https://forum.nim-lang.org/t/4932
18:06:23*terps quit (Ping timeout: 250 seconds)
18:11:30*clyybber quit (Quit: WeeChat 2.5)
18:26:10*narimiran quit (Ping timeout: 246 seconds)
18:26:46*tankf33der joined #nim
18:31:49tankf33dero/
18:32:03tankf33derI've post forum thread:
18:32:05tankf33derhttps://forum.nim-lang.org/t/5109#32134
18:32:39tankf33derIts moderated.
18:33:31Zevvdisruptek: details here: https://github.com/nim-lang/Nim/issues/11986. guess you're right its likely a bug
18:33:47ZevvCant find a workaround yet though :/
18:34:21tankf33derhttps://i.imgur.com/j1e8ttV.jpg
18:34:27tankf33derFYI ^^^
18:42:11*actuallybatman joined #nim
18:43:52*terps joined #nim
18:45:26FromDiscord_<treeform> tankf33der, so you want others to take your packages from you?
18:45:27Zevvkrux02: thanks again :/
18:46:01krux02np
18:46:04tankf33dertreeform: this would be nice
18:46:44tankf33dertreeform: maybe all this useless and waste of time
18:48:10FromGitter<Obround> <leorize> -- By custom IndexError, I mean that when you use it in an `except` (try-except) it will act like an IndexError.
18:50:37FromDiscord_<treeform> tankf33der, you probably learned a ton about sha and blake, so it can't be that useless.
18:51:27FromDiscord_<treeform> tankf33der, why not just mirror them to github and be done?
18:51:52tankf33dertreeform: this is plan B
18:53:47*LargeEpsilon quit (Ping timeout: 245 seconds)
19:02:02euantorAnybody tried building Nim 0.20.2 on openBSD recently?
19:02:33euantorLooks like it's broken at the moment :( https://www.irccloud.com/pastebin/J4T2Z45y/
19:03:17euantor(using build.sh - I suspect due to OpenBSD's ancient GCC version..)
19:09:03euantorusing `env CC=/usr/bin/clang sh build.sh` does work though - I wonder if that's worth documenting though?
19:16:16*terps quit (Ping timeout: 264 seconds)
19:19:20*krux02 quit (Remote host closed the connection)
19:20:47euantorAnd `./koch tools` should be `./koch tools --cc:clang` for OpenBSD too
19:23:10*abm quit (Read error: Connection reset by peer)
19:35:38*nsf joined #nim
19:36:27dom96tankf33der, please mirror to github
19:36:52tankf33dereh
19:36:57tankf33derok
19:39:13dom96I mean, feel free to wait and see if someone else wants to maintain it
19:39:17dom96but if not, do mirror
19:39:19*abm joined #nim
19:44:50*Ven`` joined #nim
19:47:12*setenforce joined #nim
19:50:37*shomodj joined #nim
19:57:03*jxy quit (Quit: leaving)
19:58:32FromDiscord_<Shield> I couldn't get bgfx to compile at all on windows
20:00:41FromDiscord_<Shield> but sdl2 is good to handle a lot of stuff crossplatform, throw in some opengl or vulkan
20:01:03FromDiscord_<Shield> I just stopped caring about crossplatform, wine and proton exist
20:03:36*abm quit (Quit: Leaving)
20:05:20*abm joined #nim
20:05:56*nsf quit (Quit: WeeChat 2.5)
20:10:53FromGitter<zacharycarter> bgfx compiles pretty easily on windows
20:11:33FromGitter<zacharycarter> drivers for ogl on windows are notoriously buggy and I don't imagine this changing much for vulkan
20:11:38FromGitter<zacharycarter> but YMMV
20:12:19*ZORR0W joined #nim
20:12:45FromDiscord_<Shield> yeah they are, directX is the way to go on windows
20:13:28FromGitter<zacharycarter> I just think there is a lot of work that needs to go into the Nim ecosystem for supporting anything beyond a SDL2 game right now
20:13:33FromDiscord_<Shield> I'll try to compile bgfx again,
20:13:36FromGitter<zacharycarter> for instance - we have no good image library
20:13:59*aq60 quit (Ping timeout: 260 seconds)
20:14:14FromGitter<zacharycarter> the only library I've found that's reliable is the bindings for stbi which don't load compressed textures or mipmaps
20:14:24FromDiscord_<Shield> sdl_image? stb_image?
20:14:31FromGitter<zacharycarter> same in both cases
20:14:50FromDiscord_<treeform> zacharycarter, I am working on one: https://github.com/treeform/flippy what do you need from an Image Library?
20:14:54*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:15:31FromGitter<zacharycarter> mainly loading images with different compression formats as well as loading mipmaps
20:16:02*btop joined #nim
20:16:19FromDiscord_<Shield> oh I was using Halsys/nim-bgfx which is untested on windows
20:16:31FromGitter<zacharycarter> well those bindings never really worked
20:16:50FromGitter<zacharycarter> I thought you just meant compiling bgfx on windows, I didn't realize you meant using Nim with bgfx
20:17:11FromGitter<zacharycarter> but that's still doable - I did it in a couple of my Nim + bgfx projects
20:18:20FromDiscord_<Shield> those bindings compile bgfx and it was stuck on that phase
20:18:48FromDiscord_<treeform> zacharycarter, I profiled many images formats and found they all load slowly
20:18:50FromGitter<zacharycarter> yeah - I tend to just build bgfx and then dynamically link the shared library
20:18:56FromDiscord_<treeform> I made my own image format that loads fast and has mip maps
20:20:18FromDiscord_<treeform> Here is a draft of a blog post I am still working on: https://blog.istrolid.com/blog/alpha-bleeding.html
20:20:42FromDiscord_<treeform> I figured out alpha bleeding to solve my mip map issues:
20:20:43FromDiscord_<treeform>
20:20:43FromDiscord_<treeform> https://cdn.discordapp.com/attachments/371759389889003532/613467473815142627/image_kix.png
20:21:14FromDiscord_<treeform> So when I gen mip maps they are not all gray at the edge.
20:21:15FromDiscord_<treeform>
20:21:15FromDiscord_<treeform> https://cdn.discordapp.com/attachments/371759389889003532/613467607038689312/image_kix.png
20:21:26*Ven`` joined #nim
20:21:34FromGitter<zacharycarter> interesting
20:21:55FromDiscord_<treeform> I found no image format had the features I wanted
20:22:13FromDiscord_<treeform> So I use png for everything and then convert them to custom format
20:24:07*tankf33der left #nim (#nim)
20:24:52FromDiscord_<treeform> "I feel like single biggest problem we have in programming is people using libraries upon libraries without understanding how anything works."
20:25:10FromDiscord_<treeform> Once I made my own image format and library I understood how it all worked and created a very simple and very fast solution for myself.
20:27:23FromGitter<zacharycarter> yes - this can work - but these are the kinds of things I also want to try to avoid :P
20:31:36*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:32:42*btop quit (Ping timeout: 258 seconds)
20:34:37FromGitter<zacharycarter> anywho - time for bed! night all!
20:35:14FromGitter<zetashift> gnight
20:36:02*jxy joined #nim
20:37:42FromGitter<awr1> nite
20:43:05*stefanos82 quit (Quit: Quitting for now...)
20:51:17*btop joined #nim
21:05:15*leorize quit (Remote host closed the connection)
21:07:17*leorize joined #nim
21:13:01*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:22:36*abm quit (Read error: Connection reset by peer)
21:25:14*solitudesf quit (Ping timeout: 258 seconds)
21:28:42FromDiscord_<treeform> hmm hashes module produces different results in C and JS. Not document anywhere.
21:36:11*Kaivo quit (Quit: WeeChat 2.5)
21:37:07*krux02 joined #nim
21:44:20*abm joined #nim
21:48:16Araqit's hard enough to support JS with its crazy number type
22:12:33*sagax quit (Ping timeout: 245 seconds)
22:20:08*lkw joined #nim
22:23:28FromGitter<awr1> yeah idk what can be done at that point
22:23:48FromGitter<awr1> you can do some of the asm js tricks though
22:24:15FromGitter<awr1> https://en.wikipedia.org/wiki/Asm.js#Code_generation
22:24:36FromGitter<awr1> but really wasm is the future
22:44:50Calinou>yeah they are, directX is the way to go on windows
22:45:03Calinouthe state of Vulkan drivers is much better on Windows compared to OpenGL, especially with AMD on the performance side
22:45:09Calinoustill, many popular games out there use OpenGL :)
22:45:27Calinouit's harder for GPU manufacturers to screw up Vulkan drivers compared to OpenGL
22:53:49FromGitter<zetashift> You lock in hard on windows using DirectX though
23:01:08*wildtrees_ joined #nim
23:03:39*wildtrees_ quit (Remote host closed the connection)
23:03:47*wildtrees quit (Ping timeout: 245 seconds)
23:04:07*wildtrees_ joined #nim
23:04:42FromDiscord_<Shield> tell that to intel, it still screws with opengl
23:05:49*krux02_ joined #nim
23:07:10FromGitter<awr1> vulkan is fairly well-developed on windows
23:08:03FromGitter<awr1> there's a reason some game studios are ditching d3d with "well, our vulkan layer runs fine, why do we have this d3d backend that we still maintain"
23:08:17*abm quit (Quit: Leaving)
23:08:25*krux02 quit (Ping timeout: 250 seconds)
23:09:55FromGitter<awr1> V-EZ could be more of a *thing* in the future, but idk we'll see
23:13:40*btop quit (Ping timeout: 248 seconds)
23:16:27*laaron joined #nim
23:23:23*actuallybatman quit (Ping timeout: 245 seconds)
23:24:23*elrood quit (Remote host closed the connection)
23:26:02FromGitter<Obround> Can you make type that acts like an IndexError? An example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5c818979229b63d991489b]
23:26:32*krux02_ quit (Remote host closed the connection)
23:27:57FromGitter<awr1> you need to overload `[]`
23:28:42FromGitter<Obround> ?
23:29:27FromGitter<awr1> you can make a new exception type, and then overload `[]` to raise on bad input
23:29:39FromGitter<awr1> i'm curious as to why you would want this though
23:30:39FromGitter<Obround> Most people are :) I'm writing a compiler that transpiles to Nim. I'm working on the try except.
23:31:17FromGitter<Obround> Could you give a example? (I'm very unfamiliar with Nim)
23:35:35*lkw quit (Quit: ZNC 1.7.3 - https://znc.in)
23:36:04*laaron quit (Remote host closed the connection)
23:38:45*laaron joined #nim
23:38:50FromGitter<awr1> i'm not sure if you can overload `[]` for seqs
23:39:22FromGitter<awr1> https://play.nim-lang.org/#ix=1SSS
23:39:27FromGitter<awr1> conceptually it would be like this.
23:39:29FromGitter<awr1> but this doesn't work
23:39:54FromGitter<awr1> this would be easier if the underlying type wasn't a seq though
23:39:58FromGitter<Obround> Yeah...
23:45:11FromGitter<zetashift> Aren't you better off transpiling to C?
23:47:25*lkw joined #nim
23:47:26FromGitter<Obround> I did think of that but by then I was to far of transpiling to Nim (I'm also determined to make this work =D).
23:48:35FromGitter<awr1> what about nim's standard `IndexError` does not suffice for you?
23:48:39*wildtrees_ quit (Quit: Leaving)
23:49:32FromGitter<awr1> i don't know if you can override magic procs if at all
23:49:40FromGitter<Obround> The problem is raising the errors.
23:50:35FromGitter<Obround> Hmm...
23:54:40FromGitter<zetashift> well then I wish you good luck :D
23:55:30FromGitter<Obround> Thanks.
23:56:27FromGitter<Obround> This might help: https://forum.nim-lang.org/t/501