<< 09-02-2018 >>

00:20:33*vlad1777d joined #nim
00:29:53*vlad1777d quit (Ping timeout: 276 seconds)
00:50:37*skrylar quit (Quit: Leaving)
01:20:33*sleepyqt quit (Quit: Leaving)
01:31:01FromGitter<gogolxdong> What's the canonical way of nim to have the main thread wait forever?
02:15:08*tiorock joined #nim
02:15:08*tiorock quit (Changing host)
02:15:08*tiorock joined #nim
02:15:08*rockcavera is now known as Guest88510
02:15:08*Guest88510 quit (Killed (karatkievich.freenode.net (Nickname regained by services)))
02:15:08*tiorock is now known as rockcavera
02:17:52*gangstacat quit (Ping timeout: 256 seconds)
02:20:17*gangstacat joined #nim
02:40:13FromGitter<zacharycarter> @gogolxdong if you want to start an event loop you can call runForever in the asyncdispatch module
02:40:28FromGitter<zacharycarter> there's also sleep in os
02:40:39FromGitter<zacharycarter> not quite sure what you're trying to achieve
02:49:02*chemist69 quit (Ping timeout: 256 seconds)
02:50:14FromGitter<zacharycarter> @dom96 not trying to bug you late, just wanted to bring this to your attention: https://github.com/dom96/jester/blob/master/jester.nim#L87-L94, may want a not nil check there or something. Currently sending a response back with nil will crash jester.
02:50:37FromGitter<zacharycarter> I'll file an issue
02:51:33*vivus quit (Quit: Leaving)
02:58:36FromGitter<zacharycarter> https://github.com/dom96/jester/issues/133
03:02:36*chemist69 joined #nim
03:04:44*rinzai quit (Ping timeout: 252 seconds)
03:28:51*rinzai joined #nim
03:33:19*rinzai quit (Ping timeout: 248 seconds)
03:34:32*endragor joined #nim
03:35:47*endragor quit (Remote host closed the connection)
03:35:54*endragor joined #nim
03:36:00*endragor quit (Remote host closed the connection)
03:36:27*endragor joined #nim
03:43:19*endragor quit (Remote host closed the connection)
03:43:48*endragor joined #nim
04:00:51FromGitter<gogolxdong> Yes, thanks @zacharycarter , seems what we need.
04:08:28*radagast_04 joined #nim
04:52:55*rinzai joined #nim
04:57:18*rinzai quit (Ping timeout: 252 seconds)
05:24:05*gangstacat quit (Quit: Ĝis!)
05:28:41*gangstacat joined #nim
05:35:26*dddddd quit (Remote host closed the connection)
05:40:08*d10n-work quit (Quit: Connection closed for inactivity)
05:46:50*rinzai joined #nim
05:51:48*rinzai quit (Ping timeout: 268 seconds)
05:58:46*nsf joined #nim
06:44:33*sz0 joined #nim
07:04:55*chemist69 quit (Ping timeout: 265 seconds)
07:07:15*chemist69 joined #nim
07:30:17*gokr joined #nim
07:31:04FromGitter<alehander42> @thor77 if I understand you correctly, you can create PNode-s on runtime (importing the needed modules from the compiler)
07:31:17FromGitter<alehander42> and then use renderer.nim (from the compiler) to generate Nim code from them
07:31:23FromGitter<alehander42> that's what we did in https://github.com/metacraft-labs/py2nim/blob/master/generator.nim
07:32:08FromGitter<alehander42> (it assumes a compiler in ../nim, if you take a look at nim.cfg , but you can git submodule it, or maybe use the compiler nimble package)
07:39:37*rinzai joined #nim
07:43:40*rinzai quit (Ping timeout: 240 seconds)
07:44:52*gokr quit (Ping timeout: 252 seconds)
07:53:54FromGitter<Thor77> @alehander42 You're writing the code to a file before executing it, though ,right?
08:00:40*PMunch joined #nim
08:02:06AraqThor77: yes but the compiler API can also be used to run or translate the PNode's
08:07:34*xet7 quit (Read error: Connection reset by peer)
08:07:50*xet7 joined #nim
08:09:11thor77Araq: hm, but PNode looks like a custom type to me
08:09:38thor77it's only defined in xmldom from the stdlib but that module is not imported
08:10:12Araqcompiler/ast.nim has it
08:10:28Araqcompiler is not stdlib but can be used as a library
08:12:25thor77Araq: ah, ic
08:12:43PMunchfederico3, https://irclogs.nim-lang.org/08-02-2018.html#20:24:10 yes valid by design. Nim uses Unicode, so you can write all your variables with thy cyrillic alphabet should you wish to :P
08:13:18AraqPMunch, that is true but will be reconsidered when more people are happy with Unicode operators :-)
08:13:28Araqsome of these should be operators
08:13:43PMunchHuh? What do you mean?
08:14:05PMunchif myVar 👑 100: echo "myVar is king!"
08:14:24PMunchOperators like that?
08:14:51FromGitter<mratsim> Julia has unicode operator but no one is using them because it’s a pain
08:14:54Araq∑ should be an operator, not an ordinary identifier
08:15:57PMunchAh right. But yeah as mratsim says it's a pain to use unicode operators since very few people have them on their keyboards or knows how to type them
08:16:53FromGitter<mratsim> there is this option with tab replacement: https://docs.julialang.org/en/release-0.4/manual/unicode-input/
08:18:07PMunchYeah, that would only work in a specialized environment tohugh..
08:18:10PMunchthough*
08:18:33FromGitter<mratsim> you mean like a code editor or vim? ;)
08:18:57*xet7 quit (Ping timeout: 256 seconds)
08:19:28Araq*shrug* I like Unicode operators and when C came along many keyboards lacked []
08:19:54AraqAda avoided [] for this reason.
08:20:58Araqeventually there will be progress.
08:22:04FromGitter<mratsim> Pi on all keyboards !
08:23:28FromGitter<mratsim> There is no { [] } on my mac with a French keyboard … next time I’ll buy a Swiss, it’s actually reasonable.
08:23:36FromGitter<alehander42> that's exactly what the perl 6 people are saying (they have like a load of optional unicode operators)
08:25:00FromGitter<alehander42> honestly I'd buy a keyboard with remappable physical keys (e.g. some kind of screen/kindle inc type? -based buttons that can change appearance while still feeling as normal buttons)
08:25:36Araqalehander42: in theory we can just wait until the Unix neckbeards die out and then there will progress. in practice they found a way to spread their misguided ideas and so the future might never arrive ;-)
08:25:50PMunchAraq, are you saying we should have trigraphs in Nim? :P
08:26:39PMunchalehander42, there have been some people making those. But they are prohibitively expensive :P
08:27:05PMunchAnd what does any of this have to do with Unix Araq?
08:27:33*yglukhov joined #nim
08:27:56*Arrrr joined #nim
08:28:11AraqPMunch, ah you got me.
08:28:36*yglukhov quit (Remote host closed the connection)
08:28:45PMunchalehander42: https://www.artlebedev.com/optimus/
08:28:51*yglukhov joined #nim
08:29:02*rinzai joined #nim
08:31:28FromGitter<alehander42> @PMunch damn, expensive indeed .
08:31:41FromGitter<alehander42> but hopefully demand will drive prices down :D
08:31:46FromGitter<alehander42> talking about weird keyboards
08:31:51*xet7 joined #nim
08:31:55Araqyeah we need more demand
08:31:57FromGitter<alehander42> I've wanted to try one of those too for a long time : https://images-na.ssl-images-amazon.com/images/I/818T--WBwvL._SL1500_.jpg
08:32:11*xet7 quit (Remote host closed the connection)
08:32:15Araqand fewer people who hate unicode just because they can't type it
08:32:41AraqI can't type Russian characters without switching my keyboard layout
08:33:11FromGitter<mratsim> We should through them in China, Japan, Russia, Greece or an Arabic country (right-to-left for the win)
08:33:53PMunchHaha, yeah those are cool alehander42. I've actually got a pack of keyboard switches and diodes at home to gceahe my own board like this: https://i.imgur.com/teKEGhV.jpg
08:33:59*rinzai quit (Ping timeout: 268 seconds)
08:37:26*xet7 joined #nim
08:37:41FromGitter<alehander42> @Araq I can't imagine living without at least two keyboard layouts
08:37:58FromGitter<Thor77> Huh, I thought for a moment I was in another channel
08:38:22PMunchNorwegian is lucky enough to only have 3 extra letters, so we do just fine with the ISO layout
08:38:30FromGitter<alehander42> @PMunch oh nice, sounds cool, I definitiely have to try something like this
08:39:19PMunchThor77, haha sorry about that. This community has a tendency to go a bit off-topic at times. But just ask away with Nim questions and we'll stop :)
08:39:56thor77PMunch: heh, absolutely no problem, im obsessed with mechanical keyboards myself ;D
08:40:18PMunchalehander42, yeah right now I'm just trying to figure out how I'm going to make the case. My idea was to take the side panel of an old computer case I have and use that, but cutting the metal precisely will be a pain..
08:41:08FromGitter<Thor77> http://i.imgur.com/n4DE2vz.jpg :)
08:42:25PMunchYeah, that's to tall for me :(
08:42:35PMunchI bought a set of Kailh low-profile switches
08:42:45PMunchTo create a really slim little board
08:43:06thor77Yeah, I would like a tall board as well for travelling
08:43:08thor77*slim
08:44:39thor77i don't really feel comfortable taking the wooden one with me, as it's quite fragile
08:45:53PMunchYeah I'd imagine
08:46:14PMunchI've got a leopold at work, but my wrists hurts when I type on it :(
08:46:19thor77uh :(
08:46:26PMunchSo currently I'm using a chepa membrane bord
08:46:33thor77I've got another one with a 75% layout but I don't really like typing on it anymore :/
08:46:46thor77at work i'm forced to use a membrane board as well :/
08:50:03PMunchWhy don't you like the 75%?
08:50:16thor77too much hand movement
08:50:48thor77on my 60% i basically dont have to move my hands at all to reach all relevant keys
08:51:05thor77*40%
08:51:18thor77on the 75% one I already have to leave homerow to reach enter or space
08:53:37PMunchAh right :P
08:53:43PMunchI thought you went to a 100% :P
08:53:46PMunchAnd not down
09:03:49thor77PMunch: nah, 100% (rubber dome) -> 75% -> 40% :)
09:04:00thor77and 40$ is absolutely perfect for me
09:07:37*rinzai joined #nim
09:07:51PMunchHmm, I feel 40% is a bit too cramped
09:07:59PMunchLike how would you do brackets?
09:08:02PMunchHome/end
09:10:34PMunchThing is I want to have a ISOish layout
09:10:46PMunchAnd I'm probably going to try ortholinear
09:11:07yunfani have a finger to iso
09:11:19*natrys joined #nim
09:12:13*rinzai quit (Ping timeout: 268 seconds)
09:18:07*vlad1777d joined #nim
09:19:29PMunchyunfan, what?
09:22:22*livcd quit (Changing host)
09:22:23*livcd joined #nim
09:28:31FromGitter<survivorm> @PMunch. Used some of your translation, thank you. Some things got completely rewritten, wrote TL; DR section :)
09:29:05FromGitter<survivorm> Did you read Web of light yet?
09:29:29thor77PMunch: they're on a function layer, i'm using qmk and it got a feature named tap dance that allows to bind a key multiple times, so i got key pressed once -> opening bracket key pressed twice -> closing bracked (for [ and {)
09:30:06PMunchsurvivorm, no haven't had a look at it yet. Suddenly got pretty busy at work :P
09:30:56PMunchthor77, hmm interesting
09:31:03PMunchDoes sound a bit clunky though :P
09:31:04FromGitter<survivorm> Yeah guys, just read an article on UX and UI. And i think author was pretty mush right - less UI, better user experiance
09:31:41FromGitter<survivorm> Looks like the best keyboard should be Siri too :)
09:31:58PMunchI was actually thinking about playing around with single-key caps lock/sticky control. So I hit ctrl, then the next key I hit would have the ctrl modifier
09:32:22PMunchsurvivorm, haha I'm just imagining writing code with Siri :P
09:32:45FromGitter<Thor77> Pmunch: https://git.crapwa.re/thor77/planck/src/master/qmk_firmware/keyboards/planck/keymaps/default/keymap.c this is my keymap, if you're interested
09:32:56FromGitter<survivorm> There are blind programmers, @PMunch
09:32:58FromGitter<Thor77> It works rly well for me
09:33:22FromGitter<survivorm> Though i think they use the reversive approach
09:33:59FromGitter<survivorm> The PC tells them what's written
09:36:11FromGitter<survivorm> but still, i think interfaces must be moving to as thin as they may be, not to complicating UX with "this is context-dependant keyboard, there it works one way, and here - the other"
09:37:36*radagast_04 quit (Ping timeout: 256 seconds)
09:38:13PMunchsurvivorm, problem is that I type faster than I speak..
09:38:35PMunchAnd it's much less strenuous to type for long periods of time than talking
09:38:45PMunchAnd imagine the horrors of open-landscape solutions :P
09:39:18FromGitter<survivorm> And you think faster, than you type, so what?
09:39:24PMunchThor77, thanks I'll have a look at it :)
09:39:42PMunchsurvivorm, well I actually end up typing faster than I think as well :P
09:39:52PMunchI only reach peak speed when I have already decided on what to type
09:40:01FromGitter<survivorm> I mean, some ways are dead-ends. And that way looks as such
09:40:02PMunchOtherwise I have to pause and think about what I'm going to write
09:40:30PMunchBut I see your point
09:40:39PMunchI just don't think voice is the way to go
09:40:46PMunchDirect mind-control, maybe
09:41:13FromGitter<survivorm> PMunch, you can't type faster than you think by def. Because hands are your brain's interface to the world
09:41:38FromGitter<alehander42> filtering thoughts is not easy at all, I am doubtful (and imagine the hacks if something can accidentally "read" the wrong thought)
09:41:40PMunchWell, depends on how you define think
09:42:06FromGitter<survivorm> The more accurate assumption will be that you may type faster, than your inner monologue
09:42:18PMunchI don't make a conscious choice to move my finger to a specific key each time I want to type something
09:42:27FromGitter<survivorm> but that's more a thought conversion to the speech
09:42:35PMunchI just sorta imagine what I'm going to type and my hands just do it by themselves :P
09:42:47PMunchYeah, something likethat
09:43:08PMunchI type faster than I can construct sentences
09:44:04FromGitter<survivorm> And that's good. Just means that your "inner speech" interface is slower, than your "hand typing" one :)
09:44:29FromGitter<survivorm> But each can't be faster than actual thought
09:45:47FromGitter<survivorm> And on interfaces - i think more on the movement-tracking, like mo-cap
09:46:35FromGitter<survivorm> that's not really the thoughts capturing, but more of the movement nerve signal
09:46:51FromGitter<survivorm> still, interfaces will be tricky
09:47:04FromGitter<survivorm> and individual too, i think
09:47:16FromGitter<matrixbot> `ratherAnonymous` I have trouble setting up the nim environment variables. ⏎ export HOME=/home/user ⏎ export PATH=$PATH:$HOME/Nim/bin ⏎ export PATH=$PATH:$HOME/.nimble/bin ⏎ export NIM_LIB_PREFIX=$PATH:$HOME/Nim/lib/ [https://gitter.im/nim-lang/Nim?at=5a7d6e23ce68c3bc7464e6f4]
09:47:33FromGitter<matrixbot> `ratherAnonymous` I'm on Arch Linux and the above is inside my ".profile" file.
09:47:48FromGitter<survivorm> and?
09:48:06FromGitter<matrixbot> `ratherAnonymous` it still doesn't find the nim binary
09:48:09FromGitter<matrixbot> `ratherAnonymous` : /
09:48:35FromGitter<survivorm> echo $PATH
09:48:39FromGitter<survivorm> in the console
09:49:01FromGitter<matrixbot> `ratherAnonymous` ok, it's not listed. but why?
09:49:26PMunchI have those in my .bashrc
09:49:30*xet7_ joined #nim
09:49:30PMunchOr at least the .nimble one
09:49:46FromGitter<survivorm> Yeah, me too
09:50:04FromGitter<ChristianWitts> did you add those to your .profile and then open a new session or sourced the profile file ?
09:50:05FromGitter<matrixbot> `ratherAnonymous` I had to "source ~/.profile" a second time for some reason.
09:50:11FromGitter<survivorm> not sure you have your .profile applied
09:50:16FromGitter<matrixbot> `ratherAnonymous` ^
09:50:19FromGitter<matrixbot> `ratherAnonymous` weird
09:50:29PMunchHuh, I actually have .nimble/bin in my path twice :P
09:50:41FromGitter<matrixbot> `ratherAnonymous` it works now for some reason...
09:50:49FromGitter<matrixbot> `ratherAnonymous` better to often than not at all :D
09:51:14FromGitter<matrixbot> `ratherAnonymous` Nim is a super fun language, that has to offer a ton
09:51:23PMunchAh and "which nim" is "/home/peter/.nimble/bin/nim" apparently
09:51:30PMunchThat's.. Strange..
09:51:38PMunchShouldn't it be in .choosenim/toolchains?
09:51:40*xet7 quit (Ping timeout: 265 seconds)
09:51:53FromGitter<matrixbot> `ratherAnonymous` In C I feel like there's nothing more to learn, except libraries.
09:51:55FromGitter<survivorm> @PMunch, now, as you said it, i have nimble/bin twice too
09:52:00FromGitter<matrixbot> `ratherAnonymous` Nim had so much to offer.
09:53:19PMunchYeah Nim is great :)
09:54:34*xet7_ is now known as xet7
09:55:18*arecaceae quit (Remote host closed the connection)
09:55:40*arecaceae joined #nim
09:56:27*chemist69 quit (Ping timeout: 260 seconds)
10:01:30*rinzai joined #nim
10:10:51*chemist69 joined #nim
10:39:05*xet7 quit (Read error: Connection reset by peer)
10:39:38*xet7 joined #nim
10:42:12*Arrrr quit (Ping timeout: 256 seconds)
10:49:12*Yardanico_ joined #nim
10:56:46*Arrrr joined #nim
10:56:46*Arrrr quit (Changing host)
10:56:46*Arrrr joined #nim
11:05:35*Yardanico_ quit (Read error: Connection reset by peer)
11:17:46*PMunch quit (Ping timeout: 256 seconds)
11:51:08FromGitter<ZarsBranchkin> If random library is deprecated, what should I use instead?
11:54:33yglukhovZarsBranchkin: stdlib random
11:54:34yglukhov?
11:55:26FromGitter<ZarsBranchkin> Well isn't this from standard lib? https://nim-lang.org/docs/random.html
11:55:33dom96PMunch> [09:51:38] Shouldn't it be in .choosenim/toolchains?
11:55:35dom96nope
11:59:30Araquse random.rand() instead of random.random()
12:01:09FromGitter<ZarsBranchkin> Oh, don't see rand on the documentation though. It's outdated?
12:01:48*arnetheduck joined #nim
12:03:18FromGitter<ZarsBranchkin> Right, rand seems to work and keeps compiler silent
12:22:57*vlad1777d quit (Ping timeout: 248 seconds)
12:36:50*zielmicha_ quit ()
12:37:24*zielmicha_ joined #nim
12:51:10thor77hm, i've got another on-topic question: i used "nimble init" to generate a <myyproject>.nimble-file. It got "nimble >= 0.17.2" in it. Once I run "nimble install" it complains about that, as the latest tagged version is 0.8.8
12:51:18thor77is that expected behaviour in any way?
12:51:22thor77or did I mess smth up?
12:51:59thor77eh, nvm
12:52:02thor77i'm stupid
12:52:08*LyndsySimon quit ()
12:52:28*LyndsySimon joined #nim
12:53:30thor77no idea how it got into that file, but it seems like I inserted it myseslf...
12:58:05*clyybber joined #nim
12:59:12*clyybber quit (Client Quit)
12:59:37*clyybber joined #nim
12:59:37*yglukhov quit (Read error: Connection reset by peer)
13:00:34*yglukhov joined #nim
13:06:45*dddddd joined #nim
13:13:34*yglukhov quit (Remote host closed the connection)
13:13:53FromGitter<krux02> @ZarsBranchkin not sure if I am 100% updated, rand is a bit outdated because it was not very well designed.
13:14:19FromGitter<krux02> I recommend you to use the meresse twister. It will provide you with random bits
13:14:25FromGitter<krux02> bit nothing more
13:15:00*yglukhov joined #nim
13:16:04FromGitter<krux02> @ZarsBranchkin the random module is a bit inconsistent, because it uses exclusive upper bounds. Everything else in the language uses inclusive upper bounds
13:16:12dom96that was fixed
13:16:17FromGitter<krux02> ah, ok
13:16:39FromGitter<krux02> I ok I just looked at the latest doc from the index
13:17:02FromGitter<ZarsBranchkin> Will be fine for this use case, was jst concerned that standard random library is deprecated
13:17:35FromGitter<ZarsBranchkin> Yeah, that doc doesn't even mention rand. Should get regenerated
13:18:12dom96the docs only show the latest release
13:18:14FromGitter<krux02> it does
13:19:37*Vladar joined #nim
13:20:11FromGitter<ZarsBranchkin> Hm, maybe i was using Nim bilt from git, forgot
13:21:06yglukhovshould instantiationInfo work in a macro?
13:21:35FromGitter<krux02> dom96: would it be wrong to make the default Rand state thread local?
13:22:59FromGitter<krux02> and speking about it, does Nim make it easy to make something thread local?
13:25:40*solitudesf joined #nim
13:29:24dom96No idea if it would be wrong. Problem is there is no easy way for a library to automatically initialise a thread local var in each new thread
13:30:06FromGitter<krux02> yea I see that
13:30:16FromGitter<krux02> c++ does make it easy now
13:30:41FromGitter<krux02> thread_local is a keyword
13:31:28FromGitter<krux02> and the random module is where I would use that
13:33:23*Snircle joined #nim
13:35:39dom96we need support for this IMO
13:40:17*clyybber quit (Ping timeout: 248 seconds)
13:40:49*rinzai quit (Ping timeout: 248 seconds)
13:42:57*jxy quit (Ping timeout: 240 seconds)
13:43:16*gokr joined #nim
13:45:15*jxy joined #nim
13:45:16FromGitter<krux02> yes
13:45:18*clyybber joined #nim
13:49:16*Arrrr quit (Read error: Connection reset by peer)
14:01:01*rinzai joined #nim
14:02:12*r4vi quit ()
14:02:35*r4vi joined #nim
14:05:05*rinzai quit (Ping timeout: 240 seconds)
14:17:04arnetheducknlvm has thread_locals too, for nim ;)
14:18:19AraqNim has .threadvar
14:18:46Araqthe rand() procs are overloaded to take an explicit state
14:19:14Araqit can easily be used within a thread.
14:20:33Araqthe only thing that would really improve the situation would be a lock around the global shared state when threads are turned on, so that threads can use the same random number generator safely
14:24:20*endragor quit (Remote host closed the connection)
14:24:47*endragor joined #nim
14:26:46*endragor_ joined #nim
14:28:29*rinzai joined #nim
14:29:18*endragor quit (Ping timeout: 240 seconds)
14:31:15*endragor_ quit (Ping timeout: 256 seconds)
14:32:50*rinzai quit (Ping timeout: 256 seconds)
14:38:12FromGitter<krux02> Araq: But creating a lock around the global shared state would slow down random number generation when only one thread is present for no reason
14:39:16Araqsure but the procs which don't take a state explicitly are about convenience
14:39:22FromGitter<krux02> I think it is smarted when by default the state of the random number generator is local for each thread, so no locking needs to be done.
14:39:56*endragor joined #nim
14:41:12FromGitter<krux02> so when someone really wants to share a single random number generator between threads this person has to create the bottleneck/lock manually.
14:41:22*rinzai joined #nim
14:42:57FromGitter<krux02> I mean the allocation is also thread local by default
14:44:13FromGitter<krux02> I just had an idea. What if global variables are all thread local by default?
14:45:51FromGitter<krux02> Just an idea, but I think it might be a good one. Because sharing state between threads always creats conflicts.
14:47:16FromGitter<andreaferretti> this invalidates the common case of initializing a global once
14:47:30FromGitter<andreaferretti> and then using it as an immutable thing from multiple threads
14:47:47FromGitter<andreaferretti> e.g. a GPU context object
14:49:06FromGitter<andreaferretti> like I do here
14:49:07FromGitter<andreaferretti> https://github.com/unicredit/neo/blob/master/neo/cudadense.nim#L231-L232
14:49:25FromGitter<brentp> hi, I have a macros.h file that I want to include in my library in a "src/hts" directory. I can get this to work by writing the appropriate signature and using `header:"../../src/hts/macros.h"` but then that obviously fails after I try to use the library after it has been nim installed. What would be the way to do this?
14:50:29*endragor quit (Remote host closed the connection)
14:51:30*endragor joined #nim
14:51:52FromGitter<brentp> e.g. from the root of the project, in "src/hts/vcf.nim" I have a function `proc bcf_hdr_id2type(hdr:ptr bcf_hdr_t, htype:cint, int_id:cint): cint {.importc: "bcf_hdr_id2type", header:"../../src/hts/macros.h", cdecl.}` which refers to src/hts/macros.h
14:58:50*miran quit (Quit: Page closed)
15:03:53FromGitter<Thor77> I'm trying to use the compiler/ast-module, but once I import it I get "compiler-#head/compiler/ast.nim(13, 50) Error: cannot open 'std/sha1'". Am I missing something?
15:05:54Araquse nim devel with compiler-#head
15:06:25FromGitter<Thor77> How am I supposed to do that?
15:06:43FromGitter<Thor77> Define compiler-#head as an dependencyy?
15:06:50Araqget a Nim from github
15:06:58FromGitter<Thor77> already got one
15:07:11Araqdoes it have std/sha1 ?
15:08:07FromGitter<Thor77> it should live in lib/std/*?
15:08:41FromGitter<Thor77> but it seems like I chose a package from releases, it's 0.17.2
15:08:51FromGitter<Thor77> and doesn't have a std-subfolder in lib/
15:08:55FromGitter<Thor77> (or anywhere else)
15:09:11Araqjust delete your 0.17.2 installation and use version from git
15:09:46FromGitter<Thor77> okey, will do :)
15:10:00FromGitter<krux02> @andreaferretti yes initializing globals one is an advantage. I think though that globals that are not initialized with variables that depend on a state could still be global and shared.
15:10:04FromGitter<Thor77> (if i get to clone it on this painfully slow train-wifi...)
15:10:23Araqkrux02: IMO globals should default to global, not thread local
15:10:32Araqbut you can argue either way
15:10:52Araqthe split is at 50-50 from the inofficial statistics in my head
15:11:11Araqglobals being global is certainly more intuitive.
15:11:39arnetheduckwhat's the difference between std and core in lib?
15:12:39Araqcore will replace system.nim eventually
15:12:51Araqstd is the new "namespace" for stdlib modules
15:13:11Araqimport std / [strutils, os] will work soon
15:13:32Araqsha1 is special in that only the import with 'std' is allowed
15:13:44Araqto prevent conflicts with the sha1 nimble packages out there
15:13:58Araqnew stdlib modules will all require the std/ prefix
15:14:20Araqthe old stdlib module will be accessible without std/ for some years to come
15:17:47*natrys quit (Ping timeout: 276 seconds)
15:19:12nekitswasn't expecting to see nim in an article about gamma encoding, yet here I am looking at the source for the website instead of the website.
15:23:24dom96nekits: link?
15:23:46nekitshttp://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/
15:23:51nekitsthe blog
15:24:14nekitshttps://github.com/johnnovak/johnnovak.site/tree/master/blog/files/2016-09-21/src
15:24:28nekitsand whats used on that post.
15:24:31dom96oh yeah, that's a brilliant blog
15:25:04nekitsNever seen it before today. reddit had a post about colorspace and someone linked the blog in the comments
15:26:23*gokr quit (Ping timeout: 248 seconds)
15:31:34*natrys joined #nim
15:35:18*radagast_04 joined #nim
15:35:50radagast_04Why should anyone use typeinfo.isNil() instead of checking if x == nil?
15:36:33Araqradagast_04, different people have different taste
15:37:05Araqthere is no difference between == nil and .isNil except for seqs
15:37:14radagast_04Ah, no worries then. I was concerned if there are any potential hidden pitfall(?)s
15:37:16*miran joined #nim
16:06:32FromGitter<Thor77> Araq: It's working fine with nim compiled from git-master, thank you :)
16:07:26FromGitter<Thor77> Now I just have to figure out how to parse and save statements somehow, get them into a PNode and compile them at runtime \o/
16:08:11FromGitter<krux02> Araq: what is the difference between == nil and .isNil for seqs?
16:13:13radagast_04noob question ahead: https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L224 I wonder how does that not create a circular reference. It says n.nex = L.head; L.head = n
16:13:14radagast_04Unless of course n.next = L[].head it would make sense then
16:13:14radagast_04*sigh* may be my old **L wouldn't be so bad
16:14:23radagast_04So why is the use of `[]` operator discouraged?
16:15:36FromGitter<krux02> well [] on lists have linear runtime
16:15:48FromGitter<krux02> but except for lists [] is very ok
16:15:56*yglukhov quit (Remote host closed the connection)
16:18:07FromGitter<krux02> radagast_04: `n` and `L` are a different type. `L` is the List object owning all the nodes, and `n` is just a node.
16:18:33FromGitter<krux02> that code just sets the node as the first element of the list `L`
16:18:33rinzaidoes `random.shuffle()` mutate the sequence?
16:18:58*yglukhov joined #nim
16:19:01FromGitter<krux02> yes
16:19:07rinzai+1 thanks
16:20:25FromGitter<krux02> just look at the function definition, it has a `var` argument meaning the function is allowed to change it. And it has no return value.
16:20:43FromGitter<krux02> but I have the source open, it calls `swap` N times
16:21:59*acidx quit (Remote host closed the connection)
16:22:16*acidx joined #nim
16:24:35*yglukhov quit (Ping timeout: 255 seconds)
16:25:11radagast_04krux02, I figured. It was just confusing me a little bit, the function body. Seeing n.next = L.head; L.head = n; My eyes optimized that into n.next = n :D
16:50:09*xet7 quit (Quit: Leaving)
16:52:57*xet7 joined #nim
17:07:10*chemist69 quit (Ping timeout: 240 seconds)
17:08:42*d10n-work joined #nim
17:09:13*darithorn joined #nim
17:09:45*endragor quit (Remote host closed the connection)
17:10:57*endragor joined #nim
17:10:58*endragor quit (Remote host closed the connection)
17:18:47*rokups joined #nim
17:20:43*chemist69 joined #nim
17:27:25FromGitter<krux02> Araq: I have a lot of inline functions in glm. I just checked the generated C files
17:27:50FromGitter<krux02> for some reason there are a lot of inline functions generated that are never called
17:29:02Araq--deadCodeElim:on ?
17:29:51FromGitter<krux02> no just default arguments
17:29:58FromGitter<krux02> I can check it
17:31:10FromGitter<krux02> Ah, ok that helps
17:31:21FromGitter<krux02> why isn't it on by default?
17:32:00Araqbecause it's an optimization?
17:32:27FromGitter<krux02> well yea that's true
17:32:27Araqit's part of -d:release
17:33:21FromGitter<krux02> I saw that when I have a generic function in a library that function acutally gets generated in the libraryname.c file
17:34:12FromGitter<krux02> but my question is what does control if a function is generated in the library file or in the application file, when the function is generic
17:35:03FromGitter<krux02> well I will play a bit with the compiler
17:35:12AraqI think it's always in the library file
17:35:27Araqbut the compiler is free to pick some .c file, there is no spec for that
17:37:38FromGitter<krux02> yea it's not about the spac I would like to know what does affect the compilation time
17:37:52FromGitter<krux02> I would like the glm library to be fast for compilation
17:39:18FromGitter<krux02> I see that when I use the library and change my nim file the library is usually not recompiled, but when I add another call with a new type that I haven't done yet, then the library.c changes and therefore needs to be recompiled
17:39:26FromGitter<krux02> I think that is generally good.
17:39:47FromGitter<krux02> I was in C++ compilation hell, and all I want to to calm down and know that I won't land there with Nim
17:41:10FromGitter<krux02> project rebuilt took two hours and the minimum sized plugin took at least 10 seconds.
17:41:24FromGitter<krux02> (just the include not functionality)
17:45:56*Trustable joined #nim
17:51:04*Ven`` joined #nim
17:53:16*miran quit (Remote host closed the connection)
18:00:20*sz0 quit (Quit: Connection closed for inactivity)
18:11:17*nsnzero joined #nim
18:11:44*endragor joined #nim
18:12:59nsnzerogood evening / day / morning / night - i just learned about nim and i like to be pointed to some tuts especially network/sockets related tuts if any are available
18:28:16dom96nsnzero: I'm not aware of any apart from Chapter 3 in my book, but that's not free I'm afraid
18:28:37dom96You can see the code though https://github.com/dom96/nim-in-action-code/tree/master/Chapter3/ChatApp
18:43:53*Ven` joined #nim
18:44:49*Ven`` quit (Ping timeout: 248 seconds)
18:49:59nsnzerothanks dom96 - keep up the good work
18:50:18*gokr joined #nim
18:51:33*Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:53:01*nsnzero left #nim ("WeeChat 1.9.1")
19:11:59*chemist69 quit (Ping timeout: 255 seconds)
19:12:22*chemist69 joined #nim
19:32:21*couven92 joined #nim
19:41:48*tiorock joined #nim
19:41:49*tiorock quit (Changing host)
19:41:49*tiorock joined #nim
19:41:49*rockcavera quit (Killed (adams.freenode.net (Nickname regained by services)))
19:41:49*tiorock is now known as rockcavera
19:56:35*yunfan quit (Ping timeout: 240 seconds)
20:03:44*natrys quit (Quit: natrys)
20:15:12FromGitter<tim-st> is there a vscode plugin for nim that shows me an icon where I use recursion?
20:19:11*endragor quit (Ping timeout: 256 seconds)
20:20:00*BitPuffin quit (Remote host closed the connection)
20:21:56*rokups quit (Quit: Connection closed for inactivity)
20:26:13AraqI doubt it
20:27:58FromGitter<tim-st> Ok, there are quite a few things missing in vs code I liked about jetbrains
20:51:01*solitudesf_ joined #nim
20:51:03*solitudesf_ quit (Read error: Connection reset by peer)
20:54:03*yunfan joined #nim
21:00:40*clyybber quit (Quit: good night)
21:01:57*yunfan quit (Ping timeout: 240 seconds)
21:16:28*endragor joined #nim
21:17:26*yunfan joined #nim
21:34:55*echedey joined #nim
21:34:58echedeyhi
21:36:10echedeydoes pas2nim produced syntax compatible with last version of nim?
21:44:24dom96hi echedey!
21:44:53dom96It's possible that it became outdated, most of us aren't Pascal programmers so we don't really use that tool anymore.
21:46:18*enigmeta quit ()
21:46:38*enigmeta joined #nim
21:47:13*dashed quit ()
21:48:06*dashed joined #nim
21:53:51*Trustable quit (Remote host closed the connection)
21:56:01*arecaceae quit (Remote host closed the connection)
21:56:28*arecaceae joined #nim
22:00:27*yunfan quit (Ping timeout: 240 seconds)
22:07:57*nsf quit (Quit: WeeChat 2.0.1)
22:13:24*yunfan joined #nim
22:18:58echedeythank you
22:19:10*echedey quit (Quit: BitchX-1.2.1 -- just do it.)
22:31:26*radagast_04 quit (Ping timeout: 276 seconds)
22:43:34*yunfan quit (Ping timeout: 256 seconds)
22:49:29*yunfan joined #nim
22:51:23*Syneh__ quit ()
22:51:35*Syneh__ joined #nim
22:52:37*Vladar quit (Remote host closed the connection)
22:57:51*yunfan quit (Ping timeout: 256 seconds)
23:07:00*yunfan joined #nim
23:17:07*endragor quit (Ping timeout: 256 seconds)
23:30:52*solitudesf quit (Ping timeout: 252 seconds)
23:46:15*xet7_ joined #nim
23:46:48*couven92 quit (Ping timeout: 240 seconds)
23:47:39*darithorn quit (Quit: Leaving)
23:48:41*xet7 quit (Ping timeout: 276 seconds)
23:54:09*couven92 joined #nim
23:54:37*couven92 quit (Read error: Connection reset by peer)
23:59:11*Sembei joined #nim