00:00:22 | FromDiscord | <Shiba> ``bash : nim not found`` |
00:00:32 | FromDiscord | <Shiba> nim in terminal still works |
00:00:47 | FromDiscord | <Shiba> (edit) "``bash : nim not found`` ... " added "in the console" |
00:00:49 | FromDiscord | <Elegantbeef> Lite doesnt load your config so it doesnt populate the path with choosenim's nim |
00:01:36 | FromDiscord | <Shiba> okay easy ill add it myself , since its just lua |
00:01:46 | FromDiscord | <Shiba> i thought you said "Life" |
00:02:29 | FromDiscord | <Shiba> (edit) "i thought you said "Life" ... " added "lol" |
00:04:10 | FromDiscord | <Shiba> thuna |
00:18:24 | * | neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
00:19:07 | * | neceve joined #nim |
00:24:52 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
00:30:31 | * | neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
00:36:32 | FromDiscord | <Shiba> okay i have found a better soloution |
00:37:03 | FromDiscord | <Shiba> you can run lite-xl throught terminal and its will inherit the PATH |
00:37:36 | FromDiscord | <Shiba> but since i use x11 i can just add the PATH to .profile |
00:37:40 | FromDiscord | <Shiba> and now its works |
00:37:59 | FromDiscord | <Shiba> the lite-xl community helped me a lot |
00:57:35 | * | wallabra quit (Ping timeout: 252 seconds) |
01:05:59 | * | jmdaemon joined #nim |
01:26:08 | * | neceve_ joined #nim |
01:34:00 | * | arkurious quit (Quit: Leaving) |
01:38:11 | * | jmdaemon quit (Ping timeout: 248 seconds) |
01:55:14 | * | neceve joined #nim |
02:20:47 | * | jmdaemon joined #nim |
02:22:27 | * | neceve_ quit (Ping timeout: 248 seconds) |
03:22:02 | FromDiscord | <JeysonFlores> Is there any forums or sites to look up for Nim jobs? |
03:22:31 | FromDiscord | <alexchole> "I'll help 10individuals how to earn $30,000 in 72 hours from the crypto market. But you will pay me 10% commission when you receive your profit. if interested send me a direct message on Telegram by asking me (HOW) for more details on how to get started↵↵https://t.me/+lD4Ec_gRjCljYjNk |
03:23:22 | FromDiscord | <Yardanico> In reply to @JeysonFlores "Is there any forums": not really, there's #jobs but it's not that active |
03:23:34 | FromDiscord | <Yardanico> and out of all companies Status has the most jobs that are related to Nim :P |
03:25:50 | FromDiscord | <Yardanico> wow, copilot seems to work for Nim now! |
03:26:06 | FromDiscord | <Elegantbeef> Just in time for github to no longer offer it for free |
03:26:20 | FromDiscord | <Yardanico> they offer it to people with popular enough open source repos I think |
03:26:42 | FromDiscord | <Yardanico> idk the threshold, but it just shows up as "free" for me |
03:26:44 | FromDiscord | <Yardanico> can you check in your account? |
03:26:54 | FromDiscord | <Yardanico> https://github.com/settings/billing |
03:26:55 | * | rockcavera joined #nim |
03:26:55 | * | rockcavera quit (Changing host) |
03:26:55 | * | rockcavera joined #nim |
03:26:57 | FromDiscord | <Yardanico> add-ons section |
03:27:33 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1015825415585140756/image.png |
03:27:36 | FromDiscord | <JeysonFlores> In reply to @Yardanico "and out of all": Damn, I hope more new companies use Nim for their software. |
03:27:46 | FromDiscord | <Yardanico> In reply to @Elegantbeef "image.png": and what if you enable it? |
03:28:00 | FromDiscord | <Yardanico> but I guess for myself it's enabled because I was in the beta |
03:28:06 | FromDiscord | <Elegantbeef> 60 free trial with 10/100 yr |
03:28:08 | FromDiscord | <Yardanico> sent a long message, see http://ix.io/49AW |
03:28:18 | FromDiscord | <Yardanico> but, like, in the past for Nim it outputted garbage from other languages |
03:28:25 | FromDiscord | <Yardanico> now it can do quite advanced stuff, it clearly knows Nim stdlib |
03:28:31 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015825661077758002/unknown.png |
03:28:35 | FromDiscord | <Yardanico> lines before 4 were written by copilot |
03:28:38 | FromDiscord | <Yardanico> after |
03:28:41 | FromDiscord | <flywind> What is a maintainer? Like owner? |
03:28:50 | FromDiscord | <Yardanico> In reply to @flywind "What is a maintainer?": I guess, or a collaborator? not sure |
03:29:34 | FromDiscord | <JeysonFlores> In reply to @flywind "What is a maintainer?": probably someone who contribute substantial code to a project |
03:29:47 | FromDiscord | <JeysonFlores> (edit) "contribute" => "contributes" |
03:31:25 | FromDiscord | <Patitotective> In reply to @Yardanico "": really cool |
03:31:51 | FromDiscord | <Patitotective> "KDL document language lexer and parser" |
03:31:58 | FromDiscord | <Patitotective> lmao |
03:32:01 | FromDiscord | <Yardanico> it still seems to confuse Nim with other languages sometimes, but you can help it by specifying "Nim" somewhere in the file |
03:32:19 | FromDiscord | <Yardanico> In reply to @Patitotective ""KDL document language lexer": https://media.discordapp.net/attachments/371759389889003532/1015826616800264232/unknown.png |
03:32:32 | FromDiscord | <Patitotective> :o |
03:32:51 | FromDiscord | <Yardanico> let's see if it can do imports on its own |
03:33:50 | FromDiscord | <Yardanico> not really I think |
03:34:03 | FromDiscord | <Yardanico> but it knows Nim stdlib which is really cool |
03:35:39 | FromDiscord | <JeysonFlores> can it use generics or macros? |
03:35:50 | FromDiscord | <Patitotective> now it only has to learn all nimble packages and programming becomes funnier |
03:36:19 | FromDiscord | <Generic> oh wow last time I used copilot it always spit out Pythonisms and for some reason sprinkled with a bit of C# |
03:36:39 | FromDiscord | <Yardanico> yeah it seems better now, not perfect but much better |
03:36:48 | FromDiscord | <Elegantbeef> "Generate a Caeser cipher look up table" |
03:37:05 | FromDiscord | <JeysonFlores> "Make my dinner" |
03:37:07 | FromDiscord | <Yardanico> In reply to @Elegantbeef ""Generate a Caeser cipher": https://media.discordapp.net/attachments/371759389889003532/1015827827897143306/unknown.png |
03:37:30 | FromDiscord | <Elegantbeef> How wrong could it be |
03:37:48 | FromDiscord | <Rika> It doesn’t look wrong to me |
03:38:04 | * | wallabra joined #nim |
03:38:05 | FromDiscord | <Elegantbeef> It's using integers as an index! |
03:38:06 | FromDiscord | <Elegantbeef> 😛 |
03:38:11 | FromDiscord | <Rika> Well, the result thing is kinda cursed |
03:38:16 | FromDiscord | <Rika> But it’s not wrong |
03:38:44 | FromDiscord | <Generic> implicit result variables aren't that common apparently |
03:38:52 | FromDiscord | <Generic> atleast not in other programming languages |
03:39:03 | FromDiscord | <Rika> It isn’t |
03:39:25 | FromDiscord | <Rika> I don’t know any other language with it that’s somewhat older than Nim |
03:39:32 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015828432833220618/unknown.png |
03:39:37 | FromDiscord | <Yardanico> i typed "template" myself |
03:39:50 | FromDiscord | <Rika> In reply to @Yardanico "": Kinda wrong, scope issues |
03:39:53 | FromDiscord | <Generic> try asking it to write a macro |
03:39:59 | FromDiscord | <Yardanico> with what functionality |
03:40:07 | FromDiscord | <Generic> maybe the exact same thing as a test? |
03:40:08 | FromDiscord | <Yardanico> i can't think of anything simple |
03:40:10 | FromDiscord | <Yardanico> okay |
03:40:18 | FromDiscord | <Rika> Ask it to rewrite dup? |
03:40:27 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015828664207806504/unknown.png |
03:40:40 | FromDiscord | <Yardanico> it didn't add the import of course, but it knows newStmtList |
03:40:42 | FromDiscord | <Rika> Still the same scope issue but wow it’s good |
03:40:51 | FromDiscord | <Generic> wow |
03:40:52 | FromDiscord | <Yardanico> yes, kind of scary |
03:40:58 | FromDiscord | <Yardanico> because Nim is supposed to be niche :P |
03:41:16 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015828867283419236/unknown.png |
03:41:16 | FromDiscord | <Yardanico> wow! |
03:42:07 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015829082652541050/unknown.png |
03:42:08 | FromDiscord | <Elegantbeef> "Write a macro to generate a closure iterator from an iterator" 😛 |
03:42:23 | FromDiscord | <Yardanico> didn't close httpclient smh |
03:42:51 | FromDiscord | <Yardanico> In reply to @Elegantbeef ""Write a macro to": lol |
03:43:23 | FromDiscord | <Yardanico> in this case it doesn't give a suggestion right away, but if you ask it for suggestions, some of them are clearly "overfitted" |
03:43:34 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015829446671994981/unknown.png |
03:43:41 | FromDiscord | <Yardanico> some are weird https://media.discordapp.net/attachments/371759389889003532/1015829476208279672/unknown.png |
03:46:12 | FromDiscord | <Rika> Interesting |
03:49:40 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015830984937193583/unknown.png |
03:49:50 | FromDiscord | <Yardanico> this is of course very simple, but at least it knows how to translate algorithms to Nim |
03:50:04 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
03:50:04 | FromDiscord | <Yardanico> everything is written by copilot, I didn't even have to "proc" myself |
03:50:10 | FromDiscord | <Elegantbeef> How about the simpler loop unroll macro 😄 |
03:50:45 | FromDiscord | <Yardanico> the default suggestion is some nonsense (wtf is LineNode?) https://media.discordapp.net/attachments/371759389889003532/1015831255696289812/unknown.png |
03:51:11 | FromDiscord | <Elegantbeef> It has the right idea, but that's still no cigar 😄 |
03:52:34 | FromDiscord | <Rika> Smoking is bad |
03:53:06 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015831846078128168/unknown.png |
03:53:08 | FromDiscord | <Elegantbeef> Final thing i'll ask to test is "Heap allocate an integer and set it to 32 then print it out" 😄 |
03:53:40 | FromDiscord | <Elegantbeef> My money is on a `alloc` call |
03:53:44 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015832006858391603/unknown.png |
03:53:50 | FromDiscord | <Yardanico> all 3 lines are without my input |
03:53:51 | FromDiscord | <Elegantbeef> Shit |
03:53:52 | FromDiscord | <Yardanico> xdd |
03:54:16 | FromDiscord | <Elegantbeef> It's clearly a bot though cause it does `new(int)` like a neanderthal |
03:54:31 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015832203340554320/unknown.png |
03:55:41 | FromDiscord | <Elegantbeef> Shit i now want to see if it can handle "Allocate a cstring and copy it to a Nim string" |
03:56:23 | FromDiscord | <Yardanico> i had to type `proc`, but it gave an almost good result |
03:56:26 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015832684100067478/unknown.png |
03:56:33 | FromDiscord | <Yardanico> lets see all 10 variations of the answer |
03:57:04 | FromDiscord | <Yardanico> yeah it can't for some reason generate Nim code on top-level well |
03:57:07 | FromDiscord | <Yardanico> it needs to be inside of procs |
03:58:12 | FromDiscord | <Yardanico> lol https://media.discordapp.net/attachments/371759389889003532/1015833131162554479/unknown.png |
03:58:31 | FromDiscord | <Rika> Close enough |
04:00:08 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015833617928294503/unknown.png |
04:08:26 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015835709774503976/unknown.png |
04:09:01 | FromDiscord | <Yardanico> but it used 4 spaces :(( |
04:09:54 | FromDiscord | <Yardanico> and this is what I mean by it being overtrained or something |
04:09:56 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1015836082794922064/unknown.png |
04:10:01 | FromDiscord | <Yardanico> this is from some github or stackoverflow issue |
04:10:03 | FromDiscord | <Yardanico> or a forum maybe |
04:14:53 | FromDiscord | <Elegantbeef> It's an odd thing to see that message |
04:15:03 | FromDiscord | <Elegantbeef> I do wonder what platform it's from |
04:16:04 | FromDiscord | <Yardanico> it's kind of scary for "simple" inputs |
04:16:21 | FromDiscord | <Yardanico> there are errors here, but it's still very impressive - https://play.nim-lang.org/#ix=49Bc |
04:16:36 | FromDiscord | <Yardanico> everything is generated, I only had to type "type" or "proc" |
04:16:51 | FromDiscord | <Yardanico> i guess it did copy quite a lot from my own github repo for this :DD |
04:17:12 | FromDiscord | <Prestige> What's the best way to allow a user to pass in an int literal to a function that expects a float? Maybe using `SomeNumber` and doing `float(x)`? |
04:17:27 | FromDiscord | <Elegantbeef> just take a float |
04:17:27 | * | kenran joined #nim |
04:17:28 | FromDiscord | <Prestige> Basically just want to avoid having to type the `.0` |
04:17:29 | FromDiscord | <Yardanico> passing an int _literal_ already works by default for float arguments |
04:17:33 | FromDiscord | <Elegantbeef> Nim converts int literals to floats |
04:17:46 | FromDiscord | <Elegantbeef> you also dont need the `.0` you can type just `d` |
04:17:56 | FromDiscord | <Elegantbeef> or `f` if you want a 32bit float |
04:18:06 | FromDiscord | <Prestige> hm it is not doing so for me because I am using a union type, or whatever it's called |
04:18:25 | FromDiscord | <Prestige> I have a `proc foo(x: float|Size)` and can't pass in an int |
04:18:51 | FromDiscord | <Elegantbeef> Typeclasses do cause confusion with literals |
04:19:06 | FromDiscord | <Elegantbeef> in that case it's best just to do `d` |
04:19:11 | FromDiscord | <Prestige> Is there an overhead to doing `float(x)` or is that a compile time thing? |
04:19:22 | FromDiscord | <Yardanico> it is a runtime thing if you're doing it from an integer |
04:19:29 | FromDiscord | <Elegantbeef> It's generally negligable though |
04:19:29 | FromDiscord | <Yardanico> if the C compiler doesn't manage to optimize it away I guess |
04:19:32 | FromDiscord | <Yardanico> but the cost is small |
04:19:33 | FromDiscord | <Yardanico> yeah |
04:19:57 | FromDiscord | <Prestige> Cool, thanks |
04:20:42 | FromDiscord | <Elegantbeef> It's funny i've found 2 issues with Wasmer's C-api already |
04:20:51 | FromDiscord | <Elegantbeef> Their webpage doesnt link to the proper docs, and their examples doesnt compile |
04:21:34 | FromDiscord | <Elegantbeef> Why their examples arent tested in a CI is beyond me |
04:25:13 | FromDiscord | <Elegantbeef> More and more making an interpreter for wasm from scratch seems sensible |
04:32:21 | * | tiorock joined #nim |
04:32:22 | * | tiorock quit (Changing host) |
04:32:22 | * | tiorock joined #nim |
04:32:22 | * | rockcavera quit (Killed (molybdenum.libera.chat (Nickname regained by services))) |
04:32:22 | * | tiorock is now known as rockcavera |
04:50:03 | * | kenran quit (Quit: WeeChat info:version) |
04:52:07 | FromDiscord | <Yardanico> found a funny codegen regression in nim devel compared to 1.6.6, beef, do you think this code should work or not? |
04:52:15 | FromDiscord | <Yardanico> https://play.nim-lang.org/#ix=49Bd |
04:52:25 | FromDiscord | <Yardanico> found in gintro's binding generator |
04:52:50 | FromDiscord | <Yardanico> ah it's not even specific to "result" |
04:52:57 | FromDiscord | <Yardanico> any variable in the template will trigger it |
04:53:08 | FromDiscord | <Yardanico> but it's specific that there's subscript operator as far as I can see |
04:53:36 | FromDiscord | <Elegantbeef> I imagine it should work |
04:54:08 | FromDiscord | <Yardanico> doesn't look like anyone reported an issue like that |
05:01:24 | FromDiscord | <Yardanico> guess i should at least try bisecting to help |
05:02:34 | FromDiscord | <Yardanico> ah wait I think it's arc/orc specific |
05:02:40 | FromDiscord | <Yardanico> yep |
05:02:58 | * | def- quit (*.net *.split) |
05:02:58 | * | jkl quit (*.net *.split) |
05:02:58 | * | alice quit (*.net *.split) |
05:02:58 | * | droidrage quit (*.net *.split) |
05:02:58 | * | om3ga quit (*.net *.split) |
05:02:58 | * | LyndsySimon quit (*.net *.split) |
05:02:59 | * | xaltsc quit (*.net *.split) |
05:02:59 | * | ixmpp quit (*.net *.split) |
05:02:59 | * | blackbeard420 quit (*.net *.split) |
05:02:59 | * | buster_blue[m] quit (*.net *.split) |
05:02:59 | * | FromDiscord quit (*.net *.split) |
05:03:00 | * | via__ quit (*.net *.split) |
05:03:00 | * | euantorano quit (*.net *.split) |
05:03:00 | * | dv^_^ quit (*.net *.split) |
05:03:00 | * | wallabra quit (*.net *.split) |
05:03:00 | * | mahlon quit (*.net *.split) |
05:03:00 | * | koltrast quit (*.net *.split) |
05:03:00 | * | lumidify quit (*.net *.split) |
05:03:00 | * | lain quit (*.net *.split) |
05:03:00 | * | tk quit (*.net *.split) |
05:03:00 | * | adium quit (*.net *.split) |
05:03:01 | * | rb quit (*.net *.split) |
05:03:01 | * | tinystoat quit (*.net *.split) |
05:03:01 | * | attah quit (*.net *.split) |
05:03:01 | * | _________ quit (*.net *.split) |
05:03:01 | * | neceve quit (*.net *.split) |
05:03:01 | * | hexeme_ quit (*.net *.split) |
05:03:02 | * | Onionhammer quit (*.net *.split) |
05:03:02 | * | genpaku quit (*.net *.split) |
05:03:02 | * | cornfeedhobo quit (*.net *.split) |
05:03:02 | * | qwestion quit (*.net *.split) |
05:03:02 | * | void09 quit (*.net *.split) |
05:03:02 | * | NimEventer quit (*.net *.split) |
05:03:02 | * | Amun-Ra quit (*.net *.split) |
05:03:03 | * | qwr quit (*.net *.split) |
05:03:03 | * | syl quit (*.net *.split) |
05:03:03 | * | nisstyre quit (*.net *.split) |
05:03:03 | * | oz quit (*.net *.split) |
05:03:04 | * | DixieFlatline quit (*.net *.split) |
05:03:04 | * | mal`` quit (*.net *.split) |
05:03:04 | * | gshumway quit (*.net *.split) |
05:03:04 | * | Yardanico quit (*.net *.split) |
05:03:04 | * | madprog quit (*.net *.split) |
05:03:04 | * | crem quit (*.net *.split) |
05:03:04 | * | disso_peach quit (*.net *.split) |
05:03:04 | * | djanatyn quit (*.net *.split) |
05:03:05 | * | systemdsucks quit (*.net *.split) |
05:03:05 | * | supakeen quit (*.net *.split) |
05:03:05 | * | redj quit (*.net *.split) |
05:03:05 | * | fallback quit (*.net *.split) |
05:03:05 | * | notchris quit (*.net *.split) |
05:03:05 | * | oddish quit (*.net *.split) |
05:03:05 | * | oprypin quit (*.net *.split) |
05:03:05 | * | reversem3[m] quit (*.net *.split) |
05:03:06 | * | drewr quit (*.net *.split) |
05:03:14 | * | madprog joined #nim |
05:03:14 | * | drewr joined #nim |
05:03:14 | * | redj joined #nim |
05:03:14 | * | systemdsucks joined #nim |
05:03:14 | * | Yardanico joined #nim |
05:03:14 | * | gshumway joined #nim |
05:03:14 | * | djanatyn joined #nim |
05:03:14 | * | syl joined #nim |
05:03:14 | * | qwr joined #nim |
05:03:14 | * | supakeen joined #nim |
05:03:14 | * | mal`` joined #nim |
05:03:14 | * | DixieFlatline joined #nim |
05:03:14 | * | dv^_^ joined #nim |
05:03:14 | * | euantorano joined #nim |
05:03:14 | * | via__ joined #nim |
05:03:14 | * | oz joined #nim |
05:03:14 | * | FromDiscord joined #nim |
05:03:14 | * | Amun-Ra joined #nim |
05:03:14 | * | ixmpp joined #nim |
05:03:14 | * | xaltsc joined #nim |
05:03:14 | * | NimEventer joined #nim |
05:03:14 | * | LyndsySimon joined #nim |
05:03:14 | * | alice joined #nim |
05:03:14 | * | void09 joined #nim |
05:03:14 | * | jkl joined #nim |
05:03:14 | * | qwestion joined #nim |
05:03:14 | * | def- joined #nim |
05:03:14 | * | om3ga joined #nim |
05:03:14 | * | droidrage joined #nim |
05:03:14 | * | _________ joined #nim |
05:03:14 | * | buster_blue[m] joined #nim |
05:03:14 | * | reversem3[m] joined #nim |
05:03:14 | * | attah joined #nim |
05:03:14 | * | oprypin joined #nim |
05:03:14 | * | tinystoat joined #nim |
05:03:14 | * | rb joined #nim |
05:03:14 | * | cornfeedhobo joined #nim |
05:03:14 | * | oddish joined #nim |
05:03:14 | * | nisstyre joined #nim |
05:03:14 | * | adium joined #nim |
05:03:14 | * | genpaku joined #nim |
05:03:14 | * | Onionhammer joined #nim |
05:03:14 | * | tk joined #nim |
05:03:14 | * | hexeme_ joined #nim |
05:03:14 | * | notchris joined #nim |
05:03:14 | * | lain joined #nim |
05:03:14 | * | disso_peach joined #nim |
05:03:14 | * | crem joined #nim |
05:03:14 | * | blackbeard420 joined #nim |
05:03:14 | * | lumidify joined #nim |
05:03:14 | * | koltrast joined #nim |
05:03:14 | * | fallback joined #nim |
05:03:14 | * | mahlon joined #nim |
05:03:14 | * | neceve joined #nim |
05:03:14 | * | wallabra joined #nim |
05:03:21 | * | nullsh quit (Max SendQ exceeded) |
05:04:00 | * | nullsh joined #nim |
05:04:01 | FromDiscord | <Yardanico> now I don't know if it ever worked with ARC :P |
05:06:12 | FromDiscord | <Yardanico> okay it did not work on 1.6.6 either |
05:07:17 | * | def- quit (*.net *.split) |
05:07:17 | * | jkl quit (*.net *.split) |
05:07:17 | * | alice quit (*.net *.split) |
05:07:56 | * | alice joined #nim |
05:08:09 | * | droidrage quit (*.net *.split) |
05:08:09 | * | om3ga quit (*.net *.split) |
05:08:09 | * | LyndsySimon quit (*.net *.split) |
05:08:09 | * | xaltsc quit (*.net *.split) |
05:08:09 | * | ixmpp quit (*.net *.split) |
05:08:32 | * | blackbeard420 quit (*.net *.split) |
05:08:32 | * | buster_blue[m] quit (*.net *.split) |
05:08:32 | * | FromDiscord quit (*.net *.split) |
05:08:32 | * | via__ quit (*.net *.split) |
05:08:33 | * | euantorano quit (*.net *.split) |
05:08:33 | * | dv^_^ quit (*.net *.split) |
05:09:10 | * | neceve quit (*.net *.split) |
05:09:11 | * | hexeme_ quit (*.net *.split) |
05:09:11 | * | Onionhammer quit (*.net *.split) |
05:09:11 | * | genpaku quit (*.net *.split) |
05:09:11 | * | cornfeedhobo quit (*.net *.split) |
05:09:11 | * | qwestion quit (*.net *.split) |
05:09:11 | * | void09 quit (*.net *.split) |
05:09:11 | * | NimEventer quit (*.net *.split) |
05:09:11 | * | Amun-Ra quit (*.net *.split) |
05:09:12 | * | qwr quit (*.net *.split) |
05:09:12 | * | syl quit (*.net *.split) |
05:10:09 | * | nisstyre quit (*.net *.split) |
05:10:09 | * | oz quit (*.net *.split) |
05:10:09 | * | DixieFlatline quit (*.net *.split) |
05:10:09 | * | mal`` quit (*.net *.split) |
05:10:09 | * | gshumway quit (*.net *.split) |
05:10:09 | * | Yardanico quit (*.net *.split) |
05:10:09 | * | madprog quit (*.net *.split) |
05:10:22 | * | crem quit (*.net *.split) |
05:10:22 | * | disso_peach quit (*.net *.split) |
05:10:23 | * | djanatyn quit (*.net *.split) |
05:10:23 | * | systemdsucks quit (*.net *.split) |
05:10:23 | * | supakeen quit (*.net *.split) |
05:10:23 | * | redj quit (*.net *.split) |
05:10:31 | * | nisstyre joined #nim |
05:10:31 | * | oz joined #nim |
05:10:31 | * | DixieFlatline joined #nim |
05:10:31 | * | mal`` joined #nim |
05:10:31 | * | gshumway joined #nim |
05:10:31 | * | Yardanico joined #nim |
05:10:31 | * | madprog joined #nim |
05:10:42 | * | crem joined #nim |
05:10:42 | * | disso_peach joined #nim |
05:10:42 | * | supakeen joined #nim |
05:10:42 | * | djanatyn joined #nim |
05:10:42 | * | systemdsucks joined #nim |
05:10:42 | * | redj joined #nim |
05:10:51 | * | fallback quit (*.net *.split) |
05:10:51 | * | notchris quit (*.net *.split) |
05:10:51 | * | oddish quit (*.net *.split) |
05:10:51 | * | oprypin quit (*.net *.split) |
05:10:51 | * | reversem3[m] quit (*.net *.split) |
05:10:52 | * | drewr quit (*.net *.split) |
05:11:11 | * | fallback joined #nim |
05:11:11 | * | notchris joined #nim |
05:11:11 | * | oddish joined #nim |
05:11:11 | * | oprypin joined #nim |
05:11:11 | * | reversem3[m] joined #nim |
05:11:11 | * | drewr joined #nim |
05:11:14 | * | reversem3[m] quit (Ping timeout: 274 seconds) |
05:11:59 | * | droidrage joined #nim |
05:11:59 | * | om3ga joined #nim |
05:11:59 | * | LyndsySimon joined #nim |
05:11:59 | * | xaltsc joined #nim |
05:11:59 | * | ixmpp joined #nim |
05:12:17 | * | def- joined #nim |
05:12:17 | * | jkl joined #nim |
05:12:54 | * | blackbeard420 joined #nim |
05:12:54 | * | FromDiscord joined #nim |
05:12:54 | * | via__ joined #nim |
05:12:54 | * | euantorano joined #nim |
05:12:54 | * | dv^_^ joined #nim |
05:13:06 | * | neceve joined #nim |
05:13:06 | * | hexeme_ joined #nim |
05:13:06 | * | Onionhammer joined #nim |
05:13:06 | * | genpaku joined #nim |
05:13:06 | * | cornfeedhobo joined #nim |
05:13:06 | * | qwestion joined #nim |
05:13:06 | * | void09 joined #nim |
05:13:06 | * | NimEventer joined #nim |
05:13:06 | * | Amun-Ra joined #nim |
05:13:06 | * | qwr joined #nim |
05:13:06 | * | syl joined #nim |
05:13:20 | * | void09_ joined #nim |
05:13:21 | * | wallabra quit (*.net *.split) |
05:13:21 | * | mahlon quit (*.net *.split) |
05:13:21 | * | koltrast quit (*.net *.split) |
05:13:22 | * | lumidify quit (*.net *.split) |
05:13:22 | * | lain quit (*.net *.split) |
05:13:22 | * | tk quit (*.net *.split) |
05:13:22 | * | adium quit (*.net *.split) |
05:13:22 | * | rb quit (*.net *.split) |
05:13:22 | * | tinystoat quit (*.net *.split) |
05:13:22 | * | attah quit (*.net *.split) |
05:13:22 | * | _________ quit (*.net *.split) |
05:13:30 | * | void09 quit (Max SendQ exceeded) |
05:14:04 | * | wallabra joined #nim |
05:14:04 | * | mahlon joined #nim |
05:14:04 | * | koltrast joined #nim |
05:14:04 | * | lumidify joined #nim |
05:14:04 | * | lain joined #nim |
05:14:04 | * | tk joined #nim |
05:14:04 | * | adium joined #nim |
05:14:04 | * | rb joined #nim |
05:14:04 | * | tinystoat joined #nim |
05:14:04 | * | attah joined #nim |
05:14:04 | * | _________ joined #nim |
05:19:11 | * | jmdaemon joined #nim |
05:23:16 | FromDiscord | <Yardanico> ah @flywind I missed that part from the FAQ |
05:23:21 | FromDiscord | <Yardanico> "A maintainer of a popular open source project is defined as someone who has write or admin access to one or more of the most popular open source projects on GitHub." |
05:23:29 | FromDiscord | <Yardanico> so that's why I have free access I guess, since I have write access to the Nim repo |
05:23:40 | FromDiscord | <Yardanico> you should have it too |
05:45:08 | * | xcodz-dot joined #nim |
05:45:49 | xcodz-dot | How do you write binary string literals. So that b"Hello" turns to a seq[byte]. I tried using a `b` prefix. It did not work |
05:47:33 | FromDiscord | <Yardanico> you can't really do that, and there's no real need as Nim strings are already "binary" literals since they don't have an encoding |
05:47:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49Bh |
05:47:53 | FromDiscord | <Yardanico> or do as beef said I guess, better also add compiletime pragma then :P |
05:48:10 | xcodz-dot | Hmm, thanks |
05:48:58 | xcodz-dot | Isn't it inefficient that way? Shouldn't I preallocate some space to prevent reallocations each time for each character. I am saying so because I am working on a compression algorithm |
05:49:50 | xcodz-dot | Nvm, I think I would just use strings instead. |
05:54:50 | * | reversem3[m] joined #nim |
05:54:59 | * | buster_blue[m] joined #nim |
06:09:49 | FromDiscord | <flywind> In reply to @Yardanico "so that's why I": I don't seem to have access to it though. |
06:10:00 | FromDiscord | <Yardanico> In reply to @flywind "I don't seem to": weird, can you check in the billing? i think you can apply here maybe |
06:10:21 | FromDiscord | <Yardanico> in https://github.com/settings/billing in Add-ons section |
06:10:32 | * | xcodz-dot quit (Ping timeout: 255 seconds) |
06:11:07 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/1015866579508015125/unknown.png |
06:11:27 | FromDiscord | <Yardanico> select plan |
06:11:34 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/1015866694532612126/unknown.png |
06:11:40 | FromDiscord | <Yardanico> weird |
06:11:49 | FromDiscord | <Yardanico> is nim not popular enough? 🤔 |
06:11:59 | FromDiscord | <Yardanico> and yeah, I don't know, maybe I have it for free due to my student plan that'll soon expire |
06:12:22 | FromDiscord | <flywind> Probably I wasn't involved in beta testing, or selected programming languages repo needed |
06:13:31 | FromDiscord | <flywind> (edit) "Probably ... I" added "because" |
06:14:23 | * | xcodz-dot joined #nim |
06:14:49 | * | tiorock joined #nim |
06:14:49 | * | tiorock quit (Changing host) |
06:14:49 | * | tiorock joined #nim |
06:14:49 | * | rockcavera is now known as Guest5887 |
06:14:50 | * | Guest5887 quit (Killed (copper.libera.chat (Nickname regained by services))) |
06:14:50 | * | tiorock is now known as rockcavera |
06:19:27 | FromDiscord | <Prestige> In reply to @flywind "": I can't imagine anyone paying for this |
06:19:50 | * | kenran joined #nim |
06:20:06 | FromDiscord | <Rika> You’d be surprised… |
06:20:36 | FromDiscord | <Prestige> I would be |
06:23:52 | FromDiscord | <flywind> In reply to @Avahe "I can't imagine anyone": If I use Python for work, I probably pay for it. |
06:24:14 | FromDiscord | <Prestige> Why? |
06:25:02 | FromDiscord | <Rika> In reply to @Avahe "Why?": It works well for python |
06:25:40 | FromDiscord | <Prestige> I've seen too much bad/incorrect code come out of that thing |
06:28:40 | FromDiscord | <4zv4l> why does the doc for function need to be written under it's name ?↵I don't know if that's the best practice but I'm used to write its doc upside of it |
06:29:43 | * | xcodz-dot quit (Quit: Leaving) |
06:34:04 | FromDiscord | <Elegantbeef> Cause that's how it is↵(@4zv4l) |
06:34:24 | FromDiscord | <Elegantbeef> There is some ambiguity with top level doc comments and procedures though |
06:35:18 | FromDiscord | <Elegantbeef> I mean if you do it with the comment above the procedure |
06:35:43 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49Bp |
06:42:00 | * | jmdaemon quit (Ping timeout: 244 seconds) |
06:50:36 | * | jmdaemon joined #nim |
06:58:45 | * | kenran quit (Quit: WeeChat info:version) |
07:10:38 | * | jmdaemon quit (Ping timeout: 240 seconds) |
07:29:03 | * | tiorock joined #nim |
07:29:03 | * | tiorock quit (Changing host) |
07:29:04 | * | tiorock joined #nim |
07:29:04 | * | rockcavera is now known as Guest7450 |
07:29:04 | * | Guest7450 quit (Killed (calcium.libera.chat (Nickname regained by services))) |
07:29:04 | * | tiorock is now known as rockcavera |
07:41:03 | FromDiscord | <Hamid_Bluri> can someone explain why `string` is different from `seq[char]`? ↵I don't get it |
07:41:33 | FromDiscord | <Elegantbeef> String stores a nul character after the collection where `seq[byte]` doesnt |
07:41:43 | FromDiscord | <Elegantbeef> or `seq[char]` doesnt |
07:43:16 | FromDiscord | <Hamid_Bluri> both data types store `size` & `capacity` of their content |
07:43:33 | FromDiscord | <Hamid_Bluri> why is `\0` important? |
07:43:40 | FromDiscord | <Elegantbeef> Correct but `seq[char]` does not end with a `\0`, `string` is guaranteed to |
07:43:48 | FromDiscord | <Elegantbeef> Cause it's a 0 cost transformation to cstring |
07:43:59 | FromDiscord | <Hamid_Bluri> Oh, thanks |
07:45:14 | FromDiscord | <retkid> I've yet to find a reason to ever make a mcro |
07:45:17 | FromDiscord | <retkid> (edit) "mcro" => "macro" |
07:45:25 | FromDiscord | <retkid> thats not true |
07:45:25 | FromDiscord | <Elegantbeef> Good |
07:45:43 | FromDiscord | <retkid> the things I would need a macro for im too lazy to write the macro for |
07:46:05 | FromDiscord | <retkid> so whats a good thing to learn to use macros to do |
07:46:10 | FromDiscord | <retkid> i cant think of a problem |
07:47:55 | FromDiscord | <Rika> You’ll need it when you find it |
07:48:16 | FromDiscord | <retkid> its been literal years |
07:48:35 | FromDiscord | <retkid> I suppose I just now started using templates |
07:48:39 | FromDiscord | <Rika> In reply to @retkid "the things I would": If you’re not lazy enough to put in the effort to make a macro for it then it’s not worth making a macro for then |
07:48:47 | FromDiscord | <Rika> In reply to @retkid "its been literal years": Who cares |
07:48:57 | FromDiscord | <Rika> So what if it’s been years |
07:49:06 | FromDiscord | <Rika> Sometimes you just don’t need a feature |
08:11:54 | * | sagax joined #nim |
08:19:01 | FromDiscord | <Phil> ~~And sometimes your PR for a feature just lies in wait for ages~~ |
08:19:56 | FromDiscord | <Elegantbeef> What PR? |
08:21:28 | FromDiscord | <Phil> norm one, I merged that very same PR on my fork of norm just so I finally could have the feature. Basically allowing you to use your own ref object with norm instead of being forced to use Model object, only for selects though for now |
08:22:30 | FromDiscord | <Phil> webdev space, that stuff is about converting database Row objects to a custom object type |
08:24:07 | FromDiscord | <Elegantbeef> Yea my PR to async build nimibook pages took forever to be merged |
08:24:07 | FromDiscord | <Elegantbeef> But now it is and it's like \<30s for norm docs to be built |
08:24:54 | FromDiscord | <Phil> neat-o! |
08:32:34 | * | derpydoo quit (Ping timeout: 244 seconds) |
09:17:08 | * | vicecea quit (Remote host closed the connection) |
09:17:37 | * | vicecea joined #nim |
09:21:51 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=49BV |
09:30:11 | FromDiscord | <Rika> What? |
09:30:48 | FromDiscord | <4zv4l> In reply to @4zv4l "how can I control": I can't interact with the program after that |
09:31:39 | FromDiscord | <4zv4l> when I type, it's my shell that execute commands not the program |
09:31:47 | FromDiscord | <4zv4l> but the program still appear so that's weird |
09:32:52 | FromDiscord | <4zv4l> so except sigaction, no other solution ? |
09:33:00 | FromDiscord | <4zv4l> why doesn't try/except doesn't catch that ? |
09:33:27 | FromDiscord | <4zv4l> in ruby we can do `rescue SystemExit, Interrupt` |
09:34:51 | FromDiscord | <Rika> Because signals are not exceptions |
09:35:18 | FromDiscord | <Rika> I believe you have to disable the hook that ends the program first, I forgot hot but I think it’s a define flag |
09:39:14 | FromDiscord | <4zv4l> In reply to @Rika "I believe you have": where can I find that ? |
09:39:39 | FromDiscord | <domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=49BY |
09:40:01 | FromDiscord | <domosokrat> Meaning, ctrl-c does not terminate the program |
09:42:01 | FromDiscord | <4zv4l> alright, it works now when I move `setControlCHook(ctrlC)` outside of the main function |
09:42:08 | FromDiscord | <4zv4l> is there anything similar for ctrlD ? |
09:42:41 | FromDiscord | <4zv4l> because then I get the same behavior when doing ctrl-d |
09:46:12 | FromDiscord | <domosokrat> usually ctrl-d does not get mapped to a signal |
09:46:58 | FromDiscord | <domosokrat> it's just eof for stdin |
09:59:03 | * | neceve_ joined #nim |
10:01:22 | FromDiscord | <4zv4l> alright thanks ! |
10:01:29 | FromDiscord | <4zv4l> can I increase the terminal font with my program ? |
10:02:59 | madprops | i really doubt it |
10:03:09 | madprops | unless you modify your terminals config and apply the changes somehow |
10:03:54 | madprops | oh i guess you mean just printing bigger letters |
10:04:02 | madprops | not sure i've seen that either |
10:04:44 | madprops | https://i.imgur.com/oygnZq0.jpg |
10:05:35 | FromDiscord | <domosokrat> some terminals allow changing the used font via control codes. But that is terminal dependent |
10:06:00 | FromDiscord | <4zv4l> alright T-T↵just I made a terminal game but it looks better when zooming but it's ok |
10:11:47 | FromDiscord | <vestel> In reply to @Bubblie "const pointer": let x = addr someObj |
10:22:15 | FromDiscord | <dain> what exactly is "nim check" |
10:22:21 | FromDiscord | <dain> (edit) ""nim check"" => "`nim check`" |
10:22:32 | FromDiscord | <dain> ive seen it used / mentioned in some places but I can't find any documentation for it at all |
10:22:39 | FromDiscord | <dain> `nim --help` makes no mention of it |
10:23:46 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=49C4 |
10:23:57 | FromDiscord | <dain> that's not the same thing |
10:24:04 | FromDiscord | <dain> that's `nim --checks` not `nim check` |
10:24:26 | FromDiscord | <aruZeta> ah my bad |
10:24:43 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=49C5 |
10:25:02 | FromDiscord | <dain> huh where is that |
10:25:08 | FromDiscord | <dain> it doesn't say that when i run `nim --help` |
10:25:25 | FromDiscord | <aruZeta> `nim --fullhelp` |
10:25:34 | FromDiscord | <aruZeta> and also https://nim-lang.org/docs/nimc.html#compiler-usage |
10:25:34 | FromDiscord | <dain> oooo |
10:25:39 | FromDiscord | <dain> thx |
10:25:43 | FromDiscord | <aruZeta> https://media.discordapp.net/attachments/371759389889003532/1015930652497023026/unknown.png |
10:31:30 | FromDiscord | <domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=49C6 |
10:38:48 | FromDiscord | <dain> is there a way to "manually" step through an iterator rather than using a for loop, similar to python's `next` function? |
10:39:22 | FromDiscord | <Rika> Only if the iterator is not inline |
10:39:48 | FromDiscord | <Rika> You can “convert” inline iterators into closure iterators but I don’t know which of beef’s packages it’s in |
10:40:09 | FromDiscord | <dain> how do you do it with closure iterators |
10:40:26 | FromDiscord | <Rika> Say you store a closure iterator in a variable by calling the function that returns it |
10:40:54 | FromDiscord | <Rika> Calling that variable will return the value and advance the iterator |
10:42:39 | FromDiscord | <Rika> Nim doesn’t raise an exception when the iterator is finished, you have to check with a call to “finished” |
10:42:48 | FromDiscord | <Rika> Info here |
10:42:48 | FromDiscord | <Rika> https://nim-lang.github.io/Nim/manual.html#iterators-and-the-for-statement-firstminusclass-iterators |
10:43:22 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=49Ca |
10:44:39 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Cb |
10:45:19 | FromDiscord | <Rika> You have to call the variable |
10:45:21 | FromDiscord | <Rika> it() |
10:45:46 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Cc |
10:45:49 | FromDiscord | <Rika> ? What’s the error |
10:46:05 | FromDiscord | <Rika> Oh wait no that’s not returning the iterator |
10:46:19 | FromDiscord | <Rika> ? I’m confused wait |
10:46:32 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Cd |
10:46:56 | FromDiscord | <Rika> In reply to @dain "can you explain more.": That should work, what’s the error for this |
10:47:20 | FromDiscord | <Rika> Actually should it? |
10:47:27 | FromDiscord | <Rika> I think not really |
10:47:48 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Ce |
10:47:48 | FromDiscord | <Rika> var it = mycount↵echo mycount() |
10:48:37 | FromDiscord | <dain> okay yeah that worked. that's so weird though |
10:49:08 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=49Cf |
10:49:10 | FromDiscord | <Rika> You can’t directly call a closure iterator because it doesn’t then have a place to store the data |
10:49:19 | FromDiscord | <Rika> So you store it in a variable first then call it |
10:49:30 | FromDiscord | <Rika> At least that’s what I assume is why it doesn’t work |
10:49:32 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Cg |
10:49:42 | FromDiscord | <Rika> (edit) "You can’t directly call a closure iterator because it doesn’t then have a place to store the ... data" added "closure" |
10:51:11 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Ch |
10:52:01 | FromDiscord | <dain> looks like this is just aliasing `it1` and `it2` to `mycount` or something. |
10:52:14 | FromDiscord | <Rika> Yeah I can see the confusion |
10:52:46 | FromDiscord | <dain> also it doesnt seem to be documented in the manual that you can do this, iterators are only accessed in a for loop there |
10:53:11 | * | rockcavera quit (Ping timeout: 260 seconds) |
10:54:44 | FromDiscord | <dain> oh wait no there is a part where it shows another way |
11:09:00 | * | rockcavera joined #nim |
11:09:01 | * | rockcavera quit (Changing host) |
11:09:01 | * | rockcavera joined #nim |
11:53:10 | FromDiscord | <dlesnoff> I have a simple question.↵Is it possible to remove a variable/type from the « namespace » ?↵Especially in inim, I would like to do tests on a type. I want to change a type's field (and keep the same name for the object). |
11:53:20 | FromDiscord | <dlesnoff> (edit) "I have a simple question.↵Is" => "Is" |
11:58:55 | FromDiscord | <Superstart033> Good morning everyone |
12:02:31 | FromDiscord | <auxym> In reply to @Jiezron "Is it possible to": you can use a `block` to create a new scope when you define your type. this way as soon as you exit the scope, your type is not visible anymore, and you are free to create it in a new block |
12:10:38 | FromDiscord | <headphonejack> I just compiled Nim from source on my Gentoo Linux. Is it possible to install the nim binaries under -say- $HOME/.local/bin/. ? Is there something like 'make install' ? |
12:16:52 | * | arkurious joined #nim |
12:27:38 | FromDiscord | <dlesnoff> In reply to @auxym "you can use a": I guess what I want to do in the end is to import and unimport type definitions from a module. It would easen back and forth changes, and enable a similar code to use two differents type definitions. |
13:21:39 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=49CN |
13:23:51 | FromDiscord | <aruZeta> you just can't |
13:24:07 | FromDiscord | <aruZeta> you must do it like in your 2nd or 3rd example |
13:24:27 | FromDiscord | <aruZeta> the type of everything must be able to be known at compiletime |
13:30:05 | FromDiscord | <dlesnoff> Then why don't we get an error message at the type construction ? This is surprising ! |
13:30:09 | FromDiscord | <vestel> Seq is a collection of objects, it must know size of objects that it will store |
13:30:21 | FromDiscord | <vestel> So you must specify type |
13:31:08 | FromDiscord | <vestel> In reply to @Jiezron "Then why don't we": maybe there is some messing with typedesc, not sure |
13:31:11 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=49CQ |
13:31:17 | FromDiscord | <vestel> (edit) "typedesc," => "`typedesc`," |
13:31:29 | FromDiscord | <aruZeta> In reply to @Jiezron "Then why don't we": you get it |
13:31:44 | FromDiscord | <aruZeta> `Error: invalid type: 'T' in this context: 'myObject' for var` |
13:32:56 | FromDiscord | <aruZeta> https://play.nim-lang.org/ is down :( |
14:01:23 | FromDiscord | <dlesnoff> I have transposed my question in a forum post: https://forum.nim-lang.org/t/9436 |
14:02:56 | FromDiscord | <auxym> In reply to @Jiezron "I guess what I": hm can you use import in a block? Never tried it but you could try |
14:04:01 | FromDiscord | <dlesnoff> The thing is I don't want scoping. Now that I think about it, I could use a when block |
14:08:26 | * | kenran joined #nim |
14:35:21 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=49D4 |
14:49:07 | FromDiscord | <auxym> how does it differ from std/lists? |
14:57:13 | FromDiscord | <Prestige> I've been curious if there are advantages to using uint vs Natural for stuff like this |
14:57:30 | FromDiscord | <Prestige> For the `length` property |
14:58:55 | FromDiscord | <jos> is there any way to avoid name collisions with imports themselves |
14:59:11 | FromDiscord | <aruZeta> you mean the module's name? |
14:59:13 | FromDiscord | <jos> like import x; var x = 1; doesn't work |
14:59:14 | FromDiscord | <jos> ye |
14:59:27 | FromDiscord | <jos> I noticed ppl usually use plural for module names |
14:59:41 | FromDiscord | <Prestige> import x as xModule |
14:59:46 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=49Da |
15:00:04 | FromDiscord | <jos> is xModule even like |
15:00:10 | FromDiscord | <jos> valid as an identifier now or something |
15:00:29 | FromDiscord | <jos> like if it imports all the items by default why does it care if there's a collision anyway |
15:00:46 | FromDiscord | <aruZeta> for exporting for example |
15:00:58 | FromDiscord | <aruZeta> you can export a whole module you imported |
15:01:17 | FromDiscord | <aruZeta> so how would it know which module to export if you import 2 modules with the same name |
15:02:02 | FromDiscord | <aruZeta> this could be solved if you could export modules like `export a/b/myModule`, but it does not wokr |
15:02:03 | FromDiscord | <aruZeta> (edit) "wokr" => "work" |
15:02:16 | FromDiscord | <aruZeta> you have to `export myModule` |
15:13:24 | * | kenran quit (Quit: WeeChat info:version) |
15:26:27 | FromDiscord | <dain> i always get tripped up with trying to use iterators for anything at all |
15:26:32 | FromDiscord | <dain> what am i doing wrong here |
15:26:42 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Dj |
15:28:06 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Dl |
15:28:37 | FromDiscord | <dain> (edit) "https://play.nim-lang.org/#ix=49Dj" => "https://play.nim-lang.org/#ix=49Dm" |
15:29:40 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Dn |
15:30:37 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Do |
15:31:10 | * | estiquelapice joined #nim |
15:43:34 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=49Dq |
15:43:53 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Dr |
15:44:04 | FromDiscord | <dain> it is so annoying how you can't just use iterators like actual values and need this workaround |
15:44:47 | FromDiscord | <dain> like yeah i know there are inline vs closure iterators but i never know which one im dealing with when it's given to me by a function |
15:45:29 | FromDiscord | <aruZeta> In reply to @dain "like yeah i know": you can check their definition |
15:45:32 | FromDiscord | <aruZeta> https://nim-lang.org/docs/io.html#lines.i%2CFile |
15:47:48 | * | estiquelapice quit () |
15:48:53 | * | estiquelapice joined #nim |
15:51:27 | FromDiscord | <dain> it just says iterator |
15:52:53 | * | estiquelapice quit (Client Quit) |
15:53:44 | FromDiscord | <dain> also what is the difference between iterable and iterator |
15:54:04 | * | estiquelapice joined #nim |
15:57:23 | * | estiquelapice quit (Client Quit) |
15:58:28 | * | estiquelapice joined #nim |
16:00:21 | * | estiquelapice quit (Client Quit) |
16:10:37 | * | estiquelapice joined #nim |
16:12:15 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49Dw |
16:12:56 | FromDiscord | <0ffh> Um, how do you format-quote source in a message again? |
16:13:05 | FromDiscord | <dain> triple backtick |
16:13:09 | FromDiscord | <0ffh> Thanks! |
16:13:56 | * | estiquelapice quit (Client Quit) |
16:14:26 | FromDiscord | <0ffh> sent a code paste, see https://play.nim-lang.org/#ix=49Dx |
16:15:00 | * | estiquelapice joined #nim |
16:15:48 | FromDiscord | <aruZeta> so you like circles huh 🤨 https://media.discordapp.net/attachments/371759389889003532/1016018755077279795/unknown.png |
16:19:43 | * | estiquelapice quit (Client Quit) |
16:42:20 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49DE |
16:43:26 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49DI |
16:43:28 | FromDiscord | <dain> (it goes on longer than this) |
16:43:37 | FromDiscord | <dain> i just want to be able to take two iterables and yield another iterable |
16:47:53 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=49DM |
16:48:41 | FromDiscord | <dlesnoff> Hmm but you want to change this line: for seqitm in items(seqs): inc(L, len(seqitm)) |
16:51:01 | FromDiscord | <0ffh> sent a code paste, see https://play.nim-lang.org/#ix=49DP |
16:51:21 | FromDiscord | <dain> but that doesn't work either, for a different reason. i posted above about it |
16:51:33 | FromDiscord | <dain> you can't even assign the `a.lines` to a variable. you have to just use it straight away |
16:51:52 | FromDiscord | <0ffh> oh, okay 😔 |
16:51:55 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49DQ |
16:52:23 | FromDiscord | <0ffh> so nim doesn't like to assign iterators into variables |
16:52:42 | FromDiscord | <dain> every time i try to use nim i run into some fucking absurdity like this |
16:53:21 | FromDiscord | <aruZeta> In reply to @dain "you can't even assign": ig that's because it's an inline operator? |
16:53:51 | FromDiscord | <aruZeta> > An inline iterator is an iterator that's always inlined by the compiler leading to zero overhead for the abstraction, but may result in a heavy increase in code size.↵↵> a closure iterator can be passed around more freely |
16:54:03 | FromDiscord | <0ffh> might be, you'd have to look in the library implementation |
16:54:03 | FromDiscord | <dain> okay so how do I turn it into a closure iterator |
16:54:13 | FromDiscord | <aruZeta> In reply to @0ffh "might be, you'd have": it is |
16:54:25 | FromDiscord | <aruZeta> In reply to @dain "okay so how do": that's ... something i don't know :| |
16:54:41 | FromDiscord | <dain> like .. why would i ever want an inline iterator if i can't even assign it to a variable |
16:55:01 | FromDiscord | <0ffh> In reply to @dain "okay so how do": I think you should be able to write your own closure iterator for this case and then use that |
16:55:03 | FromDiscord | <dain> or pass it into a proc or do anything with it |
16:55:24 | FromDiscord | <dain> but every fucking iterator in the stdlib is inline by default so i'd be writing wrappers for days |
16:56:06 | FromDiscord | <0ffh> Hmmm, how about a template or macro that creates a closure iterator from an inline iterator? |
16:56:36 | FromDiscord | <dain> i guess that would work. but really what i dont understand is why this split exists in the first place |
16:56:37 | FromDiscord | <Rika> Already made |
16:56:46 | FromDiscord | <Rika> Beef made one somewhere in his libraries |
16:57:03 | FromDiscord | <aruZeta> the good beef |
16:57:35 | FromDiscord | <0ffh> now to find it! 😆 |
16:58:38 | FromDiscord | <Rika> Probably his iterator library |
16:58:58 | FromDiscord | <0ffh> sounds vaguely plausible 😂 |
16:59:41 | FromDiscord | <aruZeta> maybe https://github.com/beef331/slicerator/blob/master/src/closures.nim |
17:00:09 | FromDiscord | <aruZeta> ig https://github.com/beef331/slicerator/blob/master/src/closures.nim#L60-L62 |
17:00:53 | FromDiscord | <0ffh> @dain that looks quite like what you need! |
17:01:50 | * | estiquelapice joined #nim |
17:06:19 | FromDiscord | <dain> gives an error when I try to use it |
17:06:33 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49DU |
17:07:47 | FromDiscord | <dain> but still this is a side issue, even when I just pass in `.lines` directly it doesn't work and im no closer to figuring out why |
17:09:07 | FromDiscord | <dain> sent a code paste, see https://paste.rs/Iee |
17:09:15 | FromDiscord | <dain> (edit) "https://play.nim-lang.org/#ix=49DX" => "https://play.nim-lang.org/#ix=49DW" |
17:09:48 | FromDiscord | <dain> ive tried a bunch of different ways of writing and wrapping the `union` iterator |
17:10:11 | FromDiscord | <dain> as a proc, iterator, template, etc |
17:10:32 | FromDiscord | <dain> i just want to lazily go through two iterators and yield the union |
17:12:55 | FromDiscord | <0ffh> In reply to @dain "i just want to": try this workaround: if you cannot pass the inline iterators, just pass the files instead |
17:13:06 | FromDiscord | <dlesnoff> In reply to @0ffh "A question about concatenating": Tried to modify the std implementation for the concatenation but I don't get how to circumvent the issue with the return type. We can not return an openArray, and we have to know the size of the array we return before the call. At the same time, we need the list of arrays to concatenate to determine the size of the final array. |
17:14:03 | FromDiscord | <0ffh> In reply to @Jiezron "Tried to modify the": Thanks! If it doesn't work nevermind it's not super important to me. I'll just use sequences and everything is fine! |
17:14:39 | FromDiscord | <0ffh> Seems like this will be done in the compiler at some point or not at all. |
17:14:44 | * | emery quit (Ping timeout: 255 seconds) |
17:15:46 | FromDiscord | <aruZeta> @0ffh if you want to use a seq as a array (if you know which will be it's size when creating it) you can use `newSeqOfCap[type](max len)` |
17:16:05 | FromDiscord | <dlesnoff> In reply to @0ffh "Thanks! If it doesn't": I think this is an important point that you raised. If I cant do it with a func, maybe I will manage to do it with a macro/template |
17:16:20 | FromDiscord | <dain> In reply to @0ffh "try this workaround: if": yeah that's what I did at first. it worked. but I wanted to extend it to arbitrary iterators, to make it more general-purpose |
17:16:28 | FromDiscord | <aruZeta> it's kind of the same as using an array, the only difference is that the seq will also hold the cap |
17:16:51 | FromDiscord | <dain> (edit) "general-purpose" => "general-purpose. make it generic over any pair of iterators over the same type" |
17:17:10 | FromDiscord | <dain> and i can't for the life of me figure it out |
17:18:34 | * | ehmry joined #nim |
17:18:42 | FromDiscord | <0ffh> In reply to @aruZeta "it's kind of the": I assume that with a constant sequence the compiler will automatically set the cap to the number of elements. |
17:18:54 | * | jmdaemon joined #nim |
17:19:08 | FromDiscord | <0ffh> So that shouldn't be neccessary. |
17:19:16 | FromDiscord | <0ffh> (edit) "neccessary." => "necessary." |
17:23:25 | FromDiscord | <aruZeta> In reply to @0ffh "I assume that with": oh yh right |
17:23:50 | FromDiscord | <aruZeta> sometimes I forget abt that lol |
17:33:42 | FromDiscord | <! Nilts> Is nim good for server backend? |
17:35:28 | FromDiscord | <treeform> yes, use one at work |
17:35:37 | FromDiscord | <treeform> (edit) "yes, ... use" added "I" |
17:38:06 | FromDiscord | <! Nilts> In reply to @treeform "yes, I use one": I don’t get that stament? You use a nim server backend at work? |
17:38:21 | FromDiscord | <! Nilts> ah |
17:38:22 | FromDiscord | <! Nilts> ok |
17:38:25 | FromDiscord | <! Nilts> nice! |
17:40:04 | FromDiscord | <treeform> yes that's right |
17:40:28 | FromDiscord | <treeform> I use it both on front end and backend... which also allows me to share some code. |
17:40:50 | * | estiquelapice quit () |
17:42:26 | * | estiquelapice joined #nim |
17:43:57 | FromDiscord | <Phil> In reply to @not logged in "Is nim good for": Yes, I have a REST backend with nim's "prologue" framework |
17:44:22 | FromDiscord | <! Nilts> 👍 |
17:46:40 | FromDiscord | <Phil> Backend for an Angular REST API.↵The entire tech stack is↵Angular (Frontend) - Nginx (Reverse Proxy) - Prologue (Covers Routing and general request handling)↵Within the prologue application I use jsony for (de)serialization, tinypool for connection pooling, and constructor to make writing construction-procs for norm-models less annoying |
17:47:18 | FromDiscord | <Phil> Also zippy to compress the requests as part of a middleware I wrote on the fly for request compression |
17:47:48 | FromDiscord | <Phil> Further the entire thing is deployed in a docker-alpine container and thus dynamically linked with musl, guides on how to do that are within the prologue docs |
17:51:14 | FromDiscord | <Phil> Oh and openssl for password encryption I guess |
17:51:49 | FromDiscord | <Phil> (edit) "encryption" => "hasing" |
17:51:53 | FromDiscord | <Phil> (edit) "hasing" => "hashing" |
18:01:12 | FromDiscord | <Forest [She/Her]> In the compiler/modulegraphs module, is it possible to get the defined symbols passed by the user? |
18:01:23 | FromDiscord | <Forest [She/Her]> Defined... Types? |
18:01:44 | FromDiscord | <Forest [She/Her]> Idk, like when you pass `-d:definition=value` to the compiler |
18:02:02 | FromDiscord | <Forest [She/Her]> I'm making a compiler backend so using `when defined(definition)` won't work |
18:07:13 | FromDiscord | <Forest [She/Her]> Figured it out |
18:07:17 | FromDiscord | <Forest [She/Her]> Mostly |
18:09:27 | * | estiquelapice quit () |
18:10:32 | * | estiquelapice joined #nim |
18:26:30 | FromDiscord | <voidwalker> anyone with some curl/nim httpclient/http api calls experience can take a look at this please ?: https://forum.nim-lang.org/t/9434 |
18:27:02 | FromDiscord | <voidwalker> been 24 hours and no hint how to go forward with this. I can't even open the code, I have trauma |
18:33:48 | * | estiquelapice quit () |
18:33:52 | * | rockcavera quit (Remote host closed the connection) |
18:35:49 | FromDiscord | <Bung> there is newHttpHeaders |
18:36:22 | FromDiscord | <voidwalker> yeah I tried with those, only it appears they are not actual http headers but still in the form data |
18:36:57 | FromDiscord | <voidwalker> I should maybe search for http server made for debuggin, see what curl does there.. and see where I can change in httpclient |
18:37:29 | FromDiscord | <Bung> can't be that, form data is in http body |
18:38:15 | FromDiscord | <Bung> otherwise many http server or client usage are goes wrong |
18:39:27 | FromDiscord | <Bung> haven't seen such a problem in nim economy |
18:39:36 | FromDiscord | <voidwalker> I have no idea, I only know that curl line works, and anything I tried in httpclient gives me code 500 |
18:39:51 | FromDiscord | <voidwalker> I cannot use libcurl since it is not async |
18:40:33 | FromDiscord | <Bung> it might be your problem, so show the code |
18:45:39 | FromDiscord | <Bung> https://github.com/bung87/scorper/blob/5080928361b464a36cb4966d996d6ec9bb4808e0/tests/trange.nim#L28 you use it like this ? |
18:47:53 | FromDiscord | <voidwalker> I tried something like this |
18:47:54 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Eb |
18:50:08 | FromDiscord | <Rika> nim lowercases the header names as they should not be case sensitive as per the http spec |
18:50:19 | FromDiscord | <Rika> perhaps the server has this incorrectly programmed |
18:50:30 | FromDiscord | <Rika> and has header names as case sensitive |
18:51:00 | FromDiscord | <Bung> I have no idea why u create two client |
18:51:03 | FromDiscord | <voidwalker> i looked at other http client api wrappersm java, go, js, none have implemented this nocopy shit that I need |
18:51:04 | FromDiscord | <Rika> test with curl by using `abspath` instead of `Abspath` ig |
18:51:34 | FromDiscord | <voidwalker> @Bung I did that just to debug, to make sure it is all separated.. cause I needed another config call before the actual call, to make sure an option is set |
18:51:53 | FromDiscord | <voidwalker> but I have since learned that it requires server restart to take effect, and I can't restart server via API ,so quite useless |
18:52:15 | FromDiscord | <voidwalker> (edit) "@Bung I did that just to debug, to make sure it is all separated.. cause I needed another config ... call" added "setting API" |
18:53:31 | FromDiscord | <voidwalker> it works with lowercase in curl @Rika , so that's not it.. sigh |
18:53:44 | FromDiscord | <voidwalker> time to google some http debug servers |
18:54:31 | FromDiscord | <Bung> that's maybe the server side problem , if your request correctly sent |
18:55:09 | FromDiscord | <voidwalker> well it is not sent correctly, otherwise it would work |
18:57:41 | FromDiscord | <Bung> u need modified to one client version , otherwise I cant see the real logic |
18:58:03 | FromDiscord | <Rika> arent there stub webservers to look at sent requests |
18:58:55 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Ee |
18:59:21 | FromDiscord | <Bung> yeah, that's should be easy confirm, also send with header is very basic function I dont think there's much problem on there |
19:01:25 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Eg |
19:01:32 | FromDiscord | <voidwalker> (edit) |
19:03:18 | FromDiscord | <voidwalker> vs nim: |
19:03:26 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Eh |
19:03:34 | FromDiscord | <voidwalker> (edit) |
19:04:17 | FromDiscord | <voidwalker> so yeah that abspath bullshit does not go in the main headers, like I thought |
19:07:42 | FromDiscord | <voidwalker> with this code: |
19:08:35 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Ek |
19:08:35 | FromDiscord | <voidwalker> I get: |
19:08:43 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49El |
19:08:55 | FromDiscord | <voidwalker> (edit) |
19:09:37 | FromDiscord | <voidwalker> so I need to get that Abspath thing to go with the file data somehow |
19:12:00 | FromDiscord | <Bung> what's your nim version ? have you tried old version |
19:12:05 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Em |
19:13:06 | FromDiscord | <voidwalker> 1.6.6 Why would I try older versions? |
19:13:59 | FromDiscord | <Phil> ~~devel or bust~~ |
19:14:54 | FromDiscord | <Bung> like here people may answered base on their experience, it may out of date , as their experience base on older nim version |
19:15:04 | FromDiscord | <Bung> maybe something is broken |
19:18:21 | FromDiscord | <voidwalker> I have a feeling that something might not be implemented, with the higher level API |
19:18:43 | FromDiscord | <voidwalker> Like my first nim httpclient post, what I wanted to do could not be done, and the solution was a mod |
19:18:56 | FromDiscord | <voidwalker> we need a crowdfunding to get a real capable httpclient in nim : ( |
19:22:39 | FromDiscord | <Bung> can't be "not be implemented" , maybe just broken |
19:24:05 | FromDiscord | <voidwalker> Nah there is nothing broken here as I feel it, I just can't set a custom "header" for the multipart data |
19:25:53 | FromDiscord | <voidwalker> doing data.add and data.addFiles opens up two elements in the multi part data object, and I need everything to be in just one. Not familiar with the http protocol, but that's what I got from this |
19:26:13 | FromDiscord | <Bung> no idea, it works for me as https://github.com/bung87/scorper all test passed |
19:26:28 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
19:27:08 | FromDiscord | <voidwalker> what does scorper have to do with it, do you have a similar API request done with nim's httpclient ? |
19:28:06 | FromDiscord | <Bung> https://github.com/bung87/scorper/blob/5080928361b464a36cb4966d996d6ec9bb4808e0/tests/trange.nim yeah , http range request , similar with your usage |
19:28:15 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Eq |
19:33:30 | * | estiquelapice joined #nim |
19:36:15 | FromDiscord | <Bung> ? |
19:38:12 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Et |
19:38:21 | FromDiscord | <voidwalker> maybe I can add name/content to that entry manually |
19:41:17 | FromDiscord | <Bung> but you dont have to , it's http spec, one data one entry |
19:44:51 | FromDiscord | <voidwalker> well whatever the http spec is, curl can do it |
19:45:11 | FromDiscord | <voidwalker> and for file there is separate filename/fileSize entries, in addition to name/content |
19:51:11 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Eu |
19:51:15 | FromDiscord | <voidwalker> ah, I cannot change it since content is not exported |
19:51:36 | FromDiscord | <Bung> oh, I read the issue , yeah it's in spec, just many tools never use that |
19:52:01 | FromDiscord | <Bung> you should implement the client your self now |
19:54:22 | FromDiscord | <voidwalker> haha 😄 |
19:54:37 | FromDiscord | <voidwalker> I'd rather start a crowdfunding for a proper one |
19:54:49 | FromDiscord | <voidwalker> it does not help we have 5 shitty http clients instead of a good one |
19:55:23 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=49Ev |
19:55:29 | FromDiscord | <voidwalker> data.content[0], data.content[1] |
19:55:54 | FromDiscord | <voidwalker> so name and content should be a seq, not a simple var.. to handle this case? |
20:04:37 | * | jmdaemon joined #nim |
20:05:56 | FromDiscord | <Bung> dont know what you mean name and content |
20:09:26 | FromDiscord | <Require Support> when new post? https://nim-lang.org/araq/ 🤔 |
20:18:17 | FromDiscord | <Tuatarian> how would I make this work as expected? |
20:18:28 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49EA |
20:19:37 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix= |
20:19:38 | FromDiscord | <Tuatarian> oops |
20:20:00 | FromDiscord | <Tuatarian> but if I write `echo vec(1, 2, 3)` it gives me the error `type mismatch: got 'varargs[int]' for '[1, 2, 3]' but expected 'Vec[3]` |
20:32:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49EC |
20:33:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49EE |
20:39:41 | * | rockcavera joined #nim |
20:39:41 | * | rockcavera quit (Changing host) |
20:39:41 | * | rockcavera joined #nim |
20:47:58 | * | jmdaemon quit (Ping timeout: 240 seconds) |
20:54:30 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=49EI |
20:54:52 | FromDiscord | <dain> i know that in python you can't do this safely because mutating a container as you iterate over it can cause items to be skipped. is that the case in nim too? if so, how do i do this |
20:59:45 | FromDiscord | <Elegantbeef> Nims iterators check generally that the collection is not mutated, probably best to just make a new table as you go |
21:04:23 | qwr | dain: mutating iterated collection is generally unsafe: https://play.nim-lang.org/#ix=49EK |
21:05:17 | qwr | dain: but you can copy the pairs iterator with .toSeq (from sequtils) |
21:07:22 | qwr | so it would be for k, v in my_table.pairs.toSeq: # mutating te my_table |
21:08:29 | * | qwr don't know, which is more efficient, copying the iterator or table itself... |
21:11:07 | * | termer quit (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
21:15:59 | * | termer joined #nim |
21:19:02 | * | adium quit (Quit: Stable ZNC by #bnc4you) |
21:22:36 | * | tiorock joined #nim |
21:22:36 | * | tiorock quit (Changing host) |
21:22:36 | * | tiorock joined #nim |
21:22:36 | * | rockcavera is now known as Guest7059 |
21:22:36 | * | tiorock is now known as rockcavera |
21:25:20 | * | jmdaemon joined #nim |
21:25:55 | * | Guest7059 quit (Ping timeout: 252 seconds) |
21:32:05 | * | adium joined #nim |
21:35:42 | FromDiscord | <can.l> Is there a version of the "of" Operator (as in "myObject of BaseType") which does not allow subtypes? |
21:38:34 | FromDiscord | <can.l> So that only exact type matches are allowed (assuming that B inherits from A, "B() of A" would return false, while "B() of B" would return true). |
21:41:43 | FromDiscord | <Elegantbeef> There is not a way presently, but there is a sorta bodge you can do |
21:42:58 | * | neceve_ quit (Ping timeout: 240 seconds) |
21:43:56 | FromDiscord | <can.l> I thought I vaguely remembered that there was some weird pointer math you could do in order to access the typeid of the object. Are you referring to that? |
21:44:02 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49ES |
21:44:08 | FromDiscord | <Elegantbeef> Yea that's what i'm referring to |
21:44:13 | FromDiscord | <Elegantbeef> I'm presently writing it 😄 |
21:44:20 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=49ET |
21:44:24 | FromDiscord | <Tuatarian> not sure what exactly this means |
21:44:37 | FromDiscord | <Elegantbeef> It means you passed non static values to that |
21:44:47 | FromDiscord | <Tuatarian> oh I see |
21:45:09 | FromDiscord | <Tuatarian> wait that doesn't make sense |
21:45:25 | FromDiscord | <Tuatarian> ` let rect = dvec(tan(c.fovX/2), tan(c.fovY/2))` |
21:45:32 | FromDiscord | <Elegantbeef> I generally say only use varargs for procedures |
21:45:35 | FromDiscord | <Tuatarian> this is the line that spawns that issue, the length of the varargs is known at comptime |
21:45:36 | FromDiscord | <Elegantbeef> i mean for macros |
21:45:45 | FromDiscord | <Elegantbeef> it's not the length that's the issue it's the value |
21:45:51 | FromDiscord | <Elegantbeef> `c.fovX` isnt a static value |
21:46:06 | FromDiscord | <Tuatarian> is there any way to separate the two |
21:46:15 | FromDiscord | <Tuatarian> should I just make the size of a `Vec` a runtime value? |
21:46:42 | FromDiscord | <Tuatarian> ie `Vec[N : uint16]` instead of `Vec[N : static uint16]`? |
21:46:51 | FromDiscord | <Tuatarian> is there a better way around this? |
21:46:57 | FromDiscord | <Elegantbeef> That doesnt make it a runtime value |
21:46:59 | FromDiscord | <Elegantbeef> and that's not the issue |
21:47:20 | FromDiscord | <Tuatarian> is there anyway to make this so that the args don't need to be known at compile time? |
21:47:28 | FromDiscord | <Elegantbeef> The issue is that the value you provide isnt a compile time value cause i use `static` |
21:47:33 | FromDiscord | <Elegantbeef> Yes remove the static |
21:51:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=49EU |
21:53:10 | FromDiscord | <can.l> Ah, thank you! I was searching on the forum for a while now and completly unable to find it 🙂 |
21:53:47 | FromDiscord | <Elegantbeef> It really shouldnt be `ref` but i cannot be arsed to make a concept that works for it 😄 |
21:54:22 | FromDiscord | <Elegantbeef> Anywho Nim stores the type information as the first data on OOP so if you scrape that you can happily get the type information |
21:54:47 | FromDiscord | <Elegantbeef> I'm an idiot https://nim-lang.org/docs/system.html#getTypeInfo%2CT exists |
22:26:52 | * | jmdaemon quit (Read error: Connection reset by peer) |
23:06:48 | FromDiscord | <Elegantbeef> @creikey\: also you made me realise i can simplify vershun to not use macros as much it's much more tame now https://github.com/beef331/nimtrest/blob/master/vershun.nim |
23:12:27 | * | jmdaemon joined #nim |