<< 23-05-2020 >>

00:00:06FromDiscord<Yardanico> Nah
00:00:13FromDiscord<Yardanico> Use arc and locks
00:00:31FromDiscord<Elegant Beef> But channels seem cooler
00:00:47FromDiscord<Yardanico> They're not really efficient XD
00:00:55FromDiscord<Yardanico> And you can't mutate global state with then anyway
00:01:19FromDiscord<Yardanico> So you'll have to pass the same thing all over the place copying it each time
00:01:58FromDiscord<Elegant Beef> Psh i have 8 threads, gotta abuse them all
00:02:41FromDiscord<Elegant Beef> They'll learn to show me the respect i deserve
00:04:25FromDiscord<exelotl> it would be nice if we had some language feature that could prevent me from making that lock mistake
00:07:02FromDiscord<Yardanico> Well I guess it could be possible with DFA and stuff
00:07:17FromDiscord<Yardanico> With arc you already can do stuff like automatically close sockets or files
00:07:34FromDiscord<Yardanico> It'll be in stdlib too
00:19:11*ftsf joined #nim
00:22:49*zacharycarter joined #nim
00:26:10FromDiscord<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:17FromDiscord<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:51FromGitter<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:07FromDiscord<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:55FromDiscord<Elegant Beef> What do you mean load files dynamically and register them?
01:40:02FromDiscord<Elegant Beef> Nim can load files dynamically
01:41:30*nphg1 joined #nim
01:44:03*zacharycarter joined #nim
01:44:28FromDiscord<Technisha Circuit> I want be able to make use of those files
01:44:32FromDiscord<Technisha Circuit> And i mean imports
01:44:46*nphg quit (Ping timeout: 246 seconds)
01:46:29FromDiscord<Technisha Circuit> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/713568491160076320
01:46:40FromDiscord<Elegant Beef> You could use a macro for that, assuming compile time is fine
01:47:17FromDiscord<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:25FromDiscord<Technisha Circuit> Oh?
01:47:32FromDiscord<Technisha Circuit> Compile time is fine for this
01:47:39FromDiscord<Elegant Beef> Then use a macro
01:47:41FromDiscord<Technisha Circuit> But how exactly would it be done?
01:47:47FromDiscord<Elegant Beef> or a template
01:47:48FromDiscord<Technisha Circuit> Lemme search it
01:48:07FromDiscord<Elegant Beef> https://github.com/beef331/nico-helper/blob/master/src/levelmanager.nim
01:48:23FromDiscord<Elegant Beef> This is the way i've automated adding levels for nico
01:48:28FromDiscord<Technisha Circuit> Oh okay
01:48:43FromDiscord<Elegant Beef> It imports all files inside a subdir and when those compile they subscribe to a dictionary
01:48:57FromDiscord<Elegant Beef> Import levels is the automated import that's hardcoded cause i couldnt be arsed
01:49:06FromDiscord<Elegant Beef> And add level is the way levels add
01:49:26FromDiscord<Technisha Circuit> Oh that seems simple
01:49:42FromDiscord<Elegant Beef> Then in a level i do `addLevel(gsMenu, getLevel)`
01:50:06FromDiscord<Elegant Beef> and just like that it subscribes the get level of that level to the enum i listed
01:50:12FromDiscord<Elegant Beef> So it's rather quick to add to
01:50:30FromDiscord<Technisha Circuit> sent a code paste, see http://ix.io/2n4w
01:51:14FromDiscord<Elegant Beef> That's the ast for importing all files inside the levels dir
01:51:36FromDiscord<Elegant Beef> Basically i just used dumptree to see what it looked like then copied it with some automation
01:51:47FromDiscord<Elegant Beef> I dont know if that's even closed to being nice/proper looking macro code
01:51:50FromDiscord<Elegant Beef> I know it works 😄
01:52:06FromDiscord<Technisha Circuit> Oh okay
01:52:09FromDiscord<Technisha Circuit> Nice
01:53:00FromDiscord<Technisha Circuit> If i use the macro, does it return only one module?
01:53:08FromDiscord<Elegant Beef> That one adds all the modules inside the level
01:53:12FromDiscord<Elegant Beef> (edit) 'level' => 'levels dir'
01:53:28FromDiscord<Elegant Beef> assuming it's used in the main dir
01:53:47FromDiscord<Technisha Circuit> Oh okay
01:54:06FromDiscord<Technisha Circuit> This is kinda confusing imo ;-;
01:54:28FromDiscord<Elegant Beef> use dumptree
01:54:35FromDiscord<Elegant Beef> you'll learn quickly what it needs to look like
01:54:38FromDiscord<Elegant Beef> atleast it's how i do it
01:54:43FromDiscord<Technisha Circuit> Okay :p
01:55:21FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2n4G something like this
01:55:35FromDiscord<Technisha Circuit> Oh okay, thanks :p
01:58:28FromDiscord<Technisha Circuit> I'm wondering
01:59:52FromDiscord<Elegant Beef> you are
02:01:33FromDiscord<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:15FromDiscord<Elegant Beef> the dumptree just produces a stringified AST
02:02:33FromDiscord<Elegant Beef> Dumptree basically lets you write out a functiona equivlent that you'd want to make with a macro
02:02:44FromDiscord<Elegant Beef> Again atleast that's what i've been doing and how i've approached macros
02:03:34FromDiscord<Technisha Circuit> Oh okay
02:03:42*zacharycarter quit (Ping timeout: 260 seconds)
02:08:32*thomasross joined #nim
02:18:48FromDiscord<Technisha Circuit> sent a code paste, see http://ix.io/2n4L
02:21:41FromDiscord<Elegant Beef> https://nim-lang.org/docs/tut3.html
02:27:26FromDiscord<Zed> does nim support string interpolation?
02:27:41FromDiscord<Zed> because looking through the array mancer example i found this line
02:27:51FromDiscord<Zed> `echo &"Epoch {t}: loss {loss.value[0]}"`
02:28:09FromDiscord<Elegant Beef> strformat module
02:28:43FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2n4O
02:28:49FromDiscord<Zed> ill check that out, looks alot cleaner then ""&""&""
02:28:59FromDiscord<Elegant Beef> yea it is
02:35:08*muffindrake quit (Ping timeout: 260 seconds)
02:37:17*muffindrake joined #nim
02:40:18FromDiscord<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:29FromDiscord<Zed> can nim bind with python libraries?
03:22:43FromDiscord<Zed> i cant find anything about this in the docs
03:24:43FromDiscord<Zed> actually i just found nimpy, ill see if that works
03:28:45FromDiscord<Technisha Circuit> Nimpy is useful
03:28:54FromDiscord<Technisha Circuit> But there are libraries that won't work with it
03:29:24FromDiscord<Zed> well that's a bummer
03:29:41FromDiscord<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:25leorizeif C bindings work, nimpy will :P
03:49:06*Senketsu joined #nim
03:49:47FromDiscord<Rika> good morning
03:49:51*aeverr joined #nim
03:50:15FromDiscord<Zed> morning
04:02:06FromDiscord<Technisha Circuit> If i have some JSON data in Nim, am i able to do `if "a" in jsonData:`?
04:02:19FromDiscord<Technisha Circuit> So it checks the keys if a is a valid key
04:03:37FromDiscord<Technisha Circuit> Nvm
04:03:57FromDiscord<Technisha Circuit> I found out that `JsonNode` types have the `{}` operator
04:04:03FromDiscord<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:08FromDiscord<j$> is their documentation on when to use templates over procedures, or should I just know?
04:11:28FromDiscord<j$> there*
04:11:39FromDiscord<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:45leorizethe rule is to use the simplest thing
04:11:54leorizeuse the more powerful stuff as you need it
04:12:09*dadada joined #nim
04:12:22leorize@Technisha Circuit: mandatory locking only exists on windows
04:12:33*dadada is now known as Guest51477
04:12:36leorizeand you should never rely on them anyway :P
04:12:36FromDiscord<Technisha Circuit> Wdym?
04:12:40FromDiscord<Technisha Circuit> Oh
04:12:54FromDiscord<Technisha Circuit> So how would i lock a file if it's being read then?
04:13:15FromDiscord<Rika> manually i assue
04:13:17FromDiscord<Rika> (edit) 'assue' => 'assume'
04:13:35leorizewe don't have any cross platform interface for this
04:13:51leorizebut what are you trying to achieve with file locks?
04:14:02FromDiscord<Elegant Beef> You read it and cross your fingers and hope it doesnt get corrupted by a write
04:14:12leorizeI must warn you that file locks are complicated
04:14:28leorizebecause for most os out there, file locks are advisory
04:14:56leorizemeaning that only users of the lock respect it
04:15:04leorizea random process can rewrite the file ignoring the lock
04:16:25FromDiscord<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:55FromDiscord<Technisha Circuit> It's for a web server
04:19:07FromDiscord<Technisha Circuit> And the site I'm making is for a fairly big community
04:19:15leorizethen it sounds like you don't need file locking
04:19:25FromDiscord<Technisha Circuit> And I don't want any of the html files getting corrupted
04:19:27FromDiscord<Technisha Circuit> Oh?
04:19:42leorizeif you don't want them to be corrupted, don't write to them :P
04:19:48FromDiscord<Technisha Circuit> Oh okay :p
04:19:53FromDiscord<Technisha Circuit> Thanks!
04:19:58leorizefile locks are meaningless unless all processes are cooperative
04:20:17FromDiscord<Rika> many porcesses reading doesnt corrupt a file afaik
04:20:20FromDiscord<Technisha Circuit> So can multiple applications read a single file at once?
04:20:27leorizeyes?
04:20:33FromDiscord<Elegant Beef> Why wouldnt they
04:20:35leorizeunless you're on windows, that os is terrible
04:20:38FromDiscord<Technisha Circuit> Oh
04:20:48FromDiscord<Technisha Circuit> I thought that would lead to corruption
04:20:52FromDiscord<Technisha Circuit> (Linux ftw)
04:20:59FromDiscord<Elegant Beef> Well doesnt windows make files loaded all shared memory?
04:21:05FromDiscord<Elegant Beef> Or is it just .exes
04:21:12leorizeTechnisha why would it lol
04:21:26leorize@Beef: just dlls
04:21:27FromDiscord<Technisha Circuit> No idea ¯\\_(ツ)\_/¯
04:21:43leorizewindows enforce mandatory locking by default, despite it being stupid :P
04:21:45FromDiscord<Technisha Circuit> Also, what flags do i need to compile a jester app with?
04:21:54FromDiscord<Technisha Circuit> > windows enforce mandatory locking by default, despite it being stupid :P↵O
04:21:55leorize-d:release :p
04:22:02FromDiscord<Rika> if it needed any, they would tell you iun the readme
04:22:03FromDiscord<Technisha Circuit> Thanks :p
04:22:04FromDiscord<Rika> (edit) 'iun' => 'in'
04:22:39FromDiscord<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:22leorizewhat os are you on?
04:23:31leorizeoh, android
04:23:38FromDiscord<Technisha Circuit> :p
04:23:44leorizego on a proper desktop
04:23:48FromDiscord<Rika> lmaoooo
04:23:48FromDiscord<Technisha Circuit> I can't
04:23:54FromDiscord<Technisha Circuit> That's why I'm using my phone
04:23:56FromDiscord<Technisha Circuit> ;-;
04:23:59leorizethen you can't develop :P
04:24:06leorizewell you can if you try
04:24:09FromDiscord<Technisha Circuit> I used to develop on my phone
04:24:22FromDiscord<Technisha Circuit> That's how I learnt to code :p
04:24:34leorizepass -d:useStdlib
04:24:44leorizethat should force jester to use asynchttpserver
04:24:56FromDiscord<Technisha Circuit> Oh okay
04:24:58FromDiscord<Technisha Circuit> Thanks :p
04:25:19FromDiscord<Rika> i wonder whats missing on android that prevents it from running httpbeast
04:25:29FromDiscord<Technisha Circuit> It works now! Thanks!
04:25:42leorizeprobably the epoll setup is not finalized there
04:26:50*lritter quit (Quit: Leaving)
04:28:22*shadwick joined #nim
04:30:28FromDiscord<Technisha Circuit> I have an issue now with my code ;-;
04:30:43FromDiscord<Technisha Circuit> sent a code paste, see http://ix.io/2n5a
04:30:53FromDiscord<Technisha Circuit> And I have no idea why
04:31:02*Prestige quit (Quit: Prestige)
04:31:13leorize.getStr
04:31:21*Prestige joined #nim
04:31:29FromDiscord<Technisha Circuit> Oh
04:31:34FromDiscord<Technisha Circuit> Thanks :p
04:31:47shadwickHi 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:56leorizeyou're doing an admirable amount of code golfing
04:32:21FromDiscord<Elegant Beef> Code golfing?
04:32:26leorizeshadwick: that looks weird, can you post a snippet on the playground
04:32:29FromDiscord<j$> `golfing`
04:32:51leorize@Beef: read: trying to write short code
04:33:28shadwickleorize: sure thing, lemme make a minimum example
04:33:39shadwick( just FYI it's this line: https://github.com/nim-lang/Nim/blob/version-1-2/lib/impure/re.nim#L93 )
04:34:54shadwickleorize: https://play.nim-lang.org/#ix=2n5b
04:34:54leorizelet me guess, you put a `re"string"` in a const?
04:35:02shadwickohhh ok, yes, I did hahah
04:35:15leorizespot on :P
04:35:23leorizewell you can't :P
04:35:38leorizeuse nim-regex
04:35:43leorizeor use `let` :P
04:35:48shadwickwell 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:04shadwicknice guess
04:37:55shadwickwow, literally the same second haha 👍
04:37:59leorizeyea, no one really bothered to document it afaict
04:38:30leorizeusually they would just tell you to use nim-regex, which is native :P
04:38:43leorizethen you can do `const`
04:39:08leorizethough personally not a fan of regex, npeg spoiled me
04:39:11FromDiscord<Technisha Circuit> Anyone able to help me with this code? https://hastebin.com/soqujebobi.nim
04:39:17FromDiscord<Technisha Circuit> I keep getting a 404 error
04:39:41leorizethe `?`
04:39:42FromDiscord<Technisha Circuit> Nvm
04:39:47FromDiscord<Technisha Circuit> I figured out the issue
04:40:03leorizehow are you even doing this on a phone? samsung dex?
04:40:07FromDiscord<Technisha Circuit> That was in the docs wasn't it?
04:40:08FromDiscord<Technisha Circuit> Nope
04:40:20FromDiscord<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:00leorizeoh lol
04:41:07FromDiscord<Technisha Circuit> Also, the `?@path` thing was in the docs
04:41:20FromDiscord<Technisha Circuit> Termux is basically a full linux terminal on android
04:41:31FromDiscord<Technisha Circuit> Works on non-rooted devices too
04:41:52*kungtotte quit (Read error: Connection reset by peer)
04:41:52leorizeyea I know
04:41:53FromDiscord<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:57FromDiscord<Technisha Circuit> O
04:41:59*kungtotte_ joined #nim
04:42:01leorizeI just can't bear working on it :P
04:42:09leorizelast time I checked nim.nvim work there
04:42:11FromDiscord<Technisha Circuit> I'm still having an issue with my code
04:42:13*dadada__ joined #nim
04:42:16FromDiscord<Technisha Circuit> Nim.nvim?
04:42:29leorizehttps://github.com/alaviss/nim.nvim
04:44:22FromDiscord<Technisha Circuit> O
04:44:26FromDiscord<Technisha Circuit> I just use nano
04:44:36FromDiscord<Technisha Circuit> And i got the nano syntax highlighting for nim
04:44:46FromDiscord<Technisha Circuit> It's basic but it works
04:45:45shadwicknim.nvim -> not even .elisp, sheesh 🙃
04:46:20leorizeswitch over to the dark side
04:46:31FromDiscord<Technisha Circuit> Nah
04:46:34shadwickI 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:53FromDiscord<Technisha Circuit> Ooof
04:46:59FromDiscord<Technisha Circuit> I use my built-in keyboard
04:47:24shadwickWell the fact that you have more than 50 chars there is impressive
04:47:26shadwickNice
04:47:32FromDiscord<Technisha Circuit> It's probably because you first started programming on a PC while i started on a mobile
04:47:35FromDiscord<Technisha Circuit> Hahaha
04:47:47FromDiscord<Technisha Circuit> I have some bigger programs too
04:48:32FromDiscord<Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/713614315021926460/Screenshot_20200523_054818_com.termux.jpg
04:48:34FromDiscord<Technisha Circuit> Still going
04:49:37shadwickWtf
04:50:03shadwickLearning negative numbers and subtraction?...
04:50:15shadwickPlease don't tell me you typed all that on a mobile device...
04:52:25*rockcavera quit (Remote host closed the connection)
04:52:44FromDiscord<Rika> nah its prolly that "my first calculator" project on github
04:53:08FromDiscord<Rika> also i'm even more spoiled than some of you, i cant bear using my laptop to code 😛
04:53:50leorizethen I expect that you can write really fast? :P
04:57:16shadwickyeah, I need to be able to constantly write and then delete and rewrite my code like 100 times
05:01:58leorizejnim is looking promising
05:02:17leorizeI wonder when will there be enough tooling to write an entire android app with nim
05:02:31FromDiscord<Technisha Circuit> Hahahaha
05:02:51FromDiscord<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:38disruptekwhat's the deal with default gc and the abi error on lock deinit?
05:30:00disruptekbad `abi` field. how does this stuff pass ci?
05:30:17disruptekworks fine under arc.
05:30:23leorizebecause no one tested it?
05:30:36disruptekweird.
05:31:42disrupteki guess i can file an issue.
05:33:57disruptekoh, 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:32FromDiscord<Technisha Circuit> Can someone help me with this? https://hastebin.com/soqujebobi.nim
06:17:55FromDiscord<Technisha Circuit> In the docs it said i could do `?@path` but i keep getting a 404 error
06:20:30leorizemaybe you should not abuse `?` for this?
06:21:14leorizeooooh
06:21:35leorize`/?@path` means that the `/` is optional
06:21:55leorizebut really, don't abuse `?` to do routing
06:22:50FromDiscord<Technisha Circuit> I need to use `?` ;-;
06:22:54leorizewhy?
06:23:15FromDiscord<Technisha Circuit> My friend wants to use a json file for adding pages to the path
06:23:22leorizeso?
06:23:39FromDiscord<Technisha Circuit> How else would i do it without `?`?
06:24:05leorizeuhmmm do you know what `?` means?
06:24:43leorizealso I need a quick explaination of how this "use a json file for adding pages" work
06:25:04FromDiscord<Technisha Circuit> I mean adding pages for adding routes
06:25:12leorize?
06:25:25leorizeI need an example please
06:25:51FromDiscord<Technisha Circuit> So i can do ```json↵{↵ "a":"html/a.html"↵}```then `a` will be a valid route that can be viewed
06:26:12leorizeuse a post request for that
06:26:46leorizeyou'd want a post request since this modifies the server state
06:27:09FromDiscord<Technisha Circuit> ?
06:27:10leorizeif you use get certain prefetcher might query the api rapidly
06:27:14FromDiscord<Technisha Circuit> That's in a json file
06:28:00leorizeuhhh I still don't get what you're trying to do
06:28:08leorizeexample of how a client would query the server please
06:28:45FromDiscord<Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/713639536080584725/Screenshot_20200523_072837_com.termux.jpg
06:29:01FromDiscord<Technisha Circuit> Paths.json contains the path and what file it should read
06:29:35FromDiscord<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:55leorizeremove the `?`
06:30:03leorizethere, problem solved :P
06:30:23FromDiscord<Elegant Beef> I still cant believe anyone codes using a touch screen
06:30:52leorizealso for page not found, you can use `pass` to tell jester to ignore the route
06:32:49shadwickI'm both disgusted and awed that you're programming on a phone, with a Comic Sans keyboard no less...
06:33:22leorizeI don't think that's comic sans
06:33:32leorizethough I can see that someone likes ubuntu mono
06:34:36FromDiscord<Elegant Beef> That is certainly comic sans on the keyboard https://media.discordapp.net/attachments/371759389889003532/713641011024494622/unknown.png
06:35:04FromDiscord<Technisha Circuit> Okay then :P
06:35:05FromDiscord<Technisha Circuit> Hahaha
06:35:20FromDiscord<Technisha Circuit> It's comic sans where possible, but termux uses ubuntu mono
06:35:42FromDiscord<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:17planetis[m]ignorant question: wasn't std/threadpool buggy and was supposed to be replaced with https://github.com/yglukhov/threadpools ? what happened?
06:47:58shadwickTechnisha Circuit: stop it. you're making me feel like an old bastard
06:50:14shadwickand here I'm on IRC instead of Discord. brb... gotta switch
06:51:50planetis[m]and is weave a replacement for both?
06:54:12planetis[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:11planetis[m]I could just use createThread + joinThread but isn't this supposed to be slower that a threadpool?
06:59:15FromDiscord<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:11FromDiscord<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:17FromDiscord<Technisha Circuit> ~~;-;~~
07:13:25FromDiscord<Rika> ask yardy
07:13:25FromDiscord<Technisha Circuit> Oh! I actually have a decent idea!
07:13:41FromDiscord<Technisha Circuit> Why not make a starboard bot in Nim and use it in this server!
07:16:00FromDiscord<Rika> why
07:16:51*martinium quit (Quit: Leaving)
07:21:07FromDiscord<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:20FromDiscord<Rika> is it really needed for a serious discord like this
07:21:25FromDiscord<Technisha Circuit> ~~Also it'd be useful to remind someone of something embarrassing~~
07:21:50FromDiscord<Technisha Circuit> Ik plenty of serious discord's with bots like this, but no, it's not really needed ;-;
07:26:23FromDiscord<Elegant Beef> Im here, it clearly cant take itself that seriously
07:26:45Prestige@Elegant Beef I have multihead working now :D
07:26:46shadwickI would only be OK with it if it were typed on a Samsung S10
07:29:39FromDiscord<Elegant Beef> Grats
07:29:53FromDiscord<Elegant Beef> Using xrandr through a command i assume?
07:30:15Prestigexinerama, was much simpler than xrandr
07:30:49FromDiscord<Elegant Beef> I actually just installed a new distro like and hour ago 😄
07:31:34FromDiscord<Elegant Beef> So no more need for a new WM
07:31:40PrestigeLol oh rip
07:32:41FromDiscord<Elegant Beef> I mean really it's just an ubuntu derivative that has i3wm setup OOTB
07:33:06FromDiscord<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:25FromDiscord<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:41FromDiscord<Lantos> I've also tried ``nimble install https://github.com/nim-lang/sdl2``
07:59:28FromDiscord<Lantos> is this the release being pulled and doesn't match with master brance?
07:59:32FromDiscord<Lantos> (edit) 'brance?' => 'branch?'
08:01:00FromDiscord<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:20FromDiscord<mratsim> @planetis yes yglukhov threadpool are still supposed to replace the stdlib threadpools.
08:22:53FromDiscord<mratsim> Weave is threadpool + loadbalancer + parallel for + managing parallel producer-consumer dependencies
08:23:42FromDiscord<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:14FromDiscord<mratsim> but I don't tthink we should have something so big and complex in the standard lib
08:25:34FromDiscord<mratsim> Regarding your architecture, you can model that as FlowEvent: https://github.com/mratsim/weave#delayed-computation-with-single-dependencies
08:27:18FromDiscord<mratsim> FlowEvent are a handle and you can use the new "runInBackground(Weave)" + "submitOnEvents(HasTransform2d, HasMove, HasControlBall, HasShake, sysControlBall(myParam))"
08:27:43FromDiscord<mratsim> to launch a sysControlBall computation when all the events are triggered
08:29:00FromDiscord<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:44FromDiscord<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:11PrestigeJust finished up multihead support for nimdow and pushed a release
08:49:59planetis[m]mratsim: thanks, i will try it
08:50:58*Trustable joined #nim
08:51:25FromDiscord<mratsim> you have some details on Weave as a background service here: https://github.com/mratsim/weave#foreign-thread--background-service-experimental
08:52:17FromDiscord<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:32planetis[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:27FromDiscord<mratsim> you need a setupSubmitterThread(Weave) and waitUntilReady(Weave) in all threads that submit jobs
09:18:58FromDiscord<mratsim> I'll have to cook up a tiny example of this
09:22:41FromDiscord<mratsim> unless the jobs create new jobs recursively, the load will be better distributed if you use the FlowEvent system
09:23:01FromDiscord<mratsim> because during waitFor the main threads doesn't do anything
09:23:37planetis[m]so avoid waitfor, i see thanks
09:24:01FromDiscord<mratsim> also does handleInput/controlBall and controlBrick mutate self"?
09:24:20FromDiscord<mratsim> because if they do you will have concurrency bugs since they are scheduled at the same time
09:24:37FromDiscord<mratsim> unless they work on different fields
09:25:04FromDiscord<mratsim> you will need to pass self.addr probably as well or you will have a "cannot capture self"
09:25:37FromDiscord<mratsim> I'm not a game specialist but I think the input should be handled by async
09:25:47FromDiscord<mratsim> and the rendering by Weave
09:25:54planetis[m]yes they work in different fields, here is source https://github.com/b3liever/breakout-ecs/blob/master/systems/transform2d.nim
09:26:00FromDiscord<mratsim> since that's the most expensive part while input is the most interactive part
09:27:20planetis[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:45FromDiscord<mratsim> oh it can, but the questions is what to thread and what to async :p
09:28:07FromDiscord<mratsim> fwi this is the thread for suggesting things to use Weave in games: https://github.com/mratsim/weave/issues/132
09:28:11disbot[RFC] Composability with async frameworks and other threading solutions. ; snippet at 12https://play.nim-lang.org/#ix=2n64
09:29:33planetis[m]btw i only used breakout as research example, I plan to make a real game eventually :)
09:29:50FromDiscord<mratsim> that sounds good to me
09:30:18FromDiscord<mratsim> I started a prototype of Weave in July as a research example and then threw out all the code 😉
09:30:54planetis[m]threw out as discarded?
09:32:25*letto_ quit (Read error: Connection reset by peer)
09:32:58*letto joined #nim
09:35:12planetis[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:22alehander92mratsim oii
09:36:38FromGitter<bung87> lol
09:38:37*Senketsu quit (Ping timeout: 260 seconds)
09:42:08*dadada__ joined #nim
09:43:24planetis[m]hi alehander92
09:49:15alehander92morning !!
09:54:39*Zevv quit (Remote host closed the connection)
09:59:40FromDiscord<mratsim> @planetis yes
10:00:19FromDiscord<mratsim> https://github.com/mratsim/weave/pull/116/files
10:00:22disbotSpring 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:26FromDiscord<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:44Zevvhe said in the afternoon
10:56:49FromDiscord<mratsim> it's always morning somewhere
10:57:02FromDiscord<mratsim> and he is in the UK
10:58:29FromDiscord<dom96> Don't morning shame me
10:58:32FromDiscord<dom96> 😛
11:02:05livcdmratsim: Do you use weave anywhere @ Status?
11:08:25*filcuc joined #nim
11:19:07nikita`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:07nikita`defined in a config file.
11:23:38nikita`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:47alehander92dom96 morning
11:46:58FromDiscord<mratsim> @livcd, no
11:48:24FromDiscord<mratsim> @nikita, if you use the dynlib pragma the existence of library is checked only at runtime
11:49:28nikita`ah. thanks! I'm still getting more familiar with Nim.
11:49:58FromDiscord<mratsim> constants need to be in a header though
11:50:14FromDiscord<mratsim> unless the C lirary return them via a function
11:50:53*filcuc joined #nim
11:51:25nikita`all headers, I was just not very precise in what I wrote
11:53:01*konvertex joined #nim
11:56:06Zevvoh 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:13alehander92silly dutch people!
12:06:46*supakeen joined #nim
12:06:51alehander92sorry, i want to make a joke about dutch sounding like english by a drunk german
12:07:05alehander92but it's probably very very cliche
12:08:21Zevvwell, 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:22Zevvand I can think of analogies too, about what Bulgarian sounds like to a dutchman
12:35:31Zevvbut i prefer to be good friends with you instead
12:40:19*filcuc_ quit (Ping timeout: 246 seconds)
12:40:53alehander92i want to hear it!
12:41:25alehander92 why friendship have if can have geopolitik. laugh!
12:43:09shashlick@mratsim replied to your issue on the tracker
12:43:24FromDiscord<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:17FromDiscord<Technisha Circuit> Imagine an mc server made in Nim
14:38:32Yardanicowell it's entirely possible, but it wouldn't really be popular
14:38:38FromDiscord<Technisha Circuit> Yeah ;-;
14:38:41Yardanicosince everyone wants these bukkit/spigot-api compatible plugins
14:38:47FromDiscord<Technisha Circuit> True
14:38:48Yardanicoe.g. see https://github.com/cuberite/cuberite
14:38:51YardanicoMC server in C++
14:38:55Yardanicowith plugins in Lua
14:39:02FromDiscord<Technisha Circuit> I wish i could make mc plugins in Nim ;-;
14:39:12Yardanicowell you certainly can, jnim exists
14:39:17FromDiscord<Technisha Circuit> Oh?
14:39:35FromDiscord<Technisha Circuit> How does it work?
14:39:35Yardanicoand java itself has jni anyway
14:39:43Yardanicohttps://github.com/yglukhov/jnim
14:39:48FromDiscord<Technisha Circuit> Do i need to write any Java myself?
14:39:57Yardanicoyou need to write nim-like java to wrap API stuff
14:40:01YardanicoI mean java-like nim
14:40:30FromDiscord<Technisha Circuit> Oh okay :P
14:41:04FromDiscord<Technisha Circuit> A Nim implementation in Java would be nice
14:41:09FromDiscord<Technisha Circuit> Similar to JRuby
14:41:13Yardaniconah
14:41:15Yardanicoit would be really stupid
14:41:23YardanicoI mean you could make a Java backend for Nim, but why?
14:41:43FromDiscord<Technisha Circuit> ~~So people can compile stuff for MC~~ no idea
14:41:52Yardanicojnim exists as I said
14:41:54*solitudesf quit (Read error: Connection reset by peer)
14:41:57FromDiscord<Technisha Circuit> (edit) 'compile' => 'make' | 'MC~~' => 'MC in nim~~'
14:42:09Yardanicoyou don't need java to make MC in nim
14:42:12FromDiscord<Technisha Circuit> Yeah, I'm probably gonna try that later
14:42:35FromDiscord<Technisha Circuit> I mean mc plugins for spigot or bukkit
14:42:41YardanicoJNI also exists
14:42:52Yardanicojust throw some glue in java and then the actual implementation in Nim
14:42:56FromDiscord<Technisha Circuit> O
14:43:49Yardanico(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:48liblq-dev`options` seems to be a little broken on devel, it produces warnings about UnpackError being deprecated
14:44:58Yardanicowell that's not "broken" :P
14:45:01liblq-devor, well, the latest nightly
14:45:07liblq-devYardanico: what is it then
14:45:11Yardanicoit's just that some Error are now Defect
14:45:24Yardanicoand since nim is 1.x these deprecated things won't be removed for the entirety of 1.x
14:45:45liblq-devbut it's a warning in the stdlib
14:45:48liblq-devin options.get
14:45:52Yardanicofix it then :P
14:45:59Yardanicoin a backwards-compatible way
14:46:09liblq-deveasier said than done
14:46:13Yardanicoexactly :D
14:48:48livcdThere's enough jvm languages :P
14:49:09livcdBut someone could try to implement TruffleNim
14:56:12*solitudesf joined #nim
14:56:43*ftsf_ quit (Quit: Leaving)
14:58:06FromGitter<kaushalmodi> I need a template/typeof/typedesc expert to chime in here: https://github.com/nim-lang/Nim/issues/14411
14:58:09disbottypedesc treated differently with proc and template ; snippet at 12https://play.nim-lang.org/#ix=2n87
14:58:45FromGitter<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:42liblq-devError: type mismatch: got <proc (win: Window, processEvent: sink InputProc){.locks: <unknown>.}> but expected 'proc (win: Window, processEvent: InputProc){.closure.}'
15:05:45liblq-devwhat
15:05:53Yardanico{.nosinks.}
15:05:55Yardanicoyou need that
15:06:00liblq-devwhat does it do?
15:06:07liblq-devand why is sink the default
15:06:08Yardanicodisables sink inference for a proc
15:06:14Yardanicoliblq-dev: sink inference is good
15:06:25Yardanicobut right now you need to add {.nosinks.} to callbacks when sink inference infers sinks in them
15:06:35Yardanicothis might be addressed later via wrapper procs with a warning
15:06:38liblq-devoh great Error: unhandled exception: 'sym' is not accessible using discriminant 'kind' of type 'TNode' [FieldDefect]
15:06:46liblq-devinternal error in the compiler
15:06:48Yardanicowhat nim btw?
15:06:58liblq-devlatest nightly
15:07:06Yardanicopls minimize and bug report :)
15:07:18liblq-devsame error on 1.2.0
15:07:23liblq-devdude if only I knew what happened
15:07:38Yardanicowell you have the code
15:07:43Yardanicothen you can minimize it :P
15:08:26*ftsf quit (Ping timeout: 256 seconds)
15:18:49FromGitter<bung87> I retry nimlsp today, it not eating my cpu now.
15:23:10FromDiscord<exelotl> Yardanico: I disagree, "o" is a commonly used alternative to "oh" that I use with some of my friends :P
15:23:25Yardanicowell I didn't really see it here until recently
15:23:33Yardanicoand before that I only saw in in telegram and only by some people
15:23:50*lritter joined #nim
15:25:04FromGitter<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:05FromDiscord<exelotl> https://media.discordapp.net/attachments/371759389889003532/713774508904808498/o_rly_0.png
15:25:12Yardanico@deech opt type is gone
15:25:19Yardanicoit's just some old code left in the compiler :)
15:25:58FromGitter<deech> Ah, it was updated at least as recently as April, so it's been removed since then?
15:26:11Yardanicowhat do you mean by "updated"?
15:26:13Yardanicowhere exactly?
15:26:25FromDiscord<Rika> i use o as an alternative to oh too
15:27:09FromDiscord<exelotl> wait was opt an equivalent to Option?
15:27:32Yardanicoyes
15:27:35Yardanicoyou can read about it a bit here
15:27:35Yardanicohttps://nim-lang.org/araq/destructors.html
15:27:44*letto quit (Quit: Konversation terminated!)
15:27:50FromGitter<deech> Apparently this was added on April 20th: https://github.com/nim-lang/Nim/blob/devel/compiler/types.nim#L613
15:27:51Yardanico(that blog post is from 2017 btw)
15:28:15Yardanico@deech well you can check the commit
15:28:19Yardanicoand it was added to all types
15:28:21Yardaniconot just tyOpt
15:28:29*letto joined #nim
15:28:42FromGitter<deech> I understand. I'm not disbelieving you.
15:29:06Yardanicomaybe i'm not right, but I'm pretty sure that it's not really useful now :)
15:29:43FromDiscord<exelotl> man opt is so much more visually pleasing than Option, and wouldn't require an import. xD
15:30:10Yardanicoadding stuff in the compiler is sometimes not really good :)
15:30:28Yardanicowe could have async as a built-in language feature too, but having it as a module is good enough
15:30:36FromGitter<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:46FromGitter<deech> There are other things that could be chained but those two in particular have proven to be workhorses in other langs.
15:33:00FromDiscord<Clyybber> @exelotl You can just alias Opt to Option
15:33:20FromDiscord<Clyybber> and use --import
15:33:24FromDiscord<Clyybber> to import it globally
15:35:16FromDiscord<exelotl> wait --import is a thing???
15:35:21Yardanicoinclude too
15:35:25Yardanicoit's all in https://nim-lang.org/docs/nimc.html :0
15:35:27FromDiscord<exelotl> holy crap I never knew this lol
15:35:27Yardanico:)
15:35:45FromDiscord<exelotl> I've read that doc a lot of times but there's so much information in there xD
15:36:25Zevvyeah, took me a year and a bit I guess
15:36:51Zevvand 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:56FromDiscord<Clyybber> woot
15:39:01Yardanicosame goes for the manual
15:39:02FromDiscord<Clyybber> I didn't know about --include
15:39:05YardanicoXDD
15:39:16Yardanicodid you know you can use type conversions as lvalue?
15:39:39FromDiscord<Clyybber> Yeah
15:39:43FromDiscord<Clyybber> Because I fixed it :p
15:39:47Yardanicoxd
15:40:03Yardanicoi was really surprised when I found that in the manual
15:40:25Yardanico(https://play.nim-lang.org/#ix=2n8o for interested people)
15:41:34disruptekdon't spread such heresy.
15:41:37YardanicoXD
15:41:43Yardanicoit's arcane knowledgfe
15:41:45Yardanicoknowledge*
15:42:03disrupteksome mistakes are better left buried and forgotten.
15:49:26*Guest61476 quit (Ping timeout: 258 seconds)
15:51:38FromDiscord<Rika> what the fuck
15:51:41Yardanico?
15:51:42*dadada joined #nim
15:51:44Yardanicoxd
15:51:47FromDiscord<Rika> so youre saying
15:51:54FromDiscord<Rika> i can put --import in my config
15:51:56Yardanicoyes
15:51:59FromDiscord<Rika> god
15:52:05*dadada is now known as Guest74851
15:53:05FromDiscord<exelotl> lmao
15:55:22FromDiscord<Rika> time to put `options` `strutils` `sequtils` in it
15:56:04Yardanicoand then you push code which is broken
15:56:21Yardanicoor 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:04FromDiscord<exelotl> yeah should be fine if we don't use it for libraries
15:59:29FromDiscord<Rika> thats what i mean lol it would be in proj config
16:00:12YardanicoI still prefer the more explicit version
16:00:20Yardanicoat least use one file which just has "import x; export x"
16:00:24Yardanicowhy put in the cfg :D
16:00:46FromDiscord<Rika> so a prelude or something
16:00:52Yardanicoyes
16:02:37FromDiscord<Clyybber> that you then --inlude muhahaha
16:03:23FromDiscord<Rika> lmaoooo
16:09:04disruptekmoths to a flame.
16:16:08*Senketsu joined #nim
16:33:16*natrys joined #nim
16:44:42*shadwick joined #nim
16:47:30livcdDont change the color on github omg!
16:52:24FromDiscord<Rika> im against it as well
16:52:29FromDiscord<Rika> i dont see the issue with the green
16:52:36FromDiscord<Rika> my colorblind ass thought it was grey
16:56:42*Senketsu quit (Ping timeout: 260 seconds)
17:00:50Zevvso from now on we will call it "githubbing" instead of "bikeshedding"
17:02:20FromDiscord<Rika> same thing
17:11:50Yardanicolivcd: pls vote omg! we're in a democracy!111 /s
17:17:27FromDiscord<mratsim> "we"? There are countries that are not democracies.
17:17:46Yardanicoi know :P
17:18:00Yardanicoi 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:12livcdYardanico: that sounds pointless..unless I can find 40 other people :P
17:23:28*filcuc_ quit (Ping timeout: 246 seconds)
17:25:05FromGitter<bung87> Merging can be performed automatically with 1 approving review.
17:25:13Yardanicoread more carefully :)
17:25:17Yardanicothey require wider community agreement
17:25:18Yardanicoon a change
17:25:21FromGitter<bung87> so it just need one github stuff reviewed.
17:25:27Yardanicobecause that will change the nim color on the whole github
17:25:35Yardanicofor all 2-3k+ nim github repos out there
17:25:37FromGitter<bung87> ok, I go ahead
17:27:14*letto quit (Ping timeout: 260 seconds)
17:27:35livcdhmm can you make a shared lib in Go for Nim?
17:27:51Yardanicoif Go can export functions with C ABI, sure
17:28:15Yardanicofound https://medium.com/learning-the-go-programming-language/calling-go-functions-from-other-languages-4c7d8bcc69bf
17:28:36Yardanicoit shows an example of calling go from C
17:29:47*thomasross joined #nim
17:30:57FromGitter<bung87> am now using latest nimlsp version vscode extension , no multiple nimsugget eating my cpu now
17:31:58Yardanicoi wanted to try to write a smol vscode extension to use nimlsp in vscode
17:32:11Yardanicoguess what - in vscode you have to write a small extension even if you just want to use some language server
17:32:22Yardaniconot like on other editors where you can just choose the needed executable path and stuff
17:32:32Yardanicoand also considering the fact that lsp *was created* my MS
17:33:05FromGitter<bung87> ah, I write last year, then I found nimlsp also eating my cpu..
17:33:25FromGitter<bung87> today I re check the newer nimlsp , problem is gone
17:33:48FromGitter<bung87> https://github.com/bung87/vscode-nim-extension
17:34:01Yardaniconiceee
17:34:10Yardanicovery great
17:34:22FromGitter<bung87> but no reason why formatting not work, not show in log, console.
17:35:16FromDiscord<Rika> oooooh i can replace the conventional `types.nim` with a `prelude.nim` that does both """universal""" imports and types
17:35:31FromGitter<bung87> in the end I found pc roared not because of the summer.
17:49:28FromDiscord<Generic> bung87: do you use Gary M's fixed nim syntax file?
17:49:47FromDiscord<Rika> its not really fixed
17:50:08FromDiscord<Rika> there's stuff that i dont think gary is aware of like anonymous procs or so
17:50:46FromDiscord<Generic> hm, ok
17:53:17FromGitter<bung87> I use these days , but it also using multiple nimsuggest.
17:53:38FromGitter<bung87> I also have a fork version, that just using one nimsuggest per project
17:54:24FromDiscord<Generic> how do you launch the extension?
17:54:28FromGitter<bung87> I just check nimlsp textDocument/format is TODO
17:55:02FromDiscord<Generic> that would need nim pretty
17:55:11FromGitter<bung87> what do you mean by "launch" ? just installed and using
17:55:14Yardanicohttps://i.imgur.com/ReMpBSD.png nice
17:55:56FromGitter<bung87> I guess I can create PR make nimlsp support it
17:56:12Yardanicoah nvm seems like this version is a bit broken
17:56:14Yardanicogonna try next commit
17:56:16FromDiscord<Generic> bung87: I wanted to try to run the extension in debug mode
17:56:29FromDiscord<Generic> I missed that you already published it
17:57:03FromGitter<bung87> oh that's easy, git clone, left panel click run
17:57:11FromGitter<bung87> minutes ago
17:57:57Yardanicohttps://i.imgur.com/DyAuofQ.png which one to pick? :D
17:58:17FromGitter<bung87> I feel better cpu fan not blowing :P
17:58:45YardanicoOH NO
17:58:48YardanicoI FOUND THE FORBIDDEN KNOWLEDGE
17:58:51Yardanico@Rika https://bugs.launchpad.net/nimrod/+bug/374441
17:58:57Yardanicocheck 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:27audiofileany interest in a nim wrapper for the launchpad pro? https://github.com/dvhdr/launchpad-pro
17:59:35audiofileI could try this with some guidance
17:59:39FromDiscord<Rika> yardanico i dont see the issue
17:59:52Yardanico@Rika 4raq nowadays uses windows and hates *nix :)
18:00:00Yardanicowell, not "hates", but doesn't exactly like
18:00:32FromDiscord<Rika> til koch was in python at a point in time
18:00:36Yardanicoyes ofc
18:00:40Yardanicoand the compiler was in object pascal
18:01:02Yardanicook I'll try version 0.7.10 from Jun 2009
18:01:12FromDiscord<Rika> i assumed it was using some other language
18:01:18FromGitter<deech> `nimble build` seems to rebuild even when nothing has changed, does anyone know of a flag that disallows that?
18:01:39Yardanicooh no "rodread.pas(254,30) Error: Illegal type conversion: "LongInt" to "TNodeFlags""
18:02:24FromDiscord<Generic> it doesn't seem to work for me
18:02:43FromDiscord<Generic> it says nimlsp 0.2.4 in the lower left corner
18:04:52FromGitter<bung87> hold on, my extension name conflicted?
18:08:00FromGitter<bung87> bung87.vscode-nim-lsp this one
18:08:12YardanicoAAAAAa I can't find any good info on casting int to set in object pascal :DD
18:08:34FromDiscord<Rika> yardanico: why are you even doing this
18:08:42FromGitter<bung87> name conflicted, I published it named same as my forck version extension
18:08:42Yardanicoto try nim 0.7.10
18:08:46*shadwick quit (Remote host closed the connection)
18:09:36Yardanicoand btw
18:09:43Yardanicotype conversion as lvalue seems to exist in delphi/free pascal too
18:09:58Yardanicohttps://stackoverflow.com/a/9554208/5476128
18:10:27dom96deech: that feature doesn't exist
18:11:51FromGitter<bung87> (https://files.gitter.im/nim-lang/Nim/dXQO/Screenshot-2020-05-24-at-2.10.43-AM.png)
18:12:10Yardanicoyeah that's due to nimsuggest failing sometimes
18:12:14Yardanicoit's a known issue in nimlsp
18:12:25Yardanicoor maybe your code is actually invalid
18:12:55Yardanico@bung87 does your extension do stuff like compile & run on F5 ?
18:13:26FromGitter<bung87> cmd shift + p run selected nim file
18:13:36Yardanicowell I mean in Nim extension the default keybind is F5
18:14:10Yardanicoalso how do I compile it? :P
18:14:16Yardanicodo I need stuff like yarn, node, something else?
18:14:41Yardanicoah nvm you already published it on https://marketplace.visualstudio.com/items?itemName=bung87.nim
18:15:00FromGitter<bung87> oh, I use mac F* default binding is light,sound ,something
18:15:20FromDiscord<dom96> Nim/Nimble/Git really behaves strangely when executed in a git post-receive hook
18:15:45FromGitter<bung87> you can simple git clone , yarn , in vscode left panel click run , in debug mode
18:15:47Yardanicowow @bung87 your extension actually works!
18:15:49Yardanicoamazing
18:16:01YardanicoI'll use it I think
18:16:04FromGitter<bung87> if there's something wrong , you can easy check
18:16:22FromGitter<bung87> : P
18:16:38Yardanicobecause nimsuggest support in nim pragmagic's extension was failing on me hard
18:16:46Yardanico@bung87 how does your extension handle nimlsp crashes?
18:16:52Yardanicoit sometimes crashes because of nimsuggest and stuff
18:16:59Yardanicodoes the extension automatically restart nimlsp then?
18:17:13FromGitter<bung87> nimlsp seems no that problem.
18:17:21Yardanicowell it sometimes crashes still
18:17:30FromGitter<deech> dom96, but it could right? I seem to remember nim has a flag that stops unnecessary recompilation.
18:17:33Yardanicowhen I was using it in sublime text 3 i had crashes sometimes
18:17:56FromGitter<bung87> https://github.com/PMunch/nimlsp/issues/19
18:18:03FromGitter<bung87> https://github.com/PMunch/nimlsp/pull/21
18:18:12FromGitter<bung87> and I 've dig something
18:18:18Yardanicowell I mean I tried latest nimlsp
18:18:54Yardanicoah nevermind F6 in your extension works as well
18:19:00YardanicoI'll report any bugs I find :P
18:19:04Yardanicopls don't abandon it
18:19:07FromGitter<bung87> if it also sometime crash , I can using #21 PR that will help
18:19:35Yardanicook, one small thing I noticed
18:19:38Yardanicopragms are not highlighted
18:20:25FromGitter<bung87> hmm, leme check
18:20:44Yardanicooh yeah I just got my first nimlsp crash by using go to definition a lot (especially to system types)
18:20:50Yardanicobut extension automatically restarted it so it's fiine
18:20:55Yardanico"[Info - 9:20:11 PM] Connection to server got closed. Server will restart."
18:21:32Yardanicousing nimlsp is really better because all improvements to nimlsp benefit all editors which use it
18:22:04FromGitter<bung87> yeah , that's the idea. extension can just stay small code base.
18:22:52FromGitter<bung87> my vscode color theme show pragma blue, same as primitive type color
18:22:58Yardanicohmm, not for me
18:23:12YardanicoI installed 0.0.2 from the vscode store
18:23:44FromGitter<bung87> (https://files.gitter.im/nim-lang/Nim/d7VT/Screenshot-2020-05-24-at-2.23.32-AM.png)
18:23:56Yardanicohmm, maybe because of my theme, lemme check
18:24:04FromGitter<bung87> yeah it's 0.0.2 latest.
18:24:14Yardanicooh yeah in default it's blue, yes
18:24:19Yardanicobut in monokai vibrant it's just white
18:24:20YardanicoI guess it's fine
18:24:41YardanicoI'm using https://marketplace.visualstudio.com/vscode
18:24:45Yardanicohttps://marketplace.visualstudio.com/items?itemName=s3gf4ult.monokai-vibrant
18:25:31FromGitter<bung87> oh I should change its display name..
18:26:38Yardanicobut yeah mostly it works just fine, thank you very much
18:27:30FromGitter<bung87> NP :P
18:28:24Yardanicohttps://i.imgur.com/wK2H6xv.png
18:29:09FromGitter<bung87> I'm blocked. haven't by new vpn server..
18:29:11FromGitter<bung87> buy
18:33:37FromGitter<bung87> hmm, I found extension proxy imgur to duckduckgo, finally duckduckgo also blocked...
18:38:00Yardanico@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:15Yardanicoand the editor will highlight stuff AFTER the type
18:38:36Yardanicoby hover I mean put mouse over it
18:39:53Yardanicobasically it highlights the stuff based on the mouse position, not on the symbol itself
18:43:42FromGitter<bung87> that's common issue, basiclly all extension task is async , so there is time gap.
18:43:51Yardanicononon, it's not about time
18:44:51FromGitter<bung87> you sure the vscode always show tip anchor at symbol?
18:44:51Yardanico@bung87 here I put my mouse on the last letter of "Spinner" https://i.imgur.com/pBdr7IS.png
18:45:00Yardanicosee how it highlights past the "Spinner" word
18:45:16FromDiscord<Rika> *Spinny*
18:45:22Yardanico@Rika yeah it's my fork
18:45:26FromGitter<bung87> pasted it here, I am inside GFW
18:45:27Yardanicowhic makes it more nimish
18:45:37Yardanico@bung87 where exactly? :D
18:45:38FromDiscord<Rika> nimlish
18:45:41YardanicoI can't paste it in irc, will try in gitter
18:45:56FromGitter<bung87> Great Fire wall
18:46:07Yardanicowhat image hostins can you view?
18:46:26Yardanicodoes http://transfer.sh/ work for you?
18:46:29FromGitter<bung87> anyother options?
18:46:47FromGitter<bung87> page open speed seems good
18:46:49FromGitter<bung87> https://transfer.sh/
18:47:09Yardanicowhat about http://file.io/ ?
18:47:32FromGitter<bung87> both seems fine
18:48:00ZevvWell, 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:09Yardanicono
18:48:39FromGitter<bung87> OMG
18:49:10FromDiscord<Generic> please not
18:49:17Yardanico@bung87 https://file.io/xtN2P4xf - be careful, it's a one-time link only :D
18:49:17Zevvsooo much better, right!
18:49:19FromDiscord<Rika> already saw this
18:49:37FromGitter<bung87> that's old fashion...
18:49:44FromDiscord<Rika> i may have discovered syntax skins pretty late, but i knew it before you sending that!
18:49:49Yardanico@bung87 https://i.ibb.co/Cv3RxLF/2020-05-23-21-44-40-grim.png
18:50:08FromGitter<bung87> 404 some one clicked?
18:50:15Yardanicoyeah try second link
18:51:28FromGitter<bung87> I see. actually I see this very often. it can also floating to my desktop
18:51:46Yardanicoyeah, I mean about the fact that "r, time" is highlighted
18:51:49Yardanicoinstead of "Spinner"
18:52:34FromGitter<bung87> not sure how to solve this.
18:52:46FromDiscord<Generic> do you have have nimlsp installed via nimble aswell?
18:53:05Yardanico@Generic yes
18:53:17FromDiscord<Generic> it doesn't seem to work for me
18:53:20FromGitter<bung87> yeah , nimble install then it can call from cli
18:53:22Yardanicoworks fine here
18:53:32FromDiscord<Generic> I had to add it manually to the path
18:53:36Yardanicoah of course
18:53:41FromDiscord<Generic> otherwise it wouldn't recognise it all
18:53:43Yardanicoyou need to have ~/.nimble/bin in your PATH
18:53:48FromDiscord<Generic> I do have it
18:53:54Yardanicowell then it should work
18:53:56Yardanicoit works for me just fine ;)
18:53:57FromDiscord<Generic> I'm on windows
18:54:01Yardanicomaybe you added it in the wrong PATH
18:54:25FromDiscord<Generic> I can open nimlsp from the command line, that's not the problme
18:54:42FromGitter<bung87> oh you must add it to system wide PATH variable
18:54:42Yardanicowell cmdline sometimes doesn't have the same PATH as applications
18:55:07FromDiscord<Generic> nimlsp is recognised by the extension
18:55:09FromGitter<bung87> that's common issue
18:55:27FromDiscord<Generic> it just fails doesn't give intellisense
18:55:33FromDiscord<Generic> and instead says loading
18:56:19FromGitter<bung87> you using vscode-nim just fine?
18:56:53FromDiscord<Generic> yes
18:57:52FromGitter<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:57livcdZevv: it looks good :P
19:10:36ZevvGreat stuff, right?! I'm planning to sell my PR to Araq. Or just the highest bidder I guess. This will fly!
19:11:27livcdyou have my vote!
19:11:32Yardanicowait
19:11:41FromGitter<bung87> if it accept it would be a optional compile flag?
19:11:45Yardanicoif you add pragmas to the forward decl you don't have to add them to the actual implementation?! dafaq
19:11:48Zevvwait, and there's more! It stil parses old fashioned 2020 nim as well!
19:11:54Yardanico@bung87 it's just a joke, syntax skins were there already :)
19:11:56Yardanicobut they were removed
19:12:11FromDiscord<Elegant Beef> I'll give you a snickers wrapper and a handful of pocket lint
19:12:12FromDiscord<Rika> pretty sad imo
19:12:13FromGitter<bung87> ok :P
19:12:26FromDiscord<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:13FromGitter<bung87> @Yardanico ah ,I realize you mean the word hightlight not the tooltip
19:31:23Yardanicoyes
19:32:24FromGitter<bung87> that's not common issue now..
19:32:55FromGitter<bung87> not a hard task for extension.
19:35:19FromGitter<bung87> @Generic I publish 0.0.6 just using pragmic's getBin see if it works.
19:36:23FromGitter<bung87> I know some extension also check the registry sheet on windows.
19:40:47*zacharycarter joined #nim
19:41:17FromDiscord<Generic> have you uploaded it already?
19:41:55Yardanico@Generic vscode-nim-lsp
19:42:05Yardanicothat's the extension name
19:42:12Yardanicobung87.vscode-nim-lsp full vscode name
19:43:30FromDiscord<Generic> that's confusing
19:44:54FromDiscord<Generic> it still doesn't work
19:45:33FromDiscord<Generic> it recognises nimlsp
19:45:53FromDiscord<Generic> but it doesn't give any intellisense
19:51:21FromGitter<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:20FromGitter<bung87> I just fixed a bug that I may append .exe to path mulitple times. that maybe the problem.
19:54:45FromGitter<bung87> @0.0.7
19:55:16*idf joined #nim
19:57:39*Guest74851 is now known as dadada
19:58:09FromDiscord<Generic> it still doesn't seem to work
19:58:18dadadahmm, unexpectedly kate (kde's editor) has pretty good support for Nim, also Vim modal keys (although the support is basic)
19:58:27dadadacompared to my expectancy
19:58:55dadadakate is actually an awesome editor all in all, it always never gets a mention, that's why I'm doing it
19:59:54FromGitter<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:29FromDiscord<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:41FromGitter<Clyybber> @timotheecour ping pong
20:28:07Yardanicowow gitter
20:28:25FromGitter<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:48FromDiscord<dom96> bah, Firefox's touch emulation is crap
20:56:06alehander92hmmm
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:55dadadanimlsp also works with kate btw. but it's far from great
21:36:30dadadaI 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:33FromGitter<bung87> https://github.com/qt-creator/qt-creator/blob/a5044727900b3db78746ae17f72d20da1fd3a8ca/src/plugins/nim/editor/nimcompletionassistprovider.cpp
22:24:46FromGitter<bung87> the qt-creator using nim for what purpose?
22:24:51Yardanicoyeah qt creator has nim support for years
22:25:17FromGitter<bung87> write in nim ?
22:25:25FromGitter<bung87> gui
22:25:47Yardanicono
22:25:50YardanicoQt Creator is an IDE
22:25:54Yardaniconot limited to Qt
22:26:03Yardanicobut in nim you have nimqml, no qt bindings though
22:26:51FromGitter<bung87> so they using nim write ide plugin?
22:26:56Yardanicono?
22:27:02FromDiscord<exelotl> I wish Qt development didn't require me to have like a billion gigabytes of free space on my hard drive
22:27:02Yardanicosomeone just contributed nim support for qt creator
22:28:23dadadanimsuggest is using entirely too much cpu... and keeps running when the applications that have triggered it, are long gone, ...
22:28:31Yardanicoso use nimlsp ;)
22:29:11FromGitter<bung87> oh , I got it, ide support nim language.
22:29:11dadadaYardanico: it is based on nimsuggest
22:29:15Yardanicodadada: it is
22:29:26dadadaYardanico: how is that helpful then?
22:29:30Yardanicoit is
22:29:32Yardaniconimlsp wouldn't hang
22:29:48FromGitter<bung87> just crash
22:30:13FromGitter<bung87> nimlsp using one process
22:30:52FromGitter<bung87> I always see about 4 nimsuggest process
22:31:03FromGitter<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:44FromDiscord<Technisha Circuit> How would i get the full url path with Jester in Nim
23:10:46FromDiscord<Technisha Circuit> ?
23:17:43FromDiscord<exelotl> req.getNativeReq().url ?
23:21:07FromDiscord<Technisha Circuit> Thanks!
23:21:38FromDiscord<exelotl> np :)
23:23:28FromDiscord<Technisha Circuit> Do i need to import anything else from jester? Because i can't use it for some reason ;-;
23:26:17FromDiscord<exelotl> oh, you probably have to import asynchttpserver or httpbeast
23:26:30zedeusnah
23:27:19FromDiscord<exelotl> hm, and/or the uri module?
23:28:25zedeusfor nitter I do something like `parseUri(request.path) ? toSeq(request.params.pairs())`
23:28:50zedeusif 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:11FromDiscord<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?