00:00:05 | dadada | :D |
00:04:16 | Prestige | Hm is there an idiomatic way to execute an iterator in reverse or should I just redefine the iterator? |
00:05:11 | FromDiscord | <Rika> you cannot execute an iterator in reverse without running through the whole iterator |
00:05:44 | FromDiscord | <Rika> defining a reversed version will be more efficient afiak |
00:05:45 | FromDiscord | <Rika> afaik |
00:06:10 | FromDiscord | <Generic> Nim iterators are only meant to go forward |
00:06:11 | Prestige | Cool, 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:11 | Prestige | Hm 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:25 | Prestige | Perhaps there's an easier way to do this with a template though |
00:28:35 | FromDiscord | <Rika> its not a closure iterator |
00:31:17 | Prestige | Thanks @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:47 | zacharycarter | what's the idiomatic way to do bitflags in Nim? A set and enum with a size of 2? |
00:53:59 | disruptek | size of whatever. |
00:54:07 | zacharycarter | okay |
00:54:18 | zacharycarter | thanks |
00:54:18 | disruptek | does it go into c? |
00:54:29 | zacharycarter | maybe - that's why I was saying size of 2 |
00:54:48 | zacharycarter | but I guess if it doesn't the size is not relevant |
00:54:50 | disruptek | yeah, {.size: sizeof(int32).} or w/e. |
00:54:55 | disruptek | for the enum. |
00:54:56 | zacharycarter | alright thanks |
00:55:18 | disruptek | there's a bitops module but it's, y'know, not the idiomatic method you asked for. |
00:55:28 | zacharycarter | oh I'll check that out too |
00:56:16 | disruptek | `and` and `or` are & and | for integers, of course. |
00:57:34 | zacharycarter | yeah I figured that I'd just used distinct ints for this previously |
00:57:52 | zacharycarter | but I'm writing a Nim library not a bunch of code interoping with C |
00:57:55 | FromDiscord | <Rika> it is best to use sets and enums |
00:57:57 | zacharycarter | so I figured I'd try to make it somewhat idiomatic |
00:58:07 | zacharycarter | alright cool |
00:58:13 | disruptek | sets and enums are just so nice to use. |
00:58:14 | FromDiscord | <Rika> you can convert a set into an int w/ proper bits set with cast |
00:58:22 | FromDiscord | <Rika> if you ever need the int |
00:58:37 | zacharycarter | gotcha |
00:59:28 | zacharycarter | Rika: so basically to be safe just set the size of the enum to int32 and assign the bits as the ordinal? |
00:59:38 | zacharycarter | then I'm good in both situations? |
01:00:14 | FromDiscord | <Rika> ordinal? |
01:00:22 | FromDiscord | <Rika> me dumb, me no understand |
01:00:25 | zacharycarter | so like |
01:02:29 | disruptek | to be safe i wouldn't use cast, fwiw. |
01:02:54 | zacharycarter | https://play.nim-lang.org/#ix=2mbh |
01:03:15 | zacharycarter | something like that? |
01:03:23 | zacharycarter | and use that with `set` |
01:04:50 | * | lritter quit (Ping timeout: 272 seconds) |
01:05:45 | zacharycarter | meh 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:25 | disruptek | are you passing the values to c? |
01:07:51 | disruptek | point being that enums w/o holes are preferable. |
01:08:16 | disruptek | so maybe just have a template or proc that shifts them if you need to pass them. |
01:08:42 | disruptek | support for enums with holes is less... comprehensive... in the compiler. |
01:14:24 | zacharycarter | gotcha thanks |
01:15:01 | zacharycarter | I might be passing them to a proc that's loaded from a dynamic library compiled in Nim |
01:15:08 | zacharycarter | err that's written in Nim and compiled to C |
01:15:15 | zacharycarter | but if that's the case I'll do what you described |
01:15:24 | zacharycarter | if it just is used in the host program I don't have to worry about it sounds like so cool |
01:15:43 | disruptek | yeah. |
01:16:10 | zacharycarter | cool thanks guys |
01:16:17 | disruptek | i do a lot of SomeEnum.low .. SomeEnum.high and only discovered recently that it's broken for enums with holes. |
01:16:25 | disruptek | or, it was. it's fixed but only in devel iirc. |
01:16:38 | disruptek | as an example. |
01:22:02 | FromDiscord | <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:24 | zacharycarter | what is your compile command? |
01:26:45 | zacharycarter | Synth ^ |
01:27:02 | FromDiscord | <Synth> It's: `nim c -d:ssl -r main.nim` |
01:28:28 | zacharycarter | what does `nim -v` output? |
01:29:13 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2mbo |
01:29:32 | * | Guest82230 quit (Remote host closed the connection) |
01:29:45 | zacharycarter | do you have the dll for ssl in the same directory as the nim exe? |
01:29:58 | zacharycarter | I don't know what it's named on windows |
01:30:03 | FromDiscord | <Synth> I don't think so... |
01:30:08 | zacharycarter | well you need to |
01:30:20 | * | Hideki joined #nim |
01:30:20 | FromDiscord | <Synth> Where could I find that possibly? |
01:30:31 | zacharycarter | probably on the Nim install page but let me look |
01:30:39 | FromDiscord | <Synth> Okay, thank you! |
01:30:44 | * | Hideki is now known as Guest58828 |
01:31:49 | FromDiscord | <Synth> Well... I found this page... <https://nim-lang.org/docs/openssl.html> |
01:33:20 | FromDiscord | <Synth> I think I found the solution, one second... |
01:33:45 | * | zacharyc1rter joined #nim |
01:33:50 | zacharyc1rter | power went out my bad |
01:33:53 | zacharyc1rter | did that work for you Synth? |
01:34:09 | FromDiscord | <Synth> I'm testing it, one second haha |
01:34:13 | FromDiscord | <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:52 | FromDiscord | <Technisha Circuit> How do i make wheel for a Python made in Nim |
01:44:14 | Prestige | Is 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:51 | leorize[m] | `=deepCopy` |
01:46:13 | Prestige | Neat |
01:51:29 | FromDiscord | <Synth> Aww it didn't work |
01:52:38 | Prestige | Actually using a template worked |
01:53:23 | FromDiscord | <Rika> zacharycarter: very slr, but sets have a bit per item |
01:53:27 | * | zacharyc1rter joined #nim |
01:53:31 | FromDiscord | <Rika> so enums that go 1, 2, 3 are good enough |
01:53:43 | zacharyc1rter | crazy thunderstorm in Austin |
01:53:51 | FromDiscord | <Rika> was discussing something, so slr |
01:54:31 | Prestige | Does this look sensible? https://0x0.st/iL3t.png On the right, invoking the template (line 361) |
01:54:54 | Prestige | As a way to reuse the iterator, I maen |
01:54:56 | Prestige | mean* |
01:57:05 | FromDiscord | <Rika> i think its fine |
02:00:33 | FromDiscord | <Synth> > did that work for you Synth?↵It didn't... |
02:00:53 | FromDiscord | <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:10 | FromDiscord | <Technisha Circuit> @Synth |
02:36:28 | FromDiscord | <Technisha Circuit> Anyone able to help my buddy Synth? |
02:37:24 | FromDiscord | <codic> xd |
02:38:35 | FromDiscord | <Synth> Hahaha |
02:39:41 | FromDiscord | <Technisha Circuit> :P |
02:40:17 | FromDiscord | <Rika> > can you screenshot the command and the error↵@Synth |
02:40:57 | FromDiscord | <Synth> Yes, will do |
02:42:44 | * | nekits quit (Read error: Connection reset by peer) |
02:43:14 | * | nekits joined #nim |
02:43:56 | FromDiscord | <KingDarBoja> I love the synth wave profile pic |
02:44:01 | FromDiscord | <Synth> https://media.discordapp.net/attachments/371759389889003532/711046267169669120/unknown.png |
02:44:04 | FromDiscord | <Synth> Thank you! |
02:44:09 | FromDiscord | <Synth> Took me like 30min to make it haha |
02:44:17 | FromDiscord | <KingDarBoja> neat |
02:47:29 | FromDiscord | <codic> @Rika there |
02:47:54 | FromDiscord | <Rika> i am aware |
02:48:47 | FromDiscord | <codic> o |
02:53:31 | FromDiscord | <Rika> weird, if i use linux pwsh, its just fine https://media.discordapp.net/attachments/371759389889003532/711048656744087552/unknown.png |
02:55:42 | FromDiscord | <Synth> Yeah... |
02:55:50 | * | Hideki joined #nim |
02:56:14 | * | Hideki is now known as Guest50032 |
02:56:45 | FromDiscord | <Rika> try updating powershell xd |
02:57:58 | zacharyc1rter | maybe submit a bug |
02:58:13 | zacharyc1rter | it should just work right |
02:59:29 | zacharyc1rter | although often these types of issues are hard to reproduce |
02:59:42 | zacharyc1rter | it'd be better if someone else could reproduce it on a windows machine before filing a bug |
02:59:58 | zacharyc1rter | how'd you install Nim? from source or with chosenim or did you download binaries? |
03:06:36 | zacharyc1rter | Synth ^ |
03:07:14 | * | Guest50032 quit (Ping timeout: 258 seconds) |
03:08:06 | FromDiscord | <codic> oo yakuake (yakuake ftw) |
03:08:13 | FromDiscord | <Synth> I installed it with scoop |
03:08:30 | FromDiscord | <codic> Scoop, my good old friend |
03:08:32 | FromDiscord | <Synth> `scoop install nim` |
03:08:39 | FromDiscord | <codic> I used that so much when I was on windows haha |
03:08:47 | FromDiscord | <codic> Try using the binaries from the official pag |
03:08:50 | FromDiscord | <codic> (edit) 'pag' => 'page' |
03:08:56 | FromDiscord | <codic> Scoop sometimes changes stuff |
03:10:39 | FromDiscord | <Synth> Oh? |
03:11:34 | FromDiscord | <codic> yeah |
03:11:51 | FromDiscord | <codic> I remember that for me python native extensions didn't work haha |
03:13:10 | FromDiscord | <Synth> Hmm... |
03:13:21 | FromDiscord | <Synth> I’ll try installing Nim via executable then |
03:13:26 | * | zacharyc1rter quit (Ping timeout: 256 seconds) |
03:13:47 | FromDiscord | <codic> nice |
03:14:01 | FromDiscord | <codic> https://nim-lang.org/install_windows.html |
03:14:01 | FromDiscord | <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:17 | FromDiscord | <codic> so do i |
03:14:20 | FromDiscord | <codic> xD |
03:15:02 | FromGitter | <zacharycarter> best way to install Nim is from source |
03:15:39 | FromGitter | <zacharycarter> I booted up my windows machine though just in case I need to verify any issues |
03:16:21 | FromGitter | <zacharycarter> Also because my power is out and my mac is about to die |
03:18:28 | FromDiscord | <codic> ~~linux time!~~ |
03:19:29 | Prestige | ^ |
03:20:00 | FromGitter | <zacharycarter> no thanks |
03:20:10 | FromGitter | <zacharycarter> I meant it's about to run out of battery |
03:20:32 | FromGitter | <zacharycarter> not turn into a pumpkin |
03:20:41 | FromDiscord | <Rika> are you sure about that |
03:20:51 | Prestige | Seems there's something incorrect here about my params (lines 383 and 389) https://0x0.st/iLYZ.png Anyone mind taking a look? |
03:20:55 | FromGitter | <zacharycarter> yeah, it's still more useful than a linux box |
03:21:20 | Prestige | I 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:22 | FromGitter | <zacharycarter> can't you post source code instead of an image? |
03:22:08 | FromGitter | <zacharycarter> why do you have a void return type? |
03:22:12 | Prestige | @zacharycarter like all of it? I think it's likely just a syntax issue, but there's a lot of code |
03:22:15 | FromGitter | <zacharycarter> just don't return anything... |
03:22:29 | FromGitter | <zacharycarter> or just a reproducible example |
03:22:56 | Prestige | it was giving me an error earlier so I was adding that to get it to work |
03:22:56 | FromGitter | <zacharycarter> it's a template so it's hard to debug from a screenshot |
03:23:08 | FromGitter | <zacharycarter> well adding void isn't going to help, I'm sure of that |
03:23:39 | FromGitter | <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:23 | FromGitter | <zacharycarter> I mean just the code you posted |
03:26:24 | FromGitter | <zacharycarter> nothing else |
03:26:30 | Prestige | Yeah working on it |
03:26:57 | FromGitter | <zacharycarter> cool |
03:31:19 | Prestige | Ok I think this example is the same https://play.nim-lang.org/#ix=2mbD |
03:31:24 | Prestige | Getting the same error at least |
03:31:35 | Prestige | expr: param not init client_3382078 |
03:32:36 | FromDiscord | <Rika> ooh, thats an internal error |
03:33:24 | Prestige | So, not because of my code being incorrect? |
03:34:19 | FromDiscord | <Rika> internal errors are usually compiler bugs afaik |
03:34:44 | Prestige | I thought it was odd that nimsuggest didn't complain |
03:35:09 | Prestige | Should I report this example? |
03:36:26 | FromDiscord | <Rika> perhaps |
03:41:18 | Prestige | Okay time to try a different approach |
03:42:31 | FromGitter | <zacharycarter> looking now |
03:42:51 | Prestige | So 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:20 | disruptek | the code is fine. |
03:44:22 | disruptek | use a proc. |
03:44:45 | Prestige | Using a proc doesn't compile disruptek unless you mean something else? |
03:45:06 | disruptek | use a proc for exec on client() |
03:45:17 | disruptek | or whatever your template was called. |
03:45:31 | * | dadada quit (Ping timeout: 265 seconds) |
03:45:40 | FromGitter | <zacharycarter> it dones compile |
03:45:44 | FromGitter | <zacharycarter> https://play.nim-lang.org/#ix=2mbF |
03:46:27 | disruptek | templates are like c's macros in that they are designed to rubber-stamp ast into place. |
03:46:46 | disruptek | much more powerful, obviously, but still that level of crude behavior. |
03:46:47 | Prestige | oh, interesting |
03:47:07 | Prestige | I was using a template for a reason at first but was hard refactoring |
03:47:08 | FromDiscord | <Elegant Beef> More powerful than a stamp? 😄 |
03:47:09 | Prestige | Thanks for the help |
03:47:16 | disruptek | if you want to compose arbitrary ast you use a nim macro. |
03:47:32 | disruptek | but in general, use the simplest tool for the job. |
03:47:42 | disruptek | this lets you go up in abstraction whenever necessary. |
03:48:28 | disruptek | mostly, you use templates to wrap code around arbitrary bodies, etc. |
03:48:35 | FromDiscord | <Technisha Circuit> ~~How hard would it be to implement a python interpreter in Nim?~~ |
03:48:49 | FromDiscord | <Elegant Beef> You python addicts 😄 |
03:48:57 | FromGitter | <zacharycarter> one way to find out |
03:48:57 | FromDiscord | <Technisha Circuit> Hahahaha |
03:49:07 | FromDiscord | <Technisha Circuit> Try it I'm assuming? |
03:49:23 | FromGitter | <zacharycarter> a better question would be - how hard would it be to implement a python interpreter |
03:49:34 | FromGitter | <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:46 | disruptek | pointless. |
03:49:56 | FromDiscord | <Elegant Beef> Just wait for pmunch's nimscript implementation and problem solve |
03:49:58 | FromDiscord | <Elegant Beef> solved* |
03:50:00 | FromGitter | <zacharycarter> and the answer is probably - it depends on your programming expertise |
03:50:02 | FromGitter | <zacharycarter> but yeah |
03:50:06 | FromGitter | <zacharycarter> why do you even want to do this? |
03:50:19 | FromDiscord | <Elegant Beef> Like do you want a scripting language or do you just want to use python |
03:50:26 | FromDiscord | <Elegant Beef> Cause one of those two is very easy to solve |
03:50:37 | disruptek | they are both easy to solve. |
03:50:53 | disruptek | they are both easy to solve.^W^W^Wsolved. |
03:50:58 | FromGitter | <zacharycarter> if you want to use python just go use python |
03:51:28 | FromGitter | <zacharycarter> I think Nim being consumable from python makes sense - otherwise I don't get it |
03:52:05 | FromDiscord | <Elegant Beef> What do you mean by "consumable" |
03:52:12 | FromDiscord | <Rika> usable |
03:52:26 | FromGitter | <zacharycarter> like I should be able to write some Nim code and use it in my Python code |
03:52:28 | disruptek | i think maybe i cannot do compiler work on stream. |
03:52:36 | disruptek | i can't believe how stupid my code is. |
03:52:49 | FromGitter | <zacharycarter> I think russian mafia videos distract you too much |
03:52:53 | FromGitter | <zacharycarter> play doh silencers |
03:54:06 | Prestige | Streaming and writing code is not fun |
03:54:47 | * | dadada joined #nim |
03:55:00 | FromDiscord | <Elegant Beef> Just lose all your self respect |
03:55:05 | FromDiscord | <Elegant Beef> Then you dont care about your code |
03:55:08 | disruptek | at least i can fix it, but jesus. |
03:55:10 | * | dadada is now known as Guest3362 |
03:55:33 | FromDiscord | <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:46 | FromDiscord | <Technisha Circuit> And i was planning on a small implementation of Python |
03:55:53 | FromDiscord | <Technisha Circuit> Or just a transpiler |
03:55:58 | Prestige | nimscript |
03:57:30 | FromDiscord | <Rika> there's wren |
03:57:35 | FromDiscord | <Rika> there's lua |
03:57:42 | FromDiscord | <Rika> theres nimscript if you really want that |
03:58:01 | FromDiscord | <Technisha Circuit> Lua? For Nim? |
03:58:26 | FromDiscord | <Rika> yeah why? lua is really a scripting language aint it |
03:58:30 | FromDiscord | <Technisha Circuit> Nice |
03:58:39 | FromDiscord | <Technisha Circuit> I don't use Lua personally |
04:01:07 | disruptek | !repo lunacy |
04:01:09 | disbot | https://github.com/disruptek/lunacy -- 9lunacy: 11 15 6⭐ 0🍴 |
04:01:46 | * | silvernode joined #nim |
04:02:04 | Prestige | great repo name |
04:03:23 | disruptek | well, IC now compiles code again. |
04:04:58 | FromGitter | <zacharycarter> niceeeee |
04:05:16 | FromGitter | <zacharycarter> Technisha Circuit - I'm still having trouble understanding what you want to do |
04:05:30 | FromDiscord | <Elegant Beef> Seems they want a scripting language |
04:05:37 | FromGitter | <zacharycarter> yeah but why |
04:05:37 | FromDiscord | <Elegant Beef> Im uncertain the application |
04:05:49 | FromGitter | <zacharycarter> what's the end goal |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:41 | * | supakeen joined #nim |
04:07:31 | FromDiscord | <Technisha Circuit> I'd want to write a python-like DSL for Dimscord because i want something to do :P |
04:07:49 | FromGitter | <zacharycarter> what does python-like mean? |
04:07:58 | FromGitter | <zacharycarter> and if you want to write a DSL, just use Nim and macros? |
04:09:05 | FromDiscord | <Technisha Circuit> How do i use a macro? 😅 |
04:09:17 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/macros.html |
04:09:23 | FromDiscord | <Technisha Circuit> Thanks |
04:09:28 | FromDiscord | <Elegant Beef> Dumptree is your friend |
04:09:45 | FromDiscord | <Technisha Circuit> Dumptree? |
04:09:51 | FromGitter | <zacharycarter> maybe look at - https://github.com/search?l=&o=desc&q=dsl+language%3ANim&s=stars&type=Repositories |
04:10:04 | FromGitter | <zacharycarter> if you want to see how some existing DSLs are implemented with Nim |
04:10:06 | FromDiscord | <Elegant Beef> it's a macro inside macros that let's you dump the AST of written nim code |
04:10:18 | FromDiscord | <Elegant Beef> So you can know what you have to replicate |
04:10:21 | FromDiscord | <Elegant Beef> Atleast that's how i use it |
04:10:39 | FromGitter | <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:45 | FromDiscord | <Elegant Beef> Macro's imo arent difficult, just super super annoying 😄 |
04:11:52 | * | Guest82605 quit (Remote host closed the connection) |
04:12:00 | FromDiscord | <Technisha Circuit> Thanks :P |
04:12:30 | FromGitter | <zacharycarter> just be sure you need a macro before you write one :) |
04:12:45 | FromDiscord | <Technisha Circuit> Aaa Mobile chrome is annoying ;-; |
04:13:00 | FromGitter | <zacharycarter> but if you're authoring a DSL then you'll probably need to use them |
04:13:06 | FromDiscord | <Elegant Beef> > Aaah mobile is annoying↵FTFY |
04:14:07 | FromDiscord | <Technisha Circuit> Thanks |
04:15:32 | FromDiscord | <Technisha Circuit> > FTFY↵What meaning are you using? Because urban dictionary isnt the helping :PPPpPPpPPPp |
04:15:43 | FromDiscord | <Rika> fixed that for you |
04:15:46 | FromDiscord | <Elegant Beef> ^ |
04:16:01 | disruptek | fuck, that feels yummy. |
04:16:07 | FromDiscord | <Technisha Circuit> Okay thanks :P |
04:16:09 | FromDiscord | <Technisha Circuit> What- |
04:16:19 | FromGitter | <zacharycarter> lol |
04:16:21 | FromDiscord | <Elegant Beef> "feels yummy" is a deeply disturbing phrase |
04:16:27 | FromDiscord | <Technisha Circuit> ^^ |
04:16:39 | FromDiscord | <KingDarBoja> lol |
04:17:14 | disruptek | that reminds me, i have some yummy pr0n waiting. |
04:17:17 | disruptek | peace. |
04:17:23 | FromGitter | <zacharycarter> just imagine your sense of taste is swapped with your sense of touch |
04:17:29 | FromGitter | <zacharycarter> and it's not so weird anymore |
04:17:46 | FromDiscord | <Elegant Beef> Also is it a complete bodge to use a proc inside a macro for a specific signature? |
04:17:49 | FromDiscord | <KingDarBoja> disruptek: have a good wank :v |
04:17:57 | FromGitter | <zacharycarter> fapfapfapfapfap |
04:18:23 | FromGitter | <zacharycarter> do you mean call a proc in a macro |
04:18:33 | FromDiscord | <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:39 | FromGitter | <zacharycarter> if it's a compile time proc you can |
04:18:56 | FromDiscord | <Elegant Beef> Im not actually using the proc, just it's symbol |
04:18:59 | FromDiscord | <Elegant Beef> I know it's a bodge 😄 |
04:19:41 | FromDiscord | <Elegant Beef> This is what im doing↵https://play.nim-lang.org/#ix=2mbG |
04:19:57 | FromDiscord | <Elegant Beef> It's clearly a bodge, just curious what's a smarter method |
04:20:17 | FromGitter | <zacharycarter> user defined pragma maybe? |
04:20:41 | FromDiscord | <Elegant Beef> Huh? |
04:21:11 | FromGitter | <zacharycarter> https://nim-lang.org/docs/manual.html#userminusdefined-pragmas-custom-annotations |
04:21:29 | FromDiscord | <Elegant Beef> Yea but how does that help? |
04:21:48 | FromDiscord | <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:55 | FromGitter | <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:26 | FromGitter | <zacharycarter> I guess maybe I'm not understanding what you're trying to do |
04:22:35 | FromGitter | <zacharycarter> you're trying to mark an argument as required? |
04:22:46 | FromGitter | <zacharycarter> oh on the invocation of your macro |
04:22:49 | FromDiscord | <Elegant Beef> Well my macro makes constructors |
04:22:57 | FromGitter | <zacharycarter> I got you now |
04:23:01 | FromDiscord | <Elegant Beef> Ah ok |
04:23:21 | FromDiscord | <Elegant Beef> Like there has to be something better than the abuse of that poor little symbol |
04:23:22 | FromDiscord | <Elegant Beef> 😄 |
04:23:56 | FromDiscord | <Elegant Beef> I was thinking i could use "" |
04:24:20 | FromDiscord | <Technisha Circuit> Can i do `let a, b = "a", "b"`? |
04:24:45 | * | dadada__ joined #nim |
04:24:59 | FromDiscord | <Elegant Beef> the nim way is to indent and do a/b independantly i'd say |
04:25:39 | FromDiscord | <Elegant Beef> as such https://play.nim-lang.org/#ix=2mbH |
04:26:25 | FromDiscord | <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:16 | FromGitter | <zacharycarter> yeah playing around with this now |
04:31:53 | FromDiscord | <flywind> !eval let (a, b) = ("a", "b") |
04:31:56 | NimBot | <no output> |
04:32:16 | FromDiscord | <Rika> you didnt echo them |
04:34:04 | FromDiscord | <flywind> no output means no error 🙂 |
04:34:22 | FromDiscord | <Technisha Circuit> Okay, thanks |
04:34:40 | FromDiscord | <flywind> np |
04:35:31 | FromDiscord | <Rika> i mean technically this would work too |
04:35:37 | FromDiscord | <Rika> !eval let a, b = ("a", "b") |
04:35:39 | NimBot | <no output> |
04:35:40 | FromDiscord | <Rika> would it not |
04:35:42 | FromDiscord | <Rika> see |
04:35:47 | FromDiscord | <Rika> it works too, just not as expected |
04:36:17 | FromDiscord | <Technisha Circuit> So should i do them separately instea? |
04:36:25 | FromDiscord | <Technisha Circuit> > it works too, just not as expected↵Wdym? |
04:36:36 | FromDiscord | <Elegant Beef> Seperately is way more readable imo |
04:37:26 | FromDiscord | <Technisha Circuit> Okay |
04:38:02 | FromDiscord | <Rika> !eval let a, b = ("a", "b"); echo a; let (c, d) = ("a", "b"); echo c |
04:38:05 | NimBot | ("a", "b")↵a |
04:38:10 | FromDiscord | <Rika> @Technisha Circuit |
04:38:53 | FromDiscord | <Technisha Circuit> Oh? |
04:38:58 | FromDiscord | <Technisha Circuit> That's weird |
04:39:16 | FromDiscord | <Technisha Circuit> Wait |
04:39:17 | FromDiscord | <Rika> one assigns the whole value, the other destructures the tuple |
04:39:18 | FromDiscord | <Technisha Circuit> Nvm |
04:39:24 | kungtotte | It's not weird, what should be the output of let a, b = 1 |
04:39:27 | silvernode | I 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:28 | FromDiscord | <Technisha Circuit> Ooh okay |
04:40:06 | FromDiscord | <Technisha Circuit> So the first way is assigning `("a", "b")` to a and b |
04:40:15 | FromDiscord | <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:24 | FromGitter | <zacharycarter> ElegantBeef: sorry I got distracted, my dog is freaking out from this storm |
05:01:32 | FromGitter | <zacharycarter> can't you do something like - https://play.nim-lang.org/#ix=2mbJ |
05:06:16 | FromDiscord | <Elegant Beef> Uhh no at compile it complains undeclared identifier |
05:06:20 | FromDiscord | <Rika> you can ping with an @ on their name |
05:06:50 | FromDiscord | <Rika> beef, you shouldnt be getting that |
05:07:02 | FromDiscord | <Rika> can you supply the updated code or something |
05:08:45 | FromDiscord | <Elegant Beef> Well here is the entire macro code↵<https://github.com/beef331/constructor/blob/test/src/constructor.nim> |
05:08:53 | FromDiscord | <Elegant Beef> The hideous, hideous macro |
05:10:11 | FromDiscord | <Elegant Beef> Dropping the proc it does not compile |
05:14:50 | FromDiscord | <Elegant Beef> I might be blind but i dont see why mine behaves differently |
05:17:54 | FromDiscord | <Elegant Beef> Ok |
05:17:57 | FromDiscord | <Elegant Beef> so it's the expNode |
05:18:03 | FromDiscord | <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:47 | FromDiscord | <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:54 | FromDiscord | <Technisha Circuit> Does Dimscord have a discord server? |
06:09:38 | FromDiscord | <Elegant Beef> Im going to say certainly not |
06:09:55 | FromDiscord | <Elegant Beef> Fragmentation of a rather small community probably wouldnt be wise |
06:11:42 | FromDiscord | <Elegant Beef> Why do you even want that? |
06:11:47 | FromDiscord | <Technisha Circuit> Okay then :P |
06:12:37 | FromDiscord | <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:37 | FromDiscord | <Elegant Beef> Im not going to suggest bothering the developer but they're in this server 😄 |
06:16:11 | FromDiscord | <Technisha Circuit> Hahaha |
06:18:44 | * | Guest15817 quit (Ping timeout: 256 seconds) |
06:19:26 | FromDiscord | <Rika> Dimscord does have a server as far as I know |
06:19:35 | FromDiscord | <Elegant Beef> Oh |
06:19:54 | FromDiscord | <Rika> Its not fun typing on an eink reader |
06:20:29 | FromDiscord | <Technisha Circuit> Oh? |
06:21:00 | FromDiscord | <Technisha Circuit> Is there an invite somewhere? I can't find it in the readme (but that's why i have glasses `:)`) |
06:21:43 | FromDiscord | <Rika> Its been posted somewhere in this discord |
06:21:56 | FromDiscord | <Technisha Circuit> Oh? |
06:22:30 | FromDiscord | <Yardanico> Yeah, I'm in that server, and let's move to offtopic |
06:22:34 | FromDiscord | <Yardanico> Good morning btw |
06:23:31 | FromDiscord | <Technisha Circuit> Found it |
06:23:32 | FromDiscord | <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:20 | FromDiscord | <KingDarBoja> Good night |
07:12:56 | FromDiscord | <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:08 | planetis[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:32 | FromDiscord | <Rika> yes |
08:26:04 | * | s4mu3lbk joined #nim |
08:28:05 | planetis[m] | its a common pattern in nim |
08:31:08 | planetis[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:28 | FromDiscord | <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:19 | FromDiscord | <InventorMatt> https://play.nim-lang.org/#ix=2mcj |
08:52:31 | FromDiscord | <InventorMatt> like how could I make this work? |
08:53:51 | * | letto joined #nim |
08:55:38 | FromGitter | <bung87> `type ⏎ Dollars {.borrow: `$`.} = distinct float ⏎ ` |
09:05:22 | FromDiscord | <InventorMatt> i'm getting an error /usercode/in.nim(2, 19) Error: a type can only borrow `.` for now |
09:09:47 | FromGitter | <bung87> oh, so it not support yet |
09:13:30 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2mcp |
09:14:11 | FromDiscord | <InventorMatt> that solved it. thank you so much |
09:14:35 | FromDiscord | <flywind> np |
09:20:42 | FromDiscord | <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:42 | FromDiscord | <Synth> Please ping me once someone is able to help me |
09:28:16 | * | konvertex joined #nim |
09:35:58 | planetis[m] | Synth: it means you use MZ before you declare it, whatever it is. variable, constant, type, etc |
09:36:16 | FromDiscord | <Synth> Oh? |
09:36:56 | FromDiscord | <Synth> But it says line one first char... |
09:37:00 | FromDiscord | <Synth> I'm confused |
09:37:08 | FromDiscord | <Synth> (edit) 'But it says ... line' => 'But it saysthe error is at' |
09:38:52 | planetis[m] | Can you post a snippet? |
09:40:40 | FromDiscord | <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:07 | FromDiscord | <dom96> or actually, it might be better to use Binaryen |
09:52:35 | FromDiscord | <Synth> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/711154115782377492 |
09:52:41 | FromDiscord | <Synth> O |
09:52:48 | FromDiscord | <Synth> (edit) 'O' => 'I'm just trying to make a discord bot' |
09:52:49 | FromDiscord | <Synth> (edit) 'I'm just trying to make a discord bot ... ' => 'I'm just trying to make a discord bothaha' |
09:53:22 | FromDiscord | <Recruit_main707> dont paste the code in here, or it doesnt look like shit in irc already? |
09:53:57 | dom96 | it doesn't :) |
09:54:04 | dom96 | Massive thanks to Yardanico |
09:54:11 | FromDiscord | <Recruit_main707> nice |
09:58:07 | * | krux02 joined #nim |
10:11:02 | FromDiscord | <KrispPurg> @Synth, what did you use to install Nim? |
10:16:41 | FromDiscord | <KrispPurg> If you installed from the website, try using choosenim if choosenim does not work, use choosenim 0.4.0 |
10:16:52 | FromDiscord | <KrispPurg> (edit) 'If you installed ... from' => 'If you installedit' |
10:19:10 | FromDiscord | <dom96> Help me, I am about to start another project. |
10:19:32 | FromDiscord | <KrispPurg> ok |
10:23:04 | FromDiscord | <KrispPurg> what can i help u with, dom96 |
10:23:59 | FromGitter | <bung87> dont know what's the hard part |
10:26:36 | FromDiscord | <dom96> You need to stop me, I have too many projects 🙂 |
10:27:04 | FromDiscord | <Recruit_main707> whats the project about? |
10:27:58 | FromDiscord | <dom96> Selectively compiling Nim functions to WebAsm |
10:28:43 | FromDiscord | <Recruit_main707> thats too complex and without a real good purpose, dont you think so? |
10:38:23 | FromDiscord | <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:25 | FromDiscord | <Synth> I used scoop but that didn't work so I switched to the executable |
10:49:41 | * | waleee-cl joined #nim |
11:00:36 | supakeen | There was a link to libraries and things being requested for Nim, I forgot to bookmark it. Does someone have it handy? |
11:00:43 | Yardanico | https://github.com/nim-lang/needed-libraries/issues |
11:01:55 | supakeen | Thank you. |
11:08:23 | FromGitter | <bung87> `Check failed: buf.data == "aaaaa" ⏎ ⏎ ```buf.data was aaaaa```` [https://gitter.im/nim-lang/Nim?at=5ebfc9a690f6db31beed55b2] |
11:08:35 | Yardanico | use "repr" to check both |
11:08:53 | FromGitter | <bung87> why is that? |
11:09:06 | Yardanico | because buf.data might have some non-printable ASCII characters |
11:10:14 | FromGitter | <bung87> ok, for debugging |
11:12:47 | * | dddddd joined #nim |
11:15:47 | FromDiscord | <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:21 | FromDiscord | <Synth> It didn't compile when I tried to do `-d:ssl` with scoop install @wiremoons |
11:16:23 | FromDiscord | <wiremoons> That way the `-d:ssl` flag when you compile should work too. |
11:16:26 | FromDiscord | <Synth> I'll try that though, thank you! |
11:16:50 | FromDiscord | <wiremoons> Yes - you need the `openssl` package from scoop too. |
11:17:04 | FromGitter | <bung87> that's realy usefull, found the problem where is. |
11:17:09 | FromDiscord | <Synth> I installed that but it still didn't work for me strangely |
11:17:19 | FromDiscord | <Synth> I'm going to try again though |
11:17:32 | Yardanico | @wiremoons you don't neccesarily need it |
11:17:44 | Yardanico | https://nim-lang.org/download/dlls.zip |
11:17:53 | Yardanico | contains pcre and openssl for both 32/64bit |
11:17:59 | Yardanico | and you need to place them in the same folder as nim.exe |
11:18:40 | FromDiscord | <Synth> Oh alright |
11:18:48 | FromDiscord | <Synth> Thank you for that info |
11:19:31 | FromDiscord | <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:40 | FromDiscord | <wiremoons> *zip |
11:20:44 | FromDiscord | <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:53 | Yardanico | yeah, that won't work |
11:21:00 | Yardanico | well, it will only work if that directory is in your $PATH |
11:21:31 | Yardanico | hmm, but wait it's actually windows, so it should've worked because windows looks in the current dir for the .dll's |
11:21:38 | Yardanico | maybe you put the wrong arch or something? |
11:22:02 | FromDiscord | <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:21 | FromDiscord | <Synth> Yeah, I don't like windows |
11:23:28 | FromDiscord | <wiremoons> Not my first choice @Synth (prefer Linux) - but cant get away from it either due to work and market share etc! |
11:23:39 | FromDiscord | <Synth> Yeah, I understand... |
11:25:32 | * | fredrikhr quit (Read error: Connection reset by peer) |
11:26:06 | FromDiscord | <Synth> @wiremoons your command fixed it... |
11:26:07 | FromDiscord | <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:11 | FromDiscord | <Synth> I don't know how but thank you so muhc |
11:26:13 | FromDiscord | <Synth> (edit) 'muhc' => 'much' |
11:26:25 | FromDiscord | <KrispPurg> is it working for you now synth? |
11:26:26 | FromDiscord | <Synth> I don't know how that fixed my compiling issue |
11:26:39 | FromDiscord | <Synth> Yes, `scoop install nim openssl git gcc` fixed it |
11:26:44 | FromDiscord | <Synth> I don't know how though... |
11:26:45 | FromDiscord | <KrispPurg> nice |
11:26:46 | FromDiscord | <wiremoons> Glad you got it working @Synth 🙂 |
11:27:04 | FromDiscord | <Synth> The funny thing is I already had openssl, gcc, and nim installed when it wasn't working |
11:27:18 | FromDiscord | <Synth> The only thing I can imagine is the git install fixing it but it doesn't make sense haha |
11:27:30 | FromDiscord | <KrispPurg> one tip for using my lib, if theres any crashes due to it's caching try switching to the devel branch. |
11:27:39 | FromDiscord | <wiremoons> No - don't ask me, I was just glad to get it working too 🙂 |
11:28:24 | FromDiscord | <Synth> Thank you haha |
11:36:10 | FromDiscord | <Synth> Now I'm getting this... `SIGSEGV: Illegal storage access. (Attempt to read from nil?)↵Error: execution of an external program failed` |
11:36:16 | FromDiscord | <Synth> At least it's linking correctly now |
11:36:53 | Yardanico | how did you compile? |
11:37:15 | * | dadada__ quit (Ping timeout: 265 seconds) |
11:37:16 | FromDiscord | <Synth> `nim c -d:ssl -r main.nim` |
11:37:28 | Yardanico | well, then there should be a traceback |
11:37:43 | federico3 | GTK3 has been around for 9 years apparently. Is it time we have an official gtk3 wrapper? |
11:37:44 | FromDiscord | <Synth> Yes, there are |
11:38:13 | Yardanico | federico3: gintro to fusion? :P |
11:38:17 | federico3 | no thanks |
11:38:19 | Yardanico | why |
11:38:32 | FromDiscord | <KrispPurg> import segfaults |
11:38:34 | Yardanico | about these wget things - you can just put them in the repo itself, easy |
11:39:20 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2mcU |
11:39:34 | Yardanico | install devel dimscord |
11:39:43 | Yardanico | nimble remove dimscord |
11:39:46 | Yardanico | nimble install dimscord@#devel |
11:39:46 | * | dadada joined #nim |
11:39:46 | FromDiscord | <KrispPurg> damn it yardanico you beat me to it |
11:39:56 | FromDiscord | <Synth> Oh alright, thank you |
11:40:10 | * | dadada is now known as Guest32317 |
11:40:13 | FromDiscord | <KrispPurg> I believe what is the cause of this error |
11:40:51 | FromDiscord | <Synth> How do you guys know the solutions to this though? |
11:40:55 | FromDiscord | <Synth> I'm just wondering |
11:40:56 | federico3 | Yardanico: it's not official, and look at this stuff https://github.com/StefanSalewski/gintro/blob/master/gintro.nimble#L44 |
11:41:05 | Yardanico | federico3: as I said you can just put these 3 in the repo |
11:41:09 | Yardanico | I don't see this as a big issue |
11:41:19 | federico3 | no way |
11:41:24 | Yardanico | and by official I thought you meant official as in Nim community |
11:41:27 | Yardanico | gintro is really superb |
11:41:29 | Yardanico | it even works with arc |
11:41:54 | Yardanico | you 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:55 | FromDiscord | <dom96> hrm, considering streaming today |
11:42:20 | FromDiscord | <KrispPurg> just install dimscord devel if you are getting that nil error, try echoing the info object. |
11:42:21 | federico3 | I'd rather stick with Python |
11:42:36 | Yardanico | that's your choice |
11:42:44 | federico3 | no, unfortately it's not |
11:43:38 | dom96 | wtf |
11:43:40 | Yardanico | it is? the thing with wgets is a minor issue which can be fixed easily |
11:43:45 | dom96 | why does this package wget modules? |
11:43:51 | federico3 | not really |
11:44:17 | dom96 | That's an incredibly poor idea |
11:44:27 | Yardanico | dom96: https://github.com/StefanSalewski/oldgtk3 contains a lot of stuff |
11:44:34 | dom96 | so 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:11 | dom96 | ~dom_stream is twitch.tv/d0m96 |
12:55:11 | disbot | dom_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:26 | FromDiscord | <exelotl> this is some ~jank~ https://github.com/nim-lang/Nim/issues/14373 |
14:41:30 | disbot | ➥ NimNodes 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:26 | FromDiscord | <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:09 | disruptek | ~stream |
14:58:09 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
14:58:12 | disruptek | quality today. |
14:58:20 | planetis[m] | cool |
14:58:37 | * | s4mu3lbk joined #nim |
15:02:40 | * | scmutalisk joined #nim |
15:06:27 | federico3 | who else is streaming? |
15:06:32 | * | filcuc_ quit (Ping timeout: 272 seconds) |
15:07:22 | Yardanico | federico3: dom96 is |
15:07:26 | Yardanico | https://www.twitch.tv/d0m96 |
15:08:05 | Yardanico | oh nvm |
15:08:06 | Yardanico | he stopped |
15:08:17 | federico3 | *was* :D |
15:09:43 | dom96 | lol |
15:10:38 | FromDiscord | <dom96> You can re-watch here: https://www.twitch.tv/videos/622721740 (part 1), https://www.twitch.tv/videos/622745400 (part 2) |
15:12:54 | FromDiscord | <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:25 | FromDiscord | <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:35 | Yardanico | yeah |
15:35:36 | Yardanico | !repo ircord |
15:35:38 | disbot | https://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:45 | bebarker | 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:07 | disruptek | dom 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:15 | dom96 | disruptek, been gone for a while |
16:38:12 | disruptek | damnit. |
16:38:43 | disruptek | how do i make a cstring with a specific size? |
16:39:34 | disruptek | just alloc it myself? |
16:39:42 | dom96 | sure |
16:39:49 | dom96 | or use newString |
16:39:57 | disruptek | ah, newString returns cstring? |
16:40:10 | dom96 | no, but you can grab the cstring via `addr str[0]` |
16:40:26 | disruptek | i 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:50 | FromGitter | <bung87> https://github.com/nim-lang/Nim/issues/6420 this is easy fix but breaking change |
16:57:54 | disbot | ➥ Improve error message for readFile/writeFile ; snippet at 12https://play.nim-lang.org/#ix=2me7 |
17:02:50 | disruptek | assert value.arrayValueType == dtByte, "obj versus enum... fite!" |
17:03:00 | disruptek | assert value.arrayValueType.kind == dtByte |
17:03:07 | disruptek | araq: ^^^^ |
17:03:29 | disruptek | ref equality operator. |
17:07:04 | alehander92 | oiii |
17:07:09 | alehander92 | PMunch so |
17:07:13 | alehander92 | about the web stuff |
17:08:51 | alehander92 | dom96 i wont watch the whole stream |
17:08:57 | alehander92 | but several seconds seemed very interesting |
17:09:16 | alehander92 | is this about bridging wasm with nim code or for directly compiling some procs to wasm |
17:09:51 | dom96 | the latter |
17:10:47 | alehander92 | oh nice |
17:11:59 | alehander92 | :) |
17:12:02 | alehander92 | seems useful! |
17:12:21 | dom96 | doubt I'll get far, but let's see :) |
17:12:21 | alehander92 | does it play well with the type system(i saw some docs about types0 |
17:12:29 | alehander92 | is there a big blocker, or just time |
17:12:39 | dom96 | a lot to do |
17:12:53 | dom96 | and it's not clear that what I have in mind will be possible |
17:13:26 | dom96 | for now I just want to see how far I can push it |
17:14:09 | FromDiscord | <willyboar> Web stuff yeah! |
17:16:16 | alehander92 | bung87 how is ts2nim going! |
17:16:26 | alehander92 | dom96 hmm, so |
17:16:34 | alehander92 | does it invoke an external compiler |
17:16:37 | alehander92 | to produce the wasm |
17:16:46 | alehander92 | or do you just generate a subset |
17:16:50 | dom96 | not right now |
17:16:55 | dom96 | just watch the video :P |
17:17:03 | alehander92 | i want to work on my own side projects |
17:17:09 | alehander92 | sorry :( :D not much time ! |
17:17:17 | alehander92 | you probably understand |
17:17:18 | dom96 | I generate WAT |
17:17:27 | dom96 | and intend to run wat2wasm on it |
17:17:37 | alehander92 | ah this sounds close to wasm |
17:17:47 | dom96 | it's the textual representation |
17:17:49 | alehander92 | probably if we have free time we can write a nim wat2wasm tool |
17:17:50 | dom96 | it's pretty cool actually |
17:17:51 | alehander92 | yeah |
17:18:16 | alehander92 | i imagine its not a complicated trasnformation |
17:18:25 | alehander92 | hm, which reminds me |
17:18:41 | alehander92 | if you guys write a x64 backend, would you write your own assembler |
17:22:10 | Zevv | Hmm 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:10 | FromGitter | <bung87> @alehander92 ts2nim limitations described same as https://docs.assemblyscript.org/basics ,that I just read at afternoon |
17:29:11 | FromGitter | <bung87> thought I can use ts compiler api check a project whether fit the needs ,then get might almost perfect transpiled project |
17:30:31 | FromGitter | <bung87> btw @types/node does not fit the needs. |
17:38:29 | * | Guest306 is now known as dadada |
17:39:04 | dadada | is there a way I can find out at runtime if a function/proc is available and from what module it is? |
17:39:38 | dadada | also 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:45 | dadada | s/there/there are |
17:41:23 | dom96 | omg, the way quote do handles backticks is really crazy sometimes |
17:42:30 | FromGitter | <sheerluck> Zevv in ponylang it called "Last Week in Pony" |
17:43:31 | alehander92 | bung87 you need |
17:43:35 | alehander92 | to write acompiler yeah |
17:43:38 | alehander92 | i think |
17:43:47 | alehander92 | but i havent read it ;( |
17:43:59 | alehander92 | willyboard |
17:44:19 | alehander92 | willyboar *: 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:54 | Zevv | sheerluck: well, that's not very original, is it? |
17:46:57 | Zevv | pff |
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:17 | alehander92 | i 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:45 | alehander92 | but i cant decide if microservices/api-s or full blown websites are better target |
17:49:13 | alehander92 | maybe the same code if modular enough should be good for both |
17:51:06 | FromGitter | <bung87> ok, compiler ,araq also sais so, not easy to me ,as I most do web development. |
17:51:35 | FromDiscord | <willyboar> I think that it would be nice to not depend on karax |
17:51:41 | dadada | my 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:47 | dadada | seems 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:28 | alehander92 | willyboar it doesnt depend on karax |
17:52:29 | * | couven92 quit (Ping timeout: 256 seconds) |
17:52:58 | alehander92 | it can , sorry |
17:53:06 | dom96 | dadada, sounds like you're not using bindsym properly, maybe? :) |
17:53:28 | alehander92 | but we can make it an api: every api which implements a `render(..): string` can be plugged in as view |
17:53:37 | alehander92 | so people can choose karax/htmlgen or another lib |
17:54:00 | FromGitter | <bung87> prologue is a good start project |
17:54:04 | * | couven92 joined #nim |
17:54:11 | alehander92 | oh i forgot about it! |
17:55:10 | FromDiscord | <willyboar> I was thinking something like flask |
17:55:20 | FromDiscord | <willyboar> With a little salt |
17:55:28 | dadada | dom96: is there any good writeup on bindsym besides your books? |
17:56:09 | alehander92 | willyboar yeah, but i think jester |
17:56:14 | alehander92 | is a good flask-like one |
17:56:19 | alehander92 | with a bit more stuff if needed |
17:56:21 | FromDiscord | <willyboar> The most important i think is to offer an easy way to create and use plugins |
17:56:28 | alehander92 | prologue actually looks |
17:56:31 | alehander92 | close |
17:56:35 | alehander92 | with some middleware support |
17:56:37 | alehander92 | good work |
17:58:40 | FromGitter | <bung87> yeah, me and the author in same chat group, it mostly inspire from flask |
17:59:26 | alehander92 | yeah both do |
17:59:48 | alehander92 | but i think prologue is both flask-y and can grow to include middleware: they have it in the docs as point |
17:59:57 | FromGitter | <bung87> and tulayang will focus on improve its infrastructure |
17:59:58 | alehander92 | so maybe one can join their development |
18:00:01 | alehander92 | to consolidate effort |
18:01:02 | FromGitter | <bung87> am on the db layer side , but not touch for months.. |
18:01:06 | FromGitter | <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:33 | FromGitter | <kdheepak> I'm asking I guess for a macro but for an entire package (does my question even make sense?) |
18:01:56 | FromDiscord | <willyboar> I thing we lack of good template engines |
18:03:28 | Zevv | bwah. why can't I make typed macros. I keep running into that. |
18:03:57 | dadada | kdheepak: 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:10 | FromDiscord | <willyboar> Prologue is more a rails than a flask |
18:04:52 | dadada | kdheepak: I've many ideas for using it |
18:05:03 | FromGitter | <bung87> no, I can tell you more flask |
18:05:40 | alehander92 | willyboar i think its harder with orm |
18:05:50 | alehander92 | for a template lib, i think karax is good |
18:05:56 | alehander92 | because you can use full nim inside |
18:06:06 | alehander92 | or if you want, to limit a subset |
18:06:13 | alehander92 | and not come up with a random new language |
18:06:22 | * | couven92 quit (Read error: Connection reset by peer) |
18:06:33 | alehander92 | but orm-s require good cooperation with migration, scaffolding |
18:06:34 | dadada | @kdheepak |
18:06:35 | FromGitter | <bung87> https://github.com/itsumura-h/nim-allographer |
18:06:48 | alehander92 | maybe not migration |
18:07:00 | FromGitter | <bung87> there's a good db lib |
18:07:26 | alehander92 | bung87 thething i like |
18:07:35 | alehander92 | would be to have more type support |
18:07:39 | * | couven92 joined #nim |
18:08:07 | alehander92 | e.g. hooking rich nim types to most fields/joins |
18:08:14 | alehander92 | generating validation based on them |
18:08:27 | alehander92 | (e.g. even with z3 annotations one can {.require a.len > 2.} |
18:08:33 | FromDiscord | <willyboar> Norm author create migration lib too |
18:08:52 | alehander92 | even compile time checking if schema corresponds to types maybe (not sure if useful tho) |
18:09:22 | alehander92 | so i guess its good to look at what rust/functional people do too to leverage our macro+type system here |
18:09:26 | alehander92 | thing that php/python cant do |
18:09:29 | alehander92 | easily |
18:09:43 | alehander92 | ah, nice |
18:10:29 | FromGitter | <bung87> it need extro work , can base on the lib. |
18:10:42 | FromDiscord | <willyboar> Allographer author develops an interesting framework based on jester |
18:12:53 | FromDiscord | <willyboar> Juan carlos also write a new orm |
18:13:06 | Yardanico | well it's a simplistic ORM really |
18:13:30 | * | couven92 quit (Read error: Connection reset by peer) |
18:13:34 | alehander92 | ormin is maybe a good example |
18:13:38 | Yardanico | yep |
18:13:44 | alehander92 | tho it's opinionated |
18:14:00 | * | letto quit (Ping timeout: 272 seconds) |
18:14:15 | * | couven92 joined #nim |
18:14:19 | FromDiscord | <willyboar> https://github.com/juancarlospaco/nim-gatabase |
18:14:26 | alehander92 | disruptek, does nim |
18:14:37 | alehander92 | plan to cache on module or on function level? |
18:15:41 | disruptek | toplevel symbol. |
18:16:10 | alehander92 | huh awesome |
18:17:15 | * | Hideki joined #nim |
18:17:39 | * | Hideki is now known as Guest64112 |
18:17:55 | FromDiscord | <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:40 | FromGitter | <bung87> not heard of it yet, cli or dsl |
18:21:42 | FromGitter | <bung87> there's someone write likes https://github.com/Adeohluwa/gen |
18:22:00 | FromDiscord | <willyboar> Yeap i have check it |
18:22:37 | FromDiscord | <willyboar> There is not many web relation libs i didnt check |
18:22:55 | FromGitter | <bung87> am plaining write a activerecord layer lib https://github.com/bung87/db_adapter just not finished |
18:23:35 | alehander92 | awesome! |
18:24:25 | FromGitter | <bung87> I have good feeling using rails, no php python nodejs |
18:24:26 | alehander92 | disruptek but what i mean is |
18:24:37 | alehander92 | if one changes only function `a` |
18:24:55 | alehander92 | is it somehow possible to not even reparse + sempass the other code |
18:25:17 | alehander92 | e.g. one can detect its inside (so no signature change: so no difference for other functions/code) |
18:25:29 | FromDiscord | <willyboar> Well i have used a lot of rails and it is a great tool |
18:27:04 | FromDiscord | <willyboar> But it is slow and huge |
18:28:12 | FromGitter | <bung87> it's more for human, not machine |
18:30:38 | FromDiscord | <willyboar> I also watch this: |
18:30:42 | FromDiscord | <willyboar> https://github.com/liseki/enim |
18:32:09 | * | opal joined #nim |
18:32:13 | FromDiscord | <exelotl> Oh! This looks good |
18:32:41 | FromDiscord | <exelotl> didn't show up when I searched for templates on nimble |
18:33:52 | FromGitter | <bung87> good one I give a star |
18:41:06 | FromDiscord | <willyboar> Hope he/she finish it. I think is not working. |
18:41:30 | Yardanico | you can just say "they" btw :P |
18:41:51 | Yardanico | and we already have source code filters |
18:41:54 | disruptek | alehander92: it has to parse it but it doesn't have to regenerate the backend code. |
18:42:00 | FromDiscord | <willyboar> (edit) 'he/she' => 'they' |
18:42:00 | Yardanico | https://nim-lang.org/docs/filters.html |
18:42:04 | alehander92 | it's obviously `he` guys |
18:42:07 | alehander92 | it's a male name |
18:42:18 | Yardanico | alehander92: you can never be sure :P |
18:42:46 | FromDiscord | <willyboar> I edit it 😋 😋 |
18:43:19 | FromDiscord | <willyboar> Yardanico scf is pain in the ass |
18:43:23 | Yardanico | it's not that hard |
18:43:24 | alehander92 | yardanico don't make me `they` you :D |
18:43:34 | alehander92 | disruptek hm yeah |
18:43:38 | alehander92 | actually |
18:43:52 | alehander92 | it doesnt |
18:43:54 | alehander92 | because on theory |
18:44:20 | alehander92 | i am not sure honestly: is there an api that tells you "this file changed only in those bytes" directly from os |
18:44:48 | alehander92 | if this is effective enough, one can prove that he can parse only the same section of lines again |
18:44:58 | alehander92 | but its probably not needed to go into such complexity for that |
18:45:04 | FromDiscord | <willyboar> Its not that hard for you. For a starter is pain in the ass |
18:45:50 | Yardanico | ?? |
18:45:50 | Yardanico | why |
18:45:54 | Yardanico | I honestly don't know |
18:46:16 | FromGitter | <bung87> I also thought make tool generate code by parse language official site |
18:47:00 | * | NimBot joined #nim |
18:47:29 | FromDiscord | <willyboar> Even jinja is quite close |
18:49:56 | disruptek | alehander92: parsing the file costs virtually nothing. |
18:50:04 | * | letto joined #nim |
18:51:25 | bebarker | I'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:34 | disruptek | issues. |
18:51:37 | Yardanico | bebarker: issues |
18:51:54 | bebarker | thanks, just wanted to confirm |
18:54:41 | alehander92 | disruptek ok, it's a fun thing to think about |
18:54:45 | alehander92 | but you're right |
18:55:10 | alehander92 | ok, i'll focus on parallel module parsing and only function-level later |
18:55:16 | FromDiscord | <codic> How do I color the text i print into the terminal? |
18:55:23 | dadada | so |
18:55:25 | FromDiscord | <codic> i'm assuming using the terminal module |
18:55:31 | FromDiscord | <codic> but I can't find any examples on the docs page |
18:55:43 | dadada | can I get a list of all imported modules programmatically? in a macro for example? |
18:55:57 | Yardanico | I don't think so |
18:56:01 | Yardanico | but maybe you can :P |
18:56:09 | Yardanico | @codic there are examples |
18:56:12 | Yardanico | in the procs |
18:56:23 | Yardanico | e.g. https://nim-lang.org/docs/terminal.html#styledWrite.m%2CFile%2Cvarargs%5Btyped%5D |
18:56:27 | * | zacharycarter joined #nim |
18:56:29 | Yardanico | https://nim-lang.org/docs/terminal.html#styledWriteLine.t%2CFile%2Cvarargs%5Buntyped%5D |
18:56:34 | dadada | Yardanico: well, I can definitely use a lineInfoObj and then parse the module for import statements, but that's not nice |
18:56:35 | FromDiscord | <codic> O |
18:56:39 | FromDiscord | <codic> Wait how are you pinging from irc |
18:56:47 | Yardanico | wdym? |
18:56:49 | Yardanico | !repo ircord |
18:56:50 | disbot | https://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 5⭐ 0🍴 |
18:56:51 | Yardanico | that's how |
18:56:56 | FromDiscord | <codic> oo |
18:56:59 | FromDiscord | <codic> dimscord? |
18:57:07 | FromDiscord | <codic> yup |
18:57:47 | Yardanico | well it exited even before dimscord |
18:57:50 | Yardanico | existed * :P |
18:57:53 | Yardanico | but didn't work so well |
18:58:25 | FromDiscord | <codic> used discord.nim or an inhouse impl? |
18:58:31 | Yardanico | yeah discord.nim |
18:58:39 | FromDiscord | <codic> ah |
18:58:40 | FromDiscord | <codic> nice |
19:00:47 | FromGitter | <bung87> https://github.com/bung87/luna/blob/master/src/luna.nim |
19:01:05 | FromGitter | <bung87> I use writestyledlune |
19:03:17 | FromDiscord | <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:47 | FromDiscord | <codic> Can I see the list of colors for stdout.styledWrite, and can i use a hex code by any chance? |
19:13:54 | Yardanico | there's an enum |
19:14:00 | * | couven92 joined #nim |
19:14:10 | Yardanico | I'm sorry but did you really read https://nim-lang.org/docs/terminal.html ? |
19:14:13 | Yardanico | https://nim-lang.org/docs/terminal.html#ForegroundColor |
19:14:15 | Yardanico | https://nim-lang.org/docs/terminal.html#BackgroundColor |
19:14:36 | FromDiscord | <codic> actually, nope :P |
19:14:59 | FromDiscord | <codic> nice, those are enough |
19:15:06 | FromDiscord | <codic> no need for hex |
19:15:27 | Yardanico | you might also be interested in https://github.com/qqtop/NimCx |
19:16:06 | FromDiscord | <codic> linux only? |
19:16:20 | Yardanico | yeah I think so |
19:16:50 | FromDiscord | <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:20 | dadada | Yardanico: 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:56 | Yardanico | dadada: use owner on a NimNode? |
19:23:01 | Yardanico | it should be a symbol though |
19:23:04 | Yardanico | https://nim-lang.org/docs/macros.html#owner%2CNimNode |
19:23:16 | Yardanico | "For top level declarations this is an nskModule symbol" |
19:27:25 | dadada | Yardanico: it's an ident, not a symbol :-( |
19:27:34 | Yardanico | I don't think you can do it then, an ident is just an ident |
19:27:44 | Yardanico | you should accept "typed" arguments in a macro if you want a symbol |
19:28:47 | Yardanico | or you can try parseExpr :P |
19:29:35 | dadada | hmm, with typed arguments it could work, for some reason I'm writing macros all the time |
19:30:04 | dadada | with untyped, it has become a habit |
19:30:41 | FromDiscord | <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:46 | FromDiscord | <Max [codingreaction]> https://media.discordapp.net/attachments/371759389889003532/711299622320078898/unknown.png |
19:31:02 | Yardanico | you can just press F6 to compile and run current file in debug mode btw :P |
19:31:11 | Yardanico | and no need for tasks |
19:31:21 | Yardanico | you should really use nimble for tasks and in vscode tasks call nimble |
19:31:40 | * | dddddd joined #nim |
19:31:51 | FromDiscord | <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:07 | FromDiscord | <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:30 | FromDiscord | <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:06 | disruptek | sure. |
19:40:11 | disruptek | use paramCount() |
19:40:35 | FromDiscord | <codic> `if paramCount() == 0`? thakns! |
19:40:38 | FromDiscord | <codic> (edit) 'thakns!' => 'thanks!' |
19:42:24 | dadada | Yardanico: 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:55 | FromDiscord | <Max [codingreaction]> does "strutils" comes from "struct utils" or it means something different? |
19:43:03 | dadada | I've a stmtList containing pairs of the form notYetDeclaredIdent: someType |
19:43:25 | FromDiscord | <KrispPurg> strutils means string utils |
19:43:38 | dadada | I want the info about someType (so typed), but not the issues revolving around undeclaredness so (untyped) |
19:43:43 | FromDiscord | <Max [codingreaction]> ty Krisp |
19:43:48 | FromDiscord | <KrispPurg> np |
19:44:23 | FromDiscord | <KrispPurg> i actually thought strutils was structutils, but thank god i was not alone |
19:44:31 | FromDiscord | <Max [codingreaction]> hahaha |
19:44:52 | FromDiscord | <KrispPurg> it was when i was new to nim |
19:45:57 | Yardanico | hmm lol, I always associated them with strings :P |
19:46:18 | FromDiscord | <Max [codingreaction]> i'm extremly new but don't wanna to build bad mnemonics in my brain haha |
19:46:26 | FromDiscord | <KrispPurg> I misread them as structutils |
19:46:31 | FromGitter | <bung87> nim name prefer short |
19:46:55 | FromGitter | <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:12 | Yardanico | don't use auto :P |
19:47:19 | Yardanico | unless it's automatically translated code |
19:47:26 | FromGitter | <bung87> I am porting buffer module |
19:47:55 | FromGitter | <bung87> it is comming from translator |
19:48:23 | FromDiscord | <Max [codingreaction]> discard is the same as "pass" in python? |
19:48:23 | FromGitter | <bung87> just wondering these methods usefull? |
19:48:29 | Yardanico | @Max it has 2 uses |
19:48:41 | Yardanico | 1: same as "pass" in Python 2: discard the result of a proc call you don't want |
19:49:13 | Yardanico | well 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:48 | FromDiscord | <Max [codingreaction]> excellent, ty |
19:52:48 | FromGitter | <bung87> may not porting these methods, as It can just modify buff.data |
19:54:09 | FromDiscord | <Recruit_main707> cstring has some kind of advantage in performance compared to string? |
19:55:52 | Yardanico | It's for interfacing with C |
19:55:57 | Yardanico | well, not neccesarily C |
19:56:05 | Yardanico | "cstring" nowadays stands for "compatible string" |
19:57:03 | FromDiscord | <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:18 | FromGitter | <bung87> assignment may have differience? |
19:58:32 | * | couven92 quit (Quit: Client disconnecting) |
20:00:49 | dadada | https://play.nim-lang.org/#ix=2mgs why does the second export not work? |
20:01:01 | Yardanico | because you can't do that |
20:01:07 | Yardanico | you need to mark hello with * |
20:01:12 | Yardanico | you can export symbols |
20:01:17 | Yardanico | "Test.hello" is not a symbol |
20:01:21 | Yardanico | as far as I can see :P |
20:02:32 | dadada | I 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:38 | dadada | at least it doesn't seem consistent |
20:03:53 | dadada | if one is a replacement for using * on Test, then the other (I think naively) should be too |
20:04:07 | dadada | thanks for explaining the reason why to me |
20:06:04 | Yardanico | well I'm not 100% sure that's the reason |
20:09:08 | FromGitter | <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:43 | FromDiscord | <Max [codingreaction]> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/711317980780429413 |
20:44:12 | FromDiscord | <Max [codingreaction]> description is a string that comes from readLine |
20:44:19 | FromDiscord | <Max [codingreaction]> ``` var description = readLine(stdin) ``` |
20:45:32 | dadada | I think import macros should be default on play.nim-lang |
20:45:57 | dadada | who's with me? I've felt this way for months, finally this has become ridiculous |
20:46:08 | dadada | the number of times I've typed in import macros, jeez |
20:46:23 | FromDiscord | <Clyybber> ? |
20:46:32 | FromDiscord | <Yardanico> @Max [codingreaction] that's not how you do it |
20:46:42 | FromDiscord | <Yardanico> ```↵ todoList.append((false, description)) ↵``` |
20:46:56 | FromDiscord | <Yardanico> or named tuples↵```↵ todoList.append((status: false, description: description)) ↵``` |
20:47:39 | FromDiscord | <Yardanico> ah wait actually you need to append a singly linked node |
20:47:55 | FromDiscord | <Yardanico> Btw do you actually need a singly linked list? is a seq not enough for you? |
20:48:12 | FromDiscord | <Yardanico> yeah you can just use append |
20:48:52 | Yardanico | @max https://play.nim-lang.org/#ix=2mgA |
20:50:22 | alehander92 | dadada, i dont agree it can be confusing for people copying code from there |
20:50:27 | Yardanico | yep |
20:50:48 | alehander92 | you can just have a local setup which passes it somehow on compile flags |
20:51:08 | alehander92 | or there can be some option to auto-add common imports in the editor |
20:51:49 | dadada | alehander92: how about "templates", a combobox that you can select common patterns from |
20:52:02 | dadada | templates for working with macros and tables and such |
20:52:42 | dadada | also containing a basic macro and proc named testMac testProc |
20:53:05 | dadada | maybe this would also help new people to discover features faster |
20:56:38 | FromDiscord | <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:03 | Yardanico | well you can just use sequences |
20:57:21 | Yardanico | Sequences in nim are a type which can hold a (runtime changeable) number of instances of same type |
20:57:34 | Yardanico | !eval var a: seq[int]; a.add(5); a.add(3); echo a |
20:57:36 | NimBot | @[5, 3] |
20:58:31 | alehander92 | dadada, well, maybe? sounds like snippets in some editors |
20:58:41 | alehander92 | it'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:54 | FromDiscord | <exelotl> sent a code paste, see http://ix.io/2mgE |
21:05:20 | Yardanico | is it not invoked in the file that called the template? |
21:05:44 | * | liblq-dev quit (Quit: WeeChat 2.8) |
21:05:47 | FromDiscord | <exelotl> doesn't seem like it |
21:06:37 | alehander92 | guys |
21:06:46 | alehander92 | so, 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:44 | FromGitter | <bung87> @alehander92 do you know is there a tool I can trace js function calls and get info eg. integer or float? |
21:37:00 | FromGitter | <bung87> params's info |
21:47:32 | Yardanico | that's the most fun part :P |
21:53:39 | FromGitter | <bung87> I expeacting it is easy part |
22:01:23 | FromGitter | <bung87> hmm, even there is , still need that project has enough tests cover all case.. |
22:01:56 | FromGitter | <bung87> given up it. |
22:02:14 | * | fredrikhr joined #nim |
22:02:58 | * | PMunch quit (Quit: leaving) |
22:16:40 | FromDiscord | <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:49 | FromGitter | <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:12 | FromDiscord | <Max [codingreaction]> neat, i didn't tought about that, thanks!↵Time to learn about the named types |
22:26:20 | FromDiscord | <Max [codingreaction]> ```type Kitten = object ## Documentation Here↵proc purr(self: Kitten) = echo "Purr Purr"↵Kitten().purr()``` |
22:26:29 | FromDiscord | <Max [codingreaction]> This page is pretty cool |
22:26:30 | FromDiscord | <Max [codingreaction]> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers |
22:29:59 | zacharycarter | what's the idiomatic Nim way to handle the C/C++ pattern of allowing a type to accept a pointer to user data? |
22:30:11 | zacharycarter | should I use parametric polymorphism and like a `ref T`? |
22:30:19 | zacharycarter | or just use a `pointer`? |
22:30:55 | FromGitter | <bung87> if it is any using pointer |
22:31:19 | FromGitter | <bung87> if it is ptr of type using `ptr A` |
22:31:39 | zacharycarter | well in C it can typically accept a pointer to whatever right |
22:31:41 | zacharycarter | type doesn't matter |
22:31:55 | FromGitter | <bung87> just pointer is fine |
22:32:38 | zacharycarter | but is that really the idomatic way? I figured there was a safer way with Nim |
22:34:57 | FromGitter | <bung87> maybe you should go check niminterop |
22:35:08 | zacharycarter | eh I'm not really interested in interoping with C code though here |
22:35:23 | zacharycarter | I'll start with pointer and see if I can replace it with something later |
22:36:07 | FromGitter | <bung87> type constrain if from you or nim side |
22:37:59 | FromGitter | <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:32 | FromDiscord | <Max [codingreaction]> how could i do an echo without an automatic line break at the end? |
23:36:37 | exelotl | dom96: 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:54 | exelotl | (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:03 | FromGitter | <bung87> it seems nim-chronos use it |
23:58:48 | FromDiscord | <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:03 | FromDiscord | <Max [codingreaction]> [and it works 😉 ] |