00:01:26 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh okay |
00:01:41 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Thanks! |
00:05:58 | * | endragor joined #nim |
00:12:00 | Prestige | Hm I always thought we had to manually init sequences, I didn't know this was possible: https://play.nim-lang.org/#ix=2rPo |
00:13:03 | Yardanico | we don't |
00:13:05 | Yardanico | since 0.19 |
00:13:27 | Yardanico | but in <=0.19 seqs and strings were nil by default |
00:13:39 | Yardanico | so in some old nim code you might see checks for strings/seqs if they're nil |
00:14:04 | Prestige | Neat |
00:23:37 | * | endragor quit (Ping timeout: 264 seconds) |
00:27:53 | FromGitter | <awr1> correct me if i'm wrong but i believe on the technical side of things seqs and strings are still "nil by default," they just don't require manual init. |
00:28:06 | FromGitter | <awr1> declaring a sequence without init still doesn't allocate on the heap |
00:31:26 | leorize | yea |
00:32:40 | leorize | semantically we just removed the "not initialized" state |
00:33:13 | leorize | !repo testutils |
00:33:14 | disbot | https://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 8ā 3š“ |
00:33:36 | leorize | OMGOMG: ^ that's a more complicated test runner if unittest is not good enough |
00:34:00 | leorize | testament is cool and all but it's not the most intuitive to use |
00:36:19 | Prestige | Attempting to use export modules from a top level module, not sure what I should be doing differently (or if this is possible): https://0x0.st/iv_q.png top right is the EasyECS module |
00:37:08 | FromDiscord | <Rika> whats the issue? |
00:37:30 | * | NimBot joined #nim |
00:37:33 | FromDiscord | <Rika> that should be just fine |
00:38:38 | Prestige | Says newRegistry and Entity aren't defined |
00:38:53 | Prestige | 'undeclared identifier' |
00:44:41 | FromGitter | <iffy> @ynfle I'm not sure what you mean; doesn't the second macro already accept a string type as the first argument? The second macro isn't being used (afaict) in that snippet, but its presence causes an error. |
00:45:02 | FromGitter | <iffy> So you don't have to hunt, here's the link again: https://play.nim-lang.org/#ix=2rOJ |
00:46:53 | FromDiscord | <Rika> Prestige, you also have to export the entity type from the entity module |
00:47:02 | FromDiscord | <Rika> Not sure why new registry isn't working |
00:47:12 | leorize | @iffy looks like a bug, have you reported it? |
00:47:16 | Prestige | hmm okay |
00:47:26 | FromGitter | <iffy> no, I haven't -- I can file it, though |
00:47:43 | leorize | please do |
00:53:17 | FromGitter | <iffy> done |
00:54:57 | Prestige | Do I need to run nimble develop or something? @Rika |
00:56:05 | FromGitter | <awr1> importing `Entity` through that might not work |
00:56:34 | FromDiscord | <Rika> Ah |
00:56:35 | FromGitter | <awr1> `registry.nim` needs to export `Entity` |
00:56:42 | FromDiscord | <Rika> I know why |
00:56:47 | FromGitter | <awr1> either that or `EasyECS` needs to import/export `entity` |
00:56:49 | FromDiscord | <Rika> You aren't importing the module correctly |
00:57:02 | FromGitter | <Knaque> What's the difference between `import` and `include`? |
00:57:23 | Prestige | How do I need to import the module? |
00:57:29 | FromDiscord | <Rika> If you're importing in the tests folder, you have to use a relative import instead |
00:57:36 | FromGitter | <awr1> Also in `EasyECS` you need to import it as `EasyECS / registry` |
00:57:46 | FromGitter | <awr1> yeah what Rika said |
00:57:54 | FromDiscord | <Rika> Think it's "../src/easyecs" or so |
00:58:15 | FromDiscord | <Rika> Awr you don't in the easyecs file |
00:58:17 | FromGitter | <awr1> @Knaque `import` performs standard module import, `include` is "copy-paste" similar to C/C++ `#include` |
00:58:20 | FromDiscord | <Rika> Aait |
00:58:21 | FromDiscord | <Rika> Nvm |
00:58:23 | FromDiscord | <Rika> You do |
00:58:25 | FromDiscord | <Rika> Misread |
00:58:36 | FromGitter | <awr1> Use `import` unless you have a very good reason not to |
00:59:22 | Prestige | Tried a few things: https://0x0.st/iv_Q.png no cigar |
01:00:02 | Prestige | tree: https://0x0.st/iv_1.png |
01:00:06 | FromGitter | <awr1> the unittests - the way you had it before was fine i think |
01:00:37 | * | Tlongir joined #nim |
01:00:42 | FromGitter | <Knaque> Evidently you have to `include karax/prelude` because Pragmagic didn't use `export`, as far as I can tell. |
01:05:56 | FromGitter | <awr1> @Prestige try doing `import EasyECS`. the nimscript should have set the path anyway |
01:09:54 | * | oddp_ quit (Ping timeout: 260 seconds) |
01:09:59 | FromDiscord | <Avahe> I tried that first, and had the same problem |
01:14:15 | FromDiscord | <Avahe> Maybe I should upload it when I get back home, so someone could try playing with the code |
01:29:17 | * | apahl quit (Ping timeout: 260 seconds) |
01:31:19 | * | apahl joined #nim |
01:38:15 | FromGitter | <ynfle> @iffy, It's not a bug, the AST is illformed |
01:38:51 | FromGitter | <ynfle> It's an anonymous proc that isn't being assigned or given to a proc etc. |
01:40:10 | FromGitter | <iffy> @ynfle I still don't think I understand. What would you change to fix the error? |
01:40:46 | FromGitter | <ynfle> If you wrap the anon proc in `()` no error is thrown |
01:41:02 | FromGitter | <ynfle> Not sure why the second macro makes a difference |
01:42:03 | FromGitter | <iffy> Without the parens, if the second macro is absent, no error is thrown |
01:42:37 | FromGitter | <ynfle> I know |
01:42:43 | FromGitter | <ynfle> That is weird |
01:45:15 | FromGitter | <ynfle> It also solves the issue when you switch around the arguments |
01:46:48 | * | lritter quit (Quit: Leaving) |
01:48:32 | FromGitter | <ynfle> @iffy, Also, if you `import macros` and put ` echo fun.treerepr` in the first function there is no exception |
02:04:56 | * | Tongir joined #nim |
02:06:59 | * | Tlongir quit (Ping timeout: 240 seconds) |
02:08:11 | * | audiophile_ quit (Remote host closed the connection) |
02:09:31 | * | audiophile_ joined #nim |
02:12:22 | FromDiscord | <Zachary Carter> @shashlick - got another one for you that's causing issues - https://github.com/SanderMertens/flecs |
02:13:19 | FromDiscord | <Zachary Carter> seems to just be a simple ordering issue with some consts being declared before a type that they are defined using |
02:16:46 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
02:20:37 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:22:26 | * | muffindrake joined #nim |
02:37:54 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Is there a way to load all functions in a dll/so file in Nim? |
02:38:51 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> I need to add all of the functions into a proc |
02:40:08 | shashlick | @zacharycarter that's an open issue |
02:40:15 | shashlick | But there is a workaround |
02:41:05 | shashlick | https://github.com/nimterop/nimterop/issues/206 |
02:41:06 | disbot | ā„ type section before constant section |
02:41:29 | * | endragor joined #nim |
02:41:42 | FromDiscord | <shashlick> @Zachary Carter |
02:42:08 | shashlick | wonder if highlighting from irc works when there's a space |
02:43:30 | * | audiophile joined #nim |
02:46:08 | * | audiophile__ joined #nim |
02:46:59 | * | audiophile_ quit (Ping timeout: 240 seconds) |
02:47:07 | * | audiophile__ is now known as audiophile_ |
02:49:23 | * | audiophile quit (Ping timeout: 240 seconds) |
02:52:25 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Is there such thing as a C array in Nim? |
02:54:17 | FromDiscord | <Rika> UncheckedArray |
02:54:27 | FromDiscord | <Rika> also this may be a massively dumb question |
02:54:48 | FromDiscord | <Rika> but what happens if you put an (nim) async proc into a dll, and then load it |
02:54:51 | FromDiscord | <Rika> would that work? |
02:54:51 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Nothing is dumb compared to my questions :3 |
02:55:01 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Load it in Nim? |
02:55:04 | FromDiscord | <Rika> yes |
02:55:20 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> I've had issues loading it from a .so file |
02:55:28 | FromDiscord | <Rika> like? what issues? |
02:55:31 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> But that might just be me being stupid |
02:55:37 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> A type error |
02:56:01 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Even when i use the correct types and try to adapt the types according to the error |
02:56:08 | FromDiscord | <Rika> i have a feeling you put `{.async.}` in the proc type decl (you dont need to) |
02:56:18 | FromDiscord | <Rika> hm |
02:56:22 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh? |
02:56:45 | FromDiscord | <Rika> no clue whats wrong now |
02:56:48 | FromDiscord | <Zachary Carter> how can I do something like this - https://play.nim-lang.org/#ix=2rPO ? |
02:56:58 | FromDiscord | <Rika> i have a feeling it wouldnt work either since gc... |
02:57:57 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Can't you disable the gc? |
02:58:22 | FromDiscord | <Rika> async is pretty reliant on the gc i think? |
02:58:43 | * | vicfred quit (Ping timeout: 246 seconds) |
03:02:02 | FromGitter | <Knaque> Is there anything I can use/Is it possible to set the title of a terminal window? |
03:02:28 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Check the terminal module in the stdlib @Knaque |
03:02:32 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> It might help you |
03:02:45 | FromGitter | <Knaque> I did, didn't see anything. |
03:04:59 | FromDiscord | <Zachary Carter> never mind - figured out my issue I think |
03:05:31 | FromDiscord | <Rika> knaque: `echo \e]0; BEL` |
03:05:33 | FromDiscord | <Rika> oops |
03:05:37 | FromDiscord | <Rika> early enter |
03:06:38 | FromDiscord | <Rika> `echo "\e]2;" + str + "\7"` |
03:06:46 | FromDiscord | <Rika> maybe? |
03:06:50 | FromDiscord | <Rika> only works for xterm |
03:06:52 | FromDiscord | <codic> nim allows concentating strings with `+`? |
03:06:58 | FromDiscord | <codic> i thought it used `&` |
03:07:05 | FromDiscord | <Rika> forgot |
03:07:10 | FromDiscord | <Rika> use & |
03:09:25 | FromGitter | <Knaque> Nevermind- I worked out that `execShellCmd("title <whatever>")` does the job for Windows, and that's all I need. |
03:12:47 | * | rockcavera quit (Read error: Connection reset by peer) |
03:13:12 | * | rockcavera joined #nim |
03:13:56 | FromDiscord | <Zachary Carter> hmmm |
03:13:59 | FromDiscord | <Zachary Carter> https://play.nim-lang.org/#ix=2rPT |
03:14:13 | FromDiscord | <Zachary Carter> not sure how to invoke a template from another template successfully |
03:16:46 | FromDiscord | <Zachary Carter> meh - I'm just going to make this simpler |
03:32:49 | FromDiscord | <Rika> okay lol i got segfault on trying the async proc on a dll thing |
03:34:41 | FromDiscord | <Rika> ah there it is, it works kinda |
03:35:22 | * | rockcavera quit (Remote host closed the connection) |
03:36:23 | FromDiscord | <Rika> ah no it doesnt š |
03:42:38 | * | bung joined #nim |
03:48:52 | * | hyiltiz joined #nim |
03:48:52 | * | hyiltiz quit (Changing host) |
03:48:52 | * | hyiltiz joined #nim |
03:58:18 | leorize | @Rika it'd work if you use libnimrtl or orc with -d:useMalloc |
03:59:09 | FromDiscord | <Rika> i'm just using orc w/o usemalloc |
03:59:12 | leorize | @Technisha wdym by "loading all proc from dll into a proc"? |
03:59:43 | FromDiscord | <Rika> now i'm getting "No handles or timers registered in dispatcher." lol |
03:59:55 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh I make no sense- |
04:00:04 | FromDiscord | <Rika> new avatar |
04:00:13 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Yes :P |
04:01:58 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> But basically what I'm tryna do is split the programming lang I'm working on into alot of DLLs and SO files so it's easily extendable (for example i can just drop in a .so file for a new feature), but to make this idea work i was planning on making it so the 'modules' contained some syntax rules and they get loaded as procs |
04:02:06 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> But that probably makes 0 sense |
04:02:13 | FromDiscord | <Rika> what |
04:02:38 | leorize | ah so you want a plugin system |
04:02:43 | leorize | !repo plugin |
04:02:45 | disbot | https://github.com/genotrance/plugins -- 9plugins: 11Plugin system for Nim 15 22ā 1š“ 7& 29 more... |
04:02:56 | FromDiscord | <Rika> all dlls have a "list of proc names they have", then its just your job to determine what they precisely return and get as args |
04:03:29 | FromDiscord | <Rika> i also want a plugin system, but i dont want to be limited in gc choice... |
04:03:43 | leorize | arc/orc is the future |
04:03:44 | FromDiscord | <Rika> and also no extra threads |
04:03:49 | Prestige | What are the file naming rules for unittest? has to start with a t and can't contain special characters? |
04:04:00 | leorize | nah, that's just the rule for nimble |
04:04:10 | Prestige | oh D: |
04:04:16 | FromDiscord | <Rika> perhaps i will just write a websocket-based or some sorta socket based plugin system |
04:04:28 | leorize | @Rika please don't |
04:04:38 | leorize | actually it depends on what kind of plugin system do you want |
04:05:05 | leorize | each type solves a different problem, so you gotta base one on your problem |
04:05:05 | FromDiscord | <Rika> async |
04:05:11 | Prestige | tried like 4 different file names and couldn't get it to run, rip |
04:05:11 | FromDiscord | <Rika> gotta be async |
04:05:22 | leorize | wdym by async? |
04:05:33 | FromDiscord | <Rika> easy to use w/ asyncdispatch |
04:05:45 | FromDiscord | <Rika> since the plugins will be fetching from the internet š |
04:06:01 | leorize | libnimrtl |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:03 | leorize | or... |
04:06:09 | leorize | you can just make mini programs that you can call |
04:06:39 | FromDiscord | <Rika> the mini programs thing i thought was pretty stupid but ill reconsider since you're recommending it too |
04:06:46 | * | supakeen joined #nim |
04:06:46 | FromDiscord | <Rika> what is libnimrtl? |
04:07:08 | leorize | stdlib as a library |
04:07:28 | FromDiscord | <Rika> what's the relevance? i dont see it |
04:07:34 | leorize | the main usage is to have the gc shared between the main executable and the plugin |
04:07:42 | leorize | so you can share memory between them |
04:08:49 | FromDiscord | <Rika> so how do i use it where do i see docs or w/e, still kinda confused about it |
04:09:30 | leorize | you first compile nimrtl.nim (it's somewhere in the stdlib folder) |
04:09:40 | leorize | then you compile your programs with -d:useNimRtl |
04:10:09 | leorize | it's super experimental |
04:11:06 | FromDiscord | <Rika> then why would this be recommended over using some sort of socket system? |
04:11:20 | leorize | because sockets take precious fd |
04:11:31 | leorize | and sockets io is ridiculously slow |
04:11:46 | leorize | even subprocesses is better than sockets |
04:12:06 | leorize | since pipe io don't require expensive protocols like tcp |
04:12:34 | leorize | and pipe io is supported everywhere |
04:12:38 | leorize | !repo asynctools |
04:12:39 | disbot | https://github.com/cheatfate/asynctools -- 9asynctools: 11Various asynchronous tools for Nim language 15 58ā 20š“ |
04:12:51 | leorize | ^ asyncprocess with async read/write |
04:14:03 | leorize | and plugins made with mini processes can be written in any language |
04:14:21 | leorize | they can be blocking all they want, you the consumer can consume asynchronously |
04:14:35 | leorize | for a big program that use a ton of mini processes, see `git` |
04:15:13 | * | audiophile_ quit (Quit: Default Quit Message) |
04:16:13 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> leorize yeah but how will i:āµA) Make it so i can load .so files made in CāµB) Make it extend the syntax of my lang |
04:16:37 | leorize | you need a plugin manifest |
04:16:42 | FromDiscord | <Rika> leorize: this looks good, you're talking about `asyncproc` here right? |
04:16:56 | leorize | your .so may export a symbol called `init_<name>_plugin` |
04:18:02 | leorize | which will give you a list of function pointers and the name as well as argument list of the proc |
04:18:19 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh okay |
04:18:22 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Thanks! |
04:18:23 | leorize | @Rika yea |
04:18:47 | FromDiscord | <Rika> doesnt `dynlib.libCandidates` give a list of function names? |
04:19:01 | leorize | it gives you a list of library name |
04:19:18 | leorize | it's a dynlib regex expander :P |
04:19:53 | FromDiscord | <Rika> oh, misread the docs then |
04:25:48 | * | marnix joined #nim |
04:26:46 | * | Vladar joined #nim |
04:31:30 | shashlick | Rika: when working with dlls, nothing beats boehm so far |
04:32:14 | shashlick | as for threads, if you use -d:binary, the thread only loads the dlls and exits |
04:38:14 | FromDiscord | <Rika> ah okay |
04:40:38 | shashlick | i've tried arc/orc with plugins, it doesn't work yet as is |
04:41:06 | leorize | why does it feel so horrible to write C++ |
04:41:17 | leorize | ah, right, headers and multiple inheritance |
04:48:33 | * | narimiran joined #nim |
04:52:02 | Zevv | and the 11 ways to initialize a member, 9 of which have horrific syntax |
04:55:25 | leorize | in the future I should avoid jobs that want me to write C++ |
04:56:02 | Zevv | I stopped caring. I just type stuff and get paid by the hour. |
04:56:22 | Zevv | They hire me to do C++ while I loud and clearly stated I hate C++ and hardly know any |
04:56:25 | Zevv | well, their problem now |
04:56:36 | leorize | lol |
04:56:57 | Zevv | I just do the make_shared() think and it passes the reviews. Works for me |
04:57:03 | Zevv | s/thing/ |
04:57:58 | FromGitter | <ynfle> Sounds like masochism |
04:58:00 | Zevv | I recently did some Go work. First time for me doing the channel thing, which is not that bad at all. Does anyone ever use Nim channels like Go channels? Just whip up a whole bunch of them and use them for everything? |
04:58:04 | * | marnix quit (Ping timeout: 246 seconds) |
04:58:18 | leorize | I've tried that, it's horrible to use them in nim though :P |
04:58:23 | Zevv | How come |
04:58:40 | Zevv | Go got *some* things right |
04:58:54 | Zevv | getting up to speed was a breeze, took me half an aftertoon at most |
04:59:01 | leorize | Nim's channel has to be a global var |
04:59:09 | Zevv | Oh right, that kind of sucks :/ |
04:59:20 | leorize | and our channels are unidirectional |
04:59:29 | Zevv | that's just fine with me |
04:59:49 | leorize | @mratsim's weave will save the day, once arc/orc is ready :P |
05:00:12 | Zevv | Its funny how go offers all this stuff with channels and goroutines, but does not protect at *all* against moving your filthy litlte hands in another threads memory. |
05:00:32 | leorize | it's the go way |
05:00:54 | Zevv | I was under the impression Go was designed to defuse newbies |
05:01:00 | Zevv | from making that kind of mistakes |
05:01:20 | leorize | obviously that wasn't the case :P |
05:01:23 | Zevv | haha |
05:01:32 | leorize | they do have a really nice subprocess api that I plan to steal |
05:01:42 | Zevv | Some things are really nice. The stdlib feels very coherent |
05:01:47 | leorize | after I'm done with this threaded C++ mess |
05:02:04 | leorize | yea, their stdlib is pretty neat |
05:02:21 | Zevv | As soon as the generics come in, I'm out of here |
05:03:28 | leorize | the nice thing about reinventing the wheel is that you get a round one |
05:03:55 | leorize | google certainly have all the man power to rewrite essentially anything in Go |
05:04:16 | leorize | Zevv: you'll return once you need them sweet macros :P |
05:05:36 | * | Vladar quit (Remote host closed the connection) |
05:06:13 | FromDiscord | <slymilano> @Varriount I confirmed my code as-is works perfectly fine as one would expect on Windows 10. It doesn't work on Mac! I think you were right, this could be a bug! |
05:06:19 | FromDiscord | <slymilano> *with Nim |
05:07:26 | FromDiscord | <slymilano> https://github.com/sergiotapia/torrentinim - latest master, asyncCheck works fine on windows, doesn't work at all on Mac. |
05:08:02 | * | Vladar joined #nim |
05:21:27 | Zevv | leorize: naah, that stuf is sooo overrated. Just like the other, watzitcalled, CTFE-thingy |
05:22:02 | leorize | lol |
05:22:51 | FromGitter | <ynfle> Anyone have nim.nvim working with vim8.1? |
05:23:02 | leorize | it won't work with vim |
05:23:45 | FromGitter | <ynfle> Is there any code completion support in vim from a different package |
05:23:56 | leorize | the vim people decided to use a totally different api from neovim and I'm too lazy to implement all that stuff, sorry :P |
05:24:08 | leorize | yes, any lsp client can be used with nimlsp |
05:24:42 | FromGitter | <ynfle> How hard is it to setup? |
05:24:59 | leorize | most people say that it's easy, I've never tried though |
05:25:01 | leorize | !repo nimlsp |
05:25:02 | disbot | https://github.com/PMunch/nimlsp -- 9nimlsp: 11Language Server Protocol implementation for Nim 15 139ā 11š“ |
05:26:22 | FromGitter | <ynfle> It's in the README and seems pretty straight forward |
05:27:04 | leorize | !rfc #243 |
05:27:04 | disbot | https://github.com/nim-lang/RFCs/issues/185 -- 5deprecate macros.expectLen, expectKind, expectMinLen in favor of something generic or doAssert |
05:27:10 | leorize | !rfc interfaces |
05:27:11 | disbot | https://github.com/nim-lang/RFCs/issues/243 -- 3Implement interfaces/traits instead of concepts 7& 14 more... |
05:27:28 | leorize | Prestige: ^ that's somewhere for you to post your multiple inheritance idea to |
05:34:30 | icyphox | How do I enable '-d:ssl' from within my nimble file? |
05:34:41 | icyphox | So it builds with SSL by default. |
05:35:13 | leorize | add a config.nims with `--d:ssl` as the content |
05:35:23 | leorize | put it next to your main .nim file |
05:35:27 | * | hyiltiz quit (Ping timeout: 260 seconds) |
05:35:36 | * | hyiltiz joined #nim |
05:35:36 | * | hyiltiz quit (Changing host) |
05:35:36 | * | hyiltiz joined #nim |
05:35:58 | icyphox | Ah cool. The docs said something about a nimble.nim.cfg, but that didn't work. |
05:39:25 | * | maier joined #nim |
05:41:18 | bung | https://github.com/nim-lang/Nim/pull/15000 can be merged |
05:41:20 | disbot | ā„ fix #14822 TTest pass by ref , so can reset startTime before actully run ; snippet at 12https://play.nim-lang.org/#ix=2rQ5 |
05:41:46 | leorize | why did you turn it into a ref? |
05:41:50 | bung | https://github.com/pragmagic/karax/pull/149 for karax |
05:41:50 | disbot | ā„ add static server,websocket refresh watching mode |
05:42:07 | leorize | wouldn't just being able to manipulate via a `var` parameter enough? |
05:42:13 | bung | leorize so can change start time before each spec run |
05:42:54 | bung | leorize the proc called pass to proc directly |
05:43:12 | leorize | then make them all use `var`? |
05:43:45 | leorize | using ref to hide mutability is not a good way imo |
05:43:58 | bung | that need add line var aTest = makeTest() everywhere |
05:44:24 | leorize | correctness is better than convenience |
05:45:12 | leorize | or maybe we should make it so that matrix generate multiple tests with different flags instead of mutating the one test object |
05:45:53 | bung | ok, let me think of it |
05:55:46 | bung | that works, wait for CI pass. |
06:04:41 | FromGitter | <ynfle> I installed nimlsp and set up for vim but LspStatus say nimlsp is not running |
06:04:53 | FromGitter | <ynfle> No syntax highlighting etc. |
06:05:01 | FromGitter | <ynfle> What would I need to do? |
06:05:51 | leorize | you need a nim plugin like zah/nim.vim |
06:05:57 | leorize | then maybe it'll work? |
06:07:17 | FromGitter | <ynfle> Even for code completion? |
06:08:36 | leorize | probably, you'd need to ask PMunch but he's not online atm |
06:09:01 | FromGitter | <ynfle> š |
06:09:09 | FromGitter | <ynfle> Sleeptime |
06:12:03 | bung | I see webframework custom request type , add settings to request object, so that proc gc safe, is there alternative solution |
06:25:57 | icyphox | I'm new to the whole Futures thing. How do I return a WebSocket, and not a Future[WebSocket]? |
06:26:50 | leorize[m] | use `waitFor` on a `Future` to block until the value is available |
06:29:37 | * | arecaceae quit (Read error: Connection reset by peer) |
06:30:00 | * | arecaceae joined #nim |
06:30:33 | icyphox | Ah okay. |
06:32:04 | * | debased quit (Ping timeout: 256 seconds) |
06:32:27 | * | silvernode joined #nim |
06:32:43 | silvernode | Morning |
06:33:00 | * | solitudesf joined #nim |
06:33:36 | silvernode | Haven't forgotten about the IRC, but have been pretty busy lately. opened up one of my projects for the first time in a month |
06:33:52 | * | debased joined #nim |
06:34:28 | FromDiscord | <Rika> welcome back |
06:34:44 | silvernode | wondering if I can have a proc take a seq with an endless amount of strings so that I can take arguments on the command line. |
06:35:17 | silvernode | Making a package manager wrapper but when supplying multiple packages, it only picks up the first arg |
06:36:28 | FromDiscord | <Varriount> silvernode: Isn't a sequence, by definition, of variable length? |
06:36:30 | icyphox | silvernode: Similar to *args/**kwargs in Python? |
06:37:15 | * | fredrikhr joined #nim |
06:38:02 | silvernode | https://play.nim-lang.org/#ix=2rQa |
06:38:26 | FromDiscord | <Rika> sure why not |
06:38:54 | silvernode | Apparently this is what I wrote over a month ago. Trying to figure out how things work, and not really having awareness of the logic apparently. |
06:39:42 | FromDiscord | <Elegant Beef> you can use varargs there |
06:39:45 | FromDiscord | <Varriount> silvernode: By "take arguments on the command line", do you mean, "start another program using a variable number of arguments", or "have my program take a variable number of arguments"? |
06:40:07 | FromDiscord | <Varriount> or, "have my procedure take a variable number of arguments" |
06:40:22 | FromDiscord | <Varriount> Because each of those has a different solution |
06:41:36 | silvernode | Well, I think I want to have my program take a variable number of arguments and then pass them to a proc in the form of a seq |
06:42:15 | silvernode | I didn't have anything in a proc at one point and that worked but looked messy so I created procs like the one in my snippet linked above. |
06:42:16 | icyphox | I'm interested in knowing this as well. Just realized I'm writing something that requires exactly this. |
06:43:05 | silvernode | once I created procs to clean up the main code, my program would only read one argument and not multiple args. |
06:43:40 | FromDiscord | <Elegant Beef> `varargs[string]` in as a proc argument allows you to put 1 to infinity procs š |
06:45:39 | silvernode | Here is a code example I used from some blog. I added the argv var part. |
06:45:42 | silvernode | var argv = newSeq[string](paramCount()) |
06:45:48 | FromDiscord | <Varriount> sent a long message, see http://ix.io/2rQc |
06:46:28 | FromDiscord | <Varriount> Those last two links are wrappers around argc for a C program, or sys.argv in Python |
06:46:40 | FromDiscord | <Varriount> *equivalent to |
06:46:47 | FromDiscord | <Elegant Beef> And this shows varags in actionāµhttps://play.nim-lang.org/#ix=2rQd |
06:49:46 | silvernode | Maybe I should replace newSeq with simply vargs in: var argv = newSeq[string](paramCount()) |
06:50:04 | silvernode | varags* |
06:51:24 | silvernode | time for work, thanks for the help. |
06:53:50 | * | vegai quit (Ping timeout: 256 seconds) |
06:55:57 | * | silvernode quit (Ping timeout: 258 seconds) |
06:58:38 | icyphox | Can I run a function when a Future resolves? |
06:58:50 | icyphox | I simply want to echo, really. |
07:00:00 | * | Vladar quit (Quit: Leaving) |
07:00:55 | FromDiscord | <Rika> wdym? |
07:01:01 | FromDiscord | <Rika> in a sync or async function? |
07:01:18 | FromDiscord | <Rika> sync: use `waitfor` on the futureāµasync: use `await` on the future |
07:01:25 | FromDiscord | <Rika> then echo after it |
07:02:21 | icyphox | oh ok |
07:02:22 | * | debased quit (Ping timeout: 260 seconds) |
07:02:24 | icyphox | That's easy then. |
07:15:19 | icyphox | https://nim-lang.org/docs/asynchttpserver.html from the example here, is it possible to pass other arguments to `cb`? |
07:21:14 | * | narimiran quit (Ping timeout: 240 seconds) |
07:21:29 | * | Vladar joined #nim |
07:21:33 | FromDiscord | <Varriount> icyphox: Like what? |
07:21:49 | icyphox | A string? |
07:22:02 | FromDiscord | <Varriount> What would the string contain? |
07:22:20 | icyphox | Does it matter? lol |
07:22:46 | FromDiscord | <Varriount> Well, I would store my extra information in a global variable. |
07:22:57 | FromDiscord | <Varriount> And access it from the procedure. |
07:23:30 | icyphox | hmm |
07:23:41 | icyphox | Yeah that's what I decided to do. |
07:24:14 | FromDiscord | <Varriount> I will say, the async stuff in Nim isn't as polished as it could be. It is functional though. |
07:25:07 | * | waleee-cl joined #nim |
07:26:18 | ForumUpdaterBot | New thread by HashBackupJim: Packed tuple?, see https://forum.nim-lang.org/t/6551 |
07:26:25 | * | nikita` joined #nim |
07:28:43 | icyphox | Varriount: what do you think of me using it in prod |
07:29:38 | FromDiscord | <Varriount> Well, I would look at the module description, which says:āµ> This HTTP server has not been designed to be used in production, but for testing applications locally. |
07:30:01 | FromDiscord | <Varriount> If you want an HTTP server for production use, I would recommend Jester |
07:38:32 | icyphox | Varriount: I'm using ws. |
07:38:45 | icyphox | https://github.com/treeform/ws/ |
07:39:40 | icyphox | I'm basically writing a websocket relay. |
07:48:10 | FromDiscord | <Varriount> Hm, then I would put it behind Nginx, since it has no native SSL support. |
07:48:43 | icyphox | I mean, I'm certainly not exposing this to the internet haha. |
07:48:57 | icyphox | It will run behind nginx. |
07:49:08 | icyphox | Also, it does have SSL support (wss?) |
07:49:52 | FromDiscord | <Varriount> Oh, perhaps it does. |
07:50:22 | FromDiscord | <Varriount> Hm, I wonder if this would be worth adding to the standard library: https://github.com/andreaferretti/interfaced/blob/master/interfaced.nim |
07:51:17 | FromDiscord | <Varriount> Certainly, I feel like Go's interfaces are more flexible than Java's, and it does fit with the whole "You can implement methods for other types" that Nim has. |
07:51:19 | Zevv | Stuff only goes out of the stdlib afaik |
07:52:05 | FromDiscord | <Varriount> Zevv: Mostly. Sometimes we let the occasional wandering improvement in. |
07:52:23 | FromDiscord | <Elegant Beef> Varriount this version is cooler imoāµhttps://github.com/slangmgh/interfaced |
07:52:38 | FromDiscord | <Rika> whats the diff |
07:52:44 | FromDiscord | <Elegant Beef> One works š |
07:52:50 | FromDiscord | <Varriount> I just wish I had the time and energy to redo some of the more notable/rough stdlib modules. |
07:52:58 | FromDiscord | <Rika> lol |
07:53:32 | FromDiscord | <Varriount> @Elegant Beef How is the other one broken? |
07:54:36 | FromDiscord | <Elegant Beef> I thought the first was broken for modern nim |
07:54:39 | FromDiscord | <Elegant Beef> I could be wron |
07:54:40 | FromDiscord | <Elegant Beef> (edit) 'wron' => 'wrong' |
08:11:28 | * | theelous3 quit (Ping timeout: 258 seconds) |
08:20:54 | * | Senketsu joined #nim |
08:28:51 | * | Senketsu quit (Read error: Connection reset by peer) |
08:36:26 | * | Tlanger joined #nim |
08:36:44 | * | oddp_ joined #nim |
08:38:21 | * | Senketsu joined #nim |
08:39:18 | * | Tongir quit (Ping timeout: 256 seconds) |
09:05:40 | * | Trustable joined #nim |
09:21:23 | * | Senketsu quit (Read error: Connection reset by peer) |
09:26:31 | * | silvernode joined #nim |
09:27:13 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
09:27:52 | * | pbb joined #nim |
09:33:56 | * | Senketsu joined #nim |
09:47:38 | * | marnix joined #nim |
09:53:28 | * | Senketsu quit (Read error: Connection reset by peer) |
10:01:21 | * | abm joined #nim |
10:04:31 | FromDiscord | <lqdev> runtime interfaces are really simple to do with tuples and converters |
10:04:57 | FromDiscord | <lqdev> I use them in aglet |
10:05:31 | * | endragor quit (Remote host closed the connection) |
10:05:34 | FromDiscord | <dom96> icyphox: You can use asynchttpserver in prod behind nginx. I'd recommend httpbeast. Also I'm running Niv's websocket library in prod (https://stardust.dev/play) behind nginx and with ssl. |
10:06:09 | * | Senketsu joined #nim |
10:06:10 | FromDiscord | <dom96> (And lots of other things using async run in prod, the Nim forum and nitter are two examples) |
10:06:46 | FromDiscord | <dom96> > I will say, the async stuff in Nim isn't as polished as it could be. It is functional though.āµ@Varriount what do you think needs polishing? š |
10:07:01 | icyphox | heh |
10:07:17 | icyphox | dom96: Sick. That's enough for me. :) |
10:09:17 | * | Senketsu quit (Read error: Connection reset by peer) |
10:12:18 | FromDiscord | <dom96> Give me a ping if you need any advice |
10:12:25 | FromDiscord | <dom96> happy to help š |
10:17:03 | * | sagax quit (Read error: Connection reset by peer) |
10:21:23 | Zevv | leorize[m]: and also because of "const std::string &s" |
10:21:33 | Zevv | because apparently the compiler is not smart enough |
10:27:57 | bung | araq please review https://github.com/pragmagic/karax/pull/149 |
10:27:59 | disbot | ā„ add static server,websocket refresh watching mode |
10:43:30 | FromDiscord | <Varriount> @dom96 Streaming http uploads, newer http protocol support, contexts (like Go has) |
10:44:23 | supakeen | Varriount: the question is if you want to support these things in stdlib or not, aka is the goal of asynchttpserver to be production ready or not :) |
10:44:33 | supakeen | (or just a limited subset of HTTP to server some things over HTTP some times) |
10:44:34 | FromGitter | <alehander92> what |
10:44:39 | FromGitter | <alehander92> happened to zevv's work on cps |
10:46:55 | FromDiscord | <Varriount> And then stuff like this:āµ> it's weird because Jester's .serve() function actually called runForever() at the end of it's proc - so why would it not work exactly like my runForever in my main nim fileāµ@slymilano |
10:47:59 | FromDiscord | <Varriount> (I don't know how to link to a specific message on Discord on mobile, that's the best I could do) |
10:48:01 | supakeen | I do agree that asynchttpserver might warrant some love and care maybe I should take another look at it since I did do the first tests for it though I don't have anything related to HTTP serving going on right now :( |
10:51:11 | FromDiscord | <Varriount> From an implementation perspective, I think performance and memory usage would be improved if async functions could be implemented in a fashion similar to Rust (although the biggest roadblock to such an implementation is unimplemented compiler optimization). |
10:52:03 | FromDiscord | <dom96> > @dom96 Streaming http uploads, newer http protocol support, contexts (like Go has)āµ@Varriount that's not polish, that's more features |
10:52:35 | FromDiscord | <dom96> the existing streaming support is not ideal, I agree. But please don't scare people away from Nim's async by saying it needs more polish š |
11:01:14 | FromDiscord | <Clyybber> Araq: Regarding cursors and your recent for var work; I think it makes sense to finally unify the concept of lent and cursor |
11:01:54 | FromDiscord | <Clyybber> Since iterators should yield lent anyways |
11:04:11 | FromDiscord | <dom96> I saw an interesting tweet recently by one of the Rust contributors talking about how Rust didn't get its highlight feature until a few years after its inception, and how Ruby was in a similar boat with dynamic typing. |
11:04:25 | FromDiscord | <dom96> I wonder if arc is going to be a similar thing for Nim |
11:04:45 | FromDiscord | <dom96> (Rust's highlight feature being the borrow checker) |
11:05:45 | FromDiscord | <Clyybber> hopefully |
11:06:12 | FromDiscord | <Clyybber> although its not so much a feature |
11:06:28 | FromDiscord | <impbox> hmm i'm trying to define nimble tasks in a loop, doesn't seem that's allowed ` ... C:\Users\user\git\nico\nico_20808.nims(66, 8) template/generic instantiation of `task` from here ... C:\Users\user\AppData\Local\Temp\nimblecache\nimscriptapi.nim(158, 19) Error: 'export' is only allowed at top level` i'm guessing if i did the loop at compile it'd be ok, is there a compile time equivalent of for? |
11:06:43 | FromDiscord | <Clyybber> i think many people don't really care |
11:06:58 | FromDiscord | <Clyybber> but it paves the way for a good future |
11:07:27 | FromDiscord | <impbox> arc is very cool, but it doesn't contribute greatly to my day to day productivity with the programming language |
11:07:32 | FromDiscord | <juan_carlos> Async needs more Poland. |
11:07:40 | FromGitter | <alehander92> guys |
11:07:53 | FromGitter | <alehander92> why can't we have monads for nim |
11:07:56 | FromGitter | <alehander92> like what i feel is |
11:08:10 | * | NimBot joined #nim |
11:08:12 | FromGitter | <alehander92> which makes it easier |
11:08:20 | FromDiscord | <dom96> > arc is very cool, but it doesn't contribute greatly to my day to day productivity with the programming languageāµ@impbox This. I feel exactly this way. |
11:08:20 | FromGitter | <alehander92> but i am not sure what am i missing, like |
11:08:50 | FromDiscord | <Clyybber> @dom96 Yeah, its more under-the-hood |
11:09:12 | FromDiscord | <impbox> but if i was targeting embedded devices or something i'd probably care more |
11:09:18 | FromDiscord | <dom96> I just hope there won't be a huge proliferation of `lent` and `cursor` and whatever else |
11:09:25 | FromDiscord | <Rika> i dont see why it wouldnt |
11:09:33 | FromDiscord | <dom96> That said, I'd love to revisit nimkernel with it |
11:09:35 | FromDiscord | <Rika> oh |
11:09:37 | FromDiscord | <Rika> misread you |
11:10:10 | FromDiscord | <Clyybber> @dom96 Why? cursor/lent will solve many issues |
11:10:29 | FromDiscord | <Clyybber> The effort spent on them will give us safe views |
11:11:16 | FromDiscord | <juan_carlos> is that not inferred anywways |
11:11:27 | FromDiscord | <dom96> I'm still not convinced. I am still of the belief that a GC should be enough for all of my use cases. |
11:11:39 | FromDiscord | <Clyybber> *your* use cases |
11:11:56 | FromDiscord | <dom96> My use cases and the use cases of 99% of programmers |
11:11:59 | FromDiscord | <Clyybber> n |
11:12:02 | FromDiscord | <Rika> :EyesShaking: |
11:12:02 | FromDiscord | <Clyybber> haha no |
11:12:33 | FromDiscord | <dom96> Maybe not 99% but certainly in the high 90%s |
11:12:42 | FromDiscord | <Clyybber> did you see the issue about the memory issue with strings and async? |
11:12:47 | FromDiscord | <dom96> Seriously, most programmers are writing crud web apps |
11:12:51 | FromDiscord | <dom96> Why is a GC not enough for them? |
11:12:56 | FromDiscord | <Clyybber> stuff like that will be fixed |
11:13:02 | FromDiscord | <lqdev> I'd really love some of the promised features, like `lent` fields |
11:13:06 | FromDiscord | <Clyybber> @dom96 its is good enough for them |
11:13:17 | FromDiscord | <Clyybber> but nim is not a webdev only lang |
11:13:20 | FromDiscord | <Zed> zedus, what twitter api are you using with nitter? |
11:13:29 | FromDiscord | <lqdev> right now storing lineinfo in [insert my programming language's name here] requires me to copy strings with each LineInfo tuple generated |
11:13:40 | FromDiscord | <dom96> > did you see the issue about the memory issue with strings and async?āµ@Clyybber you mean the fact that Nim copies strings left and right? |
11:13:46 | FromDiscord | <Clyybber> and if no GC works better or as good as GC why would you want a gc |
11:13:57 | FromDiscord | <Clyybber> @dom96 yeah |
11:14:00 | FromDiscord | <lqdev> also ARC has much better performance and is more suitable for games and stuff |
11:14:12 | FromDiscord | <lqdev> and audio |
11:14:19 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
11:14:24 | FromDiscord | <Rika> shashlick: what does -d:binary do in the plugins library exactly? |
11:14:29 | FromDiscord | <dom96> > but nim is not a webdev only langāµ@Clyybber of course, that was just one example. There are far more examples, CLI apps? GC is fine. Games? GC is also fine for most. GUI programs? GC is also fine. |
11:14:36 | FromDiscord | <dom96> That covers 90%+ of programmers IMO |
11:15:13 | FromDiscord | <lqdev> GC starts becoming a bottleneck as your game grows larger and has many more objects |
11:15:17 | FromDiscord | <lqdev> that need to be collected |
11:15:35 | FromDiscord | <dom96> > and if no GC works better or as good as GC why would you want a gcāµ@Clyybber if it does then sure, but we are far away from that. And it's a lot of investment which might not even pan out. |
11:15:36 | FromDiscord | <lqdev> this isn't as much of a problem with ECS, but classic OO hierarchies will benefit from ARC |
11:15:45 | * | pbb joined #nim |
11:16:06 | * | pbb quit (Client Quit) |
11:16:38 | FromDiscord | <Clyybber> @dom96 I suggest you just try it |
11:16:41 | * | pbb joined #nim |
11:17:04 | FromDiscord | <Clyybber> Because from what you are saying it seems like your fear stems from the fact that you didn't try to use it yet |
11:17:06 | FromDiscord | <impbox> there's definitely benefits from ARC, and it's really good, especially when it comes to optimisation time, but optimising programmer productivity is more important to me |
11:17:39 | FromDiscord | <impbox> but if the devs are excited by ARC they should totally work on it cause working on exciting stuff is good =) |
11:17:39 | FromDiscord | <lqdev> @impbox and ARC balances that very well. you still have the productivity benefits of a GC but the performance benefits of RC |
11:17:50 | FromDiscord | <dom96> > @dom96 I suggest you just try itāµ@Clyybber the problem is that I keep seeing people try it and finding that simple things don't work, so I don't see a reason to try it right now |
11:18:16 | FromDiscord | <impbox> @lqdev i'm totally gonna use arc when it's stable, would totally choose it over a GC |
11:18:31 | FromDiscord | <juan_carlos> I think once is stable an arc should bring no more problems/overhead/complications than maintaining a gc anyways. |
11:18:34 | FromDiscord | <lqdev> though, regarding productivity, I'd like to see incremental compilation come back to life |
11:18:51 | FromDiscord | <Clyybber> @dom96 *try it* |
11:19:04 | FromDiscord | <Clyybber> otherwise your opinion is of no weight :p |
11:19:17 | FromDiscord | <Clyybber> there are 11 open arc issues afaict |
11:19:20 | icyphox | dom96: You've written websocket code before right? How would you suggest I deal with client closing the socket? This causes the program to crash with a WebSocketError. |
11:19:27 | FromDiscord | <Clyybber> which is much less than the open GC issues |
11:19:35 | FromDiscord | <dom96> icyphox: catch the error |
11:19:51 | FromDiscord | <lqdev> @Clyybber but factor in the fact that not many people use ARC right now |
11:19:56 | FromDiscord | <dom96> I actually did try it btw, I tried to compile my game with orc and it failed |
11:20:05 | FromDiscord | <Clyybber> were you on devel? |
11:20:08 | FromDiscord | <dom96> yes |
11:20:17 | FromDiscord | <Rika> how long ago was this |
11:20:17 | FromDiscord | <Clyybber> you should try with the latest |
11:20:25 | icyphox | dom96: But that still closes the program... |
11:20:32 | FromDiscord | <dom96> I will keep trying it, but in the meantime I have my opinions. |
11:20:33 | FromDiscord | <juan_carlos> Not fair comparison, gc is several years older. |
11:21:00 | icyphox | I'm using treeform's ws, which is based on niv's code. |
11:21:04 | FromDiscord | <dom96> icyphox: how so? |
11:21:27 | FromDiscord | <dom96> really? treeform's ws is based on niv's code? I thought it was a clean room implementation |
11:21:44 | FromDiscord | <Clyybber> @dom96 I'd even argue that arc is worth the development time as compared to fixing GC bugs like https://github.com/nim-lang/Nim/issues/12273 |
11:21:45 | disbot | ā„ Memory corruption ; snippet at 12https://play.nim-lang.org/#ix=24dJ |
11:22:18 | FromDiscord | <dom96> @Clyybber So what does that say to our users? |
11:22:33 | icyphox | dom96: Quoting the readme: >Based on the work by niv https://github.com/niv/websocket.nim |
11:22:33 | FromDiscord | <dom96> We've released Nim 1.0 with a message "Please come and use our language" |
11:22:39 | * | xet7 quit (Quit: Leaving) |
11:22:44 | FromDiscord | <dom96> Now we're letting critical bugs go unfixed and chasing yet another new thing |
11:22:52 | FromDiscord | <Clyybber> which fixes all these bugs |
11:23:10 | FromDiscord | <dom96> and introduces many more š |
11:23:10 | FromDiscord | <Clyybber> is much simpler |
11:23:15 | FromDiscord | <Clyybber> and easier to maintain |
11:23:26 | FromDiscord | <juan_carlos> Software is never done. |
11:23:31 | FromDiscord | <Clyybber> the bugs that arc introduces are way easier to debug |
11:24:03 | icyphox | dom96: https://termbin.com/xt2g this is what I'm doing right now. |
11:24:06 | FromDiscord | <dom96> But alright, it's different now then it was. At least now ARC/ORC will truly be an in-place replacement for the GC |
11:24:14 | FromDiscord | <Clyybber> yeah |
11:24:26 | icyphox | Ignore the echo message, but yeah. |
11:24:49 | FromDiscord | <dom96> icyphox: how does your program still close? |
11:24:53 | FromDiscord | <dom96> do you get any errors? |
11:25:07 | icyphox | Nope. |
11:25:25 | icyphox | It literally just exits. |
11:25:40 | FromDiscord | <dom96> oh, I see what you're doing |
11:25:53 | FromDiscord | <dom96> waitFor runs the event loop for you |
11:25:57 | FromDiscord | <dom96> so the exception bubbles up |
11:26:02 | FromDiscord | <dom96> you catch it and your program does nothing else |
11:26:04 | FromDiscord | <dom96> so it exits |
11:26:08 | icyphox | Ohhh. So I catch this inside the loop then. |
11:26:20 | FromDiscord | <dom96> yep |
11:26:24 | icyphox | Gotcha. |
11:27:02 | FromDiscord | <dom96> @Clyybber as long as I can just switch to arc with no changes to my code and better stability I'll be happy š |
11:27:21 | FromDiscord | <dom96> and /that/ should be the marketing for ARC |
11:27:34 | icyphox | By the way, I've been away from the whole Nim scene for a while -- what's ARC? |
11:27:54 | FromDiscord | <impbox> https://www.youtube.com/watch?v=aUJcYTnPWCg |
11:27:58 | icyphox | Or where can I read about it, to save you the typing. |
11:28:13 | FromDiscord | <impbox> 4raq's talk on it at nimconf ^ |
11:28:39 | icyphox | Thanks! I'll check this out. |
11:29:18 | FromDiscord | <dom96> Also see https://forum.nim-lang.org/t/6549 |
11:33:01 | * | rockcavera joined #nim |
11:35:17 | FromDiscord | <Varriount> My biggest hope for Arc is that it will help make multithreading easier. |
11:36:14 | FromDiscord | <Varriount> And it does have benefits when inter-operating with C |
11:40:41 | icyphox | What are y'all's thoughts on Zig? |
11:40:54 | FromDiscord | <impbox> what's zig? |
11:41:30 | icyphox | https://ziglang.org |
11:41:59 | icyphox | https://github.com/ziglang/zig |
11:42:24 | FromDiscord | <impbox> sounds like it doesn't do much for you |
11:42:37 | FromDiscord | <impbox> by design |
11:42:42 | icyphox | For me? |
11:42:43 | FromDiscord | <impbox> but that's not what i'm looking for |
11:42:54 | icyphox | >for you |
11:42:54 | FromDiscord | <Clyybber> I find zig interesting |
11:42:55 | FromDiscord | <impbox> "generic you" |
11:42:58 | icyphox | Ah in general. |
11:43:00 | icyphox | lol |
11:43:04 | FromDiscord | <impbox> https://en.wikipedia.org/wiki/Generic_you |
11:43:16 | icyphox | I got it, lol. |
11:43:34 | FromDiscord | <impbox> sorry, not sure how common the usage is |
11:43:58 | icyphox | It's pretty common. I just thought it was targetted at my because I asked, heh. |
11:44:04 | icyphox | me* |
11:44:10 | FromDiscord | <juan_carlos> I find Zig too kinda like D, also same with D. |
11:44:35 | icyphox | Zig and Nim have some common goals. |
11:44:43 | FromDiscord | <impbox> i want a language that lets me get shit done, write a small amount of code to do a lot |
11:44:46 | icyphox | Like a better systems programming language, better C FFI, etc |
11:45:07 | FromDiscord | <impbox> from zig's description of itself it sounds like it wants me to do lots of work to get stuff done |
11:45:08 | icyphox | Yeah, Zig is more of a C replacement. |
11:45:12 | FromDiscord | <Clyybber> yeah |
11:45:12 | icyphox | Yep. |
11:45:26 | FromDiscord | <Zed> yeah |
11:45:34 | FromDiscord | <juan_carlos> Ye |
11:45:54 | FromDiscord | <lqdev> yes |
11:45:55 | icyphox | I think Nim can be a C replacement, but it's also suited for higher level tasks too. |
11:46:03 | FromDiscord | <impbox> explicitness is nice, but i like that nim compiles to C so I can see what it looks like under the hood if i need to look (though i wish it was prettier C) |
11:46:12 | * | krux02 joined #nim |
11:46:14 | icyphox | Where Zig would probably be technical debt -- like writing webshit. |
11:46:31 | FromDiscord | <Zed> rust is a fucking ugly language |
11:46:34 | icyphox | ^ |
11:46:39 | FromDiscord | <Zed> it's worse then c++ |
11:46:55 | FromDiscord | <Clyybber> if rust is ugly zig is too :p |
11:47:08 | icyphox | I literally cannot understand Rust. It's like someone thought all ASCII symbols would be great to have in your code, all at once. |
11:47:14 | FromDiscord | <Clyybber> although zig has some cute syntax for stuff like sentinels |
11:47:43 | icyphox | &<>::()*^% |
11:47:59 | icyphox | I probably wrote something that compiles in Rust. |
11:47:59 | icyphox | (not really) |
11:48:00 | FromDiscord | <Zed> and string and String |
11:48:09 | icyphox | Oh yeah. |
11:48:11 | FromDiscord | <Zed> (edit) 'and String' => '/String' |
11:48:21 | FromDiscord | <impbox> you could define that to be an operator in nim right? |
11:48:22 | FromDiscord | <Zed> i still dont know what the differnce is |
11:48:42 | FromDiscord | <Clyybber> @impbox yeah haha |
11:49:38 | FromDiscord | <juan_carlos> Maybe Rust is secretly done by Keyboard manufacturing corporations to sell more keyboards. *conspiracy theory intensifies* |
11:50:28 | FromDiscord | <Zed> more keyboards = more symbols |
11:50:49 | FromDiscord | <lqdev> hold up |
11:50:57 | FromDiscord | <lqdev> rust doesn't use *that* many symbold |
11:50:58 | FromDiscord | <lqdev> (edit) 'symbold' => 'symbol' |
11:51:00 | FromDiscord | <lqdev> (edit) 'symbol' => 'symbols' |
11:51:01 | FromDiscord | <Zed> imagine one of those japanese keyboards except just symbols rust uses |
11:51:06 | FromDiscord | <lqdev> that's what D is |
11:51:19 | FromDiscord | <Zed> D: |
11:52:16 | FromDiscord | <lqdev> off the top of my head, I can think of !, #, %, &, *, <>, ' as symbols in rust |
11:52:30 | FromDiscord | <lqdev> cut the %, it's for arithmetic |
11:52:46 | FromDiscord | <Zed> to many |
11:52:52 | FromDiscord | <Zed> my brain is hurting |
11:53:28 | FromDiscord | <lqdev> rust is ugly because it's attempting to combine verbosity with abbreviations |
11:54:51 | FromDiscord | <Zed> theres also $,? ::, ||, @, ^ |
11:55:25 | FromDiscord | <lqdev> then we can also include +, -, and / |
11:55:30 | FromDiscord | <lqdev> and | |
11:55:40 | FromDiscord | <Zed> https://doc.rust-lang.org/book/appendix-02-operators.html |
11:55:50 | FromDiscord | <impbox> we need a #rust channel it seems |
11:55:57 | FromDiscord | <Zed> there are so many |
11:56:03 | FromDiscord | <lqdev> would you rather write your arithmetic like `2 plus 2 times 2`? |
11:56:15 | FromDiscord | <lqdev> nim is a bit better on that side |
11:56:19 | FromDiscord | <juan_carlos> Wait you werent talking about the Game?. :P |
11:56:30 | FromDiscord | <lqdev> what game |
11:56:31 | FromDiscord | <Zed> well we can |
11:56:47 | FromDiscord | <Zed> `as a naked on the beach` |
11:57:00 | FromDiscord | <Zed> rust is also a game |
11:57:07 | FromDiscord | <Zed> by facepunch |
11:57:18 | FromDiscord | <Rika> I HATE RUSTS string vs String |
11:57:19 | FromDiscord | <lqdev> a game of guessing what the code does |
11:57:25 | FromDiscord | <lqdev> rust has &str vs String |
11:57:31 | FromDiscord | <Zed> hardcore minecraft |
11:57:32 | FromDiscord | <lqdev> and the difference is honestly just retarded |
11:57:33 | FromDiscord | <Rika> It feels like it was ***made*** to be confusing in that regard |
11:57:34 | FromDiscord | <juan_carlos> Maybe people learn Rust the lang thinking they are learning Rust the game. |
11:57:48 | FromDiscord | <juan_carlos> Rename Nim to Fortnite. |
11:57:55 | FromDiscord | <Zed> please no |
11:58:03 | FromDiscord | <Rika> Fortnim |
11:58:04 | FromDiscord | <lqdev> &str is just char *, and String is a heap-allocated string buffer |
11:58:26 | FromDiscord | <nero> don't like the gameplay it's just building the same things over and over again, like command line tools |
11:58:39 | FromDiscord | <Zed> i would like to learn lisp, just to see why everyone likes it |
11:58:43 | FromDiscord | <lqdev> I don't like how rust uses sooooooooo many abbreviations. what's so damn difficult about typing `int32` instead of `i32` |
11:58:53 | FromDiscord | <impbox> lisp is cool, but i'm glad i don't need to use it |
11:58:55 | FromDiscord | <Zed> 2 letters you dont have to type |
11:59:00 | FromDiscord | <impbox> it's an "elegant design" |
11:59:43 | FromDiscord | <Zed> lol |
11:59:46 | FromDiscord | <lqdev> also, no type propagation! so your gaussian function looks like this https://media.discordapp.net/attachments/371759389889003532/733654167020634142/unknown.png |
12:00:10 | FromDiscord | <Zed> lovely |
12:00:28 | FromDiscord | <Zed> hurts my eyes to see that |
12:00:36 | FromDiscord | <lqdev> yeah why have `x, y, a, ox, oy, sx, sy: f32` when you can have `x: f32, y: f32, a: f32, ox: f32, oy: f32, sx: f32, sy: f32` |
12:00:56 | FromDiscord | <lqdev> there is no point in using types after names if you're not doing this imo |
12:01:25 | FromDiscord | <lqdev> (edit) 'this' => 'type propagation' |
12:01:42 | FromDiscord | <lqdev> defining math functions in rust becomes a chore |
12:01:56 | FromDiscord | <lqdev> oh, did i mention: it's 2020 and rust has no function overloading. |
12:02:00 | * | xet7 joined #nim |
12:02:07 | FromDiscord | <lqdev> just gtfo with this language. it's bad. |
12:02:14 | FromDiscord | <lqdev> the only selling point is its memory management |
12:02:39 | FromDiscord | <lqdev> and rust evangelists will say it's the best language ever even though it has these glaring flaws |
12:02:46 | dv^_^ | yeah |
12:02:50 | FromDiscord | <lqdev> hopefully the nim community won't become like this. |
12:03:09 | FromDiscord | <Zed> ha ha nim is the best language fool |
12:03:22 | FromDiscord | <Zed> nothing can beat nim |
12:03:29 | FromDiscord | <lqdev> true |
12:03:32 | FromDiscord | <Zed> nim is love, nim is life |
12:03:37 | FromDiscord | <Rika> :ThonkDumb: |
12:03:50 | FromDiscord | <lqdev> https://cdn.discordapp.com/emojis/585835071538462721.png |
12:03:51 | FromDiscord | <Clyybber> > fortnim |
12:03:59 | FromDiscord | <Clyybber> pls no |
12:04:06 | FromDiscord | <lqdev> fortran + nim |
12:04:14 | FromDiscord | <Zed> that's even worse |
12:04:15 | FromDiscord | <Clyybber> nimtran |
12:05:19 | FromDiscord | <Zed> no |
12:05:28 | FromDiscord | <Zed> nust |
12:05:41 | * | endragor joined #nim |
12:05:53 | FromDiscord | <Clyybber> nut |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:44 | * | supakeen joined #nim |
12:07:45 | FromDiscord | <Rika> I don't think nim is the best language, but it's pretty good. |
12:08:37 | * | fredrikhr quit (Read error: Connection reset by peer) |
12:08:39 | FromDiscord | <Zed> what would you ideal language be |
12:08:43 | FromDiscord | <Zed> *your |
12:09:26 | FromDiscord | <Shucks> compiled python ;p |
12:09:31 | FromDiscord | <Zed> cython |
12:09:54 | FromDiscord | <Shucks> bleh.. |
12:10:15 | FromDiscord | <Rika> Nim with more libraries and less bugs lol |
12:10:45 | FromDiscord | <Rika> Really, nim is on spot for me on ideal language considering only capabilities |
12:10:49 | FromDiscord | <Zed> i wonder if we could setup automated library bindings |
12:11:09 | FromDiscord | <Shucks> Imo nims library support is pretty good. If were including 3rd ones ofcourse |
12:11:17 | FromGitter | <deech> The generics implementation really needs some love. |
12:12:26 | FromDiscord | <impbox> nim with better error messages and cyclic dependencies and code reordering by default |
12:13:05 | FromGitter | <deech> MOAR static introspection! :) |
12:16:31 | * | fredrikhr joined #nim |
12:19:07 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2rRu |
12:19:44 | * | maier_ joined #nim |
12:20:06 | * | endragor quit (Remote host closed the connection) |
12:20:14 | Araq | ping Clyybber |
12:20:49 | FromDiscord | <Rika> Better error messages yes, cyclic imports no, code reordering maybe? |
12:21:25 | FromDiscord | <SirJosh> @Clyybber apologies for the ping but i was told to ping you for my question (macro question, 2 messages up <https://discordapp.com/channels/371759389889003530/371759389889003532/733659032572657665>) |
12:21:27 | FromDiscord | <Rika> Yes AFAIK @SirJosh it's in the 3rd tutorial |
12:21:38 | FromDiscord | <SirJosh> 3rd tutorial? |
12:21:43 | FromDiscord | <SirJosh> OH that series |
12:21:59 | FromDiscord | <Rika> The one in nim docs called tut3 |
12:22:33 | * | maier quit (Ping timeout: 258 seconds) |
12:24:04 | FromDiscord | <SirJosh> hmm will definitely have to do a bit of reading |
12:24:19 | FromDiscord | <Rika> Just read your snippet, you will need to also pass in the Other Thing type AFAIK |
12:24:39 | FromDiscord | <SirJosh> can the macro somehow infer that from the context it's within? |
12:24:44 | FromDiscord | <SirJosh> (edit) 'can' => 'could' |
12:24:49 | FromDiscord | <SirJosh> or would doing that be more trouble than it's worth |
12:25:44 | FromDiscord | <Rika> Not that I know of |
12:25:57 | FromDiscord | <Rika> I don't know any way it could do that but then again I'm no macro guru |
12:29:45 | FromDiscord | <Clyybber> @SirJosh Yeah thats possible |
12:29:48 | FromDiscord | <Clyybber> Araq: pong |
12:30:08 | FromDiscord | <SirJosh> cool, trying to read the nim guide to figure things out atm |
12:30:25 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2rRx |
12:30:33 | FromDiscord | <SirJosh> (just making sure it's possible i guess) |
12:31:15 | FromDiscord | <Rika> Yes |
12:31:37 | FromDiscord | <juan_carlos> totes tut |
12:33:17 | Araq | Clyybber: I might have figured it out finally |
12:33:35 | Araq | the signature of channel send is: |
12:33:52 | Araq | proc send(chan: var Channel[T]; msg: owned T) |
12:34:09 | Araq | and 'owned' is different than today's owned |
12:35:17 | Araq | first of all, there is no conversion from 'owned ref T' to 'ref T', this gets rid of the x.weakRefs == 0 check in the destructor |
12:35:23 | Araq | so it cannot fail at runtime |
12:36:59 | Araq | and secondly, you can recover ownership via a conversion, recover(x) where 'x' has certain properties |
12:37:19 | * | audiophile_ joined #nim |
12:38:08 | Araq | recover(x) = true if x is ObjectConstruction(y) and the y vector's expressions have ownership |
12:38:38 | * | narimiran joined #nim |
12:38:55 | Araq | recover(x) = true if x is f(y) function call and f's return type is |
12:38:59 | Araq | either owned T |
12:39:15 | Araq | or cannot alias anything from y and f is .noSideEffect |
12:39:29 | Araq | are the most interesting rules |
12:40:11 | FromDiscord | <Clyybber> yeah, like ponys recover block |
12:40:27 | FromDiscord | <SirJosh> do macros work well with IDE tooling? can i expect type inference from within vscode if i write this macro? |
12:40:45 | FromDiscord | <Clyybber> Araq: Basically own it by making sure no one else aliases it |
12:41:10 | Araq | yeah. and you can create singly linked lists but not doubly linked lists, yay |
12:41:16 | Araq | :-) |
12:41:33 | FromDiscord | <Clyybber> I mean we can still have a recover for runtime |
12:41:43 | FromDiscord | <Clyybber> Araq: Btw did you see my previous message? |
12:41:47 | Araq | no |
12:42:03 | FromDiscord | <Clyybber> You special case for vars in your cursorifier PR right? |
12:42:15 | Araq | I had to |
12:42:28 | FromDiscord | <Clyybber> But for vars should be lent anyways, so we could have a general rule |
12:42:37 | FromDiscord | <Clyybber> that lent assignments create a cursor when possible |
12:42:44 | FromDiscord | <Clyybber> Otherwise COW |
12:42:50 | Araq | meh |
12:43:16 | shashlick | Rika: the plugin monitoring thread simply finds the plugins to load and exits with -d:binary |
12:43:20 | FromDiscord | <Clyybber> I mean lent and cursor are the same thing in essence |
12:43:30 | FromDiscord | <Clyybber> So it makes sense IMO to finally unify them |
12:43:35 | shashlick | There's no monitoring for changes or compiling plugins |
12:43:49 | Araq | before we do anything like that 'lent T' must be 'T' in the backend and not 'ptr T' |
12:44:00 | shashlick | So good for production or no hot code reloading |
12:44:15 | Araq | or rather it must be "T or ptr T, depending on what it more efficient like parameter passing" |
12:44:21 | FromDiscord | <Clyybber> Araq: Yeah |
12:44:59 | Araq | and once we have that, we can use more 'lent' inside the compiler. you're right that cursor and lent is the same |
12:46:02 | Araq | anyway, now that we have cursor inference we cannot do runtime RC checking for isolated graphs... |
12:46:23 | FromDiscord | <Clyybber> Hmm, |
12:46:40 | FromDiscord | <Clyybber> although we could permit the recover block only if no lent/cursors of its contents exist |
12:46:50 | Araq | not anymore, consider: let x {.cursor.} = root; send(root); x.field = "mutation!" |
12:47:06 | FromDiscord | <Clyybber> Does send consume root? |
12:47:16 | Araq | yes |
12:47:24 | FromDiscord | <Clyybber> Then thats illegal code IMO |
12:47:39 | FromDiscord | <Clyybber> because x outlives root |
12:47:41 | Araq | true |
12:47:59 | Araq | maybe I'm wrong |
12:48:07 | Araq | I think I can construct an example though |
12:49:51 | icyphox | What am I doing wrong here? https://termbin.com/dcy7 |
12:50:26 | Zevv | " Annotate the proc with {.gcsafe.} to get extended error information" |
12:50:51 | icyphox | It worked just fine before... |
12:51:41 | icyphox | Huh. That fixed it? I'm so confused. |
12:52:56 | FromDiscord | <Shucks> Nimpretty's line wrapping is that weird sometimes. |
12:53:18 | FromDiscord | <Shucks> Imo code gets less readable as before |
12:54:01 | FromDiscord | <lqdev> don't use nimpretty :P |
12:54:17 | FromDiscord | <lqdev> am i the only one whose code doesn't need a prettifyer? |
12:54:26 | FromDiscord | <impbox> nim is pretty as is |
12:55:26 | * | silvernode quit (Ping timeout: 265 seconds) |
12:55:42 | federico3 | I use nimfmt |
12:56:00 | FromDiscord | <Shucks> agree but I like the idea of having some "same" formatting over all my project files |
12:59:00 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2rRC |
12:59:01 | Oddmonger | is it possible to have the last char of a string without computing its len first ? |
12:59:06 | FromDiscord | <SirJosh> (edit) 'https://play.nim-lang.org/#ix=2rRC' => 'https://play.nim-lang.org/#ix=2rRD' |
12:59:17 | FromDiscord | <Rika> shashlick: oh wow that's nice, does it have to be on another thread though in that case? |
12:59:32 | FromDiscord | <SirJosh> oddmonger: don't nim strings feature both a nul teminator `\0` and length? |
12:59:48 | FromDiscord | <impbox> Oddmonger myString[^1] ? |
13:00:05 | shashlick | Rika: honestly it doesn't have to |
13:00:07 | Oddmonger | ah nice ! |
13:00:11 | Oddmonger | thank you |
13:00:16 | * | vicfred joined #nim |
13:00:27 | shashlick | Open to PR's to remove threading in that case |
13:00:43 | FromDiscord | <Rika> Also nim strings don't need to compute length since it's stored with the char ptr internally afaik |
13:00:57 | shashlick | If -d:binary, just call the monitoring thread as a regular proc |
13:00:58 | FromDiscord | <Rika> shashlick: I'll see if I can make one :P |
13:01:12 | FromDiscord | <Rika> But not today, bout to sleep lol |
13:01:15 | FromDiscord | <Rika> See you |
13:01:44 | FromDiscord | <impbox> Oddmonger https://nim-lang.org/docs/system.html#%5E.t%2Cint |
13:01:55 | shashlick | Rika: sleep well |
13:02:01 | FromDiscord | <impbox> it's just a shorthand for using the length |
13:02:35 | Oddmonger | yes but i can use directly on a trimmed string |
13:02:45 | * | endragor joined #nim |
13:02:54 | FromDiscord | <impbox> yep, it's nice |
13:04:54 | Oddmonger | doesn't seem good : var is_question = (captureBetween(sentence, " ", " "))[^1] == '?' |
13:07:49 | Oddmonger | ah cannot do that |
13:09:35 | Oddmonger | it would return empty string if two or more consecutive spaces at the beginning (not speaking of spaces between words) |
13:10:50 | * | endragor quit (Remote host closed the connection) |
13:13:24 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2rRI |
13:13:45 | FromDiscord | <lqdev> that's not how you construct an option btw |
13:14:02 | FromDiscord | <lqdev> you just do `none(MyType)` |
13:14:15 | FromDiscord | <SirJosh> oh that works? |
13:14:27 | FromDiscord | <lqdev> try `newCall(bindSym"none", yourType)` |
13:14:27 | FromDiscord | <Clyybber> @SirJosh no problem, you can use quote |
13:14:46 | Araq | Clyybber: so what do you think? sound? |
13:14:47 | FromDiscord | <lqdev> it works because `none` accepts a typedesc |
13:14:58 | FromDiscord | <Clyybber> Araq: I think so yeah |
13:15:00 | FromDiscord | <SirJosh> what's quote? |
13:15:11 | FromDiscord | <SirJosh> and i will try that ty lqdev |
13:15:19 | FromDiscord | <lqdev> @SirJosh this is quote: https://nim-lang.org/docs/macros.html#quote%2Ctyped%2Cstring |
13:15:26 | Araq | writing an RFC then... |
13:15:30 | FromDiscord | <SirJosh> OH! |
13:15:33 | FromDiscord | <SirJosh> that's SO HANDY |
13:15:40 | FromDiscord | <SirJosh> sweet |
13:15:56 | FromDiscord | <lqdev> also if you want to construct an AST that doesn't have a dedicated proc, you can just use `newTree`, like so: `newTree(nnkBracketExpr, ident"mySeq", newLit(1))` |
13:16:12 | FromDiscord | <lqdev> results in `mySeq[1]` |
13:17:46 | FromDiscord | <Shucks> heh? |
13:17:51 | FromDiscord | <Shucks> sent a code paste, see https://play.nim-lang.org/#ix=2rRM |
13:26:20 | * | l1x quit () |
13:26:42 | * | l1x joined #nim |
13:37:36 | * | vicfred quit (Quit: Leaving) |
13:40:37 | FromDiscord | <juan_carlos> Theres no Documentation for the notation `variable[]` ?, not the addr the `[]` thingy. |
13:40:48 | FromDiscord | <Rika> @Shucks bitwise not |
13:41:03 | FromDiscord | <Rika> Aaaa I really should be sleeping aaaaa |
13:41:24 | * | Trustable quit (Remote host closed the connection) |
13:59:40 | * | endragor joined #nim |
14:04:28 | * | xet7 quit (Quit: Leaving) |
14:06:45 | icyphox | Should I explicitly pass a string to `initOptParser()`? |
14:06:59 | icyphox | Because it doesn't seem to be seeing my command line params. |
14:07:11 | * | endragor quit (Remote host closed the connection) |
14:08:41 | icyphox | Ah, nevermind. I forgot to iterate using `p.next()` |
14:08:42 | icyphox | Heh. |
14:09:59 | * | audiophile joined #nim |
14:13:23 | * | audiophile_ quit (Ping timeout: 240 seconds) |
14:13:31 | * | audiophile is now known as audiophile_ |
14:22:33 | * | theelous3 joined #nim |
14:32:20 | * | vicfred joined #nim |
14:36:51 | * | xet7 joined #nim |
14:37:33 | * | hoijui joined #nim |
14:48:45 | FromGitter | <ynfle> @Shucks https://nim-lang.org/docs/system.html#not%2Cint |
14:55:34 | * | narimiran quit (Ping timeout: 240 seconds) |
15:00:13 | * | pangey quit (Ping timeout: 272 seconds) |
15:01:35 | * | marnix quit (Read error: Connection reset by peer) |
15:02:13 | Araq | juan_carlos: I think "pointer derefencing" is in the manual |
15:03:56 | FromDiscord | <juan_carlos> True, seen it. |
15:04:19 | FromDiscord | <juan_carlos> Is very good documentation actually. |
15:05:09 | * | pangey joined #nim |
15:05:23 | * | kungtotte quit (Read error: Connection reset by peer) |
15:06:10 | * | kungtotte joined #nim |
15:08:07 | * | sagax joined #nim |
15:19:40 | * | synshroud_ joined #nim |
15:21:14 | * | synshroud quit (Ping timeout: 240 seconds) |
15:22:56 | * | zielmicha__ quit () |
15:23:09 | * | zielmicha__ joined #nim |
15:23:29 | * | lritter joined #nim |
15:25:12 | * | maier_ quit (Ping timeout: 256 seconds) |
15:26:18 | FromGitter | <ynfle> @PMunch Do I need to install a another plugin to get syntax highlighting and tab completion with your setup for nimlsp? I followed the instructions in the README |
15:31:02 | * | Vladar quit (Remote host closed the connection) |
15:43:28 | FromDiscord | <treeform> @dom96 My ws is based on niv's in that I looked at how they did some stuff, but its not a fork. It started out as a bunch of fixes to niv's code, then I rewrite it. I must give niv credit they they did figure out some confusing stuff so that I would not have to. |
15:44:36 | * | endragor joined #nim |
15:48:31 | leorize | @ynfle you need an another plugin for syntax highlighting |
15:48:39 | * | marnix joined #nim |
15:49:54 | FromGitter | <ynfle> Tab completion doesn't work and `:LspStatus` gives `nimlsp: not running` |
15:51:27 | leorize | you need a file type plugin |
15:51:49 | leorize | without one your lsp client might not know when to run nimlsp |
15:52:01 | leorize | use zah/nim.vim since you're on vim |
15:55:06 | bung | nimlsp does not support syntaxhight |
15:55:35 | bung | check Supported Protocol features section in readme |
15:56:31 | FromGitter | <ynfle> @leorize, in the (README)[https://github.com/PMunch/nimlsp#vim] he shows the setup using prabirshrestha/vim-lsp |
15:56:49 | leorize | yes, but you need a file type plugin too |
15:56:58 | FromGitter | <ynfle> Ok |
15:57:00 | leorize | lsp doesn't cover all of integration to the editor |
16:05:34 | * | solitudesf quit (Ping timeout: 240 seconds) |
16:15:26 | Araq | https://github.com/nim-lang/RFCs/issues/244 feedback very welcome |
16:15:28 | disbot | ā„ 'isolated' data for Nim ; snippet at 12https://play.nim-lang.org/#ix=2rSC |
16:16:17 | Araq | it's the final ARC/ORC related RFC, finally addressing multi threading aspects |
16:26:28 | * | oriba joined #nim |
16:29:04 | shashlick | how important is lz4 support |
16:37:08 | leorize | shashlick: ? |
16:42:06 | shashlick | so i can include lz4 in nimarchive |
16:42:28 | shashlick | right now i only have zlib, lzma and bzlib |
16:44:43 | leorize | maybe you should make it so that users can configure which backends to include? |
16:45:09 | shashlick | but that would mean creating multiple binaries with or without the required backends |
16:45:43 | shashlick | I started out with libarchive as compiled by http://binarybuilder.org but it doesn't have static binaries since Julia doesn't really care for those |
16:45:56 | shashlick | so I am creating binaries using their framework with static binaries |
16:45:59 | shashlick | so now I can decide what deps to include |
16:46:13 | shashlick | https://bintray.com/genotrance/binaries/ |
16:47:47 | leorize | you can provide a default set that contains everything |
16:48:06 | leorize | then if developers would only use a subset, fallback to compilation? |
16:48:09 | shashlick | i wanted to include zstd and lz4 but zstd doesn't have static libs for windows |
16:50:38 | leorize | static libs doesn't exist on windows afaik |
16:50:51 | leorize | on windows go dynlib all the way, devs know how to deal with that |
16:51:18 | shashlick | gcc's .a files work well on windows |
16:52:06 | shashlick | all this is focused on choosenim since it needs to extract zip, xz and gz files |
16:52:20 | shashlick | and we have all this as static libs across OS |
16:52:35 | shashlick | i'm just wondering how much nim community cares about zstd and lz4 |
16:52:52 | leorize | https://packages.msys2.org/package/mingw-w64-x86_64-zstd?repo=mingw64 |
16:52:59 | leorize | msys2 provides .a |
16:55:22 | shashlick | nice find |
16:55:27 | shashlick | but how do you extract the zst file š |
16:56:01 | * | marnix quit (Ping timeout: 264 seconds) |
16:56:12 | leorize | use a libarchive with zstd support :P |
16:56:55 | shashlick | nice work mingw |
16:58:28 | shashlick | looks like i need to add mingw repo support to nimterop as well |
16:59:16 | shashlick | too many dependencies though |
16:59:27 | shashlick | will end up downloading many other mingw libs |
17:00:26 | leorize | I'm seeing the story of how JuliaBinaryWrappers repo come to life repeating :P |
17:02:11 | * | abm quit (Ping timeout: 240 seconds) |
17:03:46 | shashlick | ya but they go beyond windows |
17:04:10 | FromGitter | <alehander92> "<juan_carlos> Async needs more Poland." |
17:04:14 | FromGitter | <alehander92> i just found that |
17:04:20 | FromGitter | <alehander92> and i really want to understand it |
17:04:27 | FromGitter | <alehander92> ah it's probably a reference to dom96 |
17:04:50 | FromDiscord | <dom96> lol |
17:04:59 | FromDiscord | <dom96> Someone said "async needs more polish" |
17:05:02 | FromDiscord | <dom96> I think that's why |
17:05:04 | leorize | shashlick: the idea is that all binaries have one authorative source :P |
17:09:14 | * | bung quit (Quit: Lost terminal) |
17:13:51 | * | fredrikhr quit (Ping timeout: 240 seconds) |
17:17:11 | * | marnix joined #nim |
17:19:25 | * | NimBot joined #nim |
17:22:04 | FromDiscord | <slymilano> Good afternoon Nim gang! Discord is terrible with search, was my "bug" a bug with Nim? Can't figure out why it works on Windows, and doesn't on Mac. |
17:22:15 | FromDiscord | <slymilano> @Varriount ^ |
17:54:51 | FromDiscord | <Varriount> @dom96 ^ |
17:56:02 | FromGitter | <alehander92> ahhhh but it works in two meanings |
17:56:08 | FromGitter | <alehander92> awesome |
18:00:00 | * | hoijui quit (Ping timeout: 256 seconds) |
18:17:53 | FromDiscord | <--HA--> Can someone recommend a good way to me to create a string filled with a variable number of spaces ` `? Currently I have a for loop 0 .. numberOfSpaces and call .add(" ") on my string var. Is that ok? |
18:18:35 | FromDiscord | <juan_carlos> strutils.repeat |
18:20:34 | FromDiscord | <--HA--> Perfect! Thanks |
18:22:33 | FromDiscord | <juan_carlos> YW |
18:28:34 | * | marnix quit (Ping timeout: 240 seconds) |
18:29:04 | * | hoijui joined #nim |
18:32:30 | FromDiscord | <dom96> @Varriount hrm? |
18:32:47 | FromDiscord | <dom96> oh, you're pointing me to @slymilano. @slymilano can you give context? |
18:33:35 | FromDiscord | <slymilano> definitely, thank you for your time! this works perfectly on windows but the crawlers don't actually run on mac. https://github.com/sergiotapia/torrentinim/blob/master/src/torrentinim.nim |
18:33:57 | FromDiscord | <slymilano> server.serve() has a runForever() at the end so it does the expected thing, but only on Windows, not on Mac. |
18:36:58 | FromDiscord | <dom96> that's a pretty big app, can you create a shorter example of what you're finding to be wrong? |
18:39:28 | disruptek | alehander92: i'm making progress on cps. |
18:40:02 | disruptek | probably will start the poc web-server today. |
18:45:46 | disruptek | iirc, i ran torrentinim just fine on linux. |
18:49:16 | * | synshroud joined #nim |
18:50:14 | * | synshroud_ quit (Ping timeout: 240 seconds) |
18:59:45 | FromDiscord | <slymilano> thanks disruptek, yeah so now confirmed windows and linux work, mac it doesn't. |
19:00:00 | FromDiscord | <slymilano> @dom96 i'll write a smaller example this weekend, hope it helps discover a bug somewhere in Nim |
19:06:00 | * | marnix joined #nim |
19:08:21 | * | tane joined #nim |
19:31:27 | FromDiscord | <Shucks> Anything else I can do to push performance else of '--opt:speed'? |
19:32:26 | FromDiscord | <Vindaar> `-d:danger`? |
19:32:37 | FromDiscord | <Shucks> kills it ;D |
19:35:23 | * | oddp_ quit (Quit: quit) |
19:44:58 | * | bung joined #nim |
19:44:59 | * | solitudesf joined #nim |
19:45:51 | federico3 | is the c2nim doc not build in an html page? https://nim-lang.org/docs/tools.html |
19:46:33 | * | narimiran joined #nim |
19:49:53 | shashlick | https://medium.com/better-programming/a-python-substitute-i-tried-out-the-best-programming-language-youve-never-heard-of-9e29cd1893c0 |
19:54:26 | FromDiscord | <dom96> ooh |
19:56:10 | FromDiscord | <Clyybber> disruptek: A webserver with CPS? |
20:10:32 | * | marnix quit (Ping timeout: 246 seconds) |
20:10:36 | * | nikita` quit (Ping timeout: 258 seconds) |
20:11:53 | * | bung quit (Quit: Lost terminal) |
20:12:03 | * | opal quit (Remote host closed the connection) |
20:12:04 | * | oriba quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
20:13:14 | * | nikita` joined #nim |
20:13:41 | * | opal joined #nim |
20:16:33 | FromDiscord | <Shucks> How could I open a file with fmAppend but replace it if it exists already? |
20:20:01 | * | synshroud quit (Ping timeout: 264 seconds) |
20:20:06 | leorize | huh? |
20:20:23 | leorize | then use fmWrite? |
20:20:41 | leorize | "append" means that you write extra to the end of an existing file |
20:21:37 | * | synshroud joined #nim |
20:22:35 | leorize | and if you want to replace the file then it doesn't sound "append"-y at all :P |
20:22:51 | * | audiophile_ is now known as BlameTheRoomba |
20:24:19 | disruptek | clyybber: yeah |
20:24:48 | FromDiscord | <Shucks> oh. I was confused. writeFile actually reopens the file everytime so I thought fmAppend would be required lol |
20:27:35 | * | Senketsu joined #nim |
20:32:06 | * | oddp joined #nim |
20:43:14 | FromDiscord | <Clyybber> disruptek: Damn, awesome I'm hyped |
20:44:15 | FromDiscord | <Clyybber> disruptek: you didn't push your latest work yet right? |
20:44:34 | rayman22201 | Child Protective Services? disruptek is always getting in trouble :-P |
20:45:16 | * | alehander92_ quit () |
20:45:38 | * | alehander92_ joined #nim |
20:47:26 | FromDiscord | <Shucks> > https://medium.com/better-programming/a-python-substitute-i-tried-out-the-best-programming-language-youve-never-heard-of-9e29cd1893c0āµ@shashlick[IRC]#0000 wondering if he compiled with `--opt:speed` :p |
20:47:49 | FromDiscord | <Rika> prolly didnt |
20:48:49 | FromDiscord | <lqdev> @Shucks you can use `--stacktrace:off` to increase performance |
20:48:55 | FromDiscord | <lqdev> but the consequence is rather obvious |
20:49:09 | FromDiscord | <Shucks> lets give it a try |
20:51:14 | * | hoijui quit (Quit: Leaving) |
21:05:00 | * | rayman22201 quit () |
21:05:14 | * | rayman22201 joined #nim |
21:16:59 | * | Cthalupa quit (Ping timeout: 240 seconds) |
21:17:00 | * | lmariscal0 quit (Quit: I'm Out!) |
21:17:02 | FromGitter | <Technisha> Discord is down so I'm gonna ask my stupid questions here- |
21:17:07 | * | FromDiscord quit (Remote host closed the connection) |
21:29:02 | leorize | @iffy have you figured out the asyncdispatch issue? |
21:31:06 | * | narimiran quit (Ping timeout: 258 seconds) |
21:35:04 | * | FromDiscord joined #nim |
21:35:17 | * | Cthalupa joined #nim |
21:49:00 | Prestige | Are there any built-in macro utils? |
21:49:22 | Prestige | Like high level utility functions |
21:51:04 | leorize | nope but |
21:51:07 | leorize | !repo macroutils |
21:51:08 | disbot | https://github.com/PMunch/macroutils -- 9macroutils: 11A package that makes creating macros easier 15 10ā 1š“ |
21:51:24 | * | sagax quit (Quit: Konversation terminated!) |
21:51:48 | * | sagax joined #nim |
21:52:26 | shashlick | !repo gara |
21:52:26 | disbot | https://github.com/alehander92/gara -- 9gara: 11 15 71ā 7š“ |
22:05:26 | * | Senketsu quit (Read error: Connection reset by peer) |
22:22:18 | * | krux02 quit (Remote host closed the connection) |
22:24:50 | * | solitudesf quit (Ping timeout: 260 seconds) |
22:34:56 | * | sz0 joined #nim |
23:01:33 | * | tane quit (Quit: Leaving) |
23:40:30 | * | canen joined #nim |
23:57:36 | * | Zevv quit (Remote host closed the connection) |
23:57:51 | * | Zevv joined #nim |
23:57:52 | * | Zevv quit (Changing host) |
23:57:52 | * | Zevv joined #nim |