<< 18-11-2019 >>

00:00:06FromGitter<TensorTom> If I'm on the go without IDEA for some reason, I tend to use VS Code
00:00:37madpropsi installed IDEA a couple of days ago
00:01:03FromGitter<TensorTom> it's so good. been using it for years
00:01:05madpropsseems there's no nim plugin for it
00:01:13FromGitter<Willyboar> @madprops Well i am not professional. I also hear good things for VS Code
00:01:22FromGitter<TensorTom> there's a Nim plugin
00:01:47FromGitter<TensorTom> if you open a Nim file, it will prompt you to install it
00:01:58madpropsi'll give it a try
00:02:16madpropsi have the community edition
00:02:40FromGitter<TensorTom> should still be able to install plugins afaik
00:04:48madpropsit's pretty heavy, IDEA
00:07:24FromGitter<TensorTom> yea
00:07:49sealmoveI get a very weird error in npeg
00:07:51sealmove/home/sealmove/.nimble/pkgs/npeg-0.21.0/npeg.nim(142, 39) Error: VM is only allowed to 'cast' between integers and/or floats of same size
00:07:58FromGitter<TensorTom> hrm. looks like https://github.com/nim-lang/website was made using Jekyll
00:08:08sealmoveanyone has seen this?
00:08:22FromGitter<TensorTom> I could have sworn the site or forum was made using Nim
00:08:34FromGitter<Willyboar> @TensorTom yes sorry
00:08:40FromGitter<Willyboar> look for the forum
00:08:43FromGitter<TensorTom> oic
00:14:26FromGitter<TensorTom> I see Nim forum uses Nginx as a reverse proxy. Why do that rather than just use CGI?
00:15:02dom96implementing HTTP once is easier than HTTP and CGI
00:15:06*drewr quit (Ping timeout: 252 seconds)
00:15:53FromGitter<TensorTom> shouldn't performance be better that way though?
00:16:04dom96nope, why would it be?
00:17:35FromGitter<TensorTom> since only 1 web server that has been tested over the years. I was planning to use openlitespeed + nim in CGI. openlitespeed is very fast (like nginx). seems like forwarding to a nim server would add more complexity and maybe lose some of benefits of lsws or nginx?
00:18:42dom96if anything CGI would be slower + more complex. You'd need to implement a separate protocol and spawn processes.
00:18:59dom96nginx is already one of the fastest http servers out there
00:19:57FromGitter<TensorTom> why spawn processes? you put your nim executable in cgi-bin and lsws runs it. I guess you're saying that for each visitor, it will be a separate nim process?
00:20:57dom96yes
00:31:51FromGitter<Willyboar> @dom96 why you abandoned aporia?
00:32:24*Hideki joined #nim
00:32:47*Hideki is now known as Guest41614
00:32:59*rockcavera joined #nim
00:33:08dom96Willyboar: GTK was a massive pain
00:33:59FromGitter<TensorTom> if anyone can shed some light on why this is happening https://github.com/FedericoCeratto/nim-httpauth/issues/21 would be a great help. Is it just some error in templating and I can replace those lines with some concatenation or other templating? That error comes from the example in the readme https://github.com/FedericoCeratto/nim-httpauth at `resp $( %* {"ok": true, "msg": ""})`
00:35:10FromGitter<Willyboar> ping Federico to help
00:37:14*Guest41614 quit (Ping timeout: 265 seconds)
00:38:28FromGitter<Willyboar> @dom96 Is there a chance for resurrection if reached a stable native cross platform UI for Nim?
00:38:46dom96Definitely not by me
00:39:02dom96Electron has been the way to go for a while now
00:39:03FromGitter<Willyboar> :) I thought you loved aporia
00:39:06dom96and it's still the best option
00:39:13dom96if anything I'd fork VS Code
00:39:38FromGitter<Willyboar> By the way Aporia is a greek word
00:39:40FromGitter<Willyboar> :)
00:39:52dom96yes, that's how I picked the name
00:40:41FromGitter<Willyboar> you can ping me if you ever need another greek name
00:41:07*u9898287 quit (Quit: u9898287)
00:41:23*u9898287 joined #nim
00:42:33*u9898287 quit (Client Quit)
00:42:48*u9898287 joined #nim
00:42:48*leorize joined #nim
00:43:14*ponyrider quit (Quit: WeeChat 2.6)
00:55:15*krux02_ joined #nim
00:55:49*u9898287 quit (Quit: u9898287)
00:56:04*u9898287 joined #nim
00:56:43*ng0 quit (Quit: Alexa, when is the end of world?)
00:58:16sealmoveWillyboar: why?
00:58:56*krux02 quit (Ping timeout: 240 seconds)
01:04:27FromGitter<Willyboar> Because i am greek :)
01:07:10*u9898287 quit (Quit: u9898287)
01:07:28*u9898287 joined #nim
01:10:45*u9898287 quit (Client Quit)
01:11:04*u9898287 joined #nim
01:11:07*u9898287 quit (Client Quit)
01:11:23*u9898287 joined #nim
01:12:00*u9898287 quit (Client Quit)
01:12:06disruptek!github npeg
01:12:19*u9898287 joined #nim
01:13:40disruptek!github openapi
01:13:59disruptekneat.
01:14:02disruptekgive it a try.
01:16:15disruptek!github dirfun
01:16:15disbothttps://github.com/madprops/dirfun -- Experimental directory and file creator
01:18:46*Kevin5 joined #nim
01:19:08*norns joined #nim
01:19:38*norns left #nim ("WeeChat 2.6")
01:19:57*u9898287 quit (Quit: u9898287)
01:20:11*u9898287 joined #nim
01:20:12*u9898287 quit (Remote host closed the connection)
01:20:26*u9898287 joined #nim
01:21:22*u9898287 quit (Client Quit)
01:21:22FromGitter<Willyboar> !github nim
01:21:24disbothttps://github.com/nim-lang/Nim -- Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority).
01:21:24disbothttps://github.com/nim-lang/nimble -- Package manager for the Nim programming language.
01:21:24disbothttps://github.com/dom96/jester -- A sinatra-like web framework for Nim.
01:21:36*u9898287 joined #nim
01:21:46FromGitter<Willyboar> !github web language:nim
01:21:49disbothttps://github.com/dom96/jester -- A sinatra-like web framework for Nim.
01:21:49disbothttps://github.com/niv/websocket.nim -- websockets for nim
01:21:50disbothttps://github.com/andreaferretti/rosencrantz -- A web DSL for Nim
01:22:26*ponyrider joined #nim
01:22:31FromGitter<Willyboar> Do you have a max 3 results?
01:22:46disruptekyeah.
01:22:51FromGitter<Willyboar> By the way i love it
01:23:07disruptekit only searches nim stuff, so you don't need to add the language tag.
01:23:21disruptek!github gui stars:>200
01:23:23disbothttps://github.com/yglukhov/nimx -- GUI library
01:23:23disbothttps://github.com/trustable-code/NiGui -- Cross-platform desktop GUI toolkit written in Nim
01:23:31FromGitter<Willyboar> !github static
01:23:33disbothttps://github.com/dom96/ipsumgenera -- Static blog generator written in Nim
01:23:33disbothttps://github.com/h3rald/nimhttpd -- A tiny static file web server written in Nim
01:23:34disbothttps://github.com/kaushalmodi/hello_musl -- NimScript (config.nims) for building a static binary using Nim + musl + pcre + libressl/openssl
01:23:54disruptekbbl
01:24:14disruptekdisbot: try not to burn the channel down.
01:24:15disboton it. 👍
01:25:35*u9898287 quit (Client Quit)
01:25:49*u9898287 joined #nim
01:31:18*sealmove quit (Quit: WeeChat 2.6)
01:33:03*u9898287 quit (Quit: u9898287)
01:33:20*u9898287 joined #nim
01:37:07*u9898287 quit (Client Quit)
01:37:24*u9898287 joined #nim
01:47:47*uu91 quit (Read error: Connection reset by peer)
01:48:01*uu91 joined #nim
01:56:11*exelotl quit (Ping timeout: 276 seconds)
02:02:03*uu91 quit (Read error: Connection reset by peer)
02:02:16*uu91 joined #nim
02:08:38*krux02_ quit (Remote host closed the connection)
02:15:20*uu91 quit (Read error: Connection reset by peer)
02:15:37*uu91 joined #nim
02:17:59Kevin5👑️
02:18:53*rockcavera quit (Remote host closed the connection)
02:19:38*uu91 quit (Read error: Connection reset by peer)
02:19:59*uu91 joined #nim
02:21:58*rockcavera joined #nim
02:23:53*tiorock joined #nim
02:23:53*tiorock quit (Changing host)
02:23:53*tiorock joined #nim
02:23:53*rockcavera is now known as Guest12011
02:23:53*Guest12011 quit (Killed (cherryh.freenode.net (Nickname regained by services)))
02:23:53*tiorock is now known as rockcavera
02:25:55*Kevin5 quit (Quit: Leaving)
02:27:36*rockcavera quit (Remote host closed the connection)
02:28:11*rockcavera joined #nim
02:31:34*shodan45 quit (Quit: No Ping reply in 180 seconds.)
02:35:55*shodan45 joined #nim
02:36:14FromGitter<TensorTom> @FedericoCeratto would appreciate if you could take a look at https://github.com/FedericoCeratto/nim-httpauth/issues/21 when you get the chance
02:36:40FromGitter<TensorTom> I need me some auth/sessions in Nim
02:39:26FromGitter<TensorTom> !github authentication
02:39:27disbothttps://github.com/FedericoCeratto/nim-httpauth -- HTTP Authentication library for Nim
02:39:27disbothttps://github.com/ba0f3/scram.nim -- Salted Challenge Response Authentication Mechanism (SCRAM-SHA-1 SCRAM-SHA-256 SCRAM-SHA-512)
02:39:28disbothttps://github.com/chartera/commander -- A authentication/authorization tcp server
02:43:01*u9898287 quit (Quit: u9898287)
02:47:18*thomasross_ joined #nim
02:47:18*thomasross is now known as Guest62432
02:47:18*Guest62432 quit (Killed (sinisalo.freenode.net (Nickname regained by services)))
02:47:18*thomasross_ is now known as thomasross
02:57:31FromDiscord<krab4t> disbot, wtf?
02:58:32*Kevin5 joined #nim
03:14:08*Kevin5 quit (Quit: Leaving)
03:19:37*kevin6 joined #nim
03:22:23*MarquisdeFalbala joined #nim
03:25:04*rockcavera quit (Remote host closed the connection)
03:25:25*uu91 quit (Read error: Connection reset by peer)
03:25:38*uu91 joined #nim
03:25:55*sealmove joined #nim
03:32:09*NimBot joined #nim
03:32:51FromDiscord<Rika> Yardanico, https://gitlab.com/define-private-public/stb_image-Nim/issues/8
03:33:38*u9898287 joined #nim
03:39:10*lritter joined #nim
03:44:21*MarquisdeFalbala quit ()
03:48:47*MarquisdeFalbala joined #nim
04:01:45*MarquisdeFalbala quit ()
04:33:23*nsf joined #nim
04:40:51*chemist69 quit (Ping timeout: 250 seconds)
04:42:43*chemist69 joined #nim
04:49:31*kevin6 quit (Ping timeout: 250 seconds)
04:52:23*vsantana quit (Remote host closed the connection)
04:53:27*vsantana joined #nim
04:55:09*u9898287 quit (Quit: u9898287)
04:55:22*u9898287 joined #nim
05:01:43FromGitter<TensorTom> yay I managed to get httpauth working with jester!
05:02:11FromGitter<TensorTom> is jester supposed to only serve requests via 1 thread?
05:05:20*uu91 quit (Ping timeout: 276 seconds)
05:05:50*uu91 joined #nim
05:33:02*dddddd quit (Remote host closed the connection)
05:44:24FromDiscord<WilliamDraco> https://play.nim-lang.org/#ix=228k
05:44:24FromDiscord<WilliamDraco> Using NiGui - "process_name" can take several minutes. If user clicks away before it finishes the window locks-up ('not responding') until it does finish, including no more output lines.
05:44:24FromDiscord<WilliamDraco> I'm an amateur and just missing the right concept/phrase to google I hope.
05:50:50*ltriant_ quit (Ping timeout: 276 seconds)
05:55:00Zevvsealmove: interesting, haven't seen that before. For now you can get away with doing a readFile() or staticRead() yourself, but I'll look into it.
05:57:12Zevvwhat is your platform?
05:58:18*uu91 quit (Read error: Connection reset by peer)
05:58:35*uu91 joined #nim
06:06:17FromGitter<s0kil> @TensorTom compile with `--threads:on` should use all your threads
06:18:00sealmoveZevv: I saw an example where everything was within a static: block, as soon as I removed it, it works fine
06:18:10sealmovestill strange through
06:21:58*sagax quit (Ping timeout: 245 seconds)
06:24:31sealmoveany ideas how to do spaces in peg? :P
06:42:46*narimiran joined #nim
06:50:59Zevveuh what about ' '?
06:51:18Zevvor +' ' when plural
06:51:42Zevvare you running windows, linux or something else, and 32 or 64 bit?
06:56:30sealmove64bit Linux
06:56:57sealmoveI haven't encountered any real issue with npeg yet :D it's awesome <3
06:57:30sealmovebtw is it possible to capture arbitary expressions?
06:57:51sealmovefor example if you have something like this `a <- >*b`
06:58:10sealmovedoes this capture all b's in seperate variables?
06:58:22sealmoveif yes, how can you iterate those?
06:58:38sealmovearbitary number of expressions*
07:11:41*solitudesf joined #nim
07:15:05*u9898287 quit (Quit: u9898287)
07:15:21*u9898287 joined #nim
07:22:06*PMunch joined #nim
07:23:21*cyraxjoe quit (Ping timeout: 250 seconds)
07:24:56Zevvall b's capturs will be available inside the code block as capture[] or $1,$2,$3
07:27:20ZevvI think matchfile is simple not available at vmtime because of the memfiles
07:35:44Zevvso in the vm you need to do that in two steps: readfile+match
07:36:06ZevvI just ran all of my stuff with --gc:arc, and everything Just Works. Is that a bug?
07:36:40sealmovewith 2-step method it works fine
07:36:58sealmoveso can you do `for arg in capture` or something like that?
07:37:20sealmovebecause $1, $2 etc won't do if you don't know how many captures you have
07:37:32sealmoveor does it not work like this?
07:39:01*jjido joined #nim
07:39:21*cyraxjoe joined #nim
07:46:57PMunchHmm, why is csize deprecated on devel in favour of csize_t?
07:47:39*vsantana quit (Remote host closed the connection)
07:48:28*vsantana joined #nim
07:52:19Zevvsealmove: right so
07:52:58*couven92 joined #nim
07:53:03Zevvcapture[0] is the whole of `b` in one string, and capture[1] and highter are your explicit captures
07:53:18Zevvthe $ notation is just some sugar
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:48*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:05:12*gmpreussner joined #nim
08:09:22sealmoveindentation-based is really a struggle for peg :|
08:10:12*u9898287 quit (Quit: u9898287)
08:10:20sealmoveluckily in my grammar there is limited number of indentation levels allowed, and you always know where you will find each
08:10:21*jjido joined #nim
08:10:26*u9898287 joined #nim
08:10:57sealmovewe should make CT BNF
08:11:03*couven92 quit (Read error: Connection reset by peer)
08:11:30FromGitter<zacharycarter> something funky is going on with vscode - the Nim check project task is locking up code
08:11:38*couven92 joined #nim
08:12:36lqdev[m]@zacharycarter that means there's some infinite recursion going on and your RAM gets filled
08:12:37lqdev[m]something similar happened to me when using npeg a while ago
08:13:02FromGitter<zacharycarter> hrm
08:13:22FromGitter<zacharycarter> guess I need to disable the nim vscode extension for now
08:14:19FromGitter<zacharycarter> thanks lqdev[m]
08:15:46*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:19:16*jjido joined #nim
08:22:32*jjido quit (Client Quit)
08:29:43*sagax joined #nim
08:46:31*couven92 quit (Read error: Connection reset by peer)
08:46:56*couven92 joined #nim
08:53:09*u9898287 quit (Quit: u9898287)
08:53:24*u9898287 joined #nim
09:03:17*kevin5 joined #nim
09:03:31*u9898287 quit (Quit: u9898287)
09:03:47*u9898287 joined #nim
09:03:50*thomasross quit (Remote host closed the connection)
09:03:51*rockcavera joined #nim
09:04:16*thomasross joined #nim
09:05:13FromDiscord<mratsim> @PMunch because csize was a lie
09:06:07FromDiscord<mratsim> According to the C/C++ standard csize is supposed to be unsigned the size of a pointer (and later one of the C/C++ committee member said it should have been signed but well)
09:06:25FromDiscord<mratsim> but in Nim it's mapped to an int, causing subtle bugs
09:06:52PMunchAh, so csize_t is actually a different type
09:06:56PMunchI thought it was just a name change
09:08:14*solitudesf quit (Ping timeout: 252 seconds)
09:12:51FromDiscord<krab4t> any GUI library that can create notifications in Windows (not windows 10's toasts) just like firefox does
09:14:09PMunchkrab4t, something like this? https://github.com/dom96/notifications
09:14:28ZevvPMunch: There was this commit some time ago where csize was changed, and the obvious collatoral damage in the closeby Nim ecosystem was fixed, but that might still cause surprises for external libs etc. So that was rolled back and csize_t was intruduced instead, so csize can be obsoleted over time.
09:14:32PMunchOh wait, that was OSX only..
09:15:08FromGitter<alehander92> whats up
09:15:17FromGitter<alehander92> i see new github disbot
09:15:55*Vladar joined #nim
09:16:36PMunchWait, krab4t you want something not native?
09:17:12PMunchHaven't used Firefox on Windows so no idea what it does. But I imagine they just create a small window and position it roughly in the tray-bar area?
09:17:58FromDiscord<krab4t> yes
09:18:58FromDiscord<krab4t> ive implemented this osx's in 2015 on objc++, never touching it again https://raw.githubusercontent.com/Vacuum-IM/macintegration/master/macnotify.mm
09:21:15*sealmove quit (Quit: WeeChat 2.6)
09:23:59PMunchHmm, any ideas what causes this? http://ix.io/229j
09:24:07PMunchIt seems to happen no matter what I try to compile..
09:24:56PMunchTrying to follow this very dated article on Nim on Arduino: https://disconnected.systems/blog/nim-on-adruino/
09:26:53PMunchIt seems like it is the "--cpu:avr" flag that does it..
09:33:55*ng0 joined #nim
09:36:14AraqPMunch, are you on devel?
09:38:48PMunchNo, that was on 1.0.2
09:39:14PMunchI "fixed" it by simply editing the sets file and adding 'u32 on all those hex literals
09:42:39Araqok
09:42:59Araqlooks we need a test for 'avr' but iirc avr is a 16bit target
09:43:10Araqand adruino is 32 bits?
09:43:30lqdev[m]avr is an 8-bit architecture
09:45:22PMunchYeah this is an 8-bit chip
09:45:46Araqoh ok
09:51:35*floppydh joined #nim
09:53:36FromDiscord<mratsim> do they use int32 for array indexing?
09:55:18lqdev[m]afaik that shouldn't be a problem, avr-gcc supports any int size and float32 (but not float64)
09:58:17*theelous3 joined #nim
10:00:33PMunchAraq, alloc has the same issues: /home/peter/.choosenim/toolchains/nim-1.0.2/lib/system/alloc.nim(140, 16) Error: type mismatch: got <uint32, int32>
10:06:48FromDiscord<Rika> is there a turtle library for nim? i only need to draw very simple dots on a canvas
10:06:51AraqPRs welcome
10:07:16*couven92 quit (Read error: Connection reset by peer)
10:07:31PMunchunicode also complains. And math.nim has a "createFactTable" that has a `when` case for sizeof(int) == 4 and an else that assumes sizeof(int) == 8 which means it grows too large when sizeof(int) == 2
10:10:18Araq:-)
10:10:36Araqunicode for a 8 bit processor?
10:10:46Araqsounds like madness to me
10:12:58Zevvwhy? who cares how many bits are under the hood.
10:13:28*skelett quit (Quit: WeeChat 2.5)
10:15:07PMunchHaha, this is just because I was trying to use nimterop. Which albeit it runs on compileTime still tries to build the stdlib stuff as an 8-bit processor..
10:15:42AraqZevv, because unicode is based on tables that don't fit into memory when your address space is too small
10:16:26Zevvno problem, just fake it :)
10:16:40*skelett joined #nim
10:17:35Zevvhttp://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bit well look at that
10:19:23Araq"You can type a command and get a reply within a minute."
10:19:28Zevvgood enough
10:19:30Zevvyou *can*
10:19:51PMunchHaha
10:21:21PMunchWait, he wrote an ARM emulator for this?
10:21:50PMunchSo the 8-bit processor emulates an ARM processor to run Linux :P
10:22:05FromGitter<alehander92> nice
10:22:06Araqyup
10:22:51PMunchHaha "It takes about 2 hours to boot to bash prompt"
10:22:51Araqso ok, Linux totally works on this device we only had to emulate an entirely different CPU and it boots in 2 hours
10:25:29ZevvI once ported linux to an ARM chip that did not exist yet, it was running in an emulator at the silicon level instead.
10:25:34ZevvThat took a week to boot to the prompt
10:25:52Zevvbut it ran
10:30:04AraqI would have ported DOSBox instead
10:31:58*tane joined #nim
10:33:17Zevvyou probably can't fit dosbox in an AVR, but you can fit an ARM
10:38:42FromDiscord<itmuckel> @PMunch in nimlsp `openFiles` has a `fingerTable` with a whole lot of empty sequences. What is this `fingerTable`?
10:41:45PMunchWell
10:41:54PMunchPrepare for design stupidity
10:42:05PMunchLSP defines that all source code is sent in UTF-8 encoding
10:42:23PMunchIt also specifies that all indices into lines are sent as UTF-16 codepoints
10:43:02PMunchWhy? Probably because it's made by Microsoft and strings in C# and UTF-16. So they would need to convert it to UTF-16 codepoints anyways
10:44:42PMunchBut this means that I either need to convert the entire source code into UTF-16 every time it updates. Or since UTF-8 and UTF-16 codepoints are the same for 99% of the symbols you would actually use in code just create a finger table of the symbols that aren't the same and then when doing a lookup just check if you need to add some extra to you indices
10:45:16PMunchTry inserting some characters from where UTF-16 and UTF-8 don't overlap, and you will see some numbers in the finger table
10:45:20*thomasross quit (Remote host closed the connection)
10:45:46*thomasross joined #nim
10:46:00FromDiscord<itmuckel> lol, no need, I believe you. So I don't worry about this empty table. 🙄
10:46:54*tklohna joined #nim
10:49:17federico3Zevv: that's some impressive work
10:50:45PMunchitmuckel, yeah basically don't worry about it
10:51:26PMunchIt should theoretically work just fine, but I'm sure it will break if anyone actually tries it :P
10:52:25Zevvfederico3: it's mostly a silly hack, but its fun that people do these things
10:57:33FromGitter<rishavs> I am not sure what I am doing wrong here. I am trying to make an array of tuples; ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ but i am getting a type mismatch here. [https://gitter.im/nim-lang/Nim?at=5dd2791d52b73c7cb23c0930]
10:59:31narimiranyou cannot add to array
10:59:34narimiranuse seq
11:00:13narimiranand don't use Uppercase Names for variables, don't be a barbarian
11:01:22FromGitter<rishavs> > .>
11:15:52*krux02 joined #nim
11:24:45*kevin5 quit (Remote host closed the connection)
11:50:01*vsantana quit (Remote host closed the connection)
11:51:01*vsantana joined #nim
11:53:10FromDiscord<Rika> ok_variable_police (i'm joking)
11:57:28leorizenarimiran, disruptek, Zevv: I'm getting back to nim.nvim development, so if there's any feature that you'd like, please let me know (and preferably open issues for them so I won't forget :p)
11:57:43ZevvHmm. I can think of something
11:57:56narimiranleorize: "just" copy what ocaml's merlin is having :)
11:58:25Zevvleorize: what about vim8 support?
11:58:25leorizeah yea, I've added that to nimsuggest but hasn't implemented an interface yet :P
11:59:25Zevvyou're ignoring me, aren't you?
11:59:29narimiranwhat i frequently use is :MerlinTypeOf, so it tells me the type of some proc, e.g. `string -> int -> string` in the status bar. for nim version it would be nice to show proc's arguments
11:59:30leorizesure, I'll have to think of a way to keep the interfaces clean though
12:00:10narimirane.g. `s: var seq[T]; first, last: Natural`
12:00:30Zevvbut on a serious note: I'm pretty much feature complete and happy with it as it is now
12:01:01leorizenarimiran: yep, I've got that working in nimsuggest, will work on the wiring
12:01:13narimiranleorize: oooh, nice!
12:01:21narimiranyou're spoiling us!
12:03:43leorizenp, it's something that I found myself needing due to the amount of overloads
12:04:08FromDiscord<kodkuce> am i retarded if i still use somev = somev + 1 , insted inc, i cant get used to it at all
12:04:24leorizenah, it's just that inc = less typing :P
12:05:22*nsf quit (Quit: WeeChat 2.6)
12:06:40FromDiscord<kodkuce> its ok to recursively call async proc right?
12:06:49narimiranuse += if you don't like inc
12:07:14FromDiscord<kodkuce> hmm i am used to ++
12:07:27FromDiscord<kodkuce> so += is even wierder to me
12:07:39narimiraninb4 "write a template"
12:08:46FromDiscord<kodkuce> or hmm am i used to lol i frogot i thinked in c# i used ++ but i just check it dosent work , from where i did got it in my head duno
12:09:08Araqplease use 'inc'
12:09:39FromDiscord<kodkuce> yest its ++ i just forgot to put ;
12:09:48FromDiscord<Rika> ?
12:09:52FromDiscord<Rika> why not inc??
12:09:58FromDiscord<kodkuce> for now will use name= name+ 1
12:10:03FromDiscord<kodkuce> evrybody gets that
12:10:10FromDiscord<kodkuce> and not hard for me to write
12:10:17FromDiscord<Rika> how is inc hard to write
12:10:31FromDiscord<Rika> or harder to write than `name = name + 1`
12:10:32FromDiscord<kodkuce> it isent just hmm wierd for my brain
12:10:41FromDiscord<kodkuce> its easyer
12:10:43FromDiscord<Rika> inc means *inc*rement
12:10:45FromDiscord<kodkuce> to write inc
12:10:52FromDiscord<kodkuce> just am not used to it
12:11:01FromDiscord<kodkuce> in my brain it still feals wrong
12:11:07FromDiscord<kodkuce> i am resisting xD
12:11:15FromDiscord<Rika> y tho 🤔
12:11:27FromDiscord<Rika> why not just try to get used to it
12:11:28FromDiscord<kodkuce> whats opostit anywah dec
12:11:39FromDiscord<Rika> dec yes
12:11:52FromDiscord<Rika> you can think of inc as increase instead and it still kinda works
12:12:03FromDiscord<kodkuce> probably cuz i stubborn ashol
12:12:10FromDiscord<kodkuce> duno time will tell
12:12:27FromDiscord<kodkuce> meybe i get bored, especial when having longer name vars
12:24:33FromDiscord<mratsim> lol @narimiran the variable police
12:29:55*bacterio quit (Read error: Connection reset by peer)
12:36:07*kcvinu joined #nim
12:36:46kcvinuHow can i easily update nim ?
12:36:56FromDiscord<kodkuce> choosenim
12:37:07kcvinuThanks, let me try
12:37:30narimiran@mratsim you would be too if you had to go through such a codebase
12:37:50FromDiscord<Rika> thats very very true
12:38:14FromDiscord<kodkuce> https://play.nim-lang.org/#ix=22aI can anyone elaborate on this?
12:38:17narimiranbut you can try it for once, write YourVariables LikeThat and your_types likeThis
12:38:34narimiranwhy not throw in some misleading hungarian notation too?
12:39:30narimiranvar NotStringConst = 7
12:39:37FromDiscord<kodkuce> i canat use for loop in async if passing a var as argument?
12:41:28*u9898287 quit (Read error: Connection reset by peer)
12:41:57FromDiscord<kodkuce> yep if i run whout async it shoots no error
12:42:01FromDiscord<Rika> basically dont use a var in an async
12:42:04FromGitter<zacharycarter> I'm trying to compile with `nim cpp` and I've tried `-cc:gcc` as well as using apple clang
12:42:05leorizesounds like a bug
12:42:09narimiranbtw, what's with the "hard to write" stuff happening recently here??
12:42:11FromGitter<zacharycarter> I keep running into - `error: invalid argument '-std=c++14' not allowed with 'C'`
12:42:22FromDiscord<Rika> what's hard to write?
12:42:49narimirantoday it was that "inc" is hard to write, the other day guy wanted to change strformat module for everybody because for him writing `&` was hard
12:43:02FromDiscord<Rika> ah that
12:43:08FromDiscord<Rika> different language stuff perhaps
12:43:15FromDiscord<Rika> inc might not make sense to a bilingual
12:44:07FromDiscord<Rika> for ampersand
12:44:15narimiranwell, in my (and @kodkuce's) language `inc` would be, `pov` and `dec` would be `smanj`. what kind of an argument is that?
12:44:16FromDiscord<Rika> i dont know, its not something i think makes sense
12:44:54FromDiscord<Rika> prolly kodkuce doesnt know english well enough for inc to snap in his mind well enough
12:45:02kcvinunimble install choosenim shows an error "Package not found"
12:45:11narimiranbut no problem with `for`, `while`, `proc`, etc.?
12:45:43FromDiscord<Rika> for and while are more commonly used words, proc is idk
12:45:50narimirankcvinu: how did you install nim in the first place? use that method for updating too
12:45:53FromDiscord<Rika> im just guessing here
12:46:08Araqwrite more assembler code then 'inc' is natural
12:47:01narimirani had a similar problem with `shl` and `shr` in the beginning, because i was used to << and >>. but at some point you accept what a language gives you and you try to write idiomatic code
12:47:04kcvinunarimiran[m], In that case, what about my installed packages ? Do i need to re-install them ?
12:47:32narimirankcvinu: i don't know about your setup
12:47:50kcvinuOkay, thanks for the info
12:47:59FromDiscord<exelotl> I kinda hate shl/shr because I get left and right mixed up
12:48:11FromGitter<zacharycarter> is `nim cpp` not working because I'm missing some library / package? I thought I'd used the cpp backend on this machine before but maybe not
12:48:12FromDiscord<exelotl> So they're objectively harder for me to use
12:48:21FromDiscord<kodkuce> i didnet say it was hard just my brain is not used to it
12:48:59narimiran@excelotl i guess the same happens for << and >>?
12:49:19FromDiscord<exelotl> No, because I can see what direction that is pointing
12:49:31FromDiscord<exelotl> Don't need to associate the words
12:50:00Araqfor me it's the opposite, the direction has no meaning for me
12:50:05FromDiscord<kodkuce> one thing i dont get is why when initilising object i use : isnte = for stuff, var blabla = Book(pages:55, title:"nice") why its not Book(pages=55, title="nice")
12:50:14Araqso I confuse << and >> quite a bit
12:50:25FromDiscord<exelotl> That's so strange haha
12:50:47FromDiscord<exelotl> Funny how people think in different ways
12:51:16FromDiscord<kodkuce> when i was in army when the told me to turn left or right i just gess 50 50 , leater i figure out i just w8 for somone to start turning and fallow up
12:51:19FromDiscord<Rika> personally shl shr << and >> all confuse me
12:51:23FromDiscord<Rika> what order are the bits in
12:51:39FromDiscord<Rika> aka im big dum dum
12:53:34narimiran@Rika at least `&` is not hard for you to write :P
12:54:37FromDiscord<Rika> ahahaha
12:55:03FromDiscord<Rika> it makes a bit of sense why it doesnt connect with string interpolation thouhg
12:55:09FromDiscord<Rika> fmt is good
12:55:18FromDiscord<Rika> i dont see the connection of & and string formatting
12:55:53PMunchHmm, I tried to compile my dynamic library for Windows. It appears to run fine when I only run it with a single thread. But with multi-threading I get a SEGFAULT from nimFrame at excpt.nim:464
12:56:05Araqsh*l* --> mu*l*, sh*r* --> di*v*
12:56:09Araqworks
12:56:25FromGitter<zacharycarter> okay my issue appears to be because I'm compiling a C source file as well as a C++ source file? why is that an issue?
12:56:34narimiransh(i)t, sh(a)r(t)
12:56:55narimiran(i don't know the alphabet, nice.)
12:57:26kcvinunarimiran[m], Thanks. I re-installed nim and everything works perfectly.
12:57:37narimirankcvinu: nice to hear!
12:58:03*kcvinu quit (Remote host closed the connection)
12:58:55lqdev[m]@Rika the rightmost bit is the least significant bit (which denotes ones) and the leftmost bit is the most significant bit. shl shifts all bits by one towards the leftmost bit, and discards the current leftmost bit, and a similar thing happens with shr
13:02:43FromGitter<zacharycarter> can you push / pop passC/L pragmas ?
13:02:56leorizeno
13:03:18FromGitter<zacharycarter> well, that sucks
13:03:35leorizewhy?
13:03:46Zevvzacharycarter: how do you expect that to work? You can't link a part of your code with different options?
13:04:03FromGitter<zacharycarter> err I guess it's more of the passC pragmas I'm concerned with
13:04:18FromGitter<zacharycarter> I have some C and C++ code in my project which I'm compiling using `compile` pragmas
13:04:40FromGitter<zacharycarter> when I run `nim cpp` to compile the code, it's invoking clang not clang++ for the C source for some reason
13:04:49FromGitter<zacharycarter> and then I run into an error: `error: invalid argument '-std=c++11' not allowed with 'C'`
13:05:00FromGitter<zacharycarter> which I'm setting in a `passC` pragma before compiling the C++ source
13:05:08leorizeit was invoking clang++ for C source :p
13:05:16FromGitter<zacharycarter> I don't know
13:05:28leorizeonly clang++ understands -std=c++11
13:05:49FromGitter<zacharycarter> yeah but I don't think it's getting to the C++ code
13:05:52leorizewhat the error means is that the param is invalid while compiling C code
13:06:00Zevvso actually nim should take a --passCXX flag here
13:06:01leorizeanyhow, here's a walkaround:
13:06:05Zevvwhich it only passes to c++ compilers
13:06:39leorizecreates dummy modules with {.compiles.} for C sources and C++ sources
13:06:47leorizethen import them to the main module
13:07:26leorizenow you can tweak the compile options for each sets of C/C++ sources
13:10:03FromGitter<alehander92> but if you can pass passC to one function
13:10:09FromGitter<alehander92> you should be able to pass it to many
13:10:17FromGitter<alehander92> its a purely syntactic problem
13:10:28FromGitter<alehander92> if i understand it correctly
13:11:01FromGitter<alehander92> if its not about function pragmas, sorry
13:13:22FromDiscord<Rika> Araq, lqdev, thanks that makes sense
13:13:57PMunchAha, apparently it was because windows has --tlsEmulation:on by default, which means setupForeignThreadGC didn't get called
13:14:15FromGitter<zacharycarter> leorize: hmm I'm not sure if I'm doing what you suggested correctly or not... I now have a module that only has {.compile.} pragmas in it for the sources I want to compile. Then, in the module I import this into, I add the {.passC.} pragmas I want to compile that source with
13:14:21FromGitter<zacharycarter> is that correct?
13:15:25leorizeno, the {.passC.} stay in the dummy module
13:15:59FromGitter<zacharycarter> ah okay
13:20:34PMunchHmm, execProcess doesn't quite seem to work
13:20:52*clyybber joined #nim
13:22:54clyybberAraq: Hi, can you explain why destroying expression constructors is necessary?
13:23:14Araqbecause they take over ownership
13:24:00clyybberAh, hmm. I guess it makes sense. But they don't get destroyed when they are moved or sinked right afterwards right?
13:24:10*GordonBGood quit (Ping timeout: 252 seconds)
13:24:34Araqright
13:24:49Araqideally.
13:25:10Araqin practice there must be a reason for async crashing and burning so something is still off
13:25:30clyybberAnd why do we need to pArg(arg[0]) in some cases? I thought the first child of a nkCallKind is just the type of the proc?
13:25:33PMunchOh never mind..
13:30:37*fredrik92 is now known as couven92
13:31:38clyybberAraq: Ping, in case you didn't read my question above
13:32:06Araqthe callee can be a nkClosure that needs destruction
13:32:17Araqclosures are hard :P
13:32:41clyybberAh, and the consume argument tells p wether we move or sink it right afterwards?
13:33:49Araqyeah, but at this point 'p' and 'pArg' should be the same proc as I told you weeks ago :P
13:41:34clyybberHmm, yeah
13:44:43clyybberAraq: I think we should maybe start employing a branch based destructors approach. So destroys would be a tree of the various code paths and instead of having a consume parameter for p we just try to remove a destroy from the current branch whenever we move/sink/consume the respective object.
13:46:21FromDiscord<kodkuce> how to conwert binary to utf ?
13:46:52clyybberwith binary you mean string?
13:46:58*lritter quit (Ping timeout: 245 seconds)
13:47:26FromDiscord<kodkuce> yep a text conveted to binary shooted to me on reciving end that i got as binary and want to convert it back to utf
13:48:17clyybberwdym back? everything is "binary". Its just a matter of interpreting. So if you want all the UTF8 chars use the runes iterator
13:51:00FromDiscord<ZeeQyu> Perhaps @kodkuce is using the python 3 notion of binary as in a bytes object?
13:51:09FromDiscord<ZeeQyu> As opposed to a str
13:51:23FromDiscord<ZeeQyu> Between which you often have to encode/decode
13:51:38*lritter joined #nim
13:51:51FromDiscord<kodkuce> hmm atm form what i see godot sends data as banary, meybe i can ask around or dig deeper in its websocketclient.cpp to set opcode to send string insted, but anyway it sends stuff as biinary, and i am making backend in Nim so i nead to read it as text
13:53:03narimiranleorize: one more ocaml-thingy that would be great to have in Nim — :MerlinRename — it renames the variable in its scope (so, not in the whole file, just where it is needed)
13:53:03clyybberkodkuce: But a string is binary?
13:53:52FromDiscord<kodkuce> @[72, 101, 108, 108, 111] , so this is Hello , need to cast them to chars ?
13:54:12clyybberIs it a seq of bytes or int8 or something bigger?
13:54:50FromDiscord<kodkuce> hmm from here https://www.rapidtables.com/convert/number/ascii-hex-bin-dec-converter.html
13:54:59FromDiscord<kodkuce> its not binary its decimal
13:55:07FromDiscord<kodkuce> or at least thats how nim echos it
13:55:18clyybberkodkuce: Yeah, but thats not how its stored
13:55:45clyybberWhat type does it have in your Nim code right now?
13:55:54FromDiscord<kodkuce> can check
13:56:51FromDiscord<kodkuce> seq byte
13:57:00FromDiscord<kodkuce> so i need byte to utf
13:57:37clyybberCast it to a string
13:58:01*nsf joined #nim
13:58:56*vsantana quit (Remote host closed the connection)
14:01:50clyybberAraq: Why is that consume param needed in the first place? Is it just an optimization?
14:01:51FromDiscord<kodkuce> hmm , echo (char)packet[0] works but echo (string)packet.join does not
14:02:28clyybbercast not convert
14:02:33Araqclyybber: it's needed because pArg and p are different but should be the same thing
14:02:35FromDiscord<kodkuce> is there a 1 liner to cast all byts to char and join to string
14:02:41AraqI was too lazy to refactor it properly
14:03:02clyybberkodkuce: You don't need to.
14:03:08clyybberJust cast the whole thing to a string
14:04:28clyybberAraq: I mean if we call it with consume = true, it should be the same as calling it normally and just generating a wasMoved afterwards?
14:04:41FromDiscord<kodkuce> i tryed but got nummber again
14:04:54FromDiscord<kodkuce> or meybe i dont need join first
14:04:56FromDiscord<kodkuce> will try
14:05:07clyybberAraq: Did you introduce it because we can't gen a wasMoved on a expresion constructor?
14:07:11clyybberkodkuce: Remember that types are a compile time construct and that everything is binary. What changes when you cast the seq[byte] to string is the echo call. Instead of interpreting it as a number it will interpret it as a UTF8 string.
14:15:01FromDiscord<kodkuce> hmm am trying to do it in nim playgradoun but duno how to create a seq of bytes
14:17:10*solitudesf joined #nim
14:17:22FromDiscord<kodkuce> clyybber: https://play.nim-lang.org/#ix=22bX hmm duno how to fill example but anyway this is what i get when i try just casting, only thing that works is forloping and casting evry int to char and creating new string thats probbaly a retarded way to go
14:18:27clyybberMake the first element of the seq "84'u8"
14:18:33clyybberBecause a byte is 8 bits
14:18:48clyybberAnd thus the same as a uint8
14:19:13clyybberand appending 'u8 to a number is saying "this is a uint8 literal"
14:19:21zedeuskodkuce: to cast, do `cast[string](input)`
14:20:04clyybberkodkuce: This is your example but correct: https://play.nim-lang.org/#ix=22c0
14:21:43FromDiscord<kodkuce> zedeus: that works ty for spoon, now i go with clyybber for knowledge 🙂
14:24:30FromDiscord<kodkuce> ok so i think i get it now when i joined it i got a number then it coudnet cast it per letter, and just duno why echo (string)input shoots error how its diferent then cast[string](input)
14:25:00FromDiscord<kodkuce> and i dident know that byts were writed like that
14:25:58FromDiscord<Rika> because thats not how nim's syntax works?
14:26:47FromDiscord<kodkuce> it works for int to char
14:27:23FromDiscord<kodkuce> i can do echo char(someint) or at least i think
14:27:42narimiran:)
14:28:26clyybberkodkuce: Thats because (string)input is saying: string(input) , meaning you are converting input to string
14:28:32clyybberWhich in nim is different to casting
14:29:03clyybberConverting can change the underlying binary
14:29:10clyybberWhile casting will just change the type
14:29:44FromDiscord<Rika> oh wow (string)input is valid?
14:29:55FromDiscord<Rika> it kinda makes sense
14:29:57FromDiscord<Rika> but it also doesnt
14:30:02FromDiscord<kodkuce> its not
14:30:04FromDiscord<kodkuce> i think
14:30:12FromDiscord<Rika> its "valid" in terms of syntax
14:30:19FromDiscord<Rika> not in the context you have
14:30:24FromDiscord<Rika> but syntactically it is
14:30:29FromDiscord<Rika> is what i mean
14:31:10FromDiscord<kodkuce> hmm it shoots error if you try (string)'a'
14:31:23narimiranyou can do `var a = (uint)32`
14:31:57narimiranbut even if you can it doesn't mean you should
14:32:06FromDiscord<kodkuce> (int)'z' works, but anyway just to be sure for now on will use cast proc
14:32:11narimiran(see above under "confusing your readers with Uppercase Variables)
14:33:06clyybberkodkuce: No no no, don't use cast for everything. Think about the problem at hand and then decide. (In this particular case the cast is appropriate.
14:33:26FromDiscord<Rika> WHAT_doYou_mean_about_ConfusingReaders
14:34:03clyybberkodkuce: Conversion: `int(z)` or `z.int` (or even `(int)z`) Cast: `cast[int](z)`
14:34:14lqdev[m]also, don't use (SomeType)someValue, Nim is not C
14:34:20Yardanico@Rika w_H_a_T also works
14:34:29Yardanicosame as what :P
14:35:06FromGitter<zetashift> what monster would write it like that
14:35:19Yardanico:D
14:35:19narimiranlqdev[m]: that's what i was trying to say. use what clyybber is showing in first two examples
14:35:38narimiranheeey Yardanico!!
14:35:40lqdev[m]agreed
14:35:46Yardaniconarimiran: hello, i'm always there btw :P
14:35:55YardanicoI always have quassel opened on my second monitor
14:35:58narimiranYardanico: why are you so quiet then?
14:36:05Yardanicoi don't really know
14:36:25narimirani remember you being quite active and helpful when i was starting with nim
14:36:47FromDiscord<kodkuce> hmm conversion is when you literately want to transform from one type to other and casting is when you just want to read the value as diferent, or not i think i dont get whats difference between casting and conversion
14:36:54narimiranYardanico: don't you see all these new guys waiting for your help? :)
14:36:59Yardanico:D
14:37:29FromDiscord<Rika> conversion changes bits, casting does not (from what i infer, im prolly almost completely wrong though)
14:37:44FromDiscord<Rika> maybe i got it flipped too
14:37:46FromDiscord<Rika> i cant tell
14:37:50FromDiscord<kodkuce> 🙂
14:37:58clyybberRika: It is right in general, but conversion doesn't have to change bits
14:38:19lqdev[m]@Rika it's the opposite
14:38:27FromDiscord<Rika> so what is it
14:38:30FromDiscord<Rika> who is right here
14:38:34clyybberlqdev[m]: No
14:38:38clyybberI am right :p
14:38:50FromDiscord<Rika> impending war?
14:38:52lqdev[m]conversion can do some specialized actions to convert one type to another, `cast` literally interprets bytes as a different type
14:39:00clyybberThats what Rika said
14:39:24lqdev[m]re-read their message
14:39:29FromDiscord<Rika> conversion -> changes bits, does special stuff as you said
14:39:29FromDiscord<Rika> cast -> doesnt change bits, literal interpretation of bytes as you said
14:39:40FromDiscord<Rika> ???
14:39:44clyybberOf course nothing actually changes bits as we return the new value.
14:39:48lqdev[m]oh, in that sense
14:39:50FromDiscord<Rika> im hella confused
14:39:51clyybberBut Rika meant the right thing
14:39:52lqdev[m]I just misinterpreted
14:39:55clyybberOk
14:40:04FromDiscord<Rika> how did you interpret my message? i wonder
14:40:10lqdev[m]type conversions are confusing.
14:40:13clyybberAlso cast can truncate if you want to get a bit more confused :)
14:40:22narimiranwe need a third opinion, to increase the confusion! :D
14:40:22FromDiscord<Rika> thought conversions are too
14:40:34narimirannice, clyybber :D
14:40:47FromDiscord<Rika> pr to make `transmute` proc
14:40:52narimiraneverything changes bits!!!
14:40:58lqdev[m]narimiran: we need 5 or more options, we need more C++ madness
14:41:31clyybberInplace cast, not really needed since gcc will optimize it anyway, but hey, if you ask for confuse I give you confuse
14:41:57lqdev[m]and make their semantics completely unobvious to lead to even more confusion
14:41:58narimirani don't understand what is so confusing. things are quite simple. conversion changes bits except when it doesn't; casting doesn't change bits except when it does. there.
14:43:38FromDiscord<Rika> conversions do what it wants unless it doesnt, casting doesnt do shit unless it does
14:43:38FromGitter<alehander92> why does cast change bits
14:43:40FromDiscord<Rika> 😛
14:43:42FromGitter<alehander92> ahh it can truncate
14:44:18FromGitter<alehander92> you can say that i guess
14:44:44narimiran@alehander92 see above, we're trying to be as confusing as possible :D
14:45:24FromDiscord<Rika> conversions convert unless it casts, casts cast unless it converts
14:46:36Yardanicoi'm sorry but r/DecreasinglyVerbose
14:46:54clyybberr/DecringVerbo ?
14:47:15clyybber
14:47:24Yardanico-r/DecringVerbo
14:47:47clyybberr/DingVose
14:48:38FromDiscord<Rika> r/decvbs
14:50:24FromGitter<alehander92> dcvbs
14:50:28FromGitter<alehander92> how can you use vowels
14:50:51FromGitter<alehander92> kp th unx trdtn
14:51:15*dddddd joined #nim
14:52:10*couven92 is now known as fredrik92
14:53:56PMunchHmm, is there a way for Nim to specify a const * when importing from C?
14:54:35PMunchI get this: http://ix.io/22cb
14:55:01PMunchWhen trying to use {.compile: "thefile".} and then add a proc with a cimport
14:55:54PMunchI've tried to add it with nodecl as well, but then I just get an error that it isn't defined..
14:57:29*rockcavera quit (Remote host closed the connection)
14:59:55PMunchWhat's weird is that in the call that fails with "undefined reference to `inet_ntop`" I can see that it has /home/peter/.cache/nim/client_d/inet_ntop.c.o in the list..
14:59:56*ng0 quit (Ping timeout: 260 seconds)
15:00:11narimiran@alhndr92 i cn ndrstnd wht y jst sd
15:01:26PMunchAh.. "nm -a /home/peter/.cache/nim/client_d/inet_ntop.c.o" shows that the symbol is in fact not there..
15:02:00FromDiscord<Rika> i cnnt. cn smn gd m n wht thy sd?
15:02:36PMunchAh, it was a compile flag that's messing it up..
15:03:00PMunchHAVE_INET_NTOP is apparently true..
15:06:00*UxerUospr joined #nim
15:08:20*thomasross quit (Remote host closed the connection)
15:08:23leorizenarimiran: you got :NimReferences, just change the usage one-by-one :P
15:08:44*thomasross joined #nim
15:09:43*PMunch quit (Quit: Leaving)
15:10:21*kcvinu joined #nim
15:11:03narimiranleorize: oh, nice, i didn't know about that one
15:11:11kcvinuIn windows, finish.exe is dissappearing after installation, without a success message.
15:11:29narimirankcvinu: antivirus?
15:11:50kcvinuIts quite good if the program says a "Successfully installed version xxxx"
15:12:19kcvinunarimiran[m], I am not sure about that
15:12:31narimiranah, you just mean nothing is printed upon finishing?
15:12:39kcvinuYes
15:12:50kcvinucmd window just vanished
15:12:52narimiran(btw, i'm not getting highlighted if you use narimiran[m], use narimiran instead)
15:12:58kcvinuno messages
15:13:09kcvinuOh, i see
15:13:12leorizenarimiran: maybe you should logout from matrix if you don't use it
15:13:45narimiranleorize: then i won't know anymore how to log back in :D
15:14:08leorizejust join the room again :P
15:14:23FromDiscord<mratsim> Antivirus, I'm happy I don't haave to deal with that
15:14:37FromDiscord<mratsim> it slows down compilation so much
15:15:37narimiranleorize: there you go, i just signed out from riot.im, hopefully that fixes things
15:16:03narimirannah, narimiran[m] is still here
15:16:34*Hideki_ joined #nim
15:16:49kcvinunarimiran, yes. the [m] is still there
15:17:15leorizenarimiran: send `!quit` to @appservice-irc:matrix.org
15:17:58kcvinuDoes "{.global.} pragma makes a function a static function ?
15:18:17leorizeit doesn't do anything on functions
15:18:29kcvinuOh, isee
15:20:05*narimiran[m] left #nim ("User left")
15:20:34*narimiran is the only narimiran here now
15:20:59kcvinuThen how do you create static functions in a type ?
15:21:40leorizenim doesn't assign functions to type
15:22:54kcvinuI mean nim's fake type functions, what ever it is
15:23:18leorizewhat exactly are you trying to do?
15:24:04kcvinuTrying to write a proc which is shared by all the instance of a type
15:24:29leorizeuhmmm why would you need something like that?
15:24:46leorizeand procs in Nim are "static" in OOP sense by default
15:24:48kcvinuJust to convert my existing vb.net code
15:25:31kcvinuSo you mean, a normal proc is enough for me, right ?
15:25:37leorizeyea
15:25:54kcvinuThanks for the answer. Let me try :)
15:26:24kcvinuThen i am assuming, that a global varibale will be a static variable
15:27:02kcvinuA local variable with {.global.} pragma behaves like a static variable
15:27:41leorizeyou got it :)
15:29:11*kcvinu quit (Remote host closed the connection)
15:32:28*nsf quit (Quit: WeeChat 2.6)
15:34:41*Hideki_ quit (Remote host closed the connection)
15:35:34*Hideki_ joined #nim
15:35:50*tklohna quit (Ping timeout: 276 seconds)
15:38:26leorizenarimiran: I believe this is what you want? https://asciinema.org/a/JbWzkxkwCUjHlaxHle76SrP74
15:38:39leorizeoops got a typo
15:38:54narimiranno, i don't want non-existing pages, why would you think that??
15:38:55leorizehttps://asciinema.org/a/JbWzKxkwCUjHlaxHle76SrP74
15:39:32leorizenarimiran: ^
15:39:38*Hideki_ quit (Ping timeout: 240 seconds)
15:39:40narimirani know i know :)
15:40:18narimiranyeah, that's it, merlin shows it at the bottom, but this way it is even nicer - you don't have to move your eyes from the line you're looking at
15:41:10leorizeyep, except that I found a compiler bug on the way
15:42:15narimiranyou know the rule: you find it, you fix it :P :D
15:43:19FromDiscord<Rika> sounds like a brutal rule
15:44:31leorizeit's because I'm the only one actively working on nimsuggest :P
15:45:24narimiran@Rika leorize is a brutal man! didn't you see how fast he grants our wishes regarding nim.nvim?
15:54:21*kcvinu joined #nim
16:07:42*Hideki_ joined #nim
16:11:57*sealmove joined #nim
16:12:51*NimBot joined #nim
16:19:23FromGitter<zacharycarter> is there any way to find out how long the GC is taking to collect?
16:22:05FromGitter<zacharycarter> I have some hiccups in my game when scrolling around a map and I'm trying to figure out if they're due to GC stress
16:27:06Yardanicowhat about profiling your application? you'll see if the GC collection takes too much time
16:27:37YardanicoI know that mratsim used XCode's profiler (afaik) on macOS, there's also `prof` on Linux
16:28:42clyybberzacharycarter: https://nim-lang.org/docs/system.html#GC_getStatistics
16:29:07clyybbermax pause time seems to be what you are looking for
16:29:21FromGitter<zacharycarter> thanks
16:30:51FromGitter<zacharycarter> weird - I'm just doing some basic benchmarking and it seems to be caused by polling sdl2
16:34:23FromGitter<zacharycarter> someone else was having issues with hiccups and sdl2 (nimgame2) I think recently
16:38:06FromGitter<zacharycarter> maybe has to do with - https://hg.libsdl.org/SDL/rev/9091b20040cf
16:41:46FromGitter<zacharycarter> yup! that was it! rolling back to 2.0.8 fixed the issue
16:47:05*Trustable joined #nim
16:47:32*tane quit (Quit: Leaving)
16:49:29FromGitter<zacharycarter> https://imgur.com/8AVbeY4
16:50:56*Hideki_ quit (Ping timeout: 240 seconds)
16:51:24UxerUospr@zacharycarter: Cool! Looks neat so far
16:52:07FromGitter<zacharycarter> thanks
16:54:13sealmovezacharycarter hey! It's very early but because I think you might be interested, check https://github.com/sealmove/nimitai
16:54:38*rockcavera joined #nim
16:54:45FromGitter<zacharycarter> hey sealmove! cool :D will check it out
16:54:46sealmoveWith this you will be able to open any file without a parser!
16:55:19sealmove(the parser will be created at CT just by pointing to a yaml description file)
16:56:09FromDiscord<kodkuce> what you making civ6?
16:57:45sealmovezacharycarter: npeg read yaml and produces a proc at CT that parses the relevant file format and returns you an object with its structured information
16:58:16FromGitter<zacharycarter> kodkuce: no, an rts game
16:58:21Zevv*assuming* you can get npeg to parse yaml, and do that at compile time :)
16:58:46FromDiscord<kodkuce> i was thinking to make game like Generals Zero Hour
16:58:59FromDiscord<kodkuce> but first need to finish atm work
16:59:39sealmoveZevv: after looking into it I realized ksy is a restrictive subset of yaml, so it's not that hard
16:59:49*nsf joined #nim
17:00:50*jwm224 quit (Quit: WeeChat 2.7-dev)
17:02:01Zevvah ok, thats not according to the spec, which says it should parse any yaml
17:02:31sealmoveit is, it says "every ksy is a valid yaml", this implies subset.
17:02:35*jwm224 joined #nim
17:02:48sealmoveit says "ksy should be parsable with a generic yaml lib"
17:03:03*kcvinu quit (Remote host closed the connection)
17:03:30federico3madprops: I've updated nimble.directory to Nim 1.0.2
17:03:44federico3also, 1.0.2 is backported to Debian Buster
17:05:23*krux02 quit (Remote host closed the connection)
17:06:21*tklohna joined #nim
17:06:44FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/ONla/image.png)
17:06:45FromGitter<zacharycarter> need to work on tile blending now
17:11:13Zevvsealmove: ah ok, true that
17:17:47clyybbernice zacharycarter!
17:26:08FromDiscord<kodkuce> beh now i have to hack half of my code cuz i used async with var
17:26:50FromDiscord<kodkuce> zacharycarter: stronghold xD
17:36:35livcdzacharycarter: where do you work now ?
17:40:55FromGitter<zacharycarter> livcd: Frogmind
17:41:44FromGitter<zacharycarter> clyybber: thanks!
17:41:59FromGitter<zacharycarter> kodkuce: yeah, strongold is cool :D
17:42:01livcdit looks nice indeed
17:42:42lqdev[m]I have a bit of a problem with Wren. I'm doing things as per the tutorial http://wren.io/embedding/calling-wren-from-c.html, but for some reason I get an error "Null does not implement 'run()'." here's my code: https://github.com/liquid600pgm/euwren/blob/master/tests/tvariables.nim
17:42:55FromGitter<zacharycarter> thanks!
17:43:03lqdev[m]maybe someone can spot the issue? I've been staring at this for hours and can't see the source
17:43:52*floppydh quit (Quit: WeeChat 2.6)
17:50:22*tklohna quit (Ping timeout: 252 seconds)
17:55:24*tane joined #nim
17:56:21donpdonplqdev[m]: just wanted to say it neat you're imbedding a lang in your app. ive heard of wren never used it. i have embedded jq in my app for its java-processing-langauge and its fun
17:57:07donpdonps/java/json/
17:57:28sealmovefilled-in README.md describing the vision: https://github.com/sealmove/nimitai
17:57:43FromDiscord<kodkuce> would be hard to make nim not to have to forward declare?
17:58:10clyybberkodkuce: Add {.experimanetal: "codeReordering".} at the top of your file
17:58:30clyybberand correct my typo :p
17:58:48FromDiscord<kodkuce> now cuz i cant use async with var i have to mix global var and proces ruined my order
18:00:08*Trustable quit (Remote host closed the connection)
18:00:45FromDiscord<kodkuce> that helped 🙂
18:07:50leorizecan't use async with var?
18:09:04*ng0 joined #nim
18:15:06FromGitter<mratsim> isn't it reorder: on ?
18:15:11FromGitter<mratsim> what's codeReordering
18:18:46FromDiscord<kodkuce> leorize: in proc i cant put var to pass by ref, so no proc someasync(thingy: var someobj)
18:19:34FromDiscord<kodkuce> mratsim: duno i put like he told and it worked
18:19:49clyybbermratsim: Sadly it isn't anymore
18:19:54clyybberIt was made experimental
18:19:54leorize@mratsim: it was moved into an experimental feature
18:20:24FromGitter<mratsim> My question was more, do we have 2 pragma for the same thing?
18:20:29clyybberno
18:20:36clyybberreorder: on doesnt work anymore
18:20:57FromDiscord<kodkuce> expression 'read(future_611885)' is of type 'string' and has to be discarded
18:21:21FromDiscord<kodkuce> proc player_sit(who:Player, wanted_slot:int, points:int):Future[string]{.async.}=
18:21:38FromDiscord<kodkuce> did i write it wrong its Future[T] form what i read
18:22:23clyybberpls look at the error. You are doing something wrong at the callsite
18:23:01FromDiscord<kodkuce> await player_sit(playerConnections[taken_connection_slot], izjsona["place"].getInt, izjsona["points"].getInt)
18:23:11FromDiscord<kodkuce> i am awiaiting it
18:23:27*Hideki_ joined #nim
18:23:44clyybberHmm, no idea then, sorry
18:24:30FromDiscord<kodkuce> this async stuff loves to troll me
18:24:45clyybberkodkuce: Umm
18:24:49clyybberYou have to assign
18:24:51clyybberthe await
18:25:02clyybberYou have to somehow use it
18:25:13clyybberlike `discard await player_sit
18:25:29clyybberor `let s = await player_sit`
18:26:00FromDiscord<kodkuce> lol
18:26:06FromDiscord<kodkuce> ye duno how i missed that
18:27:51*Hideki_ quit (Ping timeout: 246 seconds)
18:45:38*lritter quit (Ping timeout: 240 seconds)
18:48:38*sealmove quit (Quit: WeeChat 2.6)
18:49:02*letto_ quit (Ping timeout: 252 seconds)
18:58:32Araqany physics students around?
18:58:51FromDiscord<kodkuce> i do pushups xD
19:01:32narimiranAraq: @Vindaar maybe?
19:08:25*uu91 quit (Ping timeout: 265 seconds)
19:08:40*uu91 joined #nim
19:11:07FromGitter<cloudcalvin> Hey guys, please forgive my incompetence if the is really simple or coved in the docs already: I am trying to understand if its possible to have a list/array/seq of static strings and iterate through them with a for loop at compile time? It seems no matter what a wrap in `static` when creating the seq/array, the item extracted from my list is always a non-static string.
19:11:16*exelotl joined #nim
19:12:18ehmrycloudcalvin have you tried `const`?
19:13:50ehmryi think the recommendation is to place the iteration in a proc, and then use that proc to produce a const value
19:21:32*letto joined #nim
19:44:42*jjido joined #nim
19:51:27*bacterio joined #nim
19:51:27*bacterio quit (Changing host)
19:51:27*bacterio joined #nim
19:56:13FromGitter<cloudcalvin> I have tried const. To give some context I am trying to write a `nimteropt` script for something, and so everying is defined as const
19:56:59FromGitter<cloudcalvin> I am basing it on the template(https://github.com/nimterop/nimterop/blob/master/nimterop/template.nim)
20:06:52FromGitter<cloudcalvin> trying to get the as the end result: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ where `pkgs` are meant to be static strings. But the compiler keeps telling me pkg is a string, not a static string. [https://gitter.im/nim-lang/Nim?at=5dd2f9dce75b2d5a19f7da65]
20:09:25FromGitter<cloudcalvin> I define pkgs as `const pkgs = @["I", "assume", "these", "are", "static"]`
20:10:56FromGitter<genotrance> cCompile is a macro
20:11:10FromGitter<genotrance> you have to pass it strings that are known at compile time
20:11:26FromGitter<cloudcalvin> yeah but thats why pkgs are const?
20:12:16FromGitter<genotrance> please share a snippet
20:16:03FromGitter<cloudcalvin> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dd2fc03eeb63e1a83d8f9ae]
20:16:41FromGitter<cloudcalvin> as mentioned, its based on the template I linked
20:17:38FromGitter<cloudcalvin> I have tried different variations using sets and lists for `pkgs`:
20:17:51FromGitter<cloudcalvin> Such as: const pkgs = static([static("db"), static("gsi"), static("tl"), static("rdb")])
20:18:18FromGitter<cloudcalvin> I assume the issue lies with the for loop
20:18:37FromGitter<genotrance> ya the static string gets demoted to a string, not sure how to solve this
20:19:31FromGitter<genotrance> perhaps Araq has some advice - macro expects a static string but for loop converts a static seq string into a string
20:19:59FromGitter<genotrance> just have to call cCompile manually for each item for now
20:20:47FromGitter<cloudcalvin> Yeah I'v been looking for a `when`-like equivalent for `for` to no avail.
20:21:20FromGitter<cloudcalvin> Yeah, I am doing it manually for now; thanks for your input.
20:21:40FromGitter<cloudcalvin> Just not what I want in the long run
20:26:29*nsf quit (Quit: WeeChat 2.6)
20:32:53FromGitter<genotrance> ya will be great if you can open an issue with a simple example
20:32:56FromGitter<genotrance> instead of nimterop
20:33:07FromGitter<genotrance> it just needs a macro that accepts a static[seq[string]]
20:34:13*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:34:41FromGitter<cloudcalvin> Sorry; are you saying I should create the issue on the nimteropt issue board?
20:35:19FromGitter<cloudcalvin> If, so, cool I will try to write the solution myself and add it to the issue
20:35:57FromGitter<cloudcalvin> Or make a macro that does what I want `for` to do.
20:36:55FromGitter<cloudcalvin> Again, thanks for the assistance
20:40:28FromGitter<genotrance> no it is a nim issue
20:41:15FromGitter<zaphodef> hi there! shouldn't the type for arg `x` of math proc `frexp` be `float32 | float64` in https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/math.nim#L853 ?
20:43:00FromGitter<genotrance> https://play.nim-lang.org/#ix=22dE
20:43:55FromGitter<genotrance> @cloudcalvin ^^
21:05:55FromGitter<cloudcalvin> Thanks for the clarification @genotrance, see https://github.com/nim-lang/Nim/issues/12679
21:05:57disbot^ Static strings get demoted to string when used in a for loop
21:05:57disbot^ snippet at https://play.nim-lang.org/#ix=22dO 😏
21:09:12FromGitter<TensorTom> @s0kil compiling Jester with `--threads:on` produces: `jester.nim(1286, 7) Error: 'match' is not GC-safe as it accesses 'auth' which is a global using GC'ed memory`
21:09:50*clyybber quit (Quit: WeeChat 2.6)
21:11:11*narimiran quit (Ping timeout: 265 seconds)
21:13:29FromGitter<s0kil> This has to do with the auth
21:13:36FromGitter<s0kil> 'auth' which is a global using GC'ed memory
21:26:26FromDiscord<kodkuce> sOkil: form what i know if you using threads:on you need to use .varthread.
21:26:50FromDiscord<kodkuce> or .threadvar. xD
21:28:22FromDiscord<kodkuce> https://forum.nim-lang.org/t/5528
21:31:16*GordonBGood joined #nim
21:32:45FromDiscord<kodkuce> hmm does recrusivnes grow memory? https://play.nim-lang.org/#ix=22dS
21:34:30federico3https://lobste.rs/s/ikukut/danger_simplicity
21:35:26FromDiscord<kodkuce> federico3: this for me?
21:35:36federico3no, everybody
21:35:36*GordonBGood quit (Ping timeout: 240 seconds)
21:36:03FromDiscord<kodkuce> oh i thinked you answering my question 🙂
21:36:56FromDiscord<kodkuce> i need to learn to write thought instead thinked, but dosent thinked sound better
21:38:38madpropsis there something for the opposite of expandTilde?
21:41:04madpropsis there a replace that will match cat in "catpok" but not "xcatpok" ?
21:41:13madpropsi would use regex but im using getHomeDir
21:41:20madpropsdon't know how to build it yet
21:42:55*UxerUospr quit (Quit: Lost terminal)
21:43:36*ng0 quit (Ping timeout: 260 seconds)
21:44:41FromDiscord<kodkuce> hmm insted recursive i should use while, async works with wile right
21:45:06*tane quit (Quit: Leaving)
21:47:59madpropshow can i dynamically build a regex string using variables?
21:48:10madpropsim looking for something similar to re"{someVariable}"
21:48:47*ng0 joined #nim
21:53:19FromDiscord<kodkuce> cant help i duno 😦
21:58:55FromDiscord<madprops> ok got it
21:58:59FromDiscord<madprops> ```nim
21:58:59FromDiscord<madprops> proc smalldir*(path:string): string =
21:59:00FromDiscord<madprops> let str = re(&"^{getHomeDir()}")
21:59:00FromDiscord<madprops> path.replace(str, "~/")
21:59:00FromDiscord<madprops> ```
22:01:02donpdonpvar overlaps: seq[tuple[string, Offer]] whats the right way to declare that
22:02:23donpdonpnim says ':' or '=' expected, but got ']'
22:03:17FromDiscord<exelotl> I think you need to name the tuple fields
22:03:30FromDiscord<exelotl> var overlaps: seq[tuple[foo:string, bar:Offer]]
22:05:56*solitudesf quit (Ping timeout: 252 seconds)
22:06:08donpdonpexelotl: that did it thx
22:06:32FromDiscord<exelotl> np
22:06:44FromDiscord<kodkuce> @madprops dont post formated code they will kill you
22:07:18FromDiscord<kodkuce> i heard IRC gang has most psycho killers
22:08:49madpropslol ok
22:23:03*jwm224 quit (Quit: WeeChat 2.7-dev)
22:25:10*Hideki_ joined #nim
22:26:30*krux02 joined #nim
22:26:59*ng0 quit (Quit: Alexa, when is the end of world?)
22:29:14*Hideki_ quit (Ping timeout: 240 seconds)
22:33:03*sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in)
22:35:12*sacredfrog joined #nim
22:44:37*jua_ joined #nim
22:50:42*jwm224 joined #nim
22:50:54*jwm224 quit (Client Quit)
22:56:49*jwm224 joined #nim
23:00:03madpropsoh cool, nim supports arm
23:00:03*jjido joined #nim
23:06:12FromGitter<Vindaar> @Araq @narimiran for once I was actually not lurking, haha. How can I be of service? ;)
23:17:59FromDiscord<kodkuce> araq is working on rope to moon so he can steal newruntime source from goblins dwelling there, but he needs you to compute the fluctuation of side forces
23:21:33FromGitter<Vindaar> Oh, that sounds like a fun and tough challenge.. Good thing it's not nazis from the "dark side of the moon" though :P
23:22:23*krux02 quit (Remote host closed the connection)
23:26:05*Vladar quit (Quit: Leaving)
23:29:41*jua_ quit (Quit: Leaving)
23:31:32*uu91 quit (Read error: Connection reset by peer)
23:31:46*uu91 joined #nim
23:49:53*uu91 quit (Read error: Connection reset by peer)
23:50:14*uu91 joined #nim
23:54:15*uu91 quit (Read error: Connection reset by peer)
23:54:35*uu91 joined #nim
23:55:35*uu91 quit (Read error: Connection reset by peer)
23:55:53*uu91 joined #nim