00:05:12 | FromDiscord | <19> type DWORD* = int32↵bitmapInfo.bmiHeader.biSize = sizeof(bitmapInfo.bmiHeader)↵ERROR: type mismatch: got <int> but expected 'DWORD = int32' |
00:09:24 | * | vicfred quit (Quit: Leaving) |
00:13:55 | FromDiscord | <tomck> Any useful libs for macros? as in, libs to help me implement complex macros in a 'nice' way, rather than imperatively going through the AST & transforming stuff myself? |
00:16:51 | * | abm quit (Read error: Connection reset by peer) |
00:18:20 | FromDiscord | <Rika> macroutils @tomck |
00:25:25 | * | konkrrrrrr is now known as kinkinkijkin |
00:35:18 | * | Tanger quit (Remote host closed the connection) |
00:43:40 | FromDiscord | <19> is it a good idea to take the C++ generated from nim and put it in visual studio to run through it? or is it way better to just use GDB in nim |
00:43:45 | FromDiscord | <tomck> Ty |
00:44:10 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
00:44:43 | * | kinkinkijkin joined #nim |
00:46:50 | * | apahl quit (Ping timeout: 244 seconds) |
00:47:49 | * | apahl joined #nim |
00:52:15 | disruptek | use gdb. |
00:56:20 | FromDiscord | <19> <disruptek> got it, thanks! |
01:14:09 | * | maier joined #nim |
01:14:25 | * | vicfred joined #nim |
01:19:28 | * | maier quit (Ping timeout: 260 seconds) |
01:25:39 | * | Tanger joined #nim |
01:35:17 | * | Zectbumo joined #nim |
01:45:41 | disruptek | YOU ARE WELCOME. |
01:45:42 | * | apahl quit (Ping timeout: 260 seconds) |
01:46:14 | * | apahl joined #nim |
01:47:01 | * | Zectbumo_ joined #nim |
01:48:13 | * | Zectbumo quit (Ping timeout: 264 seconds) |
02:33:10 | * | gmaggior quit (Ping timeout: 265 seconds) |
02:38:17 | * | audiofile quit (Ping timeout: 256 seconds) |
02:45:14 | * | gmaggior joined #nim |
02:52:47 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:52:49 | FromDiscord | <iWonderAboutTuatara> @Rebel uses to be green |
02:52:54 | FromDiscord | <iWonderAboutTuatara> *used |
02:54:36 | * | muffindrake joined #nim |
02:56:34 | FromDiscord | <iWonderAboutTuatara> @Yardanico I think the issue here is that the color is very similar to js |
03:13:50 | ldlework | ehmry: so confusing. i can build two csfml files, one fails like before, one runs fine. |
03:14:59 | * | maier joined #nim |
03:16:45 | ldlework | eh now it's not working at all |
03:18:56 | ldlework | darn i wish this would work |
03:20:13 | * | maier quit (Ping timeout: 260 seconds) |
03:20:20 | ldlework | argh oh well, few more years :) |
03:32:20 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:44 | * | supakeen joined #nim |
04:31:19 | Tanger | ldlework, What are you trying to do with csfml? |
04:34:30 | silvernode[m] | If I define a seq this way: var a = @[], how do I add items to it? |
04:36:44 | FromDiscord | <Elegant Beef> you shouldnt be able to declare a sequence like that, as there is no type given |
04:37:15 | disruptek | rtfm div operator |
04:37:20 | FromDiscord | <Elegant Beef> you can just do `var a: seq[T]` then `a.add(T)` |
04:38:37 | FromDiscord | <Elegant Beef> Lol yes read the manual on sequences https://nim-lang.org/docs/tut1.html#advanced-types-sequences |
04:38:55 | silvernode[m] | <FromDiscord "<Elegant Beef> you can just do `"> Does it count that I have a struct with a property like this: backpack: seq[Item] |
04:39:30 | silvernode[m] | I read that page lol hmm, I must be missing something on that page then |
04:40:13 | FromDiscord | <Elegant Beef> the `add` proc adds values |
04:41:35 | silvernode[m] | <FromDiscord "<Elegant Beef> the `add` proc ad"> I tried that, I guess I will need to show a code example |
04:46:13 | silvernode[m] | https://play.nim-lang.org/#ix=2wLf |
04:47:04 | silvernode[m] | oops, I forgot to include my item type |
04:47:58 | silvernode[m] | https://play.nim-lang.org/#ix=2wLh |
04:48:46 | FromDiscord | <Elegant Beef> well first issue is that you're attempting to mutate character but dont pass it as `player: var Character` |
04:48:55 | FromDiscord | <Elegant Beef> Second issue is you're echoing a void proc |
04:49:11 | silvernode[m] | ah ok |
04:49:21 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
04:49:46 | * | kinkinkijkin joined #nim |
04:49:48 | FromDiscord | <Elegant Beef> If you notice the error is mismatch got `seq[T], T` and all the expected are `var seq[T], T` |
04:51:57 | silvernode[m] | I tried putting proc addToBackpack(var player: Character) but that didn't work either I have the player variable as var originally so I thought that would be all I needed to do. |
04:52:14 | Tanger | silvernode[m], Other way around |
04:52:22 | Tanger | addToBackpack(player: var Characte) |
04:52:34 | FromDiscord | <Elegant Beef> Variables are implictly passed as immutable, you need to specify they're mutable |
04:52:45 | FromDiscord | <Elegant Beef> Unless they're references |
04:53:03 | silvernode[m] | hmm, I always thought it was var before player since that's the var. |
04:53:06 | Tanger | As Character is the type, you're setting the type to a "var Charactaer" (ie mutatable Character model) |
04:53:21 | silvernode[m] | <Tanger "As Character is the type, you're"> gotcha |
04:53:32 | Tanger | Trips me up sometimes as well, haha |
05:00:34 | disruptek | clyybber: on windows + arc, there's a set construction like {0..8} -- i think it's file permissions -- that is getting rewritten into a `:tmpD = 0 .. 8` and then expr pukes on the range node. |
05:02:33 | * | vicfred quit (Quit: Leaving) |
05:15:49 | * | maier joined #nim |
05:20:58 | * | maier quit (Ping timeout: 260 seconds) |
05:31:45 | * | maier joined #nim |
05:32:28 | * | narimiran joined #nim |
05:34:28 | * | solitudesf joined #nim |
05:36:24 | FromGitter | <StefanSalewski> 17:02:50 voidpi StefanSalewski: I'm reading your book it's helping me a lot thanks |
05:37:43 | FromGitter | <StefanSalewski> Great. Let me know if there are sections which I have to improve or to extend. You can use the github issue tracker for that. |
05:47:10 | voidpi | StefanSalewski: I found it concise and well written |
05:47:31 | voidpi | StefanSalewski: http://ssalewski.de/nimprogramming.html#_binary_numbers the addition is wrong |
05:47:49 | voidpi | 1001 + 1101 = 11010 |
05:55:11 | FromGitter | <StefanSalewski> Oh yes, a typo, thanks. Please note that I generally do not follow this IRC/Gitter, too much text for me, have to do some work. |
05:56:23 | FromGitter | <StefanSalewski> Bye. |
06:00:09 | voidpi | StefanSalewski: understandable |
06:01:32 | voidpi | I just tried to use nim to compile a module in debian 10 |
06:02:03 | voidpi | that thing is 0.19 |
06:14:06 | * | zyklon joined #nim |
06:16:07 | * | uvegbot quit (Ping timeout: 260 seconds) |
06:20:48 | * | JustASlacker joined #nim |
06:21:40 | * | vicfred joined #nim |
06:47:06 | * | PMunch joined #nim |
06:50:16 | * | gmaggior quit (Quit: Leaving) |
06:54:00 | PMunch | Hmm, is there a way to limit the type contained in a generic to be GC-safe? |
06:54:13 | * | a_chou joined #nim |
06:54:19 | PMunch | I.e. not allow sequences, strings, and other things that require the GC? |
06:55:45 | alehander92 | concepts? |
06:57:12 | alehander92 | other option is to just use a compile time function which returns your type |
06:57:27 | alehander92 | e.g. a: NoGC(MyType) |
06:57:42 | alehander92 | NoGC checks that MyType doesn't have those with intro |
06:57:43 | PMunch | Hmm, I guess that would be an option |
06:57:45 | alehander92 | and just returns it |
06:57:52 | alehander92 | but i guess concepts / `or` |
06:57:57 | alehander92 | might be simplr if possible |
06:58:05 | PMunch | Should be possible |
06:58:27 | PMunch | I don't really have a system in mind, just wondered if it was possible |
07:00:34 | FromDiscord | <Elegant Beef> Hey pmunch, dont know if you recall my constructor macro, but i refactored it to be more of smart DSL 😛 |
07:00:54 | PMunch | Oh I remember |
07:01:20 | PMunch | Define "smart DSL", I'm sceptical of things trying to be smart in general :P |
07:01:32 | FromDiscord | <Elegant Beef> I mean smart as in more user friendly and compact |
07:02:01 | FromDiscord | <Elegant Beef> instead of a single line, it's now multiple lines and an option `_:` which allows you to do logic after constructed |
07:02:03 | FromDiscord | <Elegant Beef> https://github.com/beef331/constructor/tree/typeDef |
07:02:07 | PMunch | https://forum.nim-lang.org/t/5734#35569 <- did we ever get any examples Araq? This topic is still the first thing that comes up when I Google "Nim GC ARC" and some of that information seems a bit dated |
07:02:30 | FromDiscord | <Elegant Beef> also made the typedef macro which is still looking for a proper name, which generates properties |
07:06:03 | PMunch | Huh, neat |
07:08:53 | PMunch | Hey, the new colour for Nim has taken effect on GitHub :D |
07:09:08 | FromDiscord | <Elegant Beef> Yep happened yesterday in my time 😄 |
07:09:24 | PMunch | Nice! |
07:13:14 | FromDiscord | <Varriount> Araq: Views? At last? Is it really true? |
07:15:41 | FromDiscord | <lantos> nice we got the royal yellow! |
07:18:05 | * | Tuatarian quit (Quit: Quit) |
07:18:23 | PMunch | Hmm, regarding this part of the documentation for channels: "Note: Channels are designed for the Thread type. They are unstable when used with spawn" does this mean that they'll be unstable in the scenario where my Nim code is compiled into a DLL and the procedures can be called from any thread? |
07:23:02 | * | vicfred quit (Quit: Leaving) |
07:24:43 | * | a_chou quit (Quit: a_chou) |
07:54:56 | PMunch | Hmm, has anyone tried to make Nim able to create variant object types without having to specify the enum value? |
07:56:05 | PMunch | Something like `MyType(str: "my string")` would automatically set `kind: String` because it's the only branch with a `str` field |
08:06:20 | * | Vladar joined #nim |
08:07:41 | * | konkrrrrrr joined #nim |
08:08:28 | Araq | PMunch, hmm, all I was able to do is to port Channels to --gc:arc |
08:08:45 | Araq | and then I added "Isolated[T]" so that we can write a better channel :-) |
08:09:04 | PMunch | Isolated[T]? |
08:09:20 | Araq | in fact, I started to write a new threading API but it's much work and there is Weave |
08:09:55 | Araq | PMunch, https://github.com/nim-lang/RFCs/issues/244 |
08:09:56 | disbot | ➥ 'isolated' data for Nim ; snippet at 12https://play.nim-lang.org/#ix=2sjf |
08:10:11 | * | kinkinkijkin quit (Ping timeout: 240 seconds) |
08:10:26 | Araq | Varriount: yes it's true |
08:10:50 | FromGitter | <alehander92> PMunch i think that would be a bit strange |
08:10:53 | FromGitter | <alehander92> i would prefer |
08:10:59 | FromGitter | <alehander92> ~String(str: "my string") |
08:10:59 | disbot | no footnotes for `String(str:`. 🙁 |
08:11:05 | FromGitter | <alehander92> if you need to preserve space |
08:11:33 | FromDiscord | <Elegant Beef> I think variant inference would be nice, atleast with the current variant implementation where there is no overlapping names |
08:12:09 | FromGitter | <alehander92> but this would be harder to read |
08:12:21 | PMunch | Highly depends on your type.. |
08:12:21 | FromGitter | <alehander92> now i need to read the variant's definition |
08:12:37 | PMunch | I came across it with my ANSI parsing library |
08:12:40 | FromGitter | <alehander92> yeah but why MyType(a: "mystr") vs ~String(a: "mystr") |
08:12:54 | FromGitter | <alehander92> in the second case i immediately see what `.kind` i need to check for |
08:12:59 | FromDiscord | <Elegant Beef> Cause your type isnt String, it's of MyType |
08:13:23 | FromGitter | <alehander92> but `~A` is not a type |
08:13:37 | PMunch | I wanted to create a node AnsiData(kind: String, str: someStrData) and AnsiData(kind: CSI, parameters: "0", intermediate: "", final: 'm') |
08:13:39 | FromGitter | <alehander92> it's the relevant unique info |
08:13:49 | FromGitter | <alehander92> and instead of writing AnsiData |
08:13:52 | FromGitter | <alehander92> everywhere |
08:13:57 | FromGitter | <alehander92> you just write the relevant kind |
08:14:02 | PMunch | It's pretty obvious which of those is just a string and which is a CSI marker even without the kind field |
08:14:05 | FromGitter | <alehander92> more DRY |
08:14:19 | FromDiscord | <Elegant Beef> If i have a generic type that takes procs only, is the only method to generate a proc that takes the arguements of the generic macros/templates? |
08:14:38 | PMunch | alehander92, that would indeed be cool |
08:14:39 | Araq | PMunch, I agree with you but a couple of overloaded constructor procs/templates won't kill you ;-) |
08:15:15 | PMunch | Araq, true, this was just something I came across and wondered if anyone else had thought of it :) |
08:15:23 | FromDiscord | <Elegant Beef> Re-asking this https://play.nim-lang.org/#ix=2wMB |
08:15:59 | PMunch | In general Nim is very easy to write, and has little friction, but variant types can sometimes feel like you're writing things just to make the type system happy |
08:16:14 | PMunch | Which in general you don't have to with type-inference and such :) |
08:16:57 | Araq | they didn't age all that well but I only had Ada to copy, ML is based on immutable types |
08:17:16 | PMunch | @Elegant, you want something like `event.invoke 100`? |
08:17:22 | FromDiscord | <Elegant Beef> Yea |
08:17:38 | FromDiscord | <Elegant Beef> But without having to manually write the `value: int` |
08:18:42 | PMunch | Araq, never too late ;) This is basically just a further kind of type inference, inferring the sub-type of a variant object |
08:18:42 | FromDiscord | <Elegant Beef> I was working on a macro to generate a new Type and everything, but figured i'd re-ask now when people are active 😄 |
08:19:09 | PMunch | @Elegant, I guess you could create a couple of invoke procedures with generics.. |
08:19:37 | FromDiscord | <Elegant Beef> So write every case out? 😄 |
08:21:53 | * | gmaggior joined #nim |
08:22:42 | gmaggior | if I have an Obj and an ObjRef how do assign reference of Obj to ObjRef? |
08:23:34 | PMunch | @Elegant, something like this: https://play.nim-lang.org/#ix=2wMG |
08:24:03 | PMunch | You can of course create a simple macro to generate those invoke procedures for everything from A..Z or something like that |
08:24:05 | Araq | gmaggior, it's impossible, you need to start with an ObjRef then |
08:24:05 | FromDiscord | <Elegant Beef> Yea seems like just making a type with the proc is wiser |
08:24:34 | Araq | in fact, most of time you should decide upfront if you need 'ref object' or 'object' |
08:24:51 | * | bouzu_ joined #nim |
08:24:51 | gmaggior | Araq: thanks |
08:25:15 | FromDiscord | <Elegant Beef> That reminds me, i need to go kill my nimcs repo, using ref's for components, that's why you dont write a ECS when new to a language |
08:25:52 | PMunch | ECS? |
08:25:58 | PMunch | Entity component system? |
08:26:00 | FromDiscord | <Elegant Beef> Entity Component System |
08:26:01 | FromDiscord | <Elegant Beef> Yes |
08:26:42 | FromDiscord | <Elegant Beef> Wrote an overly complex/ugly ECS when rather new to nim, coming from C# was like "Must use ref for everything, as it's the only logical way to program" |
08:27:24 | Araq | probably you shouldn't write an ECS at all, write games, not game engines. extract the engine by refactoring working, successful games |
08:30:17 | FromDiscord | <Elegant Beef> Oh i was mostly doing it to learn nim, i really dont need ECS since i dont have thousands of entities |
08:31:37 | Araq | well an ECS can be an elegant solution no matter how many entities you have |
08:32:21 | FromDiscord | <iWonderAboutTuatara> +1 to araq |
08:32:32 | FromDiscord | <iWonderAboutTuatara> and beef |
08:32:44 | FromDiscord | <iWonderAboutTuatara> ECS is pretty overhyped for indies |
08:32:46 | FromDiscord | <Elegant Beef> Yea completely depends on the ECS implementation though, i'm 100% fine with the structure of a EC system |
08:33:05 | FromDiscord | <Elegant Beef> Like from i hear Unity absolutely screwed the pooch with their implementation |
08:33:15 | FromDiscord | <iWonderAboutTuatara> Honestly, the unity implementation is fine |
08:33:15 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:33:20 | FromDiscord | <exelotl> > extract the engine by refactoring working, successful games↵Yep 100% this |
08:33:39 | FromDiscord | <Elegant Beef> For the most part people never suggest it, they suggest using other C# implementations |
08:33:44 | FromDiscord | <iWonderAboutTuatara> Which I agree with |
08:34:19 | FromDiscord | <iWonderAboutTuatara> Most of this game advice is targeted towards hobbyists and small time indies |
08:34:19 | FromDiscord | <iWonderAboutTuatara> working with an ECS is not really worth it for those kinds of games |
08:34:52 | FromDiscord | <iWonderAboutTuatara> If I wanted full performance etc, I'd write my own engine or at use Kha framework |
08:35:43 | * | NimBot joined #nim |
08:36:10 | PMunch | Anyone with nimsuggest on Windows knowledge knows what might be going on here? https://github.com/PMunch/nimlsp/issues/38 |
08:36:12 | disbot | ➥ Local modules not discovered ; snippet at 12https://play.nim-lang.org/#ix=2wMK |
08:36:42 | FromDiscord | <Elegant Beef> Yea for me there is a big issue of, eh it doesnt help me much so why would i use it. I havent learned the new RPs in Unity either, since they're more limited imo with single render passes and bodges to get multiple passes |
08:36:53 | FromDiscord | <Elegant Beef> Like cool games run faster, but my games already ran fast |
08:37:52 | FromDiscord | <Elegant Beef> *Oh and we dont have any quick look up for the exposed functions so you can write shaders without starring at hlsl libraries* 😄 |
08:37:53 | FromDiscord | <iWonderAboutTuatara> URP is genuinely useful |
08:38:15 | FromDiscord | <iWonderAboutTuatara> you don't need to know how to write for SRP though, it's not the simplest and it's not super useful |
08:38:23 | FromDiscord | <iWonderAboutTuatara> but URP makes my life a fair bit easier |
08:38:40 | FromDiscord | <Elegant Beef> The standard RP is fine for my stylized stuff, i've never had a gpu related performance issue |
08:39:07 | FromDiscord | <Elegant Beef> My target platform is always desktop though, not that i've published anything 😄 |
08:39:08 | * | Cadey quit (Ping timeout: 246 seconds) |
08:39:33 | FromDiscord | <exelotl> I don't like ECS because it leads to so many questions (are hitbox and velocity separate components? Do they go together in the physics component?) and if you get those questions wrong you lose performance |
08:39:46 | FromDiscord | <iWonderAboutTuatara> I go for mobile and web too |
08:39:52 | * | Prestige quit (Ping timeout: 260 seconds) |
08:40:01 | * | bouzu__ joined #nim |
08:40:11 | FromDiscord | <iWonderAboutTuatara> Mobile games play ok on desktop, but usually not the other way around |
08:40:13 | FromDiscord | <Elegant Beef> I dont go for mobile as it's a cesspool, and web is atrocious with build times |
08:40:27 | FromDiscord | <iWonderAboutTuatara> Web can be a pain |
08:40:34 | FromDiscord | <iWonderAboutTuatara> but I've never really had major issues with it |
08:40:41 | FromDiscord | <iWonderAboutTuatara> how often are you building anyway though? |
08:40:44 | FromDiscord | <Elegant Beef> With nico i can build a webgame within 10 seconds, with Unity it takes 10 minutes |
08:40:56 | FromDiscord | <Elegant Beef> *And my cpu is at 100%* |
08:41:07 | FromDiscord | <iWonderAboutTuatara> It's not the fastest, agreed |
08:41:11 | FromDiscord | <iWonderAboutTuatara> defo not 10m for me though |
08:41:21 | FromDiscord | <iWonderAboutTuatara> either way, I don't build very often |
08:41:32 | * | Cadey joined #nim |
08:41:34 | FromDiscord | <iWonderAboutTuatara> so not a huge deal |
08:41:51 | FromDiscord | <iWonderAboutTuatara> Just sort of set it to build, go do something else for 15 minutes |
08:41:54 | FromDiscord | <exelotl> (Having concrete 'this is an object which is a monster' is something i find really nice to reason about too) |
08:42:15 | FromDiscord | <iWonderAboutTuatara> It can definetely simplify the mental model for some games |
08:42:22 | FromDiscord | <Elegant Beef> Well my biggest issue is that if im working on a project i want to build all the builds and upload them whenever i make a commit to the master branch, im ok with 50% of my cpu being used to build 3 build simultanously but a webgl build takes 10 minutes |
08:42:30 | * | bouzu_ quit (Ping timeout: 244 seconds) |
08:42:47 | FromDiscord | <iWonderAboutTuatara> Do you work with others on these games? |
08:42:57 | FromDiscord | <Elegant Beef> On my lastone no |
08:43:00 | * | Prestige joined #nim |
08:43:03 | FromDiscord | <iWonderAboutTuatara> I have never worked with anyone on a game, so I have no idea if that requires building often |
08:43:16 | FromDiscord | <iWonderAboutTuatara> If it's a routine thing I can see it getting annoyign |
08:43:26 | FromDiscord | <Elegant Beef> Well it's not even building often, my game was in a playable state so i'd like to have recent builds on github/itch |
08:43:27 | FromDiscord | <iWonderAboutTuatara> but usually, people manage exports near the end of their projects |
08:43:45 | FromDiscord | <iWonderAboutTuatara> you could keep it as 1 version until you're ready to release the new ver |
08:43:51 | FromDiscord | <iWonderAboutTuatara> ah it's a prototyping thing? |
08:43:58 | FromDiscord | <Elegant Beef> Yea that's fine for real developers, im not a real developer |
08:43:59 | FromDiscord | <iWonderAboutTuatara> how often do you ususally go between releases? |
08:44:07 | FromDiscord | <iWonderAboutTuatara> Lmao |
08:44:08 | FromDiscord | <lqdev> 10 seconds build time is a pita |
08:44:22 | FromDiscord | <Elegant Beef> I mean when working on my last project any commit would build and push to github/itch |
08:44:23 | FromDiscord | <iWonderAboutTuatara> I don't really get the hatred for build times and such |
08:44:29 | FromDiscord | <lqdev> i bet that like, at least 4 seconds are solely SDL/glfw init |
08:44:32 | FromDiscord | <iWonderAboutTuatara> in the editing world peopel have a similar thing for export times |
08:44:42 | FromDiscord | <Elegant Beef> Cause whilst building for webgl i cant use my pc, and cant develop |
08:44:46 | FromDiscord | <Elegant Beef> It uses all 8 threads |
08:44:54 | FromDiscord | <iWonderAboutTuatara> I have no idea how it works in collab stuff |
08:45:09 | FromDiscord | <iWonderAboutTuatara> but can't you just use desktop builds till you want to release a version? |
08:45:16 | FromDiscord | <iWonderAboutTuatara> then build that for html5? |
08:45:28 | FromDiscord | <lqdev> the thing is that for game jam games, quick iteration is important. that's why build times matter |
08:45:46 | FromDiscord | <Elegant Beef> I mean ideally i'd have my master branch be the up to date branch, and as im committing there use my hardware to build and upload |
08:45:54 | FromDiscord | <Elegant Beef> I can make 3 desktop builds in async before 1 webgl build |
08:46:20 | FromDiscord | <iWonderAboutTuatara> Hmm |
08:46:27 | FromDiscord | <Elegant Beef> Like desktop builds take 30 seconds, this is why i really like the premise of using nim for game dev on top of the language being nice |
08:46:38 | FromDiscord | <iWonderAboutTuatara> Nim is a nice language for sure |
08:46:45 | FromDiscord | <iWonderAboutTuatara> I'd look more into nico/nimgame2 |
08:47:02 | FromDiscord | <Elegant Beef> Are you suggesting to a contributor of nico to look into it more? 😛 |
08:47:03 | FromDiscord | <iWonderAboutTuatara> but tbh Godot works perfectly well for me |
08:47:11 | FromDiscord | <iWonderAboutTuatara> no lol |
08:47:16 | FromDiscord | <iWonderAboutTuatara> I'm saying i would look more into it |
08:47:22 | FromDiscord | <iWonderAboutTuatara> if I wasn't so content with Godot |
08:47:25 | FromDiscord | <Elegant Beef> Ah it's nice for pixel art games |
08:47:32 | FromDiscord | <iWonderAboutTuatara> nico or Godot? |
08:47:34 | FromDiscord | <Elegant Beef> Nico |
08:47:46 | FromDiscord | <iWonderAboutTuatara> ohhh its a pico-8 like |
08:47:50 | FromDiscord | <Elegant Beef> Yea |
08:47:57 | FromDiscord | <iWonderAboutTuatara> except maybe not? |
08:48:09 | FromDiscord | <Elegant Beef> It's pico inspired, with tons of expandabillity |
08:48:28 | FromDiscord | <Elegant Beef> It's not limited to 128x128, has 256 colours and ships with an imgui |
08:48:59 | FromDiscord | <iWonderAboutTuatara> I think if I were to make a game in Nim, I'd want to build my own engine |
08:49:09 | FromDiscord | <iWonderAboutTuatara> idk how far I'd get, but it would be fun |
08:49:25 | FromDiscord | <iWonderAboutTuatara> atm though best game framework is heaps for haxe |
08:49:30 | FromDiscord | <iWonderAboutTuatara> (imo) |
08:49:32 | FromDiscord | <Elegant Beef> Eh not nim, not nice |
08:49:41 | FromDiscord | <iWonderAboutTuatara> That's a downside, but it is Haxe |
08:49:44 | FromDiscord | <iWonderAboutTuatara> Haxe is nice |
08:49:56 | FromDiscord | <lqdev> haxe is verbose |
08:49:59 | FromDiscord | <iWonderAboutTuatara> It's probably the best version of a Javalike |
08:50:03 | FromDiscord | <iWonderAboutTuatara> so is C# |
08:50:11 | FromDiscord | <iWonderAboutTuatara> All the Javalikes are |
08:50:26 | FromDiscord | <iWonderAboutTuatara> "everything is a class" scales well but makes things a bit more painful for small things |
08:50:29 | FromDiscord | <lqdev> and all the java-likes suck because of that |
08:50:33 | FromDiscord | <iWonderAboutTuatara> luckily, games usually aren't small projects |
08:50:40 | FromDiscord | <iWonderAboutTuatara> agreed, for smaller things |
08:50:40 | FromDiscord | <Elegant Beef> I really want to remake my last game jam in nico, but i didnt work on it solo, so my friend who doesnt know any nim and isnt too enthuised to learn it probably wouldnt like it 😄 |
08:50:57 | FromDiscord | <iWonderAboutTuatara> honestly I wasn't too into nim at first |
08:51:03 | FromDiscord | <lqdev> "everything is a class" just sucks. let me create a function outside of a class ffs |
08:51:21 | FromDiscord | <iWonderAboutTuatara> It makes some simple things painful, at the cost of making some painful things simpler |
08:51:35 | FromDiscord | <lqdev> this is why i strongly prefer c++ over java or c#, even though it's not a great language |
08:51:39 | FromDiscord | <iWonderAboutTuatara> For a game, which is Haxe's primary usecase, I'm ok with that |
08:51:58 | FromDiscord | <lqdev> i like it when a language is really freeform |
08:52:04 | FromDiscord | <iWonderAboutTuatara> Honestly nowadays a good IDE will take care of a lot of the boilerplate |
08:52:10 | FromDiscord | <iWonderAboutTuatara> not ideal, but it's not the worst |
08:52:18 | FromDiscord | <lqdev> it will also take care of your RAM |
08:52:23 | FromDiscord | <Elegant Beef> What is tonight Haxe night, was talking in another discord about Haxe and how the creator has a studio that uses it 😄 |
08:52:32 | FromDiscord | <iWonderAboutTuatara> Yeah |
08:52:39 | FromDiscord | <iWonderAboutTuatara> Haxe's main usecase is their games lol |
08:52:44 | FromDiscord | <tomck> people actually use haxe? |
08:52:47 | FromDiscord | <iWonderAboutTuatara> Shiro Games and Motion Twin |
08:52:49 | FromDiscord | <lqdev> i'd much rather use vim than an IDE |
08:52:55 | FromDiscord | <Elegant Beef> French game devs for some reason |
08:52:57 | FromDiscord | <iWonderAboutTuatara> yes, people have used haxe to make some incredibly good and popular game s |
08:53:17 | FromDiscord | <iWonderAboutTuatara> Dead cells is the best known |
08:53:24 | FromDiscord | <lqdev> dicey dungeons |
08:53:24 | FromDiscord | <Elegant Beef> No, northgard is |
08:53:29 | FromDiscord | <iWonderAboutTuatara> actually, maybe its papers please |
08:53:41 | FromDiscord | <iWonderAboutTuatara> @lqdev That's haxe? |
08:53:44 | FromDiscord | <iWonderAboutTuatara> wait what |
08:53:45 | FromDiscord | <lqdev> yup |
08:53:53 | FromDiscord | <lqdev> pretty sure it is |
08:53:55 | FromDiscord | <iWonderAboutTuatara> I thought terry Cavanaugh was the dude who never used any frameworks ever |
08:53:58 | FromDiscord | <tomck> ohhhh yeah and northgard, well shoot |
08:54:03 | FromDiscord | <iWonderAboutTuatara> and also open sources his games |
08:54:10 | FromDiscord | <iWonderAboutTuatara> https://haxe.org/use-cases/games/ |
08:54:12 | FromDiscord | <lqdev> he created his own framework for haxe called haxegon |
08:54:15 | FromDiscord | <iWonderAboutTuatara> Heaps is a very nice game engine |
08:54:19 | FromDiscord | <iWonderAboutTuatara> oh makes sense |
08:54:26 | FromDiscord | <lqdev> it's based on openfl iirc |
08:54:29 | FromDiscord | <iWonderAboutTuatara> Yeah Terry Cavanaugh is a legend |
08:54:44 | FromDiscord | <lqdev> vvvvvv is still one of my fav games |
08:54:48 | FromDiscord | <iWonderAboutTuatara> Never played |
08:54:53 | FromDiscord | <lqdev> too bad |
08:54:53 | FromDiscord | <iWonderAboutTuatara> loved dicey dungeons though |
08:54:57 | FromDiscord | <iWonderAboutTuatara> Yeah it really is |
08:55:19 | FromDiscord | <lqdev> vvvvvv is a really fun game for speedrunning |
08:55:20 | FromDiscord | <iWonderAboutTuatara> I was working on a game, and then I realized it was just a worse clone of vvvvvv a while through |
08:55:25 | FromDiscord | <iWonderAboutTuatara> I love speedrun games |
08:55:26 | FromDiscord | <lqdev> lol |
08:55:37 | FromDiscord | <iWonderAboutTuatara> tbh the gravity flipping mechanic is near universal |
08:55:45 | FromDiscord | <iWonderAboutTuatara> fairly uninspired game to begin with tbh |
08:55:57 | FromDiscord | <iWonderAboutTuatara> Also, I can't do art to save my life, |
08:56:12 | FromDiscord | <iWonderAboutTuatara> and I also can't get away with drawing super weird and lowres backgrounds |
08:56:36 | FromDiscord | <iWonderAboutTuatara> https://media.discordapp.net/attachments/371759389889003532/752814632317616198/bg.png |
08:56:40 | FromDiscord | <iWonderAboutTuatara> is my currect version |
08:56:47 | FromDiscord | <iWonderAboutTuatara> *current |
08:56:55 | FromDiscord | <iWonderAboutTuatara> which is not usable |
08:56:59 | FromDiscord | <iWonderAboutTuatara> like at all |
08:57:05 | FromDiscord | <iWonderAboutTuatara> I was hoping this would come out ok, and... |
08:57:17 | FromDiscord | <iWonderAboutTuatara> I have no idea how to do art |
08:57:19 | FromDiscord | <Elegant Beef> I abuse shaders, to hide my inabillity to art |
08:57:30 | FromDiscord | <iWonderAboutTuatara> hard to do that wehn youve got pixel art sadly |
08:57:32 | FromDiscord | <Elegant Beef> Nothing lets you hide bad art like good maths |
08:57:44 | FromDiscord | <iWonderAboutTuatara> pixel shaders just expose it |
08:57:45 | FromDiscord | <Elegant Beef> The joke is im relatively bad at math |
08:57:50 | FromDiscord | <iWonderAboutTuatara> oh lmao |
08:58:02 | FromDiscord | <iWonderAboutTuatara> same tbh |
08:58:04 | FromDiscord | <iWonderAboutTuatara> I |
08:58:09 | FromDiscord | <iWonderAboutTuatara> I'm ok, but not amazing |
08:58:45 | FromDiscord | <iWonderAboutTuatara> honestly gamedev and programming in general has taught me way more maths than school has |
08:59:23 | FromDiscord | <Elegant Beef> But i mean aside from overly bloomy super easy to get away with some simple shapes + cel shading https://streamable.com/ptlyv |
08:59:43 | PMunch | @iWonder, don't say that: https://www.youtube.com/watch?v=fy3FvPg01w0 |
08:59:55 | PMunch | Plenty hiding you can do with shaders on pixel art :) |
09:00:42 | * | abm joined #nim |
09:00:46 | PMunch | I actually Implemented that and created a program to basically do what SpriteLamp does in Nim at some point. Pretty trivial actually |
09:00:48 | FromDiscord | <Elegant Beef> Yea it's all the same logic just different input data |
09:01:08 | FromDiscord | <Elegant Beef> Well spritelamp is just using a normal map and a light source to generate lighting |
09:01:20 | FromDiscord | <Elegant Beef> Unless you mean the normal map generation |
09:01:24 | PMunch | Was planning on making a game about the northern lights with it, but never got around to it.. |
09:01:47 | FromDiscord | <tomck> I want to store a compiletime var which maps strings to typedescs, is that possible? I'm getting a weird error which I *think* indicates that typedesc is an invalid type to store in a table:↵```↵lib/system.nim(612, 16) Error: invalid type: 'None' in this context: 'proc (s: var seq[KeyValuePair[system.string, None]], len: Natural){.noSideEffect.}' for proc↵``` |
09:01:58 | PMunch | Yeah this was generating the normal map from four shaded images |
09:01:58 | FromDiscord | <Elegant Beef> I heavily abused shaders in this to give more interest https://jbeetham.itch.io/cords |
09:02:18 | FromDiscord | <iWonderAboutTuatara> PMunch: True, that was very clever use |
09:02:32 | FromDiscord | <iWonderAboutTuatara> I'l have to look into it, but idk what to do at this point |
09:03:05 | FromDiscord | <Elegant Beef> The thing with shaders is you can just do things and eventually fins omething cool |
09:03:20 | FromDiscord | <iWonderAboutTuatara> Agreed, but you have to know glsl to a decent level to get there |
09:03:34 | FromDiscord | <Elegant Beef> Can you not say glsl in my presence? |
09:03:40 | FromDiscord | <Elegant Beef> That language hurts me |
09:03:41 | FromDiscord | <iWonderAboutTuatara> Which is fine, but I'm not th best at shares |
09:03:42 | FromDiscord | <iWonderAboutTuatara> lmaooooo |
09:03:53 | FromDiscord | <iWonderAboutTuatara> lots of hate for it-that-shall-not-be-named |
09:04:08 | FromDiscord | <iWonderAboutTuatara> I think it's ok, if you ignore how horrible it is it's tolerable |
09:04:16 | * | gmaggior quit (Quit: Bye) |
09:04:51 | FromDiscord | <iWonderAboutTuatara> but I don't really find myself wanting to use it |
09:04:59 | FromDiscord | <iWonderAboutTuatara> unlike most other languages |
09:05:32 | FromDiscord | <Elegant Beef> Eh my biggest issue is the lack of implict type conversion |
09:05:44 | FromDiscord | <iWonderAboutTuatara> It's not a nice language |
09:05:48 | FromDiscord | <iWonderAboutTuatara> for sure |
09:06:03 | FromDiscord | <iWonderAboutTuatara> it definetely doesn't treat the programmer too well |
09:06:10 | FromDiscord | <iWonderAboutTuatara> There's a nim -> glsl DSL |
09:06:15 | FromDiscord | <Elegant Beef> I know |
09:06:19 | FromDiscord | <iWonderAboutTuatara> Don't know how good it is or isn't though |
09:06:26 | FromDiscord | <Elegant Beef> I'd just rather use CG or HLSL |
09:06:41 | FromDiscord | <iWonderAboutTuatara> I don't think Godot has very good non-glsl support |
09:08:21 | FromDiscord | <iWonderAboutTuatara> or any non glsl support actually |
09:08:26 | FromDiscord | <iWonderAboutTuatara> hlsl is supposed to be nice |
09:08:39 | FromDiscord | <iWonderAboutTuatara> I don't know anybody that uses cg, so no comment |
09:08:49 | FromDiscord | <Elegant Beef> It was Unity's main shader language |
09:08:57 | FromDiscord | <Elegant Beef> Also sorry tomck we're so offtopic |
09:09:06 | FromDiscord | <iWonderAboutTuatara> lmao |
09:09:08 | FromDiscord | <iWonderAboutTuatara> lets migrate |
09:09:08 | ehmry | ldlework: FWIW the wrapped compiler is in nixpkgs master now |
09:09:10 | FromDiscord | <iWonderAboutTuatara> to <#371759607934353448> |
09:09:33 | ldlework | sadly doesn't work for me :( |
09:11:05 | FromDiscord | <iWonderAboutTuatara> wait a minute |
09:11:14 | FromDiscord | <iWonderAboutTuatara> nevermind |
09:11:15 | FromDiscord | <Elegant Beef> @tomck ↵> typedesc acts like a generic type. For instance, the type of the symbol int is typedesc[int]. Just like with regular generic types, when the generic param is omitted, typedesc denotes the type class of all types. As a syntactic convenience, one can also use typedesc as a modifier.↵So think the answer is no, but i could be wrong |
09:12:02 | * | Tuatarian joined #nim |
09:12:29 | FromDiscord | <iWonderAboutTuatara> question: How possible is using a python library in nim? |
09:12:37 | * | Tanger quit (Quit: Leaving) |
09:12:38 | * | Tuatarian quit (Remote host closed the connection) |
09:14:35 | FromDiscord | <Elegant Beef> https://github.com/yglukhov/nimpy |
09:14:41 | FromDiscord | <iWonderAboutTuatara> OH |
09:14:47 | FromDiscord | <iWonderAboutTuatara> I thought that was numpy for nim! |
09:14:56 | FromDiscord | <iWonderAboutTuatara> lmaoo |
09:15:20 | FromDiscord | <mratsim> There is also https://github.com/Pebaz/nimporter |
09:15:28 | FromDiscord | <mratsim> ah sory it's the other way around |
09:16:02 | FromDiscord | <Recruit_main707> What module do you want to use? |
09:20:58 | * | Zectbumo_ quit (Remote host closed the connection) |
09:28:45 | FromDiscord | <Clyybber> Araq: Do we maybe want to rip openArray out of the backend and turn it into a literal (p: pointer, len: int) tuple? |
09:29:38 | Araq | too late, already got it to work |
09:30:03 | Araq | and it needs special codegen love for toOpenArray slicing etc anyway |
09:30:14 | Araq | in the end the refactoring wasn't that much work |
09:34:33 | Zevv | we're not getting real slices, are we? |
09:35:36 | Araq | we are, including borrow checking |
09:35:54 | FromDiscord | <dom96> > I heavily abused shaders in this to give more interest https://jbeetham.itch.io/cords↵@Elegant Beef huh, the buttons don't work for me even in the main menu |
09:37:13 | FromDiscord | <Clyybber> Araq: Sure, but it adds so much complexity. Why do we need special codegen for toOpenArray slicing? |
09:38:06 | Araq | because we lack the primitives |
09:38:16 | Araq | toOpenArray is the primitive |
09:38:29 | Araq | anyhow, it doesn't add much complexity |
09:38:43 | Araq | it's a clean patch IMO |
09:38:55 | FromDiscord | <Clyybber> Ok |
09:39:07 | Araq | <insert rant here that we don't have an AST code generator> |
09:39:25 | Araq | but that aside, it's just like the older code :-) |
09:45:28 | Araq | Clyybber: in fact, the complexity arises from the ABI compatibility, we don't map openArray to a struct if it's used as a parameter |
09:47:16 | FromDiscord | <exelotl> I'm so excited for this change |
09:47:38 | Zevv | what does it bring to you then |
09:48:05 | narimiran | Zevv: he just told you: excitement |
09:48:12 | Zevv | fair enough |
09:48:13 | FromDiscord | <exelotl> yes! |
09:48:58 | Araq | https://github.com/nim-lang/Nim/pull/15282/files#diff-8803b947fd0836e22b7b0f67e07b6077 |
09:48:58 | disbot | ➥ borrow checking |
09:49:27 | Araq | I think it means we can remove the 'evalOnce' hacks in the stdlib |
09:49:45 | Araq | because then openArray isn't a weird special case anymore |
09:51:59 | FromDiscord | <exelotl> Zevv: I have a lot of code that looks like this in my project: https://media.discordapp.net/attachments/371759389889003532/752828570551844954/unknown.png |
09:52:56 | Zevv | right, that should clean up a bit! |
09:53:02 | FromDiscord | <mratsim> so now you can put openArray in an object, you can return an openarray from a proc as well? |
09:55:20 | Araq | well it's WIP but yeah |
09:55:28 | Araq | I'm writing the spec |
09:57:28 | alehander92 | hmmm |
09:57:32 | alehander92 | would this work with strings |
09:57:54 | alehander92 | e.g. splitting returning an iterator of openarrays |
09:58:00 | alehander92 | being* |
10:01:27 | FromDiscord | <mratsim> That would be a good time for a strutils/sequtils revamp |
10:02:01 | FromDiscord | <mratsim> I don't know if iterator-based or range-based is better though, ranges compose better |
10:11:38 | alehander92 | hm |
10:11:44 | alehander92 | i wonder : a bit radical |
10:12:04 | alehander92 | if isNil didn't exist in real code already |
10:13:02 | * | pietroppeter joined #nim |
10:13:37 | alehander92 | would it make sense to make it looser (weaker precedence) |
10:13:44 | alehander92 | to somehow capture the whole expr before it |
10:14:07 | alehander92 | so e.g. `if a.b.isNil` just work without need for `if a.isNil or a.b.isNil` |
10:14:48 | alehander92 | i think timothee already had something like this with a different `?!` |
10:15:16 | FromDiscord | <tomck> yeah thanks @Elegant Beef , i just ended up storing the NimNode of the type name |
10:15:35 | alehander92 | ok https://github.com/nim-lang/Nim/pull/13023 that's it |
10:15:36 | disbot | ➥ [TODO] wrapnils: allows optional chaining of field access and indexing when LHS i snil ; snippet at 12https://play.nim-lang.org/#ix=26k9 |
10:17:04 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
10:17:52 | * | pbb joined #nim |
10:25:37 | FromDiscord | <NickSeagull> Hello, just started learning Nim last week! 😊 ↵↵Weird question: Is there a way to create a type in Nim that only exists at the type level, but not at the value level? I mean something like TypeScript's `never` type, or Haskell's `Void` (which is not the regular `void`) |
10:29:39 | FromDiscord | <lqdev> what would be the use case? |
10:30:27 | alehander92 | something that can never be instantiated? |
10:31:03 | FromDiscord | <NickSeagull> Yep alehander92, or functions that never return @lqdev |
10:31:23 | * | krux02 joined #nim |
10:31:34 | FromDiscord | <NickSeagull> Not really useful per se, I like to go through the book "Thinking with types" with each programming language that I pickup to get a grip of the type system 🙂 |
10:32:08 | FromDiscord | <Recruit_main707> id also like to see a usecase, because they might not be needed |
10:32:09 | alehander92 | maybe with concepts you can invent a type that never matches |
10:32:21 | * | agent0x00 joined #nim |
10:32:43 | alehander92 | `type Void = concept false` ? |
10:33:06 | FromDiscord | <Recruit_main707> i still dont get when is this useful |
10:33:14 | * | arecacea1 quit (Remote host closed the connection) |
10:33:35 | FromDiscord | <NickSeagull> That could work, could I get a link on concepts alehander92 ? |
10:33:43 | * | arecacea1 joined #nim |
10:34:29 | alehander92 | `concept a\n false` |
10:34:41 | FromDiscord | <NickSeagull> @Recruit_main707 there could be a case where you would want to throw, but not specifying which exception the function throws, so you just tag it as `never`/`Void` |
10:34:43 | alehander92 | the body seems to be on the next line |
10:35:09 | FromDiscord | <Recruit_main707> https://nim-lang.org/docs/manual_experimental.html#concepts |
10:35:15 | * | krux02_ joined #nim |
10:35:23 | alehander92 | https://nim-lang.org/docs/manual_experimental.html |
10:35:29 | FromDiscord | <NickSeagull> Oooh, that's why I havent found it, thanks folks! 🙂 |
10:35:41 | alehander92 | but concepts seem to be a subject of change |
10:36:10 | alehander92 | there is a RFC for re-designing them, so sadly i am not sure how easy would it be to have custom expressions |
10:36:21 | FromDiscord | <tomck> Hello! I want to create a tuple expression in a macro, what's the AST type for that? (e.g. (1, 2, 3)) |
10:36:41 | FromDiscord | <NickSeagull> I'll adapt, won't probably use this in prod for now alehander92 , thanks a lot 🙌 ¯\_(ツ)_/¯ |
10:36:51 | FromDiscord | <tomck> ohhhh nnkpar i see it now, i was looking for an nnktuple, mb |
10:37:01 | alehander92 | but about `never`: not sure , does ts try to prove that the functions doesn't finish |
10:37:07 | * | krux02 quit (Ping timeout: 260 seconds) |
10:37:08 | alehander92 | sounds like the halting problem in general |
10:37:42 | alehander92 | if it's just "it can't be assigned anything except another never" |
10:38:07 | FromDiscord | <NickSeagull> yep, essentially that, doesn't prove much tbh |
10:38:31 | alehander92 | then it sounds like |
10:38:31 | FromDiscord | <NickSeagull> Haskell's `Void` is much stricter as you cannot return anything at all |
10:38:34 | alehander92 | nominal typing |
10:38:49 | alehander92 | because if you just define a type with a name usually you have to assign the same type and name |
10:39:08 | alehander92 | yeah |
10:40:23 | alehander92 | well: maybe `distinct void` ? |
10:40:33 | alehander92 | i tried that, but not sure if it's working correctly |
10:40:40 | FromDiscord | <exelotl> oops I managed to make a type that can't be used for anything at all. xD |
10:40:45 | FromDiscord | <exelotl> type Never {.error:"Nope.".} = object |
10:41:19 | FromDiscord | <NickSeagull> oh, so there's an error pragma, cool 😄 |
10:41:34 | alehander92 | oh i thought about error |
10:41:41 | alehander92 | but didn't think it can be used like that!! |
10:42:41 | alehander92 | but not sure how useful would this be .. :D |
10:44:00 | FromDiscord | <Rika> i still do not see the use case |
10:44:21 | FromDiscord | <exelotl> my type doesn't seem useful at all lol, you can't even mention it anywhere in your code |
10:44:54 | alehander92 | maybe for deprecation |
10:45:04 | FromDiscord | <exelotl> tru |
10:45:06 | alehander92 | or if it can be somehow |
10:45:16 | alehander92 | instantiation of a generic for some args which are wrong |
10:45:26 | alehander92 | it makes sense if you write type-level programs (??) |
10:46:05 | * | maier quit (Ping timeout: 240 seconds) |
10:46:06 | FromDiscord | <NickSeagull> The two main use cases are for explicitly stating "Can't happen use cases" |
10:46:28 | FromDiscord | <NickSeagull> The idea is that you can use it to state that this part of the code won't be called |
10:46:31 | FromDiscord | <Rika> dont we already have void |
10:47:03 | * | agent0x01 joined #nim |
10:47:06 | alehander92 | like unreachable? |
10:47:14 | FromDiscord | <NickSeagull> exactly alehander92 |
10:47:14 | alehander92 | we have `{.error.}` for that indeed |
10:47:18 | * | shirleyquirk joined #nim |
10:47:19 | * | a_b_m joined #nim |
10:47:27 | * | Trustable joined #nim |
10:48:00 | * | MightyJoe joined #nim |
10:48:55 | FromDiscord | <Rika> i still do not see the use case, why would that be part of the type? |
10:49:25 | * | agent0x00 quit (Ping timeout: 246 seconds) |
10:49:44 | FromDiscord | <NickSeagull> sent a code paste, see https://play.nim-lang.org/#ix=2wNZ |
10:50:25 | FromDiscord | <Rika> proc absurd[T](x: T) {.error: "This should never happen".} |
10:50:28 | * | cyraxjoe quit (Ping timeout: 246 seconds) |
10:50:37 | * | abm quit (Ping timeout: 264 seconds) |
10:50:50 | FromDiscord | <Rika> any exception is only on run time |
10:51:05 | FromDiscord | <Rika> procs are not resolved on runtime |
10:51:18 | FromDiscord | <alehander42> yeah so you can alias this to a type i guess |
10:51:19 | * | idf04 joined #nim |
10:51:49 | * | maier joined #nim |
10:52:00 | FromDiscord | <alehander42> i can imagine for stuff like algo working on T |
10:52:15 | FromDiscord | <alehander42> if you receive seq[T] it can work for seq[int] |
10:52:28 | FromDiscord | <alehander42> but not for something else which is seq[Empty] |
10:52:43 | FromDiscord | <Rika> use a restrained generic for that |
10:52:58 | FromDiscord | <alehander42> yah |
10:53:00 | FromDiscord | <alehander42> yeah* |
10:53:01 | FromDiscord | <Rika> proc something[T: SomeInteger](x: seq[T]) |
10:53:02 | FromDiscord | <alehander42> but in nim people usually seem to just use `{.error.}` |
10:53:07 | FromDiscord | <alehander42> or `when stuff: error` |
10:53:11 | FromDiscord | <alehander42> or constraints |
10:53:45 | FromDiscord | <alehander42> the thing is people usually use compile time code evaluation for complicated logic imho |
10:53:56 | FromDiscord | <alehander42> so type-level programming might not be so type-only |
10:54:16 | FromDiscord | <Rika> use a concept them |
10:54:17 | FromDiscord | <Rika> (edit) 'them' => 'then' |
10:55:25 | FromDiscord | <NickSeagull> sent a code paste, see https://play.nim-lang.org/#ix=2wO2 |
10:55:48 | * | agent0x01 quit (Ping timeout: 260 seconds) |
10:56:45 | FromDiscord | <NickSeagull> We could write a type that represents a consumer, which is a stream that never yields:↵```nim↵type Consumer[A, R] = Stream[A, Never, R]↵``` |
10:56:57 | FromDiscord | <Rika> void |
10:57:27 | FromDiscord | <NickSeagull> @Rika so `void` doesn't exist at value level? |
10:57:39 | alehander92 | you can't write `a: void` |
10:57:47 | FromDiscord | <NickSeagull> OOOOOOOOOOH |
10:57:48 | alehander92 | you can't really have a value with void type iirc |
10:57:54 | FromDiscord | <NickSeagull> 😂😂😂 |
10:58:01 | alehander92 | but i mean that's true for C, no? |
10:58:08 | FromDiscord | <Rika> you can have proc arguments that are void |
10:58:13 | FromDiscord | <Rika> theyre just treated as nonexistent |
10:58:14 | alehander92 | can you? |
10:58:18 | alehander92 | in C or in Nim? |
10:58:20 | FromDiscord | <Rika> not fields |
10:58:22 | FromDiscord | <Rika> just proc args |
10:58:25 | FromDiscord | <NickSeagull> Long time since I dont write C, but in TypeScript and Java you can literally do `return void` |
10:58:38 | FromDiscord | <NickSeagull> And `void` in that case is a type with cardinality 1 |
10:58:38 | alehander92 | well, huh |
10:58:52 | FromDiscord | <NickSeagull> But looks like in Nim its `0` (no values for it exist) |
10:58:59 | alehander92 | i am not sure because |
10:59:05 | alehander92 | i think return void for Java is probably just |
10:59:09 | alehander92 | sugar for return? |
10:59:17 | FromDiscord | <Rika> https://nim-lang.org/docs/manual_experimental.html#void-type |
10:59:18 | alehander92 | if one can't assign it to any variable |
10:59:40 | idf04 | discard return |
10:59:46 | alehander92 | huh |
10:59:52 | alehander92 | why do we have void params |
11:00:26 | FromDiscord | <NickSeagull> Ok got it, thanks a lot folks, that was super useful 🙂 |
11:00:41 | FromDiscord | <NickSeagull> I'm quite hyped up by Nim, it's looking so cool so far 😄 |
11:00:56 | alehander92 | ahhhh |
11:01:02 | FromDiscord | <NickSeagull> alehander92: definitely you cant do what I said in Java, I brainfarted |
11:01:03 | alehander92 | i see, so this generic code works |
11:01:11 | alehander92 | no problem nick |
11:01:20 | alehander92 | i don't really know java |
11:01:42 | FromDiscord | <NickSeagull> Neither do I |
11:03:27 | alehander92 | :D :D |
11:07:54 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2wO8 |
11:09:16 | FromDiscord | <tomck> *sigh* never mind i think i just need to use the nnkPar and ignore nnkTupleTy, i think nnkTupleTy has something to do with type decls maybe? |
11:09:20 | FromDiscord | <tomck> nnkPar works though |
11:14:50 | narimiran | @tomch try to use `dumpAstGen` (or `dumpTree`) with the code you want to produce |
11:15:44 | narimiran | e.g. https://play.nim-lang.org/#ix=2wOa |
11:16:10 | narimiran | after you click on "run", click on "showing: output" |
11:16:19 | FromDiscord | <tomck> ahhh that will help a lot I think, thanks |
11:19:29 | FromDiscord | <tomck> cool! this helps a bunch, thanks again |
11:20:30 | FromDiscord | <lqdev> @tomck iirc it's nnkTupleConstr not nnkPar |
11:20:33 | * | arecacea1 quit (Read error: Connection reset by peer) |
11:21:01 | * | arecacea1 joined #nim |
11:21:05 | FromDiscord | <tomck> interesting, so nnkPar definitely works, but just based on naming nnkTupleConstr would make sense |
11:35:44 | FromDiscord | <lqdev> oh wait you wanna construct a tuple _type_ |
11:35:45 | FromDiscord | <lqdev> hm |
11:36:04 | FromDiscord | <lqdev> TupleConstr is for instantiating tuples |
11:36:14 | * | koltrast quit (Ping timeout: 246 seconds) |
11:36:56 | FromDiscord | <lqdev> seems like Par is used for tuple types |
11:38:53 | FromDiscord | <tomck> i am also using Par for constructing a tuple value |
11:44:07 | * | konkrrrrrr quit (Read error: Connection reset by peer) |
11:44:41 | * | konkrrrrrr joined #nim |
11:46:09 | * | idf04 quit (Read error: Connection reset by peer) |
11:58:07 | * | koltrast joined #nim |
12:04:30 | * | koltrast quit (Read error: Connection reset by peer) |
12:05:01 | * | koltrast joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:23 | * | snowolf quit (Remote host closed the connection) |
12:06:37 | * | supakeen joined #nim |
12:07:20 | * | bouzu__ quit (Quit: Leaving) |
12:08:04 | * | snowolf joined #nim |
12:08:12 | PMunch | I think nnkTupleConstr is used in a typed context, while nnkPar is used for untyped nodes |
12:08:31 | PMunch | Because as it is untyped Nim doesn't yet know that you're constructing a tuple |
12:11:06 | PMunch | Well isn't this a nice signature :P `iterator entries(table: TerminalTable, sizes: seq[int]): iterator(): iterator(): tuple[key: int, val: string]` |
12:15:39 | * | Kaivo joined #nim |
12:21:46 | narimiran | yo dawg.... |
12:21:59 | PMunch | Haha :P |
12:22:17 | PMunch | Basically I just wanted to give the user a way to output things between the rows and columns of the table |
12:32:42 | * | lritter joined #nim |
12:54:48 | * | dddddd quit (Ping timeout: 260 seconds) |
13:02:59 | * | maier quit (Ping timeout: 240 seconds) |
13:03:50 | ForumUpdaterBot | New thread by Mrhdias: Is there any PWA (Progressive Web Apps) framework or package written in nim?, see https://forum.nim-lang.org/t/6786 |
13:07:47 | FromDiscord | <bebrws> sent a code paste, see https://play.nim-lang.org/#ix=2wPa |
13:13:24 | FromDiscord | <Rika> backwards index? |
13:17:47 | * | dddddd joined #nim |
13:27:44 | FromDiscord | <bebrws> Ahh thank you! |
13:29:35 | FromDiscord | <bebrws> So that is a sequence operator? I see that valStack is ```var↵ pStack: seq[string] = @[]``` |
13:29:52 | FromDiscord | <bebrws> And not sure what that means actually in terms of a sequence |
13:30:08 | FromDiscord | <bebrws> sent a code paste, see https://play.nim-lang.org/#ix=2wPn |
13:31:22 | FromDiscord | <Rika> ^1 is last, ^2 is second last, etc |
13:31:29 | FromDiscord | <Rika> i assume |
13:31:48 | FromDiscord | <Rika> so yeah someseq[^1] is "get last in the seq" |
13:33:00 | FromDiscord | <bebrws> O ok |
13:33:03 | FromDiscord | <bebrws> That makes sense |
13:33:18 | FromDiscord | <bebrws> sent a code paste, see https://play.nim-lang.org/#ix=2wPp |
13:36:50 | PMunch | Hmm, it doesn't seem to like the nested iterators: http://ix.io/2wPr |
13:37:18 | PMunch | http://ix.io/2wPs/nim |
13:37:49 | PMunch | The compiler that is |
13:37:58 | disruptek | compilers are made to be broken. |
13:38:06 | PMunch | Worked fine when I had it as a top level snippet |
13:38:13 | PMunch | But in my procedure it brokee |
13:43:03 | * | agent0x01 joined #nim |
13:44:51 | FromDiscord | <vieru> i have a 32bit exe↵how to know if host os is 32 or 64bit ? |
13:45:12 | disruptek | does it run? |
13:45:57 | FromDiscord | <vieru> u talking with me ? |
13:46:12 | disruptek | i don't see anyone else here. |
13:46:44 | FromDiscord | <vieru> well i saw you talking with pmunch bout something broken |
13:46:54 | FromDiscord | <vieru> it does run |
13:47:05 | disruptek | pmunch doesn't count. |
13:47:16 | disruptek | analysis reveals that we don't speak to each other. |
13:47:26 | disruptek | okay, your system is unlikely to be 16bit. |
13:47:51 | FromDiscord | <Rika> lol |
13:48:00 | FromDiscord | <vieru> ok lol |
13:48:05 | PMunch | Ey, we speak to each other from time to time disruptek :P |
13:48:05 | * | narimiran quit (Ping timeout: 256 seconds) |
13:48:12 | FromDiscord | <vieru> thanks i guess |
13:48:16 | FromDiscord | <vieru> lol |
13:48:28 | disruptek | yeah, but zevv's irc graph says we usually don't. |
13:48:32 | disruptek | might be a timezone thing. |
13:48:40 | FromDiscord | <NickSeagull> @vieru depends on the OS. If on Linux, try `uname -a` , if on Windows, `Windows + X` -> click system -> You will see it under device specifications, system type |
13:48:56 | FromDiscord | <NickSeagull> Not sure about MacOS right now |
13:48:59 | FromDiscord | <Rika> i think they mean |
13:49:01 | FromDiscord | <Rika> via code |
13:49:03 | disruptek | try running it twice in a row. |
13:49:07 | FromDiscord | <NickSeagull> Ah right rofl |
13:49:09 | FromDiscord | <vieru> yeah |
13:49:13 | disruptek | if that works, you might have a 32bit machine. |
13:49:15 | FromDiscord | <vieru> its windows omly |
13:49:23 | disruptek | then who cares what it is? |
13:49:26 | FromDiscord | <vieru> disruptek stop trolling me |
13:49:27 | FromDiscord | <Doongjohn> check the size of int? |
13:49:32 | FromGitter | <alehander92> disruptek |
13:49:37 | FromGitter | <alehander92> stop trolling him! |
13:49:40 | disruptek | wut |
13:49:54 | FromDiscord | <NickSeagull> @vieru you could do a system call to `wmic OS get OSArchitecture` |
13:50:01 | disruptek | see if sizeof(int) == 4 or sizeof(int) == 8 |
13:50:37 | FromDiscord | <vieru> nope, checking the size of the int will only say that the exe is 64bit or 32bit |
13:50:48 | FromDiscord | <Doongjohn> oh |
13:50:50 | FromDiscord | <vieru> (edit) 'that' => 'if' |
13:51:20 | disruptek | you mean you want to check if the host can run the 32bit exe? |
13:51:26 | FromDiscord | <dk> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement |
13:51:36 | FromDiscord | <dk> it says "system" in the example |
13:51:42 | FromDiscord | <dk> not "binary" |
13:52:09 | FromDiscord | <vieru> my os is 64bit and the exe is 32bit ↵sizeof int is 4 |
13:52:16 | disruptek | i don't know how you can determine if the kernel can invoke a 32bit executable; if it's 64bit, that doesn't mean it supports 32bit. |
13:52:29 | disruptek | probably you need to make a syscall. |
13:52:30 | FromDiscord | <vieru> and when i compile it 64bit↵sizeof int is 8 |
13:52:45 | PMunch | Argh, super annoying that the double iterators doesn't work.. |
13:52:47 | FromDiscord | <dk> ok then, the manual is somewhat confusing |
13:53:06 | FromDiscord | <vieru> > you mean you want to check if the host can run the 32bit exe?↵@disruptek[IRC]#0000 ↵i mean how can i know the arhitecture of the host os |
13:53:26 | disruptek | without compiling anything? |
13:53:42 | disruptek | maybe the platform module works in nimscript. |
13:54:12 | FromDiscord | <vieru> within the code i mean |
13:54:37 | FromDiscord | <Rika> wait |
13:54:42 | FromDiscord | <Rika> this might be an xy issue |
13:54:45 | FromDiscord | <vieru> is there somthing like os.host.arhitecture ? |
13:54:49 | FromDiscord | <Rika> whats the issue you're trying to solve |
13:54:53 | disruptek | there's the platform module. |
13:55:20 | shirleyquirk | So you want to run something... In your code... To see if your code runs? That's like the opposite of the halting problem |
13:56:04 | FromDiscord | <vieru> no dudes lol ↵im trying to find out the arhitecture of the os my code is running |
13:56:12 | FromDiscord | <vieru> that,s all |
13:56:15 | FromDiscord | <Doongjohn> does this work in nim? https://stackoverflow.com/questions/1288189/elegant-and-safe-way-to-determine-if-architecture-is-32bit-or-64bit |
13:57:40 | FromDiscord | <vieru> > there's the platform module.↵@disruptek[IRC]#0000 ↵i googled it but i can't find it |
13:57:49 | disruptek | see compiler/platform. |
13:58:44 | PMunch | Can you even run a 32-bit program on a 64 bit system without having the system hiding the fact that it is 64-bit? |
13:58:51 | PMunch | To the degree where it would be impossible to detect |
14:00:15 | FromDiscord | <Rika> from doong's link, `on linux you can query the proc filesystem whereas on windows you can query the register. ` |
14:00:41 | disruptek | just ask your mom. |
14:02:46 | FromDiscord | <Doongjohn> well I found this for windows [GetNativeSystemInfo](https://docs.microsoft.com/ko-kr/windows/win32/api/sysinfoapi/nf-sysinfoapi-getnativesysteminfo?redirectedfrom=MSDN) |
14:02:58 | FromDiscord | <vieru> > see compiler/platform.↵@disruptek[IRC]#0000 ↵that doesnt help |
14:04:19 | FromDiscord | <vieru> is processor arch same as os arch ?↵i mean you can install 32bit windows on a 64bit processor |
14:04:31 | FromDiscord | <vieru> so that wouldn't really help |
14:04:32 | shirleyquirk | Or fork a process, compile and run ``return sizeof(int)`` with whatever standard GCC is? |
14:04:57 | shirleyquirk | That will be same as os, not necessarily architecture |
14:05:33 | FromDiscord | <vieru> sizeof int doesn't help, it only shows the exe's architecture |
14:05:59 | FromDiscord | <Rika> whats the reason you want to get the os's arch |
14:06:56 | FromDiscord | <vieru> registry specific code |
14:07:06 | FromDiscord | <vieru> on windows |
14:07:41 | FromDiscord | <vieru> 64bit os and 32bit os have somewhat different registry path's |
14:07:43 | FromDiscord | <vieru> (edit) 'path's' => 'paths' |
14:08:41 | FromDiscord | <Doongjohn> why not just build 2 exe? |
14:09:22 | FromDiscord | <vieru> i don't wanna build my app 2 times just for some different strings |
14:09:53 | FromDiscord | <Doongjohn> hmm does this help? https://stackoverflow.com/questions/50978180/programmatically-detect-cpu-architecture-at-runtime |
14:10:05 | FromDiscord | <Rika> https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsysteminfo |
14:10:39 | FromDiscord | <vieru> sent a code paste, see https://play.nim-lang.org/#ix=2wPL |
14:11:09 | FromDiscord | <Rika> they said their exe is strictly 32bit only |
14:12:45 | FromDiscord | <vieru> @Rika that might help just a bit but 64bit processors can have a 32bit os installed, right ? |
14:12:58 | FromDiscord | <Rika> https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getnativesysteminfo?redirectedfrom=MSDN |
14:13:06 | FromDiscord | <Rika> this one is better |
14:13:37 | * | maier joined #nim |
14:14:25 | FromDiscord | <vieru> https://docs.microsoft.com/en-us/windows/win32/api/wow64apiset/nf-wow64apiset-iswow64process2 |
14:14:29 | FromDiscord | <vieru> this might be it |
14:14:47 | FromDiscord | <vieru> `Determines whether the specified process is running under WOW64; also returns additional machine process and architecture information.` |
14:14:59 | FromDiscord | <vieru> if its running under wow64 than os is 64bit |
14:15:09 | FromDiscord | <vieru> (edit) 'than' => 'then' |
14:15:16 | FromDiscord | <vieru> if not os is 32bit |
14:15:30 | shirleyquirk | https://stackoverflow.com/questions/869783/windows-64-bit-registry-v-s-32-bit-registry seems to suggest you need two keys/paths, if your exe is 32 bit it doesn't matter if you can detect that the system is 64, you can't access the 64bit keys and vice versa if I'm reading that correctly |
14:16:15 | FromDiscord | <Rika> theyre only using a 32bit binary |
14:18:09 | FromDiscord | <vieru> i'm trying to edit that startup key in registry |
14:18:14 | shirleyquirk | Im asking now, cuz this is new to me, but it sounded like 32bit apps running in 32bit os have the same path as 32bit running in 64 |
14:18:41 | shirleyquirk | Ohhhh I get it. Thanks |
14:20:21 | FromDiscord | <vieru> `SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run` |
14:20:42 | FromDiscord | <vieru> isn't this affected by the fact that my exe is 32bit and running on a 64bit os ? |
14:26:42 | FromDiscord | <vieru> `On 64-bit Windows, portions of the registry entries are stored separately for 32-bit application and 64-bit applications and mapped into separate logical registry views using the registry redirector and registry reflection, because the 64-bit version of an application may use different registry keys and values than the 32-bit version. There are also shared registry keys that are not redirected or reflected.` |
14:35:11 | * | xet7 quit (Remote host closed the connection) |
14:38:19 | * | agent0x01 quit (Ping timeout: 246 seconds) |
14:39:07 | * | superbia joined #nim |
14:45:09 | FromDiscord | <Ricky Spanish> how does thread safety for dictionaries and things work out for nim on windows/linux, they invoke the appropriate calls to the native underlying os to handle the mutex's etc by default? |
14:45:25 | disruptek | nah. |
14:45:27 | * | waleee-cl joined #nim |
14:46:10 | * | a_chou joined #nim |
14:49:11 | * | natrys joined #nim |
14:49:50 | * | konkrrrrrr quit (Read error: Connection reset by peer) |
14:51:58 | * | haxscramper joined #nim |
14:52:18 | * | endragor joined #nim |
14:55:38 | * | drewr quit (Quit: brb) |
14:56:46 | * | arecacea1 quit (Remote host closed the connection) |
14:57:20 | * | arecacea1 joined #nim |
14:58:46 | * | hnOsmium0001 joined #nim |
14:59:29 | * | drewr joined #nim |
15:00:21 | FromDiscord | <19> my noob attempt at nim pointer arithmetic, crashing: https://play.nim-lang.org/#ix=2wQ3 |
15:01:12 | FromDiscord | <19> that one doesn't crash, this one does: https://play.nim-lang.org/#ix=2wQ7 |
15:01:16 | * | kinkinkijkin joined #nim |
15:01:39 | FromDiscord | <lqdev> @19 you're setting it constantly to the first row instead of incrementing the pointer by pitch |
15:03:56 | FromDiscord | <19> im incrementing by the pitch in the last line |
15:05:47 | FromDiscord | <lqdev> you're doing row = pitch + 1 |
15:05:55 | FromDiscord | <lqdev> not row = row + pitch |
15:06:08 | FromDiscord | <lqdev> (ofc. excluding all the casts) |
15:08:49 | FromDiscord | <NickSeagull> What's the time of type checking generic procs? In theory, this code shouldn't compile, but it does:↵```nim↵proc example*[A, B, C](f: proc (x: (B, C)): A, x: (B, C)): A = 3↵``` |
15:09:23 | FromDiscord | <NickSeagull> The correct body of that proc should be `f(x)` |
15:09:47 | FromDiscord | <Rika> compile time |
15:10:02 | solitudesf | they are checked when they are instantiated |
15:10:27 | FromDiscord | <Rika> i dont see whats wrong |
15:11:32 | FromDiscord | <NickSeagull> Right, lemme change it, wrote it incorrectly:↵```nim↵proc example*[A, B, C](f: proc (x: (B, C)): A, x: (B, C)): A = f(3)↵``` |
15:11:47 | alehander92 | Nick |
15:11:50 | FromDiscord | <NickSeagull> @Rika that does compile, whereas `f` takes a tuple as a parameter |
15:11:54 | alehander92 | they are only checked |
15:11:57 | alehander92 | when instantiated |
15:12:07 | FromDiscord | <Rika> only checks when its used is what they mean |
15:12:12 | FromDiscord | <NickSeagull> yeah yeah |
15:12:15 | FromDiscord | <Rika> because of dead code elim afaik |
15:12:16 | FromDiscord | <NickSeagull> Didnt read lol |
15:12:18 | alehander92 | exactly yeah |
15:12:32 | disruptek | no, because that's how generics work. |
15:12:47 | FromDiscord | <NickSeagull> Is there a workaround to check it is correct? I guess a doctest or smth? |
15:12:51 | alehander92 | well , one could on theory typecheck the body in some more generic fashion |
15:13:01 | alehander92 | but that's how it's done in nim |
15:13:13 | FromDiscord | <NickSeagull> alehander92 how would that be? |
15:13:37 | FromDiscord | <NickSeagull> I'm just checking the limits of the language and playing a bit, so not really focusing on having prod or pretty code right now |
15:14:06 | alehander92 | i mean in another language one could do that |
15:14:15 | alehander92 | but i think what nim does is monomorphization (??) |
15:14:41 | FromDiscord | <NickSeagull> ah, I thought there was a hacky way of doing so with pragmas or so |
15:14:47 | FromDiscord | <NickSeagull> Thanks 🙂 |
15:16:05 | alehander92 | well, you can just make sure the function is used |
15:16:46 | FromDiscord | <NickSeagull> Would adding a `runnableExamples` block would work? |
15:17:26 | alehander92 | i think those run only in `nim doc`, and have no idea how this works with generics, sorry |
15:17:40 | FromDiscord | <NickSeagull> Got it, will try then 🙂 |
15:17:41 | alehander92 | you could do `if false: call()` |
15:17:58 | alehander92 | if you just want to ensure you call it but seems hacku |
15:19:37 | alehander92 | or `discard call[<types>]` |
15:20:26 | FromDiscord | <NickSeagull> Oh, that last one works perfectl |
15:20:27 | FromDiscord | <NickSeagull> (edit) 'perfectl' => 'perfectly' |
15:20:37 | * | shirleyquirk quit (Ping timeout: 264 seconds) |
15:20:49 | Araq | really? never tried that "idiom" :-) |
15:20:58 | Araq | interesting. and good to know that it works |
15:22:41 | FromDiscord | <NickSeagull> Araq: When the body is properly type checked, then it errors complaining about args not provided, but at that point its already unneeded 🙂 |
15:22:53 | alehander92 | well this probably doesn't generate anything additional in C codegen i hope |
15:25:10 | alehander92 | huh yeah it says illegal discard proc |
15:25:48 | Araq | yeah we added this special case to prevent bugs |
15:25:58 | alehander92 | yeah i see the comment now |
15:26:48 | alehander92 | i guess `let _ = call[..]` does the same anyway |
15:29:21 | Araq | just like alehander92 likes it, scream "I'm confused and bug!" and you can always add a special case, no question asked. And we made the world a little better by nurturing people to think even less when they are programming. |
15:29:30 | FromDiscord | <NickSeagull> In case someone is curious, here are the weird things I've been doing: https://github.com/NickSeagull/nim-twtypes/blob/master/src/nim_twtypes/ch01_algebra_behind_types.nim |
15:29:30 | alehander92 | but whan can always just add a sugar `instantiate a[int]` or something for debugging |
15:32:59 | Araq | it's time to take my April fool's joke seriously and add machine learning to some Nim linter |
15:33:51 | FromDiscord | <haxscramper> Automatically generate commit messages by diffing AST before and after commit |
15:33:56 | alehander92 | Araq i was just proposing fun hacks :)) |
15:34:15 | FromDiscord | <haxscramper> Well, I'm planning to write this one |
15:34:34 | alehander92 | haxscramper well you just know i almost did this exact project |
15:34:49 | alehander92 | but i decided project managers might use it for some kind of time tracking system |
15:35:17 | FromDiscord | <haxscramper> I mean, it is pretty easy if you don't go into semantics, and allows you to ask useless questions such as 'where this argument was I introduced'? |
15:35:59 | * | agent0x01 joined #nim |
15:36:03 | FromDiscord | <haxscramper> But mostly it is useful for auto-generating detailed changelogs for relatively simple API |
15:37:09 | alehander92 | i think it's best to |
15:37:19 | alehander92 | collect your notes into a separate file |
15:37:35 | alehander92 | and when one's ready to commit, to just review them as a message |
15:37:37 | FromDiscord | <haxscramper> Although I'm just evaluating different ideas for compiler error messages - specifically type mismatches: I want to have 'here is your input', 'we expected this', 'the difference is highlighed in red. |
15:37:55 | alehander92 | are you writing a language |
15:38:04 | FromDiscord | <haxscramper> No |
15:38:16 | disruptek | you can just do this by rolling git directly and parsing the nim. |
15:38:16 | disruptek | i'm sure it'd be much faster, and you could use it on any code. |
15:38:17 | disruptek | leorize and i were talking about doing semver automatically by trawling the docgen output. |
15:38:18 | disruptek | it makes some kinda sense. |
15:38:19 | disruptek | i only have two notes, though. |
15:38:20 | disruptek | it's like, |
15:38:21 | disruptek | AIAAAIEIIIIIIEEEIEEIEIEEEEEE and then it goes up at the end. |
15:38:42 | FromDiscord | <haxscramper> It's the same discussion from couple of weeks ago, about metter error messages in nim compiler |
15:38:45 | alehander92 | how did you manage to write a book in one minute dude |
15:39:02 | alehander92 | there were many ideas about type mismatch error messages |
15:39:07 | alehander92 | so review old issues first |
15:39:38 | FromDiscord | <haxscramper> I think I have good enough idea, but don't have time to write RFC or POC implementation |
15:40:09 | disruptek | how does elm do it? a stack? |
15:40:38 | FromDiscord | <haxscramper> And I kind of want to first finish sourcetrail thing so I don't have to dig through all compiler source code as much |
15:41:06 | alehander92 | wow are you adapting sourcetrail |
15:41:51 | FromDiscord | <haxscramper> > you can just do this by rolling git directly and parsing the nim.↵That's exactly what I wanted to do. Get tree for two commits, diff them, report mismatches. |
15:42:27 | alehander92 | Araq but what is bothering me, literally you introduced a `lets make discard proc a special case to help people not make bugs` case |
15:42:55 | alehander92 | it's not really fair to go and rant about special cases exactly at that point :D |
15:43:21 | FromDiscord | <haxscramper> alihander92: sort of. I'm still not sure what exactly I want to do who hcparse, so I decided to wrap sourcetrail db writer (which is relatively small) and make fixes to hcparse as I go |
15:43:52 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
15:44:43 | * | kinkinkijkin joined #nim |
15:44:48 | disruptek | !repo gittyup |
15:44:48 | disbot | https://github.com/disruptek/gittyup -- 9gittyup: 11higher-level libgit2 bindings that build upon nimgit2 15 4⭐ 1🍴 |
15:44:58 | disruptek | it works really well. |
15:45:01 | alehander92 | (ok krux02 did it, but it's still a good idea imo) |
15:47:25 | * | vicfred joined #nim |
15:47:39 | haxscramper | disruptek: I pushed fixes to gram, and [email protected] don't have issues with pure enums. |
15:47:55 | disruptek | oh cool. |
15:48:29 | FromDiscord | <lqdev> poor guy who just got pinged on discord. |
15:49:01 | FromDiscord | <lqdev> @Yardanico |
15:49:04 | haxscramper | `@ 0 . 2 . 3` |
15:49:07 | alehander92 | come on what's in python's discord with all the `@decorators` |
15:49:16 | FromDiscord | <lqdev> hehe |
15:49:24 | FromDiscord | <lqdev> they probably aren't using ircord 😉 |
15:49:33 | haxscramper | `s k i p l i s t s @ 0 . 2 . 3` |
15:49:42 | alehander92 | imagine `@ all` |
15:49:58 | FromDiscord | <lqdev> rather, at everyone |
15:50:03 | alehander92 | ahh ok |
15:50:22 | disruptek | @all like this? |
15:50:23 | alehander92 | or ruby and all the `@field` |
15:50:38 | disruptek | i'm sure yard ignores it. |
15:51:30 | FromDiscord | <lqdev> you also pinged a random person XD |
15:51:54 | FromDiscord | <For Your Health> What is a good way to call some cleanup code when some object goes out of scope? I'm getting this error message with `=destroy` about a previous declaration was constructed implicitly. |
15:52:23 | disruptek | let's see the message. |
15:52:44 | FromDiscord | <lqdev> yardanico if you could change the search query to `username.startsWith(pingedName & ' ')` rather than just `username.startsWith(name)` |
15:53:49 | FromDiscord | <For Your Health> I'm trying to make a wrapper around the sdl2 wrapper and call some cleanup code. I get the error message: `cannot bind another '=destroy' to: Window; previous declaration was constructed here implicitly: ` |
15:54:22 | disruptek | maybe your =destroy isn't in the same file? |
15:54:28 | * | agent0x01 quit (Ping timeout: 260 seconds) |
15:54:48 | disruptek | nim creates a =destroy for you but you may need to define it higher in the file, or predeclare it. |
15:55:07 | disruptek | they should be limited to the module where the type is defined, iirc. |
15:55:32 | FromDiscord | <For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2wQp |
15:56:04 | disruptek | i would expect that to work. |
15:56:53 | FromDiscord | <For Your Health> actually it does if I comment out this method that is in between those two things. Hmm, gotta figure out what's wrong with that method I guess |
15:57:03 | disruptek | just the order. |
15:58:42 | FromDiscord | <For Your Health> Yeah it seems to be the order. So I guess the destructor should always be above the other methods? |
15:59:11 | disruptek | it has to be defined before it is used. if it is not defined at the point where it is used, nim will define it. |
15:59:24 | disruptek | if nim beats you to the punch, you get the error. |
15:59:53 | FromGitter | <kaushalmodi> Hello all! (just dropped in to say hello :)). I haven't been much active around here lately, but I am still using Nim. |
16:00:02 | disruptek | awww sup bud |
16:00:07 | FromDiscord | <For Your Health> That makes sense. The offending procedure was a helper to initialize the sdl window and return a wrapper. |
16:00:24 | FromGitter | <kaushalmodi> disruptek: Not much; just work's keeping me busy. |
16:00:25 | FromDiscord | <For Your Health> So I guess nim needed to make a destructor implicitly to facilitate that |
16:00:46 | FromGitter | <kaushalmodi> The stuff that I had set up using Nim is still alive and kicking (talks about the stability of Nim) |
16:01:54 | * | agent0x01 joined #nim |
16:02:02 | FromDiscord | <For Your Health> Nim as a language has some cool ideas. I hope it gains popularity. |
16:02:35 | FromDiscord | <For Your Health> It seems like a good candidate for game dev but there aren't many resources for that yet. |
16:02:42 | disruptek | kaushalmodi: are you still writing nim? |
16:03:38 | FromGitter | <kaushalmodi> disruptek: Not as much, but I still do. Main reason is that I'm too busy with my domain languages lately (SystemVerilog and SystemC). |
16:04:38 | disruptek | nice. i think that's a good result in any event. |
16:04:46 | * | maier quit (Ping timeout: 246 seconds) |
16:05:00 | shashlick | any feedback on this suggestion - https://github.com/nim-lang/nimble/issues/515 |
16:05:02 | disbot | ➥ [Feature] Allow specifying name for the binary in binary packages |
16:05:02 | alehander92 | what is SystemC |
16:05:36 | FromGitter | <kaushalmodi> SystemC is kind of like a C++ library, but for hardware (ASIC) modeling and verification |
16:05:37 | disruptek | shashlick: from the title it makes no sense. we already have the means to do this using project.nim.cfg. |
16:06:24 | disruptek | shashlick: what's wrong with `--out`? |
16:06:40 | FromGitter | <kaushalmodi> shashlick: I thought that nimble was now naming binaries foo.out? or something like that? |
16:06:58 | FromGitter | <kaushalmodi> .. if a dir with the "foo" name already existed |
16:08:01 | disruptek | that's nim's department. |
16:08:36 | shashlick | Sounds fair, I'll test it and close issue with that suggestion |
16:09:08 | shashlick | But this would be one stop shop |
16:09:18 | disruptek | doesn't matter to me. |
16:09:23 | shashlick | Actually nimble won't know that the binary name is different |
16:09:32 | shashlick | Install will fail |
16:10:07 | disruptek | why does nimble need to know? |
16:10:14 | shashlick | Even if it gets copied over, won't get added to bin |
16:10:32 | shashlick | $nimbleDir/bin |
16:10:37 | disruptek | no comment. |
16:11:00 | * | krux02_ quit (Read error: Connection reset by peer) |
16:11:20 | shashlick | Reminds me of my 4th grade teacher - no comments boys, no comments |
16:12:22 | * | krux02 joined #nim |
16:12:28 | * | a_chou quit (Ping timeout: 246 seconds) |
16:13:36 | disruptek | nimble /should/ update the project.nim.cfg with the *--out* setting, but i suppose it won't. |
16:14:29 | shashlick | That would be the right thing to do |
16:14:50 | disruptek | we said we didn't want to edit those files, though. 🤷 |
16:14:51 | shashlick | That would inform Nim to keep the same behavior |
16:14:55 | disruptek | right. |
16:15:02 | haxscramper | disruptek: I just installed new skiplists 0.2.3 - and issue with `undeclared identifier: 'Equal'` still exists. |
16:15:02 | haxscramper | ` |
16:15:19 | disruptek | in a sense, it's the correct design -- we push intelligence towards the compiler from the pm. |
16:15:28 | shashlick | No idea man, it's just a mess when tools start tweaking hand written files |
16:15:38 | disruptek | haxscramper: i thought you said it was fixed? i cannot repro it since i exported skiplists.cmp. |
16:16:12 | haxscramper | I said it was fixed because when I tested it with cloned skiplists I had no issues |
16:16:16 | disruptek | shashlick: maybe we could use @if in nim.cfg to set the out? |
16:16:29 | disruptek | haxscramper: are you sure you're using 0.2.3? |
16:17:38 | haxscramper | Yes, `nimble install https://github.com/disruptek/[email protected]`. I will now try using local cloned repo instead of globally installed. |
16:18:17 | disruptek | well, i don't support nimble. |
16:18:30 | disruptek | it's too complex for my little brain. |
16:19:44 | shashlick | disruptek: what would be in the @if |
16:20:24 | disruptek | something to test whether the input is foo.nim and then set out= accordingly. |
16:22:49 | FromDiscord | <Rika> lol the bot translated the `@branchname` part of haxscramper's message to a discord ping |
16:26:33 | * | agent0x01 quit (Ping timeout: 260 seconds) |
16:26:34 | haxscramper | disruptek: I tested with `d81f880` - the issue is still here. Don't know why it didn't trigger when I tested it earlier. |
16:27:58 | haxscramper | The test compiles fine, but when I try to use it in my code I get this error. |
16:29:03 | disruptek | is the code public? |
16:29:33 | disruptek | can you reproduce it without nimble? |
16:32:46 | haxscramper | (1) not right now, (2) no. With cloned master gram **and** skiplists there is no errors. |
16:33:14 | disruptek | well, yeah, we need a gram release. |
16:33:17 | disruptek | i'll bump it. |
16:34:09 | disruptek | 0.1.2 is money |
16:35:15 | haxscramper | Working now |
16:35:21 | * | disruptek cheers. |
16:35:32 | disruptek | tags for the win. |
16:43:36 | disruptek | leorize[m]: you around? trying to debug your visibility test under mangling and can't figure out why it fails. |
16:46:35 | alehander92 | :O |
16:46:47 | alehander92 | disruptek, you using hashTree ? |
16:46:53 | alehander92 | for mangling |
16:46:59 | disruptek | nah. |
16:48:59 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
16:52:31 | disruptek | actually, that might be the problem. |
16:54:52 | * | pietroppeter joined #nim |
16:56:32 | shashlick | https://blog.doist.com/decision-making-flat-organization/ |
16:56:42 | alehander92 | false positives |
16:56:47 | alehander92 | is this bad |
16:59:30 | * | superbia quit (Read error: Connection reset by peer) |
16:59:36 | * | superbia1 joined #nim |
17:00:29 | disruptek | what are you talking about? |
17:02:38 | alehander92 | i |
17:02:52 | alehander92 | my analysis is confusing builtint result with shadowing var result |
17:04:34 | disruptek | one is a skResult and the other isn't. |
17:05:09 | Prestige | oh the nim color finally changed on github |
17:05:21 | Prestige | \o/ |
17:05:30 | disruptek | no, it has always been yellow. |
17:06:33 | alehander92 | awesome ! |
17:11:44 | FromGitter | <kaushalmodi> It was green earlier |
17:12:00 | disruptek | impossible. i would have noticed. |
17:13:12 | alehander92 | thanks, it fixed my issue disruptk |
17:13:20 | disruptek | nice. |
17:20:49 | FromDiscord | <queersorceress> the language color for Nim use to be a dark green on github |
17:20:57 | disruptek | nope. |
17:21:12 | disruptek | yellow. always has been. |
17:21:23 | FromDiscord | <queersorceress> i dunno what to tell you, but that isn't true, lol |
17:22:09 | disruptek | ask anyone. |
17:22:55 | FromDiscord | <iWonderAboutTuatara> Disruptek is correct |
17:23:06 | Prestige | hm it's still green on gitea |
17:23:54 | disruptek | you must have a colorblind mode toggled. |
17:25:46 | FromDiscord | <Rebel> @queersorceress you are correct it was dark green and just updated for people yesterday to swift's color basically lol |
17:25:51 | FromDiscord | <Rebel> scroll up and you can see more about it |
17:26:05 | disruptek | lies. |
17:26:24 | FromDiscord | <iWonderAboutTuatara> It was never anything other than yellow |
17:26:32 | FromDiscord | <iWonderAboutTuatara> I'm really confused @Rebel |
17:26:43 | FromDiscord | <Rebel> scroll up |
17:26:46 | FromDiscord | <Rebel> I don't have time to reexplain it |
17:26:57 | disruptek | iwonder: ignore them; they are just gaslighting you. |
17:27:08 | FromDiscord | <Rika> yall are bullies xdddd |
17:28:18 | FromDiscord | <Rebel> You were there Rika don't you remember? |
17:28:48 | FromDiscord | <queersorceress> tbh i really dislike the new color cuz it reminds me of swift which is why i started coding in Nim in the first place, so i didn't have to make myself learn swift. |
17:30:47 | FromDiscord | <Rebel> well if you scroll up you will see the origin story it was always meant to be orangeish just took a while to get updated into Github |
17:32:54 | Prestige | What's Nim's color: FFC200? |
17:34:20 | Prestige | looks like that on github but #ffe954 on nim-lang.org |
17:36:27 | FromDiscord | <Rebel> Is there research into the different garbage collectors nim offers and use cases among them? Or is it just trial and error with the gcs and see which one leads to the greatest performance? |
17:40:34 | disruptek | rebel: what is your application? |
17:41:56 | FromDiscord | <iWonderAboutTuatara> I'll be sure to ignore them disruptek, thanks for having my back |
17:42:17 | disruptek | there are a lot of trolls on this channel. |
17:42:25 | Zevv | I'm not! |
17:43:22 | disruptek | what else would a troll say? |
17:44:05 | * | superbia1 is now known as superbia |
17:44:05 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
17:44:43 | * | kinkinkijkin joined #nim |
17:46:05 | FromDiscord | <Rebel> my application entails async http communication, a good amount of json, and threadpools as well as some dynamic loading for windows dlls |
17:46:15 | FromDiscord | <mu_studio> hello everyone |
17:46:19 | disruptek | sup |
17:46:50 | disruptek | rebel: stick with refc until you have performance problems, then arc will have an answer. |
17:47:07 | FromDiscord | <Rika> will async be good for arc some day? |
17:47:24 | disruptek | some day? maybe. |
17:47:41 | disruptek | i am personally biased towards cps, of course. |
17:47:52 | Zevv | get to work then, lazy man |
17:48:03 | disruptek | i'm working on hcr. |
17:48:05 | disruptek | it's dumb. |
17:48:26 | disruptek | smack clyybber and get him to fix sym subst bugs in the compiler. |
17:48:31 | disruptek | then we can more forward on cps. |
17:48:40 | disruptek | s/more/move/ |
17:49:15 | Zevv | Let me draw some goat blood and draw a five-pointed start on the bathroom floor |
17:49:25 | FromDiscord | <mu_studio> Does Nim have a string multiplication operator? |
17:49:28 | disruptek | whatever it takes. |
17:49:48 | FromDiscord | <Rika> @mu_studio `strutils.repeat` |
17:50:00 | FromDiscord | <Rika> we do not have funky string times numbers kinda stuff |
17:50:37 | disruptek | template `*`(a: string; b: int): string = repeat(a, b) |
17:50:51 | Zevv | quick, move that in the stdlib before anyone notices |
17:50:59 | FromDiscord | <Rika> lmao |
17:51:03 | Zevv | just as my `new Thing(key: val)` |
17:51:54 | FromDiscord | <NickSeagull> Is there a way to make the compiler add `{.effects.}` to all procs by default? Like a flag or something? |
17:52:07 | disruptek | no. |
17:52:25 | shashlick | is it possible to convert a seq into a tuple |
17:52:33 | disruptek | no. |
17:52:40 | FromDiscord | <mu_studio> > template `*`(a: string; b: int): string = repeat(a, b)↵@disruptek[IRC]#0000 this is strange why it wasn't added to the system.nim |
17:52:50 | disruptek | because it's dumb. |
17:52:53 | FromDiscord | <lqdev> because repeat is from strutils |
17:53:00 | FromDiscord | <Rika> because its dumb (2) |
17:53:00 | FromDiscord | <lqdev> and also it's unreadable and unintuitive for readers |
17:53:10 | FromDiscord | <lqdev> and also it's dumb (3) |
17:53:21 | Araq | I don't mind it but the symmetry means two overloads |
17:53:33 | Araq | plus I like the default of the space |
17:53:52 | Araq | so strutils.repeat seemed superior |
17:54:05 | FromDiscord | <Rika> default of the space? |
17:54:26 | FromDiscord | <queersorceress> @NickSeagull what are you looking to do? |
17:54:26 | disruptek | he's thinking of spaces() |
17:54:32 | Araq | !eval repeat(4) |
17:54:33 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'repeat' |
17:54:47 | Araq | !import strutils; echo repeat(3) |
17:54:52 | FromDiscord | <Rika> didnt eval 😛 |
17:55:03 | Araq | !eval import strutils; echo repeat(3) |
17:55:06 | NimBot | Compile failed: /usercode/in.nim(1, 29) Error: type mismatch: got <int literal(3)> |
17:55:07 | FromDiscord | <NickSeagull> @queersorceress essentially trying to make the compiler yell at me each time that I don't specify the exceptions that a proc can throw or the effects that it does |
17:55:13 | Araq | bah |
17:55:18 | disruptek | it's spaces, boss. |
17:55:39 | FromDiscord | <mu_studio> > because it's dumb.↵@disruptek[IRC]#0000 Python for example has such an operator and it doesn't seem like a dump at all |
17:55:44 | FromDiscord | <NickSeagull> (edit) 'does' => 'does. Without having to add `{.effects.}` each time' |
17:55:49 | disruptek | it's a dump indeed. |
17:55:59 | Araq | pretty sure it used to be repeat() before the community changed it |
17:56:00 | FromDiscord | <Rika> python has a completely different philosophy to nim afaik |
17:56:14 | disruptek | nickseagull: use .raises: []. for exception tracking. |
17:56:38 | disruptek | mu: i will license my template to you. |
17:56:42 | disruptek | $1 per invocation. |
17:57:07 | FromDiscord | <Rika> you can do it to only the entrypoint proc and itll complain for anything in that proc w/o a raises afaik? |
17:57:13 | FromDiscord | <queersorceress> i think part of the purpose of needing to specify the exceptions per proc is that all your procs shouldn't (ideally) be raising exceptions in the first place |
17:57:40 | FromDiscord | <NickSeagull> @queersorceress yep, but if they do by any chance, I'd like to be warned by the compiler ala Java |
17:57:51 | FromDiscord | <NickSeagull> Or Haskell's checked exceptions |
17:57:52 | FromDiscord | <Rika> try what i said |
17:58:05 | FromDiscord | <Rika> do it -> put raises: [] |
17:58:29 | Araq | there is also {.push raises: [].} |
17:59:09 | FromDiscord | <queersorceress> yeah, you should use a push for something like that, or possibly do some macro/template magic to apply the right tags to all the relevant procs |
17:59:30 | FromDiscord | <NickSeagull> Oh, thanks @Rika Araq and @queersorceress ^_^ |
17:59:31 | disruptek | nah. |
17:59:35 | FromDiscord | <queersorceress> though, i think ideally you shouldn't have code that raises all that often |
17:59:40 | FromDiscord | <NickSeagull> Is there a way to do the same with effects? |
18:01:04 | FromDiscord | <Rika> @NickSeagull `tags` instead of `raises` i think |
18:01:08 | * | maier joined #nim |
18:01:32 | FromDiscord | <Rika> oh wait no |
18:01:33 | FromDiscord | <Rika> im not sure |
18:01:34 | Araq | in reality exceptions are pervasive and there is no going back to the days where perror(); exit(1) sufficed for software development |
18:01:52 | Araq | to protect against raises use 'try except' |
18:01:52 | FromDiscord | <NickSeagull> invalid pragma `push`, do I have to import something? |
18:01:56 | disruptek | push will just make you angry. |
18:02:17 | FromDiscord | <Rika> you use `push` at the top of code so before the proc.decl.line |
18:02:31 | FromDiscord | <NickSeagull> I see |
18:02:39 | disruptek | rika makes me even more angry, though. |
18:02:43 | disruptek | it's a catch-22. |
18:02:53 | FromDiscord | <Rika> lol |
18:02:58 | FromDiscord | <NickSeagull> Oh cool @Rika 🙂 |
18:03:16 | Araq | "checked" exceptions are a terrible idea. But Nim supports them well so go ahead and use what you think works best for you |
18:03:33 | FromDiscord | <Rika> araq why do you think theyre a bad idea? |
18:04:13 | FromDiscord | <NickSeagull> I probably won't use them, as I tend to encode everything in pure values, and then write an "interpreter" for them |
18:04:20 | FromDiscord | <NickSeagull> but just trying all the language features |
18:05:26 | Araq | cause they don't work, Rika. here is an API that takes a callback. can this callback raise? for maximum flexibility sure, it's a callback. and so the .raises effect bubbles up and creeps into everything |
18:06:09 | Araq | and no, making your callback return an Option[T] does *not* solve anything. |
18:06:13 | * | maier quit (Ping timeout: 264 seconds) |
18:06:31 | FromDiscord | <Rebel> is there a ternary operator for pragmas on a function? For example, if a certain compiler option is used then this proc has this pragma else it has no pragma. I know I can just use an if else statement checking compiler function and copy the proc twice only changing the pragma just wonder if there was a shortcut. |
18:06:34 | FromDiscord | <Rebel> (edit) 'function?' => 'proc?' |
18:06:50 | * | solitudesf quit (Read error: Connection reset by peer) |
18:07:01 | disruptek | rebel: use a custom pragma. |
18:07:26 | FromDiscord | <Rika> define a custom pragma and use a when else statement to choose which definition gets written |
18:08:10 | FromDiscord | <Rika> so like `when xxx:\n {.pragma: name, smth, smth.} \nelse:\n {.pragma: name, smth.}` |
18:08:34 | FromDiscord | <Rika> https://nim-lang.org/docs/manual.html#userminusdefined-pragmas-pragma-pragma |
18:08:35 | disruptek | that's a terrible idea. |
18:08:57 | Araq | so, Tuesday night. Accomplished what I wanted for friday. Does that mean I have 3 days off? |
18:09:06 | FromDiscord | <Rika> well tell that to the writer of this manual |
18:09:07 | disruptek | pretty much, yeah. |
18:09:18 | disruptek | it means you can finish concepts. |
18:09:30 | Zevv | Araq: we have some compiler bugs to fix :) |
18:09:36 | FromDiscord | <Rebel> thanks Rika that is actually exactly what I need |
18:09:58 | FromDiscord | <Rebel> it's because if you use the dynlib pragma it adds a reloc section to the PE |
18:10:08 | Araq | Zevv: pfff |
18:10:23 | Araq | learn to un-semantize an AST |
18:10:25 | disruptek | !issue author:disruptek arc |
18:10:26 | disbot | https://github.com/nim-lang/Nim/issues/15286 -- 3os.getFileInfo() causes ICE with --gc:arc on Windows 7& 5 more... |
18:10:32 | disruptek | it's a tiny one. |
18:11:04 | disruptek | and i promise it won't help cps. |
18:11:29 | Araq | haven't you heard? Yardanico took over ARC's development |
18:11:29 | * | a_chou joined #nim |
18:11:45 | disruptek | he has to do some string substitution for me first. |
18:21:07 | * | gmaggior joined #nim |
18:22:18 | disruptek | Zevv: i guess he wants us to desym everything. |
18:24:10 | oz | oh a wild https://github.com/iocrate/netkit appeared in my Github newsletter :) |
18:27:53 | FromDiscord | <Rebel> maybe they'll add QUIC one day 👀 |
18:27:58 | disruptek | !repo quic |
18:27:59 | disbot | https://github.com/status-im/nim-quic -- 9nim-quic: 11QUIC for Nim 15 3⭐ 0🍴 7& 7 more... |
18:28:47 | FromDiscord | <Rebel> https://media.discordapp.net/attachments/371759389889003532/752958627689791519/rMQLfurdKwJKiJh-1600x900-noPad.png |
18:28:48 | * | narimiran joined #nim |
18:29:36 | FromDiscord | <Rebel> lol maybe in a few months https://media.discordapp.net/attachments/371759389889003532/752958831230844939/unknown.png |
18:30:35 | * | Jesin quit (Quit: Leaving) |
18:31:54 | disruptek | months? |
18:32:06 | disruptek | why would it take that long? |
18:32:36 | * | def- quit (Quit: -) |
18:32:48 | * | def- joined #nim |
18:33:32 | * | endragor quit (Remote host closed the connection) |
18:34:01 | FromDiscord | <Rebel> you are right I didn't realize this was a company's repo |
18:34:17 | FromDiscord | <Rebel> thought this was a solo dev |
18:38:11 | disruptek | good point. i guess it might be a few months longer. |
18:38:47 | FromDiscord | <Rebel> just a safe guess no rush for what I am doing just cool to see people are on it already |
18:39:18 | FromDiscord | <Recruit_main707> isnt getProcAddress defined by nim? |
18:39:32 | disruptek | no. |
18:40:23 | FromDiscord | <Recruit_main707> only with the dynlib pragma then? https://media.discordapp.net/attachments/371759389889003532/752961544152678460/unknown.png |
18:40:49 | disruptek | why are you posting images to text chat? |
18:41:13 | disruptek | you understand how hard is it for irc people to read that garbage? |
18:41:20 | FromDiscord | <Rika> lol |
18:41:23 | disruptek | every one of us has to click on that fucking link. |
18:41:26 | FromDiscord | <Recruit_main707> it was a quote from the web↵`By default Nim's dynlib pragma causes the compiler to generate GetProcAddress ` |
18:41:29 | FromDiscord | <Recruit_main707> there you go |
18:41:32 | disruptek | thanks. |
18:41:39 | * | endragor joined #nim |
18:41:47 | disruptek | the docs are wrong, afaik. |
18:42:05 | disruptek | i'm like 95% sure getprocaddress is platform-specific impl imported by nim. |
18:42:18 | disruptek | see for yourself. |
18:42:28 | disruptek | then find a way to blame it on rika. |
18:42:53 | FromDiscord | <Rebel> if you look at the IAT of a PE with a dynlib pragma for windows api calls when you use importc and dynlib = ntdll.dll for example |
18:42:59 | FromDiscord | <Rebel> it's just using getprocaddress and loadlibraryA |
18:43:05 | FromDiscord | <Rebel> (edit) 'it's just using getprocaddress and loadlibraryA ... ' => 'it's just using getprocaddress and loadlibraryAunder the hood' |
18:43:22 | FromDiscord | <Rika> `then find a way to blame it on rika.` please do lol |
18:43:36 | FromDiscord | <Rebel> (edit) 'hood' => 'hood. LoadLibraryA -> GetProcAddress' |
18:43:39 | FromDiscord | <Recruit_main707> then it might have been on the past |
18:44:46 | FromDiscord | <Recruit_main707> this code uses it for example without wrapping it before:↵https://github.com/johnnovak/nim-raytracer/blob/master/src/gui.nim |
18:46:33 | * | endragor quit (Ping timeout: 260 seconds) |
18:47:07 | FromDiscord | <Rebel> I don't understand |
18:47:09 | FromDiscord | <Rebel> what are you trying to do |
18:47:54 | FromDiscord | <Rebel> the repo you linked doesn't use the dynlib pragma so not surprising getprocaddress isn't used? |
18:48:06 | FromDiscord | <Rebel> (edit) 'the repo you linked doesn't use the dynlib ... pragma' => 'the repo you linked doesn't use the dynlib& importc' |
18:48:29 | FromDiscord | <Recruit_main707> ` if not gladLoadGL(getProcAddress):`↵` quit "Error initialising OpenGL"` |
18:48:58 | FromDiscord | <Recruit_main707> line 87 |
18:49:02 | * | Jesin joined #nim |
18:49:08 | FromDiscord | <Recruit_main707> this is what i want to do too |
18:49:09 | FromDiscord | <Rebel> you know you can link repos with the line number? lol |
18:50:35 | FromDiscord | <Rebel> https://github.com/nim-lang/Nim/search?q=getProcAddress&unscoped_q=getProcAddress |
18:50:41 | * | JustASlacker quit (Ping timeout: 256 seconds) |
18:51:12 | FromDiscord | <Recruit_main707> why does/did this code work/ed? |
18:54:08 | FromDiscord | <Rebel> I'm not a nim internals person but this is using nim's FFI capability and at least for windows just importing the function GetProcAddress from windows.h I can't speak on the unix side of things. |
18:54:19 | disruptek | sure you can. |
18:55:01 | FromDiscord | <Recruit_main707> but its still very weird, its not wrapped anywhere |
18:55:14 | disruptek | why should it be? |
18:55:30 | FromDiscord | <Recruit_main707> how does it use it if its not |
18:55:38 | disruptek | it's a miracle. |
18:57:02 | Zevv | disruptek is so helpful today |
18:57:07 | FromDiscord | <Rebel> oh the author should've just imported it directly |
18:57:14 | FromDiscord | <Rebel> you can see how they use getprocaddress here |
18:57:16 | FromDiscord | <Rebel> https://github.com/johnnovak/nim-raytracer/blob/2b82953327211310981ec1b505e857f20822da6d/src/glad/gl.nim#L4171 |
18:57:19 | disruptek | i can't help it. |
18:57:25 | Zevv | yes you can |
18:57:28 | disruptek | haven't you heard of immaculate inception? |
18:57:32 | FromDiscord | <Rebel> they are loading glGetString which is a Windows API function |
18:57:43 | FromDiscord | <Rebel> and seeing if it can be loaded and if it can't for whatever reason return false |
18:57:45 | Zevv | just sit on your hands before you incept |
18:58:01 | disruptek | i am writing the de-sym'er for cps. |
18:58:05 | Zevv | no dude |
18:58:15 | disruptek | it just has to ignore our pragmas. |
18:58:17 | Zevv | how should that work? |
18:58:43 | FromDiscord | <Recruit_main707> and they are not passing a dll hinstance either |
18:58:48 | disruptek | see? |
18:58:50 | disruptek | fucking miracle. |
18:58:57 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
18:59:17 | Zevv | disruptek: where do the syms go then, what do you put in place? |
18:59:19 | Zevv | and *why*? |
18:59:39 | disruptek | hmm, it just segfaults. |
19:00:06 | disruptek | do you want to play with it? |
19:00:50 | Zevv | nah not today I'm afraid. I just need to drink beer, verbally abuse my friends and shoot them in the head repeatidly, virtually |
19:01:00 | disruptek | fair enough. |
19:01:01 | Zevv | i'm sick and tired of the day |
19:01:03 | FromDiscord | <Rebel> I would read more about the FFI @Recruit_main707 |
19:12:15 | FromDiscord | <Elegant Beef> @dom96 the buttons use the game mechanic so steer into the left side. |
19:19:30 | disruptek | Zevv: pushed. |
19:21:40 | * | endragor joined #nim |
19:27:15 | * | arecacea1 quit (Remote host closed the connection) |
19:27:16 | * | JustASlacker joined #nim |
19:27:41 | * | arecacea1 joined #nim |
19:28:45 | * | endragor quit (Ping timeout: 240 seconds) |
19:35:21 | * | maier joined #nim |
19:37:26 | * | superbia quit (Quit: WeeChat 2.9) |
19:39:41 | * | bwsq joined #nim |
19:40:06 | * | bwsq quit (Client Quit) |
19:41:23 | * | maier quit (Ping timeout: 260 seconds) |
19:41:43 | * | shirleyquirk joined #nim |
19:49:24 | * | a_chou quit (Ping timeout: 256 seconds) |
20:04:04 | * | sagax joined #nim |
20:15:41 | * | solitudesf joined #nim |
20:17:01 | * | narimiran quit (Ping timeout: 264 seconds) |
20:18:07 | * | canen joined #nim |
20:18:12 | shashlick | is @dom96 around? |
20:18:50 | Zevv | wait what you take the syms out and put idents in. how is that helping? |
20:20:37 | * | lritter quit (Ping timeout: 264 seconds) |
20:21:18 | FromDiscord | <Clyybber> what |
20:21:36 | Zevv | "learn how to desemantic your ast, knuckleheads" |
20:21:54 | FromDiscord | <Clyybber> thats ugh, stupid |
20:22:03 | Zevv | oh no he said "un-semantize" |
20:22:11 | FromDiscord | <Clyybber> why do I even do this proc arg semming |
20:22:21 | FromDiscord | <Clyybber> then, if you want to unsym it anyways? |
20:22:24 | disruptek | we needed it. |
20:22:32 | Zevv | I don't know. unsymming sounds silly |
20:22:33 | FromDiscord | <Clyybber> and now you don't? |
20:22:35 | disruptek | no other way to match symbols before desymbolification. |
20:22:38 | Zevv | right |
20:22:47 | FromDiscord | <Clyybber> wtf do you want to desymbolize |
20:22:51 | FromDiscord | <Clyybber> and why |
20:22:53 | Zevv | we don't *want* |
20:22:56 | Zevv | ar4q tells us to |
20:22:59 | disruptek | daddy said. |
20:23:04 | FromDiscord | <Clyybber> where |
20:23:05 | Zevv | in crypting messages |
20:23:16 | Zevv | 20:10 |
20:23:19 | disruptek | it was something i thought i'd try. |
20:23:21 | disruptek | !last araq |
20:23:22 | disbot | Araq spoke in 12#nim 2 hours ago 12https://irclogs.nim-lang.org/08-09-2020.html#18:01:52 |
20:23:50 | disruptek | i can't tell if it helped because, y'know, the compiler segfaults. |
20:24:42 | FromDiscord | <Clyybber> that was probably a joke |
20:24:53 | disruptek | it was worth a shot. |
20:24:56 | FromDiscord | <Clyybber> bruh moment |
20:25:03 | * | a_chou joined #nim |
20:25:06 | shashlick | https://github.com/nim-lang/nimble/pull/846 - any feedback cc @dom96 |
20:25:07 | disbot | ➥ Fix #308, fix #515 - bin file name |
20:25:18 | * | lritter joined #nim |
20:26:01 | * | a_chou quit (Client Quit) |
20:33:25 | * | canen quit (Ping timeout: 240 seconds) |
20:37:19 | * | def- quit (Quit: -) |
20:38:04 | * | NimBot joined #nim |
20:38:56 | * | def- joined #nim |
21:03:12 | * | natrys quit (Quit: natrys) |
21:16:05 | * | JustASlacker quit (Quit: Leaving) |
21:26:15 | * | haxscramper quit (Remote host closed the connection) |
21:37:16 | * | maier joined #nim |
21:38:21 | disruptek | WHAT DO YOU MEAN `no type (or is ambiguous)` ? |
21:38:27 | disruptek | THAT'S BULLSHIT, MAN! |
21:42:43 | * | maier quit (Ping timeout: 260 seconds) |
21:44:30 | FromDiscord | <Elegant Beef> Uh oh is disruptek making rookie errors? |
21:45:18 | disruptek | turns out the second year of nim is harder than the first. |
21:45:35 | FromDiscord | <Elegant Beef> Wait until 12 years a nim slave |
21:46:48 | FromDiscord | <dom96> damn, can't wait for year 12 |
21:46:50 | FromDiscord | <dom96> almost there |
21:47:33 | disruptek | fuck that. |
21:47:43 | disruptek | i'll be coding rust by this time next year. |
21:47:53 | FromDiscord | <Rika> lol |
21:47:57 | * | a_b_m quit (Read error: Connection reset by peer) |
21:48:05 | FromDiscord | <Elegant Beef> Shit, cant spell disruptek without rust |
21:48:18 | FromDiscord | <Elegant Beef> dipek isnt as cool |
21:48:40 | * | disruptek is now known as diprustek |
21:48:48 | FromDiscord | <Rika> dinimptek xdddddddddddd |
21:48:56 | FromDiscord | <Rika> oops, left the t there |
21:49:14 | FromDiscord | <Elegant Beef> Dinimek sounds like a medical condition |
21:49:33 | FromDiscord | <Elegant Beef> also isnt that doms real name 😛 |
21:49:33 | FromDiscord | <Rika> im sorry beef |
21:49:36 | FromDiscord | <Rika> you have dinimek |
21:51:23 | FromDiscord | <dom96> Once you start saying Dinimek, your chances of survival are 0% |
21:51:46 | FromDiscord | <Elegant Beef> You either live long enough to program in rust or say dinimek |
21:53:38 | FromDiscord | <Recruit_main707> Is krux still in this server? |
21:54:51 | FromDiscord | <Elegant Beef> I see them every so often |
21:55:46 | FromDiscord | <Rebel> is it possible to have a custom pragma with the .async. pragma and other pragmas for example: {.pragma: rtl, exportc, dynlib, stdcall., .async.} the async pragma does not seem to play well with other pragmas... |
21:56:10 | diprustek | no, not async. |
21:56:46 | FromDiscord | <Rebel> why |
21:56:48 | FromDiscord | <Rebel> that's really bad |
21:56:55 | FromDiscord | <Rebel> I might need to rewrite my whole app then lol |
21:56:57 | diprustek | ask dom96. |
21:58:09 | FromDiscord | <dom96> ask Araq. |
21:58:11 | FromDiscord | <dom96> 😄 |
21:58:26 | FromDiscord | <dom96> afaik this is a limitation of macros as pragmas in Nim |
21:58:35 | FromDiscord | <Rebel> it's not that you can't mix pragmas it's just that in the documentation unless I'm blind it doesn't say anything about that |
21:58:40 | FromDiscord | <Rebel> that would've been really nice to know |
21:58:48 | FromDiscord | <dom96> on the other hand though you probably shouldn't do this |
21:58:52 | FromDiscord | <Elegant Beef> lol we now have diprustek |
21:59:03 | FromDiscord | <Rebel> I do need to though |
21:59:12 | FromDiscord | <dom96> {.async, rtl.} ? |
21:59:16 | diprustek | you need to get a fucking job. |
21:59:21 | diprustek | oh wait, that's me. |
21:59:47 | diprustek | you know what the problem is with async? |
22:00:27 | FromDiscord | <Rebel> wait you just said you can't mix but that works? 🤔 |
22:00:48 | FromDiscord | <Rebel> why does that work |
22:01:01 | FromDiscord | <dom96> You just can't define a new pragma that contains `{.async.} |
22:01:03 | FromDiscord | <dom96> (edit) '`{.async.}' => '`{.async.}`' |
22:01:19 | FromDiscord | <dom96> it needs to be directly on the proc |
22:01:27 | FromDiscord | <dom96> and to be honest, that is a good thing |
22:01:42 | FromDiscord | <dom96> it's important to be able to see which procs are async at a glance |
22:01:47 | diprustek | technically, you can, but it can't be a template. |
22:01:50 | diprustek | afaik. |
22:01:52 | FromDiscord | <Rebel> ooooo ok that makes a lot of sense |
22:01:54 | FromDiscord | <Elegant Beef> Disruptek we both need to get jobs |
22:02:05 | FromDiscord | <Rika> whos disruptek? |
22:02:11 | FromDiscord | <Rebel> awesome |
22:02:13 | FromDiscord | <Elegant Beef> sorry diprustek |
22:02:15 | FromDiscord | <Rebel> thanks for the help |
22:02:20 | FromDiscord | <Elegant Beef> Thinking of someone else rika |
22:02:39 | diprustek | rebel: just write a macro to do it and give dom96 the finger while he's not looking. |
22:02:48 | voidpi | wait are there any nim jobs? |
22:02:51 | diprustek | no. |
22:03:13 | FromDiscord | <Elegant Beef> Only nim jobs involve being in a specific circle |
22:03:24 | Prestige | just infiltrate a company and change their tech stack |
22:03:34 | voidpi | nice |
22:03:41 | FromDiscord | <Elegant Beef> I mean im in rural canada, if these guys have a tech stack i'd be surprised |
22:04:39 | Prestige | my job is heavy js, would be nice to use Nim. I've not done any Nim webdev, though |
22:04:51 | FromDiscord | <Elegant Beef> Eh just sneak nim generates js |
22:05:02 | FromDiscord | <Elegant Beef> Supposed to be using TS anyway |
22:05:06 | FromDiscord | <Elegant Beef> So it's not too different |
22:05:11 | Prestige | ikr |
22:05:42 | Prestige | Maybe I'll invest energy in "fullstack" Nim soon |
22:05:56 | FromDiscord | <Elegant Beef> Fullstack nim is just nim, there is no difference |
22:05:58 | FromDiscord | <Elegant Beef> 😄 |
22:06:29 | Prestige | ha well you know what I mean, get proficient at creating web apps with nim |
22:06:38 | FromDiscord | <Elegant Beef> Dont make webapps, use fidget 😛 |
22:06:50 | FromDiscord | <Elegant Beef> Then you have a "webapp" and native app, without using electron |
22:09:02 | Prestige | oh, will check this out tonight. Wonder if much will change: "WARNING: This library is still in heavy development" |
22:22:16 | FromDiscord | <Elegant Beef> Treeform is pretty receptive to good suggestions, like the `loadFontAbsolute` suggestion i made |
22:22:43 | voidpi | I just tried the minimal fidget example but it won't run since my video hw only supports opengl 3.1 |
22:22:49 | FromDiscord | <Elegant Beef> lol |
22:22:58 | FromDiscord | <Elegant Beef> The hell are you using? |
22:23:16 | voidpi | an old laptop |
22:23:37 | voidpi | model name : Intel(R) Pentium(R) CPU P6100 @ 2.00GHz |
22:26:04 | FromDiscord | <Elegant Beef> Yea was going to say, even mac supports 4.1 |
22:27:43 | diprustek | !repo bytes2human |
22:27:44 | disbot | https://github.com/juancarlospaco/nim-bytes2human -- 9nim-bytes2human: 11Calculate all Byte units from integer bytes positive int64 with precision from Bytes to Yottabytes and return a human friendly string representation. 15 10⭐ 1🍴 |
22:33:20 | * | Vladar quit (Quit: Leaving) |
22:36:16 | FromDiscord | <Avatarfighter> wait a darn minute, disruptek unmuted discord? |
22:36:55 | FromDiscord | <Avatarfighter> wait a minute who is this diprustek fellow and what have they done with disruptek! |
22:36:59 | * | solitudesf quit (Ping timeout: 240 seconds) |
22:37:02 | FromDiscord | <Rika> again who the hell is disruptek |
22:37:35 | FromDiscord | <Avatarfighter> @Rika only the best nim programmer around shame they disappeared |
22:37:52 | diprustek | that guy was a prick. |
22:38:29 | diprustek | he did have an ass that just wouldn't quit, though. |
22:38:40 | FromDiscord | <Hearthstone (LGBTQ+)> He's still here though, isn't he @Avatarfighter? |
22:38:57 | FromDiscord | <Avatarfighter> he is here in our hearts |
22:38:57 | FromDiscord | <Hearthstone (LGBTQ+)> @disruptek |
22:39:04 | FromDiscord | <Hearthstone (LGBTQ+)> Wrong user |
22:39:12 | FromDiscord | <Hearthstone (LGBTQ+)> @disruptek |
22:39:17 | FromDiscord | <Hearthstone (LGBTQ+)> He should be on irc- |
22:39:54 | FromDiscord | <Elegant Beef> Lol you guys arent quick witted, diprustek is he |
22:40:07 | FromDiscord | <Avatarfighter> is who |
22:40:33 | FromDiscord | <Rika> i dont even remember anyone called disruptek |
22:40:51 | diprustek | not much of a coder, but he sure could sing. |
22:41:16 | FromDiscord | <Avatarfighter> im so glad that the Nim compiler is made with magic, imagine if code was used 🤣 |
22:41:48 | diprustek | perish the thought. |
22:42:04 | FromDiscord | <Avatarfighter> nay |
22:43:34 | ForumUpdaterBot | New thread by Geekrelief: Difference between configuration via .cfg, .nims, and nimble?, see https://forum.nim-lang.org/t/6787 |
22:54:56 | FromDiscord | <tomck> Hello - how can i 'unexport' something from a module?↵↵I have some C code which I am including, which redefines 'bool' - how can I not export this definition? Or do i need to edit the included file itself |
23:01:09 | FromDiscord | <dom96> instead of including it why don't you import? |
23:01:39 | diprustek | why would you redefine bool? |
23:01:43 | diprustek | madlad |
23:06:29 | FromDiscord | <Hearthstone (LGBTQ+)> Oh- |
23:08:49 | FromDiscord | <tomck> errr i need to include for some reason |
23:08:57 | FromDiscord | <tomck> i got around it with cSkipSymbols |
23:10:55 | * | Trustable quit (Remote host closed the connection) |
23:21:12 | * | lritter quit (Quit: Leaving) |
23:22:24 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2wTq |
23:23:22 | FromDiscord | <tomck> is `foo` being inferred as a closure here, even though I just use it as if it were a static function? |
23:23:44 | * | arecacea1 quit (Read error: Connection reset by peer) |
23:24:08 | * | arecacea1 joined #nim |
23:35:35 | * | krux02_ joined #nim |
23:38:09 | * | maier joined #nim |
23:38:40 | * | gmaggior quit (Quit: Leaving) |
23:39:07 | * | krux02 quit (Ping timeout: 256 seconds) |
23:43:05 | * | maier quit (Ping timeout: 256 seconds) |
23:46:56 | FromDiscord | <Rika> Compiler bug |
23:47:09 | FromDiscord | <Rika> Anything with internal error is usually a compiler bug |
23:47:15 | FromDiscord | <Yardanico> Would it even make sense to add inline pragma to an iterator? |
23:48:11 | FromDiscord | <Rika> Don’t iterators have to be declared as closure to be a closure iterator |
23:53:49 | FromDiscord | <iWonderAboutTuatara> Pretty sure iterators in proc are inline by default, yeah |
23:53:53 | FromDiscord | <iWonderAboutTuatara> Don't quote me on that |
23:53:54 | FromDiscord | <tomck> all i know is that it works |
23:53:54 | FromDiscord | <tomck> & that it probably should be able to work without an actual closure + fn ptr |
23:54:05 | FromDiscord | <iWonderAboutTuatara> Araq: is the best persont o ask about this I think |
23:54:30 | FromDiscord | <iWonderAboutTuatara> I don't know if you need the : to ping someone from irc, just put it there incase |
23:54:46 | * | Tuatarian joined #nim |
23:55:01 | FromDiscord | <iWonderAboutTuatara> Tuatarian |
23:55:12 | * | Tuatarian quit (Client Quit) |
23:55:27 | FromDiscord | <iWonderAboutTuatara> Can confirm you don't need the semicolon |
23:55:49 | FromDiscord | <Elegant Beef> I havent even used IRC and i know how the pinging works 😄 |
23:55:52 | * | krux02_ quit (Remote host closed the connection) |