00:06:32 | * | Guest59717 quit (Ping timeout: 260 seconds) |
00:12:42 | * | dadada__ joined #nim |
00:13:57 | * | Ven`` joined #nim |
00:16:52 | * | opal quit (Remote host closed the connection) |
00:17:05 | * | opal joined #nim |
00:17:27 | FromDiscord | <codic> Is there a way to create a variable that can change it's type? |
00:18:12 | FromDiscord | <codic> using :untyped doesn't work |
00:18:25 | Yardanico | no |
00:18:31 | Yardanico | you need to use something like object variants for that |
00:18:42 | Yardanico | or JSON module for simple stuff will also work (since it uses an object variant internally) |
00:18:51 | Yardanico | and if you don't convert it to string there won't be any overhead really |
00:36:34 | * | dadada__ quit (Ping timeout: 265 seconds) |
00:42:41 | * | dadada joined #nim |
00:43:06 | * | dadada is now known as Guest26794 |
00:48:29 | FromDiscord | <codic> see, the problem is, I want to nullify the variable later |
00:48:41 | FromDiscord | <Yardanico> Well yes |
00:48:49 | FromDiscord | <Yardanico> json module had JNull |
00:48:54 | FromDiscord | <Rika> options module |
00:49:13 | FromDiscord | <Rika> if you just want a nullable use options module |
00:50:51 | FromDiscord | <codic> what is that for? |
00:53:47 | * | konvertex quit (Ping timeout: 260 seconds) |
01:03:49 | FromDiscord | <Rika> nullable type |
01:06:49 | * | Guest26794 quit (Ping timeout: 264 seconds) |
01:10:35 | * | lritter quit (Ping timeout: 260 seconds) |
01:11:26 | * | lritter joined #nim |
01:11:47 | * | zacharycarter joined #nim |
01:11:53 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:11:54 | * | CcxWrk quit (Remote host closed the connection) |
01:12:10 | * | CcxWrk joined #nim |
01:12:43 | * | dadada__ joined #nim |
01:27:22 | FromDiscord | <Technisha Circuit> Can i unset a variable in Nim? |
01:29:05 | FromDiscord | <Rika> no |
01:29:12 | FromDiscord | <Technisha Circuit> Ok |
01:29:58 | * | chemist69 quit (Ping timeout: 244 seconds) |
01:30:15 | FromDiscord | <Technisha Circuit> Is it faster to define a variable with the type specified? |
01:30:34 | FromDiscord | <Rika> faster in what way |
01:32:17 | * | chemist69 joined #nim |
01:33:09 | FromDiscord | <Yardanico> @Technisha Circuit unset in what way? GC automatically collects unused memory |
01:33:40 | FromDiscord | <Yardanico> And no, explicit types won't affect runtime at all |
01:34:42 | FromDiscord | <Yardanico> You really have to understand that all stuff like macros, templates, overloading, ufcs doesn't exist in the binary |
01:35:02 | FromDiscord | <Yardanico> It's all native machine code in the end, no types at all |
01:36:14 | * | dadada__ quit (Ping timeout: 256 seconds) |
01:36:28 | FromDiscord | <Yardanico> Types are a compile time (in Nim and backend language if it's not JS) thing |
01:37:38 | FromDiscord | <Technisha Circuit> Oh okay |
01:37:40 | FromDiscord | <Yardanico> That's why compiled programming languages with type systems are usually faster than duck typed interpreted ones - you don't have to do any type checking at runtime since you already know all possible types for everything at compile time |
01:38:23 | FromDiscord | <Yardanico> Well, that's not the only reason, but it still can affect the performance quite a lot |
01:38:28 | FromDiscord | <Technisha Circuit> Oh okay |
01:38:44 | FromDiscord | <Technisha Circuit> So why do most programming languages that are compiled require typing? |
01:39:40 | FromDiscord | <Yardanico> ??? |
01:39:40 | FromDiscord | <Rika> you can write nim without ever touching a type, given that you dont write any procs w/ non-default args |
01:39:57 | FromDiscord | <Yardanico> There's also "auto" |
01:39:59 | FromDiscord | <Rika> the important thing is that the type does not change |
01:40:12 | FromDiscord | <Rika> @Yardanico cant auto args w/o default value xd |
01:40:16 | FromDiscord | <Technisha Circuit> Okay, thanks |
01:40:17 | FromDiscord | <Rika> or can you? |
01:40:22 | FromDiscord | <Yardanico> You can @Rika |
01:40:23 | FromDiscord | <Rika> i dont know actually |
01:40:40 | FromDiscord | <Technisha Circuit> Also, can i import a directory that isn't a package? |
01:40:45 | FromDiscord | <Yardanico> No |
01:40:56 | FromDiscord | <Yardanico> You can import packages from a directory though |
01:41:01 | FromDiscord | <Rika> how would that work tho... |
01:42:06 | FromDiscord | <Technisha Circuit> Hm |
01:42:13 | FromDiscord | <Yardanico> @Rika with auto it just assumes that the first call to the proc is the right one afaik |
01:42:26 | FromDiscord | <Rika> i see |
01:42:38 | * | dadada joined #nim |
01:42:40 | FromDiscord | <Rika> and if its not used it's DCE'd anyway |
01:42:41 | FromDiscord | <Rika> yeah i see |
01:42:50 | FromDiscord | <Yardanico> Ah no |
01:42:52 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#types-auto-type |
01:42:55 | FromDiscord | <Rika> hm? really? |
01:42:58 | FromDiscord | <Yardanico> It's an implicit generic basically |
01:43:01 | * | dadada is now known as Guest85333 |
01:43:05 | FromDiscord | <Technisha Circuit> How would i import all packages in a directory with that directory's name, so if `te.nim` was a file in `dir`, how would i do `dir.te.myFunction`? |
01:43:24 | FromDiscord | <Rika> i see lmao |
01:43:51 | FromDiscord | <Rika> you make a nim file with the same name as that directory that exports all files in the dir |
01:44:03 | FromDiscord | <Rika> (nim file outside the dir) |
01:44:11 | FromDiscord | <Yardanico> Fun fact - you could have implicit auto types in earlier versions |
01:44:29 | FromDiscord | <Yardanico> Luke proc test(a, b) = discard |
01:44:39 | FromDiscord | <Rika> who's Luke? |
01:44:41 | FromDiscord | <Rika> 😛 |
01:44:47 | FromDiscord | <Yardanico> !eval proc test(a, b) = discard |
01:44:49 | NimBot | Compile failed: /usercode/in.nim(1, 11) Error: typeless parameters are obsolete |
01:44:49 | FromDiscord | <Yardanico> *like |
01:44:54 | FromDiscord | <Yardanico> See |
01:45:25 | FromDiscord | <FromIRC> Uptime - 3 days, 9 hours, 7 minutes, 57 seconds, 263 milliseconds, 181 microseconds, and 919 nanoseconds |
01:45:26 | FromDiscord | <Yardanico> !status |
01:45:29 | FromDiscord | <Yardanico> That's nice |
01:49:42 | * | ftsf joined #nim |
01:51:42 | FromDiscord | <Yardanico> TIL from the manual: |
01:51:59 | FromDiscord | <Yardanico> !eval var a = 5; int(a) = 3; echo(a) |
01:52:02 | NimBot | 3 |
01:52:35 | FromDiscord | <Yardanico> " The type conversion T(a) is an L-value if a is an L-value and typeEqualsOrDistinct(T, type(a)) holds." |
02:04:04 | shashlick | @leorize |
02:06:28 | * | Guest85333 quit (Ping timeout: 265 seconds) |
02:08:26 | FromDiscord | <Technisha Circuit> !eval echo "Hi" |
02:08:29 | NimBot | Hi |
02:09:04 | FromDiscord | <Technisha Circuit> Who writes their code like `echo "Hi"` and why? Do you just prefer it? (I do for somethings but for others I don't) |
02:09:13 | FromDiscord | <Yardanico> Wdym |
02:09:44 | FromDiscord | <Yardanico> For most people it's easier to hit space on a keyboard than to type ( or ). :) |
02:10:00 | FromDiscord | <Rika> i prefer it |
02:10:34 | FromDiscord | <Rika> echo "" but everything else is either smth.call() or smth.call when "property", then stuff() if functional |
02:12:16 | * | zacharycarter quit (Ping timeout: 265 seconds) |
02:12:37 | FromDiscord | <Technisha Circuit> Oh okay |
02:12:45 | * | dadada__ joined #nim |
02:13:14 | FromDiscord | <Technisha Circuit> I think i might ditch Python once I know enough Nim |
02:13:18 | FromDiscord | <Technisha Circuit> And i am happy about that |
02:13:46 | FromDiscord | <Rika> i already have 😛 |
02:13:53 | FromDiscord | <Technisha Circuit> Cool |
02:14:08 | FromDiscord | <Technisha Circuit> And NimScript is a nice interpreter for Nim too |
02:14:08 | FromDiscord | <Technisha Circuit> Well |
02:14:12 | FromDiscord | <Rika> only thing that makes me occasionally come back is the package count lol |
02:14:16 | FromDiscord | <Technisha Circuit> Kind of like an alternative |
02:29:11 | * | fredrikhr quit (Ping timeout: 265 seconds) |
02:36:13 | * | dadada__ quit (Ping timeout: 264 seconds) |
02:38:18 | * | madpata_ joined #nim |
02:39:11 | FromDiscord | <Technisha Circuit> How would i read any file a NimScript file? |
02:39:19 | FromDiscord | <Technisha Circuit> For example a `.env` file |
02:39:22 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:40:20 | FromDiscord | <Rika> ?? |
02:40:29 | FromDiscord | <Rika> dooooocs |
02:41:14 | * | madpata quit (Ping timeout: 240 seconds) |
02:41:20 | * | muffindrake joined #nim |
02:42:41 | * | dadada joined #nim |
02:43:04 | * | dadada is now known as Guest37533 |
02:43:55 | FromDiscord | <Technisha Circuit> Ok :p |
02:44:38 | FromDiscord | <Technisha Circuit> Is it possible for me to make a bot for this server that allows you to search the docs? |
02:44:44 | FromDiscord | <Technisha Circuit> Because it'd be nice |
02:44:55 | FromDiscord | <Rika> you can do that manually though? |
02:44:57 | FromDiscord | <Technisha Circuit> Similar to the python bot |
02:45:13 | FromDiscord | <Technisha Circuit> ~~Convinience and laziness~~ |
02:51:20 | FromDiscord | <Elegant Beef> Just use my rofi thing↵https://streamable.com/mhot0 |
02:53:08 | FromDiscord | <Technisha Circuit> How has no one boosted the server? |
02:53:24 | FromDiscord | <Elegant Beef> All the cool people are on irc |
02:53:44 | FromDiscord | <Technisha Circuit> ;-; |
02:53:56 | FromDiscord | <Technisha Circuit> I think a Nim chat client would be cool |
02:54:37 | FromDiscord | <Technisha Circuit> If it made IRC so much friendlier and nicer I'd use it |
02:54:47 | FromDiscord | <Technisha Circuit> Since nick servers are a pain for me |
02:55:21 | FromDiscord | <Technisha Circuit> Also, is there a module that allows me to edit json data as if it was a table? |
02:55:49 | FromDiscord | <Elegant Beef> Json has overloaded `[]` so you can use strings to navigate the json data |
02:56:15 | FromDiscord | <Elegant Beef> overidden* |
02:56:16 | FromDiscord | <Technisha Circuit> I want to be able to edit it though, because i can't edit the json data once loaded |
02:56:44 | FromDiscord | <Rika> what do you mean |
02:56:47 | FromDiscord | <Rika> you deffo can? |
02:57:18 | leorize[m] | shashlick: pong |
02:57:59 | FromDiscord | <Technisha Circuit> Oh? I want to be able to do `jsonData["new_value"] = "Nice"` |
02:58:22 | leorize[m] | use .add? |
02:58:23 | FromDiscord | <Rika> jsonData["new_value"] = %"Nice" |
02:58:34 | leorize[m] | ah yea you need that |
02:58:36 | FromDiscord | <Rika> do you have to use add? i dont remember needing to |
02:58:39 | FromDiscord | <Elegant Beef> Nah |
02:58:44 | FromDiscord | <Elegant Beef> Just tested↵https://streamable.com/mhot0 |
02:58:47 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2mFr |
02:58:48 | FromDiscord | <Elegant Beef> Shit |
02:58:49 | FromDiscord | <Elegant Beef> 😄 |
02:58:52 | FromDiscord | <Rika> god |
02:58:54 | FromDiscord | <Rika> dog***** |
02:59:01 | FromDiscord | <Rika> motherfucker im a dumbass |
02:59:13 | FromDiscord | <Elegant Beef> Nah dogs are gods |
02:59:48 | FromDiscord | <Elegant Beef> If it's not obvious the `%` operator converts to the json node equivelent |
03:04:23 | FromDiscord | <Technisha Circuit> Thanks hahaha |
03:06:16 | shashlick | @leorize - curious what you think of https://github.com/nimterop/nimterop/issues/217 |
03:06:49 | * | Guest37533 quit (Ping timeout: 264 seconds) |
03:08:28 | * | NimBot joined #nim |
03:09:49 | * | Jesin quit (Read error: Connection reset by peer) |
03:10:23 | * | Jesin joined #nim |
03:10:50 | * | Jesin quit (Client Quit) |
03:11:14 | * | Jesin joined #nim |
03:11:18 | leorize[m] | there is a legitimate use case for this but this has to be done really carefully |
03:12:43 | * | dadada__ joined #nim |
03:12:53 | leorize[m] | I'd propose a way to generate typed dynlib objects |
03:13:45 | FromDiscord | <InventorMatt> is there a way to do word based operators? like using then as an operator so you could say: a then b |
03:14:02 | leorize[m] | (ie. a distinct object that allow you to do something like: `let myLib = loadMyLib("path"); myLib.myProc(params)`) |
03:14:44 | * | lritter quit (Quit: Leaving) |
03:15:10 | leorize[m] | @InventorMatt nope, only a specific set of keywords can be used |
03:15:32 | FromDiscord | <InventorMatt> okay, that's what I thought. thank you |
03:15:34 | leorize[m] | shashlick: my main concern would be the developer negligence of ABI breakage |
03:15:41 | FromDiscord | <Technisha Circuit> You could probably make it a thing with macros apparently |
03:15:44 | FromDiscord | <Technisha Circuit> Well |
03:15:46 | FromDiscord | <Technisha Circuit> I think |
03:17:20 | leorize[m] | shashlick: though I'm not sure if this would be in the scope of nimterop |
03:18:05 | leorize[m] | a typed dynlib object generator can be used for many other things (plugin systems?) |
03:20:01 | shashlick | okay can you please share your thoughts on that thread? |
03:20:43 | shashlick | cause this is related to https://github.com/nimterop/nimterop/issues/154 as well |
03:21:27 | leorize[m] | not really, this is much more flexible and target advanced use cases |
03:23:02 | FromDiscord | <Rika> leorize: eh? really? |
03:23:09 | FromDiscord | <Rika> you cant just backtick any word? |
03:23:35 | leorize[m] | you can backtick any word |
03:23:42 | leorize[m] | whether they will be treated as an operator is another story |
03:24:23 | FromDiscord | <Yardanico> @Rika https://nim-lang.org/docs/manual.html#lexical-analysis-operators |
03:25:29 | FromDiscord | <Rika> i c |
03:27:27 | shashlick | @leorize: i already do something similar in the plugin system I made |
03:28:13 | leorize[m] | I pretty much expected that :P |
03:29:41 | leorize[m] | it's really just whether: should this be a nimterop thing, or can we build a general purpose system then hook nimterop into it? |
03:30:00 | FromDiscord | <Technisha Circuit> With NimScript could i make a dynamic command loader for Dimscord? |
03:30:04 | FromDiscord | <Yardanico> Yes |
03:30:22 | shashlick | https://genotrance.github.io/plugins/api.html |
03:30:38 | FromDiscord | <Technisha Circuit> What's the pros and cons for doing this? |
03:30:40 | FromDiscord | <Yardanico> But you'll have to handle all data transfer between host app and VM yourself |
03:30:47 | FromDiscord | <Technisha Circuit> Okay |
03:30:50 | Prestige | Finishing up status bar integration: https://0x0.st/i9ch.png |
03:30:53 | shashlick | like @kdheepak prototyped, it is easy to do in nimterop - question is how far to take it |
03:30:54 | FromDiscord | <Yardanico> Like you can't really pass complex types easily |
03:30:58 | FromDiscord | <Technisha Circuit> Oh |
03:31:02 | Prestige | Need to do some cose cleanup before I'll merge though, probably tomorrow |
03:31:39 | FromDiscord | <Technisha Circuit> I'd only need to be able to pass the `Message` type from dimscord and a sequence |
03:32:51 | leorize[m] | shashlick: go barebones, create an object around LibHandle |
03:33:07 | FromDiscord | <Technisha Circuit> And the bot instance |
03:35:31 | shashlick | leorize - what do you suggest around the lib path - rpath? |
03:36:08 | leorize[m] | it's not really our job for this use case |
03:36:32 | * | dadada__ quit (Ping timeout: 260 seconds) |
03:36:38 | leorize[m] | in this design, the developer is the one that has to manage all the paths, not us |
03:40:26 | FromDiscord | <slymilano> stuck with a little simple problem, trying to run removeSuffix on a string, but the error is a bit confusing to me as a new Nim dev: https://play.nim-lang.org/#ix=2mFz |
03:41:17 | FromDiscord | <Elegant Beef> remove suffix doesnt return a string it directly modifies it |
03:41:31 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2mFA |
03:41:38 | FromDiscord | <Elegant Beef> Solved it 😛 |
03:41:47 | FromDiscord | <slymilano> shiet |
03:42:27 | FromDiscord | <slymilano> now teach me to fish here i'd be greatful, the docs say: "proc removeSuffix(s: var string; suffix: string) {...}" by having it say `s: var string` the var tells me it's a direct modify function? |
03:42:35 | FromDiscord | <Yardanico> yes |
03:42:38 | FromDiscord | <slymilano> noice |
03:42:40 | FromDiscord | <slymilano> im learndin |
03:42:43 | FromDiscord | <Elegant Beef> also the fact it doesnt have a return type |
03:42:44 | * | dadada joined #nim |
03:43:06 | FromDiscord | <Elegant Beef> which would be indicated after the proc as such `proc procName(): ReturnType=` |
03:43:07 | * | dadada is now known as Guest35686 |
03:44:16 | FromDiscord | <slymilano> yeah boah we're cooking now, thanks! |
03:44:24 | FromDiscord | <Elegant Beef> Np |
03:49:25 | * | dddddd quit (Ping timeout: 264 seconds) |
03:56:11 | leorize[m] | shashlick: here's a draft of how a typed dynlib can be generated: https://play.nim-lang.org/#ix=2mFD |
03:58:33 | leorize[m] | this is much simpler than your plugin system, since we know what can be in the lib already |
03:58:39 | FromDiscord | <Technisha Circuit> What does this do? |
03:58:50 | leorize[m] | I'd say it's a compelling use case |
04:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:13 | * | Guest35686 quit (Ping timeout: 246 seconds) |
04:06:43 | * | supakeen joined #nim |
04:08:01 | * | silvernode joined #nim |
04:12:50 | * | dadada__ joined #nim |
04:14:56 | shashlick | @leorize: can we use a macro to generate this? will simplify how much code nimterop should generate |
04:15:14 | shashlick | that's what i recommended @kdheepak do in https://github.com/nimterop/nimterop/issues/217#issuecomment-629746276 |
04:15:16 | disbot | ➥ Allow shared libraries to be loaded at run time instead of at load time |
04:15:27 | leorize[m] | sure, you can see that I wrote it in a way that's macro-friendly :P |
04:17:29 | leorize[m] | I can write a macro that take a list of procdefs and generate a type like this |
04:17:41 | leorize[m] | I'm a bit busy right now though, so that'd have to wait |
04:22:27 | FromDiscord | <Technisha Circuit> Would it be possible for me to implement a similar import system from Python using pyImport from Nimpy? |
04:22:59 | FromDiscord | <Technisha Circuit> So i could do `from foo.bar import baz`? |
04:23:31 | FromDiscord | <Technisha Circuit> And then rename the default nim import syntax to `nimport`? |
04:23:43 | FromDiscord | <Technisha Circuit> (edit) 'syntax' => 'system' |
04:24:00 | shashlick | okay cool |
04:24:10 | FromDiscord | <Technisha Circuit> Because i am trying to run small bits of Python code in Nim now :P |
04:29:16 | FromDiscord | <Technisha Circuit> Is there a way to bypass the invalid Token error in Nim? ```python↵/data/data/com.termux/files/home/nim_stuff/pynim/main.nim(3, 8) Error: invalid token: _ (\95)``` |
04:33:06 | * | silvernode is now known as mollusk |
04:33:35 | * | narimiran joined #nim |
04:36:05 | FromDiscord | <slymilano> Anyone know how to parse CDATA in xml? my child call is returning xnElement, and it seems innertext doesn't work on that type 😦 https://play.nim-lang.org/#ix=2mFG |
04:36:58 | * | dadada__ quit (Ping timeout: 272 seconds) |
04:37:04 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:37:29 | FromDiscord | <slymilano> https://nim-lang.org/docs/xmltree.html#innerText%2CXmlNode - "If n is xnElement, runs recursively on each child node and concatenates the results." but it's returning an empty string for all nodes. |
04:40:34 | * | nsf joined #nim |
04:42:14 | FromDiscord | <Elegant Beef> @slymilano can i see the xml data in question? |
04:42:39 | * | dadada joined #nim |
04:43:03 | * | dadada is now known as Guest8643 |
04:45:54 | * | rockcavera quit (Remote host closed the connection) |
04:46:44 | FromDiscord | <slymilano> It's in the link, I don't want to link to "piracy" here lol |
04:46:51 | FromDiscord | <slymilano> line 11 |
04:56:39 | FromDiscord | <Elegant Beef> should be as simple as checking the kind if it's of `xnCData` `node.text` |
04:56:53 | FromDiscord | <Elegant Beef> (edit) 'should be as simple as checking the kind if it's of `xnCData` ... `node.text`' => 'should be as simple as checking the kind if it's of `xnCData`use' |
04:57:26 | FromDiscord | <Elegant Beef> @slymilano |
04:58:19 | FromDiscord | <Elegant Beef> since CData is actually a node |
04:59:09 | FromDiscord | <slymilano> Sounds like I need to drill one level deeper, before calling .text, right now: "Error: unhandled exception: /Users/sergiotapia/.choosenim/toolchains/nim-1.2.0/lib/pure/xmltree.nim(178, 10) `n.k in {xnText, xnComment, xnCData, xnEntity}` [AssertionError] - by just calling `item_node.child("title").text()` |
04:59:19 | FromDiscord | <Elegant Beef> yea seems so |
05:00:00 | FromDiscord | <slymilano> Woah! `echo item_node.child("title").child("CDATA").text()` - SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
05:00:23 | FromDiscord | <Elegant Beef> try `.child("title")[0]` instead |
05:00:58 | FromDiscord | <slymilano> https://www.youtube.com/watch?v=xR4Ej7bny8k |
05:01:14 | FromDiscord | <Elegant Beef> I assume that means it worked? |
05:01:14 | FromDiscord | <slymilano> that worked duuuude, you smart |
05:01:23 | FromDiscord | <Elegant Beef> Nah i just bodge stuff a lot 😄 |
05:01:42 | * | mollusk quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
05:06:14 | * | Guest8643 quit (Ping timeout: 240 seconds) |
05:12:41 | * | dadada__ joined #nim |
05:36:49 | * | dadada__ quit (Ping timeout: 264 seconds) |
05:42:43 | * | dadada joined #nim |
05:43:06 | * | dadada is now known as Guest26772 |
05:53:40 | * | Jesin quit (Ping timeout: 246 seconds) |
06:06:54 | * | Guest26772 quit (Ping timeout: 272 seconds) |
06:09:09 | skrylar[m] | Yardanico: well this works now https://git.sr.ht/~skrylar/skpostbox although figuring out how to thread it is a thing |
06:12:40 | * | dadada__ joined #nim |
06:16:47 | * | solitudesf- joined #nim |
06:31:34 | FromDiscord | <Technisha Circuit> How do i persuade a stubborn Python user to try Nim? |
06:32:07 | * | fanta1 joined #nim |
06:32:17 | FromDiscord | <Rika> tell them its faster than python by years |
06:32:39 | FromDiscord | <Technisha Circuit> They don't care about that point |
06:32:51 | FromDiscord | <Rika> then what |
06:33:19 | FromDiscord | <Technisha Circuit> No idea |
06:33:24 | FromGitter | <bung87> it use indent |
06:33:34 | FromDiscord | <Technisha Circuit> Already showed them that |
06:34:12 | FromGitter | <bung87> well, most time they dont care much speed |
06:34:40 | FromDiscord | <Technisha Circuit> They tried making their Python library faster then most other libraries |
06:34:52 | FromDiscord | <Technisha Circuit> And it has the fastest http and async rn |
06:35:17 | FromDiscord | <Rika> and you say that they dont care about speed? |
06:35:17 | FromDiscord | <Rika> what |
06:35:21 | FromDiscord | <InventorMatt> Ability to compile easily is another huge advantage |
06:35:40 | FromDiscord | <Technisha Circuit> > and you say that they dont care about speed?↵They do but not from other languages |
06:35:43 | FromDiscord | <Technisha Circuit> I want to replace their http using Nim |
06:35:49 | FromGitter | <bung87> they can port python code very straightforward |
06:35:49 | FromDiscord | <Elegant Beef> It's extreme extensible |
06:35:53 | FromDiscord | <Technisha Circuit> And maybe their async implementation |
06:35:56 | FromDiscord | <Elegant Beef> (edit) 'extreme' => 'extremely' |
06:36:49 | * | dadada__ quit (Ping timeout: 264 seconds) |
06:36:55 | FromDiscord | <Technisha Circuit> > they can port python code very straightforward↵Just bringing up that point rn |
06:37:01 | FromDiscord | <Technisha Circuit> Just gonna see their reply |
06:37:23 | FromDiscord | <Elegant Beef> It's statically typed is a big seller to me |
06:37:24 | FromDiscord | <Technisha Circuit> They just said they won't because they don't like nim ;-; |
06:37:32 | FromGitter | <bung87> usually x number faster than python |
06:38:08 | FromDiscord | <Rika> @Technisha Circuit did they explain why |
06:38:12 | FromDiscord | <Technisha Circuit> Nope |
06:38:22 | FromDiscord | <Technisha Circuit> Just straight out said they don't like it |
06:38:30 | FromDiscord | <Rika> why are you even friends with him |
06:38:33 | FromDiscord | <Elegant Beef> ^ |
06:38:41 | FromDiscord | <Rika> i'd stop taking him seriously |
06:39:17 | FromDiscord | <Rika> @Technisha Circuit just stop tryinh |
06:39:25 | FromDiscord | <Rika> he isnt someone we'd want here |
06:39:27 | FromDiscord | <Elegant Beef> Dont force shit onto people |
06:39:35 | FromDiscord | <Rika> that too |
06:39:48 | FromDiscord | <Elegant Beef> Although everyone here should use linux or should get banned! |
06:39:57 | FromDiscord | <Technisha Circuit> I ain't forcing, just pointing out reasons they might try it |
06:40:06 | FromDiscord | <Rika> good think im using linux, albeit manjaro |
06:40:14 | FromDiscord | <Technisha Circuit> > Although everyone here should use linux or should get banned!↵I don't want to say anything |
06:40:17 | FromDiscord | <Technisha Circuit> Manjaro is nice |
06:40:25 | FromDiscord | <Technisha Circuit> But i prefer Solus |
06:40:26 | FromDiscord | <Rika> i just want to use a pc man |
06:40:30 | FromDiscord | <Rika> ill configure on the way |
06:40:40 | FromDiscord | <Technisha Circuit> But my machine is crappy rn ;-; |
06:42:41 | * | dadada joined #nim |
06:43:05 | * | dadada is now known as Guest67691 |
06:46:46 | FromDiscord | <Technisha Circuit> How many members are in in the irc, discord, Gitter and matrix it total? |
06:47:08 | FromDiscord | <Rika> lol start counting |
06:47:19 | FromDiscord | <Technisha Circuit> Oof |
06:47:25 | FromDiscord | <Technisha Circuit> (edit) 'it' => 'in' |
06:56:47 | FromGitter | <kdheepak> @leorize @shashlick thanks for the discussion! Let me know if there's anything I can do to help. |
06:58:12 | FromGitter | <alehander92> disruptek |
06:58:24 | FromGitter | <alehander92> what happened with serializing |
06:58:29 | FromGitter | <alehander92> the seq |
07:00:05 | * | Trustable joined #nim |
07:06:30 | * | Guest67691 quit (Ping timeout: 260 seconds) |
07:12:43 | * | dadada__ joined #nim |
07:15:37 | Prestige | Nothing like debugging a problem for 4 hours just to find out your code was correct |
07:19:18 | * | JustASlacker joined #nim |
07:26:23 | * | golechwi1 quit (Ping timeout: 252 seconds) |
07:28:24 | * | golechwi1 joined #nim |
07:28:47 | * | PMunch joined #nim |
07:30:03 | * | Vladar joined #nim |
07:36:48 | * | dadada__ quit (Ping timeout: 256 seconds) |
07:38:27 | * | D_ quit (Ping timeout: 240 seconds) |
07:41:58 | * | D_ joined #nim |
07:42:39 | * | dadada joined #nim |
07:43:02 | * | dadada is now known as Guest19971 |
07:43:50 | * | JustASlacker quit (Ping timeout: 265 seconds) |
07:48:30 | * | liblq-dev joined #nim |
07:48:31 | * | pbb quit (Ping timeout: 272 seconds) |
07:48:39 | * | pbb joined #nim |
07:51:41 | * | JustASlacker joined #nim |
07:51:41 | * | JustASlacker quit (Client Quit) |
07:51:57 | * | JustASlacker joined #nim |
07:52:46 | * | Jesin joined #nim |
07:57:51 | * | liblq-dev quit (Ping timeout: 265 seconds) |
07:58:33 | skrylar[m] | the code is correct. the test is wrong. |
07:59:25 | * | liblq-dev joined #nim |
08:01:24 | FromDiscord | <Rika> gotta write tests for your tests |
08:03:49 | skrylar[m] | or use yards neat vscode visualizer thingy |
08:04:19 | Araq | Prestige, happens to me all the time... |
08:04:53 | Araq | write some code, debug it, find out there was a problem with the debug echos |
08:05:14 | Araq | and that you didn't test what you thought you would |
08:06:39 | * | brainbomb joined #nim |
08:08:37 | * | moerm joined #nim |
08:08:44 | moerm | Hello everybody |
08:09:13 | PMunch | Morning ): |
08:09:14 | PMunch | :)* |
08:09:47 | FromDiscord | <Elegant Beef> Yellow |
08:09:58 | alehander92 | GREEN |
08:10:22 | skrylar[m] | turqoise? |
08:11:22 | moerm | turquoise I hereby accepted as the majority choice |
08:11:54 | moerm | unless, of course, the peoples fron of Judea has justified objections (in which case we'll stone them) |
08:17:04 | PMunch | What just happened? |
08:17:23 | skrylar[m] | a beautiful thing |
08:17:37 | FromDiscord | <Clyybber> it is done |
08:17:38 | PMunch | And as a representative of the Judean peoples front I must object |
08:19:59 | * | waleee-cl joined #nim |
08:20:19 | * | natrys joined #nim |
08:21:38 | * | zedeus quit (Ping timeout: 260 seconds) |
08:21:56 | * | brainbomb left #nim (#nim) |
08:22:30 | * | brainbomb joined #nim |
08:22:40 | FromDiscord | <Elegant Beef> Did i just join a cult? |
08:22:47 | FromDiscord | <Elegant Beef> *start* |
08:22:56 | FromDiscord | <Rika> yes |
08:23:34 | * | zedeus joined #nim |
08:24:37 | * | konvertex joined #nim |
08:31:54 | * | arecaceae quit (Remote host closed the connection) |
08:32:16 | * | arecaceae joined #nim |
08:38:54 | FromDiscord | <Elegant Beef> Damn, i've never had this much power before, ok guys we need to go get more users, ensure you talk down on their language so they have to look at nim to see why their language is "better". Dont actually say anything about nim though just ensure they have to look into it |
08:39:21 | FromDiscord | <Rika> what do you mean power? 😛 |
08:39:29 | FromDiscord | <Rika> im interested in what you discovered |
08:42:53 | FromDiscord | <Elegant Beef> You said i started a cult |
08:43:01 | FromDiscord | <Elegant Beef> Wait doesnt the person that start it have all the power? |
08:43:18 | FromDiscord | <Elegant Beef> I've never started a cult before |
08:43:42 | alehander92 | ugh |
08:43:59 | FromDiscord | <Rika> you joined one |
08:44:05 | FromDiscord | <Rika> not started |
08:52:50 | * | arecaceae quit (Ping timeout: 272 seconds) |
08:57:15 | * | Tongir joined #nim |
09:00:12 | * | Tlongir quit (Ping timeout: 265 seconds) |
09:25:49 | * | natrys quit (Quit: natrys) |
09:34:23 | * | marquisdefalbala joined #nim |
09:34:42 | * | Ven`` joined #nim |
09:39:11 | FromGitter | <bung87> does csources archive has released on nim-lang.org? |
09:40:00 | * | opDispatch joined #nim |
09:41:55 | FromGitter | <bung87> it's too huge for people blocked by GFW |
09:43:51 | * | fredrikhr joined #nim |
09:46:34 | moerm | - back - PMunch object? OK, choose your favourite stones ... |
09:47:12 | PMunch | Hmm, give me two big ones and a couple small ones |
09:49:56 | moerm | PMunch colour? Any other design wishes? Also: With anaesthesia or without? "We aim to please" |
09:51:17 | moerm | Elegant Beef What for? Nim will rule the world anyway very soon (T) |
09:51:27 | moerm | +M |
09:52:52 | FromGitter | <sheerluck> Nim will rule the world |
09:53:31 | FromDiscord | <kodkuce> 1 day |
09:53:40 | FromDiscord | <kodkuce> far far along |
09:54:12 | moerm | How could anyone in his right mind doubt that? (disbelievers, please register with our stoning department) |
09:54:54 | moerm | kodkuce Sorry, our stoning department is currently a bit overloaded... |
09:56:42 | opDispatch | I esitate to learn a new PL |
09:57:26 | opDispatch | are AST macros that good ? I only used templates so far |
09:58:18 | PMunch | They're great if you need them |
09:58:23 | liblq-dev | they are, but Nim's implementation has some pitfalls |
09:58:37 | opDispatch | I want to choose a PL with cool stuff you see, I don't care about making software actually, I want to have fun with a PL |
09:58:56 | moerm | opDispatch Try ATS |
09:59:04 | moerm | or Seed7 |
10:02:35 | opDispatch | mmh yes, seed7 homepage makes it tempting |
10:05:09 | moerm | See you soon, bye all |
10:05:19 | * | moerm quit (Quit: Leaving) |
10:06:32 | opDispatch | well I meant the feature list, not the look. |
10:08:09 | * | xet7 quit (Remote host closed the connection) |
10:10:43 | * | xet7 joined #nim |
10:15:25 | * | Ven`` quit (Read error: Connection reset by peer) |
10:15:35 | * | Vladar quit (Quit: Leaving) |
10:17:56 | * | abm joined #nim |
10:26:30 | * | dddddd joined #nim |
10:39:36 | Guest19971 | what's the code on nim's manual and doc pages licensed under? |
10:39:41 | Guest19971 | can it be used in MIT code? |
10:39:50 | Guest19971 | and how would I know whom to attribute copyright to? |
10:39:59 | Guest19971 | https://nim-lang.org/docs/parsexml.html |
10:40:11 | Guest19971 | for example this example code is what I'd like to copy (and change) |
10:40:12 | FromDiscord | <Clyybber> its MIT |
10:43:07 | PMunch | opDispatch, Nim is one of the most interesting and fun languages I've used at least |
10:50:03 | * | monokrom joined #nim |
10:53:59 | FromDiscord | <uniminin> sent a code paste, see http://ix.io/2mGO |
10:54:05 | FromDiscord | <uniminin> how can i handle if there is no arguments in specific index |
10:54:18 | * | marquisdefalbala quit (Quit: Konversation terminated!) |
10:59:09 | FromGitter | <bung87> no value then no that index |
10:59:30 | FromGitter | <gogolxdong> ipfs get Qmf14tTLCz5bALK4WyoMgAn1wVNYhAWq5ZeKDJmbdU8oMQ |
10:59:39 | FromGitter | <gogolxdong> It's Nim |
11:00:56 | alehander92 | https://github.com/vedantroy/typecheck.macro willyboar PMunch |
11:01:14 | alehander92 | maybe something like that was what i wondered about validators and web frameworks |
11:01:23 | alehander92 | but i thought we can just do stuff like types + z3 require |
11:01:36 | alehander92 | to generally want arguments that went through such validators |
11:01:44 | alehander92 | (but autogenerating those also seems useful) |
11:02:17 | alehander92 | still one can check that his arg didnt somehow arrive without the validator |
11:02:37 | alehander92 | + bung87 ^ |
11:02:43 | FromDiscord | <uniminin> > no value then no that index↵@bung87[Gitter]#0000 wdym? |
11:04:17 | PMunch | alehander92, I guess that's similar to https://github.com/PMunch/jsonschema |
11:05:07 | PMunch | My idea was to define routes using Nim types, and then register "parsing" middleware that will convert e.g. JSON to that Nim type. |
11:05:11 | alehander92 | hm, i forgot about it |
11:05:23 | * | marquisdefalbala joined #nim |
11:05:44 | PMunch | And if you define a "view" (e.g. a HTML site) that pulls from multiple routes it won't actually go through creating/parsing JSON, it will just work directly on the Nim types. |
11:05:45 | Guest19971 | opDispatch: I agree with PMunch .. definitely makes me more productive, the only other language I felt this productive with was python, and I may be even more productive, especially in the long term mainly due to macros and the power of automatizing tedious tasks |
11:05:58 | alehander92 | yeah, and plugging this validation inside seems possible |
11:06:56 | alehander92 | seems good, yeah |
11:07:24 | alehander92 | btw that reminds me |
11:07:37 | alehander92 | there are rest/graphql specs right? |
11:08:49 | FromGitter | <bung87> alehander92 seem can just translate it |
11:10:14 | alehander92 | a nim web framework |
11:10:26 | FromGitter | <bung87> uniminin how you put a empty string to that position? |
11:10:32 | FromGitter | <bung87> from command line |
11:10:48 | alehander92 | can also check automatically that graphql/rest api it supports works according to its spec similarly |
11:10:56 | alehander92 | or even autogenerate |
11:11:20 | alehander92 | those base paths+json schema def+controllers |
11:11:26 | PMunch | Yeah my idea was to automatically generate documentation at least |
11:11:30 | alehander92 | of them (leaving to the user to fill it) |
11:11:37 | alehander92 | yeah, docs too |
11:11:38 | PMunch | Based on the types and docstrings given to routes |
11:11:59 | alehander92 | yeah the other option is the opposite |
11:12:06 | alehander92 | but maybe i am talking about openapi here |
11:12:17 | PMunch | Generating an API based on a spec? |
11:12:46 | alehander92 | yes |
11:13:00 | alehander92 | bung87 what can be translate d |
11:13:56 | FromGitter | <bung87> hold on I release a new version, check what can I get by translating https://github.com/vedantroy/typecheck.macro |
11:14:28 | alehander92 | mate |
11:14:55 | alehander92 | :D |
11:15:36 | alehander92 | kinda makes sense if you think about it |
11:15:50 | alehander92 | but it's probably tied to typescript |
11:16:05 | alehander92 | we should write own libs for metaprogramming |
11:16:26 | alehander92 | because it's usually not easy to port even manually |
11:17:31 | alehander92 | but yeah, your tool can do that :P |
11:18:04 | FromGitter | <bung87> I know I will fails at first time, I can just try improve my tool. |
11:22:19 | * | Jesin quit (Ping timeout: 246 seconds) |
11:26:32 | FromDiscord | <Recruit_main707> @uniminin you can do paramCount() iirc to get the number of args |
11:26:43 | Yardanico | yes |
11:27:00 | Yardanico | also there's https://nim-lang.org/docs/os.html#commandLineParams |
11:27:02 | FromDiscord | <uniminin> where is paramCount from? |
11:27:06 | Yardanico | os |
11:27:09 | Yardanico | https://nim-lang.org/docs/os.html#paramCount |
11:27:26 | FromDiscord | <uniminin> thanks |
11:27:29 | Yardanico | to get all params you either use commandLineParams or do |
11:28:13 | Yardanico | for i in 1 .. paramCount(): echo paramStr(i) |
11:28:31 | Yardanico | i because paramStr(0) is like in C - path of the binary |
11:33:11 | alehander92 | bung87 of course! |
11:34:46 | Araq | yay my code works |
11:34:48 | Araq | bbl |
11:39:43 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
11:47:33 | FromDiscord | <Clyybber> which code? |
11:47:39 | Yardanico | https://github.com/nim-lang/Nim/pull/14398 ? |
11:47:41 | disbot | ➥ specialize genericReset |
11:47:49 | FromDiscord | <Clyybber> ah, nice |
11:48:30 | Yardanico | btw, just a question - is it possible to somehow not store any error messages in the binary for smaller size? with os:any |
11:48:33 | Yardanico | just to make the binary smaller :D |
11:49:51 | FromDiscord | <Clyybber> hmm, I don't know, maybe Zevv knows |
11:50:18 | Yardanico | I might try nimStackTraceOverride I guess |
11:50:27 | Yardanico | and onUnhandledException |
11:55:53 | * | abm quit (Quit: Leaving) |
11:56:14 | * | abm joined #nim |
11:57:08 | * | couven92 joined #nim |
11:57:22 | * | fanta1 quit (Quit: fanta1) |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:42 | * | supakeen joined #nim |
12:12:23 | * | marquisdefalbala quit (Quit: Konversation terminated!) |
12:15:32 | * | abm quit (Quit: Leaving) |
12:16:58 | * | rockcavera joined #nim |
12:17:17 | * | abm joined #nim |
12:17:22 | * | fredrikhr quit (Quit: Client Disconnecting) |
12:17:42 | * | fredrikhr joined #nim |
12:19:20 | PMunch | Hmm, should I report this issue? http://ix.io/2mHr |
12:19:56 | FromDiscord | <Clyybber> probably |
12:28:06 | FromDiscord | <Yardanico> And yeah, I figured out it were error messages from statically linked musl and not from the Nim program xd |
12:28:17 | PMunch | I was more thinking if it was a known issue or not |
12:36:34 | * | couven92 quit (Quit: Client disconnecting) |
12:36:55 | FromDiscord | <j$> is there an limit/issue with create large arrays |
12:37:01 | FromDiscord | <j$> creating* |
12:37:35 | * | tane joined #nim |
12:38:16 | * | JustASlacker quit (Ping timeout: 246 seconds) |
12:43:01 | PMunch | Define large |
12:43:23 | FromGitter | <bung87> @alehander92 https://github.com/bung87/typecheck.macro/tree/master/src seems also lot of work to do.... |
12:47:35 | FromDiscord | <j$> 500k+ bytes |
12:48:51 | FromDiscord | <j$> I'm just curious I was doing opengl stuff and app was crashing on array allocation(or something) I just used seq instead and it worked |
12:51:16 | * | JustASlacker joined #nim |
12:51:44 | solitudesf- | stack overflow? |
12:51:56 | * | solitudesf- is now known as solitudesf |
12:52:03 | PMunch | Probably yeah |
12:52:15 | PMunch | That does sound like a stack overflow |
12:52:35 | FromDiscord | <j$> that sounds about right |
12:52:42 | PMunch | Hmm, my program seems stable after I threw in a GC_fullcollect |
12:53:10 | PMunch | So it seems like the GC wasn't able to do its thing. The program accumulated memory for a while and then just crashed |
12:53:20 | * | Guest19971 quit (Ping timeout: 256 seconds) |
12:54:14 | FromDiscord | <j$> side note if anyone knows opengl well enough and is willing to help me with an issue pm me on discord j$#1043 |
12:54:16 | disbot | https://github.com/nim-lang/Nim/issues/1043 -- 5Getting the enum order right |
12:54:59 | * | jds_dizzy_ joined #nim |
12:55:04 | * | zacharycarter joined #nim |
12:55:07 | * | dadada joined #nim |
12:55:30 | * | dadada is now known as Guest43940 |
12:57:03 | * | jds_dizzy_ quit (Remote host closed the connection) |
12:57:13 | * | krux02 joined #nim |
13:00:45 | * | filcuc joined #nim |
13:02:30 | PMunch | Hmm, so if I don't want to do a fullcollect every step, I should probably do some stuff with GC_step right.. |
13:02:41 | PMunch | But I can't really guess the timing.. |
13:10:17 | PMunch | Hmm, doesn't -d:useRealtimeGC work with --gc:markandsweeP? |
13:11:07 | FromDiscord | <Technisha Circuit> If i made an app and i wanted to be able to have support for making plugins, would NimScript be a good choice for the scripting language? |
13:11:10 | * | filcuc quit (Ping timeout: 246 seconds) |
13:11:29 | PMunch | Depends a bit what you want your plug-ins to do |
13:11:40 | PMunch | Another option would be to use dll/so's |
13:12:30 | FromDiscord | <Technisha Circuit> But if i made an android app wouldn't .so files be harder to use? |
13:14:03 | * | NimBot joined #nim |
13:14:38 | FromDiscord | <Technisha Circuit> I want to make a game, but I don't know if i should split up the features into plugins that the user can modify if they wish to do so |
13:15:34 | PMunch | Well it depends |
13:15:53 | PMunch | It's probably going to be harder to do, so the question becomes: "would anyone use this feature?" |
13:20:06 | FromDiscord | <Technisha Circuit> Well, even if no one uses that feature, it makes the game more modular so it's easier to test |
13:20:25 | * | Jesin joined #nim |
13:20:36 | Yardanico | hcr? |
13:20:39 | Yardanico | (hot code reloading) |
13:20:42 | FromDiscord | <Technisha Circuit> So instead of searching for a million lines I could just go to a file called `blocks.nims` and edit a few |
13:20:43 | * | fanta1 joined #nim |
13:20:48 | FromDiscord | <Technisha Circuit> Yeah |
13:24:00 | PMunch | Is GC_step with int.high pretty much the same as GC_fullcollect? |
13:25:41 | * | bebarker joined #nim |
13:26:59 | * | JustASlacker quit (Ping timeout: 256 seconds) |
13:28:56 | * | bbarker quit (Ping timeout: 265 seconds) |
13:31:32 | alehander92 | bung87 look it's a fine example, but i really dont think its a good target for your tool currently |
13:32:12 | alehander92 | i think translating some real world dts files (e.g. for small popular libs) |
13:32:22 | alehander92 | might be a good goal |
13:32:33 | alehander92 | or some other small examples/libs code |
13:34:38 | PMunch | @Technisha Circuit, two things to keep in mind for using NimScript; 1. It's much slower than Nim, in a completely synthetic fibonacci benchmark I ran it was about 0.5x Python. 2. Getting data to/from the script is a bit painful and might slow it down even further. |
13:34:50 | Guest43940 | xmltree/xmlparser doesn't work at compile time due to fopen, I think it would be sad if this is really the only reason for it not working |
13:35:04 | Guest43940 | somebody please make it use staticread :D |
13:39:43 | * | JustASlacker joined #nim |
13:41:37 | Guest43940 | is there something like a stmtList that is more like a seq of nodes, but not an actual stmtList? I need something that I could use in a quote do |
13:44:41 | PMunch | You can use a stmtList in quote do |
13:58:16 | FromDiscord | <zetashift> @j$ why not just post your issue on the forums? |
14:04:08 | FromGitter | <bung87> @alehander92 got it, I'll try |
14:08:17 | PMunch | Hmm, it seemed to be working with GC_fullcollect earlier. Now it just instantly segfaults.. |
14:12:26 | PMunch | This is why you should always use git kids.. |
14:22:07 | * | fanta1 quit (Quit: fanta1) |
14:23:20 | supakeen | 'git kids' sounds like a book title to me. |
14:23:46 | Yardanico | gitgud kids |
14:25:58 | disruptek | teen pregnancy horror lit. |
14:27:25 | * | waleee-cl joined #nim |
14:30:59 | supakeen | Or a childrens book about git. |
14:31:11 | supakeen | With a monster that destroys files and git to save them. |
14:36:32 | * | Guest43940 quit (Ping timeout: 256 seconds) |
14:40:31 | * | ftsf quit (Quit: Leaving) |
14:42:39 | * | dadada joined #nim |
14:43:03 | * | dadada is now known as Guest24206 |
14:43:25 | disruptek | DAMNIT |
14:43:37 | disruptek | I DIDN'T CHOOSE TO BE THIS AGE. |
14:44:03 | PMunch | What? |
14:44:18 | disruptek | how old i am. |
14:44:21 | disruptek | it wasn't by choice. |
14:44:27 | Yardanico | disruptek: when is your bday |
14:44:36 | disruptek | every year. |
14:45:05 | disruptek | every fucking year. |
14:46:59 | PMunch | Haha :P |
14:52:34 | disruptek | ~stream |
14:52:35 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
14:52:38 | disruptek | persistence toys. |
14:56:37 | disruptek | how did we lose lemonboy? |
14:57:05 | disruptek | this guy was smart. |
14:57:26 | PMunch | Oh yeah, where did he go? |
14:57:32 | disruptek | D |
14:57:49 | FromDiscord | <Clyybber> hes gone inactive and then reappeared at zig :D |
14:57:59 | disruptek | oh, zig. |
14:58:12 | disruptek | that's what i meant. 😁 |
14:58:28 | PMunch | Hmm, well that's a shame |
14:59:29 | PMunch | Okay, I've messed this up good somehow.. |
15:00:51 | PMunch | Oh wait, I know what I did in this case |
15:01:15 | PMunch | But I still get crashes in multithreaded mode.. |
15:01:38 | PMunch | So annoying that I had something that worked.. |
15:01:49 | PMunch | Although that could've been a super random fluke.. |
15:07:48 | * | NimBot joined #nim |
15:11:28 | bebarker | Since mutability of arrays in Nim is determined by declaration style (let/const vs var), is there a way to thaw and freeze arrays without copying? (thaw meaning make mutable, freeze to make immutable)? |
15:11:36 | bebarker | just curious |
15:12:38 | leorize[m] | if you access the variables directly, no |
15:14:05 | leorize[m] | though with a bit of wrapping magic this is possible, just not pretty |
15:14:08 | FromGitter | <brentp> is there a way to allocate a seq that's invisible to the garbage collector? I can `alloc` but then it doesn't know the length or cap. |
15:15:07 | leorize[m] | use --gc:arc |
15:15:15 | alehander92 | PMunch what are you doing |
15:15:36 | leorize[m] | why are you trying to avoid the gc though? |
15:16:32 | FromGitter | <brentp> hmm. it's a callback from a C-api that's multi-threaded (in C). if I use any GC'ed object in there, it crashes. |
15:16:47 | FromGitter | <brentp> though you are right, it works fine to allocate with `--gc:arc` |
15:16:54 | FromGitter | <brentp> but not `--gc:refc` |
15:17:24 | bebarker | leorize[m], I was thinking that might be the ticket, though in my current sleep deprived state I've apparently not thought of the exact incantation. I guess it involves working with refs |
15:17:49 | * | drewr joined #nim |
15:18:05 | bebarker | also i've just finished tut1 and probably missing something from tut2 |
15:20:14 | leorize[m] | @brentp is the seq contained in the callback? |
15:20:56 | FromGitter | <brentp> yes. and if I use an array, all is well. as soon as i allocate anything, then it segfaults. i've had this problem before. |
15:21:08 | FromGitter | <brentp> ... but it works fine with --gc:arc |
15:21:28 | leorize[m] | run `setupForeignThreadGc()` |
15:21:51 | leorize[m] | arc won't have this issue, but it's still experimental |
15:26:14 | FromGitter | <brentp> @leorize. yes, that works ! thanks. now i have new issue that if I try to use the callback, I get ` Error: illegal capture 'map_fn' because 'process' has the calling convention: <cdecl>` |
15:27:20 | leorize[m] | your callback is trying to capture a variable from the outside |
15:28:02 | leorize[m] | closures and threads don't mix, so try not to :p |
15:28:10 | shashlick | @zacharycarter - nimterop should be faster now, made several perf improvements - please see if it helps |
15:38:26 | * | abm quit (Ping timeout: 260 seconds) |
15:43:52 | * | Jesin quit (Ping timeout: 272 seconds) |
15:53:54 | * | abm joined #nim |
15:59:39 | FromDiscord | <Technisha Circuit> Just to clarify, making an android app that uses NimScript as plugins/modules/whatever that get loaded in my code so i can make new items and stuff for example is not a bad idea! |
15:59:43 | FromDiscord | <Technisha Circuit> (edit) 'idea!' => 'idea?' |
16:00:27 | disruptek | lemonboy has to be the most nature nimmer i've ever seen. |
16:01:52 | leorize[m] | too bad he left |
16:01:59 | leorize[m] | iirc it was around the time timothee got banned |
16:03:39 | * | Guest24206 quit (Ping timeout: 258 seconds) |
16:07:08 | * | nekits quit (Ping timeout: 256 seconds) |
16:12:44 | * | dadada joined #nim |
16:13:08 | * | dadada is now known as Guest75573 |
16:14:10 | * | nekits joined #nim |
16:19:47 | FromGitter | <zetashift> Also think he went to Zig land |
16:24:24 | narimiran | leorize[m]: it was before that |
16:24:44 | Araq | we didn't ban him, krux02 annoyed him |
16:24:45 | narimiran | he got tired of some nitpicking, IIRC |
16:25:52 | Zevv | dont we all |
16:26:55 | shashlick | Zevv! |
16:27:02 | shashlick | How do you profile in the vm |
16:27:24 | disruptek | lol |
16:29:44 | Zevv | shashlick: yeah thats fun. |
16:30:04 | Prestige | disruptek: the guy that wrote lemonbar? |
16:30:17 | Zevv | theres cpuTime() available but it is bogus unless you pass some flag, I was not allowed to put it in by mr A because he thinks people will do stupid stuff with it |
16:30:52 | Zevv | while he does allow tons of other stuff which can be used for way more stupid things |
16:31:10 | disruptek | like pointers. |
16:31:37 | disruptek | BAN THE POINTER |
16:31:44 | shashlick | so i need to throw around a bunch of cpuTime() calls where I need to figure stuff out? |
16:31:53 | Zevv | right |
16:31:54 | shashlick | but need a secret flag |
16:31:58 | Zevv | right |
16:32:04 | Zevv | this is 2020 |
16:32:11 | Zevv | you want that kind of stuff, you do it yourself! |
16:32:25 | Zevv | cmon, really, no one want to profile the nim vm |
16:32:29 | shashlick | am watching Microsoft Build right now, don't ask |
16:32:34 | Zevv | why would you do such a thing |
16:32:50 | shashlick | i want to make sure the nimterop compile time stuff isn't too slow |
16:32:52 | FromGitter | <zetashift> nimterop will have dotnet support now |
16:33:01 | shashlick | already threw out regex and sped it up by 20% |
16:33:20 | Zevv | well, nim tells you how long it took to compile, thats one thing |
16:33:28 | Zevv | its 1-sample profiling |
16:33:53 | * | nekits quit (Quit: Ping timeout (120 seconds)) |
16:34:02 | shashlick | doesn't help with there's 2k+ lines of code |
16:34:06 | shashlick | what's the falg |
16:34:18 | * | nekits joined #nim |
16:34:42 | shashlick | optBenchmarkVM? |
16:34:42 | krux02 | Just to correct it. Timothee was banned for a time. |
16:35:06 | * | nekits quit (Read error: Connection reset by peer) |
16:35:56 | krux02 | I also blocked him personally around the same time. |
16:37:25 | disruptek | this guy is a fucking genius. |
16:37:54 | shashlick | prove it |
16:38:34 | alehander92 | but now we're all happy together |
16:39:41 | narimiran | ...singing kumbaya |
16:40:32 | alehander92 | krux02 how are ya |
16:40:46 | alehander92 | you dont want me singing |
16:40:51 | alehander92 | narimiran |
16:41:18 | disruptek | looks like twitch just changed their pre-roll ad delay from 30mins to 20mins. |
16:41:34 | disruptek | isn't that the same as paying themselves 33% more? |
16:42:17 | * | monokrom quit (Remote host closed the connection) |
16:43:52 | * | nekits joined #nim |
16:45:11 | shashlick | Zevv: I just get undeclared identifier 'cpuTime' even with --benchmarkVM |
16:45:45 | Zevv | hm lemmesee |
16:46:05 | shashlick | okay i had to import times |
16:46:27 | Zevv | well, there it is |
16:48:12 | Zevv | I think doing proper profiling in the VM should not be too hard to add. In the end it's just bytecode running in a VM, so it should be possible to get the VM instruction counter periodically and accumulate where time is spent, calculating the VM instructions back to their sources |
16:51:07 | shashlick | do we already have a macro that can be pushed that measures proc execution time? |
16:51:14 | shashlick | for all following procs |
16:52:01 | Zevv | not that I know of |
16:52:45 | Zevv | also, cpuTime is confusing to many people |
16:55:08 | krux02 | alehander92, hi I am fine, thanks |
16:57:18 | * | lritter joined #nim |
17:03:43 | FromGitter | <bung87> @alehander92 https://github.com/bung87/typecheck.macro/blob/master/dist/typecheck.macro_d.nim |
17:04:15 | FromGitter | <bung87> let's me say ~50% done |
17:07:58 | shashlick | meh - too much work to measure perf of each and every proc and macro one at a time |
17:08:50 | PMunch | alehander92, I'm writing a .so that is loaded in another program |
17:09:06 | PMunch | The other program can call the `operate` procedure from any thread |
17:13:40 | Zevv | why is {.computedGoto.} disabled in the main VM loop?! |
17:14:18 | Araq | Zevv: never tried to enable it, after I developed the feature I was burned out |
17:14:48 | * | brainbomb quit (Quit: Leaving.) |
17:15:23 | Zevv | well, let me see how it blows up |
17:21:19 | alehander92 | bung87 nice |
17:21:27 | alehander92 | how would you deal with `_name` names |
17:21:47 | alehander92 | PMunch yeah the setup foreign gc or something helped me a lot the other day |
17:21:52 | alehander92 | not sure if applicable |
17:22:07 | PMunch | I've had that for ages |
17:22:12 | PMunch | So it's not that |
17:22:16 | PMunch | This is running in production |
17:22:24 | PMunch | So it must've been something I've done in the latest iteration |
17:23:41 | alehander92 | hm, so the diff doesnt help? |
17:24:00 | PMunch | Well, I think I know why.. |
17:24:07 | PMunch | I have a global cache of things |
17:28:00 | Zevv | shashlick: I got a VM profiler running |
17:28:06 | Zevv | it's pretty trivial |
17:30:29 | FromGitter | <bung87> oh ,I make bug, I remove all `_` |
17:31:36 | * | natrys joined #nim |
17:31:41 | alehander92 | but then |
17:31:46 | alehander92 | you have to think of `_a` vs `a` |
17:31:58 | alehander92 | `_a` are usually private fields |
17:32:15 | alehander92 | you can think of naming convention |
17:32:49 | FromGitter | <bung87> a function startwith _ will not export (has`*` mark |
17:33:46 | shashlick | Zevv: please share |
17:34:42 | FromGitter | <bung87> others I haven't take care. |
17:35:17 | Zevv | shashlick: it's pretty crude, but it works: |
17:35:17 | Zevv | https://github.com/zevv/Nim/pull/new/zevv-vm-profiler |
17:35:31 | Zevv | it shows you the top 16 CPU eating lines for each VM invocation |
17:36:02 | Zevv | To make this usable I guess it will either need full annotation, or do inclusive accounting of the whole stack frames |
17:36:04 | Prestige | Hey PMunch, when using nimlsp if you make a change in one file, does it not register that the change was made in the other? |
17:36:11 | Zevv | but all the info is there where it is needed. |
17:36:14 | Prestige | Trying to figure out if it's a problem with my lsp client or not |
17:36:25 | Zevv | oh wait that's a pull request :) |
17:36:30 | PMunch | Prestige, what do you mean? |
17:36:48 | Zevv | shashlick: this one: https://github.com/zevv/Nim/tree/zevv-vm-profiler |
17:36:58 | Prestige | e.g. if I change the name of an enum in one file, and use the new name in another file, it will say the enum name doesn't exist PMunch |
17:37:04 | Zevv | https://github.com/zevv/Nim/commit/7c94d10fa4cfa323800965f64030886173d95633 |
17:37:10 | Prestige | I'll have to restart my lsp client and then it's fine |
17:39:31 | shashlick | Zevv: so I am building with your changes - it will just print by default I guess |
17:39:46 | shashlick | prints a bunch of stuff while compiling nim itself :) |
17:40:06 | PMunch | Hmm, that's odd |
17:40:33 | * | Jesin joined #nim |
17:40:37 | Zevv | shashlick: yeah you better make a nim_temp with that I guess :) |
17:40:38 | Prestige | It could just be my lsp client PMunch, just curious if you're seeing the same issue |
17:40:56 | Zevv | I'm seeing if I can make the output a bit more useful, 85% of the usage is now usually in the stdlibs somewhere |
17:41:25 | Zevv | like iterators or tableimpl |
17:43:34 | shashlick | ya, most of the output is stdlib itself |
17:44:03 | Zevv | ideally I should add the time spent to all calls on the current stack frame |
17:44:15 | Zevv | so you get an inclusive list |
17:44:25 | Zevv | but then again, I probably should not get started with this at all |
17:44:58 | shashlick | its picking lines like `when (NimMajor, NimMinor, NimPatch)` |
17:45:21 | Zevv | nah you are imagining things |
17:45:23 | Zevv | it's perfect |
17:45:26 | Zevv | it would never do that |
17:45:32 | PMunch | Prestige, pretty sure mine doesn't do it |
17:45:57 | shashlick | that's what the line numbers correspond to |
17:46:11 | Zevv | yeah I know :) |
17:46:32 | Zevv | it's messy anyway. If one line emits 50 instructions, these 50 instrucionts are accumulated, but not the line total |
17:47:07 | * | Trustable quit (Remote host closed the connection) |
17:47:52 | Zevv | let me see if I can make it target better |
17:48:14 | shashlick | well these values are so low - 5.88e-06 |
17:49:24 | Zevv | yeah time spent in 1 instruction. use a slower PC if you want them higher |
17:49:44 | shashlick | i will do anything for love, but i won't do that |
17:52:47 | Prestige | hm |
17:53:05 | shashlick | wish the OS procs like copyFile and getFileDate were available at compile time |
17:53:32 | * | PMunch quit (Quit: leaving) |
17:54:32 | bebarker | Is there a place where composition (is-a relationships) are discussed in more detail? |
17:54:45 | bebarker | more detail compared to tutorial part 2 that is |
17:56:04 | * | narimiran quit (Quit: leaving) |
17:58:25 | * | disruptek quit (Ping timeout: 264 seconds) |
17:59:01 | * | disbot quit (Ping timeout: 264 seconds) |
17:59:02 | shashlick | even the slowest stuff in my code adds up to just 7ms, whereas the compiler takes 2 seconds from start to finish |
17:59:30 | * | narimiran joined #nim |
18:00:35 | shashlick | if I use --compileOnly, it goes down to 1.77sec |
18:00:50 | shashlick | so most of the time is in the compiler, not much I can do here |
18:01:12 | Zevv | yeah, but I'm *not* stopping with this now, you understand |
18:01:38 | shashlick | my code is 2k, but Nim says 122k lines compiled, so ya its not really relevant |
18:02:07 | Zevv | yeah but it's compiling these lines to C |
18:02:11 | Zevv | not running them in the VM |
18:03:25 | shashlick | ya, i just wanted to see if my code was slow, but the 2sec goes way beyond what i'm doing |
18:03:47 | shashlick | throwing out regex reduced the # of files to compile so that really helped |
18:03:58 | Zevv | fair enough |
18:03:59 | shashlick | unless i reduce the modules i'm using, this isn't going to get any better |
18:04:22 | Yardanico | ok decided to clone all packages in nimble to try to build the dependency graph between then :D |
18:04:24 | Yardanico | them* |
18:04:35 | Yardanico | I love osproc.execProcesses |
18:05:11 | shashlick | if i selectively import procs from modules, does that help compile time? |
18:05:33 | Zevv | I don't think so |
18:08:25 | shashlick | okay i'm done with this - cannot optimize this any more |
18:08:38 | shashlick | but your change is very helpful Zevv, if you can add it to the VM, will be helpful |
18:08:45 | Zevv | yeah, and here I am obsessed with another project, profiling the Nim VM |
18:08:46 | Zevv | bwah |
18:09:29 | Zevv | I whish I had this when I was making NPeg. I spent way too much time scratching my head over performance |
18:11:04 | shashlick | nimprof helped greatly with runtime - got toast to run much faster |
18:12:22 | Zevv | yeah, thats the kidn of project where profiling really makes sense |
18:12:26 | Zevv | chewing a lot of data |
18:12:29 | * | disruptek joined #nim |
18:13:31 | * | disbot joined #nim |
18:15:06 | * | BohlAdmin joined #nim |
18:16:13 | * | fredrikhr quit (Quit: Client Disconnecting) |
18:23:05 | * | nsf quit (Quit: WeeChat 2.8) |
18:23:22 | * | JustASlacker quit (Ping timeout: 246 seconds) |
18:23:40 | * | fredrikhr joined #nim |
18:28:44 | FromDiscord | <codic> i hope nim runs on cygwin since i'm needing to use windows... let's hope |
18:28:53 | leorize[m] | don't use cygwin |
18:28:56 | leorize[m] | it's evil |
18:28:58 | leorize[m] | go for native |
18:29:47 | FromDiscord | <codic> nah cywin ftw |
18:30:01 | FromDiscord | <codic> (edit) 'cywin' => 'cygwin' |
18:30:06 | FromDiscord | <codic> and i dont have admin here so no wsl |
18:30:58 | leorize[m] | uhmmm you can use mingw like a sane person... |
18:31:10 | leorize[m] | also cygwin is horrendously slow, use msys2 if you must |
18:32:05 | livcd | dont use any of that |
18:32:14 | leorize[m] | also no, nim don't support cygwin, we just support native windows |
18:32:14 | livcd | just use nim with mingw or whatever |
18:32:37 | FromDiscord | <codic> what's wrong with cygin though |
18:32:45 | FromDiscord | <codic> mingw is fine yeah but does it have a full shell |
18:33:01 | leorize[m] | yes, yes it does |
18:33:10 | FromDiscord | <codic> oh why does cygwin still exist |
18:33:18 | leorize[m] | cygwin is a posix compatibility layer on top of windows |
18:33:21 | leorize[m] | it's not for "I want a shell" |
18:33:29 | livcd | why does leorize[m] exist |
18:33:32 | livcd | same question :P |
18:33:36 | leorize[m] | it's for "I have this posix thing and I wanna run it without modification" |
18:33:46 | leorize[m] | source modification* |
18:34:54 | leorize[m] | though I'd say that msys2 provide a better environment than cygwin regarding posix compat (mainly because it has pacman) :P |
18:35:03 | FromDiscord | <codic> does mingw have pacman? |
18:35:12 | leorize[m] | if you want latest gcc, msys2-mingw64 provides it |
18:35:15 | livcd | why do you need pacman? |
18:35:26 | FromDiscord | <codic> i'm used to t |
18:35:28 | FromDiscord | <codic> (edit) 't' => 'it' |
18:35:36 | leorize[m] | installing dependencies in my case |
18:35:48 | leorize[m] | I wrote a cross-platform gtk app (yes, yes it's horrifying) |
18:36:14 | FromDiscord | <codic> why not just use qt if you wanan go coss platform |
18:36:30 | leorize[m] | do you see a qt binding for nim? |
18:37:53 | FromDiscord | <codic> qml binding yes, but how was I to know that you made the app in nim in the first place? :P |
18:37:56 | FromDiscord | <codic> Also ignore the typos |
18:39:34 | FromDiscord | <codic> i dont use arch btw |
18:41:57 | shashlick | msys has pacman |
18:42:04 | FromDiscord | <codic> yeahh |
18:42:17 | FromDiscord | <codic> and modern nim! |
18:42:17 | FromDiscord | <codic> https://packages.msys2.org/package/mingw-w64-x86_64-nim?repo=mingw64 |
18:42:42 | FromDiscord | <codic> `pacman -S mingw-w64-x86_64-nim mingw-w64-x86_64-nimble` |
18:42:42 | Araq | er, can somebody help me |
18:42:56 | Araq | checkout this PR https://github.com/nim-lang/Nim/pull/14398 please |
18:42:57 | Araq | and run |
18:42:58 | disbot | ➥ specialize genericReset |
18:43:05 | disruptek | oh lord |
18:43:09 | Zevv | shashlick: it now does accumulative VM profiling at the function level. Results are now actually useful |
18:43:22 | shashlick | nift |
18:43:25 | Zevv | http://ix.io/2mJD |
18:43:56 | Araq | koch temp c tests\stdlib\tjsonmacro.nim |
18:45:02 | Araq | the CI claims it works but it doesn't on my machine |
18:45:39 | Araq | and ... now it works |
18:45:51 | Araq | so strange, maybe I should have a break |
18:46:19 | disruptek | seems to work for me. |
18:46:25 | leorize[m] | it does run here |
18:46:59 | Araq | thanks for the confirmation |
18:47:15 | Zevv | same |
18:47:18 | disruptek | criterion has a bugfix today. |
18:47:28 | disruptek | i mean, my fork. |
18:47:41 | Araq | ok, cool |
18:50:39 | * | neceve joined #nim |
18:51:52 | * | Guest75573 is now known as dadada |
18:52:46 | dadada | I'd like to have a nameless proc in a statementList by itself, I'm parsing this with a macro |
18:52:59 | dadada | guess I'll have to use a stub name like stub or handler |
19:06:59 | leorize[m] | wdym nameless proc? |
19:07:47 | dadada | maybe you like anonymous, or lambda, better, but it's not really a lambda, as my macro will give it its name |
19:09:35 | * | BohlAdmin quit (Quit: Do fish get thirsty?) |
19:12:51 | * | a_chou joined #nim |
19:13:48 | dadada | I think a feature that would parsing in macros more lenient would be cool, ie. a pragma you can set for macros, so that discards aren't needed infront of procs that return values, and the like |
19:13:54 | dadada | s/would/would make |
19:14:27 | dadada | macros are after all code generating code, and not the actual code... |
19:15:05 | dadada | (the discard example applies only to typed macros I think) |
19:15:20 | dadada | ... argument against this is of course further complication of the compiler |
19:16:55 | * | a_chou quit (Client Quit) |
19:25:29 | dadada | or how about allowing to set a source filter per macro ... this way some limitations could be circumvented |
19:28:08 | FromDiscord | <codic> got msys2. pretty happy with it! now on linux, time to install it with wine... 👿 |
19:29:13 | FromDiscord | <codic> nice. https://media.discordapp.net/attachments/371759389889003532/712386393837404310/unknown.png |
19:31:12 | Yardanico | no |
19:31:17 | Yardanico | pls dont |
19:31:50 | FromDiscord | <codic> welp. fail |
19:31:55 | FromDiscord | <codic> yeah, i'm stupid |
19:31:57 | FromDiscord | <codic> cygwin on wine time |
19:32:36 | leorize[m] | dadada: it'd be better if we have some context on what you're doing |
19:33:53 | dadada | leorize[m]: I'm developing a lot of macros, most of the time I'm happy, but sometimes the parser trips up on something, it should simply ignore, since the macro writes the code and AFAIK the parser doesn't |
19:35:15 | leorize[m] | the parser makes the AST :p |
19:35:49 | dadada | yeah, but couldn't he be a bit more lenient when creating the AST when parsing for a macro instead for the actual compiler |
19:35:55 | dadada | I show you something: |
19:36:24 | dadada | https://play.nim-lang.org/#ix=2mK1 |
19:36:30 | dadada | so it trips up because the proc has no identifier |
19:36:48 | dadada | but my macro will rewrite the code anyway and create a special identifier |
19:37:13 | dadada | what's the point of expecting perfection in the code part of a macro? the macro is the one who should clean that input and bring it there |
19:38:19 | leorize[m] | it's about whether the compiler even know how to make the AST :) |
19:39:05 | leorize[m] | it can't give you AST if it doesn't know how to create it for that case |
19:39:06 | dadada | all it needs to do is to leave out the name identifier of the ProcTy and I'm happy |
19:39:43 | leorize[m] | well, please open an RFC requesting that :P |
19:40:06 | dadada | request? demand! :P |
19:40:33 | * | someunknownuser joined #nim |
19:40:44 | dadada | demand = 6 letters, starts with d, dadada = 6 letters, starts with d |
19:41:05 | dadada | and both have an a as the 4th letter |
19:41:39 | dadada | I'm obsessed with comparing words and numbers sometimes |
19:42:07 | shashlick | codic: there's mingw for Linux that cross compiles to windows if you want that |
19:42:27 | someunknownuser | Does anyone, by any chance, have any experience with the following error? lib/system/gc_common.nim(413) prepareDealloc |
19:42:29 | someunknownuser | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
19:49:31 | liblq-dev | please post a full stack trace. SIGSEGV is a common error. |
19:50:19 | someunknownuser | It occurs in |
19:50:21 | someunknownuser | lib/system/gc.nim(448) newSeq |
19:50:29 | someunknownuser | lib/system/gc.nim(440) newObj |
19:51:29 | someunknownuser | I was not able to easily reduce it to a minimal example, thats why the full stack trace might not be very useful... |
19:52:26 | someunknownuser | I just wanted to know if this is a known issue by any chance or if the error lies in my code. |
19:53:29 | * | JustASlacker joined #nim |
20:00:09 | * | couven92 joined #nim |
20:03:07 | * | fredrikhr quit (Ping timeout: 246 seconds) |
20:16:41 | * | JustASlacker quit (Read error: Connection reset by peer) |
20:21:09 | * | fredrik92 joined #nim |
20:21:44 | * | Trustable joined #nim |
20:24:36 | * | couven92 quit (Ping timeout: 265 seconds) |
20:25:49 | FromDiscord | <dom96> my gosh, Nim is so copy-happy when it comes to JS |
20:29:53 | * | abm quit (Quit: Leaving) |
20:30:19 | leorize[m] | someunknownuser: what were you doing? |
20:32:52 | * | JustASlacker joined #nim |
20:33:07 | * | narimiran quit (Ping timeout: 256 seconds) |
20:33:11 | * | couven92 joined #nim |
20:33:39 | someunknownuser | I tried to do something using threads. |
20:34:11 | someunknownuser | specifically, I tried to implement asynchronous / threaded communication with nimsuggest using sockets in my editor s |
20:34:59 | someunknownuser | I might have fixed the issue now, but I am still not certain, because it seems to occur randomly (probably depending on the gc activity). |
20:36:19 | * | fredrik92 quit (Ping timeout: 260 seconds) |
20:36:23 | * | Jesin quit (Quit: Leaving) |
20:36:31 | leorize[m] | you might need to employ some magic for async + threads |
20:36:31 | someunknownuser | I found this issue on GitHub https://github.com/nim-lang/Nim/issues/4622 which seems to be related (even though I use linux) |
20:36:32 | Araq | dom96: pssst, can be fixed with arc too |
20:36:37 | leorize[m] | dom96 might know a tip or too |
20:37:56 | someunknownuser | leorize: sorry, I might have used the wrong terminology. I currently do not use nims async capabilities. |
20:38:20 | someunknownuser | its just createThread and joinThread + channels |
20:40:25 | Araq | someunknownuser, *every* thread and channel must be in a global variable |
20:40:40 | * | fredrik92 joined #nim |
20:40:45 | Araq | that's the rule no 1 for Nim's threading |
20:42:19 | someunknownuser | Araq: I use allocShared0 / deallocShared, though I now see that it might have been (/ still is) easier to use global variables... |
20:42:37 | someunknownuser | as shown in https://nim-lang.org/docs/channels.html#example-passing-channels-safely |
20:43:05 | * | jwm2241 quit (Ping timeout: 272 seconds) |
20:43:40 | * | couven92 quit (Ping timeout: 256 seconds) |
20:46:22 | dadada | the default formatting of repr for ref objects looks awful, I can't wrap my mind around it |
20:46:36 | * | natrys quit (Ping timeout: 272 seconds) |
20:46:52 | dadada | I don't even expect pretty print level optics, but it's like they didn't even try to make it human readable |
20:47:22 | FromDiscord | <dom96> Araq: cool, but I'm still waiting patiently for arc/orc to be ready for action |
20:51:24 | Araq | well you can fix async memory leaks too, you know |
20:58:57 | * | natrys joined #nim |
20:59:01 | * | natrys quit (Client Quit) |
21:00:50 | * | B4s1l3 joined #nim |
21:01:25 | * | opDispatch quit (Ping timeout: 264 seconds) |
21:10:16 | * | fredrik92 is now known as fredrikhr |
21:11:52 | * | Jesin joined #nim |
21:17:08 | * | couven92 joined #nim |
21:17:18 | * | fredrikhr quit (Disconnected by services) |
21:17:26 | * | couven92 is now known as fredrikhr |
21:21:35 | * | couven92 joined #nim |
21:22:06 | * | fredrik92 joined #nim |
21:22:32 | * | fredrikhr quit (Disconnected by services) |
21:22:42 | * | fredrik92 is now known as fredrikhr |
21:28:05 | * | zedeus quit (Ping timeout: 256 seconds) |
21:29:26 | * | zedeus joined #nim |
21:35:09 | * | fredrik92 joined #nim |
21:38:17 | * | konvertex quit (Quit: quit) |
21:38:38 | * | couven92 quit (Ping timeout: 256 seconds) |
21:38:47 | FromDiscord | <mratsim> Mwahahaha: I ported this raytracer to Nim and Weave, https://www.kevinbeason.com/smallpt/ (though not in 99 lines because I'm not into linegolfing).↵Nim is faster than C++ 😄 (also the raytracer is multithreaded, and we're faster in multithreaded mode as well).↵↵Let's see if I can transform that into a blog post |
21:39:33 | dadada | mratsim: post it on hackernews :D !! |
21:40:03 | FromDiscord | <mratsim> I have to post the code and write the blog though |
21:40:53 | FromDiscord | <mratsim> the thing I don't understand is why I have a 21x speedup on both Weave and OpenMP while I only have 18 cores |
21:40:56 | FromDiscord | <mratsim> https://media.discordapp.net/attachments/371759389889003532/712419547176632320/unknown.png |
21:41:25 | dadada | "only 18 cores" |
21:42:06 | FromDiscord | <mratsim> some of my friends have 36 cores 😛 https://github.com/numforge/laser/blob/master/benchmarks/system_profile_Dual_Xeon_Gold_6154.md |
21:42:14 | dadada | has someone written a beautifier for the ref object default output you get with repr? |
21:42:43 | dadada | I don't mean a replacement, something that parses that [[ @[ref] ]] unreadable mess and makes it a bit readable |
21:43:25 | FromDiscord | <mratsim> I actually like having the address |
21:44:17 | dadada | I'm not against the address, I'm against the total mess you get, there's no attempt to indent any of that |
21:49:37 | * | couven92 joined #nim |
21:52:33 | FromDiscord | <mratsim> you didn't try to print object variant or tables at compile-time, you eyes would pop off their sockets 😉 |
21:52:51 | * | tane quit (Quit: Leaving) |
21:53:03 | * | fredrik92 quit (Ping timeout: 265 seconds) |
21:53:03 | * | solitudesf quit (Ping timeout: 265 seconds) |
21:53:19 | Yardanico | hmm lemme try |
21:54:00 | Yardanico | oh lol |
21:54:18 | Yardanico | well I mean yeah, it's not that good looking with repr :D |
21:54:21 | dadada | mratsim: I want to keep my eyes for a while, so I won't :-D |
21:55:49 | FromDiscord | <mratsim> everytime I work with tables or variants in macros which is often when i need to do slightly complex things, this kills me a little |
21:56:02 | Yardanico | @mratsim runtime repr for tables looks worse tbh :P |
21:56:28 | FromDiscord | <mratsim> btw, were all the tables corner perf issues fixed? |
21:56:43 | FromDiscord | <Clyybber> we have a new hash if you mean that |
21:56:56 | FromDiscord | <Clyybber> and its improved the performance quite a bit |
21:57:11 | FromDiscord | <Clyybber> btw, genericReset is now gone |
21:57:28 | dadada | why do our tables allow to have multiple keys with the same key value |
21:57:29 | * | jwm224 joined #nim |
21:57:32 | Yardanico | @mratsim ^^ https://github.com/nim-lang/Nim/pull/14398 |
21:57:49 | dadada | ah, wait nevermind, I don't want to know |
21:58:08 | Yardanico | lol |
21:58:09 | dadada | I mean, you can simply insert a seq when you want multiple values for a key ... |
21:58:32 | dadada | no, I still don't want the answer :-) |
22:01:52 | dadada | mratsim: let's congregate to make a better repr |
22:02:25 | Yardanico | fwiw repr with --gc:arc is a better than without it |
22:02:41 | Yardanico | s/a// |
22:03:03 | Yardanico | you can study both implementations yourself btw |
22:03:08 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/lib/system/repr.nim and https://github.com/nim-lang/Nim/blob/devel/lib/system/repr_v2.nim |
22:03:40 | Yardanico | @mratsim #14398 will be backported to 1.2.2 |
22:03:49 | Yardanico | https://github.com/nim-lang/Nim/pull/14398/commits/f32c9fc5934230b18871359a5f931c2b3ca25412 you can see the backport tag here :) |
22:04:13 | FromDiscord | <mratsim> https://media.discordapp.net/attachments/371759389889003532/712425403322466354/unknown.png |
22:04:14 | FromDiscord | <mratsim> ? |
22:04:32 | FromDiscord | <mratsim> ahI see |
22:04:46 | FromDiscord | <mratsim> it's the commit not the PR |
22:05:06 | dadada | Yardanico: the code is pretty short, ey... did the format change or just the formattingß |
22:05:09 | dadada | ? |
22:05:12 | Yardanico | dadada: the format |
22:05:15 | Yardanico | lemme show |
22:05:53 | Yardanico | dadada: https://gist.github.com/Yardanico/dc96337970b726920d55171563c16daa |
22:06:17 | leorize[m] | dadada: the answer for why tables can do multiple val per key without a seq is really simple, if you wanna know, that is |
22:07:17 | dadada | leorize[m]: okay, if you can put it into one line, I'll hear |
22:07:33 | leorize[m] | Araq wants it for the compiler |
22:07:34 | * | D_ quit (Quit: No Ping reply in 180 seconds.) |
22:07:41 | Yardanico | also it's used in httpclient |
22:07:45 | * | neceve quit (Ping timeout: 256 seconds) |
22:07:53 | Yardanico | e.g. you can have multiple headers with same key |
22:07:58 | Yardanico | (Set-Cookie) |
22:08:29 | * | D_ joined #nim |
22:08:32 | Yardanico | ah, not anymore it seems, it uses a seq[string] now |
22:09:00 | dadada | leorize[m]: got it.. multiple keys for a table, but defer is eeeevil .... :D love the guy though |
22:09:11 | dadada | he has written my favorite language/compiler |
22:09:23 | Yardanico | vm too |
22:09:27 | dadada | true |
22:11:41 | dadada | Yardanico: new repr looks better, why isn't it enabled for non-arc? |
22:11:44 | * | Trustable quit (Remote host closed the connection) |
22:12:15 | Yardanico | dadada: idk honestly, but new runtime stuff (destructors, arc, etc) changed quite a lot of things |
22:12:43 | Yardanico | seqs/strings are represented differently with arc as well |
22:13:07 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/lib/system/seqs_v2.nim https://github.com/nim-lang/Nim/blob/devel/lib/system/strs_v2.nim |
22:13:31 | dadada | hmm, new repr doesn't put " around string vals, I think that's a regression, makes it harder to spot strings |
22:13:57 | Yardanico | you can try it yourself easily btw |
22:14:11 | Yardanico | arc is available on 1.2.0, although there are quite a lot of fixes in devel for it |
22:14:52 | shashlick | Yardanico - do you know when https://github.com/nim-lang/Nim/issues/14251 will be fixed |
22:15:00 | FromDiscord | <Clyybber> dadada: Hmm, good point. I'll fix that |
22:15:02 | Yardanico | shashlick: honestly I don't :D |
22:15:27 | Yardanico | also https://github.com/nim-lang/Nim/issues/14383 (see a comment there) |
22:15:38 | Yardanico | shashlick: a workaround would be to remove inline pragmas |
22:15:39 | FromDiscord | <Clyybber> dadada: The newruntime repr works with the old runtime too with a tiny fix |
22:15:46 | Yardanico | in some places |
22:15:49 | Yardanico | for nim-regex that is |
22:15:54 | shashlick | code is in regex though so I cannot do anything |
22:16:16 | shashlick | blocks me with trying arc in nimterop |
22:17:01 | Yardanico | well you can patch nim-regex locally to test arc locally :D |
22:18:17 | dadada | Clyybber: are those empty seeming hcode 0 things indicating reserved memory or why do the yneed to be displayed 100 times? |
22:18:26 | Yardanico | yes it's reserved |
22:18:38 | FromDiscord | <Clyybber> Clyybber: Not sure what you are referring to |
22:18:42 | Yardanico | see https://nim-lang.org/docs/tables.html#defaultInitialSize |
22:18:43 | FromDiscord | <Clyybber> repr ing tables? |
22:18:50 | dadada | yes |
22:18:56 | Yardanico | default initial size for tables is 64 entries |
22:18:58 | Yardanico | ^ by that const |
22:19:00 | dadada | the link Yardanico sent me comparing repr versions |
22:19:02 | Yardanico | you can change it youtself |
22:19:09 | Yardanico | newTable[string, string](size) |
22:19:11 | FromDiscord | <Clyybber> Thats expected, repr prints *everything* |
22:19:18 | Yardanico | and it has to be power of two of course |
22:20:38 | dadada | Clyybber: I appreciate that but couldn't a syntax be found that waits until the next non-reserved memory thingy, and then flushes a summary 40*(hcode: 0, key, val: ) |
22:21:19 | Yardanico | dadada: that's overengineering in my opinion |
22:21:55 | Yardanico | well you can always make a PR :P |
22:22:21 | dadada | Yardanico: in mine developing software should be an activity that doesn't create unending headaches, the developer deserves just as much eye candy as everybody else |
22:22:29 | Yardanico | repr is not for eye candy |
22:22:32 | Yardanico | "echo x" is for eye candy |
22:22:47 | * | someunknownuser quit (Quit: someunknownuser) |
22:23:46 | FromDiscord | <Clyybber> dadada: Yeah, but $ is for eye candy, repr is to inspect the internal structure |
22:23:51 | dadada | there are situations where echo x doesn't work and then you want to still understand your data |
22:24:06 | FromDiscord | <Clyybber> then you should write some custom proc for that |
22:24:10 | Yardanico | then define `$` for that type :P |
22:24:17 | FromDiscord | <Clyybber> because there is no one size fits all solution |
22:24:22 | dadada | Yardanico: incidentally I'm writing something that should work for all types |
22:24:30 | Yardanico | nice |
22:24:41 | dadada | and getting the address of things is appreciated actually |
22:31:06 | FromDiscord | <Clyybber> dadada: Fix for strings and chars is up: https://github.com/nim-lang/Nim/pull/14400 |
22:31:35 | Yardanico | ~stream |
22:33:24 | dadada | Clyybber: duuude, awesome! I haven't tested it but it looks like this new format is much closer to being parseable by Nim's own parser, I think it's a no-brainer that this should be made possible, I'd love to use a macro and parseExpr to extract Info from a repr or to reformat the way I want it |
22:34:07 | dadada | sorry for using "no-brainer" buzzword :-( |
22:35:35 | dadada | Yardanico: where? |
22:35:45 | Yardanico | where? |
22:35:47 | Yardanico | what |
22:35:50 | dadada | ~stream |
22:36:10 | dadada | it makes me think you have a stream like disrupt3k |
22:36:39 | Yardanico | well I streamed some things |
22:36:44 | Yardanico | it's ~ystream for my stream |
22:36:47 | Yardanico | although disbot is not working rn |
22:36:57 | dadada | ~ystream |
22:37:03 | FromDiscord | <Clyybber> not working :p |
22:37:44 | leorize[m] | @Clyybber: actually old repr() also translate non printable to their hex form iirc |
22:37:54 | leorize[m] | !eval echo repr "\0" |
22:37:56 | NimBot | 0x55a8c52592a0"\0" |
22:38:16 | Yardanico | !eval echo repr (5) |
22:38:18 | NimBot | 5 |
22:38:33 | leorize[m] | this can probably be done with system.escape |
22:38:39 | leorize[m] | !eval echo escape "\0\1\2\3" |
22:38:41 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'escape' |
22:39:43 | leorize[m] | !eval import strutils; echo escape "\0\1\2\3" |
22:39:46 | NimBot | "\x00\x01\x02\x03" |
22:40:22 | FromDiscord | <Clyybber> leorize: Ah TIL |
22:40:53 | leorize[m] | repr is the ultimate debugging tool :P |
22:41:34 | leorize[m] | !eval import sugar; echo "".dup addQuoted "\0\1\2\3" |
22:41:36 | NimBot | "\x00\x01\x02\x03" |
22:41:42 | Yardanico | lol |
22:42:27 | leorize[m] | there, dodged strutils :P |
22:42:56 | FromDiscord | <Clyybber> haha |
22:43:10 | FromDiscord | <Clyybber> new minigame, import dodgin in the stdlib |
22:47:44 | zedeus | compiling nitter with --gc:orc (with a minor jester fix) works, and it seems to run fine. when I add -d:release though, gcc's memory usage grows exponentially till ~6 GB where I have to kill it |
22:47:47 | zedeus | what do |
22:48:01 | FromDiscord | <Technisha Circuit> > Just to clarify, making an android app that uses NimScript as plugins/modules/whatever that get loaded in my code so i can make new items and stuff for example is not a bad idea?↵Thoughts? |
22:48:09 | Yardanico | zedeus: yeah |
22:48:12 | Yardanico | I tried nitter with orc myself |
22:48:20 | Yardanico | currently async seems to leak with orc |
22:48:30 | Yardanico | it also happens for asynchttpserver/nimforum |
22:48:34 | Yardanico | (i tested them both with orc too) |
22:48:54 | Yardanico | zedeus: see https://github.com/nim-lang/Nim/wiki/Status-of-gc:arc-and-gc:orc-(library-compatibility) |
22:48:55 | Yardanico | at the bottom |
22:49:01 | dadada | https://nimble.directory/pkg/asciigraph <- haha, that looks very cool! |
22:49:21 | FromDiscord | <Technisha Circuit> ~~Oof i get ignored~~ |
22:50:30 | Yardanico | zedeus: ah lol, for me gcc worked fine |
22:50:33 | leorize[m] | @Technisha Circuit it's a bad idea |
22:50:49 | Yardanico | I mean after doing the workaround for nim-regex |
22:55:43 | zedeus | hmm, is that still necessary? you marked nim-regex as working after adding the workaround |
22:55:57 | Yardanico | well nim-regex itself works |
22:56:07 | Yardanico | but with some iterators from other modules it doesn't |
22:56:10 | Yardanico | e.g. glob module |
22:56:30 | Yardanico | https://github.com/nim-lang/Nim/issues/14219 is closed, yeah |
22:59:38 | zedeus | oh, I don't trigger #14251 with my wip branch |
22:59:43 | Yardanico | oh ok |
23:01:56 | zedeus | huh, I am triggering it but only with nim-regex master, 0.11.2 works fine |
23:02:21 | zedeus | really old version lol, I'll look into it |
23:02:33 | Yardanico | 0.11.2 is almost 1 year old, yeah :D |
23:02:54 | zedeus | ah I have 0.13.0, not quite as bad |
23:06:39 | zedeus | this rewrite causes it https://github.com/nitely/nim-regex/commit/0570009fe6cd7c9131716bb78223e9f5dfcb05a9 |
23:07:04 | * | couven92 quit (Quit: Client Disconnecting) |
23:08:04 | Yardanico | well yeah, but I don't think it's good to track it in the nim-regex itself |
23:08:13 | Yardanico | it's better to be fixed upstream since it's not really specific to nim-regex :P |
23:08:36 | Yardanico | and as I said you can fix it temporarily if you remove some inline pragmas from nim-regex's funcs |
23:08:42 | zedeus | of course, such a huge commit doesn't help tracking it down anyway |
23:08:57 | zedeus | 61 procs are inlined, "some" is a bit vague lol |
23:08:58 | Yardanico | well I had to minimize it from the whole src of nim-regex to ~30 lines :) |
23:14:07 | * | Satomi-Kowa joined #nim |
23:26:08 | * | fredrikhr quit (Read error: Connection reset by peer) |
23:26:27 | * | fredrikhr joined #nim |
23:26:38 | * | fredrikhr quit (Client Quit) |
23:29:35 | FromDiscord | <Technisha Circuit> > @Technisha Circuit Circuit it's a bad idea↵@leorize could you tell me why? |
23:32:33 | leorize[m] | the compiler crashes a lot |
23:33:21 | leorize[m] | including the compiler with your program is like asking it to crash on the slightest modification of input |
23:34:51 | FromDiscord | <Technisha Circuit> I'm using NimScript for adding blocks and stuff |
23:47:30 | zedeus | welp, orc causes async crashes after a few requests anyway |
23:47:43 | Yardanico | zedeus: are you on latest devel? |
23:47:44 | zedeus | yea |
23:47:48 | Yardanico | it wasn't crashing for me, strange |
23:47:53 | Yardanico | now minimize it and report the issue :P |
23:48:00 | Yardanico | what's the traceback? |
23:48:43 | zedeus | http://ix.io/2mLS |
23:48:51 | zedeus | it's non-deterministic, of course |
23:49:09 | Yardanico | we just need new async :) |
23:50:19 | FromDiscord | <mratsim> Here you go: https://github.com/mratsim/weave/pull/148 |
23:50:33 | FromDiscord | <mratsim> I guess I should add more visual stuff :p |
23:51:37 | FromDiscord | <mratsim> @Zachary Carter /@zacharycarter you mentioned a pathtracer a couple weeks ago, is that similar? |
23:56:54 | * | krux02_ joined #nim |
23:59:07 | * | krux02 quit (Ping timeout: 240 seconds) |