<< 16-05-2020 >>

00:00:05dadada:D
00:04:16PrestigeHm is there an idiomatic way to execute an iterator in reverse or should I just redefine the iterator?
00:05:11FromDiscord<Rika> you cannot execute an iterator in reverse without running through the whole iterator
00:05:44FromDiscord<Rika> defining a reversed version will be more efficient afiak
00:05:45FromDiscord<Rika> afaik
00:06:10FromDiscord<Generic> Nim iterators are only meant to go forward
00:06:11PrestigeCool, just wanted to make sure there wasn't some nim magic I was missing out on
00:17:14*konvertex quit (Ping timeout: 240 seconds)
00:26:11PrestigeHm I am not sure why I am getting this error, trying to pass an iterator to a proc: https://0x0.st/iLxw.png
00:26:25PrestigePerhaps there's an easier way to do this with a template though
00:28:35FromDiscord<Rika> its not a closure iterator
00:31:17PrestigeThanks @Rika
00:32:39*Trustable quit (Remote host closed the connection)
00:33:58*couven92 joined #nim
00:34:19*couven92 quit (Client Quit)
00:34:49*Hideki joined #nim
00:35:11*Hideki is now known as Guest82230
00:40:22*lritter quit (Ping timeout: 246 seconds)
00:41:12*lritter joined #nim
00:47:32*NimBot joined #nim
00:53:47zacharycarterwhat's the idiomatic way to do bitflags in Nim? A set and enum with a size of 2?
00:53:59disrupteksize of whatever.
00:54:07zacharycarterokay
00:54:18zacharycarterthanks
00:54:18disruptekdoes it go into c?
00:54:29zacharycartermaybe - that's why I was saying size of 2
00:54:48zacharycarterbut I guess if it doesn't the size is not relevant
00:54:50disruptekyeah, {.size: sizeof(int32).} or w/e.
00:54:55disruptekfor the enum.
00:54:56zacharycarteralright thanks
00:55:18disruptekthere's a bitops module but it's, y'know, not the idiomatic method you asked for.
00:55:28zacharycarteroh I'll check that out too
00:56:16disruptek`and` and `or` are & and | for integers, of course.
00:57:34zacharycarteryeah I figured that I'd just used distinct ints for this previously
00:57:52zacharycarterbut I'm writing a Nim library not a bunch of code interoping with C
00:57:55FromDiscord<Rika> it is best to use sets and enums
00:57:57zacharycarterso I figured I'd try to make it somewhat idiomatic
00:58:07zacharycarteralright cool
00:58:13disrupteksets and enums are just so nice to use.
00:58:14FromDiscord<Rika> you can convert a set into an int w/ proper bits set with cast
00:58:22FromDiscord<Rika> if you ever need the int
00:58:37zacharycartergotcha
00:59:28zacharycarterRika: so basically to be safe just set the size of the enum to int32 and assign the bits as the ordinal?
00:59:38zacharycarterthen I'm good in both situations?
01:00:14FromDiscord<Rika> ordinal?
01:00:22FromDiscord<Rika> me dumb, me no understand
01:00:25zacharycarterso like
01:02:29disruptekto be safe i wouldn't use cast, fwiw.
01:02:54zacharycarterhttps://play.nim-lang.org/#ix=2mbh
01:03:15zacharycartersomething like that?
01:03:23zacharycarterand use that with `set`
01:04:50*lritter quit (Ping timeout: 272 seconds)
01:05:45zacharycartermeh I don't think I'm going to be passing the bitset to C so I'll just worry about that when I need to
01:05:52*fredrikhr quit (Ping timeout: 256 seconds)
01:07:25disruptekare you passing the values to c?
01:07:51disruptekpoint being that enums w/o holes are preferable.
01:08:16disruptekso maybe just have a template or proc that shifts them if you need to pass them.
01:08:42disrupteksupport for enums with holes is less... comprehensive... in the compiler.
01:14:24zacharycartergotcha thanks
01:15:01zacharycarterI might be passing them to a proc that's loaded from a dynamic library compiled in Nim
01:15:08zacharycartererr that's written in Nim and compiled to C
01:15:15zacharycarterbut if that's the case I'll do what you described
01:15:24zacharycarterif it just is used in the host program I don't have to worry about it sounds like so cool
01:15:43disruptekyeah.
01:16:10zacharycartercool thanks guys
01:16:17disrupteki do a lot of SomeEnum.low .. SomeEnum.high and only discovered recently that it's broken for enums with holes.
01:16:25disruptekor, it was. it's fixed but only in devel iirc.
01:16:38disruptekas an example.
01:22:02FromDiscord<Synth> Hello, may I receive some help with compiling my nim file? I'm trying to compile by using `-d:ssl` but I keep getting: `command line(1, 2) Error: argument for command line option expected: '-d'` if anyone can help me, that would be awesome. Thank you!
01:26:24zacharycarterwhat is your compile command?
01:26:45zacharycarterSynth ^
01:27:02FromDiscord<Synth> It's: `nim c -d:ssl -r main.nim`
01:28:28zacharycarterwhat does `nim -v` output?
01:29:13FromDiscord<Synth> sent a code paste, see http://ix.io/2mbo
01:29:32*Guest82230 quit (Remote host closed the connection)
01:29:45zacharycarterdo you have the dll for ssl in the same directory as the nim exe?
01:29:58zacharycarterI don't know what it's named on windows
01:30:03FromDiscord<Synth> I don't think so...
01:30:08zacharycarterwell you need to
01:30:20*Hideki joined #nim
01:30:20FromDiscord<Synth> Where could I find that possibly?
01:30:31zacharycarterprobably on the Nim install page but let me look
01:30:39FromDiscord<Synth> Okay, thank you!
01:30:44*Hideki is now known as Guest58828
01:31:49FromDiscord<Synth> Well... I found this page... <https://nim-lang.org/docs/openssl.html>
01:33:20FromDiscord<Synth> I think I found the solution, one second...
01:33:45*zacharyc1rter joined #nim
01:33:50zacharyc1rterpower went out my bad
01:33:53zacharyc1rterdid that work for you Synth?
01:34:09FromDiscord<Synth> I'm testing it, one second haha
01:34:13FromDiscord<Synth> It's alright
01:34:27*chemist69 quit (Ping timeout: 260 seconds)
01:35:01*zacharycarter quit (Ping timeout: 265 seconds)
01:36:04*chemist69 joined #nim
01:38:17*zacharycarter joined #nim
01:38:34*zacharyc1rter quit (Ping timeout: 240 seconds)
01:39:33*Guest58828 quit (Remote host closed the connection)
01:41:51*Hideki joined #nim
01:42:15*Hideki is now known as Guest19606
01:42:40*zacharycarter quit (Ping timeout: 246 seconds)
01:43:52FromDiscord<Technisha Circuit> How do i make wheel for a Python made in Nim
01:44:14PrestigeIs there a way to create a new instance of a closure iterator? I am passing one as an argument to a proc and would like to use it twice within the same scope
01:44:51leorize[m]`=deepCopy`
01:46:13PrestigeNeat
01:51:29FromDiscord<Synth> Aww it didn't work
01:52:38PrestigeActually using a template worked
01:53:23FromDiscord<Rika> zacharycarter: very slr, but sets have a bit per item
01:53:27*zacharyc1rter joined #nim
01:53:31FromDiscord<Rika> so enums that go 1, 2, 3 are good enough
01:53:43zacharyc1rtercrazy thunderstorm in Austin
01:53:51FromDiscord<Rika> was discussing something, so slr
01:54:31PrestigeDoes this look sensible? https://0x0.st/iL3t.png On the right, invoking the template (line 361)
01:54:54PrestigeAs a way to reuse the iterator, I maen
01:54:56Prestigemean*
01:57:05FromDiscord<Rika> i think its fine
02:00:33FromDiscord<Synth> > did that work for you Synth?↵It didn't...
02:00:53FromDiscord<Rika> can you screenshot the command and the error
02:04:43*monok joined #nim
02:07:42*mono quit (Ping timeout: 260 seconds)
02:10:25*muffindrake quit (Ping timeout: 244 seconds)
02:10:53*muffindrake joined #nim
02:23:14*Guest19606 quit (Remote host closed the connection)
02:35:10FromDiscord<Technisha Circuit> @Synth
02:36:28FromDiscord<Technisha Circuit> Anyone able to help my buddy Synth?
02:37:24FromDiscord<codic> xd
02:38:35FromDiscord<Synth> Hahaha
02:39:41FromDiscord<Technisha Circuit> :P
02:40:17FromDiscord<Rika> > can you screenshot the command and the error↵@Synth
02:40:57FromDiscord<Synth> Yes, will do
02:42:44*nekits quit (Read error: Connection reset by peer)
02:43:14*nekits joined #nim
02:43:56FromDiscord<KingDarBoja> I love the synth wave profile pic
02:44:01FromDiscord<Synth> https://media.discordapp.net/attachments/371759389889003532/711046267169669120/unknown.png
02:44:04FromDiscord<Synth> Thank you!
02:44:09FromDiscord<Synth> Took me like 30min to make it haha
02:44:17FromDiscord<KingDarBoja> neat
02:47:29FromDiscord<codic> @Rika there
02:47:54FromDiscord<Rika> i am aware
02:48:47FromDiscord<codic> o
02:53:31FromDiscord<Rika> weird, if i use linux pwsh, its just fine https://media.discordapp.net/attachments/371759389889003532/711048656744087552/unknown.png
02:55:42FromDiscord<Synth> Yeah...
02:55:50*Hideki joined #nim
02:56:14*Hideki is now known as Guest50032
02:56:45FromDiscord<Rika> try updating powershell xd
02:57:58zacharyc1rtermaybe submit a bug
02:58:13zacharyc1rterit should just work right
02:59:29zacharyc1rteralthough often these types of issues are hard to reproduce
02:59:42zacharyc1rterit'd be better if someone else could reproduce it on a windows machine before filing a bug
02:59:58zacharyc1rterhow'd you install Nim? from source or with chosenim or did you download binaries?
03:06:36zacharyc1rterSynth ^
03:07:14*Guest50032 quit (Ping timeout: 258 seconds)
03:08:06FromDiscord<codic> oo yakuake (yakuake ftw)
03:08:13FromDiscord<Synth> I installed it with scoop
03:08:30FromDiscord<codic> Scoop, my good old friend
03:08:32FromDiscord<Synth> `scoop install nim`
03:08:39FromDiscord<codic> I used that so much when I was on windows haha
03:08:47FromDiscord<codic> Try using the binaries from the official pag
03:08:50FromDiscord<codic> (edit) 'pag' => 'page'
03:08:56FromDiscord<codic> Scoop sometimes changes stuff
03:10:39FromDiscord<Synth> Oh?
03:11:34FromDiscord<codic> yeah
03:11:51FromDiscord<codic> I remember that for me python native extensions didn't work haha
03:13:10FromDiscord<Synth> Hmm...
03:13:21FromDiscord<Synth> I’ll try installing Nim via executable then
03:13:26*zacharyc1rter quit (Ping timeout: 256 seconds)
03:13:47FromDiscord<codic> nice
03:14:01FromDiscord<codic> https://nim-lang.org/install_windows.html
03:14:01FromDiscord<Rika> > oo yakuake (yakuake ftw)↵@codic just like how i pronounce kakoune i pronounce yakuake like ya-ku-a-ke and not ya(quake)
03:14:17FromDiscord<codic> so do i
03:14:20FromDiscord<codic> xD
03:15:02FromGitter<zacharycarter> best way to install Nim is from source
03:15:39FromGitter<zacharycarter> I booted up my windows machine though just in case I need to verify any issues
03:16:21FromGitter<zacharycarter> Also because my power is out and my mac is about to die
03:18:28FromDiscord<codic> ~~linux time!~~
03:19:29Prestige^
03:20:00FromGitter<zacharycarter> no thanks
03:20:10FromGitter<zacharycarter> I meant it's about to run out of battery
03:20:32FromGitter<zacharycarter> not turn into a pumpkin
03:20:41FromDiscord<Rika> are you sure about that
03:20:51PrestigeSeems there's something incorrect here about my params (lines 383 and 389) https://0x0.st/iLYZ.png Anyone mind taking a look?
03:20:55FromGitter<zacharycarter> yeah, it's still more useful than a linux box
03:21:20PrestigeI think my lsp died or something, no errors reporting but it doesn't compile. "windowmanager.nim(389, 51) Error: internal error: expr: param not init client_17850177"
03:21:22FromGitter<zacharycarter> can't you post source code instead of an image?
03:22:08FromGitter<zacharycarter> why do you have a void return type?
03:22:12Prestige@zacharycarter like all of it? I think it's likely just a syntax issue, but there's a lot of code
03:22:15FromGitter<zacharycarter> just don't return anything...
03:22:29FromGitter<zacharycarter> or just a reproducible example
03:22:56Prestigeit was giving me an error earlier so I was adding that to get it to work
03:22:56FromGitter<zacharycarter> it's a template so it's hard to debug from a screenshot
03:23:08FromGitter<zacharycarter> well adding void isn't going to help, I'm sure of that
03:23:39FromGitter<zacharycarter> just copy and paste that code for me into nim playground and I'll try to get it to compile and subtstitue types
03:26:23FromGitter<zacharycarter> I mean just the code you posted
03:26:24FromGitter<zacharycarter> nothing else
03:26:30PrestigeYeah working on it
03:26:57FromGitter<zacharycarter> cool
03:31:19PrestigeOk I think this example is the same https://play.nim-lang.org/#ix=2mbD
03:31:24PrestigeGetting the same error at least
03:31:35Prestigeexpr: param not init client_3382078
03:32:36FromDiscord<Rika> ooh, thats an internal error
03:33:24PrestigeSo, not because of my code being incorrect?
03:34:19FromDiscord<Rika> internal errors are usually compiler bugs afaik
03:34:44PrestigeI thought it was odd that nimsuggest didn't complain
03:35:09PrestigeShould I report this example?
03:36:26FromDiscord<Rika> perhaps
03:41:18PrestigeOkay time to try a different approach
03:42:31FromGitter<zacharycarter> looking now
03:42:51PrestigeSo if I change the type of `action` in the template to `untyped` it works fine
03:43:40*Hideki joined #nim
03:44:02*Hideki is now known as Guest82605
03:44:20disruptekthe code is fine.
03:44:22disruptekuse a proc.
03:44:45PrestigeUsing a proc doesn't compile disruptek unless you mean something else?
03:45:06disruptekuse a proc for exec on client()
03:45:17disruptekor whatever your template was called.
03:45:31*dadada quit (Ping timeout: 265 seconds)
03:45:40FromGitter<zacharycarter> it dones compile
03:45:44FromGitter<zacharycarter> https://play.nim-lang.org/#ix=2mbF
03:46:27disruptektemplates are like c's macros in that they are designed to rubber-stamp ast into place.
03:46:46disruptekmuch more powerful, obviously, but still that level of crude behavior.
03:46:47Prestigeoh, interesting
03:47:07PrestigeI was using a template for a reason at first but was hard refactoring
03:47:08FromDiscord<Elegant Beef> More powerful than a stamp? 😄
03:47:09PrestigeThanks for the help
03:47:16disruptekif you want to compose arbitrary ast you use a nim macro.
03:47:32disruptekbut in general, use the simplest tool for the job.
03:47:42disruptekthis lets you go up in abstraction whenever necessary.
03:48:28disruptekmostly, you use templates to wrap code around arbitrary bodies, etc.
03:48:35FromDiscord<Technisha Circuit> ~~How hard would it be to implement a python interpreter in Nim?~~
03:48:49FromDiscord<Elegant Beef> You python addicts 😄
03:48:57FromGitter<zacharycarter> one way to find out
03:48:57FromDiscord<Technisha Circuit> Hahahaha
03:49:07FromDiscord<Technisha Circuit> Try it I'm assuming?
03:49:23FromGitter<zacharycarter> a better question would be - how hard would it be to implement a python interpreter
03:49:34FromGitter<zacharycarter> I don't think Nim is very relevant in that question
03:49:45*waleee-cl quit (Quit: Connection closed for inactivity)
03:49:46disruptekpointless.
03:49:56FromDiscord<Elegant Beef> Just wait for pmunch's nimscript implementation and problem solve
03:49:58FromDiscord<Elegant Beef> solved*
03:50:00FromGitter<zacharycarter> and the answer is probably - it depends on your programming expertise
03:50:02FromGitter<zacharycarter> but yeah
03:50:06FromGitter<zacharycarter> why do you even want to do this?
03:50:19FromDiscord<Elegant Beef> Like do you want a scripting language or do you just want to use python
03:50:26FromDiscord<Elegant Beef> Cause one of those two is very easy to solve
03:50:37disruptekthey are both easy to solve.
03:50:53disruptekthey are both easy to solve.^W^W^Wsolved.
03:50:58FromGitter<zacharycarter> if you want to use python just go use python
03:51:28FromGitter<zacharycarter> I think Nim being consumable from python makes sense - otherwise I don't get it
03:52:05FromDiscord<Elegant Beef> What do you mean by "consumable"
03:52:12FromDiscord<Rika> usable
03:52:26FromGitter<zacharycarter> like I should be able to write some Nim code and use it in my Python code
03:52:28disrupteki think maybe i cannot do compiler work on stream.
03:52:36disrupteki can't believe how stupid my code is.
03:52:49FromGitter<zacharycarter> I think russian mafia videos distract you too much
03:52:53FromGitter<zacharycarter> play doh silencers
03:54:06PrestigeStreaming and writing code is not fun
03:54:47*dadada joined #nim
03:55:00FromDiscord<Elegant Beef> Just lose all your self respect
03:55:05FromDiscord<Elegant Beef> Then you dont care about your code
03:55:08disruptekat least i can fix it, but jesus.
03:55:10*dadada is now known as Guest3362
03:55:33FromDiscord<Technisha Circuit> > Like do you want a scripting language or do you just want to use python↵What scripting languages for Nim are there then?
03:55:46FromDiscord<Technisha Circuit> And i was planning on a small implementation of Python
03:55:53FromDiscord<Technisha Circuit> Or just a transpiler
03:55:58Prestigenimscript
03:57:30FromDiscord<Rika> there's wren
03:57:35FromDiscord<Rika> there's lua
03:57:42FromDiscord<Rika> theres nimscript if you really want that
03:58:01FromDiscord<Technisha Circuit> Lua? For Nim?
03:58:26FromDiscord<Rika> yeah why? lua is really a scripting language aint it
03:58:30FromDiscord<Technisha Circuit> Nice
03:58:39FromDiscord<Technisha Circuit> I don't use Lua personally
04:01:07disruptek!repo lunacy
04:01:09disbothttps://github.com/disruptek/lunacy -- 9lunacy: 11 15 6⭐ 0🍴
04:01:46*silvernode joined #nim
04:02:04Prestigegreat repo name
04:03:23disruptekwell, IC now compiles code again.
04:04:58FromGitter<zacharycarter> niceeeee
04:05:16FromGitter<zacharycarter> Technisha Circuit - I'm still having trouble understanding what you want to do
04:05:30FromDiscord<Elegant Beef> Seems they want a scripting language
04:05:37FromGitter<zacharycarter> yeah but why
04:05:37FromDiscord<Elegant Beef> Im uncertain the application
04:05:49FromGitter<zacharycarter> what's the end goal
04:06:02*supakeen quit (Quit: WeeChat 1.9.1)
04:06:41*supakeen joined #nim
04:07:31FromDiscord<Technisha Circuit> I'd want to write a python-like DSL for Dimscord because i want something to do :P
04:07:49FromGitter<zacharycarter> what does python-like mean?
04:07:58FromGitter<zacharycarter> and if you want to write a DSL, just use Nim and macros?
04:09:05FromDiscord<Technisha Circuit> How do i use a macro? 😅
04:09:17FromDiscord<Elegant Beef> https://nim-lang.org/docs/macros.html
04:09:23FromDiscord<Technisha Circuit> Thanks
04:09:28FromDiscord<Elegant Beef> Dumptree is your friend
04:09:45FromDiscord<Technisha Circuit> Dumptree?
04:09:51FromGitter<zacharycarter> maybe look at - https://github.com/search?l=&o=desc&q=dsl+language%3ANim&s=stars&type=Repositories
04:10:04FromGitter<zacharycarter> if you want to see how some existing DSLs are implemented with Nim
04:10:06FromDiscord<Elegant Beef> it's a macro inside macros that let's you dump the AST of written nim code
04:10:18FromDiscord<Elegant Beef> So you can know what you have to replicate
04:10:21FromDiscord<Elegant Beef> Atleast that's how i use it
04:10:39FromGitter<zacharycarter> yeah before you embark on the journey of authoring a DSL with Nim, you probably want to get comfortable with Nim's metaprogramming capabilities
04:11:45FromDiscord<Elegant Beef> Macro's imo arent difficult, just super super annoying 😄
04:11:52*Guest82605 quit (Remote host closed the connection)
04:12:00FromDiscord<Technisha Circuit> Thanks :P
04:12:30FromGitter<zacharycarter> just be sure you need a macro before you write one :)
04:12:45FromDiscord<Technisha Circuit> Aaa Mobile chrome is annoying ;-;
04:13:00FromGitter<zacharycarter> but if you're authoring a DSL then you'll probably need to use them
04:13:06FromDiscord<Elegant Beef> > Aaah mobile is annoying↵FTFY
04:14:07FromDiscord<Technisha Circuit> Thanks
04:15:32FromDiscord<Technisha Circuit> > FTFY↵What meaning are you using? Because urban dictionary isnt the helping :PPPpPPpPPPp
04:15:43FromDiscord<Rika> fixed that for you
04:15:46FromDiscord<Elegant Beef> ^
04:16:01disruptekfuck, that feels yummy.
04:16:07FromDiscord<Technisha Circuit> Okay thanks :P
04:16:09FromDiscord<Technisha Circuit> What-
04:16:19FromGitter<zacharycarter> lol
04:16:21FromDiscord<Elegant Beef> "feels yummy" is a deeply disturbing phrase
04:16:27FromDiscord<Technisha Circuit> ^^
04:16:39FromDiscord<KingDarBoja> lol
04:17:14disruptekthat reminds me, i have some yummy pr0n waiting.
04:17:17disruptekpeace.
04:17:23FromGitter<zacharycarter> just imagine your sense of taste is swapped with your sense of touch
04:17:29FromGitter<zacharycarter> and it's not so weird anymore
04:17:46FromDiscord<Elegant Beef> Also is it a complete bodge to use a proc inside a macro for a specific signature?
04:17:49FromDiscord<KingDarBoja> disruptek: have a good wank :v
04:17:57FromGitter<zacharycarter> fapfapfapfapfap
04:18:23FromGitter<zacharycarter> do you mean call a proc in a macro
04:18:33FromDiscord<Elegant Beef> For my constructor macro i wanted to add default values so i made a proc entitled `required` and i use it's symbol for no value
04:18:38*Guest3362 quit (Ping timeout: 272 seconds)
04:18:39FromGitter<zacharycarter> if it's a compile time proc you can
04:18:56FromDiscord<Elegant Beef> Im not actually using the proc, just it's symbol
04:18:59FromDiscord<Elegant Beef> I know it's a bodge 😄
04:19:41FromDiscord<Elegant Beef> This is what im doing↵https://play.nim-lang.org/#ix=2mbG
04:19:57FromDiscord<Elegant Beef> It's clearly a bodge, just curious what's a smarter method
04:20:17FromGitter<zacharycarter> user defined pragma maybe?
04:20:41FromDiscord<Elegant Beef> Huh?
04:21:11FromGitter<zacharycarter> https://nim-lang.org/docs/manual.html#userminusdefined-pragmas-custom-annotations
04:21:29FromDiscord<Elegant Beef> Yea but how does that help?
04:21:48FromDiscord<Elegant Beef> Im literally just abusing the symbol putting the proc in there gives me
04:21:53*theelous3 quit (Read error: Connection reset by peer)
04:21:55FromGitter<zacharycarter> ```It is possible to define custom typed pragmas. Custom pragmas do not effect code generation directly, but their presence can be detected by macros. Custom pragmas are defined using templates annotated with pragma pragma:```
04:22:26FromGitter<zacharycarter> I guess maybe I'm not understanding what you're trying to do
04:22:35FromGitter<zacharycarter> you're trying to mark an argument as required?
04:22:46FromGitter<zacharycarter> oh on the invocation of your macro
04:22:49FromDiscord<Elegant Beef> Well my macro makes constructors
04:22:57FromGitter<zacharycarter> I got you now
04:23:01FromDiscord<Elegant Beef> Ah ok
04:23:21FromDiscord<Elegant Beef> Like there has to be something better than the abuse of that poor little symbol
04:23:22FromDiscord<Elegant Beef> 😄
04:23:56FromDiscord<Elegant Beef> I was thinking i could use ""
04:24:20FromDiscord<Technisha Circuit> Can i do `let a, b = "a", "b"`?
04:24:45*dadada__ joined #nim
04:24:59FromDiscord<Elegant Beef> the nim way is to indent and do a/b independantly i'd say
04:25:39FromDiscord<Elegant Beef> as such https://play.nim-lang.org/#ix=2mbH
04:26:25FromDiscord<Elegant Beef> But yea zach im basically just looking for something that doesnt look/feel bodgey in that `required` slot of the construct macro
04:27:16FromGitter<zacharycarter> yeah playing around with this now
04:31:53FromDiscord<flywind> !eval let (a, b) = ("a", "b")
04:31:56NimBot<no output>
04:32:16FromDiscord<Rika> you didnt echo them
04:34:04FromDiscord<flywind> no output means no error 🙂
04:34:22FromDiscord<Technisha Circuit> Okay, thanks
04:34:40FromDiscord<flywind> np
04:35:31FromDiscord<Rika> i mean technically this would work too
04:35:37FromDiscord<Rika> !eval let a, b = ("a", "b")
04:35:39NimBot<no output>
04:35:40FromDiscord<Rika> would it not
04:35:42FromDiscord<Rika> see
04:35:47FromDiscord<Rika> it works too, just not as expected
04:36:17FromDiscord<Technisha Circuit> So should i do them separately instea?
04:36:25FromDiscord<Technisha Circuit> > it works too, just not as expected↵Wdym?
04:36:36FromDiscord<Elegant Beef> Seperately is way more readable imo
04:37:26FromDiscord<Technisha Circuit> Okay
04:38:02FromDiscord<Rika> !eval let a, b = ("a", "b"); echo a; let (c, d) = ("a", "b"); echo c
04:38:05NimBot("a", "b")↵a
04:38:10FromDiscord<Rika> @Technisha Circuit
04:38:53FromDiscord<Technisha Circuit> Oh?
04:38:58FromDiscord<Technisha Circuit> That's weird
04:39:16FromDiscord<Technisha Circuit> Wait
04:39:17FromDiscord<Rika> one assigns the whole value, the other destructures the tuple
04:39:18FromDiscord<Technisha Circuit> Nvm
04:39:24kungtotteIt's not weird, what should be the output of let a, b = 1
04:39:27silvernodeI am trying to parse command line options but the docs don't give me enough examples and I was wondering if anyone knows of a web page that contains multiple working examples so I can get a better idea how to use the parseopt module.
04:39:28FromDiscord<Technisha Circuit> Ooh okay
04:40:06FromDiscord<Technisha Circuit> So the first way is assigning `("a", "b")` to a and b
04:40:15FromDiscord<Technisha Circuit> And the second way is as you said
04:43:31*rockcavera quit (Remote host closed the connection)
04:44:57*narimiran joined #nim
04:48:21*dadada__ quit (Ping timeout: 265 seconds)
04:48:49*dddddd quit (Ping timeout: 264 seconds)
04:54:47*dadada joined #nim
04:55:10*dadada is now known as Guest55851
04:55:36*silvernode quit (Ping timeout: 265 seconds)
04:55:38*Hideki joined #nim
04:56:02*Hideki is now known as Guest46532
04:58:07*Guest46532 quit (Remote host closed the connection)
05:01:24FromGitter<zacharycarter> ElegantBeef: sorry I got distracted, my dog is freaking out from this storm
05:01:32FromGitter<zacharycarter> can't you do something like - https://play.nim-lang.org/#ix=2mbJ
05:06:16FromDiscord<Elegant Beef> Uhh no at compile it complains undeclared identifier
05:06:20FromDiscord<Rika> you can ping with an @ on their name
05:06:50FromDiscord<Rika> beef, you shouldnt be getting that
05:07:02FromDiscord<Rika> can you supply the updated code or something
05:08:45FromDiscord<Elegant Beef> Well here is the entire macro code↵<https://github.com/beef331/constructor/blob/test/src/constructor.nim>
05:08:53FromDiscord<Elegant Beef> The hideous, hideous macro
05:10:11FromDiscord<Elegant Beef> Dropping the proc it does not compile
05:14:50FromDiscord<Elegant Beef> I might be blind but i dont see why mine behaves differently
05:17:54FromDiscord<Elegant Beef> Ok
05:17:57FromDiscord<Elegant Beef> so it's the expNode
05:18:03FromDiscord<Elegant Beef> I guess it was daft afterall to put it at the end
05:18:46*Guest55851 quit (Ping timeout: 260 seconds)
05:19:47FromDiscord<Elegant Beef> Or it's the `(string,untyped)`
05:24:46*dadada__ joined #nim
05:45:30*Hideki joined #nim
05:45:50*Hideki is now known as Guest41086
05:48:37*dadada__ quit (Ping timeout: 258 seconds)
05:54:52*dadada joined #nim
05:55:15*dadada is now known as Guest15817
06:08:54FromDiscord<Technisha Circuit> Does Dimscord have a discord server?
06:09:38FromDiscord<Elegant Beef> Im going to say certainly not
06:09:55FromDiscord<Elegant Beef> Fragmentation of a rather small community probably wouldnt be wise
06:11:42FromDiscord<Elegant Beef> Why do you even want that?
06:11:47FromDiscord<Technisha Circuit> Okay then :P
06:12:37FromDiscord<Technisha Circuit> I just like being able to ask for help on discord because ~~i am a noob~~ it's fast for asking questions and getting answers
06:13:37FromDiscord<Elegant Beef> Im not going to suggest bothering the developer but they're in this server 😄
06:16:11FromDiscord<Technisha Circuit> Hahaha
06:18:44*Guest15817 quit (Ping timeout: 256 seconds)
06:19:26FromDiscord<Rika> Dimscord does have a server as far as I know
06:19:35FromDiscord<Elegant Beef> Oh
06:19:54FromDiscord<Rika> Its not fun typing on an eink reader
06:20:29FromDiscord<Technisha Circuit> Oh?
06:21:00FromDiscord<Technisha Circuit> Is there an invite somewhere? I can't find it in the readme (but that's why i have glasses `:)`)
06:21:43FromDiscord<Rika> Its been posted somewhere in this discord
06:21:56FromDiscord<Technisha Circuit> Oh?
06:22:30FromDiscord<Yardanico> Yeah, I'm in that server, and let's move to offtopic
06:22:34FromDiscord<Yardanico> Good morning btw
06:23:31FromDiscord<Technisha Circuit> Found it
06:23:32FromDiscord<Technisha Circuit> Oki
06:24:41*dadada__ joined #nim
06:47:25*solitudesf joined #nim
06:48:48*dadada__ quit (Ping timeout: 258 seconds)
06:54:45*dadada joined #nim
06:55:08*dadada is now known as Guest73646
07:04:20FromDiscord<KingDarBoja> Good night
07:12:56FromDiscord<Rika> i need opinions on this idea https://github.com/de-odex/suru/commit/a112114b937dbf3fb4ccc775830499c66989fe33
07:18:42*Guest73646 quit (Ping timeout: 260 seconds)
07:24:44*dadada__ joined #nim
07:48:54*dadada__ quit (Ping timeout: 272 seconds)
07:51:19*Hideki_ joined #nim
07:51:19*Guest41086 quit (Read error: Connection reset by peer)
07:54:48*dadada joined #nim
07:55:11*dadada is now known as Guest47299
08:04:32*filcuc joined #nim
08:14:54*narimiran quit (Ping timeout: 256 seconds)
08:15:08planetis[m]using closures to substitute methods?
08:17:16*fredrikhr joined #nim
08:18:35*Guest47299 quit (Ping timeout: 260 seconds)
08:19:10*dadada__ joined #nim
08:22:43*opal quit (Ping timeout: 240 seconds)
08:23:27*opal joined #nim
08:23:32FromDiscord<Rika> yes
08:26:04*s4mu3lbk joined #nim
08:28:05planetis[m]its a common pattern in nim
08:31:08planetis[m]if you want to make it faster, you can copy the streams design
08:32:08*filcuc quit (Ping timeout: 265 seconds)
08:51:28FromDiscord<InventorMatt> if you are creating a distinct type and you want to create a $ proc for it how would you get the original type and add additional info to it.
08:52:19FromDiscord<InventorMatt> https://play.nim-lang.org/#ix=2mcj
08:52:31FromDiscord<InventorMatt> like how could I make this work?
08:53:51*letto joined #nim
08:55:38FromGitter<bung87> `type ⏎ Dollars {.borrow: `$`.} = distinct float ⏎ `
09:05:22FromDiscord<InventorMatt> i'm getting an error /usercode/in.nim(2, 19) Error: a type can only borrow `.` for now
09:09:47FromGitter<bung87> oh, so it not support yet
09:13:30FromDiscord<flywind> https://play.nim-lang.org/#ix=2mcp
09:14:11FromDiscord<InventorMatt> that solved it. thank you so much
09:14:35FromDiscord<flywind> np
09:20:42FromDiscord<Synth> I installed nim via `finish.exe` and now I'm getting a different error when compiling... `main.exe(1, 1) Error: undeclared identifier: 'MZ'`
09:23:42FromDiscord<Synth> Please ping me once someone is able to help me
09:28:16*konvertex joined #nim
09:35:58planetis[m]Synth: it means you use MZ before you declare it, whatever it is. variable, constant, type, etc
09:36:16FromDiscord<Synth> Oh?
09:36:56FromDiscord<Synth> But it says line one first char...
09:37:00FromDiscord<Synth> I'm confused
09:37:08FromDiscord<Synth> (edit) 'But it says ... line' => 'But it saysthe error is at'
09:38:52planetis[m]Can you post a snippet?
09:40:40FromDiscord<dom96> Random idea to anyone that's familiar with Nim's JS backend, how hard would it be to compile to TypeScripts strict variant and make use of AssemblyScript for WebASM compilation? (https://docs.assemblyscript.org/) (CC Araq)
09:42:07FromDiscord<dom96> or actually, it might be better to use Binaryen
09:52:35FromDiscord<Synth> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/711154115782377492
09:52:41FromDiscord<Synth> O
09:52:48FromDiscord<Synth> (edit) 'O' => 'I'm just trying to make a discord bot'
09:52:49FromDiscord<Synth> (edit) 'I'm just trying to make a discord bot ... ' => 'I'm just trying to make a discord bothaha'
09:53:22FromDiscord<Recruit_main707> dont paste the code in here, or it doesnt look like shit in irc already?
09:53:57dom96it doesn't :)
09:54:04dom96Massive thanks to Yardanico
09:54:11FromDiscord<Recruit_main707> nice
09:58:07*krux02 joined #nim
10:11:02FromDiscord<KrispPurg> @Synth, what did you use to install Nim?
10:16:41FromDiscord<KrispPurg> If you installed from the website, try using choosenim if choosenim does not work, use choosenim 0.4.0
10:16:52FromDiscord<KrispPurg> (edit) 'If you installed ... from' => 'If you installedit'
10:19:10FromDiscord<dom96> Help me, I am about to start another project.
10:19:32FromDiscord<KrispPurg> ok
10:23:04FromDiscord<KrispPurg> what can i help u with, dom96
10:23:59FromGitter<bung87> dont know what's the hard part
10:26:36FromDiscord<dom96> You need to stop me, I have too many projects 🙂
10:27:04FromDiscord<Recruit_main707> whats the project about?
10:27:58FromDiscord<dom96> Selectively compiling Nim functions to WebAsm
10:28:43FromDiscord<Recruit_main707> thats too complex and without a real good purpose, dont you think so?
10:38:23FromDiscord<dom96> hehe, thanks. If my idea works out then an MVP should be easy and further development can be done progressively by various people.
10:40:25FromDiscord<Synth> I used scoop but that didn't work so I switched to the executable
10:49:41*waleee-cl joined #nim
11:00:36supakeenThere was a link to libraries and things being requested for Nim, I forgot to bookmark it. Does someone have it handy?
11:00:43Yardanicohttps://github.com/nim-lang/needed-libraries/issues
11:01:55supakeenThank you.
11:08:23FromGitter<bung87> `Check failed: buf.data == "aaaaa" ⏎ ⏎ ```buf.data was aaaaa```` [https://gitter.im/nim-lang/Nim?at=5ebfc9a690f6db31beed55b2]
11:08:35Yardanicouse "repr" to check both
11:08:53FromGitter<bung87> why is that?
11:09:06Yardanicobecause buf.data might have some non-printable ASCII characters
11:10:14FromGitter<bung87> ok, for debugging
11:12:47*dddddd joined #nim
11:15:47FromDiscord<wiremoons> @Synth scoop works ok for installing Nim and is kept up to date pretty well too. You should install the Nim dependencies too though. I normally use: `scoop install nim openssl git gcc`
11:16:21FromDiscord<Synth> It didn't compile when I tried to do `-d:ssl` with scoop install @wiremoons
11:16:23FromDiscord<wiremoons> That way the `-d:ssl` flag when you compile should work too.
11:16:26FromDiscord<Synth> I'll try that though, thank you!
11:16:50FromDiscord<wiremoons> Yes - you need the `openssl` package from scoop too.
11:17:04FromGitter<bung87> that's realy usefull, found the problem where is.
11:17:09FromDiscord<Synth> I installed that but it still didn't work for me strangely
11:17:19FromDiscord<Synth> I'm going to try again though
11:17:32Yardanico@wiremoons you don't neccesarily need it
11:17:44Yardanicohttps://nim-lang.org/download/dlls.zip
11:17:53Yardanicocontains pcre and openssl for both 32/64bit
11:17:59Yardanicoand you need to place them in the same folder as nim.exe
11:18:40FromDiscord<Synth> Oh alright
11:18:48FromDiscord<Synth> Thank you for that info
11:19:31FromDiscord<wiremoons> Yes - I tried to get my program working with `-d:ssl` and the DLL from the zoo file. I just got errors for some reason (was awhile ago now).. I just used `openssl` from scoop, and let it sort all the dependancies out - for an easier life 🙂
11:19:40FromDiscord<wiremoons> *zip
11:20:44FromDiscord<wiremoons> I put the DLLs from the zip file in the same directory as my compiled Nim program -maybe that's why it didn't work @Yardanico
11:20:53Yardanicoyeah, that won't work
11:21:00Yardanicowell, it will only work if that directory is in your $PATH
11:21:31Yardanicohmm, but wait it's actually windows, so it should've worked because windows looks in the current dir for the .dll's
11:21:38Yardanicomaybe you put the wrong arch or something?
11:22:02FromDiscord<wiremoons> Yes - tried the PATH trick too. Was no better. Luckily scoop fixed for me before I gave up on Nim and Windows 🙂
11:22:21FromDiscord<Synth> Yeah, I don't like windows
11:23:28FromDiscord<wiremoons> Not my first choice @Synth (prefer Linux) - but cant get away from it either due to work and market share etc!
11:23:39FromDiscord<Synth> Yeah, I understand...
11:25:32*fredrikhr quit (Read error: Connection reset by peer)
11:26:06FromDiscord<Synth> @wiremoons your command fixed it...
11:26:07FromDiscord<wiremoons> Not sure what the caused was @Yardanico sorry... could of been user erroor 🙂 Thing was I was trying to fight learning Nim, and having DLL hell issues wasn't doing much for my programming confidence at the time - LOL
11:26:11FromDiscord<Synth> I don't know how but thank you so muhc
11:26:13FromDiscord<Synth> (edit) 'muhc' => 'much'
11:26:25FromDiscord<KrispPurg> is it working for you now synth?
11:26:26FromDiscord<Synth> I don't know how that fixed my compiling issue
11:26:39FromDiscord<Synth> Yes, `scoop install nim openssl git gcc` fixed it
11:26:44FromDiscord<Synth> I don't know how though...
11:26:45FromDiscord<KrispPurg> nice
11:26:46FromDiscord<wiremoons> Glad you got it working @Synth 🙂
11:27:04FromDiscord<Synth> The funny thing is I already had openssl, gcc, and nim installed when it wasn't working
11:27:18FromDiscord<Synth> The only thing I can imagine is the git install fixing it but it doesn't make sense haha
11:27:30FromDiscord<KrispPurg> one tip for using my lib, if theres any crashes due to it's caching try switching to the devel branch.
11:27:39FromDiscord<wiremoons> No - don't ask me, I was just glad to get it working too 🙂
11:28:24FromDiscord<Synth> Thank you haha
11:36:10FromDiscord<Synth> Now I'm getting this... `SIGSEGV: Illegal storage access. (Attempt to read from nil?)↵Error: execution of an external program failed`
11:36:16FromDiscord<Synth> At least it's linking correctly now
11:36:53Yardanicohow did you compile?
11:37:15*dadada__ quit (Ping timeout: 265 seconds)
11:37:16FromDiscord<Synth> `nim c -d:ssl -r main.nim`
11:37:28Yardanicowell, then there should be a traceback
11:37:43federico3GTK3 has been around for 9 years apparently. Is it time we have an official gtk3 wrapper?
11:37:44FromDiscord<Synth> Yes, there are
11:38:13Yardanicofederico3: gintro to fusion? :P
11:38:17federico3no thanks
11:38:19Yardanicowhy
11:38:32FromDiscord<KrispPurg> import segfaults
11:38:34Yardanicoabout these wget things - you can just put them in the repo itself, easy
11:39:20FromDiscord<Synth> sent a code paste, see http://ix.io/2mcU
11:39:34Yardanicoinstall devel dimscord
11:39:43Yardaniconimble remove dimscord
11:39:46Yardaniconimble install dimscord@#devel
11:39:46*dadada joined #nim
11:39:46FromDiscord<KrispPurg> damn it yardanico you beat me to it
11:39:56FromDiscord<Synth> Oh alright, thank you
11:40:10*dadada is now known as Guest32317
11:40:13FromDiscord<KrispPurg> I believe what is the cause of this error
11:40:51FromDiscord<Synth> How do you guys know the solutions to this though?
11:40:55FromDiscord<Synth> I'm just wondering
11:40:56federico3Yardanico: it's not official, and look at this stuff https://github.com/StefanSalewski/gintro/blob/master/gintro.nimble#L44
11:41:05Yardanicofederico3: as I said you can just put these 3 in the repo
11:41:09YardanicoI don't see this as a big issue
11:41:19federico3no way
11:41:24Yardanicoand by official I thought you meant official as in Nim community
11:41:27Yardanicogintro is really superb
11:41:29Yardanicoit even works with arc
11:41:54Yardanicoyou have to consider how much time the developer has spent making it, and you can fix these 3 wget's by just adding the files to the repo, so no big issue
11:41:55FromDiscord<dom96> hrm, considering streaming today
11:42:20FromDiscord<KrispPurg> just install dimscord devel if you are getting that nil error, try echoing the info object.
11:42:21federico3I'd rather stick with Python
11:42:36Yardanicothat's your choice
11:42:44federico3no, unfortately it's not
11:43:38dom96wtf
11:43:40Yardanicoit is? the thing with wgets is a minor issue which can be fixed easily
11:43:45dom96why does this package wget modules?
11:43:51federico3not really
11:44:17dom96That's an incredibly poor idea
11:44:27Yardanicodom96: https://github.com/StefanSalewski/oldgtk3 contains a lot of stuff
11:44:34dom96so split up the package
12:06:01*supakeen quit (Quit: WeeChat 1.9.1)
12:06:41*supakeen joined #nim
12:07:59*filcuc joined #nim
12:14:06*filcuc quit (Ping timeout: 260 seconds)
12:14:24*filcuc_ joined #nim
12:19:15*fredrikhr joined #nim
12:22:19*letto quit (Quit: Konversation terminated!)
12:23:05*letto joined #nim
12:39:16*Guest32317 quit (Ping timeout: 246 seconds)
12:39:43*dadada joined #nim
12:40:07*dadada is now known as Guest37109
12:45:32*fredrikhr quit (Quit: Client Disconnecting)
12:45:46*filcuc_ quit (Ping timeout: 256 seconds)
12:46:20*s4mu3lbk quit (Ping timeout: 256 seconds)
12:54:16*Guest37109 quit (Ping timeout: 256 seconds)
12:55:11dom96~dom_stream is twitch.tv/d0m96
12:55:11disbotdom_stream: 11twitch.tv/d0m96
12:56:16*dadada joined #nim
12:56:38*dadada is now known as Guest99444
12:58:22*filcuc_ joined #nim
12:58:22*fredrikhr joined #nim
13:03:46*Guest99444 quit (Ping timeout: 265 seconds)
13:09:47*dadada__ joined #nim
13:16:10*filcuc_ quit (Ping timeout: 260 seconds)
13:27:35*waleee-cl quit (Quit: Connection closed for inactivity)
13:30:07*couven92 joined #nim
13:30:33*fredrikhr quit (Disconnected by services)
13:30:40*couven92 is now known as fredrikhr
13:30:58*couven92 joined #nim
13:48:26*lbart quit (Ping timeout: 244 seconds)
13:48:38*lbart joined #nim
13:50:01*filcuc_ joined #nim
13:50:15*waleee-cl joined #nim
13:55:39*chemist69 quit (Ping timeout: 265 seconds)
13:56:14*chemist69 joined #nim
14:06:37*narimiran joined #nim
14:12:09*clemens3 joined #nim
14:17:17*couven92 quit (Read error: Connection reset by peer)
14:18:48*couven92 joined #nim
14:20:08*Hideki joined #nim
14:20:26*Hideki is now known as Guest41594
14:22:54*Hideki_ quit (Ping timeout: 260 seconds)
14:23:48*zacharycarter joined #nim
14:40:57*fanta1 joined #nim
14:41:26FromDiscord<exelotl> this is some ~jank~ https://github.com/nim-lang/Nim/issues/14373
14:41:30disbotNimNodes from parseStmt are passed by value instead of by reference ; snippet at 12https://play.nim-lang.org/#ix=2mdC
14:48:25*Guest41594 quit (Ping timeout: 246 seconds)
14:51:26FromDiscord<Rika> planetis: sorry late reply, but it's plenty fast from what i tested, i saw under 0.01 millisecond refreshes last time i tested
14:51:49*zacharycarter quit (Ping timeout: 264 seconds)
14:53:50*Hideki joined #nim
14:54:14*Hideki is now known as Guest13771
14:58:09disruptek~stream
14:58:09disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
14:58:12disruptekquality today.
14:58:20planetis[m]cool
14:58:37*s4mu3lbk joined #nim
15:02:40*scmutalisk joined #nim
15:06:27federico3who else is streaming?
15:06:32*filcuc_ quit (Ping timeout: 272 seconds)
15:07:22Yardanicofederico3: dom96 is
15:07:26Yardanicohttps://www.twitch.tv/d0m96
15:08:05Yardanicooh nvm
15:08:06Yardanicohe stopped
15:08:17federico3*was* :D
15:09:43dom96lol
15:10:38FromDiscord<dom96> You can re-watch here: https://www.twitch.tv/videos/622721740 (part 1), https://www.twitch.tv/videos/622745400 (part 2)
15:12:54FromDiscord<dom96> disruptek: yardanico: CPS eh? 😛
15:13:07*fredrikhr quit (Read error: Connection reset by peer)
15:13:15*fredrikhr joined #nim
15:13:34*fredrikhr quit (Read error: Connection reset by peer)
15:13:56*fredrikhr joined #nim
15:16:02*dddddd quit (Remote host closed the connection)
15:16:03*fredrikhr quit (Read error: Connection reset by peer)
15:17:27*fredrikhr joined #nim
15:28:12*zacharycarter joined #nim
15:28:40*liblq-dev joined #nim
15:33:15*lritter joined #nim
15:33:59*zacharycarter quit (Ping timeout: 260 seconds)
15:34:29*Guest13771 quit (Read error: Connection reset by peer)
15:35:25FromDiscord<Technisha Circuit> > How do you guys know the solutions to this though?↵@Synth krispurg is the author of the lib and yardanico uses the lib
15:35:35Yardanicoyeah
15:35:36Yardanico!repo ircord
15:35:38disbothttps://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 5⭐ 0🍴
15:47:03*fredrikhr quit (Disconnected by services)
15:47:08*couven92 is now known as fredrikhr
15:47:19*silvernode joined #nim
15:47:26*couven92 joined #nim
15:54:50*Hideki joined #nim
15:55:13*Hideki is now known as Guest18175
16:03:44*Guest18175 quit (Remote host closed the connection)
16:09:06*zacharycarter joined #nim
16:11:45bebarker i recompiled on aarch64 - very cool that peak memory is recorded and logged! The most used was about 550MiB according to the logs, so pretty decent I think
16:13:43*zacharycarter quit (Ping timeout: 265 seconds)
16:15:39*dadada__ quit (Ping timeout: 265 seconds)
16:22:07disruptekdom where did you go?
16:24:43*dadada joined #nim
16:25:06*dadada is now known as Guest306
16:34:36*nekits quit (Quit: The Lounge - https://thelounge.chat)
16:36:15dom96disruptek, been gone for a while
16:38:12disruptekdamnit.
16:38:43disruptekhow do i make a cstring with a specific size?
16:39:34disruptekjust alloc it myself?
16:39:42dom96sure
16:39:49dom96or use newString
16:39:57disruptekah, newString returns cstring?
16:40:10dom96no, but you can grab the cstring via `addr str[0]`
16:40:26disrupteki don't wanna alloc 2000 bytes so i guess i'll do it manually.
16:42:25*Guest94576 joined #nim
16:42:48*Guest94576 quit (Client Quit)
16:47:27*scmutalisk quit (Quit: no idea)
16:50:20*nekits joined #nim
16:57:50FromGitter<bung87> https://github.com/nim-lang/Nim/issues/6420 this is easy fix but breaking change
16:57:54disbotImprove error message for readFile/writeFile ; snippet at 12https://play.nim-lang.org/#ix=2me7
17:02:50disruptekassert value.arrayValueType == dtByte, "obj versus enum... fite!"
17:03:00disruptekassert value.arrayValueType.kind == dtByte
17:03:07disruptekaraq: ^^^^
17:03:29disruptekref equality operator.
17:07:04alehander92oiii
17:07:09alehander92PMunch so
17:07:13alehander92about the web stuff
17:08:51alehander92dom96 i wont watch the whole stream
17:08:57alehander92but several seconds seemed very interesting
17:09:16alehander92is this about bridging wasm with nim code or for directly compiling some procs to wasm
17:09:51dom96the latter
17:10:47alehander92oh nice
17:11:59alehander92:)
17:12:02alehander92seems useful!
17:12:21dom96doubt I'll get far, but let's see :)
17:12:21alehander92does it play well with the type system(i saw some docs about types0
17:12:29alehander92is there a big blocker, or just time
17:12:39dom96a lot to do
17:12:53dom96and it's not clear that what I have in mind will be possible
17:13:26dom96for now I just want to see how far I can push it
17:14:09FromDiscord<willyboar> Web stuff yeah!
17:16:16alehander92bung87 how is ts2nim going!
17:16:26alehander92dom96 hmm, so
17:16:34alehander92does it invoke an external compiler
17:16:37alehander92to produce the wasm
17:16:46alehander92or do you just generate a subset
17:16:50dom96not right now
17:16:55dom96just watch the video :P
17:17:03alehander92i want to work on my own side projects
17:17:09alehander92sorry :( :D not much time !
17:17:17alehander92you probably understand
17:17:18dom96I generate WAT
17:17:27dom96and intend to run wat2wasm on it
17:17:37alehander92ah this sounds close to wasm
17:17:47dom96it's the textual representation
17:17:49alehander92probably if we have free time we can write a nim wat2wasm tool
17:17:50dom96it's pretty cool actually
17:17:51alehander92yeah
17:18:16alehander92i imagine its not a complicated trasnformation
17:18:25alehander92hm, which reminds me
17:18:41alehander92if you guys write a x64 backend, would you write your own assembler
17:22:10ZevvHmm someone should write a weekly "This week in Nim" article - I can't find the time to keep up and miss all kind of fun stuff :/
17:27:10FromGitter<bung87> @alehander92 ts2nim limitations described same as https://docs.assemblyscript.org/basics ,that I just read at afternoon
17:29:11FromGitter<bung87> thought I can use ts compiler api check a project whether fit the needs ,then get might almost perfect transpiled project
17:30:31FromGitter<bung87> btw @types/node does not fit the needs.
17:38:29*Guest306 is now known as dadada
17:39:04dadadais there a way I can find out at runtime if a function/proc is available and from what module it is?
17:39:38dadadaalso lets say there two funcs with the same name but from different modules, and I don't care which one is used, I just want to it to pick whatever is available
17:39:45dadadas/there/there are
17:41:23dom96omg, the way quote do handles backticks is really crazy sometimes
17:42:30FromGitter<sheerluck> Zevv in ponylang it called "Last Week in Pony"
17:43:31alehander92bung87 you need
17:43:35alehander92to write acompiler yeah
17:43:38alehander92i think
17:43:47alehander92but i havent read it ;(
17:43:59alehander92willyboard
17:44:19alehander92willyboar *: so what do you want in a web framework?
17:46:00*arecaceae quit (Remote host closed the connection)
17:46:23*arecaceae joined #nim
17:46:54Zevvsheerluck: well, that's not very original, is it?
17:46:57Zevvpff
17:47:08*couven92 quit (Read error: Connection reset by peer)
17:47:19*couven92 joined #nim
17:47:39*couven92 quit (Read error: Connection reset by peer)
17:48:02*couven92 joined #nim
17:48:17alehander92i cant find pmunc's experiment (except https://github.com/PMunch/webexperiment) , my plan would be to have karax(or swappable with other) views + typed routing + orm + api dsl so with this well typed code one can generate a lot of good validation and documentation
17:48:45alehander92but i cant decide if microservices/api-s or full blown websites are better target
17:49:13alehander92maybe the same code if modular enough should be good for both
17:51:06FromGitter<bung87> ok, compiler ,araq also sais so, not easy to me ,as I most do web development.
17:51:35FromDiscord<willyboar> I think that it would be nice to not depend on karax
17:51:41dadadamy dudes and dudettes, this is the situation, I've a macro that needs to be aware of certain symbols in its quote do, I tried all the obvious things, simply put those procs at the top of the module (works in some situations, not in all), putting the macro in a submodule, and importing the it later, so that the procs get hopefully made before it, doesn't help, the issue is that the stuff the macro returns
17:51:47dadadaseems to get evaluated very early before anything else is setup, only way I found to make it work is to first import the procs it needs, and then import the module which is using the macro internally ... I know this is hard to follow ... so this doesn't work import module_that_uses_macro and this does: import types_needed_by_macro import module_that_uses_macro
17:52:28alehander92willyboar it doesnt depend on karax
17:52:29*couven92 quit (Ping timeout: 256 seconds)
17:52:58alehander92it can , sorry
17:53:06dom96dadada, sounds like you're not using bindsym properly, maybe? :)
17:53:28alehander92 but we can make it an api: every api which implements a `render(..): string` can be plugged in as view
17:53:37alehander92so people can choose karax/htmlgen or another lib
17:54:00FromGitter<bung87> prologue is a good start project
17:54:04*couven92 joined #nim
17:54:11alehander92oh i forgot about it!
17:55:10FromDiscord<willyboar> I was thinking something like flask
17:55:20FromDiscord<willyboar> With a little salt
17:55:28dadadadom96: is there any good writeup on bindsym besides your books?
17:56:09alehander92willyboar yeah, but i think jester
17:56:14alehander92is a good flask-like one
17:56:19alehander92with a bit more stuff if needed
17:56:21FromDiscord<willyboar> The most important i think is to offer an easy way to create and use plugins
17:56:28alehander92prologue actually looks
17:56:31alehander92close
17:56:35alehander92with some middleware support
17:56:37alehander92good work
17:58:40FromGitter<bung87> yeah, me and the author in same chat group, it mostly inspire from flask
17:59:26alehander92yeah both do
17:59:48alehander92but i think prologue is both flask-y and can grow to include middleware: they have it in the docs as point
17:59:57FromGitter<bung87> and tulayang will focus on improve its infrastructure
17:59:58alehander92so maybe one can join their development
18:00:01alehander92to consolidate effort
18:01:02FromGitter<bung87> am on the db layer side , but not touch for months..
18:01:06FromGitter<kdheepak> Is there a way to read all of the package's nim code at compile time and make changes to the ast and compile that instead?
18:01:33FromGitter<kdheepak> I'm asking I guess for a macro but for an entire package (does my question even make sense?)
18:01:56FromDiscord<willyboar> I thing we lack of good template engines
18:03:28Zevvbwah. why can't I make typed macros. I keep running into that.
18:03:57dadadakdheepak: I'm working on stuff like that, when it's ready I'll announce it here, it's pretty complicated, and I want to get it right, so this takes time
18:04:10FromDiscord<willyboar> Prologue is more a rails than a flask
18:04:52dadadakdheepak: I've many ideas for using it
18:05:03FromGitter<bung87> no, I can tell you more flask
18:05:40alehander92willyboar i think its harder with orm
18:05:50alehander92for a template lib, i think karax is good
18:05:56alehander92because you can use full nim inside
18:06:06alehander92or if you want, to limit a subset
18:06:13alehander92and not come up with a random new language
18:06:22*couven92 quit (Read error: Connection reset by peer)
18:06:33alehander92but orm-s require good cooperation with migration, scaffolding
18:06:34dadada@kdheepak
18:06:35FromGitter<bung87> https://github.com/itsumura-h/nim-allographer
18:06:48alehander92maybe not migration
18:07:00FromGitter<bung87> there's a good db lib
18:07:26alehander92bung87 thething i like
18:07:35alehander92would be to have more type support
18:07:39*couven92 joined #nim
18:08:07alehander92e.g. hooking rich nim types to most fields/joins
18:08:14alehander92generating validation based on them
18:08:27alehander92(e.g. even with z3 annotations one can {.require a.len > 2.}
18:08:33FromDiscord<willyboar> Norm author create migration lib too
18:08:52alehander92even compile time checking if schema corresponds to types maybe (not sure if useful tho)
18:09:22alehander92so i guess its good to look at what rust/functional people do too to leverage our macro+type system here
18:09:26alehander92thing that php/python cant do
18:09:29alehander92easily
18:09:43alehander92ah, nice
18:10:29FromGitter<bung87> it need extro work , can base on the lib.
18:10:42FromDiscord<willyboar> Allographer author develops an interesting framework based on jester
18:12:53FromDiscord<willyboar> Juan carlos also write a new orm
18:13:06Yardanicowell it's a simplistic ORM really
18:13:30*couven92 quit (Read error: Connection reset by peer)
18:13:34alehander92ormin is maybe a good example
18:13:38Yardanicoyep
18:13:44alehander92tho it's opinionated
18:14:00*letto quit (Ping timeout: 272 seconds)
18:14:15*couven92 joined #nim
18:14:19FromDiscord<willyboar> https://github.com/juancarlospaco/nim-gatabase
18:14:26alehander92disruptek, does nim
18:14:37alehander92plan to cache on module or on function level?
18:15:41disruptektoplevel symbol.
18:16:10alehander92huh awesome
18:17:15*Hideki joined #nim
18:17:39*Hideki is now known as Guest64112
18:17:55FromDiscord<willyboar> @bung87 do you know if they planned to add cli generators to prologue?
18:19:43*opal quit (Ping timeout: 240 seconds)
18:20:40FromGitter<bung87> not heard of it yet, cli or dsl
18:21:42FromGitter<bung87> there's someone write likes https://github.com/Adeohluwa/gen
18:22:00FromDiscord<willyboar> Yeap i have check it
18:22:37FromDiscord<willyboar> There is not many web relation libs i didnt check
18:22:55FromGitter<bung87> am plaining write a activerecord layer lib https://github.com/bung87/db_adapter just not finished
18:23:35alehander92awesome!
18:24:25FromGitter<bung87> I have good feeling using rails, no php python nodejs
18:24:26alehander92disruptek but what i mean is
18:24:37alehander92if one changes only function `a`
18:24:55alehander92is it somehow possible to not even reparse + sempass the other code
18:25:17alehander92e.g. one can detect its inside (so no signature change: so no difference for other functions/code)
18:25:29FromDiscord<willyboar> Well i have used a lot of rails and it is a great tool
18:27:04FromDiscord<willyboar> But it is slow and huge
18:28:12FromGitter<bung87> it's more for human, not machine
18:30:38FromDiscord<willyboar> I also watch this:
18:30:42FromDiscord<willyboar> https://github.com/liseki/enim
18:32:09*opal joined #nim
18:32:13FromDiscord<exelotl> Oh! This looks good
18:32:41FromDiscord<exelotl> didn't show up when I searched for templates on nimble
18:33:52FromGitter<bung87> good one I give a star
18:41:06FromDiscord<willyboar> Hope he/she finish it. I think is not working.
18:41:30Yardanicoyou can just say "they" btw :P
18:41:51Yardanicoand we already have source code filters
18:41:54disruptekalehander92: it has to parse it but it doesn't have to regenerate the backend code.
18:42:00FromDiscord<willyboar> (edit) 'he/she' => 'they'
18:42:00Yardanicohttps://nim-lang.org/docs/filters.html
18:42:04alehander92it's obviously `he` guys
18:42:07alehander92it's a male name
18:42:18Yardanicoalehander92: you can never be sure :P
18:42:46FromDiscord<willyboar> I edit it 😋 😋
18:43:19FromDiscord<willyboar> Yardanico scf is pain in the ass
18:43:23Yardanicoit's not that hard
18:43:24alehander92yardanico don't make me `they` you :D
18:43:34alehander92disruptek hm yeah
18:43:38alehander92actually
18:43:52alehander92it doesnt
18:43:54alehander92because on theory
18:44:20alehander92i am not sure honestly: is there an api that tells you "this file changed only in those bytes" directly from os
18:44:48alehander92if this is effective enough, one can prove that he can parse only the same section of lines again
18:44:58alehander92but its probably not needed to go into such complexity for that
18:45:04FromDiscord<willyboar> Its not that hard for you. For a starter is pain in the ass
18:45:50Yardanico??
18:45:50Yardanicowhy
18:45:54YardanicoI honestly don't know
18:46:16FromGitter<bung87> I also thought make tool generate code by parse language official site
18:47:00*NimBot joined #nim
18:47:29FromDiscord<willyboar> Even jinja is quite close
18:49:56disruptekalehander92: parsing the file costs virtually nothing.
18:50:04*letto joined #nim
18:51:25bebarkerI'm seeing two modes for submitting RFCs to the RFC repo: issue tracker and PRs. PRs are suggested but the vast majority seem to be issues - what is preferred?
18:51:34disruptekissues.
18:51:37Yardanicobebarker: issues
18:51:54bebarkerthanks, just wanted to confirm
18:54:41alehander92disruptek ok, it's a fun thing to think about
18:54:45alehander92but you're right
18:55:10alehander92ok, i'll focus on parallel module parsing and only function-level later
18:55:16FromDiscord<codic> How do I color the text i print into the terminal?
18:55:23dadadaso
18:55:25FromDiscord<codic> i'm assuming using the terminal module
18:55:31FromDiscord<codic> but I can't find any examples on the docs page
18:55:43dadadacan I get a list of all imported modules programmatically? in a macro for example?
18:55:57YardanicoI don't think so
18:56:01Yardanicobut maybe you can :P
18:56:09Yardanico@codic there are examples
18:56:12Yardanicoin the procs
18:56:23Yardanicoe.g. https://nim-lang.org/docs/terminal.html#styledWrite.m%2CFile%2Cvarargs%5Btyped%5D
18:56:27*zacharycarter joined #nim
18:56:29Yardanicohttps://nim-lang.org/docs/terminal.html#styledWriteLine.t%2CFile%2Cvarargs%5Buntyped%5D
18:56:34dadadaYardanico: well, I can definitely use a lineInfoObj and then parse the module for import statements, but that's not nice
18:56:35FromDiscord<codic> O
18:56:39FromDiscord<codic> Wait how are you pinging from irc
18:56:47Yardanicowdym?
18:56:49Yardanico!repo ircord
18:56:50disbothttps://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 5⭐ 0🍴
18:56:51Yardanicothat's how
18:56:56FromDiscord<codic> oo
18:56:59FromDiscord<codic> dimscord?
18:57:07FromDiscord<codic> yup
18:57:47Yardanicowell it exited even before dimscord
18:57:50Yardanicoexisted * :P
18:57:53Yardanicobut didn't work so well
18:58:25FromDiscord<codic> used discord.nim or an inhouse impl?
18:58:31Yardanicoyeah discord.nim
18:58:39FromDiscord<codic> ah
18:58:40FromDiscord<codic> nice
19:00:47FromGitter<bung87> https://github.com/bung87/luna/blob/master/src/luna.nim
19:01:05FromGitter<bung87> I use writestyledlune
19:03:17FromDiscord<codic> hm
19:08:47*solitudesf- joined #nim
19:12:16*solitudesf quit (Ping timeout: 272 seconds)
19:12:51*couven92 quit (Ping timeout: 260 seconds)
19:13:47FromDiscord<codic> Can I see the list of colors for stdout.styledWrite, and can i use a hex code by any chance?
19:13:54Yardanicothere's an enum
19:14:00*couven92 joined #nim
19:14:10YardanicoI'm sorry but did you really read https://nim-lang.org/docs/terminal.html ?
19:14:13Yardanicohttps://nim-lang.org/docs/terminal.html#ForegroundColor
19:14:15Yardanicohttps://nim-lang.org/docs/terminal.html#BackgroundColor
19:14:36FromDiscord<codic> actually, nope :P
19:14:59FromDiscord<codic> nice, those are enough
19:15:06FromDiscord<codic> no need for hex
19:15:27Yardanicoyou might also be interested in https://github.com/qqtop/NimCx
19:16:06FromDiscord<codic> linux only?
19:16:20Yardanicoyeah I think so
19:16:50FromDiscord<codic> seems really useful except that it wouldnt be cross platform but this tool thta i am writing is mainly linux targeted anyways, so I'll make sure to check it out
19:18:50*Guest64112 quit (Ping timeout: 265 seconds)
19:20:20dadadaYardanico: could I get the module of a type I already have, say I've NimNode identdefs and those types were imported, can I expand those to their modulename.type state?
19:22:56Yardanicodadada: use owner on a NimNode?
19:23:01Yardanicoit should be a symbol though
19:23:04Yardanicohttps://nim-lang.org/docs/macros.html#owner%2CNimNode
19:23:16Yardanico"For top level declarations this is an nskModule symbol"
19:27:25dadadaYardanico: it's an ident, not a symbol :-(
19:27:34YardanicoI don't think you can do it then, an ident is just an ident
19:27:44Yardanicoyou should accept "typed" arguments in a macro if you want a symbol
19:28:47Yardanicoor you can try parseExpr :P
19:29:35dadadahmm, with typed arguments it could work, for some reason I'm writing macros all the time
19:30:04dadadawith untyped, it has become a habit
19:30:41FromDiscord<Max [codingreaction]> Hi, the support of nim for vscode is cool as far as i tested it, to save some time for future discord users if everytime that your press Ctrl + Shift + B (for building) a select task popup appears (remember to have your tasks.json created previously!), you may need to press Ctrl + Shift + P and configure the default build task pressing the option on this popup
19:30:46FromDiscord<Max [codingreaction]> https://media.discordapp.net/attachments/371759389889003532/711299622320078898/unknown.png
19:31:02Yardanicoyou can just press F6 to compile and run current file in debug mode btw :P
19:31:11Yardanicoand no need for tasks
19:31:21Yardanicoyou should really use nimble for tasks and in vscode tasks call nimble
19:31:40*dddddd joined #nim
19:31:51FromDiscord<Max [codingreaction]> ❤️ awesome, i lost like 3 hours to remove the dammed "please select a task" everytime i saved my .nim file haha
19:32:07FromDiscord<Max [codingreaction]> thanks @Yardanico
19:35:09*couven92 quit (Read error: Connection reset by peer)
19:35:31*couven92 joined #nim
19:39:12*fanta1 quit (Quit: fanta1)
19:39:30FromDiscord<codic> Quick question: If I do `if paramStr(1) == "whatever"`, it'll error out if no argument is given because 1 is out of bounds. How can i make it just do nothing instead? Like, do an if check to see if the number of args is 0, and if so, exit the program BEFORE it gets to the argument handler?
19:40:06disrupteksure.
19:40:11disruptekuse paramCount()
19:40:35FromDiscord<codic> `if paramCount() == 0`? thakns!
19:40:38FromDiscord<codic> (edit) 'thakns!' => 'thanks!'
19:42:24dadadaYardanico: I switched from untyped to typed, now it complains about indentifiers being undeclared, I wish there was a lenient version that just fishes for the types it can identify and treats the rest like "untyped" does
19:42:55FromDiscord<Max [codingreaction]> does "strutils" comes from "struct utils" or it means something different?
19:43:03dadadaI've a stmtList containing pairs of the form notYetDeclaredIdent: someType
19:43:25FromDiscord<KrispPurg> strutils means string utils
19:43:38dadadaI want the info about someType (so typed), but not the issues revolving around undeclaredness so (untyped)
19:43:43FromDiscord<Max [codingreaction]> ty Krisp
19:43:48FromDiscord<KrispPurg> np
19:44:23FromDiscord<KrispPurg> i actually thought strutils was structutils, but thank god i was not alone
19:44:31FromDiscord<Max [codingreaction]> hahaha
19:44:52FromDiscord<KrispPurg> it was when i was new to nim
19:45:57Yardanicohmm lol, I always associated them with strings :P
19:46:18FromDiscord<Max [codingreaction]> i'm extremly new but don't wanna to build bad mnemonics in my brain haha
19:46:26FromDiscord<KrispPurg> I misread them as structutils
19:46:31FromGitter<bung87> nim name prefer short
19:46:55FromGitter<bung87> #proc reverse*(self:Buffer): auto ⏎ ⏎ #proc swap16*(self:Buffer): Buffer ⏎ ⏎ #proc swap32*(self:Buffer): Buffer ... [https://gitter.im/nim-lang/Nim?at=5ec0432faac441316a812407]
19:47:12Yardanicodon't use auto :P
19:47:19Yardanicounless it's automatically translated code
19:47:26FromGitter<bung87> I am porting buffer module
19:47:55FromGitter<bung87> it is comming from translator
19:48:23FromDiscord<Max [codingreaction]> discard is the same as "pass" in python?
19:48:23FromGitter<bung87> just wondering these methods usefull?
19:48:29Yardanico@Max it has 2 uses
19:48:41Yardanico1: same as "pass" in Python 2: discard the result of a proc call you don't want
19:49:13Yardanicowell also it can be used in type definitions (e.g. in object variants where you have some empty branches), but there it's mostly same as "pass" in Python
19:49:34*silvernode quit (Ping timeout: 256 seconds)
19:49:48FromDiscord<Max [codingreaction]> excellent, ty
19:52:48FromGitter<bung87> may not porting these methods, as It can just modify buff.data
19:54:09FromDiscord<Recruit_main707> cstring has some kind of advantage in performance compared to string?
19:55:52YardanicoIt's for interfacing with C
19:55:57Yardanicowell, not neccesarily C
19:56:05Yardanico"cstring" nowadays stands for "compatible string"
19:57:03FromDiscord<Recruit_main707> I know, but since nim strings are a bit weird, I thought maybe cstring was treated in a more c-ish way
19:57:30*narimiran quit (Ping timeout: 265 seconds)
19:58:18FromGitter<bung87> assignment may have differience?
19:58:32*couven92 quit (Quit: Client disconnecting)
20:00:49dadadahttps://play.nim-lang.org/#ix=2mgs why does the second export not work?
20:01:01Yardanicobecause you can't do that
20:01:07Yardanicoyou need to mark hello with *
20:01:12Yardanicoyou can export symbols
20:01:17Yardanico"Test.hello" is not a symbol
20:01:21Yardanicoas far as I can see :P
20:02:32dadadaI thought the point of export is that it's an alternative to using * (too), since it works that way for the Test type itself
20:02:38dadadaat least it doesn't seem consistent
20:03:53dadadaif one is a replacement for using * on Test, then the other (I think naively) should be too
20:04:07dadadathanks for explaining the reason why to me
20:06:04Yardanicowell I'm not 100% sure that's the reason
20:09:08FromGitter<kdheepak> dadada: looking forward to it being announced!
20:11:17*chemist69 quit (Ping timeout: 244 seconds)
20:11:41*chemist69 joined #nim
20:43:43FromDiscord<Max [codingreaction]> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/711317980780429413
20:44:12FromDiscord<Max [codingreaction]> description is a string that comes from readLine
20:44:19FromDiscord<Max [codingreaction]> ``` var description = readLine(stdin) ```
20:45:32dadadaI think import macros should be default on play.nim-lang
20:45:57dadadawho's with me? I've felt this way for months, finally this has become ridiculous
20:46:08dadadathe number of times I've typed in import macros, jeez
20:46:23FromDiscord<Clyybber> ?
20:46:32FromDiscord<Yardanico> @Max [codingreaction] that's not how you do it
20:46:42FromDiscord<Yardanico> ```↵ todoList.append((false, description)) ↵```
20:46:56FromDiscord<Yardanico> or named tuples↵```↵ todoList.append((status: false, description: description)) ↵```
20:47:39FromDiscord<Yardanico> ah wait actually you need to append a singly linked node
20:47:55FromDiscord<Yardanico> Btw do you actually need a singly linked list? is a seq not enough for you?
20:48:12FromDiscord<Yardanico> yeah you can just use append
20:48:52Yardanico@max https://play.nim-lang.org/#ix=2mgA
20:50:22alehander92dadada, i dont agree it can be confusing for people copying code from there
20:50:27Yardanicoyep
20:50:48alehander92you can just have a local setup which passes it somehow on compile flags
20:51:08alehander92or there can be some option to auto-add common imports in the editor
20:51:49dadadaalehander92: how about "templates", a combobox that you can select common patterns from
20:52:02dadadatemplates for working with macros and tables and such
20:52:42dadadaalso containing a basic macro and proc named testMac testProc
20:53:05dadadamaybe this would also help new people to discover features faster
20:56:38FromDiscord<Max [codingreaction]> @Yardanico thanks for the example, i stopped for a momment following the tutorial 1 to try writing the classic TODO list implementation and searched for linked list, as arrays need to know size in compiled time, so i landed over this doc entry (pretty cool organized, i like the format) but the newSinglyNode thing was confusing.↵https://nim-lang.org/docs/lists.html↵↵And i started to think "oh no, this'll escalated to ver
20:57:03Yardanicowell you can just use sequences
20:57:21YardanicoSequences in nim are a type which can hold a (runtime changeable) number of instances of same type
20:57:34Yardanico!eval var a: seq[int]; a.add(5); a.add(3); echo a
20:57:36NimBot@[5, 3]
20:58:31alehander92dadada, well, maybe? sounds like snippets in some editors
20:58:41alehander92it's more work tho: so someones has to do it
20:59:19*s4mu3lbk quit (Read error: Connection reset by peer)
20:59:34*PMunch joined #nim
20:59:55*s4mu3lbk joined #nim
21:04:54FromDiscord<exelotl> sent a code paste, see http://ix.io/2mgE
21:05:20Yardanicois it not invoked in the file that called the template?
21:05:44*liblq-dev quit (Quit: WeeChat 2.8)
21:05:47FromDiscord<exelotl> doesn't seem like it
21:06:37alehander92guys
21:06:46alehander92so, do you have experience with openmp
21:07:35*waleee-cl quit (Quit: Connection closed for inactivity)
21:13:13*fredrikhr quit (Ping timeout: 258 seconds)
21:27:24*solitudesf- quit (Ping timeout: 265 seconds)
21:27:26*s4mu3lbk quit (Remote host closed the connection)
21:36:44FromGitter<bung87> @alehander92 do you know is there a tool I can trace js function calls and get info eg. integer or float?
21:37:00FromGitter<bung87> params's info
21:47:32Yardanicothat's the most fun part :P
21:53:39FromGitter<bung87> I expeacting it is easy part
22:01:23FromGitter<bung87> hmm, even there is , still need that project has enough tests cover all case..
22:01:56FromGitter<bung87> given up it.
22:02:14*fredrikhr joined #nim
22:02:58*PMunch quit (Quit: leaving)
22:16:40FromDiscord<Max [codingreaction]> ok, i think that is time to investigate about slices, as i'm not finding a way to count the number of elements of a linked list without writing myself a procedure to iterate from head to tail 😋 or does a hidden magically "count" exists? 😮
22:22:49FromGitter<bung87> store it modify every time you modify the data
22:23:46*arecaceae quit (Ping timeout: 256 seconds)
22:24:45*arecaceae joined #nim
22:26:12FromDiscord<Max [codingreaction]> neat, i didn't tought about that, thanks!↵Time to learn about the named types
22:26:20FromDiscord<Max [codingreaction]> ```type Kitten = object ## Documentation Here↵proc purr(self: Kitten) = echo "Purr Purr"↵Kitten().purr()```
22:26:29FromDiscord<Max [codingreaction]> This page is pretty cool
22:26:30FromDiscord<Max [codingreaction]> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
22:29:59zacharycarterwhat's the idiomatic Nim way to handle the C/C++ pattern of allowing a type to accept a pointer to user data?
22:30:11zacharycartershould I use parametric polymorphism and like a `ref T`?
22:30:19zacharycarteror just use a `pointer`?
22:30:55FromGitter<bung87> if it is any using pointer
22:31:19FromGitter<bung87> if it is ptr of type using `ptr A`
22:31:39zacharycarterwell in C it can typically accept a pointer to whatever right
22:31:41zacharycartertype doesn't matter
22:31:55FromGitter<bung87> just pointer is fine
22:32:38zacharycarterbut is that really the idomatic way? I figured there was a safer way with Nim
22:34:57FromGitter<bung87> maybe you should go check niminterop
22:35:08zacharycartereh I'm not really interested in interoping with C code though here
22:35:23zacharycarterI'll start with pointer and see if I can replace it with something later
22:36:07FromGitter<bung87> type constrain if from you or nim side
22:37:59FromGitter<bung87> if the c func accept pointer param what ever you pass it , it will handle as a pointer
22:51:28*Senketsu joined #nim
23:07:48*krux02_ joined #nim
23:11:09*Hideki joined #nim
23:11:33*Hideki is now known as Guest87226
23:11:48*krux02 quit (Ping timeout: 265 seconds)
23:27:10*disruptek quit (Ping timeout: 256 seconds)
23:27:40*Guest87226 quit (Remote host closed the connection)
23:27:49*disbot quit (Ping timeout: 246 seconds)
23:31:01*caff joined #nim
23:32:15*exelotl joined #nim
23:33:19*disruptek joined #nim
23:33:23*rockcavera joined #nim
23:34:14*disbot joined #nim
23:34:32FromDiscord<Max [codingreaction]> how could i do an echo without an automatic line break at the end?
23:36:37exelotldom96: hey, I was wondering, by my vague understanding, would it be possible to use https://github.com/liseki/enim to make page templates that write directly to the socket without doing string concatenation?
23:36:54exelotl(I mean, using it with httpbeast)
23:45:14*zacharycarter quit (Ping timeout: 272 seconds)
23:50:19*sz0 quit (Quit: Connection closed for inactivity)
23:56:03FromGitter<bung87> it seems nim-chronos use it
23:58:48FromDiscord<Max [codingreaction]> i found a solution on reddit (for the echo without newline thing) https://www.reddit.com/r/nim/comments/byob7v/is_there_an_alternative_to_echo_that_does_not/
23:59:03FromDiscord<Max [codingreaction]> [and it works 😉 ]