<< 30-09-2019 >>

00:04:26shashlickPlease use a paste service
00:10:16dom96SrMordred: yes, this is a asynchttpserver vs. httpbeast Request issue. The Nim compiler should show the type with the module name explicitly, so you should report this there I think
00:31:05*owl_000 joined #nim
00:35:47*sealmove quit (Quit: WeeChat 2.6)
00:39:44*navinmistry joined #nim
00:44:03*navinmistry quit (Ping timeout: 245 seconds)
00:44:50FromDiscord<exelotl> ok so basically writeFile skips null characters on 1.0.0 on windows
00:48:01FromDiscord<exelotl> tested 1.0.0 (debian 32 bit), 0.20.2 (win64), 1.0.0 (win64), latest nightly (win64)
00:48:37FromDiscord<exelotl> it only happens on windows. It doesn't happen on 0.20.2 but it does happen on the latest nightly
00:51:03shashlickCan you look at the git history
00:57:17FromDiscord<exelotl> huh it's this line here: https://github.com/nim-lang/Nim/commit/742862b847646dff4562992cd502d3077b2c9474#diff-d731409ef6a47072e6cffa4aca6f6dccR205
00:58:01shashlickBlame?
01:01:13disruptekbut araq is on windows.
01:02:19FromDiscord<exelotl> uuh I know that `git blame` is a command but I don't see how it fits into the world of raising issues and making pull requests lol
01:03:13FromDiscord<exelotl> I linked the line on the commit where it happened, should I make an issue or is there something more for me to do?
01:03:26disruptekjust trying to figure out how it passed tests. is it possible that we should be using getOsFileHandle and we're not?
01:04:11FromDiscord<exelotl> are there tests that involve reading/writing files containing null characters?
01:04:47*ng0_ joined #nim
01:05:09disruptekwell, for some reason, that code was in and we thought it was right.
01:05:32disruptekthen it was out with a `while false` and then it was put back in.
01:05:49disruptekand the tricky bit is that for at least one windows user, it's clearly wrong. πŸ˜‰
01:06:22disruptekcan you PR a test and a patch? then at least we'll know that it passes CI.
01:07:24*ng0 quit (Ping timeout: 260 seconds)
01:07:57FromDiscord<exelotl> ok πŸ‘
01:10:26disruptekhmm, the question is, why did this code go in.
01:11:34*skoude joined #nim
01:12:23disruptekit looks to me like a simple logic error; ie. it wants to remove nulls from console output but instead it's removing them from file output. but what i don't understand is that the test makes the same assumption.
01:14:23disruptekso maybe we just need to be smarter about discerning between console output and other file output.
01:15:59shashlickBest to open an issue or pr and see what Araq has to say
01:16:32*skoude quit (Ping timeout: 268 seconds)
01:17:40shashlick@disruptek gonna run those tests in a bit
01:18:30disruptekcool. i can't get feud to do much on linux. it runs but crashes right away.
01:18:45disrupteki mean, regardless of what the env is set to.
01:25:03disruptekand regardless of whether the flag is engaged, of course.
01:34:54FromDiscord<exelotl> eh I really ought to sleep, I'll finish this tomorrow
01:35:10FromDiscord<exelotl> if anyone wants to take over, here's the fix I'd suggest to try out: https://gist.github.com/exelotl/d286002d8f90f75bbd4543352e271f73#file-writewindows_fix-nim-L18-L22
01:35:36FromDiscord<exelotl> otherwise I'll do it when I get home from work
01:35:46FromDiscord<exelotl> and write a test
01:36:01disruptekthanks for looking into this.
01:36:10FromDiscord<exelotl> np
01:36:27*endragor joined #nim
01:39:41zedeushmm, when using jester with asynchttpserver I get an uncatchable "Bad file descriptor [OSError]" when a request gets cancelled
01:41:27disrupteki don't use those, but i've had those issues with async. not recently though.
01:41:56disruptekcould be that i'm super anal about exceptions now, or the client side could be largely fixed.
01:42:21disruptekare you certain it's uncatchable?
01:42:57disruptekalso, are you using cpp?
01:44:00*dddddd quit (Remote host closed the connection)
01:51:46*actuallybatman quit (Ping timeout: 265 seconds)
01:53:42zedeusit's uncatchable in my code as far as I can tell, not using cpp no
01:54:33disruptekcan you share the code? are you sure you're "doing async" correctly?
02:00:46zedeusI can try to make a minimal example
02:09:38*gangstacat quit (Quit: Ĝis!)
02:10:06shashlick@disruptek - just tried the positive test case you mentioned - it works as expected
02:10:18shashlickboehmGC_set_all_interior_pointers(1)
02:10:49disruptekokay, so that's good.
02:13:48FromGitter<gogolxdong> We don't have access to youtube, so I made a video about installing Nim from source on Windows here https://www.bilibili.com/video/av69371873
02:14:37FromGitter<gogolxdong> bilibili is comparable of youtube in China
02:21:03*actuallybatman joined #nim
02:26:09*leorize quit (Remote host closed the connection)
02:26:54*leorize joined #nim
02:27:19shashlickdisruptek - porting your changes for linux
02:27:55disruptekokay, but do you have a linux box?
02:29:52shashlickyep
02:30:30disruptekcool. so that should help a bit. 😁
02:32:48shashlickgoing to use pkg-config
02:33:20*odinfinch quit (Ping timeout: 265 seconds)
02:34:26*actuallybatman quit (Ping timeout: 240 seconds)
02:34:34*odinfinch joined #nim
02:35:45*owl_000 quit (Ping timeout: 265 seconds)
02:37:17shashlick@disruptek - /usr/bin/ld: /home/genotrance/.cache/nim/feud_d/PlatGTK.cxx.o: undefined reference to symbol 'g_module_symbol'
02:37:31disruptekyou need libgmodule
02:43:04disruptekbtw, have you gdb'd it yet?
02:43:29zedeusalright I've made a minimal example based on my usage, compile with -d:ssl and -d:useStdLib, then go to localhost:5000 and skip to near the end of the video https://github.com/zedeus/jester-example
02:44:27disruptekcool, i'll try it.
02:45:12zedeusI know there's no error handling in the code, anything I tried didn't help anyway so I left it out
02:45:54shashlick@disruptek - i've gdb'd the crap out of my own code, but not boehm
02:47:27shashlickgot it to crash same way on linux
02:48:15disruptekit crashes in the gc for you, too, right?
02:48:25disruptekzedeus: gimme a url with video.
02:48:48zedeuswhat do you mean? it should load a video
02:49:27disruptekoh, i thought i'd have to load something.
02:49:51disruptekhmm, i can't even bind.
02:50:10disruptekbtw you're on 1.0+ right?
02:50:25shashlick@disruptek - fix worked on linux as well - it is running
02:51:24zedeusyeah I run devel
02:52:01disruptekhow do i tell jester what i wanna listen on?
02:52:53disruptekshashlick: hmm, i couldn't get it to run w/o a crash.
02:53:50disrupteksettings.bindAddr
02:54:16zedeusdisruptek: pushed
02:54:55disruptekthanks, that'll help
02:55:57disruptekno idea why, but i cannot bind.
02:57:09disrupteksays addr already in use but obviously it's not priv'd and i've tried changing it, reuse, binding to loopback, etc.
02:57:21zedeusno clue
03:00:29shashlick@disruptek - ya it is working fine for me - 3 plugins don't compile - file, filetype and window
03:00:36shashlicklooking into first two
03:02:56disruptekwhich version of jester, zedeus?
03:03:26disrupteki have whatever's in nimble. 0.4.3
03:05:04zedeussame
03:05:18disruptekoh, maybe it's the shashlick tweak. crazy as that sounds.
03:05:59disrupteknope. this is nuts.
03:06:54shashlickokay, so everything except window is now working on linux
03:07:10shashlickthis is great, thanks @disruptek, inspires me to get this moving on linux as well
03:07:34disruptekgimme a branch and i will see if your patch works as well for me. somehow mine is pretty well broken.
03:07:51disruptekbut this bind issue makes zero sense.
03:10:07shashlickdo you mean me or zedeus
03:11:15disruptekyou
03:11:23disruptekzedeus: do you have ip6 on your box?
03:11:38disruptekbecause iirc nim just tries whatever it can. kinda dumb.
03:12:00zedeusdon't think so
03:12:12disrupteki do.
03:12:38disruptekstill seems ridiculous.
03:13:50disruptekfinally.
03:14:47disruptekdoesn't work for 127.1 but works for another rfc1918 on the node.
03:15:38disruptekbut then i get a 403 on the index.html.
03:16:00disruptekprobly perms, right?
03:16:04shashlickokay pull the araq branch of feud
03:16:09disruptekkk
03:16:23shashlicknimble develop - will install deps, then nimble bin
03:16:24disruptekyay, i see video.
03:16:30disruptekthat was ridonkulous.
03:17:05shashlickwhen you run feud, it will compile all plugins - all will load except window which will fail to compile
03:17:19shashlicksome won't load since they depend on window
03:18:55disruptekbuilding now.
03:19:51disruptekhmm, zedeus it's not crashing for me, but i removed your runForever() 'cause i felt it was gratuitous.
03:20:02disruptektry that.
03:20:17disruptekfeud seems to run?!
03:20:38disruptekand then... Error: unhandled exception: key not found: initRemote [KeyError]
03:20:41zedeusdisruptek: changes nothing, you have to skip around quickly so it cancels the previous request
03:20:52disruptekzedeus: ah, okay, i'll try scrubbing.
03:21:00zedeusdid you compile with -d:useStdLib?
03:21:07disruptekyeah.
03:21:12disruptekotherwise it uses httpbeast, right?
03:21:21shashlickyes that's the crash - now if you build with interior pointer support, it will run
03:21:40shashlickthat key initRemote was loaded then disappeared due to db
03:21:44shashlickgc sorry
03:21:53zedeusyep
03:22:06disruptekokay, i got a bad fd crash.
03:22:54shashlickno idea how you are doing this in parallel!
03:22:57disruptekokay, so here's the problem.
03:23:28disruptekroutes: will invoke its own server; you need to run the server manually so you can wrap it in an exception handler. i think you call server() or serve() or something.
03:23:50disruptekyeah, it's as dumb as it sounds. jester should be patched.
03:24:30disruptekshashlick: ahh, so it's the same problem. so i have to go back to the patched compiler and then it should work as it does for you.
03:25:12shashlickyep
03:25:23disrupteknow i get a keyerror on hook.
03:25:24shashlickupdating the issue to add this linux data point
03:25:50shashlickdo a nimble clean first
03:25:53disrupteklemme try clean
03:25:57disruptekyeah :-D
03:25:57shashlickall the plugins will need to be recompiled too
03:26:49disruptekoh somehow it can't c2nimport.
03:26:54disruptekzedeus: does that make sense?
03:27:26zedeusyeah, this is for a project with a bunch of eyes on it though so I'd prefer to wait for a Jester fix
03:27:31zedeusI'll ask dom96 when he wakes up
03:27:49disruptekit's a good repro, i just wish i was able to bind to localhost.
03:27:51disruptekthat was nuts.
03:28:09zedeuslol i bet, never had any issues with it
03:28:23disruptekso shashlick now it's just bouncing back and forth between trying to build window and file.
03:30:11shashlickwhy is file failing
03:30:44disruptekers/fuzzy.nim(15, 1) Error: undeclared identifier: 'c2nimport'
03:31:07shashlickokay you have an older nimterop
03:31:23shashlickno biggie
03:31:25disrupteki just used the one from feud's nimble; it's 020 iirc.
03:31:44shashlickweird, then do you have c2nim installed?
03:31:48disrupteki'll try 0.1.0
03:31:56shashlickthat's older, v020 is latst
03:32:41*gangstacat joined #nim
03:33:11disrupteki just took winim outta the .nimble. now at least `develop` can finish.
03:33:34disruptekit's missing HWND too.
03:33:42disruptekin window.
03:34:21shashlickyep, window is heavy mfc code
03:34:28shashlickso it won't build for sure
03:34:40shashlickrest will build
03:34:46shashlickregardless you got it working now
03:34:51shashlickit is building and loading plugins
03:35:00shashlickand initRemote starts the remote plugin
03:35:20disruptekit's not crashing. πŸ‘
03:35:42*nif quit (Quit: ...)
03:35:52*nif joined #nim
03:35:56disrupteki guess i will have to look at what you changed.
03:37:19disruptekhmm, not much.
03:37:20shashlickmostly your stuff and a little bit more
03:38:19disruptekwell, this is a step in the right direction, good job.
03:38:38shashlickthanks for your tips
03:38:43disrupteknow at least it can be debugged here.
03:38:48*nif quit (Client Quit)
03:38:59*nif joined #nim
03:38:59shashlickso now, while we wait on Araq, do you have any GUI toolkit suggestions?
03:39:18shashlicknothing i know of supports scintilla cross-platform
03:39:25shashlickimgui tried and reverted
03:39:33disrupteki haven't really looked at anything. i'm only really interested in imgui stuff, so when i go gui in nim, that's what i'm gonna play with.
03:39:33shashlickhttps://github.com/ocornut/imgui/issues/108
03:40:01disrupteki've done qt in c++ and python. really like it, but obviously not on the table here.
03:40:10disruptekalso, i probably wouldn't use qt.
03:40:14disruptek😁
03:40:49disruptekit's really more appropriate when you don't have any other code, but you probably already know about it.
03:41:30shashlicki feel scintilla with a native port for each os will net the best perf
03:41:46disruptekso scintilla is really good stuff?
03:42:16shashlickit's very feature rich and performant
03:42:19*nif quit (Client Quit)
03:42:31shashlickmost of the standard editor stuff is available
03:43:21shashlicki've never built a gui on linux so wondering where to start porting window
03:44:31*nif joined #nim
03:44:32disruptekmy last linux gui was almost 20 years ago, unless you count PyQt.
03:45:11shashlickhonestly i don't really need any gui
03:45:14disrupteki don't use a GTK or Qt desktop, either, so i couldn't even tell you what i like to look at.
03:45:25shashlickjust need the scintilla window up and keyboard/mouse events
03:45:32disruptekright.
03:45:56shashlickso in theory, i just need to read up on how to get gtk working with nim
03:46:11disruptekone thing i would point out is that if you choose something where you can eventually easily embed a browser, that probably will make sense. sad but true.
03:47:12shashlickdo you mean embed a browser in the editor or the editor in a browser
03:48:00disruptekbrowser in the editor. i thought about the editor in the browser and it would be a fun nim concept but i think it'd be too limiting for you.
03:48:15disrupteki just mean a webview widget of some sort for docs or w/e.
03:48:36disruptekit's something i simply wouldn't want to rule out this early.
03:48:44disruptekand i hate that about myself.
03:49:37shashlickmakes sense, but why not open in the default browser
03:50:02disrupteki would. i prefer that.
03:50:58disrupteki guess maybe some of my motivation is coming from the mobile side, where you always have a webview waiting in the wings, and that's a nice asset.
03:51:45disruptekcan't say i'm impressed with electron apps or atom or oni, though i couldn't actually run oni myself. couldn't get it stable.
03:52:17disruptekis vsc a similar architecture? i don't even know.
03:52:48shashlickvsc is electron + cleanup / perf improvements
03:53:12disruptekfigures.
03:53:44*chemist69 quit (Ping timeout: 276 seconds)
03:55:10*chemist69 joined #nim
03:58:11*nif quit (Quit: ...)
03:58:20*nif joined #nim
03:59:19shashlickokay well, off now, the road is long but it is unblocked
04:00:16disruptekgn shashlick
04:00:21shashlickneed to bring back my focus on nimterop / nimarchive and get that done
04:00:23shashlickl8r
04:01:31*nif quit (Client Quit)
04:03:41*nif joined #nim
04:10:18*rockcavera quit (Remote host closed the connection)
04:21:04FromGitter<zacharycarter> shashlick: I didn't see anywhere in that log mention of the same issue
04:35:18*LargeEpsilon joined #nim
04:51:57*nsf joined #nim
05:22:46*NimBot joined #nim
05:22:47*narimiran joined #nim
05:34:26*actuallybatman joined #nim
05:40:26*LargeEpsilon quit (Ping timeout: 240 seconds)
05:53:47*actuallybatman quit (Ping timeout: 245 seconds)
05:57:42FromDiscord<Rika> is there a reason the `fmt` template is raw and the `&` macro isnt?
05:59:01*LargeEpsilon joined #nim
06:01:14*LargeEpsilon_ joined #nim
06:01:16*skoude joined #nim
06:05:41*LargeEpsilon quit (Ping timeout: 276 seconds)
06:07:56*owl_000 joined #nim
06:17:28*solitudesf joined #nim
06:17:36*skoude quit (Ping timeout: 240 seconds)
06:18:21*skoude joined #nim
06:34:25lqdev[m]@Rika: it's that fmt is used as a *generalized raw string literal*
06:43:38*solitudesf quit (Remote host closed the connection)
06:48:18FromGitter<zacharycarter> does newruntime work with the stdlib now?
06:48:33FromGitter<zacharycarter> I saw that all the items on the TODO checklist were marked as complete
06:53:48*Vladar joined #nim
06:54:05Zevvasync
06:54:11Zevvdoesn't
06:56:32FromGitter<zacharycarter> gotcha
06:56:56FromGitter<zacharycarter> thanks
06:58:59*solitudesf joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:33*solitudesf quit (Remote host closed the connection)
07:00:56*solitudesf joined #nim
07:02:02*krux02 joined #nim
07:05:01*gmpreussner joined #nim
07:18:04FromGitter<qqtop> xmltree doesn't
07:18:37*ng0_ quit (Quit: Alexa, when is the end of world?)
07:19:00*ng0 joined #nim
07:26:28Zevvand json; these trees are hard to ownedize
07:28:06*floppydh joined #nim
07:36:16*solitudesf quit (Ping timeout: 240 seconds)
07:42:03*navinmistry joined #nim
07:42:37*tdc joined #nim
07:45:03FromGitter<alehander42> Araq
07:45:07FromGitter<alehander42> so i have a question
07:46:36FromGitter<alehander42> in 1.1 we can have a lib which deals with old style refs, and a user imports it: and he says "ok, it's not yet passing without warnings/errors the nil checking, but i think it is safe so let me ignore that without warnings/errors"
07:47:08FromGitter<alehander42> so if its his own lib, he might just add the `{.nilCheck: off}.` to it
07:47:48FromGitter<alehander42> but if its not, can you somehow import with the same effect
07:49:56Araqwarnings are tied to the main Nimble package that you compile
07:51:18FromGitter<alehander42> so yeah, you need to either *keep them as warnings, not errors or *fork/PR the lib if you want errors
07:51:25FromGitter<alehander42> not a big deal
07:51:33FromGitter<alehander42> just wanted to understand it
08:04:16*skoude quit (Ping timeout: 240 seconds)
08:06:35FromDiscord<arnetheduck> zevv, that's an interesting stance - picking programming language based on the lack of entities that are willing to bet their livelihood on it πŸ˜‰
08:08:32Araqalehander42: we need to start with "warnings only" anyway
08:08:58*navinmistry quit (Remote host closed the connection)
08:09:15Araqand a "turn warning into error" switch would be useful in general
08:09:20FromGitter<alehander42> yes, i meant that I can decide to turn on errors
08:10:01FromGitter<alehander42> but i cant ignore them in code that i dont control
08:10:15FromGitter<alehander42> but this is ok
08:10:26Araqyeah but Nim doesn't produce warnings for foreign Nimble packages
08:10:36Araqit'll be fine
08:10:36FromGitter<alehander42> hm, i didnt know that
08:10:54FromGitter<alehander42> but does this mean
08:11:08FromGitter<alehander42> if i download such a package, and i turn nilCheck on
08:11:17FromGitter<alehander42> i wont get any errors for the package even if i want to
08:12:41Araqwell you need to compile the package directly
08:13:03FromGitter<alehander42> can't i tell nim to not ignore those warnings :P
08:13:07Araqfor instance, by compiling its example code
08:13:29Araqif you "don't want to ignore the warnings"
08:13:46Araqthat should be covered by --turnWarningToError[X]
08:13:55Araq(which doesn't exist yet)
08:15:01*asymptotically joined #nim
08:15:24Araqbut I also thought about disabling this feature, if your dependencies produce warnings, demand from them that they don't
08:15:53FromDiscord<Kiloneie> Okay Araq i will show that strcans module, once i try it out myself
08:15:53Araqand file bug reports for these packages
08:16:11FromGitter<alehander42> Araq, exactly
08:16:16FromGitter<alehander42> thats what i'd use as well sometimes
08:16:34FromGitter<alehander42> or at least have a flag to disable the foreign warnings ignore
08:16:44AraqKiloneie: make a video about the good parts of the stdlib, strscans, strformat, tables, times
08:18:11FromGitter<alehander42> Araq, i also wondered something else: you can e.g. do nilCheck: on or nilCheck: off, but you cant do "produce errors from all those functions, and dont ignore the other function, just produce a warning instead of error for it"
08:18:23FromGitter<alehander42> but this is very niche
08:18:28FromDiscord<Kiloneie> i will make that video, but the next one will be conditional statements, if and else statement, then the next will be more on that a simple calculator probably, then those modules probably.
08:18:40FromGitter<alehander42> not sure if it makes sense to have this in general for pragmas
08:19:34AraqKiloneie: ok but most people already know some other programming language and like to see new things
08:20:20FromDiscord<Kiloneie> Yeah but, my series is for beginners, it's meant for people both new to Nim and new to programming
08:20:29Araqyes, I know
08:20:42Araqand now you have to stick to it :-)
08:21:03FromDiscord<Kiloneie> Yes, so i am not there yet. Soon
08:21:24FromDiscord<Kiloneie> i am putting notes for all of this down.
08:21:32Araqbut it's cool, once complete, we can link from the Nim website and mark it as an "online curse for non-programmers"
08:21:36owl_000kiloneie is doing great
08:21:56FromDiscord<Kiloneie> I will probably do something like that tomorrow, today i am planning on doing 2 videos if i can manage.
08:22:56FromGitter<alehander42> course*
08:23:16FromGitter<alehander42> you have good tempo
08:23:19FromGitter<alehander42> kiloneie
08:23:21FromDiscord<Kiloneie> I started this because of lack of beginner level content, not everyone can just install Nim on their own and start playing around with it and understanding it. Also YouTube has barely anything of Nim
08:23:24FromDiscord<Kiloneie> Thank you
08:23:26FromGitter<alehander42> i even think one a day is a lot
08:24:08narimiranone per day should be max
08:24:33narimiraneven currently i cannot keep up with the current content, and i'm online for the most of the day
08:25:02narimiran2 per day will make it overwhelming, and less likely for me (and others) to continue watching
08:26:01FromDiscord<Kiloneie> They are pretty short though. And it's not like i would make 2 that are shorter and worse than just 1, if i will get 2 done, they will have about the same length and quality.
08:26:24FromDiscord<Kiloneie> Idk, i just think more content if possible with the same quality is good.
08:26:34narimiraneven still. but ok, your videos, your decision
08:26:44FromDiscord<Kiloneie> it's not like i promised any kind of schedule anywhere
08:27:18Araqnarimiran, you can always watch it *later* :P
08:27:22FromDiscord<Kiloneie> so if i were to make on a few days 2 videos instead of 1, and then just 1 for a few days, it wouldn't matter, i didn't put a schedule for people to see and be dissapointed if it didn't go well
08:27:37narimiranAraq: we all know how it goes with "i'll do it later" ;)
08:28:11FromDiscord<Kiloneie> Also that: sometimes i don't watch some youtuber for a while, then when i come back, i got a lot of stuff to watch, then if if i watch them for a while i run out of stuff to watch and go somewhere else, then return later.
08:28:37FromGitter<alehander42> yes, you can also keep a buffer
08:28:46FromGitter<alehander42> and e.g. post some unreleased
08:28:56FromGitter<alehander42> when e.g. you need to take a day off or just dont feel like it
08:29:10FromDiscord<Kiloneie> that's the plan if stuff were to come up
08:29:28dom96zedeus: you might want to just ask, I do check IRC logs most of the time when I'm highlighted :)
08:30:03FromDiscord<Kiloneie> which will happen in a week or so, birthday party wii....
08:32:06FromDiscord<Kiloneie> There is also the second argument, i need to show more interesting things in Nim which i have to code myself and learn, so eventually 2 videos a day wouldn't be viable probably, will see. I need to plan this out.
08:38:34*navinmistry joined #nim
08:39:00*skoude joined #nim
08:42:48*navinmistry quit (Ping timeout: 245 seconds)
08:49:54FromDiscord<mratsim> > <Araq> but it's cool, once complete, we can link from the Nim website and mark it as an "online curse for non-programmers"
08:49:54FromDiscord<mratsim>
08:49:54FromDiscord<mratsim> Nim, the Voodoo language
08:55:51FromGitter<alehander42> no
08:56:10FromGitter<alehander42> btw what would happen to `owned`
08:56:20FromGitter<alehander42> if the 'alternative' of newruntime
08:56:23FromGitter<alehander42> remains
08:56:38*dddddd joined #nim
08:59:14Araqwhat do you mean?
09:08:49FromGitter<alehander42> well, maybe i dont know enough about what the alternative idea is
09:09:10FromGitter<alehander42> but i thought it's different, so maybe that it isnt based on the same kind of move/own checking
09:10:48*solitudesf joined #nim
09:12:05*skoude quit (Ping timeout: 265 seconds)
09:19:16*navinmistry joined #nim
09:30:53FromDiscord<Corax> Is there any up to date Nim cheatsheet out there? πŸ™‚
09:31:17FromDiscord<Corax> I like getting hold of a good cheat sheet after getting into a language so I can start working with it without stumbling on the syntax too much
09:37:21*navinmistry quit (Remote host closed the connection)
09:38:42FromDiscord<mratsim> https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers
09:38:48FromDiscord<mratsim> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
09:39:06FromDiscord<mratsim> or: https://github.com/timotheecour/D_vs_nim
09:39:34FromDiscord<mratsim> useful as well: https://xmonader.github.io/nimdays/
09:39:51FromDiscord<Corax> ty!
09:41:22FromDiscord<mratsim> Rosetta code as well
09:44:30*skoude joined #nim
09:44:57*thomasross quit (Ping timeout: 265 seconds)
09:51:37*thomasross joined #nim
10:08:34AraqCorax: the "Nim in action" book comes with a cheat sheet. iirc.
10:11:45FromDiscord<Kiloneie> Hmm strscans module seems pretty useful indeen
10:11:49FromDiscord<Kiloneie> indeed *
10:14:54*navinmistry joined #nim
10:17:40*dddddd quit (Quit: Hasta otra..)
10:19:11*navinmistry quit (Ping timeout: 250 seconds)
10:22:58*clyybber joined #nim
10:24:35*skoude quit (Ping timeout: 265 seconds)
10:32:17*navinmistry joined #nim
10:37:32dom96Araq: Corax: yep, there is a cheatsheet on the inside covers :)
10:39:05*thomasross quit (Ping timeout: 265 seconds)
10:39:58FromDiscord<Corax> how up to date is Nim in Action? πŸ™‚ I might buy it paperback
10:44:02*thomasross joined #nim
10:46:00Zevvping @zacharycarter
10:46:22Zevvhm do discord/gitter bridges alow privmsgs through irc?
10:46:27*thomasross_ joined #nim
10:46:27*thomasross quit (Killed (orwell.freenode.net (Nickname regained by services)))
10:46:27*thomasross_ is now known as thomasross
10:48:04*navinmistry quit (Remote host closed the connection)
10:51:12dom96Corax: all of its code examples are in Nim's test suite, so they all compile at the very least
10:51:57dom96I intentionally stayed clear of things like concepts since they are experimental (even in 1.0)
10:52:04Araqthe biggest problem is that dom96's book claims 'nil' is a valid value for strings and seqs
10:52:17Araqdom96, liar, you do show concepts
10:52:21AraqI think.
10:52:54dom96Do I? maybe I even forgot
10:53:10dom96even if I do, it can't be more than a single example with a big caveat that says "this is likely to change"
10:53:41dom96Araq: none of the examples break because of the `nil` change though AFAIK
10:55:16Araqdom96, they do, we pass nilseqs:on to these tests
10:55:38*navinmistry joined #nim
11:01:03*skoude joined #nim
11:15:16*theelous3 joined #nim
11:19:58clyybberAraq: I see you don't like the closure approach. Should I use a template instead? I mainly want to reduce code duplication, so that pArg moveOrCopy all iterate over nkStmtListExpr, nkBlockExpr and so on in the same way.
11:20:25FromDiscord<Kiloneie> Ε₯here are concepts there
11:22:42Araqclyybber, please yes
11:22:50Araquse a template
11:23:16*Mister_Magister quit (Excess Flood)
11:24:37*Mister_Magister joined #nim
11:30:01*navinmistry quit (Remote host closed the connection)
11:30:28*navinmistry joined #nim
11:32:16Araqhttps://www.vice.com/en_in/article/ywanev/thousands-of-cloud-computing-servers-could-be-owned-with-very-simple-attack-researchers-say
11:35:28*navinmistry quit (Ping timeout: 264 seconds)
11:39:39*whaletechno quit (Ping timeout: 240 seconds)
11:39:55clyybberOooh, I like cooldomes RFC
11:40:19FromGitter<alehander42> its interesting
11:40:39FromGitter<alehander42> but i feel like it misses some of what makes dependent types
11:40:41FromGitter<alehander42> good
11:42:32clyybberCare to explain?
11:44:00FromGitter<alehander42> first, implicitly converting doesnt seem always correct
11:44:23FromGitter<alehander42> but maybe i dont understand the proposal correctly
11:44:30FromGitter<alehander42> i will look at it later again
11:46:41FromGitter<alehander42> like, at least, i expect a lot more maths, to be able to check stuff like Range[T, n] + Range[T, m] => Range[T, n + m]
11:51:10*rokups joined #nim
11:56:54*rockcavera joined #nim
12:00:27*skoude quit (Ping timeout: 245 seconds)
12:01:20*skoude joined #nim
12:03:43clyybberalehander42: Well you can implement a proc `+` that does exactly this
12:05:38FromDiscord<Shield> shouldn't pointer arithmetic be included in the stdlib at this point?
12:05:54FromDiscord<Kiloneie> How does one use writeStyled procedure, i have but just about anything in the second argument and it keeps erroring.
12:05:54FromDiscord<Kiloneie> https://play.nim-lang.org/#ix=1JPb
12:06:26*skoude quit (Ping timeout: 276 seconds)
12:06:42FromDiscord<exelotl> I haven't really needed pointer arithmetic since I discovered UncheckedArray
12:07:27FromDiscord<Shield> that's actually a very interesting way to solve it
12:08:07narimiranKiloneie from the error message, one can tell that the second argument should be a set, so something like `writeStyled($a, {styleBlinkRapid})`
12:09:28FromDiscord<Kiloneie> Welp... that's what i get for not reading about Sets... <,<
12:09:36FromDiscord<Kiloneie> i feel dumb again
12:10:30narimiranthat's what you get for not reading error messages :P
12:10:56FromDiscord<Kiloneie> i did, i just didn't get it, i thought it wanted me to set a value, not an actual Set <.<
12:11:08*daddoo joined #nim
12:13:17*Kaivo joined #nim
12:16:08FromDiscord<Corax> I'm looking for a project to sink my teeth into Nim and I'm thinking of rewriting (parts of, to start with) pwntools http://docs.pwntools.com/en/stable/
12:16:14FromDiscord<Corax> has anyone been working on anything similar?
12:16:44FromDiscord<Rika> sets are real useful though
12:18:58FromDiscord<Kiloneie> aren't they basically high performance arrays ?
12:19:24FromDiscord<Kiloneie> but of ordinal type only *
12:19:31*skoude joined #nim
12:19:38narimiranKiloneie: btw, while learning about sets, don't confuse two types of sets available in nim: the first one is the one you just discovered, available without any imports (https://nim-lang.github.io/Nim/manual.html#types-set-type); the other one are HashSets available when you do `import sets` (https://nim-lang.github.io/Nim/sets.html)
12:20:10FromDiscord<Kiloneie> yeh i got both pages open, looking at their differences
12:20:33FromGitter<alehander42> clybber
12:20:50FromGitter<alehander42> thats why currently there is some artihmetic support in the compiler for i guess statics
12:21:09FromGitter<alehander42> but i guess fuller support for something like dependent types would require rethinking the whole static thing
12:21:13FromGitter<alehander42> from the ground up
12:21:14*navinmistry joined #nim
12:22:22FromGitter<alehander42> otherwise once i tried making a map which returns the same number of elements: it required proving a loop with n repetitions
12:22:35*nif quit (Quit: ...)
12:22:39FromGitter<alehander42> of .append would result in a type with exactly n
12:22:45*nif joined #nim
12:22:57FromGitter<alehander42> and this didnt really work, i remember @zah explaining me some limitations
12:23:14Zevv@Shield: what do you meen with pointer arithmatic being implemented in the stdlib?
12:23:36*skoude quit (Ping timeout: 240 seconds)
12:23:46*navinmistry quit (Remote host closed the connection)
12:23:54clyybberalehander42: I guess thats why cooldome says that this will require more static bugs fixed
12:24:21clyybberBut it seems like a great design/concept.
12:24:33clyybberThe implementation will of course have to deliver
12:26:51FromGitter<alehander42> but i think that "true" dependent types just require a whole more machinery directly in the compiler
12:27:04FromGitter<alehander42> or maybe a much stronger "type metaprogramming" system
12:28:06FromDiscord<Rika> dont regular sets disregard insertion order tho? i dont recall them doing that @Kiloneie
12:28:21FromDiscord<Rika> doing that -> keeping insertion ordeer
12:28:25FromDiscord<Rika> order.
12:28:44FromDiscord<mratsim> yes sets and HashSets don't retain insertion order
12:29:01*Hideki_ joined #nim
12:29:13*abm joined #nim
12:29:16FromDiscord<mratsim> also iterating on sets require iterating on all bits one by one
12:30:12FromDiscord<Rika> is there a difference between set's card and len?
12:30:45narimiranno. (RTFM)
12:30:46Zevva set doesn't have len
12:30:49Zevvdoes it?
12:31:03*Hideki_ quit (Remote host closed the connection)
12:31:29Zevvoh it does! :)
12:31:41FromDiscord<Rika> was about to send an image
12:31:54narimiranhttps://nim-lang.github.io/Nim/system.html#len%2Cset[T]
12:32:05narimiranhttps://nim-lang.github.io/Nim/sets.html#card%2CHashSet[A]
12:32:37FromDiscord<Rika> discord doesnt like brackets in its link parser...
12:32:46FromDiscord<mratsim> len was added recently iirc
12:33:31FromDiscord<mratsim> I think the reasoning at the beginning was that people assumed that `len` was O(1) / instant. But for the base set that was not true, you need to iterate on the bits
12:33:59FromDiscord<mratsim> However now that it's using popcount, maybe even casting to uint16, it should be instant as well
12:34:20Zevvah august it was added indeed
12:34:24shashlickIs there any pointer magic in sets and tables?
12:34:27FromDiscord<mratsim> instant --> bounded number of steps
12:34:46Zevvcounting them all is bounded :)
12:34:57FromGitter<alehander42> clybber but thats based on my limited impressions of idris and similar : so no idea
12:35:18*ng0 quit (Remote host closed the connection)
12:35:37clyybberCan a template do identifier replacing? Like `someTemplate( p(n, c, someOtherParam) )` where `n` is going to be whatever the template wants to?
12:36:21*ng0 joined #nim
12:39:45FromDiscord<mratsim> @Zevv, I knew someone would mentioned that
12:40:37FromDiscord<mratsim> @clyyber, I think you would need someTemplate(n, p(n, c, someOtherParam) )
12:42:30*endragor quit (Remote host closed the connection)
12:42:52clyybbermratsim: Thanks, I thought about that. But the template needs to replace the `n` in `p(n, ...)` in if branches or for loops by things like `son[1][i]`. How would that work?
12:45:02*navinmistry joined #nim
12:49:52*navinmistry quit (Ping timeout: 264 seconds)
12:55:50*solitudesf quit (Ping timeout: 276 seconds)
12:57:37*navinmistry joined #nim
13:00:10FromDiscord<mratsim> I'm not sure exactly but templates can bind n, and then replace all its future usage
13:01:15FromDiscord<mratsim> look into how I bind block_offset and block_size in omp_parallel_blocks: https://github.com/mratsim/Arraymancer/search?utf8=%E2%9C%93&q=omp_parallel_blocks&type=
13:01:40FromGitter<alehander42> Araq, roslyn uses a CFG for their nulability pass
13:01:51FromDiscord<Shield> @Zevv I noticed that multiple libraries (even stdlib itself) have to reimplement pointer arithmetic helper functions, so why not just offer that
13:01:56FromGitter<alehander42> source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/FlowAnalysis/NullableWalker.cs
13:01:57FromDiscord<mratsim> or omp_parallel_chunks: https://github.com/numforge/laser/search?q=omp_parallel_chunks&unscoped_q=omp_parallel_chunks
13:02:13FromGitter<alehander42> http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/FlowAnalysis/NullableWalker.cs
13:02:28*navinmistry quit (Ping timeout: 264 seconds)
13:02:50FromDiscord<mratsim> @Shield if you can list them in https://github.com/nim-lang/Nim/pull/12101 that would be helpful
13:03:13FromDiscord<mratsim> especially the stdlib ones
13:03:26FromGitter<alehander42> but their cfg seems including way more operations https://docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.operationkind?view=roslyn-dotnet
13:04:25clyybbermratsim: Thanks :)
13:04:42FromGitter<alehander42> probably they use the flow pass for other stuff, i guess the question is how general should a cfg be (it should be efficient to create and iterate through, but: including enough for each pass that needs it_
13:04:57FromGitter<zacharycarter> Zevv: sorry was at an appointment
13:05:45FromGitter<alehander42> other option is to create e.g. a special cfg for use/own analysis, a special one for null (each including only instructions related to events concerning it)
13:06:27FromGitter<alehander42> but maybe this is going to be slower after all, because cost of constructing 2-3 cfg-s
13:07:19Zevvzacharycarter: np. Just wanted to say that you got ppl interested, so you might expect someone to contact you one of these days. Make sure to bail out early if your interest is not mutual, because I think they will bug you with some mundane excersizes and stuff to start with :/
13:07:47FromGitter<zacharycarter> ah cool! thanks for the update, good to know!
13:07:49Zevvunless you like to show off sorting a linked list
13:07:54FromGitter<zacharycarter> :P
13:07:55FromDiscord<Shield> mratsim: i'll keep an eye out for those
13:11:39*cgfuh joined #nim
13:13:30*navinmistry joined #nim
13:17:15*dddddd joined #nim
13:18:09*navinmistry quit (Ping timeout: 250 seconds)
13:25:33*ng0 quit (Quit: Alexa, when is the end of world?)
13:29:22*navinmistry joined #nim
13:34:15*navinmistry quit (Ping timeout: 264 seconds)
13:42:35FromDiscord<Corax> potentially dumb/newbie question: Can I store the return value of osproc.StartProcess in my own object? It appears to be a "owned Process", however when I attempt to store it in my object I get a "type expected" error
13:43:29leorizeyou should be able to
13:43:36leorizecan you show us your code?
13:44:27FromDiscord<Corax> https://gist.github.com/PabloMansanet/42888cca98b64bc5f4ab6285852a3c41
13:44:58*kkeket joined #nim
13:45:03FromDiscord<Corax> literally the first nim code I write past tutorial so expect the knowledge of an amoeba
13:45:16*kkeket quit (Remote host closed the connection)
13:45:18*navinmistry joined #nim
13:46:21narimiran`system_process = startProcess`
13:46:27narimirannote it is `=`, not `:`
13:46:48narimiranand please please, use PascalCase for types, it will make your life easier
13:47:16FromDiscord<Corax> oh, thanks! So the ":" is only for copying values in construction, and if you need a function call you have to use "="?
13:47:39leorizealso command = command
13:47:41leorizenot `:`
13:47:44FromDiscord<Corax> sure, will do πŸ™‚ I should've read what the convention is
13:48:02FromDiscord<Corax> I'm comfortable with PascalCase for structs and _ for functions from Rust, I hope it's roughly similar
13:48:03leorizethese are rules though :P
13:48:03narimirani'm wrong, don't listen to me :D
13:48:17narimiranhttps://play.nim-lang.org/#ix=1JR1
13:48:34*endragor joined #nim
13:48:37narimirani knew there was `=` missing, but i told you in the wrong place, sorry :)
13:49:47*navinmistry quit (Ping timeout: 250 seconds)
13:49:48FromDiscord<Corax> oh, just found the style guide
13:49:52narimiranand this is more nim-like: https://play.nim-lang.org/#ix=1JR1 (if we ignore four-space indentation :))
13:49:56FromDiscord<Corax> gonna read that before I make any more eyeballs bleed πŸ˜„
13:50:20FromDiscord<Corax> weirdly my vim autoindenter always tries to indent right after the import block at the top, no idea why
13:50:21narimiranwrong link there, here's the correct one: https://play.nim-lang.org/#ix=1JR3
13:50:44*solitudesf joined #nim
13:50:46disruptekyou can indent after import if you want.
13:50:55narimiranenough blunders in 5 minutes, i definitely need a break from a screen
13:51:07leorize@Corax: you're probably using zah/nim.vim, right?
13:51:36narimiran(advertisement incoming :D)
13:52:18leorizeif you use vim, then you can replace the identer with this one: https://github.com/alaviss/nim.nvim/blob/master/indent/nim.vim
13:52:19FromDiscord<Corax> @leorize I'm using nim.vim indeed πŸ™‚ plus coc.vim with the nimlsp
13:53:03leorizeyea, replace the plugin's indenter with mine
13:53:11leorizeit's significantly better :D
13:53:23leorizeor if you use neovim then my plugin is just better :P
13:53:39narimirani can confirm and leorize is totally not paying me to say that!
13:53:41clyybberAraq: Now using a template instead
13:53:58FromDiscord<Corax> I do use neovim, will look for your plugin!
13:54:16narimiranthen it is no-brainer, really
13:54:24FromDiscord<Corax> will it play nice with coc.vim? I'm happy with my nimlsp integration
13:54:36leorizenimlsp is redundant with my plugin
13:54:41FromDiscord<Corax> gotcha
13:54:53FromDiscord<Corax> I mean
13:55:02FromDiscord<Corax> the reason why I like to use coc.vim is because it behaves the same for all languages though
13:55:07FromDiscord<Corax> out of the box
13:55:20FromDiscord<Corax> but if the overhead (and I guess keybinding setup and such) is worth it, I don't see why not
13:55:27leorizefor use with coc.vim however, you'd need a bit of tweaking :P
13:57:14FromDiscord<Corax> Well, so far so good
13:57:33FromDiscord<Corax> drop in replacement, hasn't broken any coc.vim, and the weirdness of post-import indenting is gone
13:57:34FromDiscord<Corax> thanks!
13:57:42FromDiscord<Corax> drop in replacement, hasn't broken any coc.vim stuff, and the weirdness of post-import indenting is gone
13:58:14leorizehttps://github.com/neoclide/coc.nvim/wiki/Create-custom-source
13:58:42leorizeif you wanted to use the completor within the plugin instead of nimlsp, you'd need to read that and some of my code :P
13:59:25clyybberUrgh, why do we still have the 80char line limit
14:00:06narimiranclyybber: so we can put (at least) 3 windows of code horizontally :)
14:00:20FromDiscord<Corax> what I'd love to do is integrate your semantic highlighting with the way coc.vim presents diagnostics, but I'll leave that for another day, I have enough on my plate with getting a basic grasp of Nim itself πŸ˜‰
14:00:21*actuallybatman joined #nim
14:00:34clyybberWe should really increase it to 120 IMO, that 80char limit is just an artifact from the days of whole room pcs
14:00:57clyybbernarimiran: Heh, so that I can use my widescreen vertically to view my code rite?
14:01:00clyybber:D
14:01:07*navinmistry joined #nim
14:02:19*nsf quit (Quit: WeeChat 2.5)
14:02:40leorize@Corax: you'd want to use my completion source instead of nimlsp in the future
14:02:51leorizehaving two instance of nimsuggest running is never a good thing
14:03:02leorizebut for now your setup should do
14:03:08FromDiscord<garageagle> I just went through the tutorial and I'm experimenting with some stuff now. I wrote this simple program:
14:03:08FromDiscord<garageagle> ```
14:03:08FromDiscord<garageagle> import terminal
14:03:09FromDiscord<garageagle> import strformat
14:03:09FromDiscord<garageagle> import os
14:03:09FromDiscord<garageagle>
14:03:09FromDiscord<garageagle> hideCursor()
14:03:11FromDiscord<garageagle> while true:
14:03:13FromDiscord<garageagle> echo(fmt"Term size: {terminalWidth()}x{terminalHeight()}")
14:03:14FromDiscord<garageagle> sleep(100)
14:03:16FromDiscord<garageagle> eraseScreen()
14:03:16FromDiscord<garageagle> ```
14:03:18FromDiscord<garageagle> There's probably a way to do this that looks better πŸ˜›
14:03:20FromDiscord<garageagle> I just went through the tutorial and I'm experimenting with some stuff now. I wrote this simple program:
14:03:21FromDiscord<garageagle> ```nim
14:03:22FromDiscord<garageagle> import terminal
14:03:24FromDiscord<garageagle> import strformat
14:03:25FromDiscord<garageagle> import os
14:03:27FromDiscord<garageagle>
14:03:28FromDiscord<garageagle> hideCursor()
14:03:29Zevvgarageagle please dump code through a pastebin!!
14:03:29FromDiscord<garageagle> while true:
14:03:31FromDiscord<garageagle> echo(fmt"Term size: {terminalWidth()}x{terminalHeight()}")
14:03:32Zevvstop
14:03:33FromDiscord<garageagle> sleep(100)
14:03:34FromDiscord<garageagle> eraseScreen()
14:03:35clyybberleorize: Btw, does nimsuggest still crash once in a while?
14:03:35FromDiscord<garageagle> ```
14:03:37FromDiscord<garageagle> There's probably a way to do this that looks better πŸ˜›
14:03:39FromDiscord<Kiloneie> don't edit
14:03:42FromDiscord<garageagle> oops ok
14:03:44leorizeclyybber: I hope you understand why we hate code pasting now :P
14:04:19clyybberSure, lol. Maybe we should pin something on discord to tell them to not do that
14:04:31leorizeclyybber: compile it with -d:release and it will crash for pretty much every complex project
14:04:36Zevvor just kick on flooding once and ban on flooding twice :)
14:04:45leorizeit crashes less now though
14:05:23*navinmistry quit (Ping timeout: 250 seconds)
14:05:40FromDiscord<garageagle> Alright here's my simple program https://hastebin.com/udubosomas.java
14:05:40FromDiscord<garageagle> It doesn't do much, and there's probably a way to do this that looks better.
14:06:08FromDiscord<garageagle> I'm just experimenting with nim right now
14:06:08clyybberleorize: Huh, why only with -d:release ?
14:06:23leorizebecause by default it's compiled with -d:danger
14:06:38clyybberUgh, sure.
14:06:39FromDiscord<Kiloneie> use https://play.nim-lang.org/
14:06:39FromDiscord<Kiloneie> interactive nim shell or something
14:06:57Zevvgarageagle: what is your question exactly?
14:07:27FromDiscord<Kiloneie> you are just gonna hide your mouse and crash with that code
14:08:07FromDiscord<garageagle> yeah, I probably shouldn't use `while true`
14:08:23FromDiscord<Clyybber> @mratsim Can we pin a message telling people to dump their code through a pastebin and to not edit?
14:09:17FromDiscord<Kiloneie> if you want your mouse to show up after you use anything from the terminal module you need to use system.addQuitProc(resetAttributes) after you are done, or just reset whatever changes you did, these are permenant changes
14:10:06FromDiscord<Kiloneie> it's all explained in the module's description
14:11:31FromDiscord<garageagle> is there something like python's `except KeyboardInterrupt`?
14:11:53*navinmistry joined #nim
14:13:00FromDiscord<arnetheduck> that's the thing with bridges, you get users that don't understand the limitations of the other platforms. a pinned message will not help since someone looking for help using say discord will not expect that they have to break their habit of editing or pasting code, or what really matters - avoiding useful features
14:14:08leorize@garageagle: no, there aren't
14:14:19leorizewell there's a way but normal code shouldn't depend on it
14:14:37disrupteki try hard to avoid useful features but i'm not always successful.
14:16:13*navinmistry quit (Ping timeout: 250 seconds)
14:16:48*endragor quit (Remote host closed the connection)
14:18:36clyybberarnetheduck: It will help in the case that they read the pinned message
14:18:50FromDiscord<Corax> Is it idiomatic to embed unit tests in source files a la rust?
14:19:04clyybberAnd even if most dont, it cant hurt
14:19:05disruptekwhen the source is only one file, i'd say yes.
14:19:52FromDiscord<Corax> In Rust I usually have integration tests at module level against the user facing API, and internal tests on every file that bypass visibility. Looks like I can do this here but IDK if it's the norm
14:21:04FromDiscord<arnetheduck> clyybber it's already in the title / topic
14:21:30disruptekthe reason not to do it that way is that you end up building binaries for every file in the module; it just gets messy and you end up needing to cross-import just to run tests.
14:21:54disruptekmakes more sense to obey the nimble pattern, even though it doesn't always make sense.
14:22:32FromDiscord<Corax> oh, "nimble test"?
14:23:02disruptekwhen you scale it up, you have a tests directory with individual tests in there...
14:24:11clyybberarnetheduck: Oh, nevermind then :)
14:32:37AraqCorax: try --styleCheck:error on your code
14:38:56FromGitter<alehander42> would this be enabled by dfault
14:38:57FromGitter<alehander42> in 2.0
14:42:02AraqI don't know
14:48:20FromDiscord<garageagle> What's the best way to execute a console command and return its output? It seems that `execProcess` from `osproc` would work fine.
14:48:40FromDiscord<garageagle> *a command in a console
14:48:50*navinmistry joined #nim
14:51:42leorizeexecProcess is the best way there is currently
14:51:54Zevvaraq, can I bug you? Do you think https://github.com/nim-lang/Nim/issues/12240 is eligable for a fix before 1.0.2?
14:52:48AraqZevv: sure
14:52:53Zevvsweet
14:53:29*navinmistry quit (Ping timeout: 276 seconds)
14:54:11*ng0 joined #nim
14:54:18disruptekawesome.
14:55:41narimiran...if it is fixed by the end of this week
14:56:02disrupteki'm starting to get to a tipping point where i have enough nim that moving off of it is burdensome. it's a scary good feeling, like marriage.
14:56:40FromGitter<alehander42> is that how marriage is supposed to feel
14:56:58disruptekprobably not; i'm divorced.
14:57:02narimiranlol
14:57:22FromGitter<alehander42> i just said to my fiance it just feels burdensome to move off of her
14:57:32FromGitter<alehander42> now i saw you're divorced
14:57:36FromGitter<alehander42> good advise man
14:57:40disruptekdude.
14:58:01Zevvgha
14:58:16narimiranTHE ADVICE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ...
14:58:23disrupteklol
14:58:26narimiranadvices, MIT licenced
14:58:26FromDiscord<Kiloneie> oO
14:58:56FromDiscord<Kiloneie> Heres me, awaiting for marriage in eta no idea.
14:59:29Zevv[...] where I have enough wife that moving off of her is burdensome [...]
14:59:32FromDiscord<Shield> lol
14:59:52Zevvoh wait that even came out different then I ment :/
15:00:19Zevvsorry about that
15:00:21disruptekmaybe you should focus on the tipping points instead.
15:00:43FromGitter<alehander42> no, i was kidding sorry, i mean she liked it but she didnt get the MIT license reference
15:01:30FromGitter<alehander42> kiloneie i was in the same boat, i am not totally sure how i got here
15:01:43FromGitter<alehander42> but 1.02
15:01:58FromGitter<alehander42> is coming next week? is nim going to do one of the "release each two weeks"
15:01:59FromGitter<alehander42> things
15:02:01FromDiscord<Kiloneie> I have a problem of, welp theres a pretty girl, let's not do anything
15:02:34FromGitter<alehander42> i already imagine the future, a team of compiler developers furiously writing more and more incomprehensible semantic checking bufixes
15:02:56narimiranalehander42: 1. yes, next week; 2. not every two weeks, but i'll push for it to be more scheduled/predictable
15:03:00FromGitter<alehander42> while narimiran manages a release on each 2 hours thing
15:03:10FromGitter<alehander42> sorry, this got very dystopian
15:03:17disrupteki think it'd be really good to have regular releases. i do think 2 weeks is pretty good for patch-level bumps but maybe closer to ~8-10 weeks for minors.
15:03:22*owl_000 quit (Ping timeout: 245 seconds)
15:03:47narimirani have an idea about releases, but i guess i'll need to write RFC
15:03:59disruptekthe fact is that a lot of bugs get fixed in two weeks.
15:04:02FromGitter<alehander42> i also like the idea, but on the other hand 1.x releases probably depend on bigger features
15:04:26FromGitter<alehander42> but iirc in rust, this just means the future gets delayed for 1.x+1
15:04:31FromGitter<alehander42> which is no bother
15:04:36FromGitter<alehander42> as releases happen often
15:04:43FromGitter<alehander42> feature*
15:05:21FromDiscord<Corax> ``` nimsuggest instance for project /home/corax/repos/pwnim stopped with exitcode: 143 ```
15:05:21FromDiscord<Corax>
15:05:21FromDiscord<Corax> any idea @leorize? This is even with coc.vim disabled
15:05:33FromGitter<alehander42> kiloneie, well, in those pretty cases better try {} and catch the exception
15:05:34FromGitter<alehander42> :P
15:05:56FromDiscord<Kiloneie> lol D:
15:05:59FromDiscord<Corax> I get that error every time I exit vim on a .nim file, other than that everything is working fine
15:06:32FromGitter<alehander42> just dont exit vim
15:07:48FromDiscord<Corax> It's too much effort tbh πŸ˜›
15:08:08leorize@Corax: hmm, that's weird
15:08:19leorizeit might be that nimsuggest got killed with a signal
15:08:36leorizewell it's not too serious if it only appear on exit
15:08:38*pigmej left #nim ("Kicked by @appservice-irc:matrix.org : issued !quit command")
15:09:10leorizeyou're the first so far to report something like that :/
15:09:38FromDiscord<Corax> I have two instances of nimsuggest for some reason installed in my machine, one under choosenim/ and the other under nimble/ so there is a big chance I mucked up my install
15:09:43FromDiscord<Corax> gotta look into that
15:12:16shashlickfinally a working build of feud - https://github.com/genotrance/feud/releases
15:12:41disruptekgood job
15:13:01disruptekyou are using it full time?
15:13:31shashlickabout to start
15:13:48shashlickwas being spoiled by leorize, becoming lazy
15:21:36federico3https://hacktoberfest.digitalocean.com/details
15:22:33narimiranNim will participate, of course (i'll tag 'Easy' issues with 'Hacktoberfest')
15:22:45FromDiscord<Kiloneie> What is this ?
15:23:03narimiranit is "help open source community, win T-shirt"
15:23:38narimiranyou need to make 5 PRs in october to any publicly available github repo
15:25:04Zevvand *everyone* gets a shirt?
15:25:12FromDiscord<Kiloneie> so you make contributions for a shirt ?
15:25:20*LargeEpsilon_ quit (Ping timeout: 276 seconds)
15:25:33narimiranZevv: yeah, there is a limit, but in previous years it was never reached, IIRC
15:25:37federico3Kiloneie: I hope not.
15:25:50Zevvwell, if you're short on shirts I guess thats a good reason
15:26:15FromDiscord<Kiloneie> i don't get it, you can make contributions at any time, what does this event actually do ?
15:26:26narimiranencourages people
15:26:38FromGitter<alehander42> but they need to be merged them right?
15:26:43narimirannope
15:26:46FromGitter<alehander42> ah
15:26:53narimirane.g. last year i decided to make 30 PRs in 30 days, just for fun
15:27:16Zevvwow its like the dilbert where programmers get bonusus for fixing bugs. "we're rich!"
15:27:17narimiran*31
15:28:40federico3Kiloneie: you contribute because you want to do so and the completion email is a little thank-you for an otherwise often thankless task. I often participated without requesting the t-shirt.
15:29:01*navinmistry joined #nim
15:29:30FromDiscord<Kiloneie> Not my thing i guess. I dabble into programming, i am not born into it.
15:30:00Zevvkiloneie: you might surprise yourself one day
15:30:01disruptekdon't let that stop you.
15:30:21Zevvyou find this tiny thing bugging you that you know how to fix
15:30:22FromGitter<alehander42> PR is fun man
15:30:28disrupteki'm pretty lousy at it, but i still enjoy it.
15:30:32FromGitter<alehander42> you can PR crazy things
15:30:49FromGitter<alehander42> but dont
15:31:13Zevvkiloneie: noone will ever critisize you personally over a PR. They might critizize the PR itself, but that is how you learn
15:31:16disrupteki hacked my irc bot last night so it only throws up a notification on my screen if i don't have my irc window focussed. it's a small thing, but huge impact. being a programmer is like being a magician.
15:31:34CadeyKiloneie: "failure" is catalytic to success
15:31:47FromDiscord<Kiloneie> maybe, but if i will fix things it will be Nim, Godot and such, not random stuff. Once i actually know what i am doing.
15:31:51FromGitter<alehander42> no
15:31:56FromGitter<alehander42> it's just a nice skill
15:32:14Zevvwow this channel is really therapeutic. we can all hold hands and sing!
15:32:14FromGitter<alehander42> but i agree, making PR-s just for the sake of it isn't important
15:32:20Araqit's so much easier though when you don't know what you're doing
15:32:28narimiran:D :D
15:32:40Cadeythe real trick is to see yourself as a professional beginner
15:32:46FromGitter<alehander42> but if you dont, you go and PR the wrong repo by mistake
15:32:53Zevvcadey: thats pretty true.
15:33:11shashlick@disruptek - what client do you use
15:33:13*navinmistry quit (Ping timeout: 245 seconds)
15:33:17FromGitter<alex65536> How does `sink` work?
15:33:33daddoothis is therapeutic? I'm reading as it scrolls by and thinking "Holy cow, look at all the stuff I don't understand yet!"
15:33:35disruptekmy bot is nim.
15:33:35Zevvcontributing elevates you beyond your own pet projects. you have the guts to talk to a mic on a computer, I dont
15:33:38FromGitter<alex65536> The docs say the parameter is consumed and is no longer accessible
15:33:46*disruptek waves at snooptek.
15:34:01FromDiscord<Kiloneie> Welp my october is gonna be videos after videos, and one party where i hope i don't break myself again o,o.
15:34:08FromGitter<alex65536> And the compiler checks that it's not used
15:34:19FromGitter<alex65536> But the following code compiles:
15:34:21Cadeyalex65536: https://nim-lang.org/docs/destructors.html
15:34:26FromGitter<alex65536> `func consume(x: sink int) = discard "no impl" ⏎ ⏎ var x = 3 ⏎ consume x ⏎ var y = x + 4 ... [https://gitter.im/nim-lang/Nim?at=5d922081eb1eff63d650d9cb]
15:34:30FromGitter<alehander42> Kiloneie why dont you twitch? i find it much easier, because its nice to talk with people while you code
15:34:47clyybber* stream
15:34:55clyybberYou can also stream on youtube
15:34:59FromDiscord<Kiloneie> i find it scary, my initial plan was to stream games, i waited 7 months for optic fiber, my shitty fucking internet provider
15:35:13FromGitter<alehander42> ohhhh, internet speed is important indeed
15:35:19FromDiscord<Kiloneie> so i made gaming videos instead, that got me no views at all... in 4 months. Now i am here πŸ˜›
15:35:30clyybberalex65536: Because this doesn't apply for ints
15:35:34FromDiscord<Kiloneie> i had 10/1 connection before, couldn't do a thing
15:35:55clyybberalex65536: Wrap your int in an object and see it work
15:36:02*whaletechno joined #nim
15:36:03FromGitter<alehander42> *holds the hand of* Zevv
15:36:32FromDiscord<Kiloneie> took me 8 hours for an hour of gaming video to upload. it was a nightmare. Now it takes like less than a minute for a Nim video with this connection.
15:36:50clyybberNim videos are probably much smaller too
15:37:06FromGitter<alehander42> so probably you can stream
15:37:08FromGitter<alehander42> with that speed
15:37:35Cadeyi should stream some nim programming at some point
15:37:36*pigmej joined #nim
15:37:43FromGitter<alex65536> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d922147eb1eff63d650e319]
15:37:46clyybberZevv: Araq is fast as fuck: https://github.com/nim-lang/Nim/pull/12308
15:37:48FromGitter<alex65536> Still compiles
15:38:09Araqno, I was bored and I'm thankful for easy bugs
15:38:16clyybberlol
15:38:24disruptekshashlick: https://github.com/disruptek/xs/blob/master/bot.nim
15:38:38FromDiscord<Kiloneie> i got 100/100 now, i can, but... i really shouldn't yet, i am planning to do so once i get like 30-40 videos on Nim, have an audience to actually show up, and also have the knowledge to actually show them stuff, right now i don't know much.
15:39:09clyybberalex65536: Care to share the snippet?
15:39:36disrupteknot sure anyone wants to watch me meander through code. it's rare that i have any idea what i'm doing.
15:39:44clyybberAraq: If you're bored, can you look at https://github.com/nim-lang/Nim/issues/12294 ? I have no idea whats going on there
15:40:45disruptekhttps://github.com/nim-lang/Nim/issues/11081
15:41:09Cadeydisruptek: you think i have any idea what i'm doing?
15:41:33Cadeyi was probably gonna do some stuff re: hobbyist computational linguistics in Nim
15:42:03FromGitter<alex65536> clyybber: https://paste.ubuntu.com/p/Nmh4BhJswd/
15:42:27disruptekCadey: do you have any nlp experience or just gpt-2 play?
15:42:37FromGitter<alex65536> Is text in code tags transmitted from Gitter to IRC?
15:42:38shashlick@disruptek so you have two connections to irc - one with your client and this bot to notify?
15:42:38Cadeyi'm not even doing GPT-2 :D
15:42:45disruptekmarkov chains?
15:42:50disruptekwhat are we talking about?
15:42:52Cadey15:37 (FromGitter) <alex65536> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d922147eb1eff63d650e319]
15:42:54shashlickDoesn't your client have notifications?
15:43:08Cadeydisruptek: parsing streams of words in a conlang into an abstract idea of a sentence
15:43:10disruptekyes, but i watch the whole channel. everything.
15:43:14Araqclyybber: looked at it but haven't found the cause
15:43:23disruptekhow do you think i'm so active in here?
15:43:35shashlickI use matterbridge and slack
15:43:41AraqI suspect that somehow the VM is dealing with a "destructor injected" AST
15:43:56clyybberAraq: Oh, and it can't deal with that?
15:44:06shashlickAlso pull in all github notifications, forum posts, etc
15:44:07disruptekCadey: i need someone with some semantics experience, but it might not require a 99% result. 80% might be good enough.
15:44:09Araqyeah. there is logic to avoid this
15:44:39Cadeydisruptek: conlangs let you better control the semantics :D
15:44:40clyybberdisruptek: Hows that `#?` thing called again?
15:44:45shashlickCause I get mobile too then
15:44:57disruptekclyybber: you can ignore that, but it's a source code filter.
15:45:05disruptekcalled by the compiler.
15:45:05Cadeydisruptek: https://christine.website/blog/mapatei-2019-09-22
15:45:13disruptekare you looking at my PR for literate?
15:45:26FromGitter<alex65536> BTW, I use Nim 1.0 in Debian unstable to compile
15:45:28Cadeyi'm currently working on the stream of words to a stream of phrases layer
15:45:32clyybberdisruptek: Ah, I thought it was, but I forgot the syntax for them.
15:45:50clyybberdisruptek: Dunno, just looked at some link u sent :P
15:46:06disruptekoh, that's just a comment now. i think i retabbed that file.
15:46:36disruptekmy personal code is largely tabulated because expandtab is stupid. but i've been publishing more dogshit, so i've retabbed most of it.
15:47:22FromGitter<alex65536> BTW, is there a way to pass a parameter by copy in Nim, with the ability to change it inside?
15:47:32disruptekCadey: #nim-offtopic?
15:47:36Cadeysure
15:47:56clyybberalex65536: Nope, just do `var paramName = paramName`
15:47:58Zevvclyybber: woot!
15:48:03*floppydh quit (Quit: WeeChat 2.6)
15:48:07Zevvyou see, even Araq PR's!
15:48:19FromGitter<alex65536> Thanks :)
15:49:39clyybberalex65536: Not sure whats going on there, but you should get a hint "Copy passed to sink param" or something like that
15:50:30FromGitter<alex65536> clybber:
15:50:36FromGitter<alex65536> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d92244b9d4cf1736045bdcf]
15:50:48FromGitter<alex65536> That's what I got
15:50:53clyybberYeah, same
15:51:59*LargeEpsilon joined #nim
15:53:47*Trustable joined #nim
15:56:11FromGitter<alex65536> So, a bug?
15:59:16FromGitter<alex65536> > but you should get a hint "Copy passed to sink param" or something like that ⏎ And why only hint, but not a error?
15:59:18FromDiscord<Shield> @shashlick congrats for getting it to work, can you make a 32bit build?
16:02:11clyybberalex65536: Because it shouldn't error? Its only a performance hint
16:02:53clyybberalex65536: Also regarding your snippet, I don't think its a bug. You don't have `=` `=destroy` or `=sink` defined for your object type, so its just gonna ignore it
16:04:13shashlick@Shield - sure I can setup travis for that
16:04:16shashlickhow come you want 32-bit
16:06:59FromDiscord<Shield> i'm currently on a 32bit window install and i can't really switch
16:07:17shashlickokay let me see
16:08:12FromGitter<alex65536> @clyyber: so, in this case `sink` should do nothing?
16:10:39*aEverr quit (Ping timeout: 265 seconds)
16:11:18FromGitter<alex65536> but with `seq[int]` it doesn't ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ prints `@[9, 2, 3, 4]` ... [https://gitter.im/nim-lang/Nim?at=5d922926eb1eff63d6511dd7]
16:11:39*aEverr joined #nim
16:13:08*leorize quit (Remote host closed the connection)
16:13:46*leorize joined #nim
16:14:20*nif quit (Quit: ...)
16:14:29*nif joined #nim
16:24:24*navinmistry joined #nim
16:27:47*nsf joined #nim
16:28:49*navinmistry quit (Ping timeout: 250 seconds)
16:37:41FromGitter<Varriount> Neat, looks like Araq is investigating GC stuff
16:45:24*clyybber quit (Quit: WeeChat 2.6)
16:52:15*tiorock joined #nim
16:52:16*tiorock quit (Changing host)
16:52:16*tiorock joined #nim
16:52:16*rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services)))
16:52:16*tiorock is now known as rockcavera
16:59:51*tklohna joined #nim
17:05:39*narimiran quit (Remote host closed the connection)
17:06:17*narimiran joined #nim
17:08:22*ehmry quit (Ping timeout: 245 seconds)
17:10:16*LargeEpsilon quit (Ping timeout: 240 seconds)
17:11:46FromDiscord<garageagle> How would I run a console command (eg. `ls`, `dir`) and capture the output? `execProcess()` only allows me to run programs. (I'm on windows btw)
17:12:16tklohnaHello everyone! I'm trying to compile nim to s390x, but I'm getting unsupported CPU. According to https://nim-lang.org/docs/packaging.html s390x should be "supported". Am I missing some necessary steps? :)
17:13:24Zevvwell, your platform is pretty rare and it is not in the regular test suite, so you might have hit some unloved code maybe
17:14:04tklohnaThat's what I thought. I'm thinking of using nim to implement a test harness instead of our current written in C, so I'm testing all arches that we need
17:14:29tklohnawelp, I'll dive into the code, but I don't see anything obvious
17:15:38*clyybber joined #nim
17:15:40*LargeEpsilon joined #nim
17:18:16*navinmistry joined #nim
17:22:16FromGitter<alehander42> yes, i guess one just needs to
17:22:23FromGitter<alehander42> fill in platform.nim
17:22:31FromGitter<alehander42> i cant see s390x
17:22:52*navinmistry quit (Ping timeout: 264 seconds)
17:23:45FromGitter<alehander42> one needs to add it to TSystemCPU, and an element to CPU
17:23:57FromGitter<alehander42> rebuild the compiler
17:23:58FromGitter<alehander42> and i guess that should be enough?
17:24:15tklohnaI will tomorrow. Thanks!
17:24:18tklohna*try
17:24:46FromGitter<alehander42> it should be a simple fix away
17:24:49FromGitter<alehander42> thank you
17:30:02*nsf quit (Quit: WeeChat 2.5)
17:32:22FromDiscord<garageagle> How would I run a console command (eg. ls, dir) and capture the output? execProcess() only lets me run programs.
17:32:37FromGitter<alehander42> thats not true
17:32:48narimiran`execCmdEx` ?
17:33:03*nif quit (Quit: ...)
17:33:08FromGitter<alehander42> what i mean is, it is true sorry, but sometimes its enough to pass full path to `ls` etc
17:33:13*nif joined #nim
17:33:31FromGitter<alehander42> oh this is good
17:34:10Araqgarageagle: use os.nim instead, don't run external, platform specific commands
17:36:51disruptekit makes araq angry.
17:36:58disruptekyou wouldn't like him when he's angry.
17:37:07*LargeEpsilon quit (Ping timeout: 245 seconds)
17:44:36*Ven`` joined #nim
17:44:44*rockcavera quit (Remote host closed the connection)
17:45:08*ehmry joined #nim
17:55:32*navinmistry joined #nim
17:57:06FromDiscord<Kiloneie> Have a snickers
17:57:13rayman22201too much irc history. I can't keep up lol.
17:57:26FromDiscord<Kiloneie> don't read it
17:59:49*navinmistry quit (Ping timeout: 250 seconds)
18:01:51FromDiscord<Shield> man building on windows is such a shitshow
18:02:14FromDiscord<Kiloneie> Wau i just made a cut mid sentence and replaced it perfectly O,O, voodoo luck
18:03:10disruptekyou had me at `windows is such a shitshow`.
18:04:15clyybberdisruptek: With araqs upcoming fix and my streams thing merged you *should* be able to run npeg at CT on the JS backend
18:04:32disrupteki saw that, thanks. πŸ˜€
18:07:54clyybberAraq: was just investigating the VM issue, and then saw your fix
18:08:08clyybberCan you explain why that assert was there in the first place?
18:09:41*couven92 joined #nim
18:09:42disruptekbtw, did you see that windows-null-writes bug exelotl ran into?
18:10:02clyybberNope, have a link?
18:10:18disruptekhttps://gist.github.com/exelotl/d286002d8f90f75bbd4543352e271f73#file-writewindows_fix-nim-L18-L22
18:10:29FromGitter<alehander42> rayman22201 we need to generate highlights
18:10:36disruptekproblem is that we're not writing nulls into files on windows.
18:10:41*al_ joined #nim
18:10:51FromDiscord<Shield> @shashlick so I tried to build Feud, I only managed to build the plugins (for some reason git in nimterop refuses to work so I had to download the libs manually)
18:10:52disrupteki think we're eliding them from console output but the code is eliding them from all writes.
18:11:05FromDiscord<Shield> I couldn't get past building scintilla for the bin, it gave me an error that string_view is missing, it's an experimental lib in gcc so I assume that it requires some special flag to use, copying it doesn't help, the compiler just gets stuck on PlatWin file
18:11:31disrupteki think we want it to be fixed for 1.0.2.
18:11:33FromDiscord<Shield> it doesn't say anything, it gives up silently without crashing lol
18:11:38rayman22201@alehander42, lol indeed
18:11:50disruptekShield: which platform?
18:12:21clyybberdisruptek: WTH that's kinda funny. Unfortunately (not) I don't use windows anymore.
18:12:50clyybberSince wine and dxvk have advanced so far there is no reason for me anymore to dualboot
18:13:22disruptekyeah, it's weird because the code was in with an `if false` and then it got put in as part of a larger rollup for 1.0. to fix unicode or something. but, it's no beuno.
18:14:02*daddoo quit (Quit: Leaving)
18:14:55Araqclyybber: the assert was there because I thought about this incorrectly: for 'a[i] = move(a[j])' the dest "register" doesn't have to be set as a[i] is never in a register
18:15:42Araqthe wrong assertion could be fixed by removing it, everything works out fine. Could have added a test case but I'm special
18:16:21*nsf joined #nim
18:17:16FromDiscord<Shield> @disruptek win7 32bit
18:19:17clyybberAraq: Cool, thanks. If you want I send a test case PR
18:19:42Araqafter we got the azure pipelines to work
18:19:54Araqthe CIs are unusably slow now :-)
18:19:59Araq:-(
18:20:01disruptekmaybe someone with windows can look at exelotl's thing.
18:20:27clyybberAraq: Yeah, I noticed that too, wanted to ping narimiran about it, but I guess theres not much we can do
18:20:47Araqhe's working on the azure thing
18:21:23clyybberOh, cool. What benefits do those have?
18:22:02narimiranspeeeeeeeeed
18:22:07clyybberNice
18:22:28FromDiscord<Shield> I missed exelotl's bug, did he provide some minimal test?
18:22:57disruptekyou can't write a string with nulls in it to a file on windows.
18:23:00clyybberMore than a hundred PRs per week lol: https://github.com/CleverRaven/Cataclysm-DDA/pulse
18:23:16disrupteki posted the link to something he wrote in prep for a fix.
18:26:55*navinmistry joined #nim
18:31:08*navinmistry quit (Ping timeout: 245 seconds)
18:35:32*ng0 quit (Ping timeout: 260 seconds)
18:38:30FromDiscord<exelotl> hey I'm back and finished eating
18:38:37FromDiscord<exelotl> I'll pick it up now :)
18:38:48shashlick@Shield - you need v020 branch of nimterop
18:39:26FromDiscord<Shield> I do have v020, nimble downloaded that automatically
18:39:33*ng0 joined #nim
18:39:49shashlickokay can you `nimble clean && nimble release` and show me what your output is
18:39:54shashlickalso what version of gcc do you have
18:40:32FromDiscord<Shield> I use the recomended version from Nim website
18:40:44*clyybber quit (Quit: WeeChat 2.6)
18:41:25FromDiscord<Shield> also can confirm exelotl's bug, it doesn't write null characters, when I edit that line, the program just hang while consuming cpu
18:42:00disruptekthat's helpful.
18:43:15shashlickokay that might be too old - v4.x right?
18:43:21shashlicki use 8.1.0
18:46:24shashlick@dom96 - please review - https://github.com/nim-lang/nimble/pull/714
18:46:34shashlickhttps://github.com/nimble-test/issue280and524/pull/3
18:47:15FromDiscord<Shield> it's 6.3.0
18:47:40FromDiscord<Shield> i'll try to update and get back at you, feudc was built at least
18:48:01shashlickya is scintilla related and feudc doesn't use that
18:48:42FromDiscord<Shield> well, the last error was related to scintilla, it failed to import string_view
18:54:24FromDiscord<Shield> i guess that may be the problem, scintilla requires gcc 7.1.0 or better
18:57:39*skoude joined #nim
18:58:23FromDiscord<Kiloneie> #7 is live !
18:58:23FromDiscord<Kiloneie> LINK: https://youtu.be/Ystn3SG2yeU
18:59:58FromDiscord<Kiloneie> This one convinced me not to make 2 videos a day, this one was hard to record and edit <,<
19:00:55*rokups quit (Quit: Connection closed for inactivity)
19:04:26*navinmistry joined #nim
19:08:36*navinmistry quit (Ping timeout: 240 seconds)
19:15:32*clyybber joined #nim
19:20:35FromDiscord<Shield> gotta love those missing gcc dlls when you compile to c++
19:25:03FromDiscord<Shield> compiling takes quite long, expecially for dlls, I think nimterop regenerates the bindings for each library separately
19:26:11paxisis there a reason why a DateTime object doesn't get replaced in fmt"{dt}"?
19:28:29Araq import times
19:28:29Araq var dt = initDateTime(01, mJan, 2000, 00, 00, 00)
19:28:29Araq check &"{dt:yyyy-MM-dd}", "2000-01-01"
19:28:32Araqworks
19:30:57*NimBot joined #nim
19:31:20paxisso the format is a requirement?
19:32:32FromDiscord<juan_carlos> fmt"{$dt}"
19:33:14paxisi was doing echo &"Time: {dt}", or even just echo &"Time: {now()}"
19:33:17disruptekasynchttpserver runs an infinite loop when you ask it to serve. that loop crashes when any async client operation fails. doesn't seem like sensible server behavior.
19:33:49Araqdisruptek: report it
19:33:50paxisthe $ just converts to a string?
19:34:22FromDiscord<Kiloneie> $ is used to convert any basic type to string
19:34:29disruptekyeah, just throwing it out there for the masses.
19:34:33paxisok, thanks!
19:35:30disruptek$ is a proc conventionally implemented for types which returns a string representation of instances of said type.
19:35:57zedeusdom96: please take a look at this when you have time https://github.com/zedeus/jester-example
19:36:22disruptekyeah, it's like 315 in asynchttpserver.nim in the stdlib.
19:36:28disrupteks/like/line/
19:37:19disruptekzedeus: you wanna make an issue?
19:38:35zedeusI could but I'm not 100% sure about the cause yet, whether it's simply because of a request getting cancelled
19:38:59disruptekwell, i am.
19:39:21*navinmistry joined #nim
19:40:31*pigmej quit (Quit: ZNC 1.7.3 - https://znc.in)
19:40:35Araqdisruptek: when this code was written you couldn't use 'try' inside 'async' or something :P
19:41:01disrupteki think maybe the right solution is to make no changes and just have jester write a new mainloop.
19:41:25disruptekie. leave the stdlib alone and just explain the behavior.
19:41:50Araqadd a 'onError' callback maybe so that the server it not tied to a logging mechanism
19:42:40disruptekserve() could be an iterator that yields futures for each client connection.
19:43:31*pigmej joined #nim
19:43:49*navinmistry quit (Ping timeout: 250 seconds)
19:45:40Araqor that, *shrug*. or maybe simply document how the loop should look like and don't optimize for "a webserver takes 1 line of code"
19:46:03disruptekthat's why i say, `do nothing` and explain. 😁
19:46:23*leorize quit (Remote host closed the connection)
19:46:46disruptekwhat's good about it is that it forces you to think about handling this situation once you get serious about serving requests.
19:46:51*leorize joined #nim
19:53:14*asymptotically quit (Quit: Leaving)
19:53:47disruptekbut we're not exporting the client handling, so it does need a change. πŸ˜’
19:57:50*abm quit (Quit: Leaving)
19:58:02ZevvWill js tests run by `nim js -r mystuff.nim` work in the important-packages CI?
19:58:22Zevvaka, is node available?
19:58:22lqdev[m]just found this bug https://play.nim-lang.org/#ix=1K7v
19:58:26lqdev[m]is this known?
19:59:39*skoude quit (Ping timeout: 240 seconds)
19:59:49Zevv`result` = ((NI*) `x`.ClE_0)[1] < 0;
19:59:51Zevvwhoa
20:00:34*couven92 quit (Quit: Client Disconnecting)
20:00:52clyybberlqdev[m]: I dont think so
20:01:14shashlick@Shield did it work
20:01:32shashlickEach dll is in a separate nimcache so it gets regenerated
20:01:37shashlickBut only once
20:06:04clyybberZevv: I'd like to use npeg for my parser, but I'm not sure its the right tool.
20:06:13clyybberSince I have to parse ascii art at some point
20:06:25Zevvit's never the right tool
20:06:35Zevvit's like duct tape and tie wraps
20:06:53FromGitter<Bennyelg> Anyone has an idea : ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I tried to add import models/post but it still persist [https://gitter.im/nim-lang/Nim?at=5d92605dd97d8e3549decddd]
20:07:21Zevvclyybber: but feel free to drop me a snippet of what you will be parsing!
20:07:56clyybberZevv: Something like this: http://ix.io/1K7O
20:08:08AraqZevv: yes, node is available
20:08:15disruptekyou're parsing a roguelike?
20:08:39clyybberdisruptek: I'm parsing map parts, yeah
20:08:50ZevvAraq: ok, thanks. With your fix of 12240 stuff now works, so I enabled the js test by default
20:09:10Araqhttps://theitbros.com/powershell-gui-for-scripts/ slightly offtopic but maybe "finish.exe" can make use of this...
20:10:01lqdev[m]Zevv: this happens because `finished` is a proc for checking whether a closure iterator is finished, but that proc only works on closure iterators (duh)
20:10:02lqdev[m]I'll report this later
20:10:04FromDiscord<Kiloneie> Make GUI version of installer ? Yes.
20:10:12*navinmistry joined #nim
20:10:13Zevvclyybber: that should be no problem. But is it work making a complete parser for that, or will it get more complex?
20:10:29*cgfuh quit (Quit: WeeChat 2.5)
20:10:29clyybberIt's fairly simple so far
20:10:36Zevvlqdev[m]: Sure, but I ment the implementation. It's .emit.'ing nasty mangled C code
20:10:43clyybberI even got rid of StringStreams now, and am now looping manually
20:12:01AraqKiloneie: we had one once but it couldn't be maintained
20:12:07Zevvclyybber: sure, whatever works for you
20:12:17Araqthe installers are all pretty bad with "optional downloads"
20:12:41clyybberZevv: I'm just wondering, is there some proof or research into whats the optimal way of parsing something?
20:12:47Araqand coding a mingw detection logic in a bad scripting language wasn't fun either. in the end only Nim could do it properly
20:12:55testgovno[m];
20:13:06clyybber;
20:13:07Araqand I decided that programmers can run a console application
20:13:21FromDiscord<Kiloneie> well it is simple enough
20:13:37FromDiscord<Kiloneie> gamers can do that too, pirate ones
20:13:52Araqhi testgovno[m]
20:14:07FromDiscord<Kiloneie> pretty sure govno means shit
20:14:28*navinmistry quit (Ping timeout: 245 seconds)
20:14:44clyybberYeah, in russian
20:14:46Zevvclyybber: there's tons of research and papers, and i dont think it's a closed subject yet. This was all pretty new to me when I started this, and I only scratched the surface. If you want performance, you hand write your parser. If you want flexible and low maintaince, generate something.
20:14:50FromDiscord<demotomohiro> I think installing Nim using scoop package manager is simplest. It automatically install gcc and set PATH.
20:15:40Araqcool but "automatically install gcc" is exactly what I didn't want
20:15:58Araqas the gcc can stay when update your Nim and it's quite a download
20:18:31FromDiscord<Shield> @shashlick it worked, I've spent some time chasing a missing dll, somehow I installed a gcc that doesn't have libgcc_s_dw2-1.dll twice
20:19:39FromDiscord<Shield> the save plugin fails tho, and sometimes it crashes, i'll recompile in debug mode to see if it'll give better errors, but it works
20:20:15*Vladar quit (Remote host closed the connection)
20:23:03*nsf quit (Quit: WeeChat 2.5)
20:28:46FromDiscord<garageagle> Is there a way to make `net.recv()` accept any amount of data?
20:29:19disruptekwhat a strange question.
20:29:53disruptekwhat are you trying to do?
20:31:36FromDiscord<garageagle> I'm used to python where you just put the maximum amount of data you want
20:31:56disruptekthat's how it works here, too.
20:32:11FromDiscord<garageagle> I guess I could make my own by accepting one byte of data over and over until it times out
20:32:40FromDiscord<garageagle> hmm, maybe I'm implementing it wrong
20:32:48FromDiscord<garageagle> Let me look at my code again
20:33:17*LargeEpsilon joined #nim
20:36:44FromDiscord<Kiloneie> Notepad++ still uses Nimrod name for Nim.
20:37:17*LargeEpsilon quit (Ping timeout: 240 seconds)
20:39:07FromDiscord<exelotl> LOL i made a dumb mistake in my fix
20:39:17FromDiscord<exelotl> "why is fputc returning -1"
20:39:31FromDiscord<exelotl> cause I accidentally imported fputs under the name fputc
20:41:39Araqer why does 'nimble search wxWidgets' returns nothing?
20:42:49*rockcavera joined #nim
20:44:03FromGitter<alehander42> Kiloneie, they should stop
20:44:11FromGitter<alehander42> exelotl, hm
20:44:30narimiranAraq: https://nimble.directory/ also returns nothing. so either there is really nothing or somebody just didn't write their tags properly
20:44:52AraqI think I forgot to "Nimble publish" it
20:45:46pigmejAraq :D
20:46:23Araqnimble should search github...
20:48:06Zevvnooooh bah
20:48:15ozis there not something like this? nimble install --from-git https://server/somerepo.git
20:48:56FromDiscord<Kiloneie> why does running a .nims script trough cmd via nim "insertname.nims" which doesn't show any errors, do nothing... i put an echo in there, std.readLine, used mkDir(), nothing...
20:49:34narimiranoz there is
20:49:46narimirannimble install <url>
20:50:30*navinmistry joined #nim
20:50:36FromDiscord<garageagle> `net.recv()` with no timeout (or timeout = -1) is basically blocking, right?
20:52:57oznarimiran: ah thanks, we're good then. :)
20:54:53*navinmistry quit (Ping timeout: 245 seconds)
20:55:37*narimiran quit (Ping timeout: 240 seconds)
20:56:11ozit could be fun to have sub-commands Γ  la git/cargo, where if you have "nimble-something" somewhere in your path, you can invoke "nimble something" transparently.
20:57:33Araqoh my
20:58:41Araqif you can't design your system, give it thousands of options but put them under a hierarchy.
21:07:26clyybberZevv: Haha, ok its starting to get ugly really fast. Guess I'm gonna use npeg :)
21:08:03Zevvshow me?
21:08:38clyybberThe ugly stuff?
21:09:02Zevvyesss
21:09:04ZevvI love that
21:09:32ZevvI used to be a programmar, but over the last years I'm moving more and more towards plumbing
21:09:53clyybberIts not much, but I already dont like it: http://ix.io/1Kai lol
21:10:32Zevvwell, it's not *bad*, it's just how things go right?
21:10:49clyybberYeah, but so much case and all. That screams for a macro
21:11:31Zevvwith a peg parser you can't easily do semantic-dependent stuff though.
21:11:50Zevvso define A in your grammar while later wanting to match A is a pain
21:12:02clyybberOh
21:12:10clyybberWell thats the ugly stuff I was wary about
21:12:21Zevvthat's why I mentioned that now :)
21:12:28*Trustable quit (Remote host closed the connection)
21:12:28clyybberHmm, then I'm gonna go manual, but help myself with some macros
21:13:11*daddoo joined #nim
21:14:54Zevvyeah, I'm not sure if any parser generator can help you with that. You can still go hybrid though - parse your definitions with a generated parser, and then use that info to parse your boards?
21:14:59FromDiscord<Kiloneie> Is there a way to get input from the console without having to press enter ?
21:15:20FromDiscord<Kiloneie> like just press a key and it takes it ?
21:18:25FromDiscord<Lunar> Basic steps to make a PEMDAS calculator?
21:20:05ZevvKiloneie: There's some technicalities in that, and complications because of the very different way windows and unix work
21:20:35FromDiscord<Kiloneie> Well i wanna make a space invaders in the console <.<
21:20:57Zevvterminal.getch() might work, let me check
21:21:22FromDiscord<garageagle> `net.recv()` with no timeout (or when the timeout is -1) is basically blocking, right?
21:21:39Zevvkiloneie: http://ix.io/1Kan
21:21:42Zevvthat was easy
21:22:03Zevvreading function and arrow keys is a mess though
21:22:09FromDiscord<Kiloneie> Oh wau thanks !
21:22:24FromDiscord<Kiloneie> i will work from here
21:24:17shashlick@Shield awesome glad to hear your experience
21:25:37disruptekgarageagle: yep.
21:27:00*navinmistry joined #nim
21:31:08*navinmistry quit (Ping timeout: 245 seconds)
21:33:45*artemis_coven joined #nim
21:33:50*artemis_coven is now known as sedfox
21:39:37clyybberZevv: I found a more or less sane approach: http://ix.io/1Kd8
21:40:32*ng0 quit (Quit: Alexa, when is the end of world?)
21:43:20clyybberWell, Imma get some sleep, good night
21:43:22*clyybber quit (Quit: WeeChat 2.6)
21:45:13*al_ quit (Quit: al_)
21:45:19FromGitter<zetashift> gnight
21:45:49Zevvclyybber: http://ix.io/1Ki2
21:45:56Zevvoh, well
21:50:04FromGitter<zetashift> Is there something special about using VCC (using the 2019 installer) and Nim on Windows 10?
21:51:09*LargeEpsilon joined #nim
21:55:17*LargeEpsilon quit (Ping timeout: 240 seconds)
21:56:09FromDiscord<garageagle> People on IRC, we probably can't use emojis, can we? emoji --> πŸ€”
21:56:28disrupteki will permit it.
21:56:35FromDiscord<garageagle> I'm guessing it just says `:thinking_face:`
21:56:53FromGitter<zetashift> on Gitter your emoji renders as an emoji @garageagle
21:57:05FromDiscord<garageagle> Ah, ok
21:57:13rayman22201lol. depends on the client. My irc client renders it properly. some people with older clients don't.
21:57:28*clyybber joined #nim
21:57:54daddoowhat should I have seen? I'm running hexchat
21:59:02clyybbersolitudesf: Hi, are you on devel?
21:59:30clyybberZevv: Oh thanks, nice
22:01:07clyybbersolitudesf: Maybe you have `static int` in your signature and not `int`
22:01:14*solitudesf quit (Ping timeout: 240 seconds)
22:01:27clyybberOh, well
22:02:58clyybberGood night again
22:03:00*clyybber quit (Quit: WeeChat 2.6)
22:10:06*oprypin quit (Quit: Bye)
22:10:14*oprypin joined #nim
22:15:20*daddoo quit (Quit: Leaving)
22:41:40*krux02 quit (Remote host closed the connection)
22:44:34FromDiscord<exelotl> made a PR for the write() bug, not sure if I need to do more https://github.com/nim-lang/Nim/pull/12314
22:45:01disrupteki saw that, thanks.
22:45:31FromDiscord<exelotl> np, kinda confused by the whole backports thing. should I add a note to the changelog?
22:46:16disrupteki think it's a good idea, since someone might go looking to see if it was fixed.
22:46:46FromDiscord<exelotl> ok, will that disrupt the CI process? guess it doesn't matter if so
22:46:59disruptekright; it hasn't gotten to yours yet.
22:47:09disrupteki'd add the [backport] to the pr title, too.
22:48:14FromDiscord<garageagle> I'm trying to create a reverse shell application, but it isn't working for me. It seems that either the server isn't sending properly, or the client isn't receiving the data. Here's my code. Server: https://hastebin.com/ligujihiza.php Client: https://hastebin.com/etohewarox.pl
22:48:17*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:49:25FromDiscord<garageagle> I've made several of these in Python, so I'm trying to "translate" them into nim.
22:53:53*garageagle joined #nim
22:54:38FromDiscord<exelotl> disruptek: if I forgot to add [backport] in the initial commit message is that a problem?
22:54:49disrupteknah.
22:57:34skrylar[m]woo. finally wrote a cassowary from the paper
22:59:19*garageagle quit (Remote host closed the connection)
23:08:18FromDiscord<exelotl> lol maybe I'm overthinking this but this would be the only "bugfix" in the history of the changelog that doesn't refer to an issue number
23:08:45disruptekyou could make an issue... 🀷
23:09:45FromDiscord<exelotl> lol in that case I've basically done everything backwards
23:10:01disruptekdoesn't matter.
23:10:08FromDiscord<mratsim> are you benchmarking license generation @disruptek? :p https://github.com/disruptek/golden
23:10:23disruptekyeah, gotta start somewhere.
23:10:51FromDiscord<mratsim> a new game in nim: https://github.com/liquid600pgm/memrecall
23:11:31disruptekawesome!
23:17:22disruptekmratsim: if you wanna gimme some benchmarks i'd appreciate it. i know you have done a lot of 'em. just looking for things that should be faster or that you care about regressing.
23:22:53rayman22201disruptek do you want microbenchmarks? This might be a good list: https://github.com/kostya/benchmarks
23:23:10disrupteknot picky.
23:23:22rayman22201also There is also the classic https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fastest.html
23:25:48*lqdev[m] uploaded an image: image.png (31KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/tMWJVSkcgnBhCscijfVPvday >
23:25:55lqdev[m]@mratsim wow you're fast
23:26:02lqdev[m]I didn't even have to announce it lol
23:26:26lqdev[m]but as you can see on the provided screenshot ↑ I have a problem building on ubuntu 16.04
23:27:37disrupteki can't build due to: Error: undeclared field: 'SoundIoError' for type system.cint [declared in /home/adavidoff/git/Nim/lib/system.nim(2234, 3)]
23:28:10lqdev[m]try building with -f
23:28:58disruptekoh, i guess it did build.
23:29:26disruptekthis is so cool!
23:29:33lqdev[m]anyways, any ideas on that build error I have? I need to submit the game to open jam till 3 AM
23:30:07lqdev[m]I don't want to require the most recent libc
23:33:57*actuallybatman quit (Ping timeout: 240 seconds)
23:35:12*actuallybatman joined #nim
23:36:27disruptekman, i'm terrible at this game.
23:37:26lqdev[m]I'm terrible at it too, lol
23:37:34lqdev[m]it's pretty challenging
23:37:47disruptekhow do i flip the gravity?
23:37:52disrupteki think i missed a command.
23:38:23lqdev[m]you can flip the gravity using X, but you need the flip pack first
23:38:34disruptekyeah, i got it. just missed the X hint.
23:41:52disruptekthis is fun.
23:42:02lqdev[m]quick question: do you have sound? if not, you may have to install the dependencies listed in rapid's readme
23:42:11disruptekyeah, i have sound and music.
23:42:20lqdev[m]nice
23:42:41lqdev[m]just making sure you get the intended experience lol
23:43:05disrupteknot sure why i was getting that error, since it did produce a binary.
23:43:33disruptekis there a key to full-screen it?
23:44:51lqdev[m]nope, but you can maximize it
23:45:16lqdev[m]I never implemented full-screen in my engine, it might be a future plan
23:45:46disruptekgrrr it's evil.
23:47:11lqdev[m]what's evil?
23:47:35disruptekblue room with two triangles.
23:49:29lqdev[m]assuming you're not on a detour, you should be in "the last sine wave". it's all about the timing, you need to press left at the right times
23:52:29*traviss quit (Quit: Leaving)
23:53:59disrupteki guess the titles are a little sluggish, but maybe 'cause i'm at 4k.
23:54:57lqdev[m]you mean they lag the world before displaying?
23:55:35lqdev[m]that's likely due to the texture packer, it needs a bit of time to find a suitable position for placing the texture