00:00:06 | FromDiscord | <Yardanico> Nah |
00:00:13 | FromDiscord | <Yardanico> Use arc and locks |
00:00:31 | FromDiscord | <Elegant Beef> But channels seem cooler |
00:00:47 | FromDiscord | <Yardanico> They're not really efficient XD |
00:00:55 | FromDiscord | <Yardanico> And you can't mutate global state with then anyway |
00:01:19 | FromDiscord | <Yardanico> So you'll have to pass the same thing all over the place copying it each time |
00:01:58 | FromDiscord | <Elegant Beef> Psh i have 8 threads, gotta abuse them all |
00:02:41 | FromDiscord | <Elegant Beef> They'll learn to show me the respect i deserve |
00:04:25 | FromDiscord | <exelotl> it would be nice if we had some language feature that could prevent me from making that lock mistake |
00:07:02 | FromDiscord | <Yardanico> Well I guess it could be possible with DFA and stuff |
00:07:17 | FromDiscord | <Yardanico> With arc you already can do stuff like automatically close sockets or files |
00:07:34 | FromDiscord | <Yardanico> It'll be in stdlib too |
00:19:11 | * | ftsf joined #nim |
00:22:49 | * | zacharycarter joined #nim |
00:26:10 | FromDiscord | <exelotl> bung87: varargs[untyped] doesn't expand into anything meaningful unless it appears in a parameter list. If you want to access it in any way, you have to use a macro |
00:26:17 | FromDiscord | <exelotl> e.g. https://play.nim-lang.org/#ix=2n2Q |
00:26:18 | * | fredrikhr joined #nim |
00:26:25 | * | exelotl quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
00:33:27 | * | azed joined #nim |
00:34:51 | FromGitter | <bung87> ah, thanks, I see , it call NimNode's len |
00:42:44 | * | zacharycarter quit (Ping timeout: 256 seconds) |
01:02:37 | * | lritter quit (Ping timeout: 264 seconds) |
01:03:03 | * | lritter joined #nim |
01:11:26 | * | fredrikhr quit (Ping timeout: 260 seconds) |
01:25:27 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:27:21 | * | chemist69 joined #nim |
01:38:07 | FromDiscord | <Technisha Circuit> Ok, if i wanted to load some files dynamically and register them to a table, I'd have to use NimScript right? If that's the case, how would i use Nim and NimScript to pass data to eachother? |
01:39:55 | FromDiscord | <Elegant Beef> What do you mean load files dynamically and register them? |
01:40:02 | FromDiscord | <Elegant Beef> Nim can load files dynamically |
01:41:30 | * | nphg1 joined #nim |
01:44:03 | * | zacharycarter joined #nim |
01:44:28 | FromDiscord | <Technisha Circuit> I want be able to make use of those files |
01:44:32 | FromDiscord | <Technisha Circuit> And i mean imports |
01:44:46 | * | nphg quit (Ping timeout: 246 seconds) |
01:46:29 | FromDiscord | <Technisha Circuit> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/713568491160076320 |
01:46:40 | FromDiscord | <Elegant Beef> You could use a macro for that, assuming compile time is fine |
01:47:17 | FromDiscord | <Elegant Beef> If you want post compile time, you're going to have fun, and pmunch will have something that might help soon |
01:47:25 | FromDiscord | <Technisha Circuit> Oh? |
01:47:32 | FromDiscord | <Technisha Circuit> Compile time is fine for this |
01:47:39 | FromDiscord | <Elegant Beef> Then use a macro |
01:47:41 | FromDiscord | <Technisha Circuit> But how exactly would it be done? |
01:47:47 | FromDiscord | <Elegant Beef> or a template |
01:47:48 | FromDiscord | <Technisha Circuit> Lemme search it |
01:48:07 | FromDiscord | <Elegant Beef> https://github.com/beef331/nico-helper/blob/master/src/levelmanager.nim |
01:48:23 | FromDiscord | <Elegant Beef> This is the way i've automated adding levels for nico |
01:48:28 | FromDiscord | <Technisha Circuit> Oh okay |
01:48:43 | FromDiscord | <Elegant Beef> It imports all files inside a subdir and when those compile they subscribe to a dictionary |
01:48:57 | FromDiscord | <Elegant Beef> Import levels is the automated import that's hardcoded cause i couldnt be arsed |
01:49:06 | FromDiscord | <Elegant Beef> And add level is the way levels add |
01:49:26 | FromDiscord | <Technisha Circuit> Oh that seems simple |
01:49:42 | FromDiscord | <Elegant Beef> Then in a level i do `addLevel(gsMenu, getLevel)` |
01:50:06 | FromDiscord | <Elegant Beef> and just like that it subscribes the get level of that level to the enum i listed |
01:50:12 | FromDiscord | <Elegant Beef> So it's rather quick to add to |
01:50:30 | FromDiscord | <Technisha Circuit> sent a code paste, see http://ix.io/2n4w |
01:51:14 | FromDiscord | <Elegant Beef> That's the ast for importing all files inside the levels dir |
01:51:36 | FromDiscord | <Elegant Beef> Basically i just used dumptree to see what it looked like then copied it with some automation |
01:51:47 | FromDiscord | <Elegant Beef> I dont know if that's even closed to being nice/proper looking macro code |
01:51:50 | FromDiscord | <Elegant Beef> I know it works 😄 |
01:52:06 | FromDiscord | <Technisha Circuit> Oh okay |
01:52:09 | FromDiscord | <Technisha Circuit> Nice |
01:53:00 | FromDiscord | <Technisha Circuit> If i use the macro, does it return only one module? |
01:53:08 | FromDiscord | <Elegant Beef> That one adds all the modules inside the level |
01:53:12 | FromDiscord | <Elegant Beef> (edit) 'level' => 'levels dir' |
01:53:28 | FromDiscord | <Elegant Beef> assuming it's used in the main dir |
01:53:47 | FromDiscord | <Technisha Circuit> Oh okay |
01:54:06 | FromDiscord | <Technisha Circuit> This is kinda confusing imo ;-; |
01:54:28 | FromDiscord | <Elegant Beef> use dumptree |
01:54:35 | FromDiscord | <Elegant Beef> you'll learn quickly what it needs to look like |
01:54:38 | FromDiscord | <Elegant Beef> atleast it's how i do it |
01:54:43 | FromDiscord | <Technisha Circuit> Okay :p |
01:55:21 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2n4G something like this |
01:55:35 | FromDiscord | <Technisha Circuit> Oh okay, thanks :p |
01:58:28 | FromDiscord | <Technisha Circuit> I'm wondering |
01:59:52 | FromDiscord | <Elegant Beef> you are |
02:01:33 | FromDiscord | <Technisha Circuit> A) Can i use the code produced by dumptree without a macro?↵B) Would it be any faster compiling code by using the dumptree produced code if question A is possible? |
02:02:15 | FromDiscord | <Elegant Beef> the dumptree just produces a stringified AST |
02:02:33 | FromDiscord | <Elegant Beef> Dumptree basically lets you write out a functiona equivlent that you'd want to make with a macro |
02:02:44 | FromDiscord | <Elegant Beef> Again atleast that's what i've been doing and how i've approached macros |
02:03:34 | FromDiscord | <Technisha Circuit> Oh okay |
02:03:42 | * | zacharycarter quit (Ping timeout: 260 seconds) |
02:08:32 | * | thomasross joined #nim |
02:18:48 | FromDiscord | <Technisha Circuit> sent a code paste, see http://ix.io/2n4L |
02:21:41 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/tut3.html |
02:27:26 | FromDiscord | <Zed> does nim support string interpolation? |
02:27:41 | FromDiscord | <Zed> because looking through the array mancer example i found this line |
02:27:51 | FromDiscord | <Zed> `echo &"Epoch {t}: loss {loss.value[0]}"` |
02:28:09 | FromDiscord | <Elegant Beef> strformat module |
02:28:43 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2n4O |
02:28:49 | FromDiscord | <Zed> ill check that out, looks alot cleaner then ""&""&"" |
02:28:59 | FromDiscord | <Elegant Beef> yea it is |
02:35:08 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:37:17 | * | muffindrake joined #nim |
02:40:18 | FromDiscord | <Elegant Beef> There is also string templates but i dont recall how they work |
03:03:25 | * | azed quit (Quit: WeeChat 2.8) |
03:05:37 | * | Guest81561 quit (Ping timeout: 264 seconds) |
03:12:14 | * | dadada joined #nim |
03:12:38 | * | dadada is now known as Guest23830 |
03:21:29 | FromDiscord | <Zed> can nim bind with python libraries? |
03:22:43 | FromDiscord | <Zed> i cant find anything about this in the docs |
03:24:43 | FromDiscord | <Zed> actually i just found nimpy, ill see if that works |
03:28:45 | FromDiscord | <Technisha Circuit> Nimpy is useful |
03:28:54 | FromDiscord | <Technisha Circuit> But there are libraries that won't work with it |
03:29:24 | FromDiscord | <Zed> well that's a bummer |
03:29:41 | FromDiscord | <Zed> ill check if this works, if not i may have to go to c bindings |
03:36:06 | * | Guest23830 quit (Ping timeout: 260 seconds) |
03:42:08 | * | dadada__ joined #nim |
03:48:25 | leorize | if C bindings work, nimpy will :P |
03:49:06 | * | Senketsu joined #nim |
03:49:47 | FromDiscord | <Rika> good morning |
03:49:51 | * | aeverr joined #nim |
03:50:15 | FromDiscord | <Zed> morning |
04:02:06 | FromDiscord | <Technisha Circuit> If i have some JSON data in Nim, am i able to do `if "a" in jsonData:`? |
04:02:19 | FromDiscord | <Technisha Circuit> So it checks the keys if a is a valid key |
04:03:37 | FromDiscord | <Technisha Circuit> Nvm |
04:03:57 | FromDiscord | <Technisha Circuit> I found out that `JsonNode` types have the `{}` operator |
04:04:03 | FromDiscord | <Rika> yes |
04:05:36 | * | dadada__ quit (Ping timeout: 256 seconds) |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:44 | * | supakeen joined #nim |
04:07:56 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:11:08 | FromDiscord | <j$> is their documentation on when to use templates over procedures, or should I just know? |
04:11:28 | FromDiscord | <j$> there* |
04:11:39 | FromDiscord | <Technisha Circuit> If i use `readFile`, do the files automatically get locked so they can't be read when something is already reading it or do i have to use my own file lock? |
04:11:45 | leorize | the rule is to use the simplest thing |
04:11:54 | leorize | use the more powerful stuff as you need it |
04:12:09 | * | dadada joined #nim |
04:12:22 | leorize | @Technisha Circuit: mandatory locking only exists on windows |
04:12:33 | * | dadada is now known as Guest51477 |
04:12:36 | leorize | and you should never rely on them anyway :P |
04:12:36 | FromDiscord | <Technisha Circuit> Wdym? |
04:12:40 | FromDiscord | <Technisha Circuit> Oh |
04:12:54 | FromDiscord | <Technisha Circuit> So how would i lock a file if it's being read then? |
04:13:15 | FromDiscord | <Rika> manually i assue |
04:13:17 | FromDiscord | <Rika> (edit) 'assue' => 'assume' |
04:13:35 | leorize | we don't have any cross platform interface for this |
04:13:51 | leorize | but what are you trying to achieve with file locks? |
04:14:02 | FromDiscord | <Elegant Beef> You read it and cross your fingers and hope it doesnt get corrupted by a write |
04:14:12 | leorize | I must warn you that file locks are complicated |
04:14:28 | leorize | because for most os out there, file locks are advisory |
04:14:56 | leorize | meaning that only users of the lock respect it |
04:15:04 | leorize | a random process can rewrite the file ignoring the lock |
04:16:25 | FromDiscord | <Elegant Beef> Has anyone here used nico on linux and actually got the volume control to function, seems the source wants an int between 0 and 255 but 0 mutes and 1 is 100% |
04:18:55 | FromDiscord | <Technisha Circuit> It's for a web server |
04:19:07 | FromDiscord | <Technisha Circuit> And the site I'm making is for a fairly big community |
04:19:15 | leorize | then it sounds like you don't need file locking |
04:19:25 | FromDiscord | <Technisha Circuit> And I don't want any of the html files getting corrupted |
04:19:27 | FromDiscord | <Technisha Circuit> Oh? |
04:19:42 | leorize | if you don't want them to be corrupted, don't write to them :P |
04:19:48 | FromDiscord | <Technisha Circuit> Oh okay :p |
04:19:53 | FromDiscord | <Technisha Circuit> Thanks! |
04:19:58 | leorize | file locks are meaningless unless all processes are cooperative |
04:20:17 | FromDiscord | <Rika> many porcesses reading doesnt corrupt a file afaik |
04:20:20 | FromDiscord | <Technisha Circuit> So can multiple applications read a single file at once? |
04:20:27 | leorize | yes? |
04:20:33 | FromDiscord | <Elegant Beef> Why wouldnt they |
04:20:35 | leorize | unless you're on windows, that os is terrible |
04:20:38 | FromDiscord | <Technisha Circuit> Oh |
04:20:48 | FromDiscord | <Technisha Circuit> I thought that would lead to corruption |
04:20:52 | FromDiscord | <Technisha Circuit> (Linux ftw) |
04:20:59 | FromDiscord | <Elegant Beef> Well doesnt windows make files loaded all shared memory? |
04:21:05 | FromDiscord | <Elegant Beef> Or is it just .exes |
04:21:12 | leorize | Technisha why would it lol |
04:21:26 | leorize | @Beef: just dlls |
04:21:27 | FromDiscord | <Technisha Circuit> No idea ¯\\_(ツ)\_/¯ |
04:21:43 | leorize | windows enforce mandatory locking by default, despite it being stupid :P |
04:21:45 | FromDiscord | <Technisha Circuit> Also, what flags do i need to compile a jester app with? |
04:21:54 | FromDiscord | <Technisha Circuit> > windows enforce mandatory locking by default, despite it being stupid :P↵O |
04:21:55 | leorize | -d:release :p |
04:22:02 | FromDiscord | <Rika> if it needed any, they would tell you iun the readme |
04:22:03 | FromDiscord | <Technisha Circuit> Thanks :p |
04:22:04 | FromDiscord | <Rika> (edit) 'iun' => 'in' |
04:22:39 | FromDiscord | <Technisha Circuit> I'm still getting this error ```↵/data/data/com.termux/files/home/.nimble/pkgs/httpbeast-0.2.2/httpbeast.nim(282, 17) Error: undeclared identifier: 'addTimer'``` |
04:22:53 | * | dddddd quit (Ping timeout: 258 seconds) |
04:23:22 | leorize | what os are you on? |
04:23:31 | leorize | oh, android |
04:23:38 | FromDiscord | <Technisha Circuit> :p |
04:23:44 | leorize | go on a proper desktop |
04:23:48 | FromDiscord | <Rika> lmaoooo |
04:23:48 | FromDiscord | <Technisha Circuit> I can't |
04:23:54 | FromDiscord | <Technisha Circuit> That's why I'm using my phone |
04:23:56 | FromDiscord | <Technisha Circuit> ;-; |
04:23:59 | leorize | then you can't develop :P |
04:24:06 | leorize | well you can if you try |
04:24:09 | FromDiscord | <Technisha Circuit> I used to develop on my phone |
04:24:22 | FromDiscord | <Technisha Circuit> That's how I learnt to code :p |
04:24:34 | leorize | pass -d:useStdlib |
04:24:44 | leorize | that should force jester to use asynchttpserver |
04:24:56 | FromDiscord | <Technisha Circuit> Oh okay |
04:24:58 | FromDiscord | <Technisha Circuit> Thanks :p |
04:25:19 | FromDiscord | <Rika> i wonder whats missing on android that prevents it from running httpbeast |
04:25:29 | FromDiscord | <Technisha Circuit> It works now! Thanks! |
04:25:42 | leorize | probably the epoll setup is not finalized there |
04:26:50 | * | lritter quit (Quit: Leaving) |
04:28:22 | * | shadwick joined #nim |
04:30:28 | FromDiscord | <Technisha Circuit> I have an issue now with my code ;-; |
04:30:43 | FromDiscord | <Technisha Circuit> sent a code paste, see http://ix.io/2n5a |
04:30:53 | FromDiscord | <Technisha Circuit> And I have no idea why |
04:31:02 | * | Prestige quit (Quit: Prestige) |
04:31:13 | leorize | .getStr |
04:31:21 | * | Prestige joined #nim |
04:31:29 | FromDiscord | <Technisha Circuit> Oh |
04:31:34 | FromDiscord | <Technisha Circuit> Thanks :p |
04:31:47 | shadwick | Hi all -- I'm seeing an issue with the `re` module and `Nim Compiler Version 1.2.0 [MacOSX: amd64]`. When I import `re` I get the error: `...impure/re.nim(90, 28) Error: VM does not support 'cast' from tySet to tyInt32`. It looks like it's failing to cast the `seq[RegexFlag]` to `cint` ... I can't find anything on Google. Anyone seen this? |
04:31:56 | leorize | you're doing an admirable amount of code golfing |
04:32:21 | FromDiscord | <Elegant Beef> Code golfing? |
04:32:26 | leorize | shadwick: that looks weird, can you post a snippet on the playground |
04:32:29 | FromDiscord | <j$> `golfing` |
04:32:51 | leorize | @Beef: read: trying to write short code |
04:33:28 | shadwick | leorize: sure thing, lemme make a minimum example |
04:33:39 | shadwick | ( just FYI it's this line: https://github.com/nim-lang/Nim/blob/version-1-2/lib/impure/re.nim#L93 ) |
04:34:54 | shadwick | leorize: https://play.nim-lang.org/#ix=2n5b |
04:34:54 | leorize | let me guess, you put a `re"string"` in a const? |
04:35:02 | shadwick | ohhh ok, yes, I did hahah |
04:35:15 | leorize | spot on :P |
04:35:23 | leorize | well you can't :P |
04:35:38 | leorize | use nim-regex |
04:35:43 | leorize | or use `let` :P |
04:35:48 | shadwick | well that's good to know.. I didn't see that in the module docs |
04:35:53 | * | Guest51477 quit (Ping timeout: 260 seconds) |
04:36:04 | shadwick | nice guess |
04:37:55 | shadwick | wow, literally the same second haha 👍 |
04:37:59 | leorize | yea, no one really bothered to document it afaict |
04:38:30 | leorize | usually they would just tell you to use nim-regex, which is native :P |
04:38:43 | leorize | then you can do `const` |
04:39:08 | leorize | though personally not a fan of regex, npeg spoiled me |
04:39:11 | FromDiscord | <Technisha Circuit> Anyone able to help me with this code? https://hastebin.com/soqujebobi.nim |
04:39:17 | FromDiscord | <Technisha Circuit> I keep getting a 404 error |
04:39:41 | leorize | the `?` |
04:39:42 | FromDiscord | <Technisha Circuit> Nvm |
04:39:47 | FromDiscord | <Technisha Circuit> I figured out the issue |
04:40:03 | leorize | how are you even doing this on a phone? samsung dex? |
04:40:07 | FromDiscord | <Technisha Circuit> That was in the docs wasn't it? |
04:40:08 | FromDiscord | <Technisha Circuit> Nope |
04:40:20 | FromDiscord | <Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/713612252221145198/Screenshot_20200523_054013_com.termux.jpg |
04:40:57 | * | theelous3 quit (Read error: Connection reset by peer) |
04:41:00 | leorize | oh lol |
04:41:07 | FromDiscord | <Technisha Circuit> Also, the `?@path` thing was in the docs |
04:41:20 | FromDiscord | <Technisha Circuit> Termux is basically a full linux terminal on android |
04:41:31 | FromDiscord | <Technisha Circuit> Works on non-rooted devices too |
04:41:52 | * | kungtotte quit (Read error: Connection reset by peer) |
04:41:52 | leorize | yea I know |
04:41:53 | FromDiscord | <Technisha Circuit> (edit) 'Termux is basically a full linux terminal on android ... ' => 'Termux is basically a full linux terminal on android(that can actually do alot of complex stuff)' |
04:41:57 | FromDiscord | <Technisha Circuit> O |
04:41:59 | * | kungtotte_ joined #nim |
04:42:01 | leorize | I just can't bear working on it :P |
04:42:09 | leorize | last time I checked nim.nvim work there |
04:42:11 | FromDiscord | <Technisha Circuit> I'm still having an issue with my code |
04:42:13 | * | dadada__ joined #nim |
04:42:16 | FromDiscord | <Technisha Circuit> Nim.nvim? |
04:42:29 | leorize | https://github.com/alaviss/nim.nvim |
04:44:22 | FromDiscord | <Technisha Circuit> O |
04:44:26 | FromDiscord | <Technisha Circuit> I just use nano |
04:44:36 | FromDiscord | <Technisha Circuit> And i got the nano syntax highlighting for nim |
04:44:46 | FromDiscord | <Technisha Circuit> It's basic but it works |
04:45:45 | shadwick | nim.nvim -> not even .elisp, sheesh 🙃 |
04:46:20 | leorize | switch over to the dark side |
04:46:31 | FromDiscord | <Technisha Circuit> Nah |
04:46:34 | shadwick | I tried to do some dev work on an Android tablet once like that, and even with a (albeit mini) bluetooth keyboard it was horrendous |
04:46:53 | FromDiscord | <Technisha Circuit> Ooof |
04:46:59 | FromDiscord | <Technisha Circuit> I use my built-in keyboard |
04:47:24 | shadwick | Well the fact that you have more than 50 chars there is impressive |
04:47:26 | shadwick | Nice |
04:47:32 | FromDiscord | <Technisha Circuit> It's probably because you first started programming on a PC while i started on a mobile |
04:47:35 | FromDiscord | <Technisha Circuit> Hahaha |
04:47:47 | FromDiscord | <Technisha Circuit> I have some bigger programs too |
04:48:32 | FromDiscord | <Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/713614315021926460/Screenshot_20200523_054818_com.termux.jpg |
04:48:34 | FromDiscord | <Technisha Circuit> Still going |
04:49:37 | shadwick | Wtf |
04:50:03 | shadwick | Learning negative numbers and subtraction?... |
04:50:15 | shadwick | Please don't tell me you typed all that on a mobile device... |
04:52:25 | * | rockcavera quit (Remote host closed the connection) |
04:52:44 | FromDiscord | <Rika> nah its prolly that "my first calculator" project on github |
04:53:08 | FromDiscord | <Rika> also i'm even more spoiled than some of you, i cant bear using my laptop to code 😛 |
04:53:50 | leorize | then I expect that you can write really fast? :P |
04:57:16 | shadwick | yeah, I need to be able to constantly write and then delete and rewrite my code like 100 times |
05:01:58 | leorize | jnim is looking promising |
05:02:17 | leorize | I wonder when will there be enough tooling to write an entire android app with nim |
05:02:31 | FromDiscord | <Technisha Circuit> Hahahaha |
05:02:51 | FromDiscord | <Technisha Circuit> > also i'm even more spoiled than some of you, i cant bear using my laptop to code 😛↵oof |
05:06:09 | * | dadada__ quit (Ping timeout: 265 seconds) |
05:12:05 | * | dadada joined #nim |
05:12:29 | * | dadada is now known as Guest65704 |
05:29:38 | disruptek | what's the deal with default gc and the abi error on lock deinit? |
05:30:00 | disruptek | bad `abi` field. how does this stuff pass ci? |
05:30:17 | disruptek | works fine under arc. |
05:30:23 | leorize | because no one tested it? |
05:30:36 | disruptek | weird. |
05:31:42 | disruptek | i guess i can file an issue. |
05:33:57 | disruptek | oh, it's 'cause it's in a destroy, i bet. |
05:36:41 | * | Guest65704 quit (Ping timeout: 272 seconds) |
05:42:11 | * | dadada__ joined #nim |
05:54:58 | * | thomasross quit (Ping timeout: 265 seconds) |
05:57:14 | * | solitudesf joined #nim |
06:06:23 | * | dadada__ quit (Ping timeout: 258 seconds) |
06:12:11 | * | dadada joined #nim |
06:12:35 | * | dadada is now known as Guest41477 |
06:17:32 | FromDiscord | <Technisha Circuit> Can someone help me with this? https://hastebin.com/soqujebobi.nim |
06:17:55 | FromDiscord | <Technisha Circuit> In the docs it said i could do `?@path` but i keep getting a 404 error |
06:20:30 | leorize | maybe you should not abuse `?` for this? |
06:21:14 | leorize | ooooh |
06:21:35 | leorize | `/?@path` means that the `/` is optional |
06:21:55 | leorize | but really, don't abuse `?` to do routing |
06:22:50 | FromDiscord | <Technisha Circuit> I need to use `?` ;-; |
06:22:54 | leorize | why? |
06:23:15 | FromDiscord | <Technisha Circuit> My friend wants to use a json file for adding pages to the path |
06:23:22 | leorize | so? |
06:23:39 | FromDiscord | <Technisha Circuit> How else would i do it without `?`? |
06:24:05 | leorize | uhmmm do you know what `?` means? |
06:24:43 | leorize | also I need a quick explaination of how this "use a json file for adding pages" work |
06:25:04 | FromDiscord | <Technisha Circuit> I mean adding pages for adding routes |
06:25:12 | leorize | ? |
06:25:25 | leorize | I need an example please |
06:25:51 | FromDiscord | <Technisha Circuit> So i can do ```json↵{↵ "a":"html/a.html"↵}```then `a` will be a valid route that can be viewed |
06:26:12 | leorize | use a post request for that |
06:26:46 | leorize | you'd want a post request since this modifies the server state |
06:27:09 | FromDiscord | <Technisha Circuit> ? |
06:27:10 | leorize | if you use get certain prefetcher might query the api rapidly |
06:27:14 | FromDiscord | <Technisha Circuit> That's in a json file |
06:28:00 | leorize | uhhh I still don't get what you're trying to do |
06:28:08 | leorize | example of how a client would query the server please |
06:28:45 | FromDiscord | <Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/713639536080584725/Screenshot_20200523_072837_com.termux.jpg |
06:29:01 | FromDiscord | <Technisha Circuit> Paths.json contains the path and what file it should read |
06:29:35 | FromDiscord | <Technisha Circuit> And then the code then checks if that's a valid route, if it is, then the user gets the page |
06:29:55 | leorize | remove the `?` |
06:30:03 | leorize | there, problem solved :P |
06:30:23 | FromDiscord | <Elegant Beef> I still cant believe anyone codes using a touch screen |
06:30:52 | leorize | also for page not found, you can use `pass` to tell jester to ignore the route |
06:32:49 | shadwick | I'm both disgusted and awed that you're programming on a phone, with a Comic Sans keyboard no less... |
06:33:22 | leorize | I don't think that's comic sans |
06:33:32 | leorize | though I can see that someone likes ubuntu mono |
06:34:36 | FromDiscord | <Elegant Beef> That is certainly comic sans on the keyboard https://media.discordapp.net/attachments/371759389889003532/713641011024494622/unknown.png |
06:35:04 | FromDiscord | <Technisha Circuit> Okay then :P |
06:35:05 | FromDiscord | <Technisha Circuit> Hahaha |
06:35:20 | FromDiscord | <Technisha Circuit> It's comic sans where possible, but termux uses ubuntu mono |
06:35:42 | FromDiscord | <Technisha Circuit> > I'm both disgusted and awed that you're programming on a phone, with a Comic Sans keyboard no less...↵~~Can we have this pinned?~~ |
06:36:17 | * | Guest41477 quit (Ping timeout: 258 seconds) |
06:42:09 | * | dadada__ joined #nim |
06:44:17 | planetis[m] | ignorant question: wasn't std/threadpool buggy and was supposed to be replaced with https://github.com/yglukhov/threadpools ? what happened? |
06:47:58 | shadwick | Technisha Circuit: stop it. you're making me feel like an old bastard |
06:50:14 | shadwick | and here I'm on IRC instead of Discord. brb... gotta switch |
06:51:50 | planetis[m] | and is weave a replacement for both? |
06:54:12 | planetis[m] | my usecase is a game engine consisting of systems with dependencies, each system can start in parallel as long a previous one is not writing any component in its sets of reads + writes https://play.nim-lang.org/#ix=2n5p |
06:58:11 | planetis[m] | I could just use createThread + joinThread but isn't this supposed to be slower that a threadpool? |
06:59:15 | FromDiscord | <Technisha Circuit> > Technisha Circuit: stop it. you're making me feel like an old bastard↵Hahaha |
07:06:15 | * | dadada__ quit (Ping timeout: 260 seconds) |
07:12:11 | * | dadada joined #nim |
07:12:34 | * | dadada is now known as Guest25099 |
07:13:11 | FromDiscord | <Technisha Circuit> > I'm both disgusted and awed that you're programming on a phone, with a Comic Sans keyboard no less...↵~~Please can we have this pinned?~~ |
07:13:17 | FromDiscord | <Technisha Circuit> ~~;-;~~ |
07:13:25 | FromDiscord | <Rika> ask yardy |
07:13:25 | FromDiscord | <Technisha Circuit> Oh! I actually have a decent idea! |
07:13:41 | FromDiscord | <Technisha Circuit> Why not make a starboard bot in Nim and use it in this server! |
07:16:00 | FromDiscord | <Rika> why |
07:16:51 | * | martinium quit (Quit: Leaving) |
07:21:07 | FromDiscord | <Technisha Circuit> It'd be a nice thing to have so we have a channel of funny and stupid things as a record |
07:21:20 | FromDiscord | <Rika> is it really needed for a serious discord like this |
07:21:25 | FromDiscord | <Technisha Circuit> ~~Also it'd be useful to remind someone of something embarrassing~~ |
07:21:50 | FromDiscord | <Technisha Circuit> Ik plenty of serious discord's with bots like this, but no, it's not really needed ;-; |
07:26:23 | FromDiscord | <Elegant Beef> Im here, it clearly cant take itself that seriously |
07:26:45 | Prestige | @Elegant Beef I have multihead working now :D |
07:26:46 | shadwick | I would only be OK with it if it were typed on a Samsung S10 |
07:29:39 | FromDiscord | <Elegant Beef> Grats |
07:29:53 | FromDiscord | <Elegant Beef> Using xrandr through a command i assume? |
07:30:15 | Prestige | xinerama, was much simpler than xrandr |
07:30:49 | FromDiscord | <Elegant Beef> I actually just installed a new distro like and hour ago 😄 |
07:31:34 | FromDiscord | <Elegant Beef> So no more need for a new WM |
07:31:40 | Prestige | Lol oh rip |
07:32:41 | FromDiscord | <Elegant Beef> I mean really it's just an ubuntu derivative that has i3wm setup OOTB |
07:33:06 | FromDiscord | <Elegant Beef> `Command 'snap' not found, but can be installed with:`↵The most important part |
07:35:37 | * | shadwick quit (Remote host closed the connection) |
07:36:14 | * | Guest25099 quit (Ping timeout: 256 seconds) |
07:40:04 | * | neceve joined #nim |
07:42:13 | * | dadada__ joined #nim |
07:57:25 | FromDiscord | <Lantos> something odd is happening ↵I'm trying ``nimble install sdl2`` and it is installing ↵https://github.com/nim-lang/sdl2 ↵but when going into the ``src/sdl2/audio.nim`` on the nimble install dir it is not the same as the one on the github page. |
07:57:41 | FromDiscord | <Lantos> I've also tried ``nimble install https://github.com/nim-lang/sdl2`` |
07:59:28 | FromDiscord | <Lantos> is this the release being pulled and doesn't match with master brance? |
07:59:32 | FromDiscord | <Lantos> (edit) 'brance?' => 'branch?' |
08:01:00 | FromDiscord | <Lantos> ah yep ``nimble install https://github.com/nim-lang/sdl2@#master`` |
08:06:18 | * | dadada__ quit (Ping timeout: 260 seconds) |
08:12:11 | * | dadada joined #nim |
08:12:36 | * | dadada is now known as Guest75249 |
08:21:20 | FromDiscord | <mratsim> @planetis yes yglukhov threadpool are still supposed to replace the stdlib threadpools. |
08:22:53 | FromDiscord | <mratsim> Weave is threadpool + loadbalancer + parallel for + managing parallel producer-consumer dependencies |
08:23:42 | FromDiscord | <mratsim> but it's probably too complex to be maintained in a standard library, i.e. it's a replacement as in it fulfills all the duties of a threadpool |
08:24:14 | FromDiscord | <mratsim> but I don't tthink we should have something so big and complex in the standard lib |
08:25:34 | FromDiscord | <mratsim> Regarding your architecture, you can model that as FlowEvent: https://github.com/mratsim/weave#delayed-computation-with-single-dependencies |
08:27:18 | FromDiscord | <mratsim> FlowEvent are a handle and you can use the new "runInBackground(Weave)" + "submitOnEvents(HasTransform2d, HasMove, HasControlBall, HasShake, sysControlBall(myParam))" |
08:27:43 | FromDiscord | <mratsim> to launch a sysControlBall computation when all the events are triggered |
08:29:00 | FromDiscord | <mratsim> and in another thread you can use HasMove.trigger() |
08:36:21 | * | Guest75249 quit (Ping timeout: 260 seconds) |
08:36:53 | * | NimBot joined #nim |
08:42:13 | * | dadada__ joined #nim |
08:44:44 | FromDiscord | <mratsim> @shashlick how do you debug "toast --recursive" I'm trying to wrap what is uncompressed by this script: https://github.com/SciNim/minitorch/blob/master/minitorch/torch_installer.nim#L73-L75↵↵afaik I should at least see a tensor type https://media.discordapp.net/attachments/371759389889003532/713673760695386172/unknown.png |
08:46:11 | Prestige | Just finished up multihead support for nimdow and pushed a release |
08:49:59 | planetis[m] | mratsim: thanks, i will try it |
08:50:58 | * | Trustable joined #nim |
08:51:25 | FromDiscord | <mratsim> you have some details on Weave as a background service here: https://github.com/mratsim/weave#foreign-thread--background-service-experimental |
08:52:17 | FromDiscord | <mratsim> Ah I forgot to change all submitDelayed to submitOnEvents |
09:00:49 | * | brainbomb joined #nim |
09:06:13 | * | dadada__ quit (Ping timeout: 264 seconds) |
09:12:09 | * | dadada joined #nim |
09:12:33 | * | dadada is now known as Guest8964 |
09:13:32 | planetis[m] | actually I can compute the dependencies at compile time. (provided I can make everything else work) the previous macro could expand to: https://play.nim-lang.org/#ix=2n5W |
09:18:27 | FromDiscord | <mratsim> you need a setupSubmitterThread(Weave) and waitUntilReady(Weave) in all threads that submit jobs |
09:18:58 | FromDiscord | <mratsim> I'll have to cook up a tiny example of this |
09:22:41 | FromDiscord | <mratsim> unless the jobs create new jobs recursively, the load will be better distributed if you use the FlowEvent system |
09:23:01 | FromDiscord | <mratsim> because during waitFor the main threads doesn't do anything |
09:23:37 | planetis[m] | so avoid waitfor, i see thanks |
09:24:01 | FromDiscord | <mratsim> also does handleInput/controlBall and controlBrick mutate self"? |
09:24:20 | FromDiscord | <mratsim> because if they do you will have concurrency bugs since they are scheduled at the same time |
09:24:37 | FromDiscord | <mratsim> unless they work on different fields |
09:25:04 | FromDiscord | <mratsim> you will need to pass self.addr probably as well or you will have a "cannot capture self" |
09:25:37 | FromDiscord | <mratsim> I'm not a game specialist but I think the input should be handled by async |
09:25:47 | FromDiscord | <mratsim> and the rendering by Weave |
09:25:54 | planetis[m] | yes they work in different fields, here is source https://github.com/b3liever/breakout-ecs/blob/master/systems/transform2d.nim |
09:26:00 | FromDiscord | <mratsim> since that's the most expensive part while input is the most interactive part |
09:27:20 | planetis[m] | i still have a lot to learn about sdl2 and games in general so I am not sure it can work multithreaded |
09:27:45 | FromDiscord | <mratsim> oh it can, but the questions is what to thread and what to async :p |
09:28:07 | FromDiscord | <mratsim> fwi this is the thread for suggesting things to use Weave in games: https://github.com/mratsim/weave/issues/132 |
09:28:11 | disbot | ➥ [RFC] Composability with async frameworks and other threading solutions. ; snippet at 12https://play.nim-lang.org/#ix=2n64 |
09:29:33 | planetis[m] | btw i only used breakout as research example, I plan to make a real game eventually :) |
09:29:50 | FromDiscord | <mratsim> that sounds good to me |
09:30:18 | FromDiscord | <mratsim> I started a prototype of Weave in July as a research example and then threw out all the code 😉 |
09:30:54 | planetis[m] | threw out as discarded? |
09:32:25 | * | letto_ quit (Read error: Connection reset by peer) |
09:32:58 | * | letto joined #nim |
09:35:12 | planetis[m] | I have written huge amounts of code that do nothing... I am an expert on that :p |
09:36:13 | * | Guest8964 quit (Ping timeout: 264 seconds) |
09:36:22 | alehander92 | mratsim oii |
09:36:38 | FromGitter | <bung87> lol |
09:38:37 | * | Senketsu quit (Ping timeout: 260 seconds) |
09:42:08 | * | dadada__ joined #nim |
09:43:24 | planetis[m] | hi alehander92 |
09:49:15 | alehander92 | morning !! |
09:54:39 | * | Zevv quit (Remote host closed the connection) |
09:59:40 | FromDiscord | <mratsim> @planetis yes |
10:00:19 | FromDiscord | <mratsim> https://github.com/mratsim/weave/pull/116/files |
10:00:22 | disbot | ➥ Spring cleaning |
10:06:13 | * | dadada__ quit (Ping timeout: 264 seconds) |
10:12:16 | * | dadada joined #nim |
10:12:39 | * | dadada is now known as Guest60393 |
10:15:54 | * | Zevv joined #nim |
10:26:47 | * | nsf joined #nim |
10:36:22 | * | Guest60393 quit (Ping timeout: 260 seconds) |
10:41:26 | FromDiscord | <dom96> guten morgen |
10:42:12 | * | dadada__ joined #nim |
10:49:49 | * | chemist69 quit (Ping timeout: 272 seconds) |
10:50:29 | * | chemist69 joined #nim |
10:50:59 | * | krux02 joined #nim |
10:55:44 | Zevv | he said in the afternoon |
10:56:49 | FromDiscord | <mratsim> it's always morning somewhere |
10:57:02 | FromDiscord | <mratsim> and he is in the UK |
10:58:29 | FromDiscord | <dom96> Don't morning shame me |
10:58:32 | FromDiscord | <dom96> 😛 |
11:02:05 | livcd | mratsim: Do you use weave anywhere @ Status? |
11:08:25 | * | filcuc joined #nim |
11:19:07 | nikita` | is it possible to have lazy evaluation of C constants in Nim code? I want to avoid writing temporary C files and invoke a compiler like I've done in the shell script I'm rewriting. My target is writing a tool where I have binaries I can check the output of via execCmdEx and libraries I have to look into defined constants and what they return. In other words, I don't want to bake .importc. into the binary as it (ideally) has to be something |
11:19:07 | nikita` | defined in a config file. |
11:23:38 | nikita` | On the high level I want to compile to a binary which does not fail to build because some c lib is missing at build time, an error at runtime is acceptable and what I do right now in shell. It's probably not possible with importc this way I guess. |
11:27:35 | * | gxt__ joined #nim |
11:30:42 | * | filcuc quit (Ping timeout: 260 seconds) |
11:36:36 | * | fredrikhr joined #nim |
11:43:47 | alehander92 | dom96 morning |
11:46:58 | FromDiscord | <mratsim> @livcd, no |
11:48:24 | FromDiscord | <mratsim> @nikita, if you use the dynlib pragma the existence of library is checked only at runtime |
11:49:28 | nikita` | ah. thanks! I'm still getting more familiar with Nim. |
11:49:58 | FromDiscord | <mratsim> constants need to be in a header though |
11:50:14 | FromDiscord | <mratsim> unless the C lirary return them via a function |
11:50:53 | * | filcuc joined #nim |
11:51:25 | nikita` | all headers, I was just not very precise in what I wrote |
11:53:01 | * | konvertex joined #nim |
11:56:06 | Zevv | oh right, he's in the uk - I was thinking germany. how silly of me. |
12:00:52 | * | filcuc quit (Ping timeout: 256 seconds) |
12:02:04 | * | brainbomb quit (Quit: Leaving.) |
12:03:42 | * | liblq-dev joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:13 | alehander92 | silly dutch people! |
12:06:46 | * | supakeen joined #nim |
12:06:51 | alehander92 | sorry, i want to make a joke about dutch sounding like english by a drunk german |
12:07:05 | alehander92 | but it's probably very very cliche |
12:08:21 | Zevv | well, I know who's telling the joke, right |
12:19:29 | * | filcuc joined #nim |
12:22:54 | * | filcuc_ joined #nim |
12:24:15 | * | filcuc quit (Ping timeout: 256 seconds) |
12:35:22 | Zevv | and I can think of analogies too, about what Bulgarian sounds like to a dutchman |
12:35:31 | Zevv | but i prefer to be good friends with you instead |
12:40:19 | * | filcuc_ quit (Ping timeout: 246 seconds) |
12:40:53 | alehander92 | i want to hear it! |
12:41:25 | alehander92 | why friendship have if can have geopolitik. laugh! |
12:43:09 | shashlick | @mratsim replied to your issue on the tracker |
12:43:24 | FromDiscord | <mratsim> thanks, will have alook |
12:50:37 | * | dadada__ quit (Ping timeout: 264 seconds) |
12:52:24 | * | dadada joined #nim |
12:52:48 | * | dadada is now known as Guest61476 |
12:53:37 | * | filcuc_ joined #nim |
12:56:19 | * | nsf quit (Quit: WeeChat 2.8) |
13:17:29 | * | ftsf_ joined #nim |
13:27:22 | * | fredrikhr quit (Ping timeout: 265 seconds) |
13:47:19 | * | dddddd joined #nim |
14:00:34 | * | zacharycarter joined #nim |
14:05:07 | * | zacharycarter quit (Ping timeout: 256 seconds) |
14:11:03 | * | waleee-cl joined #nim |
14:11:18 | * | fredrikhr joined #nim |
14:14:55 | * | nsf joined #nim |
14:22:43 | * | rockcavera joined #nim |
14:25:51 | * | konvertex quit (Ping timeout: 265 seconds) |
14:38:17 | FromDiscord | <Technisha Circuit> Imagine an mc server made in Nim |
14:38:32 | Yardanico | well it's entirely possible, but it wouldn't really be popular |
14:38:38 | FromDiscord | <Technisha Circuit> Yeah ;-; |
14:38:41 | Yardanico | since everyone wants these bukkit/spigot-api compatible plugins |
14:38:47 | FromDiscord | <Technisha Circuit> True |
14:38:48 | Yardanico | e.g. see https://github.com/cuberite/cuberite |
14:38:51 | Yardanico | MC server in C++ |
14:38:55 | Yardanico | with plugins in Lua |
14:39:02 | FromDiscord | <Technisha Circuit> I wish i could make mc plugins in Nim ;-; |
14:39:12 | Yardanico | well you certainly can, jnim exists |
14:39:17 | FromDiscord | <Technisha Circuit> Oh? |
14:39:35 | FromDiscord | <Technisha Circuit> How does it work? |
14:39:35 | Yardanico | and java itself has jni anyway |
14:39:43 | Yardanico | https://github.com/yglukhov/jnim |
14:39:48 | FromDiscord | <Technisha Circuit> Do i need to write any Java myself? |
14:39:57 | Yardanico | you need to write nim-like java to wrap API stuff |
14:40:01 | Yardanico | I mean java-like nim |
14:40:30 | FromDiscord | <Technisha Circuit> Oh okay :P |
14:41:04 | FromDiscord | <Technisha Circuit> A Nim implementation in Java would be nice |
14:41:09 | FromDiscord | <Technisha Circuit> Similar to JRuby |
14:41:13 | Yardanico | nah |
14:41:15 | Yardanico | it would be really stupid |
14:41:23 | Yardanico | I mean you could make a Java backend for Nim, but why? |
14:41:43 | FromDiscord | <Technisha Circuit> ~~So people can compile stuff for MC~~ no idea |
14:41:52 | Yardanico | jnim exists as I said |
14:41:54 | * | solitudesf quit (Read error: Connection reset by peer) |
14:41:57 | FromDiscord | <Technisha Circuit> (edit) 'compile' => 'make' | 'MC~~' => 'MC in nim~~' |
14:42:09 | Yardanico | you don't need java to make MC in nim |
14:42:12 | FromDiscord | <Technisha Circuit> Yeah, I'm probably gonna try that later |
14:42:35 | FromDiscord | <Technisha Circuit> I mean mc plugins for spigot or bukkit |
14:42:41 | Yardanico | JNI also exists |
14:42:52 | Yardanico | just throw some glue in java and then the actual implementation in Nim |
14:42:56 | FromDiscord | <Technisha Circuit> O |
14:43:49 | Yardanico | (i already told you, but just as a way for people to understand you - at least use "oh" instead of "o", not everyone will understand just "o" and it's only one more letter to type :) |
14:43:50 | * | nsf quit (Quit: WeeChat 2.8) |
14:44:48 | liblq-dev | `options` seems to be a little broken on devel, it produces warnings about UnpackError being deprecated |
14:44:58 | Yardanico | well that's not "broken" :P |
14:45:01 | liblq-dev | or, well, the latest nightly |
14:45:07 | liblq-dev | Yardanico: what is it then |
14:45:11 | Yardanico | it's just that some Error are now Defect |
14:45:24 | Yardanico | and since nim is 1.x these deprecated things won't be removed for the entirety of 1.x |
14:45:45 | liblq-dev | but it's a warning in the stdlib |
14:45:48 | liblq-dev | in options.get |
14:45:52 | Yardanico | fix it then :P |
14:45:59 | Yardanico | in a backwards-compatible way |
14:46:09 | liblq-dev | easier said than done |
14:46:13 | Yardanico | exactly :D |
14:48:48 | livcd | There's enough jvm languages :P |
14:49:09 | livcd | But someone could try to implement TruffleNim |
14:56:12 | * | solitudesf joined #nim |
14:56:43 | * | ftsf_ quit (Quit: Leaving) |
14:58:06 | FromGitter | <kaushalmodi> I need a template/typeof/typedesc expert to chime in here: https://github.com/nim-lang/Nim/issues/14411 |
14:58:09 | disbot | ➥ typedesc treated differently with proc and template ; snippet at 12https://play.nim-lang.org/#ix=2n87 |
14:58:45 | FromGitter | <kaushalmodi> I am trying to help there, but I don't want to misguide the OP |
14:58:52 | * | rockcavera quit (Remote host closed the connection) |
15:05:42 | liblq-dev | Error: type mismatch: got <proc (win: Window, processEvent: sink InputProc){.locks: <unknown>.}> but expected 'proc (win: Window, processEvent: InputProc){.closure.}' |
15:05:45 | liblq-dev | what |
15:05:53 | Yardanico | {.nosinks.} |
15:05:55 | Yardanico | you need that |
15:06:00 | liblq-dev | what does it do? |
15:06:07 | liblq-dev | and why is sink the default |
15:06:08 | Yardanico | disables sink inference for a proc |
15:06:14 | Yardanico | liblq-dev: sink inference is good |
15:06:25 | Yardanico | but right now you need to add {.nosinks.} to callbacks when sink inference infers sinks in them |
15:06:35 | Yardanico | this might be addressed later via wrapper procs with a warning |
15:06:38 | liblq-dev | oh great Error: unhandled exception: 'sym' is not accessible using discriminant 'kind' of type 'TNode' [FieldDefect] |
15:06:46 | liblq-dev | internal error in the compiler |
15:06:48 | Yardanico | what nim btw? |
15:06:58 | liblq-dev | latest nightly |
15:07:06 | Yardanico | pls minimize and bug report :) |
15:07:18 | liblq-dev | same error on 1.2.0 |
15:07:23 | liblq-dev | dude if only I knew what happened |
15:07:38 | Yardanico | well you have the code |
15:07:43 | Yardanico | then you can minimize it :P |
15:08:26 | * | ftsf quit (Ping timeout: 256 seconds) |
15:18:49 | FromGitter | <bung87> I retry nimlsp today, it not eating my cpu now. |
15:23:10 | FromDiscord | <exelotl> Yardanico: I disagree, "o" is a commonly used alternative to "oh" that I use with some of my friends :P |
15:23:25 | Yardanico | well I didn't really see it here until recently |
15:23:33 | Yardanico | and before that I only saw in in telegram and only by some people |
15:23:50 | * | lritter joined #nim |
15:25:04 | FromGitter | <deech> Digging around the compiler I see there is an `opt` type. `git blame` shows it's been around for a couple of years but there's been some recent work as well. Is there any documentation on it? |
15:25:05 | FromDiscord | <exelotl> https://media.discordapp.net/attachments/371759389889003532/713774508904808498/o_rly_0.png |
15:25:12 | Yardanico | @deech opt type is gone |
15:25:19 | Yardanico | it's just some old code left in the compiler :) |
15:25:58 | FromGitter | <deech> Ah, it was updated at least as recently as April, so it's been removed since then? |
15:26:11 | Yardanico | what do you mean by "updated"? |
15:26:13 | Yardanico | where exactly? |
15:26:25 | FromDiscord | <Rika> i use o as an alternative to oh too |
15:27:09 | FromDiscord | <exelotl> wait was opt an equivalent to Option? |
15:27:32 | Yardanico | yes |
15:27:35 | Yardanico | you can read about it a bit here |
15:27:35 | Yardanico | https://nim-lang.org/araq/destructors.html |
15:27:44 | * | letto quit (Quit: Konversation terminated!) |
15:27:50 | FromGitter | <deech> Apparently this was added on April 20th: https://github.com/nim-lang/Nim/blob/devel/compiler/types.nim#L613 |
15:27:51 | Yardanico | (that blog post is from 2017 btw) |
15:28:15 | Yardanico | @deech well you can check the commit |
15:28:19 | Yardanico | and it was added to all types |
15:28:21 | Yardanico | not just tyOpt |
15:28:29 | * | letto joined #nim |
15:28:42 | FromGitter | <deech> I understand. I'm not disbelieving you. |
15:29:06 | Yardanico | maybe i'm not right, but I'm pretty sure that it's not really useful now :) |
15:29:43 | FromDiscord | <exelotl> man opt is so much more visually pleasing than Option, and wouldn't require an import. xD |
15:30:10 | Yardanico | adding stuff in the compiler is sometimes not really good :) |
15:30:28 | Yardanico | we could have async as a built-in language feature too, but having it as a module is good enough |
15:30:36 | FromGitter | <deech> A Rust-like builtin `Option` or `Result` type with chaining would be nice, due to bad type inference `map` and `flatMap` templates aren't fun to work with. |
15:31:46 | FromGitter | <deech> There are other things that could be chained but those two in particular have proven to be workhorses in other langs. |
15:33:00 | FromDiscord | <Clyybber> @exelotl You can just alias Opt to Option |
15:33:20 | FromDiscord | <Clyybber> and use --import |
15:33:24 | FromDiscord | <Clyybber> to import it globally |
15:35:16 | FromDiscord | <exelotl> wait --import is a thing??? |
15:35:21 | Yardanico | include too |
15:35:25 | Yardanico | it's all in https://nim-lang.org/docs/nimc.html :0 |
15:35:27 | FromDiscord | <exelotl> holy crap I never knew this lol |
15:35:27 | Yardanico | :) |
15:35:45 | FromDiscord | <exelotl> I've read that doc a lot of times but there's so much information in there xD |
15:36:25 | Zevv | yeah, took me a year and a bit I guess |
15:36:51 | Zevv | and still I have these "wtf!" moments every now and then. Something I've read a dozen times but just now it sinks in |
15:38:56 | FromDiscord | <Clyybber> woot |
15:39:01 | Yardanico | same goes for the manual |
15:39:02 | FromDiscord | <Clyybber> I didn't know about --include |
15:39:05 | Yardanico | XDD |
15:39:16 | Yardanico | did you know you can use type conversions as lvalue? |
15:39:39 | FromDiscord | <Clyybber> Yeah |
15:39:43 | FromDiscord | <Clyybber> Because I fixed it :p |
15:39:47 | Yardanico | xd |
15:40:03 | Yardanico | i was really surprised when I found that in the manual |
15:40:25 | Yardanico | (https://play.nim-lang.org/#ix=2n8o for interested people) |
15:41:34 | disruptek | don't spread such heresy. |
15:41:37 | Yardanico | XD |
15:41:43 | Yardanico | it's arcane knowledgfe |
15:41:45 | Yardanico | knowledge* |
15:42:03 | disruptek | some mistakes are better left buried and forgotten. |
15:49:26 | * | Guest61476 quit (Ping timeout: 258 seconds) |
15:51:38 | FromDiscord | <Rika> what the fuck |
15:51:41 | Yardanico | ? |
15:51:42 | * | dadada joined #nim |
15:51:44 | Yardanico | xd |
15:51:47 | FromDiscord | <Rika> so youre saying |
15:51:54 | FromDiscord | <Rika> i can put --import in my config |
15:51:56 | Yardanico | yes |
15:51:59 | FromDiscord | <Rika> god |
15:52:05 | * | dadada is now known as Guest74851 |
15:53:05 | FromDiscord | <exelotl> lmao |
15:55:22 | FromDiscord | <Rika> time to put `options` `strutils` `sequtils` in it |
15:56:04 | Yardanico | and then you push code which is broken |
15:56:21 | Yardanico | or you can of course add these imports in the project config |
15:56:42 | * | liblq-dev quit (Ping timeout: 272 seconds) |
15:57:11 | * | liblq-dev joined #nim |
15:58:04 | FromDiscord | <exelotl> yeah should be fine if we don't use it for libraries |
15:59:29 | FromDiscord | <Rika> thats what i mean lol it would be in proj config |
16:00:12 | Yardanico | I still prefer the more explicit version |
16:00:20 | Yardanico | at least use one file which just has "import x; export x" |
16:00:24 | Yardanico | why put in the cfg :D |
16:00:46 | FromDiscord | <Rika> so a prelude or something |
16:00:52 | Yardanico | yes |
16:02:37 | FromDiscord | <Clyybber> that you then --inlude muhahaha |
16:03:23 | FromDiscord | <Rika> lmaoooo |
16:09:04 | disruptek | moths to a flame. |
16:16:08 | * | Senketsu joined #nim |
16:33:16 | * | natrys joined #nim |
16:44:42 | * | shadwick joined #nim |
16:47:30 | livcd | Dont change the color on github omg! |
16:52:24 | FromDiscord | <Rika> im against it as well |
16:52:29 | FromDiscord | <Rika> i dont see the issue with the green |
16:52:36 | FromDiscord | <Rika> my colorblind ass thought it was grey |
16:56:42 | * | Senketsu quit (Ping timeout: 260 seconds) |
17:00:50 | Zevv | so from now on we will call it "githubbing" instead of "bikeshedding" |
17:02:20 | FromDiscord | <Rika> same thing |
17:11:50 | Yardanico | livcd: pls vote omg! we're in a democracy!111 /s |
17:17:27 | FromDiscord | <mratsim> "we"? There are countries that are not democracies. |
17:17:46 | Yardanico | i know :P |
17:18:00 | Yardanico | i mean it's all open discussion in https://github.com/github/linguist/pull/4866 |
17:18:10 | * | konvertex joined #nim |
17:20:04 | * | filcuc joined #nim |
17:23:12 | livcd | Yardanico: that sounds pointless..unless I can find 40 other people :P |
17:23:28 | * | filcuc_ quit (Ping timeout: 246 seconds) |
17:25:05 | FromGitter | <bung87> Merging can be performed automatically with 1 approving review. |
17:25:13 | Yardanico | read more carefully :) |
17:25:17 | Yardanico | they require wider community agreement |
17:25:18 | Yardanico | on a change |
17:25:21 | FromGitter | <bung87> so it just need one github stuff reviewed. |
17:25:27 | Yardanico | because that will change the nim color on the whole github |
17:25:35 | Yardanico | for all 2-3k+ nim github repos out there |
17:25:37 | FromGitter | <bung87> ok, I go ahead |
17:27:14 | * | letto quit (Ping timeout: 260 seconds) |
17:27:35 | livcd | hmm can you make a shared lib in Go for Nim? |
17:27:51 | Yardanico | if Go can export functions with C ABI, sure |
17:28:15 | Yardanico | found https://medium.com/learning-the-go-programming-language/calling-go-functions-from-other-languages-4c7d8bcc69bf |
17:28:36 | Yardanico | it shows an example of calling go from C |
17:29:47 | * | thomasross joined #nim |
17:30:57 | FromGitter | <bung87> am now using latest nimlsp version vscode extension , no multiple nimsugget eating my cpu now |
17:31:58 | Yardanico | i wanted to try to write a smol vscode extension to use nimlsp in vscode |
17:32:11 | Yardanico | guess what - in vscode you have to write a small extension even if you just want to use some language server |
17:32:22 | Yardanico | not like on other editors where you can just choose the needed executable path and stuff |
17:32:32 | Yardanico | and also considering the fact that lsp *was created* my MS |
17:33:05 | FromGitter | <bung87> ah, I write last year, then I found nimlsp also eating my cpu.. |
17:33:25 | FromGitter | <bung87> today I re check the newer nimlsp , problem is gone |
17:33:48 | FromGitter | <bung87> https://github.com/bung87/vscode-nim-extension |
17:34:01 | Yardanico | niceee |
17:34:10 | Yardanico | very great |
17:34:22 | FromGitter | <bung87> but no reason why formatting not work, not show in log, console. |
17:35:16 | FromDiscord | <Rika> oooooh i can replace the conventional `types.nim` with a `prelude.nim` that does both """universal""" imports and types |
17:35:31 | FromGitter | <bung87> in the end I found pc roared not because of the summer. |
17:49:28 | FromDiscord | <Generic> bung87: do you use Gary M's fixed nim syntax file? |
17:49:47 | FromDiscord | <Rika> its not really fixed |
17:50:08 | FromDiscord | <Rika> there's stuff that i dont think gary is aware of like anonymous procs or so |
17:50:46 | FromDiscord | <Generic> hm, ok |
17:53:17 | FromGitter | <bung87> I use these days , but it also using multiple nimsuggest. |
17:53:38 | FromGitter | <bung87> I also have a fork version, that just using one nimsuggest per project |
17:54:24 | FromDiscord | <Generic> how do you launch the extension? |
17:54:28 | FromGitter | <bung87> I just check nimlsp textDocument/format is TODO |
17:55:02 | FromDiscord | <Generic> that would need nim pretty |
17:55:11 | FromGitter | <bung87> what do you mean by "launch" ? just installed and using |
17:55:14 | Yardanico | https://i.imgur.com/ReMpBSD.png nice |
17:55:56 | FromGitter | <bung87> I guess I can create PR make nimlsp support it |
17:56:12 | Yardanico | ah nvm seems like this version is a bit broken |
17:56:14 | Yardanico | gonna try next commit |
17:56:16 | FromDiscord | <Generic> bung87: I wanted to try to run the extension in debug mode |
17:56:29 | FromDiscord | <Generic> I missed that you already published it |
17:57:03 | FromGitter | <bung87> oh that's easy, git clone, left panel click run |
17:57:11 | FromGitter | <bung87> minutes ago |
17:57:57 | Yardanico | https://i.imgur.com/DyAuofQ.png which one to pick? :D |
17:58:17 | FromGitter | <bung87> I feel better cpu fan not blowing :P |
17:58:45 | Yardanico | OH NO |
17:58:48 | Yardanico | I FOUND THE FORBIDDEN KNOWLEDGE |
17:58:51 | Yardanico | @Rika https://bugs.launchpad.net/nimrod/+bug/374441 |
17:58:57 | Yardanico | check who wrote "I cannot reproduce this bug. It works on my AMD 64 bit processor, Ubuntu 09.04 and Ubuntu 8.10." |
17:59:08 | * | audiofile joined #nim |
17:59:27 | audiofile | any interest in a nim wrapper for the launchpad pro? https://github.com/dvhdr/launchpad-pro |
17:59:35 | audiofile | I could try this with some guidance |
17:59:39 | FromDiscord | <Rika> yardanico i dont see the issue |
17:59:52 | Yardanico | @Rika 4raq nowadays uses windows and hates *nix :) |
18:00:00 | Yardanico | well, not "hates", but doesn't exactly like |
18:00:32 | FromDiscord | <Rika> til koch was in python at a point in time |
18:00:36 | Yardanico | yes ofc |
18:00:40 | Yardanico | and the compiler was in object pascal |
18:01:02 | Yardanico | ok I'll try version 0.7.10 from Jun 2009 |
18:01:12 | FromDiscord | <Rika> i assumed it was using some other language |
18:01:18 | FromGitter | <deech> `nimble build` seems to rebuild even when nothing has changed, does anyone know of a flag that disallows that? |
18:01:39 | Yardanico | oh no "rodread.pas(254,30) Error: Illegal type conversion: "LongInt" to "TNodeFlags"" |
18:02:24 | FromDiscord | <Generic> it doesn't seem to work for me |
18:02:43 | FromDiscord | <Generic> it says nimlsp 0.2.4 in the lower left corner |
18:04:52 | FromGitter | <bung87> hold on, my extension name conflicted? |
18:08:00 | FromGitter | <bung87> bung87.vscode-nim-lsp this one |
18:08:12 | Yardanico | AAAAAa I can't find any good info on casting int to set in object pascal :DD |
18:08:34 | FromDiscord | <Rika> yardanico: why are you even doing this |
18:08:42 | FromGitter | <bung87> name conflicted, I published it named same as my forck version extension |
18:08:42 | Yardanico | to try nim 0.7.10 |
18:08:46 | * | shadwick quit (Remote host closed the connection) |
18:09:36 | Yardanico | and btw |
18:09:43 | Yardanico | type conversion as lvalue seems to exist in delphi/free pascal too |
18:09:58 | Yardanico | https://stackoverflow.com/a/9554208/5476128 |
18:10:27 | dom96 | deech: that feature doesn't exist |
18:11:51 | FromGitter | <bung87> (https://files.gitter.im/nim-lang/Nim/dXQO/Screenshot-2020-05-24-at-2.10.43-AM.png) |
18:12:10 | Yardanico | yeah that's due to nimsuggest failing sometimes |
18:12:14 | Yardanico | it's a known issue in nimlsp |
18:12:25 | Yardanico | or maybe your code is actually invalid |
18:12:55 | Yardanico | @bung87 does your extension do stuff like compile & run on F5 ? |
18:13:26 | FromGitter | <bung87> cmd shift + p run selected nim file |
18:13:36 | Yardanico | well I mean in Nim extension the default keybind is F5 |
18:14:10 | Yardanico | also how do I compile it? :P |
18:14:16 | Yardanico | do I need stuff like yarn, node, something else? |
18:14:41 | Yardanico | ah nvm you already published it on https://marketplace.visualstudio.com/items?itemName=bung87.nim |
18:15:00 | FromGitter | <bung87> oh, I use mac F* default binding is light,sound ,something |
18:15:20 | FromDiscord | <dom96> Nim/Nimble/Git really behaves strangely when executed in a git post-receive hook |
18:15:45 | FromGitter | <bung87> you can simple git clone , yarn , in vscode left panel click run , in debug mode |
18:15:47 | Yardanico | wow @bung87 your extension actually works! |
18:15:49 | Yardanico | amazing |
18:16:01 | Yardanico | I'll use it I think |
18:16:04 | FromGitter | <bung87> if there's something wrong , you can easy check |
18:16:22 | FromGitter | <bung87> : P |
18:16:38 | Yardanico | because nimsuggest support in nim pragmagic's extension was failing on me hard |
18:16:46 | Yardanico | @bung87 how does your extension handle nimlsp crashes? |
18:16:52 | Yardanico | it sometimes crashes because of nimsuggest and stuff |
18:16:59 | Yardanico | does the extension automatically restart nimlsp then? |
18:17:13 | FromGitter | <bung87> nimlsp seems no that problem. |
18:17:21 | Yardanico | well it sometimes crashes still |
18:17:30 | FromGitter | <deech> dom96, but it could right? I seem to remember nim has a flag that stops unnecessary recompilation. |
18:17:33 | Yardanico | when I was using it in sublime text 3 i had crashes sometimes |
18:17:56 | FromGitter | <bung87> https://github.com/PMunch/nimlsp/issues/19 |
18:18:03 | FromGitter | <bung87> https://github.com/PMunch/nimlsp/pull/21 |
18:18:12 | FromGitter | <bung87> and I 've dig something |
18:18:18 | Yardanico | well I mean I tried latest nimlsp |
18:18:54 | Yardanico | ah nevermind F6 in your extension works as well |
18:19:00 | Yardanico | I'll report any bugs I find :P |
18:19:04 | Yardanico | pls don't abandon it |
18:19:07 | FromGitter | <bung87> if it also sometime crash , I can using #21 PR that will help |
18:19:35 | Yardanico | ok, one small thing I noticed |
18:19:38 | Yardanico | pragms are not highlighted |
18:20:25 | FromGitter | <bung87> hmm, leme check |
18:20:44 | Yardanico | oh yeah I just got my first nimlsp crash by using go to definition a lot (especially to system types) |
18:20:50 | Yardanico | but extension automatically restarted it so it's fiine |
18:20:55 | Yardanico | "[Info - 9:20:11 PM] Connection to server got closed. Server will restart." |
18:21:32 | Yardanico | using nimlsp is really better because all improvements to nimlsp benefit all editors which use it |
18:22:04 | FromGitter | <bung87> yeah , that's the idea. extension can just stay small code base. |
18:22:52 | FromGitter | <bung87> my vscode color theme show pragma blue, same as primitive type color |
18:22:58 | Yardanico | hmm, not for me |
18:23:12 | Yardanico | I installed 0.0.2 from the vscode store |
18:23:44 | FromGitter | <bung87> (https://files.gitter.im/nim-lang/Nim/d7VT/Screenshot-2020-05-24-at-2.23.32-AM.png) |
18:23:56 | Yardanico | hmm, maybe because of my theme, lemme check |
18:24:04 | FromGitter | <bung87> yeah it's 0.0.2 latest. |
18:24:14 | Yardanico | oh yeah in default it's blue, yes |
18:24:19 | Yardanico | but in monokai vibrant it's just white |
18:24:20 | Yardanico | I guess it's fine |
18:24:41 | Yardanico | I'm using https://marketplace.visualstudio.com/vscode |
18:24:45 | Yardanico | https://marketplace.visualstudio.com/items?itemName=s3gf4ult.monokai-vibrant |
18:25:31 | FromGitter | <bung87> oh I should change its display name.. |
18:26:38 | Yardanico | but yeah mostly it works just fine, thank you very much |
18:27:30 | FromGitter | <bung87> NP :P |
18:28:24 | Yardanico | https://i.imgur.com/wK2H6xv.png |
18:29:09 | FromGitter | <bung87> I'm blocked. haven't by new vpn server.. |
18:29:11 | FromGitter | <bung87> buy |
18:33:37 | FromGitter | <bung87> hmm, I found extension proxy imgur to duckduckgo, finally duckduckgo also blocked... |
18:38:00 | Yardanico | @bung87 also another small issue, idk if it's due to your extension or nimlsp - try to hover on some type but on the last letter of it |
18:38:15 | Yardanico | and the editor will highlight stuff AFTER the type |
18:38:36 | Yardanico | by hover I mean put mouse over it |
18:39:53 | Yardanico | basically it highlights the stuff based on the mouse position, not on the symbol itself |
18:43:42 | FromGitter | <bung87> that's common issue, basiclly all extension task is async , so there is time gap. |
18:43:51 | Yardanico | nonon, it's not about time |
18:44:51 | FromGitter | <bung87> you sure the vscode always show tip anchor at symbol? |
18:44:51 | Yardanico | @bung87 here I put my mouse on the last letter of "Spinner" https://i.imgur.com/pBdr7IS.png |
18:45:00 | Yardanico | see how it highlights past the "Spinner" word |
18:45:16 | FromDiscord | <Rika> *Spinny* |
18:45:22 | Yardanico | @Rika yeah it's my fork |
18:45:26 | FromGitter | <bung87> pasted it here, I am inside GFW |
18:45:27 | Yardanico | whic makes it more nimish |
18:45:37 | Yardanico | @bung87 where exactly? :D |
18:45:38 | FromDiscord | <Rika> nimlish |
18:45:41 | Yardanico | I can't paste it in irc, will try in gitter |
18:45:56 | FromGitter | <bung87> Great Fire wall |
18:46:07 | Yardanico | what image hostins can you view? |
18:46:26 | Yardanico | does http://transfer.sh/ work for you? |
18:46:29 | FromGitter | <bung87> anyother options? |
18:46:47 | FromGitter | <bung87> page open speed seems good |
18:46:49 | FromGitter | <bung87> https://transfer.sh/ |
18:47:09 | Yardanico | what about http://file.io/ ? |
18:47:32 | FromGitter | <bung87> both seems fine |
18:48:00 | Zevv | Well, after years of comping with this abhorrence of indent based syntax, I finally fixed the Nim parser. Look at my Nimv3, the sheer beauty of it! http://ix.io/2n99 |
18:48:09 | Yardanico | no |
18:48:39 | FromGitter | <bung87> OMG |
18:49:10 | FromDiscord | <Generic> please not |
18:49:17 | Yardanico | @bung87 https://file.io/xtN2P4xf - be careful, it's a one-time link only :D |
18:49:17 | Zevv | sooo much better, right! |
18:49:19 | FromDiscord | <Rika> already saw this |
18:49:37 | FromGitter | <bung87> that's old fashion... |
18:49:44 | FromDiscord | <Rika> i may have discovered syntax skins pretty late, but i knew it before you sending that! |
18:49:49 | Yardanico | @bung87 https://i.ibb.co/Cv3RxLF/2020-05-23-21-44-40-grim.png |
18:50:08 | FromGitter | <bung87> 404 some one clicked? |
18:50:15 | Yardanico | yeah try second link |
18:51:28 | FromGitter | <bung87> I see. actually I see this very often. it can also floating to my desktop |
18:51:46 | Yardanico | yeah, I mean about the fact that "r, time" is highlighted |
18:51:49 | Yardanico | instead of "Spinner" |
18:52:34 | FromGitter | <bung87> not sure how to solve this. |
18:52:46 | FromDiscord | <Generic> do you have have nimlsp installed via nimble aswell? |
18:53:05 | Yardanico | @Generic yes |
18:53:17 | FromDiscord | <Generic> it doesn't seem to work for me |
18:53:20 | FromGitter | <bung87> yeah , nimble install then it can call from cli |
18:53:22 | Yardanico | works fine here |
18:53:32 | FromDiscord | <Generic> I had to add it manually to the path |
18:53:36 | Yardanico | ah of course |
18:53:41 | FromDiscord | <Generic> otherwise it wouldn't recognise it all |
18:53:43 | Yardanico | you need to have ~/.nimble/bin in your PATH |
18:53:48 | FromDiscord | <Generic> I do have it |
18:53:54 | Yardanico | well then it should work |
18:53:56 | Yardanico | it works for me just fine ;) |
18:53:57 | FromDiscord | <Generic> I'm on windows |
18:54:01 | Yardanico | maybe you added it in the wrong PATH |
18:54:25 | FromDiscord | <Generic> I can open nimlsp from the command line, that's not the problme |
18:54:42 | FromGitter | <bung87> oh you must add it to system wide PATH variable |
18:54:42 | Yardanico | well cmdline sometimes doesn't have the same PATH as applications |
18:55:07 | FromDiscord | <Generic> nimlsp is recognised by the extension |
18:55:09 | FromGitter | <bung87> that's common issue |
18:55:27 | FromDiscord | <Generic> it just fails doesn't give intellisense |
18:55:33 | FromDiscord | <Generic> and instead says loading |
18:56:19 | FromGitter | <bung87> you using vscode-nim just fine? |
18:56:53 | FromDiscord | <Generic> yes |
18:57:52 | FromGitter | <bung87> oh, that's may cause from my side, thought I got a improved version function to get bin path , https://github.com/bung87/vscode-nim-extension/blob/master/src/extensionUtils.ts |
19:04:26 | * | brainbomb joined #nim |
19:09:57 | livcd | Zevv: it looks good :P |
19:10:36 | Zevv | Great stuff, right?! I'm planning to sell my PR to Araq. Or just the highest bidder I guess. This will fly! |
19:11:27 | livcd | you have my vote! |
19:11:32 | Yardanico | wait |
19:11:41 | FromGitter | <bung87> if it accept it would be a optional compile flag? |
19:11:45 | Yardanico | if you add pragmas to the forward decl you don't have to add them to the actual implementation?! dafaq |
19:11:48 | Zevv | wait, and there's more! It stil parses old fashioned 2020 nim as well! |
19:11:54 | Yardanico | @bung87 it's just a joke, syntax skins were there already :) |
19:11:56 | Yardanico | but they were removed |
19:12:11 | FromDiscord | <Elegant Beef> I'll give you a snickers wrapper and a handful of pocket lint |
19:12:12 | FromDiscord | <Rika> pretty sad imo |
19:12:13 | FromGitter | <bung87> ok :P |
19:12:26 | FromDiscord | <Rika> but i can see why they were removed |
19:20:20 | * | Trustable quit (Remote host closed the connection) |
19:22:44 | * | chemist69 quit (Remote host closed the connection) |
19:23:08 | * | chemist69 joined #nim |
19:27:28 | * | Senketsu joined #nim |
19:31:13 | FromGitter | <bung87> @Yardanico ah ,I realize you mean the word hightlight not the tooltip |
19:31:23 | Yardanico | yes |
19:32:24 | FromGitter | <bung87> that's not common issue now.. |
19:32:55 | FromGitter | <bung87> not a hard task for extension. |
19:35:19 | FromGitter | <bung87> @Generic I publish 0.0.6 just using pragmic's getBin see if it works. |
19:36:23 | FromGitter | <bung87> I know some extension also check the registry sheet on windows. |
19:40:47 | * | zacharycarter joined #nim |
19:41:17 | FromDiscord | <Generic> have you uploaded it already? |
19:41:55 | Yardanico | @Generic vscode-nim-lsp |
19:42:05 | Yardanico | that's the extension name |
19:42:12 | Yardanico | bung87.vscode-nim-lsp full vscode name |
19:43:30 | FromDiscord | <Generic> that's confusing |
19:44:54 | FromDiscord | <Generic> it still doesn't work |
19:45:33 | FromDiscord | <Generic> it recognises nimlsp |
19:45:53 | FromDiscord | <Generic> but it doesn't give any intellisense |
19:51:21 | FromGitter | <bung87> hmm no idea, you can got nimlsp and version then it can found the exe, that's all need. if you feel free may run it in debug see what's wrong with it. |
19:54:20 | FromGitter | <bung87> I just fixed a bug that I may append .exe to path mulitple times. that maybe the problem. |
19:54:45 | FromGitter | <bung87> @0.0.7 |
19:55:16 | * | idf joined #nim |
19:57:39 | * | Guest74851 is now known as dadada |
19:58:09 | FromDiscord | <Generic> it still doesn't seem to work |
19:58:18 | dadada | hmm, unexpectedly kate (kde's editor) has pretty good support for Nim, also Vim modal keys (although the support is basic) |
19:58:27 | dadada | compared to my expectancy |
19:58:55 | dadada | kate is actually an awesome editor all in all, it always never gets a mention, that's why I'm doing it |
19:59:54 | FromGitter | <bung87> ok, then I may open my windows pc later, when it's ok I'll let you know |
19:59:54 | * | idf is now known as idf31 |
20:00:29 | FromDiscord | <Generic> great, thank you |
20:07:39 | * | zacharycarter quit (Ping timeout: 256 seconds) |
20:11:24 | * | filcuc quit (Remote host closed the connection) |
20:11:58 | * | filcuc joined #nim |
20:18:30 | * | filcuc quit (Ping timeout: 260 seconds) |
20:27:41 | FromGitter | <Clyybber> @timotheecour ping pong |
20:28:07 | Yardanico | wow gitter |
20:28:25 | FromGitter | <Clyybber> haha :0 |
20:36:11 | * | letto joined #nim |
20:37:47 | * | Senketsu quit (Ping timeout: 260 seconds) |
20:38:04 | * | brainbomb1 joined #nim |
20:39:28 | * | brainbomb quit (Ping timeout: 265 seconds) |
20:51:48 | FromDiscord | <dom96> bah, Firefox's touch emulation is crap |
20:56:06 | alehander92 | hmmm |
21:02:58 | * | zacharycarter joined #nim |
21:08:12 | * | zacharycarter quit (Ping timeout: 256 seconds) |
21:24:28 | * | FromGitter quit (Remote host closed the connection) |
21:25:24 | * | oprypin quit (Quit: No Ping reply in 210 seconds.) |
21:28:18 | * | oprypin joined #nim |
21:28:31 | * | FromGitter joined #nim |
21:29:16 | * | zacharycarter joined #nim |
21:35:55 | dadada | nimlsp also works with kate btw. but it's far from great |
21:36:30 | dadada | I don't think it's nimlsp's fault, the lsp support in kate is relatively new, don't know how good that is |
21:43:29 | * | brainbomb1 quit (Quit: Leaving.) |
21:56:31 | * | NimBot joined #nim |
21:57:14 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:59:18 | * | neceve quit (Ping timeout: 260 seconds) |
22:01:23 | * | natrys quit (Quit: natrys) |
22:05:16 | * | FromGitter quit (Remote host closed the connection) |
22:06:49 | * | Senketsu joined #nim |
22:08:45 | * | FromGitter joined #nim |
22:09:01 | * | oprypin quit (Quit: No Ping reply in 180 seconds.) |
22:10:16 | * | oprypin joined #nim |
22:10:25 | * | liblq-dev quit (Ping timeout: 264 seconds) |
22:11:46 | * | liblq-dev joined #nim |
22:14:37 | * | Senketsu quit (Ping timeout: 260 seconds) |
22:24:18 | * | liblq-dev quit (Quit: WeeChat 2.8) |
22:24:33 | FromGitter | <bung87> https://github.com/qt-creator/qt-creator/blob/a5044727900b3db78746ae17f72d20da1fd3a8ca/src/plugins/nim/editor/nimcompletionassistprovider.cpp |
22:24:46 | FromGitter | <bung87> the qt-creator using nim for what purpose? |
22:24:51 | Yardanico | yeah qt creator has nim support for years |
22:25:17 | FromGitter | <bung87> write in nim ? |
22:25:25 | FromGitter | <bung87> gui |
22:25:47 | Yardanico | no |
22:25:50 | Yardanico | Qt Creator is an IDE |
22:25:54 | Yardanico | not limited to Qt |
22:26:03 | Yardanico | but in nim you have nimqml, no qt bindings though |
22:26:51 | FromGitter | <bung87> so they using nim write ide plugin? |
22:26:56 | Yardanico | no? |
22:27:02 | FromDiscord | <exelotl> I wish Qt development didn't require me to have like a billion gigabytes of free space on my hard drive |
22:27:02 | Yardanico | someone just contributed nim support for qt creator |
22:28:23 | dadada | nimsuggest is using entirely too much cpu... and keeps running when the applications that have triggered it, are long gone, ... |
22:28:31 | Yardanico | so use nimlsp ;) |
22:29:11 | FromGitter | <bung87> oh , I got it, ide support nim language. |
22:29:11 | dadada | Yardanico: it is based on nimsuggest |
22:29:15 | Yardanico | dadada: it is |
22:29:26 | dadada | Yardanico: how is that helpful then? |
22:29:30 | Yardanico | it is |
22:29:32 | Yardanico | nimlsp wouldn't hang |
22:29:48 | FromGitter | <bung87> just crash |
22:30:13 | FromGitter | <bung87> nimlsp using one process |
22:30:52 | FromGitter | <bung87> I always see about 4 nimsuggest process |
22:31:03 | FromGitter | <bung87> eating my cpu |
22:33:55 | * | exelotl joined #nim |
22:36:29 | * | opal quit (Remote host closed the connection) |
22:39:14 | * | opal joined #nim |
22:40:13 | * | sz0 quit (Quit: Connection closed for inactivity) |
22:42:34 | * | fredrikhr quit (Remote host closed the connection) |
22:42:58 | * | fredrikhr joined #nim |
23:10:44 | FromDiscord | <Technisha Circuit> How would i get the full url path with Jester in Nim |
23:10:46 | FromDiscord | <Technisha Circuit> ? |
23:17:43 | FromDiscord | <exelotl> req.getNativeReq().url ? |
23:21:07 | FromDiscord | <Technisha Circuit> Thanks! |
23:21:38 | FromDiscord | <exelotl> np :) |
23:23:28 | FromDiscord | <Technisha Circuit> Do i need to import anything else from jester? Because i can't use it for some reason ;-; |
23:26:17 | FromDiscord | <exelotl> oh, you probably have to import asynchttpserver or httpbeast |
23:26:30 | zedeus | nah |
23:27:19 | FromDiscord | <exelotl> hm, and/or the uri module? |
23:28:25 | zedeus | for nitter I do something like `parseUri(request.path) ? toSeq(request.params.pairs())` |
23:28:50 | zedeus | if you dont care about parameters request.path is enough |
23:42:00 | * | dadada quit (Ping timeout: 256 seconds) |
23:49:48 | * | idf31 quit (Ping timeout: 272 seconds) |
23:52:39 | * | dadada joined #nim |
23:53:02 | * | dadada is now known as Guest8810 |
23:53:11 | * | krux02_ joined #nim |
23:56:07 | * | krux02 quit (Ping timeout: 260 seconds) |
23:58:53 | * | Senketsu joined #nim |
23:59:11 | FromDiscord | <Synth> Hello, I'm trying to reset a int value of a var outside of a for loop scope. However, it seems to not work as expected for some reason... is anyone able to help me? |