<< 01-09-2021 >>

00:07:52*luis_ quit (Ping timeout: 252 seconds)
00:25:31FromDiscord<SandwichBop> silly question, project idea suggestions for nim? idk the ideas that first come to mind are all gamedev related but at that point I should be using Unreal engine and that defeats the spirit of using nim :nim1:
00:25:58FromDiscord<SandwichBop> (edit) "silly question, ... project" added "for fun"
00:26:03FromDiscord<Elegantbeef> Seems like an odd take
00:26:27FromDiscord<SandwichBop> please enligthen me, I'm trying to brainstorm ways to jumpstart my nim learning
00:26:34FromDiscord<Elegantbeef> Make a game in Nim if you want to, join the club, it's not very exclusive
00:27:04FromDiscord<Elegantbeef> A good place to start is https://github.com/ftsf/nico
00:27:06nrds<R2D299> itHub: 7"a Game Framework in Nim inspired by Pico-8."
00:27:31FromDiscord<SandwichBop> lol I've made games before with Pico8, it's really cozy but idk it feels like I should be using Lua
00:27:43FromDiscord<SandwichBop> I don't know better, maybe nim really is much better for gamedev lol
00:27:47FromDiscord<Elegantbeef> That's not pico
00:27:51FromDiscord<SandwichBop> O
00:27:56FromDiscord<SandwichBop> I was misread, sorry lol
00:28:12FromDiscord<Elegantbeef> My main focus with Nim is gamedev, it's a fantastic language for it imo
00:28:42FromDiscord<SandwichBop> I think so too, but I was a bit discouraged when I saw that the Unreal Engine Nim Wrappers weren't being maintained
00:28:56FromDiscord<SandwichBop> I love how Nim can compile to C/C++, would be perfect for working with most if not all game engines
00:29:02FromDiscord<SandwichBop> (edit) "I love how Nim can compile to C/C++, would be perfect for working with most if not all ... game" added "major"
00:29:31FromDiscord<Elegantbeef> Yea, rolling your own is also a viable path
00:30:58FromDiscord<impbox [ftsf]> things don't tend to get maintained if they don't get used, so use and maintain them if you like. i maintain nico because i use it for my own games. otherwise maintaining a library that you're not using isn't much fun
00:31:07FromDiscord<impbox [ftsf]> but yeah, nim is great for gamedev
00:31:25FromDiscord<impbox [ftsf]> though takes some getting used to if you're from a more OOPy world
00:32:31FromDiscord<RattleyCooper> In reply to @SandwichBop "silly question, for fun": I've been thinking about trying to make something like google's python fire but am holding off until I'm a bit better with nim and know the stdlib better
00:32:33FromDiscord<SandwichBop> In reply to @impbox "things don't tend to": O I didn't really think about that, that's a great idea
00:32:41FromDiscord<SandwichBop> maybe I should maintain the Unreal engine wrappers myself for Nim
00:33:07FromDiscord<SandwichBop> but I don't think I understand how wrappers are supposed to be maintained, anyone know of reading material? maybe some book for such a task lol
00:33:13FromDiscord<SandwichBop> (edit) "understand" => ""understand:"
00:33:16FromDiscord<SandwichBop> (edit) ""understand:" => ""understand""
00:33:18FromDiscord<RattleyCooper> make nim-fire so I don't have to 😛
00:33:36FromDiscord<SandwichBop> In reply to @RattleyCooper "I've been thinking about": same i don't know the nim or stdlib enough to tackle the bigger projects
00:33:41FromDiscord<SandwichBop> but no reason not try lol
00:33:44FromDiscord<impbox [ftsf]> but i'd recommend making games instead of libraries/wrappers
00:33:44FromDiscord<SandwichBop> (edit) "lol" => "lol, lots to learn"
00:33:57FromDiscord<impbox [ftsf]> make a game and you get the library for free when you're done
00:34:04FromDiscord<SandwichBop> smart 🧠
00:34:17FromDiscord<SandwichBop> guess I'll play around with SDL2, seems to play well with nim
00:34:35FromDiscord<impbox [ftsf]> yea, i recommend the sdl2_nim library over sdl2
00:34:58FromDiscord<impbox [ftsf]> there are two competing sdl2 wrappers for nim
00:35:07FromDiscord<Elegantbeef> impbox did you manage to take a look at the gpl/png issue i had?
00:35:14FromDiscord<impbox [ftsf]> not yet, it's on my list for today
00:35:22FromDiscord<impbox [ftsf]> after piano practice
00:35:58FromDiscord<SandwichBop> In reply to @impbox "yea, i recommend the": is this the one? o:↵https://github.com/Vladar4/sdl2_nim
00:36:01nrds<R2D299> itHub: 7"Wrapper of the SDL 2 library for the Nim language."
00:36:05FromDiscord<impbox [ftsf]> yup
00:36:11FromDiscord<SandwichBop> ayyy thank you, I'll try it out 🙏
00:36:20FromDiscord<SandwichBop> gonna try and make some N64 tier game
00:43:50FromDiscord<Elegantbeef> You could also use godot and it's bindings those are maintained 😀
00:45:13FromDiscord<SandwichBop> O I never knew, guess I'll get a 2 in 1, learn Nim and Godot lol
00:45:25FromDiscord<SandwichBop> wonder if the Godot devs will ever consider using Nim for their engine lol
00:45:38FromDiscord<Elegantbeef> Nope
00:45:43FromDiscord<SandwichBop> rip, how come?
00:45:43FromDiscord<Elegantbeef> Gdnim is probably the best way to use nim in godot
00:46:25FromDiscord<Elegantbeef> It's written in C++ and what's the benefit to using Nim built in for them, they already have a similar Gdscript
00:46:27FromDiscord<Elegantbeef> https://github.com/geekrelief/gdnim is what i was talking about
00:46:30nrds<R2D299> itHub: 7"godot-nim based bootstrapping framework supporting hot reloading"
00:47:30*jkl quit (Quit: Gone.)
00:48:15FromDiscord<SandwichBop> o looks neat, tho maybe a bit too experimental for me to try out without knowing better lol
00:48:52*jkl joined #nim
00:49:38FromDiscord<Elegantbeef> I'd say Nico is a good place to start, easy to use and setup
00:51:41FromDiscord<SandwichBop> will try it out, thanks Elegantbeef :nim1:
00:59:27*krux02 quit (Remote host closed the connection)
01:05:45FromDiscord<Elegantbeef> @impbox [ftsf]\: well i have a PR for the GPL parsing issue, this makes it more intelligent, capable of handing any seperator between the 3 colours
01:06:04FromDiscord<Elegantbeef> Did look at the colour and have 0 idea why it's failing
01:06:11FromDiscord<Elegantbeef> at the png\
01:06:26FromDiscord<Elegantbeef> Think it's cause it's' trying to parse it as a paletted image?
01:16:36*neurocyte6 joined #nim
01:16:36*neurocyte6 quit (Changing host)
01:16:36*neurocyte6 joined #nim
01:18:49*neurocyte quit (Ping timeout: 252 seconds)
01:18:49*neurocyte6 is now known as neurocyte
01:47:40FromDiscord<impbox [ftsf]> mm loadPaletteFromImage is broken if it's a paletted image
01:47:47FromDiscord<impbox [ftsf]> easy enough to fix
02:06:44FromDiscord<Elegantbeef> \anyone else have something for "This month with nim"
02:06:45FromDiscord<Elegantbeef> anyone else have something for "This month with nim"
02:10:17FromDiscord<Yardanico> Maybe goodboy galaxy? But you'll have to ask exelotl
02:10:29FromDiscord<Elegantbeef> Already got that
02:10:33FromDiscord<Yardanico> heh
02:11:12FromDiscord<Elegantbeef> Seems it's a dead landscape of nothing cool 😀
02:21:08FromDiscord<retkid> In reply to @SandwichBop "I love how Nim": problem is you gotta shadow the libraries
02:21:19FromDiscord<retkid> or figure out some way to accsess them
02:21:21FromDiscord<retkid> (edit) "accsess" => "access"
02:21:51FromDiscord<Elegantbeef> "shadow"?
02:21:56FromDiscord<Elegantbeef> You mean bind them
02:22:23FromDiscord<SandwichBop> what do u mean by shadow? like Unreal engine has their entire source on github so u can make a wrapper for it, hard part would be having someone actually maintaining it as it chages
02:22:25FromDiscord<SandwichBop> (edit) "chages" => "changes"
02:22:28FromDiscord<impbox [ftsf]> in the darkness bind them
02:22:33FromDiscord<SandwichBop> 👻
02:22:38FromDiscord<impbox [ftsf]> (edit) "in the darkness bind them ... " added "= shadow them"
02:22:54FromDiscord<impbox [ftsf]> sounds cooler
02:23:19FromDiscord<Elegantbeef> Impbox what happens in your sex dungeon is between you and the consenting adults
02:23:20FromDiscord<retkid> In reply to @Elegantbeef ""shadow"?": sorry brains on java mode
02:23:53FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/882450658068938812/unknown.png
02:24:20FromDiscord<retkid> this means that nim is getting interpreted when writing this?
02:24:24FromDiscord<retkid> (edit) "interpreted" => "interprupted"
02:24:27FromDiscord<retkid> (edit) "interprupted" => "interrupted"
02:26:15*auxym_ quit (Ping timeout: 244 seconds)
02:37:43madpropsis it possible to check echo output in an integration test?
02:37:45*flynn quit (Read error: Connection reset by peer)
02:38:52*flynn joined #nim
02:39:34madpropsI have a proc that prints something every x seconds
02:39:36madpropsnot sure I can test it
02:52:08*rockcavera quit (Remote host closed the connection)
02:56:03*rockcavera joined #nim
02:56:03*rockcavera quit (Changing host)
02:56:03*rockcavera joined #nim
03:21:44*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
03:22:05*Gustavo6046 joined #nim
03:27:00FromDiscord<impbox [ftsf]> @ElegantBeef palette loading should be fixed now, used a smaller change than your commit sorry
03:27:21FromDiscord<impbox [ftsf]> fixes both GPL and from image and adds tests for that palette you had issues with
03:28:01FromDiscord<Elegantbeef> Nice
03:30:38madpropswould be nice to have an echo alias. because echo is often used for debugging, so i try to remove those
03:30:51madpropsi mean afte debugging, i ctrl+f and remove the echo's
03:30:54madpropsbut some echos are legit
03:31:08madpropsi guess i could import some module with an alias
03:31:26FromDiscord<impbox [ftsf]> you can make a debugEcho template that is not compiled in unless compiled with -d:debug or something
03:31:30FromDiscord<Elegantbeef> You could just make a template that has a `when defined(debug)`
03:31:38FromDiscord<Elegantbeef> Damn you win this round
03:32:13madpropsi mean i dont'
03:32:17madpropsi don't want to leave the echos there
03:32:21madpropsi removed them after the tests
03:33:33FromDiscord<impbox [ftsf]> make a tmpEcho template
03:34:17FromDiscord<impbox [ftsf]> wonder if you can make a template that removes itself after a certain date somehow...
03:34:38madpropslike edit the file?
03:34:59madpropsor become disabled
03:37:18madpropsbut what i was trying to say
03:37:29madpropsit would be nice if apart from echo there was dbg or some simple alias built in
03:37:57madpropsbut probably redundant
03:38:03FromDiscord<Elegantbeef> clearly just do `echo(10)` for your debug ones and `echo 10` for your keepers 😛
03:38:36madpropsthat could work if i ctrl+f "echo(" yeah
03:43:08madpropsi should learn to use a debugger more though
03:43:15madpropsi think i rely too much on printing stuff
03:49:48FromDiscord<retkid> whats the name of "abc'[1 .. 2]
03:50:39FromDiscord<retkid> ^
03:50:47FromDiscord<retkid> (edit) "^" => ".^"
03:50:51FromDiscord<retkid> (edit) ".^" => "...................................................^"
03:50:53FromDiscord<retkid> that
03:51:10FromDiscord<retkid> (edit) "...................................................^" => ".........................................^"
03:51:20FromDiscord<retkid> (edit) ".........................................^" => "...........................................^"
03:51:25FromDiscord<retkid> (edit) "...........................................^" => ".............................................^"
03:52:55FromDiscord<Rika> slice?
03:53:15FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3xB5
03:54:24FromDiscord<retkid> the []
03:54:32FromDiscord<retkid> i wanna look at the docs
03:54:35FromDiscord<retkid> because i dont know the rules
03:54:45FromDiscord<retkid> but dunno what to loop up
03:59:14FromDiscord<Rika> the proc name is []
03:59:37FromDiscord<Rika> https://nim-lang.org/docs/system.html#%5B%5D%2Cstring%2CHSlice%5BT%2CU%5D
04:01:08FromDiscord<Rika> @retkid
04:04:15*rockcavera quit (Remote host closed the connection)
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:31*supakeen joined #nim
04:15:17*NeoCron joined #nim
04:28:09*NeoCron quit (Remote host closed the connection)
05:46:58FromDiscord<impbox [ftsf]> @Rika did the android thing work for you?
05:47:24FromDiscord<Rika> i had forgotten, because i programmed something else xd
05:47:27FromDiscord<Rika> ill try now
06:19:23*max22- joined #nim
06:49:14*watzon quit (Ping timeout: 244 seconds)
07:08:20arkanoidJust out of curiosity, how deep nested metaprogramming can go? I mean like call macro that generates and calls a template that generates and call another macro and so on
07:21:04FromDiscord<Elegantbeef> If you can write the code macros can generate it
07:21:22FromDiscord<impbox [ftsf]> maybe the compiler will run out of memory if you go too deep?
07:21:56FromDiscord<Elegantbeef> Probably
07:22:18FromDiscord<impbox [ftsf]> presumably an infinitely recursive macro won't work
07:38:00FromDiscord<gogolxdong (liuxiaodong)> Is there any recommended pointer arithmatic library?
07:39:51FromDiscord<Elegantbeef> https://github.com/kaushalmodi/ptr_math is only one i know of
07:39:54nrds<R2D299> itHub: 7"Pointer arithmetic in Nim"
07:41:00FromDiscord<xflywind> In reply to @gogolxdong (liuxiaodong) "Is there any recommended": copy timotheecour's solution and give him a upvote
07:41:01FromDiscord<xflywind> https://github.com/nim-lang/fusion/pull/21
07:42:53FromDiscord<xflywind> (edit) "a" => "an"
07:46:26FromDiscord<gogolxdong (liuxiaodong)> That would be great!
08:01:10*PMunch joined #nim
09:13:07madpropsis there a shortcut to echo two things separated by a whitespace?
09:14:17FromDiscord<Elegantbeef> `echo a, " ", b` is too much?
09:16:07FromDiscord<haxscramper> ``proc eecho(a: varargs[string, `$`]) = echo a.join(" ")``
09:17:29FromDiscord<xflywind> https://forum.nim-lang.org/t/7819
09:19:46FromDiscord<haxscramper> Were some posts deleted from this tread? I think there was some discussion yesterday as well
09:22:47FromDiscord<impbox [ftsf]> `echo &"{foo} {bar}"`
09:23:00FromDiscord<joshgoebel> are there any docs on inter-op of data structures between C and Nim... like if I'd like a Nim function to export a data-structure and I know the exact structure on the C side...?
09:24:03PMunchWell for interop with C you'd need to make sure that none of the types are garbage collected (or handled correctly), what you're left with is mostly types that map 1:1 to C
09:24:41PMunchBut you could use cint, clong, cfloat, cchar, etc. to ensure that they will be the same as int, long, float, char in C
09:24:55FromDiscord<joshgoebel> it's just const char, pointers, structs, arrays, simple stuff
09:25:28PMunchconst *char is a bit trickier. Nim doesn't seem to like const :P
09:25:43PMunchBut yeah, most of that stuff is straight forward
09:25:49FromDiscord<joshgoebel> https://github.com/joshgoebel/wren-console/blob/main/src/cli/binary_libs.h#L60 i'm wanting to know if I could write a registryGiverFunc all in Nim code and have it exported properly in a dynamic library?
09:26:19PMunchYou can always check out the generated C files in .cache/nim/ to see what the structures look like as well
09:27:13PMunchSure, that should be possible
09:27:37PMunchI work with a dynamic library written in Nim and loaded by a C program at work
09:28:13PMunchEven working on auto-wrapping .h files into Nim definitions right now, so that you can do it automatically
09:29:56FromDiscord<joshgoebel> yeah, I'm trying to see how easy it is to use Nim to build libraries for Wren
09:30:07FromDiscord<joshgoebel> (edit) "yeah, I'm trying to see how easy it is to use Nim to build libraries for Wren ... " added "(which has a C runtime)"
09:34:10PMunchShould be simple enough
09:34:16*neurocyte quit (Quit: The Lounge - https://thelounge.chat)
09:34:30PMunch@haxscramper, I've found some issues with the namegen module..
09:35:12PMunchThis name, when passed through newName, will produce the exact same name: __pthread_unwind_buf_t
09:35:21PMunchDespite not being a valid Nim identifier
09:37:54*neurocyte joined #nim
09:37:54*neurocyte quit (Changing host)
09:37:54*neurocyte joined #nim
09:40:57*krux02 joined #nim
09:41:06*flynn quit (Read error: Connection reset by peer)
09:42:13*flynn joined #nim
10:02:41madprops <Elegantbeef> `echo a, " ", b` is too much?
10:02:42madpropskinda
10:03:29FromDiscord<impbox [ftsf]> i do find it a bit of a pain having to do that
10:15:01FromDiscord<haxscramper> In reply to @PMunch "This name, when passed": I fixed it now, will push new version later today
10:15:48PMunch@haxscramper, did you also fix that this is going to replace the first character with a "_" in that case? https://github.com/haxscramper/hmisc/blob/master/src/hmisc/algo/namegen.nim#L42
10:16:08PMunchAnd could you push it to a different branch so I can test it out until then?
10:16:57FromDiscord<haxscramper> Okay, I will add more tests now and then push new version
10:21:54arkanoidhow to pass a NimNode as argument to a macro?
10:22:37FromDiscord<rb3.nim> sent a code paste, see https://play.nim-lang.org/#ix=3xCx
10:22:45arkanoidif I pass a nnkProcDef as argument to a macro it becomes a nnkSym
10:24:12arkanoidand static[NimNode] wont work even if the macro is called from a static: block
10:25:17FromDiscord<haxscramper> Macro accepts either `typed` or `untyped`
10:25:21FromDiscord<haxscramper> AST
10:25:31FromDiscord<Rika> Use a proc if you are passing a node I believe
10:25:36FromDiscord<Rika> Instead of a macro
10:25:44FromDiscord<haxscramper> If you need to pass proc decl you can do it like `myMacro(procName)`, but it will still be a `nkSym`
10:26:01FromDiscord<haxscramper> Because you are passing AST with proc name that gets converted to a symbol
10:26:21FromDiscord<tandy> is there a way to convert unixtime to a datetime?
10:26:38FromDiscord<tandy> ` fromUnix` just creates a `time` object
10:26:42FromDiscord<tandy> which cant be formatted in a nice way
10:30:16FromDiscord<haxscramper> In reply to @haxscramper "Okay, I will add": Done
10:30:27FromDiscord<tandy> oh you can format `time`objects with a format string
10:31:53FromDiscord<Rika> https://nim-lang.org/docs/times.html#inZone%2CTime%2CTimezone
10:47:38FromDiscord<kaushalmodi> sent a long message, see http://ix.io/3xCG
10:52:35FromDiscord<Rika> Can you change the stream into a string?
10:55:28FromDiscord<kaushalmodi> In reply to @Rika "Can you change the": I think I tried doing that but it didn't work. I'll try sending `$streamvar` in some time once I get back to the PC. ↵↵Also thinking, would it be possible to send/recv protobuf in binary format without converting it in and out of string? Because I can imagine that that conversion would be very inefficient.
10:55:50FromDiscord<Rika> Strings in Nim are not necessarily text
10:55:57FromDiscord<Rika> They can be binary data
10:56:17FromDiscord<Rika> I don’t think the module has stream support so no you need to make it a string
10:56:27FromDiscord<Rika> Conversion would be inefficient indeed
10:57:25arkanoidI'm trying to build a proc in a "quote do" block like "proc `newName`*(arg1: ptr T1; `inputIdent`) = ...", but it doesn't like `inputIdent` even if it is an IdentDefs node extracted from another proc
10:59:02arkanoiderror is: Error: identifier expected, but found 'tasGetServiceCapabilities: ptr TtasGetServiceCapabilities'
10:59:13arkanoidthat's exactly what inputIdent is
10:59:19FromDiscord<haxscramper> arkanoid `dumpTree` on the generated code
10:59:27FromDiscord<kaushalmodi> In reply to @Rika "I don’t think the": Thanks! I'll get back once I try it out.
10:59:34FromDiscord<haxscramper> And compare it with what you would write manually
10:59:49FromDiscord<haxscramper> I need `treeDiffRepr` for `hnimast` ...
11:00:52arkanoidthanks. I already have to grok all the tooling required for more-than-trivial macros
11:01:03arkanoids/already/still
11:04:27arkanoidoh, it drops an IdentDefs into an IdentDefs
11:04:40*Vladar joined #nim
11:06:05arkanoidthis is surprising, how can I overcome this
11:07:12arkanoidbasically it assumes that the argument is an IdentDefs and if I pass an IdentDefs it results in an IdentDefs into an IdentDefs
11:08:37FromDiscord<haxscramper> With regular quote do this can't be done, you need to construct tree manually
11:09:55arkanoid:(
11:10:40FromDiscord<haxscramper> You can just construct a tree and assugn `resut.params[0] = ???`
11:11:37arkanoidyes, I was on that path yesterday, then I though "let's rewrite in quote do style!"
11:12:38PMunch@haxscramper, __kernel_time_t still gets returned like that..
11:12:49FromDiscord<haxscramper> dfasd
11:13:16PMunchYou set result = str on line 69
11:13:26PMunchSo simply just setting it to the input string
11:14:34FromDiscord<haxscramper> you need to use `fixIdentName`, not `newName`
11:15:28FromDiscord<haxscramper> see tests for example
11:16:48FromDiscord<haxscramper> I'm not sure what I was doing with this API exactly
11:16:51PMunchAha..
11:19:05FromDiscord<haxscramper> Ideally `fixIdentName` should be a single entry point that implements different name resolution schemes, but it somehow never got merged into one. `fixIdentName` adds prefix until new ident is consired "actually new", and `newName()` appends number
11:22:26PMunchHmm yeah
11:22:50PMunchIs there no way to get all the declared names in Nim?
11:23:13*auxym_ joined #nim
11:23:50FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3xCM
11:23:54PMunchSince I want to be able to call this from a macro it would be nice to have it not try to overwrite existing identifiers
11:24:41PMunchI know I can call "declared", but that is at compile-time, and I need to run this as an external program since it uses libclang
11:25:28PMunchIt would be nice to write out all the declared identifiers, then staticExec an external helper program which gets fed the declared identifiers and spits out a file that is then included in the Nim program
11:25:31FromDiscord<haxscramper> You can try to get access to the IdentCache of the compiler if you write external tool
11:25:58FromDiscord<haxscramper> Or ModuleGraph might have something as well
11:27:25PMunchHmm, but that means reparsing the entire thing..
11:28:12PMunchI guess I could wrap all my definitions in a `when not declared(X)` kind of thing
11:28:30PMunchBut that means I need to break up my type block and therefore handle circular types myself..
11:29:11FromDiscord<haxscramper> yep, that's how I do it
11:29:36FromDiscord<haxscramper> parse everything, build explicit graph, infer cycles, merge them to clusters, write separate files, import them
11:29:44FromDiscord<haxscramper> `hmisc/hgraph`
11:29:53PMunchThat sounds painful..
11:29:59FromDiscord<haxscramper> `hmisc/other/hgraph`. Probably slow as ass, but right now I'm concerned with API
11:31:01FromDiscord<haxscramper> https://github.com/haxscramper/hcparse/blob/master/src/hcparse/hc_parsefront.nim#L564
11:33:22*auxym_ quit (Ping timeout: 245 seconds)
11:38:25*luis_ joined #nim
11:48:23PMunchI guess I could also have my helper tool export a file of formatted "suggestions" that could then be read in by the macro and parsed with declared to spit out the actual code
11:48:51PMunchNot as pretty as spitting out a file to be included, but it should work..
11:53:28FromDiscord<demotomohiro> !eval echo typeof(Natural(1));echo typeof(Natural(1) + Natural(2))
11:53:31NimBotNatural↵int
11:53:50FromDiscord<demotomohiro> It should be Natural, isn't it?
11:58:51FromDiscord<xflywind> The signature of matched procs
11:58:52FromDiscord<xflywind> proc `+`(x, y: int): int {.magic: "AddI", noSideEffect.}
11:59:42FromDiscord<xflywind> There is no specific `+` proc for Natural types.
11:59:58*max22- quit (Ping timeout: 256 seconds)
12:00:11FromDiscord<demotomohiro> So, Natural(1) + Natural(2) calls that proc and return type is int.
12:00:26FromDiscord<xflywind> yeah
12:03:14PMunchHmm, this is a bit annoying. It's doing such a good job of wrapping things that it goes all the way down to grabbing the definitions of uint8_t for example. But these are already wrapped in Nim so it would be annoying if my wrapping created a new type for it
12:03:52FromDiscord<enthus1ast> hey @xflywind i'm again fighting with prologue on windows, i suspect the staticFile caching is not working correctly
12:05:10*luis_ quit (Ping timeout: 240 seconds)
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:31*supakeen joined #nim
12:08:26FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3xD1
12:11:41FromDiscord<haxscramper> That is expected. Natural is a positive range, and with overflowCheck enabled it raises
12:11:48FromDiscord<xflywind> In reply to @enthus1ast "hey <@658563905425244160> i'm again": hi, what's wrong with it?
12:12:30FromDiscord<xflywind> maybe you can open an issue
12:13:05FromDiscord<enthus1ast> site does not load (sometimes), sometimes images are not delivered, i'll play with it (have removed etag stuff already) and currently i'm building devel to try it on devel
12:13:14FromDiscord<enthus1ast> i'm not sure what the issue is
12:13:27FromDiscord<xflywind> thanks
12:16:12FromDiscord<demotomohiro> In reply to @haxscramper "That is expected. Natural": But I'm not expecting `a = Natural(1) + Natural(2)` become `int` type instead of `Natural`.
12:16:40FromDiscord<haxscramper> Buy you have explicit : Natural
12:16:50FromDiscord<haxscramper> (edit) "Buy" => "But"
12:17:38FromDiscord<kaushalmodi> @Rika Yep, `$` is not defined for streams. Also, I am wondering if the effort to define a `$` is worth it.. because then on the receiving side I would need to do string -> stream -> protobuf conversion, and I am not sure how the conversion from string to stream will work
12:18:51FromDiscord<demotomohiro> !eval let a = Natural(1); let b = Natural(1) + Natural(2); echo typeof(a), ", ", typeof(b)
12:18:53NimBotNatural, int
12:19:33FromDiscord<demotomohiro> I think both `a` and `b` should become Natural.
12:21:25FromDiscord<haxscramper> Write an overload
12:21:43FromDiscord<haxscramper> Locally defined overloads have precedence over imported
12:22:24FromDiscord<joshgoebel> is there same way to get nimgen to pull from main vs master?
12:22:29FromDiscord<joshgoebel> (edit) "same" => "some"
12:26:15FromDiscord<demotomohiro> In reply to @haxscramper "Locally defined overloads have": Yes, overloading `+`, `-`, ``, `div` for Natural can fix it.↵But I think these overloaded should be exists in stdlib.
12:27:21FromDiscord<haxscramper> - for natural makes no sense
12:27:35FromDiscord<haxscramper> 4 - 2 is not a natural, it is an int
12:28:54PMunchHmm, the more I think about it I think having an intermediary file format with symbols and their information is a good idea
12:31:01PMunchBasically something that has the file it was declared in, the nimified name, the kind, and the declaration information. Then the macro will read in this file and grab all the symbols it is interested in, fix their names, and generate the Nim code to define them
12:33:25FromDiscord<haxscramper> Yes, I've came to the same conclusion
12:33:46FromDiscord<haxscramper> `hcparse/hc_types.Save<Object/Enum/Alias/Proc>`
12:34:24FromDiscord<haxscramper> Also allows having multiple frontends for C source parsing, from libclang to literally manual annotations
12:35:17PMunchThat is true
12:35:53PMunchNow the question becomes, what is the easiest kind of format to parse on Nim compile-time
12:36:13FromDiscord<haxscramper> json
12:36:17FromDiscord<haxscramper> jsony works at compile-time
12:39:08*arkurious joined #nim
12:41:10PMunchThe built-in json module also works on compile-time
12:41:34PMunchBut I don't really need anything as "fancy" as Json..
12:41:38FromDiscord<kaushalmodi> sent a code paste, see https://play.nim-lang.org/#ix=3xD8
12:41:41PMunchEh, it's easy
12:42:19FromDiscord<kaushalmodi> sent a code paste, see https://play.nim-lang.org/#ix=3xD9
12:42:25FromDiscord<haxscramper> How json is "fancy"? it is just `ir.toJson()` or `fromJson(IR)`
12:43:07PMunch@kaushalmodi, it looks like your recvInto is overflowing
12:43:17PMunchWhat is ExampleMessage
12:43:50PMunch@haxscramper, it's fancy as in creates a whole tree structure and supports a bunch of stuff I don't really need
12:44:01PMunchI could just use a binary format
12:44:09FromDiscord<kaushalmodi> sent a code paste, see https://play.nim-lang.org/#ix=3xDa
12:44:11FromDiscord<kaushalmodi> I got that number of 19 from `msg.len`
12:44:29FromDiscord<kaushalmodi> I learned that the `len` proc is not exported so for now I have hard-coded that value 19 in the server
12:44:42FromDiscord<enthus1ast> @xflywind\: the issue is asyncfile
12:44:58FromDiscord<enthus1ast> i've patched it to normal (sync) file io and it works
12:45:52PMunchmsg.len from your example returns 15
12:46:12PMunchBasically msg.len is the size in bytes required to store the message in the protobuf format
12:46:33PMunchThat means that the variable length ints and strings will make the message larger or smaller
12:46:59FromDiscord<xflywind> In reply to @enthus1ast "i've patched it to": cool, maybe I should remove `asyncfile`. is there something wrong in `asyncfile` or I misuse it?
12:47:33FromDiscord<kaushalmodi> PMunch: Thanks! I try the value of 15.. but the msg is unmodified so not sure how that changed.↵↵Also, is there a way to export the protobuf `len`? I found `exportMessage` macro, but cannot figure out how to export the `len` proc
12:47:52PMunchhttps://play.nim-lang.org/#ix=3xDd
12:48:05FromDiscord<kaushalmodi> crashes with value of 15 as well
12:48:26PMunchMy point is that you shouldn't use a hard-coded message length
12:48:35PMunchBecause it will vary depending on the content of your data
12:48:53FromDiscord<kaushalmodi> yes, I agree with that. For now, the data is constant, not a variable
12:49:18FromDiscord<kaushalmodi> Once I get the constant data going through asyncnet, I need to learn how to get msg.len work on server side
12:49:56PMunchTry using the readExampleMessage procedure instead
12:49:58PMunchThat should help
12:51:36FromDiscord<kaushalmodi> That would require to first convert the protobuf to stream. I am trying to send a protobuf var across sockets
12:53:06PMunchOr you could read it out from the bodyStream of the response
12:54:11PMunchHmm, I guess that would only work for non-async though.. Because I don't think protobuf creates readExampleMessageAsync..
12:54:54*max22- joined #nim
12:55:27FromDiscord<kaushalmodi> here's my minimal example: It's expanded over the ChapApp example from dom's book: https://gist.github.com/kaushalmodi/e75bd98468e75b6efdd7e2268bc68596
12:56:52PMunchYou can't read the ExampleMessage like that by the way
12:57:01PMunchYou need to use the stream reader/writer interface
12:57:23PMunchThe ExampleMessage type is just a normal Nim type
12:57:53FromDiscord<kaushalmodi> oops, sorry, first time fiddling with protobuf
12:58:28FromDiscord<kaushalmodi> I got the part about using write and readExampleMessage to convert between stream and ExampleMessage. But the roadblock is on how to send that stream through socket
12:58:36PMunchBasically the way it works is that it parses the protobuf spec you give it and generate a regular Nim type describing the same object and reader/writer procedures that can create and read this type
12:59:16PMunchThat is the tricky part, if you use a non-async socket it's trivial, simply grab the socket from the request/response and use that
12:59:30FromDiscord<Rika> How do I get started with GPU programming with Nim
12:59:43FromDiscord<Rika> Or in general
12:59:57PMunchBut async sockets have a FutureStream instead, which the current protobuf implementation doesn't generate reader/writers for
13:00:29PMunchThis means that to use an async socket you probably need to first write it into a string stream, then write that string stream into the socket stream
13:00:49FromDiscord<kaushalmodi> PMunch: I will need to use async.. I am working on a proof of concept that hooks up SystemVerilog with a C++ model of the hardware via sockets
13:01:04FromDiscord<Rika> In reply to @Rika "How do I get": Actually never mind, I don’t think what I plan to do can apply
13:02:06FromDiscord<kaushalmodi> PMunch:↵↵> first write it into a string stream↵That's what `stream.write msg` will do, right? So, "socket stream" is the next unknown for me
13:02:51PMunch`stream.writeExampleMessage(myMessage)` should do that I believe
13:02:56PMunchIf I remember correctly
13:03:14FromDiscord<kaushalmodi> you have a `write` proc for all protobuf message types
13:03:16PMunchYou can find info about the socket stream in the httpclient documentation
13:03:23PMunchAh right
13:03:25PMunchThat makes sense
13:03:51FromDiscord<enthus1ast> @xflywind\: i really do not know, maybe the issue is now shadowed because it blocks on file read.
13:04:06FromDiscord<enthus1ast> do you usually test on windows?
13:04:30FromDiscord<xflywind> I mainly use windows
13:04:33FromDiscord<xflywind> https://github.com/dom96/jester/blob/a03b5be0b72f1a686b6ca594c145cee665e6db7b/jester.nim#L187
13:04:53FromDiscord<xflywind> jester uses blocking file read too
13:05:56FromDiscord<enthus1ast> mh ok, i can imagine that while developing it does not really matter, later when it runs in production nginx/apache should serve static files.
13:06:30FromDiscord<xflywind> yeah
13:06:54FromDiscord<xflywind> nginx should be used to serve static files
13:07:26FromDiscord<enthus1ast> should i open a pr? or do you wan't to do it yourself?
13:07:39FromDiscord<enthus1ast> i will push to my branch, though
13:07:50FromDiscord<xflywind> PR is welcome,
13:08:27FromDiscord<xflywind> after you know the problem better than me
13:08:32FromDiscord<xflywind> (edit) "after ... you" added "all"
13:08:39FromDiscord<enthus1ast> at least it bites me \:)
13:09:49FromDiscord<enthus1ast> but it would be nice to know if asyncfile is bugged, but my understanding of how async works is very minimal to be honest
13:11:08FromDiscord<enthus1ast> jester also uses asyncFile https://github.com/dom96/jester/blob/a03b5be0b72f1a686b6ca594c145cee665e6db7b/jester.nim#L208
13:12:34FromDiscord<xflywind> your file is small than 20 MB, right?
13:12:42FromDiscord<enthus1ast> yes
13:13:27FromDiscord<xflywind> I see
13:15:24*flynn quit (Read error: Connection reset by peer)
13:15:54*rockcavera joined #nim
13:15:54*rockcavera quit (Changing host)
13:15:54*rockcavera joined #nim
13:16:31*flynn joined #nim
13:16:48arkanoidwhat does "Error: expression has no address" means?
13:17:16FromDiscord<Rika> Exactly as it says. You can’t get the address of the expression
13:17:24FromDiscord<Rika> Usually because it’s a literal or a constant
13:17:32FromDiscord<Rika> Or a return value
13:19:18*max22- quit (Ping timeout: 256 seconds)
13:20:24FromDiscord<joshgoebel> is there a way to install nimble packages locally such as to do development on this while using them, etc?
13:20:35FromDiscord<enthus1ast> yes
13:20:38FromDiscord<enthus1ast> nimble develop
13:21:59FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3xDw
13:34:40*federico3 quit (Ping timeout: 252 seconds)
13:39:05arkanoidRika, thanks!
13:39:21FromDiscord<Rika> Did you solve it? Nice
13:39:22arkanoid"quote do" is the best invention ever after cold beer
13:39:28FromDiscord<Rika> Lol
13:42:02FromDiscord<gogolxdong (liuxiaodong)> I didn't find any example of initialization of generic object sequence
13:42:14*max22- joined #nim
13:45:11FromDiscord<gogolxdong (liuxiaodong)> sent a code paste, see https://play.nim-lang.org/#ix=3xDI
13:52:53FromDiscord<MrOkram> Hi, when i try to install Nim on a newly installed Ubuntu 18.04 using Choosenim i get Segmentation fault during the install. Any clues as to why ? https://media.discordapp.net/attachments/371759389889003532/882624048746598480/unknown.png
13:56:04FromDiscord<MrOkram> Here's the output of the debug version: https://media.discordapp.net/attachments/371759389889003532/882624850521374820/unknown.png
14:00:39*PMunch quit (Quit: Leaving)
14:17:13*rockcavera quit (Remote host closed the connection)
14:21:34FromDiscord<gogolxdong (liuxiaodong)> Does cps support generics?
14:28:12NimEventerNew thread by Enthus1ast: Concepts, undeclared field., see https://forum.nim-lang.org/t/8386
14:48:14NimEventerNew thread by Miran: This Month with Nim: August 2021, see https://forum.nim-lang.org/t/8387
15:15:03FromDiscord<marceneiro> sent a code paste, see https://play.nim-lang.org/#ix=3xEr
15:17:25FromDiscord<haxscramper> Use `startProcess` instead of an `execProcess`
15:18:08FromDiscord<leorize> not at the moment
15:26:06FromDiscord<marceneiro> In reply to @haxscramper "Use `startProcess` instead of": Thanks, that worked
15:45:54*beshr quit (Read error: Connection reset by peer)
15:52:45*beshr joined #nim
16:22:07arkanoidI really need to pass an argument of type NimNode to a macro, is it really impossible? It would require a bad pattern otherwise
16:22:51arkanoidI need this as I'm reading a nim file via parseStmt, then I'm filtering some ProcDefs and I need to pass them macro to generate a wrapper
16:23:21arkanoidthe only solution I've found so far is to put the parsing loop inside the macro
16:24:02arkanoidan alternative solution would require to get all existing procs inside a module at compile time
16:25:55FromDiscord<haxscramper> Best approach would be to just put all logic inside of a macro, including `parseStmt` etc.
16:26:18FromDiscord<haxscramper> Why do you want to split `parseStmt` from macro in the first place?
16:29:05arkanoidas each piece of wrapping logic runs on single ProcDefs independently, I wanted to loop over then and apply a proc or something like that
16:29:38arkanoidbut I'm doing "quote do" inside the wrapping logic so I need it to be template or macro
16:29:49arkanoidit works inside a singlie big indented macro too
16:38:08FromDiscord<haxscramper> Honestly, I don't quite understand your setup to begin with. If the code size is a problem, you can split macro logic in procs that accept and return `NimNode`
16:38:47FromDiscord<haxscramper> "macro accepting NimNode" usually means that you are trying to make a macro that calls other macro that does part of the job for it
16:39:24FromDiscord<haxscramper> At least most of the time that's the XY problem for managing large macro implementation
16:41:15FromDiscord<dom96> In reply to @MrOkram "Here's the output of": Very weird. Please report on GitHub
16:48:10arkanoidyeah, my only aim is to split large macro loop into smaller unit of logic
16:49:16FromDiscord<haxscramper> Then you should do `proc logicPart(node: NimNode): NimNode`
16:49:42FromDiscord<haxscramper> If you want to look how \~2.5k SLOC macro is implemented you can check out pattern matching from fusion
16:56:16*flynn quit (Read error: Connection reset by peer)
16:57:24*flynn joined #nim
17:21:49*PMunch joined #nim
17:23:04FromDiscord<MrOkram> In reply to @dom96 "Very weird. Please report": I'll maybe do that tomorrow, as i think this time the VM itself could be at fault. Aka, it wasn't properly configured \:(
17:24:19FromDiscord<fae> Is there a particular strategy for using c2nim? I’ve successfully used it on smaller header files. But on larger files it just hangs. The most recent one in this example being chipmunk2d main header file. So I just started commenting stuff out until it compiled, but I’m not sure why that got it working.
17:24:50FromDiscord<fae> (edit) "compiled," => "transpiled,"
17:26:03FromDiscord<fae> Like since it’s just hanging instead of giving some parse error or something I’m not sure how to properly figure out what’s going on
17:31:33FromDiscord<exelotl> I've never had it hang before, that sounds rough :(
17:32:33FromDiscord<fae> I had to comment out these two blocks to get it working https://github.com/slembcke/Chipmunk2D/blob/master/include/chipmunk/chipmunk.h#L48-L58 https://github.com/slembcke/Chipmunk2D/blob/master/include/chipmunk/chipmunk.h#L177-L179
17:34:25FromDiscord<haxscramper> Particular strategy of using c2nim is to tweak input header until c2nim is satisfied
17:34:25FromDiscord<haxscramper> If it it literally hangs then I suppose it is a bug
17:35:00FromDiscord<fae> So it sounds like I wasn't too far off with just commenting stuff out to satisfy it
17:37:23FromDiscord<fae> This was another header file that just hangs when trying to transpile https://github.com/brackeen/glfm/blob/master/include/glfm.h
17:37:39FromDiscord<fae> Honestly thought I was doing something wrong since the first two semi-large header files I tried to transpile it hangs on
17:38:34FromDiscord<haxscramper> yes
17:38:35FromDiscord<haxscramper> Though this part itself does not hand c2nim for me
17:38:36FromDiscord<haxscramper> And full file errors out at `chipmunk.h(48, 25) Error: token expected: ;`
17:39:06FromDiscord<fae> thats strange, something about my environment perhaps?
17:40:09FromDiscord<haxscramper> Does it hang on clear, unmodified file?
17:40:19FromDiscord<haxscramper> For me it just fails
17:40:27FromDiscord<haxscramper> But does not hang in any way
17:40:43FromDiscord<haxscramper> Nim version 1.4.8
17:41:17FromDiscord<fae> https://media.discordapp.net/attachments/371759389889003532/882681530500145222/Screen_Shot_2021-09-01_at_10.40.23_AM.png
17:41:27FromDiscord<fae> first run is with that stuff commented out, second run is with it still in there
17:41:47FromDiscord<fae> i get a warning and it hangs, but then it says syntax error at the end of the line, which is what gave me the hint to comment that out in the first place
17:42:35arkanoidI'm experiencing a strange quote do behaviour. I have "quote do: myObj.subObj.`nameIdent`(myObj.endpoint, nil, `inputNameIdent`.unsafeAddr, result.unsafeAddr)" that is rendered as "myObj.subObj.funcName(endpoint, nil, arg1.unsafeAddr, result.unsafeAddr)". myObj before endpoint disappears
17:42:52FromDiscord<fae> this is also with 1.4.8
17:45:29*stkrdknmibalz joined #nim
17:46:02arkanoidtreeRepr turns it into a 'Sym "endpoint"' for no apparent reason
17:46:09FromDiscord<fae> `touch test.h && c2nim test.h` does not hang, it properly errors out
17:48:16arkanoidshould really be a DotExpr node kind afaik
18:01:38FromDiscord<fae> the hanging also causes memory usage to keep climbing, letting it run for a few sec left the process at like 10gb memory 😓
18:01:45arkanoidnevermind, found the culprit
18:03:48*rockcavera joined #nim
18:03:48*rockcavera quit (Changing host)
18:03:48*rockcavera joined #nim
18:09:32*idf quit (Remote host closed the connection)
18:12:32*max22- quit (Ping timeout: 245 seconds)
18:22:59*SebastianM joined #nim
18:30:15*SebastianM quit (Quit: Bye)
18:37:53*max22- joined #nim
18:40:42*PMunch quit (Remote host closed the connection)
19:28:11FromDiscord<deech> How I force compilation of all my library modules? So if I'm using `clang` I have modules, `A` and `B` and a program `C` that only uses `A` any codegen errors lurking in `B` don't get caught by `clang` .
19:28:40FromDiscord<deech> (edit) "How I force compilation of all my library modules? So if I'm using `clang` ... I" added "as the backend compiler and"
19:28:44*flynn quit (Ping timeout: 244 seconds)
19:30:16FromDiscord<deech> Specifically using `const` functions in a non-`const` way, `nim`'s doesn't catch it, neither does `g++` but `clang` does.
19:30:39*Vladar quit (Quit: Leaving)
19:30:44*flynn joined #nim
19:33:14FromDiscord<deech> I've imported all my library modules into a single otherwise empty module and tried compiling it with `--app:staticlib` in the hopes that it would codegen all of them and but that doesn't work.
19:41:48*PMunch joined #nim
19:49:17FromDiscord<AdawareDev> hi guys
19:49:40FromDiscord<AdawareDev> can someone help me pls https://media.discordapp.net/attachments/371759389889003532/882713837369958491/unknown.png
20:16:24FromDiscord<retkid> why is print called echo in nim
20:16:32PMunchWhy not?
20:16:34FromDiscord<retkid> when the only other language i've encountered that does that is bash
20:16:39PMunchSame as bash
20:16:57PMunchI mean it's not printing anything on a printer *shrugs*
20:17:00FromDiscord<retkid> but Nim is not really inspired by bash or related to it at all for that matter
20:17:22FromDiscord<retkid> most of its source languages have write and print
20:17:35FromDiscord<retkid> im not complaining, just curious
20:18:05PMunchI don't really know to be honest
20:18:32FromDiscord<retkid> (edit) "print" => "print, and put"
20:20:11PMunch@AdawareDev, you seem to have a messed up compiler..
20:23:00FromDiscord<retkid> yea so i checked every souce lang
20:23:03FromDiscord<retkid> (edit) "souce" => "source"
20:23:07FromDiscord<retkid> none use echo
20:23:16FromDiscord<retkid> maybe they just thought it looked cool
20:23:49FromDiscord<AdawareDev> In reply to @PMunch "<@849539131955740732>, you seem to": oh ok
20:24:05FromDiscord<AdawareDev> @AdawareDev, you seem to have a messed up compiler..
20:24:09FromDiscord<AdawareDev> (edit) "@AdawareDev, you seem to have a messed up compiler.." => "how could i fix it?"
20:25:45PMunchWhich compiler do you use?
20:26:43*flynn quit (Read error: Connection reset by peer)
20:27:51*flynn joined #nim
20:28:37FromDiscord<AdawareDev> gcc
20:29:02PMunchCould you do gcc -v?
20:29:08PMunchAnd how did you install it?
20:29:27*supakeen quit (Remote host closed the connection)
20:29:51*supakeen joined #nim
20:33:24FromDiscord<AdawareDev> choco
20:33:37FromDiscord<AdawareDev> https://media.discordapp.net/attachments/371759389889003532/882724900815667240/unknown.png
20:34:08FromDiscord<AdawareDev> I can only compile inside C:/Users/Adaware/
20:34:35PMunchThat sounds weird
20:34:40PMunchBut then again Windows..
20:35:23FromDiscord<brainproxy> why is there no `[]` proc for OrderedSet?
20:54:02*dmu quit (Quit: leaving)
21:11:43*PMunch quit (Quit: leaving)
21:30:33*max22- quit (Quit: Leaving)
21:40:50*Gustavo6046_ joined #nim
21:41:58*Gustavo6046 quit (Ping timeout: 252 seconds)
21:42:17FromDiscord<haxscramper> In reply to @retkid "why is print called": It was made this way so people could implement their own 'print' proc with spaces
21:43:16*Gustavo6046_ is now known as Gustavo6046
21:44:03*mjsir911 quit (Remote host closed the connection)
21:44:23*mjsir911 joined #nim
21:45:52FromDiscord<fae> I must be missing something subtle about generic constraints, because it's interesting that this works https://play.nim-lang.org/#ix=3xGe
21:46:16FromDiscord<fae> but this doesnt https://play.nim-lang.org/#ix=3xGf
21:50:22FromDiscord<Elegantbeef> `[T, S: enum]` is just like `a, b: int`
21:50:29FromDiscord<Elegantbeef> They have to be the same enum type
21:50:43*Gustavo6046 quit (Remote host closed the connection)
21:51:08*Gustavo6046 joined #nim
21:51:21FromDiscord<fae> ah okay, I thought it just meant any enum
21:51:48FromDiscord<Elegantbeef> Well it does mean any enum, but it only the resolved type applies to both on the left hand of `:`
21:52:17FromDiscord<fae> I figured that declaring two type parameters would imply that you have two different types
21:52:38FromDiscord<fae> Two different types that are both enums
21:52:44FromDiscord<fae> at least thats the way i was reading it
21:53:03FromDiscord<Yardanico> In reply to @fae "at least thats the": just read them the same as normal arguments
21:53:18FromDiscord<Elegantbeef> They're bounded to the same resolved type
21:53:21FromDiscord<Yardanico> "a, b: int" is not always the same as "a: int; b: int"
21:53:28FromDiscord<Yardanico> i mean not int specifically, but this notation of arguments
21:53:34FromDiscord<Elegantbeef> So it might be useless but it's how it works
21:53:45FromDiscord<Elegantbeef> Better example would've been `a, b: SomeInteger`
21:54:03FromDiscord<Yardanico> yas
21:54:22FromDiscord<Elegantbeef> This behaviour allows you to easily say multiple parameters are bound to the exact same typeclass, which is more useful 😀
21:54:52FromDiscord<fae> true, i suppose you are more often operating on same types with operators and such
21:54:55FromDiscord<fae> thanks for the explanation
22:21:18*Gustavo6046 quit (Ping timeout: 244 seconds)
22:21:38*Gustavo6046 joined #nim
22:46:42*watzon joined #nim
23:10:33*auxym_ joined #nim
23:10:36*asd quit (Ping timeout: 276 seconds)
23:21:45*asd joined #nim
23:38:17FromDiscord<retkid> In reply to @haxscramper "It was made this": It’s a learning tool?
23:38:38FromDiscord<Yardanico> In reply to @retkid "why is print called": why is echo called print in python?
23:38:42FromDiscord<Yardanico> pretty weird imo
23:39:13FromDiscord<retkid> Because Lisp used print
23:39:29FromDiscord<retkid> Most likely
23:39:51FromDiscord<Yardanico> no, not at all
23:40:17FromDiscord<retkid> Well, Lisp I’d a influential Lang with print
23:40:28FromDiscord<retkid> And I think Haskell uses prints
23:40:34FromDiscord<Yardanico> but what's the problem with `echo`?
23:40:39FromDiscord<retkid> None
23:40:44FromDiscord<retkid> I’m just curious
23:41:02FromDiscord<retkid> Why echo specifically when so few Lang’s use that
23:41:32FromDiscord<retkid> Why not puts, write, or print or Sdrout
23:41:45FromDiscord<Yardanico> stdout is an entirely different thing
23:41:52FromDiscord<Yardanico> it's a file descriptor, and Nim does have it
23:41:59FromDiscord<Yardanico> as well as `write` which is used to write to a file descriptor
23:42:47*watzon quit (Quit: WeeChat 3.2)
23:43:03FromDiscord<retkid> Dunno, I think Haxs was right
23:43:19FromDiscord<retkid> So you can make your own print for your purposes
23:43:37FromDiscord<Yardanico> just ask araq if you really want to
23:45:35FromDiscord<Yardanico> i don't think it's the "make your own print" at all
23:45:45*flynn quit (Read error: Connection reset by peer)
23:45:46FromDiscord<Yardanico> but that's just my guess, ask araq directly if you want to know the real answer :)
23:46:12FromDiscord<retkid> Feel like I’m gonna get “lol dunno just cuz” like any question you ask someone importantly
23:46:26FromDiscord<retkid> (edit) "importantly" => "important"
23:46:52*flynn joined #nim
23:59:00*watzon joined #nim
23:59:57*krux02 quit (Remote host closed the connection)