00:21:14 | * | Lord_Nightmare quit (Remote host closed the connection) |
00:21:35 | * | Lord_Nightmare joined #nim |
00:55:47 | * | rockcavera quit (Remote host closed the connection) |
01:06:32 | NimEventer | New Nimble package! docid - Document IDs generation and validation, see https://github.com/thisago/docid |
01:06:56 | * | jmdaemon joined #nim |
01:08:36 | FromDiscord | <ringabout> In reply to @yayo256 "Sorry for the abruptness.": Just so you know, there is already a Japanese discord server => https://discord.com/invite/3umT33kQhS I will post the request to the moderator channel. |
01:08:42 | FromDiscord | <ringabout> (edit) "channel." => "channel anyway." |
01:21:12 | FromDiscord | <ringabout> https://www.youtube.com/watch?v=UrEJLmKhyAA |
01:24:24 | FromDiscord | <ringabout> It doesn't seem to be an open source project though https://www.youtube.com/watch?v=_pms08GVHzk |
01:26:16 | FromDiscord | <Elegantbeef> The framework will be they said |
01:26:30 | FromDiscord | <Elegantbeef> But the game won't be, not everyone is stubborn as me |
01:27:58 | FromDiscord | <michaelb.eth> he said he'd probably open source the game after year or so of selling it |
01:30:37 | FromDiscord | <ringabout> Yeah, that's understandable. |
01:36:34 | FromDiscord | <_gumbercules> So another 2d game framework for Nim? |
01:36:37 | FromDiscord | <_gumbercules> Joy.... |
01:36:47 | * | disso-peach joined #nim |
01:37:13 | FromDiscord | <_gumbercules> Eventually folks are going to wise up to the fact that all you need for 2d games with Nim is SDL2 unless you're ambitious and then all you need is SDL2 + a sprite batcher |
01:37:14 | FromDiscord | <Elegantbeef> Hey i'm working on a 3D one just it's at a point I can happily make games with 😛 |
01:38:20 | FromDiscord | <_gumbercules> In reply to @Elegantbeef "Hey i'm working on": well this is novel |
01:38:37 | FromDiscord | <Elegantbeef> Well if you want shaders you cannot just use sdl2 |
01:38:37 | FromDiscord | <Elegantbeef> Many 2D games want/need shaders |
01:38:38 | FromDiscord | <Elegantbeef> But yea with `SDL_RenderGeometry` you can do like 99% of what 2D games need |
01:39:31 | FromDiscord | <_gumbercules> Actually I think you can with SDL2 gpu |
01:39:48 | FromDiscord | <_gumbercules> https://github.com/grimfang4/sdl-gpu |
01:39:52 | FromDiscord | <Elegantbeef> Right sdl2 is just opengl ontop of sdl2 |
01:40:01 | FromDiscord | <Elegantbeef> Prestige used it on his game and sorta regretted it as it hid details |
01:40:14 | FromDiscord | <Elegantbeef> We couldnt figure out how to get a framebuffer to work for instance |
01:40:22 | FromDiscord | <_gumbercules> hrm |
01:40:32 | FromDiscord | <_gumbercules> well regardless, I'm not going to get excited over ANOTHER 2d game framework for Nim |
01:40:43 | FromDiscord | <Elegantbeef> Right I sorta agree 😄 |
01:40:48 | FromDiscord | <_gumbercules> unless it's doing something very novel, which is difficult in that space |
01:41:12 | FromDiscord | <Elegantbeef> It's not that difficult to make a good 2D renderer using SDL2 and opengl |
01:41:39 | FromDiscord | <Elegantbeef> Which we both (this button has died)now |
01:41:53 | FromDiscord | <Elegantbeef> My K key is being silly |
01:42:07 | FromDiscord | <Elegantbeef> Of course it fixes itself now.... |
01:43:49 | FromDiscord | <anuke> I made mine because I want to know (and customize) how things work. None of the options at the time seemed that great, or weren't based on pure Nim. |
01:44:12 | FromDiscord | <_gumbercules> Err I'm not finding fault with people rolling their own engine / framework / whatever |
01:44:29 | FromDiscord | <_gumbercules> it's just 30 2d game frameworks for Nim isn't what is going to attract new users to making games with Nim |
01:44:42 | FromDiscord | <_gumbercules> what will is providing the building blocks for a framework / game in Nim |
01:44:43 | FromDiscord | <Elegantbeef> Yea, that's understandable |
01:45:08 | FromDiscord | <_gumbercules> like - almost every other language at this point has some sort of library for handling cross platform graphics APIs |
01:45:22 | FromDiscord | <_gumbercules> Nim doesn't have that |
01:45:36 | FromDiscord | <anuke> Yeah, there is no definitive solid option for that. |
01:45:40 | FromDiscord | <_gumbercules> Zig has Zig gamedev, Rust has a bunch of shit and WGPU Native, Nim has literally nothing - and I am to blame for part of that |
01:45:52 | FromDiscord | <_gumbercules> I probably got everyone starte don the whole write your own framework in Nim |
01:46:39 | FromDiscord | <_gumbercules> since I was responsible for https://github.com/fragworks/frag and https://github.com/zacharycarter/zengine and before that I guess there was Rod |
01:46:48 | FromDiscord | <_gumbercules> then Nico came out and everyone started using Nico |
01:47:10 | FromDiscord | <_gumbercules> Oh and there was SDL_Game or whatever for a while that people were using |
01:47:20 | FromDiscord | <Elegantbeef> NimGame2 or w/e |
01:47:28 | FromDiscord | <_gumbercules> ultimatley though, it'd be nice if Nim had something like - https://github.com/michal-z/zig-gamedev |
01:47:52 | FromDiscord | <Elegantbeef> Yea that'd be nice |
01:47:55 | FromDiscord | <_gumbercules> or at least a project that was composed of building blocks like thse and made them reusable |
01:48:28 | FromDiscord | <anuke> That's impressive, Zig seems to be moving very quickly. |
01:48:47 | FromDiscord | <_gumbercules> that's where I was going with the new incarnation of Frag but because I wanted to make the APIs able to be consumed by non-Nim programs as well, it ended up with a very difficult to use API and I don't think Nim users would have found it attractive |
01:49:00 | FromDiscord | <_gumbercules> so now I'm focusing on WASM as that seems to be more approachable |
01:49:15 | FromDiscord | <_gumbercules> (edit) "so now I'm focusing on WASM as that seems to be more approachable ... " added "for most people" |
01:49:22 | FromDiscord | <_gumbercules> (edit) "so now I'm focusing on WASM as that seems to be more approachable ... for" added "/ tolerable" |
01:49:48 | FromDiscord | <Elegantbeef> I sorta did that with gooey, except that I forced a stateful api that's quite horrid to use it seems 😄 |
01:50:12 | FromDiscord | <_gumbercules> In reply to @anuke "That's impressive, Zig seems": yeah, and they also have: https://machengine.org/ |
01:50:31 | FromDiscord | <_gumbercules> although I haven't seen much news on mach lately |
01:50:41 | FromDiscord | <_gumbercules> probably because the developer was bragging last year about how they code 100+ hours a week |
01:51:25 | FromDiscord | <anuke> In reply to @_gumbercules "yeah, and they also": How does Zig avoid extra dependencies when glfw depends on X11 headers and stuff? https://media.discordapp.net/attachments/371759389889003532/1131040568353497109/image.png |
01:51:51 | FromDiscord | <_gumbercules> They don't - they just compile and link GLFW statically |
01:52:31 | FromDiscord | <_gumbercules> so you still need to build and link GLFW |
01:52:34 | FromDiscord | <Elegantbeef> Zig is use git submodules presently for package management |
01:52:45 | FromDiscord | <Elegantbeef> It works, but isnt the best experience |
01:52:46 | FromDiscord | <_gumbercules> but the Mach project builds glfw for you when you build it |
01:53:00 | FromDiscord | <anuke> So it still depends on stuff like `xorg-dev libgl1-mesa-dev`? (Which I have to install to compile and statically link GLFW) |
01:53:01 | FromDiscord | <_gumbercules> very similar to what I was doing with Frag and I'm currently doing with my project using nimscript |
01:53:05 | FromDiscord | <_gumbercules> yup |
01:53:15 | FromDiscord | <_gumbercules> it will still depend on whatever libraries GLFW depends on - no magic there |
01:53:29 | FromDiscord | <anuke> well that's.. a bit deceptive |
01:53:47 | FromDiscord | <elegantbeef> Bridge has got real slow 😄 |
01:54:23 | FromDiscord | <_gumbercules> In reply to @anuke "well that's.. a bit": Yeah - I don't think there is anything magical about the Mach project, the author just likes to write a lot |
01:55:34 | FromDiscord | <_gumbercules> like - they wrote an entire blog post about a bug they found and fixed in GLFW https://devlog.hexops.com/2021/perfecting-glfw-for-zig-and-finding-undefined-behavior/ - basically showing they know how to use asan |
01:56:07 | FromDiscord | <elegantbeef> Love pointless blogposts |
01:58:34 | FromDiscord | <_gumbercules> Having said all that - Zig having a project like Mach is a boon for the langauge I think. Just having a direction and people working on a common ecosystem would be amazing for Nim, but we've never had that level of cohesion in the Nim game dev space |
01:59:05 | FromDiscord | <_gumbercules> generally it's a handful of people working on disparate projects at the same time building their own tech or using something like Godot / Raylib / UE etc |
01:59:33 | FromDiscord | <elegantbeef> Concepts + generics, cmon we can do it! 😄 |
01:59:47 | FromDiscord | <_gumbercules> Maybe I should resurrect zengine and replace the GL code with WGPU code |
01:59:54 | FromDiscord | <_gumbercules> and formalize the APIs |
02:00:09 | FromDiscord | <_gumbercules> then we'd have a raylib competitor of sorts at least |
02:00:21 | FromDiscord | <_gumbercules> after all it was mostly a port of Raylib |
02:02:25 | FromDiscord | <elegantbeef> hey this conversation has made me realise how to make a generic atlas generator |
02:03:37 | FromDiscord | <anuke> sent a long message, see http://ix.io/4AVR |
02:05:15 | FromDiscord | <elegantbeef> Plenty of people make game projects based on raylib, though don't know how many have been publisehd |
02:05:44 | FromDiscord | <elegantbeef> But I'm presently making a game in something not to disimilar to raylib so I'm clearly biased |
02:07:58 | FromDiscord | <elegantbeef> I sorta fall into "Engine's are bloat" party now, so I'll go live in my make believe world 😄 |
02:09:33 | FromDiscord | <_gumbercules> In reply to @anuke "This may be important": I think you can easily do 3d if you're motivated without an engine like UE / Unity |
02:09:49 | FromDiscord | <elegantbeef> I agree there |
02:10:09 | FromDiscord | <_gumbercules> you can simplify things a lot by not doing any skeletal animation |
02:10:26 | FromDiscord | <elegantbeef> Right, also no physics, though there are a few easily accessed physics engines |
02:10:28 | FromDiscord | <_gumbercules> space games are also super easy to do in 3d - probably one of the easiest to do with minimal assets |
02:10:40 | FromDiscord | <elegantbeef> Grid based 3D games are easy aswell 😛 |
02:10:50 | FromDiscord | <_gumbercules> Yup - grids make everything easier |
02:10:58 | FromDiscord | <elegantbeef> It's just 2D but with more pixels |
02:11:06 | FromDiscord | <_gumbercules> although we all know hexagons are the bestagons |
02:11:06 | FromDiscord | <anuke> I don't know, it seemed extremely complex when I looked into it. So many ways to implement the low-level rendering alone. When I look at engine update logs I don't even know what half the things they talk about are, like <https://bevyengine.org/news/bevy-0-11/> |
02:11:22 | FromDiscord | <_gumbercules> In reply to @anuke "I don't know, it": because they're overengineering the shit out of most of what they're doing |
02:11:27 | FromDiscord | <_gumbercules> and they're building an engine without a game in mind |
02:11:28 | FromDiscord | <elegantbeef> Right it has a bunch of things for AAA quality 3D graphics |
02:11:45 | FromDiscord | <elegantbeef> So PBR, AO, GI, stuff you might need but also might not |
02:12:15 | FromDiscord | <elegantbeef> For context https://streamable.com/fcf86t is made in pure Nim and is a total of maybe 10k loc |
02:12:19 | FromDiscord | <_gumbercules> yeah - for instance, I'm currently working on a multiplayer 3d virtual console that is going to limit the user to low poly graphics |
02:12:26 | FromDiscord | <_gumbercules> I don't need PBR |
02:12:28 | FromDiscord | <elegantbeef> "Pure Nim" more like it |
02:12:41 | FromDiscord | <elegantbeef> Since it uses Assimp, Sdl2, Miniaudio |
02:12:53 | FromDiscord | <_gumbercules> I'm using https://github.com/flecs-hub/flecs-systems-sokol with modifications for my renderer |
02:12:56 | FromDiscord | <elegantbeef> But I compile using `nim` and don't directly use any other language so I think it counts |
02:13:07 | FromDiscord | <anuke> You have miniaudio bindings? The low level stuff, or the audio engine? |
02:13:30 | FromDiscord | <elegantbeef> https://github.com/beef331/miniaudio/blob/master/src/miniaudio.nim not fully bound just what I use |
02:13:37 | FromDiscord | <_gumbercules> http://guillaumeblanc.github.io/ozz-animation/ - for skeletal animation (https://floooh.github.io/sokol-html5/ozz-skin-sapp.html) |
02:13:53 | FromDiscord | <_gumbercules> I mean - most of my engine is written for me I'm just writing glue code |
02:13:59 | FromDiscord | <elegantbeef> Same here 😄 |
02:14:02 | FromDiscord | <_gumbercules> the hardest part thus far has been the networking |
02:14:13 | FromDiscord | <_gumbercules> because I'm using webrtc and doing all this in the browser |
02:14:16 | FromDiscord | <elegantbeef> The best engines as we all know are made due to necessity of the game you're making |
02:14:58 | FromDiscord | <_gumbercules> I'v'e built engines just to build engines and you burn yourself out adding the Nth feature you may or may not use in a project |
02:15:19 | FromDiscord | <_gumbercules> if you have unlimited motivation for projects without seeing real progress - then you're the perfect yak shaving game engine builder candidate |
02:15:34 | FromDiscord | <elegantbeef> Mine is really barebones and more akin to raylib in that it abstracts most of what opengl does in a slightly more reasonable way |
02:15:51 | FromDiscord | <_gumbercules> but being able to see a project be built alongside the engien you're building tends to keep things in focus and provides a lot more motivatioin along th eway |
02:16:06 | FromDiscord | <_gumbercules> (edit) "th eway" => "the way" |
02:16:09 | FromDiscord | <elegantbeef> PS my entire game is FOSS presently <https://github.com/beef331/mindthegap3D> |
02:16:10 | FromDiscord | <_gumbercules> (edit) "motivatioin" => "motivation" |
02:16:25 | FromDiscord | <elegantbeef> No clue if I'll keep it that way but it is what it is right now |
02:16:39 | FromDiscord | <elegantbeef> So many bad things in there right now that need to be changed |
02:16:50 | FromDiscord | <_gumbercules> Gotta go do chores, be back later |
02:17:01 | FromDiscord | <_gumbercules> Also need to publish the code to my current project - may do that tonight if I get time to work on it |
02:17:48 | FromDiscord | <elegantbeef> Buh bye |
02:18:46 | FromDiscord | <anuke> In reply to @elegantbeef "https://github.com/beef331/miniaudio/blob/master/sr": Weird how miniaudio sound-playing appears to be based on paths to sounds as a string? |
02:19:17 | FromDiscord | <anuke> Soloud has you make a sound -> load it from bytes or a file -> play it |
02:20:34 | FromDiscord | <elegantbeef> Miniaudio allows loading from binary buffers aswell |
02:22:35 | FromDiscord | <elegantbeef> I have only really made high level wrappings for what I need |
02:22:39 | FromDiscord | <anuke> What do you do if you want to play, say, 10 sounds of the same time? |
02:22:42 | FromDiscord | <anuke> (edit) "time?" => "type?" |
02:23:44 | FromDiscord | <elegantbeef> duplicate the sound 10 times, add them to a list then play them, then check that they're finished, if so remove them |
02:24:10 | FromDiscord | <anuke> duplication sounds expensive |
02:24:23 | FromDiscord | <elegantbeef> Only cause I'm using ref objects like a dullard |
02:24:34 | FromDiscord | <elegantbeef> I don't think ref objects is needed |
02:24:58 | FromDiscord | <anuke> You need to destroy it though, right? |
02:25:00 | FromDiscord | <elegantbeef> I believe they have their own ref count and pool the audio in the backend |
02:25:32 | FromDiscord | <elegantbeef> So a Sound is just like `isPlaying: bool, pos: int, volume: float, sound: ptr Sound` |
02:26:02 | FromDiscord | <elegantbeef> The audio isnt duplicated afaik, I just dumbly wrapped the api since I was uncertain how it worked |
02:38:55 | FromDiscord | <_gumbercules> @elegantbeef @elegantbeef @elegantbeef @elegantbeef 42↵B🌌🎆🎆🎆🎆😂🎆🎆😂😁😔😔☹️( ╹▽╹ )(•‿•)(◕ᴗ◕✿)(◔‿◔)(◕ᴗ◕✿)\(๑╹◡╹↵B a mlnl ↵2 2b(θ‿θ)(ʘᴗʘ✿)(≧▽≦)🍅🌑🐷☹️🐷 https://media.discordapp.net/attachments/37175 |
02:39:06 | FromDiscord | <_gumbercules> sent a long message, see http://ix.io/4AVT |
02:39:24 | FromDiscord | <elegantbeef> Someone's kid found their phone |
02:40:24 | FromDiscord | <bostonboston> Interesting discussion |
02:55:46 | FromDiscord | <arkanoid> is stdlib compatible with arc, or there are cycles here and there and orc is generally required? |
02:56:15 | FromDiscord | <Elegantbeef> A lot of the stdlib will work |
02:56:25 | FromDiscord | <Elegantbeef> But something will leak like `lists` and other similar graphics |
02:56:28 | FromDiscord | <Elegantbeef> graph types |
03:01:17 | FromDiscord | <arkanoid> lists = seq ? |
03:03:22 | FromDiscord | <Elegantbeef> No |
03:03:34 | FromDiscord | <Elegantbeef> Lists as in https://nim-lang.org/docs/lists.html |
03:04:51 | FromDiscord | <arkanoid> oh! sure, that's obviously cyclic |
03:05:18 | FromDiscord | <arkanoid> will the nim compiler warn if a cyclic type is used when arc is selected? |
03:05:32 | FromDiscord | <Elegantbeef> Nope |
03:10:23 | FromDiscord | <arkanoid> is it because detecting it is hard? I though compiler needs to know if a type is cyclic or not to calc object size |
03:11:01 | FromDiscord | <arkanoid> I know that the obvious answer is "why the heck are you using ARC if you don't want to track what is cyclic". I'm just curious |
03:15:55 | FromDiscord | <Elegantbeef> Detecting it is easy it's just orc, but error instead of cycle check |
03:23:41 | FromDiscord | <arkanoid> error? I though you just said compiler won't warn |
03:25:42 | FromDiscord | <Elegantbeef> It doesnt |
03:26:40 | FromDiscord | <Elegantbeef> I said it's not that hard to implement on top of Orc's work |
04:10:32 | * | disso-peach quit (Quit: Leaving) |
04:14:51 | * | jmd_ joined #nim |
04:15:05 | * | jmdaemon quit (Ping timeout: 246 seconds) |
04:15:05 | * | ormiret quit (Ping timeout: 246 seconds) |
04:15:22 | * | fallback quit (Ping timeout: 245 seconds) |
04:17:33 | * | fallback joined #nim |
04:18:36 | * | ormiret joined #nim |
06:09:36 | FromDiscord | <shalokshalom> In reply to @elegantbeef "Someone's kid found their": And he found the answer to life, the universe and the rest 😉 |
06:09:39 | * | azimut joined #nim |
06:16:22 | * | PMunch joined #nim |
06:51:43 | FromDiscord | <punchcake> Is it worth switching from 1.6 to the master release? |
06:54:14 | FromDiscord | <shalokshalom> "worth"? |
06:59:37 | FromDiscord | <voidwalker> I switched for the new std\paths module |
07:16:03 | * | ntat joined #nim |
07:17:51 | * | sthalik joined #nim |
07:17:54 | sthalik | hey |
07:18:12 | sthalik | how capable is nim's type system? is it most like C#, scala, ML/haskell or C++? |
07:18:24 | Amun-Ra | way more capable than C++ |
07:18:33 | sthalik | C++ type system is turing-equivalent |
07:18:51 | sthalik | particularly, I'm only interested in static polymorphism |
07:19:12 | Amun-Ra | what I miss the most in C++ type system is distinct type |
07:19:40 | sthalik | in C++ you do that with operator overloading |
07:20:04 | sthalik | in the end, newtype end up stored in registers like their base type would |
07:20:15 | sthalik | it's used for units of measure |
07:20:21 | Amun-Ra | in C++ I have to use my own class for that |
07:21:04 | Amun-Ra | I only have to write "type MyInt = distinct uint64" in nim |
07:22:26 | sthalik | is pattern matching refutable like in functional languages? |
07:31:37 | FromDiscord | <bung8954> `var pp = cast[proc()](fn.f)` Error: expression cannot be cast to 'proc (){.closure.}'. any idea? |
07:33:24 | FromDiscord | <enthus1ast> is `cast[proc() {.nimcall.}(fn.f)` valid? |
07:33:31 | FromDiscord | <enthus1ast> ] |
07:34:06 | FromDiscord | <enthus1ast> `cast[proc() {.nimcall.}](fn.f)` |
07:44:37 | FromDiscord | <bung8954> yes , it's valid |
07:47:11 | FromDiscord | <odexine> In reply to @sthalik "is pattern matching refutable": nim doesnt do pattern matching "in the compiler" |
07:47:59 | sthalik | I see, thanks |
07:48:03 | * | sthalik left #nim (#nim) |
08:06:02 | FromDiscord | <demotomohiro> `proc()` is a closure and it contains the proc pointer and the pointer to implicitly passed environment.↵`proc() {.nimcall.}` is just a proc pointer. |
08:11:45 | FromDiscord | <punchcake> In reply to @odexine "nim doesnt do pattern": I was wondering if nim converters case statments to switch in the generated code, is this true? |
08:19:24 | FromDiscord | <odexine> i dont know |
08:35:55 | FromDiscord | <punchcake> Welp lets ask araq |
08:36:23 | FromDiscord | <punchcake> In reply to @punchcake "I was wondering if": @_araq does nim do this? |
08:37:42 | FromDiscord | <demotomohiro> You can see Nim generated C code in nimcache dir. |
08:39:02 | FromDiscord | <demotomohiro> https://nim-lang.github.io/Nim/nimc.html#compiler-usage-generated-c-code-directory |
08:51:05 | FromDiscord | <System64 ~ Flandre Scarlet> Nim playground dead? |
08:52:22 | FromDiscord | <System64 ~ Flandre Scarlet> !eval echo (2 == 3).int |
08:53:23 | NimBot | Compile failed: <no output> |
08:54:33 | FromDiscord | <System64 ~ Flandre Scarlet> !eval echo "test" |
08:55:33 | NimBot | Compile failed: <no output> |
08:55:51 | FromDiscord | <System64 ~ Flandre Scarlet> wtf |
08:56:06 | FromDiscord | <odexine> In reply to @punchcake "Welp lets ask araq": i think you should be more careful pinging araq like that |
08:56:12 | FromDiscord | <odexine> its not appreciated |
08:56:18 | FromDiscord | <odexine> (edit) "its not appreciated ... " added "unless its truly urgent" |
09:04:36 | FromDiscord | <_araq> @punchcake don't highlight me. |
09:07:36 | FromDiscord | <punchcake> In reply to @_araq "<@655759729477287956> don't highlight me.": Okay sorry |
09:11:08 | FromDiscord | <punchcake> In reply to @odexine "i think you should": Its just a @ bro |
09:11:50 | FromDiscord | <odexine> ? |
09:13:04 | * | ntat quit (Quit: leaving) |
09:25:52 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4AWK |
09:26:27 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4AWL |
09:27:13 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4AWN |
09:27:42 | PMunch | @System64_~_Flandre_Scarlet, playground should be back up now |
09:28:35 | PMunch | ambient, probably not related, but are you sure you want to use `float`? |
09:29:00 | PMunch | !eval echo "test" |
09:29:05 | NimBot | test |
09:30:42 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4AWO |
09:30:49 | FromDiscord | <ambient3332> i changed to float32, but didn't change anything |
09:31:39 | FromDiscord | <demotomohiro> You can also use `cfloat` that is same to `float` in C/C++. |
09:32:11 | FromDiscord | <demotomohiro> sizeof(int) or sizeof(float) can be different in Nim and C. |
09:34:55 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4AWR |
09:35:31 | FromDiscord | <odexine> In reply to @demotomohiro "Maybe that is becasue": shouldnt cause an issue other than "ambiguous call" |
09:36:05 | FromDiscord | <demotomohiro> In reply to @odexine "shouldnt cause an issue": yes |
09:36:09 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4AWS |
09:36:39 | FromDiscord | <odexine> it woulkdnt shadow but cause the ambiguous call error if not qualified |
09:38:00 | FromDiscord | <odexine> try using `{.compile: "file".}` instead of the parenthesised version maybe |
09:39:25 | FromDiscord | <ambient3332> In reply to @odexine "it woulkdnt shadow but": Yeah that works |
09:39:35 | FromDiscord | <ambient3332> apparently it wants more parameters with parentheses |
09:39:51 | FromDiscord | <odexine> yeah i guessed it from looking at the manual again |
09:43:56 | FromDiscord | <ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4AWT |
10:03:40 | FromDiscord | <odexine> nice |
10:47:22 | * | gst joined #nim |
10:50:09 | gst | hello, anyone knows if there is an example of usage of valgrind client request from nim? |
10:52:57 | * | jmd_ quit (Ping timeout: 250 seconds) |
10:53:07 | gst | the api is defined as c macros in a header file, the macros expand to c/assembly and I don't know how to use that from nim, {.header: ...} does not help. Any ideas that do not require rewriting? |
10:59:42 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4AX8 |
11:02:44 | * | gst quit (Quit: Client closed) |
11:11:10 | * | gst joined #nim |
11:25:54 | * | fallback quit (Ping timeout: 272 seconds) |
11:38:58 | FromDiscord | <punchcake> are there any keyword to tell the GC to allocate an object on the heap? |
11:39:05 | FromDiscord | <punchcake> or does it just decide on its own |
11:40:29 | PMunch | Well you can use `new` |
11:40:52 | PMunch | But typically you just don't worry about it |
11:41:09 | FromDiscord | <mohamed> Does nimsuggest support concepts?? |
11:41:24 | PMunch | Why wouldn't it? |
11:41:29 | FromDiscord | <punchcake> In reply to @PMunch "Well you can use": so the gc just decides on its own? |
11:41:34 | PMunch | It supports everything Nim supports, as it is technically just Nim |
11:41:52 | PMunch | punchcake, not quite. If you have a `ref object` type then it is allocated on the heap |
11:41:59 | PMunch | Otherwise it goes on the stack |
11:42:10 | PMunch | That's the general rule |
11:42:24 | FromDiscord | <punchcake> In reply to @PMunch "Otherwise it goes on": wdym? |
11:42:33 | FromDiscord | <punchcake> i never do any `ref` |
11:42:40 | FromDiscord | <punchcake> so everything is stored on the stack? |
11:42:56 | PMunch | You can make an object like `type SomeObj = object` or you can do `type SomeObj = ref object` |
11:43:04 | PMunch | The latter is stored on the heap, the former on the stack |
11:43:23 | FromDiscord | <punchcake> what does latter mean |
11:43:47 | PMunch | But if you pass it to a function and the object is large enough it will get passed by pointer anyways, so you don't need to worry about that |
11:43:55 | PMunch | latter just means the last one |
11:44:18 | FromDiscord | <punchcake> so what do i need to do to program nim correctly |
11:44:25 | PMunch | Have fun? |
11:44:38 | PMunch | Oh, and use spaces and camelCase |
11:44:40 | FromDiscord | <punchcake> like will the GC allocate to heap if my stack is closed to getting overflowed |
11:44:52 | FromDiscord | <punchcake> (edit) "closed" => "close" |
11:45:04 | PMunch | Don't think so, but I've never had stack overflows |
11:45:18 | FromDiscord | <punchcake> the stack is pretty big |
11:45:21 | FromDiscord | <punchcake> its 2 mb |
11:47:12 | FromDiscord | <mohamed> but you can`t see the fields that are defined in the concept it shows it as an empty type |
11:47:26 | PMunch | There are no fields defined in a concept |
11:47:36 | PMunch | A concept is basically just a rule to match objects against |
11:47:47 | PMunch | Like a really fancy generic |
11:49:23 | * | gst quit (Quit: Client closed) |
11:49:57 | FromDiscord | <mohamed> I want to have something like go interfaces where the interface matches every type and when you use it in a function you can use the types that that interface define |
12:06:59 | FromDiscord | <djazz> sequences are also on the heap |
12:08:55 | PMunch | djazz, sure, same are strings, but that's because they are reference objects under the hood |
12:10:04 | FromDiscord | <djazz> Right... Hmm, heap is an issue on embedded |
12:10:29 | * | fallback joined #nim |
12:16:12 | FromDiscord | <djazz> Fragmentation |
12:18:20 | FromDiscord | <nervecenter> In reply to @djazz "sequences are also on": They're allocated on the heap but are managed by a pointer on the stack, so behaviorally they're like stack data. |
12:19:46 | FromDiscord | <djazz> Yeah the data I mean |
12:30:47 | FromDiscord | <eliot> im very new to programming and i was wondering if it was possible to export or import a variable from another file? |
12:35:26 | * | fallback quit (Ping timeout: 260 seconds) |
12:36:20 | FromDiscord | <gogolxdong666> how to cast `var dataPtr = cast[ptr UncheckedArray[byte]](dataVal.mvData)` to seq[byte] |
12:41:14 | FromDiscord | <demotomohiro> In reply to @eliot "im very new to": You can export variables like `const PI = 3.141`.↵https://nim-lang.org/docs/manual.html#modules |
12:42:23 | FromDiscord | <eliot> In reply to @demotomohiro "You can export variables": thank you! |
12:44:45 | FromDiscord | <demotomohiro> In reply to @gogolxdong666 "how to cast `var": Better to use `toOpenArray`:↵https://nim-lang.org/docs/system.html#toOpenArray%2Cptr.UncheckedArray%5BT%5D%2Cint%2Cint↵Or copy to seq[byte]. |
12:48:35 | FromDiscord | <gogolxdong666> 👌 |
12:50:10 | FromDiscord | <gogolxdong666> https://media.discordapp.net/attachments/371759389889003532/1131206345442471936/image.png |
12:57:19 | * | fallback joined #nim |
13:18:22 | * | dterlyakhin joined #nim |
13:20:42 | dterlyakhin | can somebody explain what impl and aux suffix is? I find these in many nim codebases and don't understand its purposes. dont see them in other languages |
13:29:53 | FromDiscord | <punchcake> so how do i switch to nim devel exactly? |
13:30:03 | FromDiscord | <punchcake> do i just replace my current bin with the new nim devel bin? |
13:32:00 | PMunch | choosenim devel |
13:32:16 | FromDiscord | <punchcake> is there choosenim on windows |
13:33:05 | FromDiscord | <punchcake> yes there is |
13:36:05 | FromDiscord | <punchcake> probably should add choosenim to path |
13:36:13 | FromDiscord | <punchcake> is it safe to put it in nim bin? |
13:40:53 | FromDiscord | <odexine> In reply to @dterlyakhin "can somebody explain what": impl means implementation, like the "real logic" of the function |
13:41:01 | FromDiscord | <odexine> i dont know what aux means other than maybe auxilliary |
13:41:34 | FromDiscord | <punchcake> hm nim devel seems to cause problems with qml |
13:44:25 | dterlyakhin | Why might it be useful to separate a function and its implementation? |
13:44:25 | dterlyakhin | for example https://github.com/search?q=repo%3Astatus-im%2Fnim-chronos+Impl&type=code |
13:44:25 | dterlyakhin | there are single proc and procImpl, is it overengineering pattern? |
13:45:14 | * | rockcavera joined #nim |
14:07:07 | FromDiscord | <arkanoid> If I have a C++ library with "extern C" interface, can I use it with "nim c" or I am forced to use "nim cpp" ? |
14:14:00 | FromDiscord | <spotlightkid> I think, you can compile the library with cpp and then link to it with "nim c" and appropriate `--passL` flags. |
14:15:45 | * | dterlyakhin quit (Ping timeout: 250 seconds) |
14:30:04 | FromDiscord | <ambient3332> You can c2api the C API .h and just use that as an import |
14:30:08 | FromDiscord | <ambient3332> c2nim that is |
14:30:21 | FromDiscord | <ambient3332> probably after a few manual fixes |
14:36:43 | * | PMunch quit (Quit: Leaving) |
14:54:24 | FromDiscord | <michaelb.eth> In reply to @arkanoid "If I have a": you should be able to use `{.importc.}` and compile with `nim c` |
14:59:39 | FromDiscord | <arkanoid> thanks |
16:34:57 | NimEventer | New Nimble package! gookie - Google Cookies. In your hands, see https://github.com/thisago/gookie |
16:46:13 | FromDiscord | <odexine> shoulda named it d-- |
16:58:02 | FromDiscord | <bostonboston> Without using mem copy is the fastest way to turn an array into a seq a for loop of .add() |
17:09:30 | * | zgasma joined #nim |
17:10:22 | * | lumidify_ is now known as lumidify |
17:11:30 | * | zgasma quit (Client Quit) |
17:13:17 | * | zgasma joined #nim |
17:13:34 | * | zgasma quit (Client Quit) |
17:19:13 | FromDiscord | <Phil> Look Rika, we don't all need to have disrupteks naming sense |
17:19:35 | * | zgasma joined #nim |
17:19:43 | * | zgasma quit (Client Quit) |
17:24:45 | FromDiscord | <odexine> In reply to @bostonboston "Without using mem copy": probably faster to set capacity first then add, to further amortise the resize cost |
17:38:04 | * | ntat joined #nim |
17:55:37 | FromDiscord | <JJ> In reply to @mohamed "I want to have": so there are two forms of concepts, old-style concepts and new-style concepts |
17:55:48 | FromDiscord | <JJ> old-style concepts are unsound but a little more powerful |
17:55:57 | FromDiscord | <JJ> new-style concepts are essentially interfaces |
17:56:58 | * | jmdaemon joined #nim |
18:13:53 | FromDiscord | <arathanis> In reply to @omentic "so there are two": are both available in the latest stable and/or devel? are there docs about the difference? |
18:14:22 | FromDiscord | <arathanis> concepts still seem to be one of those big "????" parts where its very experimental to the point where knowing exactly what does and does not work is a bit up in the air |
18:30:11 | FromDiscord | <eliot> sent a code paste, see https://play.nim-lang.org/#ix=4AYV |
18:30:23 | FromDiscord | <eliot> im feeling as though im doing something wrong here |
18:31:42 | FromDiscord | <nervecenter> you can first stop using `== true` |
18:31:48 | FromDiscord | <nervecenter> `if isIpv6:` |
18:31:57 | FromDiscord | <nervecenter> `if isJson:` |
18:32:10 | FromDiscord | <JJ> In reply to @arathanis "are both available in": i believe both are available in stable. old-style concepts are properly documented here: https://nim-lang.github.io/Nim/manual_experimental.html#concepts, new style concepts are only documented here: https://github.com/nim-lang/RFCs/issues/168 |
18:32:30 | FromDiscord | <huantian> In reply to @eliot "hello, i had a": This is actually a pretty good example for showing how to refactor to remove duplicate code |
18:32:39 | FromDiscord | <huantian> But I’m on mobile so I can’t guide you through it |
18:33:21 | FromDiscord | <eliot> hm alright ill try to do some research on it |
18:34:03 | FromDiscord | <eliot> In reply to @nervecenter "you can first stop": thank you |
18:34:06 | FromDiscord | <huantian> Specifically for your code, notice that in the end you’re just calling getCurrentIp with some URL |
18:34:22 | FromDiscord | <huantian> It’s just that the URL changes depending on the paeans |
18:35:13 | FromDiscord | <huantian> But because no matter what the input is, you call that function with a url, you only need to include the code `getCurrentIp(url)` once in your entire function |
18:35:23 | FromDiscord | <huantian> (edit) "function" => "function, at the end" |
18:35:27 | FromDiscord | <nervecenter> @eliot Here's q quick refactor I did, probably not optimal but communicates some of Nim's capabilities |
18:35:36 | FromDiscord | <nervecenter> sent a code paste, see https://paste.rs/jKtmt |
18:37:45 | FromDiscord | <eliot> ooooh, i think i understand |
18:38:28 | FromDiscord | <huantian> I would probably move the & formatSuffix out of the if expression but that’s the general idea |
18:38:32 | FromDiscord | <eliot> but i don't understand how an if/else statement is in a let statement |
18:38:37 | FromDiscord | <JJ> another helpful feature, although it doesn't apply here, is nim provides an implicit `result` variable initialized to your return type |
18:38:42 | FromDiscord | <huantian> (edit) "I would probably move the & formatSuffix out of the if expression ... but" added "(duplicated code)" |
18:38:49 | FromDiscord | <JJ> In reply to @eliot "but i don't understand": it is technically an if/else expression there |
18:39:01 | FromDiscord | <nervecenter> In reply to @eliot "but i don't understand": It's just an expression, one value if condition, else another valyue |
18:39:05 | FromDiscord | <nervecenter> (edit) "valyue" => "value" |
18:39:11 | FromDiscord | <JJ> there's a distinction between "expressions" which return to a value, and statements which do no |
18:39:12 | FromDiscord | <JJ> (edit) "no" => "not" |
18:39:24 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#ix=4AZ1 |
18:39:43 | FromDiscord | <eliot> oooh ok |
18:40:01 | * | chhh joined #nim |
18:40:21 | FromDiscord | <eliot> i think i got most of it but i'll have to learn more of the subtle differences |
18:40:30 | * | chhh quit (Client Quit) |
18:40:35 | FromDiscord | <JJ> In reply to @eliot "but i don't understand": https://nim-lang.github.io/Nim/manual.html#statements-and-expressions↵if/else, when/else, cases, and blocks are both statements and expressions |
18:41:23 | FromDiscord | <nervecenter> Think of a statement as an instruction that might be executed, and an expression as a value that could go anywhere a literal might |
18:41:38 | FromDiscord | <spatchler> In reply to @spatchler "hi, im having problems": Can anyone help me with this problem? |
18:41:56 | FromDiscord | <eliot> In reply to @nervecenter "Think of a statement": ok i think i've got it |
18:42:39 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4AZ3 |
18:42:50 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=4AZ3" => "https://play.nim-lang.org/#ix=4AZ4" |
18:43:02 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=4AZ4" => "https://play.nim-lang.org/#ix=4AZ5" |
18:43:30 | FromDiscord | <JJ> In reply to @huantian "I personally like something": getCurrentIp is implicitly returned here because the body of the proc is treated as an expression |
18:44:31 | FromDiscord | <nervecenter> Yes, if `getCurrentIp` returns a string and is also the last line, it assumes that is the return value |
18:44:33 | FromDiscord | <eliot> so to differentiate between an expression and a statement we have to look at the indentation? |
18:44:43 | FromDiscord | <nervecenter> No |
18:45:20 | FromDiscord | <JJ> In reply to @eliot "so to differentiate between": no, you look at the semantics. if getCurrentIp was a proc that didn't return anything it would be a statement |
18:45:25 | FromDiscord | <arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4AZ7 |
18:45:27 | FromDiscord | <huantian> On a higher level, I'd also question your overall api design for this function↵for example, is there any situation where you would actually need the json response from the api? It's always just a single value right, so what's the benifit? |
18:45:32 | FromDiscord | <arathanis> for if you want to make everyone angry at you |
18:47:09 | FromDiscord | <JJ> there is a rule in nim where a series of statements ending with an expression is treated as an expression |
18:47:27 | FromDiscord | <JJ> (well, that's kind of a clunky way of putting it) |
18:47:52 | FromDiscord | <eliot> In reply to @huantian "On a higher level,": i was trying to replicate what they did on the unofficial crystal library for the api |
18:48:36 | FromDiscord | <eliot> In reply to @omentic "there is a rule": so if a series of expressions end with a statement is it a statement? |
18:49:24 | FromDiscord | <huantian> In reply to @eliot "i was trying to": I see, I think for Nim there'd be no reason to get the json reponse |
18:49:35 | FromDiscord | <huantian> since you'd have to parse it for no benifit |
18:49:39 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#ix=4AZ8 |
18:49:58 | FromDiscord | <nervecenter> (edit) "https://paste.rs/UkKSA" => "https://paste.rs/Oy30B" |
18:50:14 | FromDiscord | <huantian> (edit) "benifit" => "benefit" |
18:50:19 | FromDiscord | <JJ> In reply to @eliot "so if a series": no because you can't have a one-off expression. all expressions must be handled, via being returned in a function as above, used by a different function (ex. `echo`), or explictly `discard`ed |
18:50:59 | FromDiscord | <JJ> however the last line of a scope (function scope, block scope, if statement scope...) is special |
18:52:57 | FromDiscord | <eliot> In reply to @nervecenter "Expressions are any block": oh so if i were to simplify baseUrl is a book being read while `ipifyUrl &= "?format=json"` is just the book on the shelf |
18:53:19 | FromDiscord | <spatchler> In reply to @spatchler "Can anyone help me": ? |
18:53:31 | FromDiscord | <nervecenter> In reply to @eliot "oh so if i": I am not understanding this analogy |
18:54:39 | FromDiscord | <eliot> In reply to @nervecenter "I am not understanding": as in the baseUrl is actually being used and has a name whilst the other is just on stand by |
18:54:56 | FromDiscord | <nervecenter> Sort of? I guess? |
18:58:37 | FromDiscord | <arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4AZb |
19:00:54 | FromDiscord | <nervecenter> So here `getIpifyUrl()` uses the concept of `result`, which is always a mutable variable of the default type of the return value of a proc, in this case the empty string `""`. But Arathanis just assigns it manually. If there is a `result`, that's what a proc returns unless there is some other explicit `return` statement. |
19:02:41 | FromDiscord | <eliot> but what was the purpose of creating an InternetProtocol type? wouldn't a string do the same thing? |
19:02:55 | FromDiscord | <eliot> or is it just for readability |
19:03:29 | FromDiscord | <nervecenter> A string can have many values, that enum has only 2, and it's much faster behind the scenes. The `case` checks all possible values, we don't need an `else` because we covered both possibilities |
19:03:39 | FromDiscord | <nervecenter> Enums greatly help reduce the possible states of your code |
19:03:56 | * | pbsds quit (Ping timeout: 252 seconds) |
19:05:09 | * | pbsds joined #nim |
19:06:32 | FromDiscord | <eliot> ooh ok thanks for the help |
19:08:22 | FromDiscord | <eliot> i think im starting to understand some concepts |
19:09:08 | FromDiscord | <huantian> sent a code paste, see https://paste.rs/Iy9A4 |
19:10:44 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4AZl |
19:11:12 | FromDiscord | <eliot> im actually using the puppy library |
19:12:18 | FromDiscord | <spatchler> In reply to @spatchler "Can anyone help me": is that a no? |
19:12:37 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4AZm |
19:12:49 | FromDiscord | <huantian> In reply to @spatchler "is that a no?": i can't speak for anyone else but I can't at least haha |
19:13:10 | FromDiscord | <huantian> you might have more luck in #appdev or #gamedev |
19:15:49 | FromDiscord | <huantian> also note that the ipv6 endpoint actually can return both ipv6 and ipv4 |
19:17:01 | FromDiscord | <eliot> i do have a question tho, in earlier examples no one ever added `= true` to useIpv6, is there a reason? |
19:17:41 | FromDiscord | <huantian> oh that's just what I would do |
19:17:56 | FromDiscord | <huantian> since I'd assume that you normally would want to use the universal endpoint so I just set it as the default |
19:18:14 | FromDiscord | <huantian> but that's up to you, depends on what you expect from the proc and which one you use more |
19:19:43 | FromDiscord | <eliot> so if you set a bool in a proc to true or false and you use it you wouldn't need to explicitly write true or false? |
19:20:03 | FromDiscord | <eliot> so like getIp() would be the same as getIp(true) |
19:20:21 | FromDiscord | <huantian> yes |
19:20:58 | FromDiscord | <huantian> from the manual https://media.discordapp.net/attachments/371759389889003532/1131304694493479043/image.png |
19:21:49 | FromDiscord | <eliot> oooh ok |
19:23:43 | FromDiscord | <eliot> sent a code paste, see https://play.nim-lang.org/#ix=4AZq |
19:24:29 | FromDiscord | <huantian> your sendRequest proc seems to be the same as `fetch()`? |
19:24:36 | FromDiscord | <huantian> idk about puppy api |
19:25:38 | FromDiscord | <eliot> it is the same but it seems to get response codes i'd need to use get |
19:26:17 | FromDiscord | <eliot> https://media.discordapp.net/attachments/371759389889003532/1131306031008465036/image.png |
19:26:36 | FromDiscord | <huantian> but you aren't using the response code in your function |
19:27:17 | FromDiscord | <eliot> yeah i was going to implement it after |
19:28:07 | FromDiscord | <huantian> `fetch` will also raise an exception if you don't get 200 repsonse code so I suppose if you want different behavior |
19:28:38 | FromDiscord | <huantian> btw I still think the json is unnecessary haha |
19:29:39 | FromDiscord | <eliot> In reply to @huantian "btw I still think": im just trying to do what the other libraries are |
19:30:41 | FromDiscord | <eliot> sent a code paste, see https://play.nim-lang.org/#ix=4AZv |
19:30:51 | FromDiscord | <huantian> `!= 200` |
19:31:03 | FromDiscord | <eliot> oooh |
19:31:05 | FromDiscord | <huantian> In reply to @eliot "im just trying to": not all libraries implement it, I don't think the python one does |
19:31:29 | FromDiscord | <huantian> since it's not useful for use in Nim |
19:31:40 | FromDiscord | <huantian> there's no reason why you'd want your ip formatted in a json object you'd need to parse anyway |
19:32:49 | FromDiscord | <huantian> In reply to @huantian "`fetch` will also raise": <https://github.com/treeform/puppy/blob/master/src/puppy.nim#L103> source code |
19:33:20 | FromDiscord | <eliot> i suppose but i feel like its there if you are in a peculiar situation |
19:33:38 | FromDiscord | <huantian> in that case, i think it's better if the user constructs the json themselv'es |
19:33:41 | FromDiscord | <huantian> (edit) "themselv'es" => "themselves" |
19:34:32 | FromDiscord | <eliot> wouldn't just making useJson false by default just be easier, it's not like theyre obliged to use it |
19:35:01 | FromDiscord | <huantian> right but it also provides (a small amount) of extra burden for you to support it |
19:35:38 | FromDiscord | <huantian> (it's your code in the end you can ignore my preferences hehe) |
19:36:30 | FromDiscord | <eliot> but the burden is put on the api not me right? if they do remove the format then its no longer a part of the official api so it doesn't belong in it |
19:36:51 | FromDiscord | <huantian> right but it's still extra code and moving parts in your proc |
19:37:08 | FromDiscord | <huantian> and an extra parameter, even if it's default |
19:37:25 | FromDiscord | <eliot> i suppose ill just comment it out in that case |
19:37:33 | FromDiscord | <huantian> (edit) "hehe)" => "hehe)↵(personally I'd even go more overkill and have the code return both ipv6 and ipv4 lol)" |
19:39:31 | FromDiscord | <eliot> sent a code paste, see https://play.nim-lang.org/#ix=4AZz |
19:43:13 | FromDiscord | <spatchler> can no one help me? |
19:49:25 | FromDiscord | <huantian> In reply to @huantian "you might have more": |
19:50:03 | FromDiscord | <huantian> once again I cannot help you myself, and if nobody responds in a reasonable time it's safe to assume nobody is online with that knowledge |
19:51:53 | FromDiscord | <spatchler> In reply to @huantian "** **": ahh thanks, i dont know how i missed your message |
19:51:57 | FromDiscord | <huantian> all good |
19:52:20 | FromDiscord | <huantian> yeah I don't dabble in that subject myself so I can't help directly, but I think like #gamedev has more opengl related discussion |
19:53:20 | FromDiscord | <Elegantbeef> What's your code |
19:53:22 | FromDiscord | <Elegantbeef> Huan in the wrong sect of development |
19:53:26 | FromDiscord | <Elegantbeef> Gamedev is the only good sect |
19:53:52 | FromDiscord | <huantian> hey I do some gamedev |
19:54:00 | FromDiscord | <huantian> just no low level graphics stuff |
19:54:14 | FromDiscord | <huantian> I just drag around random things in unity and hope that unity doesn't delete my computer |
19:54:26 | FromDiscord | <Elegantbeef> lol |
19:54:58 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4AZB |
19:55:04 | FromDiscord | <huantian> the problem is I can't test with ipv6 only or ipv4 only connections |
19:55:08 | FromDiscord | <huantian> because I'm lazy |
19:56:28 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=4AZB" => "https://play.nim-lang.org/#ix=4AZD" |
19:56:40 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=4AZD" => "https://play.nim-lang.org/#ix=4AZE" |
20:06:17 | FromDiscord | <arathanis> In reply to @huantian "I'd go with something": I dig it, I just really like enums, i love the readability of it |
20:06:31 | FromDiscord | <huantian> true true |
20:06:35 | FromDiscord | <huantian> enums are cool |
20:07:32 | FromDiscord | <arathanis> too much trauma of people using string constants over enums |
20:07:37 | FromDiscord | <huantian> oh there's a ipv6 only url https://api6.ipify.org/ |
20:07:39 | FromDiscord | <arathanis> and now figuring out all the options makes me want to die |
20:07:50 | FromDiscord | <huantian> In reply to @arathanis "too much trauma of": yeah why would you use string constants |
20:08:21 | FromDiscord | <arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4AZJ |
20:08:29 | FromDiscord | <arathanis> but that is exactly what enums were supposed to capture lol |
20:08:40 | FromDiscord | <arathanis> but at least you can see all of them |
20:10:16 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4AZL |
20:18:38 | FromDiscord | <arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4AZO |
20:19:04 | FromDiscord | <arathanis> result: `@["172.67.132.242", "104.21.5.42", "2606:4700:3031::6815:52a", "2606:4700:3034::ac43:84f2"]` |
20:29:19 | * | ntat quit (Quit: leaving) |
20:53:07 | FromDiscord | <bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4AZT |
20:53:35 | FromDiscord | <bostonboston> (edit) "https://play.nim-lang.org/#ix=4AZT" => "https://play.nim-lang.org/#ix=4AZU" |
20:56:04 | FromDiscord | <demotomohiro> 'Requested command not found' means gcc.exe is not found? |
20:57:53 | FromDiscord | <bostonboston> My gcc.path points to the correct location in my nim.cfg file |
21:02:14 | FromDiscord | <bostonboston> Okay nvm is was a problem, but now my question is why does gcc.path = [the correct path] ship commented out |
21:02:26 | FromDiscord | <bostonboston> (edit) "Okay nvm is was a ... problem," added "nim.cfg" |
21:29:33 | * | xaltsc quit (Quit: WeeChat 3.8) |
21:52:27 | FromDiscord | <patitotective> I want to rename a key from an `OrderedTable` inserting the new key and then deleting the old key, the problem is that I want to keep the new key in the same index as old key↵From what I've seen it doesn't seem possible so should I go ahead and write my own `seq[tuple[key: A, val: B]]` procedures? |
22:00:55 | FromDiscord | <mohamed> is it possible to make nim output everything to one c file ?? |
22:03:17 | FromDiscord | <patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4B0c |
22:03:31 | * | sagax joined #nim |
22:05:44 | FromDiscord | <Elegantbeef> No it's not mohamed |
22:08:41 | FromDiscord | <graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4B0d |
22:30:51 | FromDiscord | <nixfreak> Does nimScript not support stdin using readLine? |
22:33:46 | FromDiscord | <Elegantbeef> Nope |
22:34:09 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimscript.html#readLineFromStdin |
22:37:57 | FromDiscord | <nixfreak> Ok thanks |
22:39:49 | FromDiscord | <nixfreak> Ok so readLinefromstdin with nimScript |
22:42:44 | FromDiscord | <mohamed> I cant get nim to compile for android because it expects clang.exe but I have clang.bat in the ndk |
22:43:58 | * | azimut quit (Ping timeout: 240 seconds) |
22:52:53 | * | rockcavera quit (Read error: Connection reset by peer) |
22:53:33 | * | rockcavera joined #nim |
23:23:15 | FromDiscord | <michaelb.eth> In reply to @mohamed "I cant get nim": can you view the source of clang.bat and see where/how it invokes clang.exe? |
23:26:55 | FromDiscord | <mohamed> since ndk comes with a bunch of .bat files each for an api version the all basically call the base clang.exe with --target=target_name |