00:21:17 | FromDiscord | <treeform> I know a ton about float point. How do you want to manage it? |
00:23:06 | FromDiscord | <treeform> @Zevv, thanks! I can always turn recursion into iteration that is what it did... nim should have a better error message though. |
00:46:14 | * | a_b_m quit (Quit: Leaving) |
00:48:06 | smitop | Why is there a link to a 3-year-old gist in the channel description by dom96... of a number? |
00:48:39 | * | cyberjpn joined #nim |
00:49:59 | * | krux02_ quit (Remote host closed the connection) |
00:50:49 | smitop | It's called userrecord.txt, is it the max. ever users in this channel? We haven't broke our users in channel record since 2015? |
00:52:41 | FromDiscord | <DeltaPHC> Though not always appropriate, fixed-point math is an alternative to dealing with floating point inaccuracy |
00:55:08 | FromDiscord | <DeltaPHC> The basic idea being that you use the smallest denomination as your 'unit'. Like if you're counting money, you wouldn't use floating point because the inaccuracy would pile up very quickly. So instead, you might store it as an integer - the number of pennies |
01:10:40 | * | madpat quit (Quit: ERC (IRC client for Emacs 26.2)) |
01:32:33 | * | cyberjpn quit (Ping timeout: 245 seconds) |
01:49:05 | * | rnrwashere quit (Remote host closed the connection) |
01:52:09 | * | rnrwashere joined #nim |
02:01:36 | * | banc quit (Quit: Bye) |
02:01:51 | * | rnrwashere quit (Remote host closed the connection) |
02:04:11 | * | rnrwashere joined #nim |
02:08:25 | * | rnrwashere quit (Remote host closed the connection) |
02:10:40 | * | rnrwashere joined #nim |
02:14:24 | * | rnrwashere quit (Remote host closed the connection) |
02:14:52 | * | rnrwashere joined #nim |
02:22:35 | * | banc joined #nim |
02:35:11 | * | shashlick_ joined #nim |
02:35:23 | * | shashlick quit (Read error: Connection reset by peer) |
03:06:42 | * | theelous3 quit (Ping timeout: 244 seconds) |
03:16:20 | * | smitop quit (Quit: Connection closed for inactivity) |
03:18:55 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
03:21:29 | * | Lord_Nightmare joined #nim |
03:37:34 | * | vlad1777d joined #nim |
03:43:31 | * | rnrwashere quit (Remote host closed the connection) |
03:45:13 | * | rnrwashere joined #nim |
03:50:10 | * | narimiran joined #nim |
03:53:00 | * | rnrwashere quit (Remote host closed the connection) |
03:53:26 | * | rnrwashere joined #nim |
04:19:33 | * | nsf joined #nim |
04:54:58 | * | dddddd quit (Remote host closed the connection) |
04:58:09 | * | JustASlacker joined #nim |
05:17:55 | * | leorize quit (Quit: WeeChat 2.3) |
05:59:15 | * | leorize joined #nim |
06:01:10 | * | rnrwashere quit (Remote host closed the connection) |
06:17:21 | * | shashlick_ quit (Ping timeout: 244 seconds) |
06:25:35 | * | solitudesf joined #nim |
06:30:14 | * | PMunch joined #nim |
06:31:23 | * | Trustable joined #nim |
06:35:55 | * | jjido joined #nim |
06:47:46 | * | surma quit (Read error: Connection reset by peer) |
06:47:58 | * | odc quit (Read error: Connection reset by peer) |
06:47:58 | * | LyndsySimon quit (Read error: Connection reset by peer) |
06:48:04 | * | surma joined #nim |
06:48:09 | * | deansher quit (Read error: Connection reset by peer) |
06:48:11 | * | LyndsySimon joined #nim |
06:48:26 | * | odc joined #nim |
06:48:26 | * | deansher joined #nim |
06:49:01 | * | vlad1777d quit (Ping timeout: 255 seconds) |
06:51:23 | * | banc quit (Ping timeout: 246 seconds) |
06:55:22 | * | banc joined #nim |
06:57:32 | * | solitudesf quit (Ping timeout: 252 seconds) |
06:59:21 | * | leorize_ joined #nim |
06:59:38 | * | leorize is now known as Guest92401 |
06:59:38 | * | leorize_ is now known as leorize |
06:59:53 | * | Guest92401 quit (Ping timeout: 256 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:15 | * | gmpreussner joined #nim |
07:06:04 | * | Zevv quit (Quit: leaving) |
07:09:00 | * | krux02 joined #nim |
07:09:10 | * | shashlick joined #nim |
07:09:49 | * | Zevv joined #nim |
07:14:26 | * | Zevv quit (Quit: leaving) |
07:14:27 | FromGitter | <mratsim> @j$ @DeltaPHC, use mpdecimal: https://github.com/status-im/nim-decimal |
07:18:03 | * | Zevv joined #nim |
07:18:16 | skrylar[m] | treeform: nim iterators are syntactic sugar for inlined while/for loops |
07:20:43 | skrylar[m] | although i haven't tried in a long while to see whether its any recursion or simple recursion. in freepascal where i've been doing stuff, the syntax sugar is for instantiating a nobject and doing a while next get current, so they do support looping (although iterators there are often classes which means alloc for each for loop, which is dumb since apparently it works just fine with object or records and drops overhead, but |
07:20:44 | skrylar[m] | w/e) |
07:21:09 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:22:37 | Zevv | I've just made a pr https://github.com/nim-lang/Nim/pull/11283 adds a better error message for recursive iterators |
07:25:48 | PMunch | Hmm, this is cool https://nimble.directory/pkg/cascade |
07:26:45 | * | stevenfx joined #nim |
07:28:47 | * | leorize quit (Ping timeout: 256 seconds) |
07:32:17 | * | leorize_ joined #nim |
07:36:17 | * | stevenfx quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:37:18 | * | stevenfx joined #nim |
07:39:13 | * | stevenfx quit (Client Quit) |
07:39:36 | * | Zevv quit (Quit: leaving) |
07:40:08 | * | Zevv joined #nim |
07:41:47 | PMunch | Hmm, trying to figure out how to identify people with an Active Directory instance. Anyone tried this before (in Nim or otherwise, not having much luck finding any way of doing this)? |
07:43:14 | * | stevenfx joined #nim |
07:44:19 | * | Trustable quit (Remote host closed the connection) |
07:45:44 | * | Trustable joined #nim |
07:45:45 | * | stevenfx quit (Client Quit) |
07:47:28 | * | gangstacat quit (Quit: Ĝis!) |
07:48:49 | FromGitter | <mratsim> The unique ID in active directory is called "SID" |
07:50:30 | PMunch | Ah, I was more talking about how to actually perform a user/password log-in |
07:50:32 | * | Trustable quit (Remote host closed the connection) |
07:51:00 | PMunch | Basically we have AD at work, and I want to create a new service without needed to have everyone create new users |
07:51:19 | PMunch | s/needed/needing |
07:51:36 | * | Trustable joined #nim |
07:53:09 | * | Trustable quit (Remote host closed the connection) |
07:54:00 | * | Trustable joined #nim |
07:58:18 | * | Trustable quit (Remote host closed the connection) |
07:59:12 | * | Trustable joined #nim |
08:02:59 | skrylar[m] | cascades and with statements are quite nice |
08:03:13 | skrylar[m] | i wouldn't be surprised if we could have -> and ->> as macros too |
08:04:29 | * | leorize_ quit (Ping timeout: 256 seconds) |
08:12:18 | PMunch | skrylar[m], with statements? |
08:12:49 | Zevv | https://github.com/zevv/with |
08:13:03 | FromGitter | <mratsim> with is similar to Cascade, that's what you use in Excel |
08:13:57 | Zevv | I had some discussions with the cascade author wether we should merge 'with' and 'cascade', but for some reason we decided not to |
08:18:10 | FromGitter | <alehander42> livcd: https://www.youtube.com/watch?v=hlWCp210IIY&list=PLbFmgWm555yYuZdkZN6e7zoAoAfy-h6xQ&index=3 our talk got uploaded |
08:18:41 | FromGitter | <alehander42> it looks very rough, as a first talk in front of such an audience(at least for me), but what can you do |
08:18:56 | FromGitter | <alehander42> skrlarm[m] we've used `->` and `->>` iirc as macros in zero-functional |
08:19:03 | FromGitter | <alehander42> but as `.` alternatives |
08:19:09 | narimiran | Zevv: your PR#11283 has one failing test (tests/iter/treciter.nim) |
08:19:11 | FromGitter | <alehander42> skrylar[m] * |
08:19:16 | Zevv | narimiran: thanks |
08:19:19 | FromGitter | <alehander42> so it's possible syntactically |
08:20:22 | FromGitter | <alehander42> btw i tried newruntime with some simple examples several days ago |
08:20:29 | FromGitter | <alehander42> it seemed to work, cool |
08:20:59 | FromGitter | <alehander42> i noticed e.g. seq-s carry a context with an allocator Araq, is this possible to lead to overhead somehow |
08:22:11 | * | leorize_ joined #nim |
08:22:23 | * | Vladar joined #nim |
08:22:24 | * | floppydh joined #nim |
08:30:59 | PMunch | Aah, that with. I like how cascade allows you to bind the result to a let assignment though |
08:34:31 | * | leorize_ quit (Ping timeout: 256 seconds) |
08:34:32 | * | rokups joined #nim |
08:42:22 | Zevv | narimiran: test fixed, sorry for missing that |
08:42:29 | narimiran | Zevv: np |
08:45:11 | * | rnrwashere joined #nim |
08:45:48 | * | Trustable quit (Remote host closed the connection) |
08:46:40 | * | livcd joined #nim |
08:47:11 | * | Trustable joined #nim |
08:49:31 | * | rnrwashere quit (Ping timeout: 248 seconds) |
08:58:52 | * | couven92 joined #nim |
09:03:42 | PMunch | alehander42, well some of your talks roughness is more technical than anything else |
09:04:00 | PMunch | Watching it right now :) |
09:13:17 | FromGitter | <jrfondren> `with` is fun, but as its own project it should have a splash image like "Inspired by a forbidden(TM) JavaScript feature!" |
09:13:28 | Zevv | PR |
09:13:54 | couven92 | @jrfondren, well I think Python and C# had that first, didn't they? |
09:14:33 | Zevv | no clue. I don't even use it myself, I hacked it up for someone sometime |
09:14:35 | FromGitter | <jrfondren> maybe later today. I only about it from JS (as a dangerous thing) and from D |
09:15:26 | FromGitter | <jrfondren> in JS of course the problem is that if you get the (dynamic) fields wrong, you create a new variable in whatever the current scope is, which in JS is going to be wider than the `with` |
09:16:30 | FromGitter | <jrfondren> Python's `with` seems to be unrelated |
09:18:28 | Zevv | jrfondren: https://github.com/zevv/with/blob/master/README.md |
09:18:44 | * | NimBot joined #nim |
09:18:50 | FromGitter | <jrfondren> that WFM :) |
09:19:25 | Zevv | good |
09:21:20 | leorize[m] | with is a pascal construct :p |
09:24:47 | FromGitter | <mratsim> Excel VBA had with first |
09:25:24 | FromGitter | <mratsim> oh maybe Pascal :p |
09:26:23 | narimiran | Zevv: did you forget to push your PR fix? :) |
09:29:09 | Zevv | euh no? let me check |
09:29:55 | FromGitter | <alehander42> we had something like with Zevv, in the old py2nim |
09:29:56 | Zevv | oh right, I pushed. But I didn't commit first |
09:30:03 | FromGitter | <alehander42> but it was just a prototype i guess |
09:30:16 | FromGitter | <alehander42> a more nim-ish api would be cool |
09:30:38 | FromGitter | <alehander42> but i'd coordinate this with the new runtime |
09:30:50 | FromGitter | <alehander42> as it's quite centered around safely releasing resources/memory etc |
09:30:56 | FromGitter | <alehander42> which is the main benefit of with |
09:32:00 | Zevv | yeah, now its only sugar |
09:32:31 | Zevv | but man was I proud, My First Macro |
09:35:31 | FromGitter | <alehander42> oh it's a great idea and not so easy , our macro was very basic meh |
09:35:47 | FromGitter | <alehander42> what was your second macro :P |
09:35:51 | Zevv | npeg |
09:36:03 | FromGitter | <alehander42> @PMunch what do you mean, by technically rough :P |
09:36:08 | FromGitter | <alehander42> Zevv ah awesome |
09:36:38 | FromGitter | <alehander42> i never managed to do a good grammar dsl, finally i hacked something for one project but it was very uuhh |
09:37:39 | FromGitter | <alehander42> looks cool, is it possible to parse an actual small language with it? |
09:37:47 | FromGitter | <alehander42> what's the hardest thing you managed to parse with it |
09:37:49 | Zevv | definitaly |
09:37:58 | PMunch | alehander42, in the beginning there's some microphone cut outs and some jumping back and forth with the presentation |
09:38:13 | Zevv | definitely, it's hard to english |
09:38:30 | leorize[m] | Zevv: that's quite a leap from `with` :) |
09:38:31 | FromGitter | <jrfondren> I'm using npeg in production now, to verify that a s/// made all/only the desired changes to some modsec rules. |
09:38:56 | FromGitter | <alehander42> Zevv, nice i might use it for a shell language |
09:38:58 | FromGitter | <alehander42> small shell* |
09:39:18 | * | Mister_Magister quit (Quit: bye) |
09:39:50 | Zevv | great, let me know if I can help yout out, Npeg comes with one free example grammar for every user |
09:40:11 | FromGitter | <alehander42> @Pmunch oh probably, i didn't notice anything unusual tho |
09:40:52 | FromGitter | <alehander42> Zevv, haha great, i will mostly have something very simple, as shells excel in oneliners |
09:41:08 | FromGitter | <alehander42> which is not very simple actually ! |
09:41:16 | FromGitter | <alehander42> but at least no indentation etc |
09:41:43 | FromGitter | <jrfondren> (it's only because of the verification step that I noticed that the ruleset includes redundant actions. modsec's dedication to maintenance traps AKA "user-friendly acceptance of mistakes" is truly inspiring) |
09:41:44 | Zevv | I don't believe a peg is suitable for that anyway |
09:42:13 | Zevv | "user-friendly acceptance of mistakes"? |
09:42:34 | FromGitter | <alehander42> Zevv: why |
09:42:42 | FromGitter | <alehander42> it's a normal language with subexpressions |
09:43:08 | FromGitter | <alehander42> e.g. [2] filter #%2 |
09:43:11 | Zevv | I'd have to think that over, but it kind of feels alien |
09:43:41 | FromGitter | <mratsim> don't even try R then :P |
09:43:42 | FromGitter | <alehander42> [2] filter { cat %2 ~ regex } |
09:43:50 | FromGitter | <alehander42> my example was bad but yeah |
09:43:50 | Zevv | depth of an indent is relative to the indent of the outer block, so you'd need to keep more context anyway |
09:43:59 | FromGitter | <alehander42> oh this is easy i think |
09:44:02 | FromGitter | <alehander42> i always make a simple prepass |
09:44:12 | FromGitter | <alehander42> where i replace indent and dedent keeping context |
09:44:18 | FromGitter | <alehander42> by <special indent token> etc |
09:44:19 | Zevv | of course, that changes things |
09:44:24 | FromGitter | <alehander42> and then match for this |
09:44:31 | FromGitter | <alehander42> but if you dont have multiline code |
09:44:34 | * | Mister_Magister joined #nim |
09:44:35 | FromGitter | <alehander42> it seems to be ok enough |
09:44:39 | Zevv | I still hate indent syntax, but hey, what can you do |
09:45:00 | FromGitter | <alehander42> m yeah, for the shell tho not sure for now mostly oneliners |
09:45:18 | FromGitter | <jrfondren> @Zevv, modsec rules have a list of actions that take effect for the rule. for user-friendliness(?), you can have redundant and contradictory actions--modsec will just take the last action as authoritative in such cases. |
09:45:45 | leorize[m] | Zevv: is there any example for composing npeg with lexbase? |
09:45:50 | Zevv | jrfondren: well, that is kind of sucky. And it silently ignores the rest? |
09:46:12 | Zevv | leorize[m]: nope. Araq keeps nagging about that, he thinks npeg is crap becauese of that (among other things) |
09:46:28 | FromGitter | <jrfondren> so if you want to remove "chain" from a list of actions, you have to watch out for a redundant chain that could still be in the list. or if you do a s/status:aaa/status:bbb/ as I did, you might only change the first of redundant status: actions, and the old second one is still the one used. |
09:46:39 | FromGitter | <jrfondren> yeah totally silently. my other use of npeg is a linter. |
09:46:53 | FromGitter | <jrfondren> same parsing code, different use. |
09:46:57 | Zevv | part of the problem is that captures might refer to things in the past, so handling a stream is not trivial because you might need to access the data later on as long as there's an open capture |
09:47:04 | FromGitter | <alehander42> i dont really get why people likes lexers so much |
09:47:19 | FromGitter | <alehander42> @jrfondren oh linter for nim |
09:47:22 | FromGitter | <alehander42> ? |
09:47:28 | FromGitter | <jrfondren> linter for modsec rules |
09:47:32 | FromGitter | <alehander42> ah ok |
09:47:50 | FromGitter | <jrfondren> `nim check` is pretty good |
09:47:57 | Zevv | alehander42 I'm still a total nitwith about parser theory. I just implemented this thing because I personally like this way of doing it. Probably tons of reasons why its no good. |
09:51:46 | FromGitter | <alehander42> Me too |
09:52:05 | FromGitter | <alehander42> Just like to use less tools if possible |
09:52:31 | FromGitter | <alehander42> Of course lexers are good if you need just tokens |
09:53:02 | FromGitter | <alehander42> Maybe I have to take a look at lexvase |
09:54:03 | Zevv | it's probably not what you think it is |
09:54:22 | Zevv | it's only a tiny layer on top of streams to do the buffering for you |
09:56:22 | FromGitter | <alehander42> Mh maybe that's OK |
10:04:26 | leorize[m] | Zevv: can you do something like this with npeg? https://github.com/Araq/lexim/blob/master/ex1.nim |
10:06:55 | Zevv | sure. |
10:06:58 | Zevv | one moment |
10:08:00 | Zevv | but there's not really a syntax there right, it's just tokens. |
10:08:22 | leorize[m] | yea |
10:21:41 | * | stefanos82 joined #nim |
10:32:29 | PMunch | alehander42, speaking of talks, I've been toying with the idea of a Nim room for FOSDEM next year. Or a small languages room, if we can't fill enough slots |
10:33:56 | Zevv | its good PR having a room |
10:35:05 | PMunch | Mhm, part of the reason I want one :) |
10:36:56 | PMunch | If last years call for participation is anything to go by it should be about 3 months until they are open for registrations |
10:38:04 | * | smitop joined #nim |
10:39:34 | FromGitter | <kaushalmodi> Zevv: `with` is heavily used in lisps |
10:41:59 | FromGitter | <jrfondren> that's the python with, not the pascal with. |
10:48:23 | * | lritter joined #nim |
10:54:42 | Zevv | leorize[m] sorry, lunch came up http://paste.ubuntu.com/p/jrWgtDzJBg/ |
10:57:10 | leorize[m] | Zevv: nice! but can it integrate with a preexisting loop like that example? |
10:57:41 | Zevv | nope, not like that |
10:59:40 | leorize[m] | ok, let's hope that wouldn't be a problem |
10:59:54 | Zevv | I'd like to hear if and why you need that |
11:00:38 | * | couven92 quit (Read error: Connection reset by peer) |
11:00:42 | Zevv | there is some state in the parser which is at this time not injected into the code blocks, but I could add that if required |
11:01:17 | leorize[m] | no idea yet :p I was writing a bash formatter in Nim, and have already got a lexbase-based structure |
11:01:59 | leorize[m] | was going to see if I could quickly integrate npeg to speed up the progress |
11:11:36 | Araq | lexbased structure ftw :-) |
11:18:01 | skrylar[m] | ew. parsing |
11:35:53 | * | Minimisthupper joined #nim |
11:40:58 | * | Minimisthupper quit (Remote host closed the connection) |
11:48:21 | * | dddddd joined #nim |
11:51:27 | * | Trustable quit (Remote host closed the connection) |
11:57:36 | * | xet7 joined #nim |
12:04:51 | * | metadave quit (Quit: Connection closed for inactivity) |
12:26:22 | PMunch | Hmm, "choosenim update devel" still doesn't work |
12:26:28 | PMunch | As in devel doesn't build atm |
12:29:33 | Zevv | Araq: I was wondering the other day, what's magic about 3*floatSize? |
12:34:45 | Araq | PMunch, what do you mean? travis is green |
12:35:14 | Araq | Zevv, why do you ask? |
12:36:01 | PMunch | Hmm, the new frontend for the playground needs devel (because of the file missing for Karax to work). So when I try to run "choosenim update devel" on the playground VPS I get a compilation error |
12:36:50 | Araq | no idea, try 'git clone && build.sh' etc |
12:36:54 | Zevv | I was explaining Nim to someone and making up examples on the go when I found out there is this magic minimal size considered by nim when deciding to pass things by copy or by reference, which I found out to be 3*floatSize |
12:37:03 | * | Snircle joined #nim |
12:37:13 | Zevv | which I found a bit hard to explain to this person :) |
12:37:27 | Araq | well it's an optimization, Nim is free to do it the most efficient way |
12:37:51 | Araq | there is nothing to explain here except that Nim's design is better than C++'s :P |
12:38:10 | Zevv | ok, but where did the number come from? Is there some theoritical reason, did you get this number from experiments or did you throw a dice? |
12:38:14 | Zevv | just wondering |
12:38:33 | Araq | did some benchmarks |
12:38:44 | Zevv | makes sense, thanks! |
12:42:08 | livcd | alehander42:zah: nice presentation ! |
12:44:39 | PMunch | http://ix.io/1JyW/ < log from the failing choosenim update devel |
12:58:25 | * | PMunch quit (Remote host closed the connection) |
13:00:34 | * | PMunch joined #nim |
13:10:21 | * | poopBot joined #nim |
13:14:23 | * | neceve joined #nim |
13:17:31 | poopBot | is there matrix bridge to this irc too? |
13:18:24 | livcd | where i can find the list / pkgs that are being tested with every new release ? |
13:19:31 | poopBot | duno :) , can somone explain me why i cant do this ? |
13:19:32 | poopBot | https://pasteboard.co/IfzMW6t.png |
13:20:54 | Araq | livcd, https://github.com/nim-lang/Nim/blob/devel/testament/important_packages.nim |
13:23:31 | livcd | Thank you |
13:26:02 | poopBot | so can somone explain me why 10 rows up i can foreach loop trough list and 10 rows down i cant? |
13:26:18 | poopBot | meybe cuz i am in while loop or what |
13:26:58 | Zevv | poopBot: in general for these questions, provide a minimal snippet that shows the behaviour so we can reproduce and help you |
13:27:39 | poopBot | hmm its oop so its not really minimal, can give you whole |
13:27:45 | Zevv | btw, did you find your out-of-range indexing problem yesterday? Was that you or was it the compile at fault? :) |
13:30:37 | poopBot | hmm i found it i tihnk but issue was it was not at place where error code gived me, it put me error warning on line 145 or smeting and i head to echo "wtf1234" like 10 lines down to figure out where it really heppends |
13:30:39 | poopBot | https://pastebin.com/eU7mN5Av |
13:30:50 | poopBot | dont lought too much :) |
13:31:49 | poopBot | #HERE IT COMPLAINS , my only logic is cuz is in while loop tought duno why would that block it will test on jdoodle to see if while loop blocks |
13:32:04 | Zevv | poopBot: what nim version are you on? |
13:32:27 | Zevv | old stuff, right? |
13:32:30 | Zevv | I get 't.nim(248, 14) Error: undeclared field: 'category_name' for type t.PlayerSlot [declared in t.nim(22, 3)] |
13:32:35 | Zevv | which makes much more sense |
13:32:39 | Zevv | then 'can not call .' |
13:32:59 | poopBot | but there is category_name look 10 rows up i call same code |
13:33:13 | poopBot | line 232 |
13:33:50 | Zevv | look closer |
13:34:16 | poopBot | omg |
13:34:27 | Zevv | !eval "category_name" == "category_hand" |
13:34:28 | NimBot | Compile failed: in.nim(1, 17) Error: expression 'false' is of type 'bool' and has to be discarded |
13:34:33 | Zevv | !eval echo "category_name" == "category_hand" |
13:34:35 | NimBot | false |
13:34:41 | Zevv | well, there you have it |
13:35:33 | poopBot | worst thing i was like meybe i mised some leater so i read like 10 times category letter by letter to be sure duno how i dident see hand/name lol |
13:35:57 | Zevv | get some sleep :) |
13:38:32 | poopBot | i would love if it was from sleep deprevation xD |
13:38:42 | * | ShalokShalom joined #nim |
13:41:10 | ShalokShalom | how is the i just look one talk from 2016 |
13:41:23 | ShalokShalom | how much has the type inferrence improved since then? |
13:41:40 | ShalokShalom | do I need typing |
13:42:25 | narimiran | ShalokShalom: it improved 37% |
13:42:53 | ShalokShalom | thanks ^^ |
13:43:40 | FromGitter | <jrfondren> Nim's type inference still isn't at OCaml levels. all of your bindings still need types, either expressly or with initialization |
13:44:46 | ShalokShalom | oh I see |
13:45:02 | * | solitudesf joined #nim |
13:46:02 | FromGitter | <jrfondren> what has improved is implicit initialization |
13:46:45 | FromGitter | <jrfondren> so you can say `var x: string` and then later `x.add "more string"` without worrying that `x` is nil |
13:47:46 | ShalokShalom | oh, I didnt even knew I woud have to worry xD |
13:47:49 | ShalokShalom | thanks a lot for that |
13:49:09 | ShalokShalom | can I suggest inherent types? I see this as a viable way to reduce the clutter and get types correct in the same time. :) |
13:49:58 | ShalokShalom | simply use an own type for every item, so undefined types get their own types, when I add an operator somewhere. |
13:50:03 | FromGitter | <kaushalmodi> ShalokShalom: Nim already does type inference, if that's what you meant |
13:50:05 | ShalokShalom | like a dot at the end of the line |
13:50:10 | ShalokShalom | nope |
13:50:19 | ShalokShalom | I mean an improvement for that |
13:50:27 | ShalokShalom | inherent types |
13:51:11 | ShalokShalom | sometimes, custom types provide more type safety since string and num can still collide |
13:51:29 | ShalokShalom | I never saw the benefit of such basic types. |
13:51:40 | FromGitter | <jrfondren> I don't know what that means. I'm happy with Nim's current type inference anyway. OCaml takes it to the point that I start having trouble reading my own code without editor assistance. |
13:51:57 | * | PMunch quit (Remote host closed the connection) |
13:52:23 | ShalokShalom | yeah, thats another issue |
13:52:52 | FromGitter | <jrfondren> the development focus right now seems to be on --newruntime, a practical alternative to having a GC. |
13:52:56 | ShalokShalom | I mean, that you get your own type on each new item when the operator gets applied |
13:53:07 | ShalokShalom | oh, nice :D |
13:53:14 | ShalokShalom | how does that run? |
13:53:23 | ShalokShalom | lifetime? |
13:53:38 | ShalokShalom | and this development would require a few lines of code |
13:53:40 | ShalokShalom | 10 minutes |
13:54:01 | FromGitter | <jrfondren> I haven't looked much into it. https://nim-lang.org/araq/destructors.html 's a blog about it. |
13:54:08 | ShalokShalom | thy |
13:55:07 | FromGitter | <jrfondren> and there are some wiki pages: https://github.com/nim-lang/Nim/wiki/NEP-2-Catching-up-with-Cpp--and-Rust:-Ownership,-destructors,-unique-pointers (really old), https://github.com/nim-lang/Nim/wiki/Destructors (newer) |
13:55:20 | ShalokShalom | thanks |
13:55:28 | ShalokShalom | willl read that up |
13:55:39 | ShalokShalom | Do you know Pony? |
13:56:12 | FromGitter | <jrfondren> nope. I've heard they have Erlang-style concurrency with static proofs and no data races. |
13:56:59 | ShalokShalom | well, the have a cooperative scheduler instead of the preemptive one in Erlang |
13:57:26 | ShalokShalom | so fault tolerance is out of the window |
13:57:38 | ShalokShalom | other than that, its awesome |
14:01:08 | * | ShalokShalom quit (Remote host closed the connection) |
14:01:50 | poopBot | narimiran, and i think i know why you told me to look del up cuz when i del(0) it puts last element to first |
14:02:19 | narimiran | poopBot: wooohooo, that't it :) |
14:03:46 | poopBot | i woudent noticed it if it was not ranking my hands wrong, tought i thinke i should did ranking from reverse of seq cuz perfomace wise |
14:05:12 | narimiran | that's why i'm constantly telling you to read the manual and/or tutorials - you'll learn "the rules" much faster than by just experimenting and wondering why something doesn't work as you expect ;) |
14:06:05 | FromGitter | <jrfondren> although a quick test in inim helps. as long as you're not testing the times module :) |
14:06:29 | poopBot | but this way i will remeber it better cuz i cryed for like an hour trying to figure out whats wrong |
14:13:52 | * | vlad1777d joined #nim |
14:15:38 | Araq | mratsim: https://github.com/nim-lang/Nim/issues/11269 |
14:17:17 | Araq | we use the right algorithm afaict |
14:26:37 | * | leorize joined #nim |
14:28:52 | FromGitter | <liquid600pgm> any way of making Nimble pass a task's arguments to the underlying `nim c`, like this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce2b9a4d22ba766a2cccb83] |
14:29:23 | FromGitter | <liquid600pgm> so that I can simply run `nimble run --my_arg:42` to run the compiled exec with argument `--my_arg:42`? |
14:30:28 | shashlick | there's `nimble c` right? |
14:31:01 | FromGitter | <liquid600pgm> yes, but you still need to specify the file |
14:31:07 | shashlick | but you'd have to still pass everything else |
14:31:09 | shashlick | ya |
14:32:54 | FromGitter | <liquid600pgm> afaik I can use paramStr() and paramCount(), but it's not as convenient |
14:35:17 | FromGitter | <liquid600pgm> nope, that doesn't help |
14:35:28 | FromGitter | <liquid600pgm> I guess I'll have to define separate tasks for everything |
14:44:53 | poopBot | tottaly offtopick but if anyone missed it https://www.youtube.com/watch?v=kE_byDwLjxk |
14:44:56 | * | theelous3 joined #nim |
14:45:17 | * | ShalokShalom joined #nim |
14:45:54 | leorize[m] | @liquid600pgm have you tried setCommand()? |
14:46:15 | Araq | ShalokShalom, whenever I look at Pony I'm confused at iso/trn/etc |
14:47:03 | Araq | plus I don't like the actor model anyway :-) |
14:54:21 | FromGitter | <liquid600pgm> leorize: how would it help me with my issue? |
14:54:49 | * | drewr quit (Quit: ERC (IRC client for Emacs 26.2)) |
14:56:34 | leorize[m] | it just change the current command, so flags might carry over |
14:58:59 | FromGitter | <liquid600pgm> nope, doesn't work |
14:59:13 | FromGitter | <liquid600pgm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce2c0c1509b1035c77fa1aa] |
15:00:11 | leorize | use `switch()` to pass flags |
15:00:19 | leorize | like `switch("run")` |
15:00:32 | leorize | and pass your target file as the second parameter to setCommand |
15:00:54 | leorize | `--run` also works actually, just run them before setCommand |
15:08:49 | narimiran | maybe related to PMunch's troubles with "choosenim update devel": https://forum.nim-lang.org/t/4866 ("curl ..... failed (twice) with a segfault.") (cc dom96) |
15:09:24 | FromGitter | <alehander42> @PMunch yes |
15:09:27 | FromGitter | <alehander42> you should try it |
15:09:44 | FromGitter | <alehander42> i'd love both: a small language room would be also interesting from purely lang design point of view |
15:11:32 | FromGitter | <alehander42> why is not pony using preemptive scheduling, it does sound more reasonable indeed |
15:15:46 | poopBot | https://pasteboard.co/IfAy7p7.png its becoming :) |
15:17:26 | poopBot | now just need to add round workflor raise fold call timers and networking :) |
15:17:31 | Araq | alehander42: have you seen that the inventor of the actors model doesn't understand 'goto' :P |
15:22:37 | FromGitter | <alehander42> i think i posted the youtube link that you commented that to :D |
15:22:59 | FromGitter | <alehander42> but i still dont remember the reason |
15:23:05 | Araq | yeah ... well, he doesn't understand 'goto' |
15:23:24 | FromGitter | <alehander42> btw e.g. afaik erlang/elixir dont implement the original actor model, theu just happened to work similarly |
15:23:38 | Araq | and acting all smug about Dijkstra not understanding goto, the irony |
15:25:30 | Araq | who cares if Erlang implements the "original" actor model, it's underspecified |
15:26:18 | FromGitter | <alehander42> maybe, just saying that it's probably a bit like oop |
15:26:30 | FromGitter | <alehander42> many people with different ideas about what is it precisely |
15:26:40 | FromGitter | <alehander42> so that's not such a big deal |
15:26:55 | Araq | well indeed it's like listening to Alan Kay about OOP. |
15:27:16 | Araq | "I noticed how you guys do OOP is terrible so it all was about the messages passing, trust me" |
15:27:27 | FromGitter | <jrfondren> Joe Armstrong confessed to having to sell Erlang as "having objects, really, if you think about it" back when OOP was big. Where processes are objects with internal state. |
15:27:53 | Araq | who cares if Alan had C++ in mind when C++ was inspired by Simula, not Smalltalk |
15:27:59 | FromGitter | <alehander42> which reminds me, zah linked to me https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/ several days ago, have you read it |
15:28:19 | FromGitter | <alehander42> well i think the idea is that |
15:28:31 | FromGitter | <alehander42> actor force you to encapsulate some things and behavior a bit better |
15:28:31 | Araq | yep, I read it, I agree with it |
15:28:41 | FromGitter | <alehander42> so maybe accidentally it's a better "oop" than some |
15:28:57 | FromGitter | <alehander42> but i overally don't like oop too much as well |
15:29:46 | FromGitter | <alehander42> yeah, probably one can say it was objective-c based on smalltalk |
15:29:49 | FromGitter | <alehander42> c++ more onsimular |
15:31:07 | FromGitter | <alehander42> but overally e.g. visibility seems to me like something that should be defined on modules level, not type ⏎ (even you could say that this way you can expose some internal state to some subsystems but not others) |
15:32:04 | FromGitter | <alehander42> etc , mostly its like most oop languages mix 10 different things which can be modelled as independent features better |
15:34:22 | Zevv | intersting writeup about the nurseries |
15:34:56 | * | skelett joined #nim |
15:37:23 | * | rnrwashere joined #nim |
15:44:25 | * | floppydh quit (Quit: WeeChat 2.4) |
15:57:35 | * | smitop quit (Quit: Connection closed for inactivity) |
16:05:29 | FromDiscord | <DeltaPHC> Sounds like 'scoped threads', which I do agree is a nice way to go about concurrency |
16:09:36 | FromDiscord | <DeltaPHC> Rust has a library for scoped threads, though I do wonder if the idea could be made better as a language construct |
16:14:11 | * | rokups quit (Quit: Connection closed for inactivity) |
16:21:23 | * | Trustable joined #nim |
16:29:19 | * | Jesin quit (Quit: Leaving) |
16:51:34 | * | Jesin joined #nim |
17:04:01 | * | JustASlacker quit (Ping timeout: 246 seconds) |
17:15:34 | FromGitter | <liquid600pgm> why does `-1 mod 64` return `-1`? shouldn't it return 63? |
17:15:58 | FromGitter | <liquid600pgm> according to the equation in the docs, this is what a graph of `x mod y` should look like https://www.desmos.com/calculator/9vhcbonogu |
17:16:37 | FromGitter | <liquid600pgm> but in reality, when `x` is negative, `y` is negative too which doesn't make sense |
17:16:57 | Mister_Magister | sorry for another stupid question but is there some sdl 2d game engine? |
17:17:06 | FromGitter | <liquid600pgm> yes, see nimgame |
17:17:16 | Mister_Magister | thanks! |
17:18:07 | narimiran | Mister_Magister: see the documentation/examples, it is quite nice: https://vladar4.github.io/nimgame2/ |
17:18:17 | Mister_Magister | thanks :) |
17:18:37 | Mister_Magister | does it support touch? |
17:24:14 | FromGitter | <liquid600pgm> likely, don't know about multitouch |
17:24:20 | FromGitter | <liquid600pgm> you'll have to test it out yourself |
17:24:30 | FromGitter | <liquid600pgm> or find that in the documentation |
17:24:51 | Mister_Magister | okay |
17:24:59 | Mister_Magister | or just make PR :P |
17:27:54 | FromDiscord | <DeltaPHC> I think SDL2 (which nimgame is built upon) supports multitouch, so if it's not in nimgame, it's mostly a matter of hooking it up |
17:28:50 | Mister_Magister | ye i know that's what i ment through "or just make PR" |
17:29:02 | Mister_Magister | sdl supports it if nimgame doesn't then it will |
17:33:05 | Vladar | I don't have any touch devices to test it on, so it isn't in nimgame2/input module yet (as well as sdl2's gamepads). PRs always welcome =) |
17:34:10 | * | jjido joined #nim |
17:39:13 | Mister_Magister | Vladar: leave it to me! I'm planning to maybe write my game i was planning to write in nim instead. It will be for SailfishOS only which is mobile OS :) |
17:42:05 | FromGitter | <alehander42> Araq, would the allocator become a part of the signature |
17:42:44 | FromGitter | <alehander42> e.g. being able to specify that something uses A allocator B allocator |
17:45:05 | Vladar | Mister_Magister: Awesome! I always said that the best way to improve an engine is to write a game on it. So far I din't have a chance to test https://github.com/Vladar4/sdl2_nim on something other than desktops as well, so you have a solid chance to unearth some nasty bugs there too =) |
17:47:21 | Mister_Magister | Vladar: in case of bugs ya will receive shitton of issues on github ;0 |
17:47:24 | Mister_Magister | ;) |
17:48:26 | narimiran | Mister_Magister: please document along the way the making of your game, i'm sure there would be lots of interested people for that :) |
17:48:39 | Mister_Magister | whoa maybe |
17:48:50 | Mister_Magister | it will take 2 years or so to make it tho |
17:48:54 | Mister_Magister | i'm slow at those things |
17:49:13 | narimiran | great, then we will have lots of blogposts by you :) |
17:49:33 | Vladar | Mister_Magister: issues < PRs ;-) |
17:49:38 | Mister_Magister | xd |
17:49:42 | Mister_Magister | always |
17:57:38 | Araq | alehander42 that didn't work out so well for C++ |
17:57:47 | Araq | better make it runtime polymorphic |
17:58:18 | * | rnrwashere quit (Remote host closed the connection) |
18:02:17 | FromGitter | <alehander42> yeah zah told me they had some issues with the std lib, but i never wrote much c++, so can't really appreciate it |
18:04:51 | Araq | well imagine if your 'system.string' is incompatible with mine system.string and you will have a pretty good idea about its problems |
18:06:12 | FromDiscord | <alexander92> oh hello from discord |
18:06:46 | FromDiscord | <alexander92> yeah, but maybe it can be a different kind of type: where by default it doesnt take part in matching except if one excplicitly wants just a certain allocator |
18:07:35 | poopBot | Mister_Magister, there are godot bindings too i think |
18:07:40 | FromDiscord | <alexander92> not very sure how often people use different allocators |
18:12:25 | * | rnrwashere joined #nim |
18:13:43 | * | rnrwashere quit (Remote host closed the connection) |
18:28:41 | rayman22201 | @Araq, if you are still around, I have been (slowly) attempting to get Godbolt compiler support for Nim working. Where is the code for generating the mangled function names in C? |
18:33:16 | Araq | rayman22201, hey, it's in ccgtypes.nim |
18:34:02 | rayman22201 | just found it. Ok. Thanks! |
18:34:26 | Araq | strip away the _HASH part and there you go |
18:34:49 | rayman22201 | That's what it looks like. I just wanted to make sure there wasn't anything more clever going on :-) |
18:38:02 | * | rnrwashere joined #nim |
18:41:00 | FromDiscord | <DeltaPHC> Is Nim always going to be a 'transpiler for C or C++', or are there long-term platforms for making an LLVM backend more first class? |
18:41:16 | FromDiscord | <DeltaPHC> *plans, not platforms |
18:42:09 | FromDiscord | <DeltaPHC> Or is it more that the backends will be on equal footing |
18:44:41 | FromDiscord | <DeltaPHC> I was only thinking about that because I was having the thought that Godbolt support would be neat, but the code it generates can typically only be as good as the C compiler used |
18:47:56 | rayman22201 | There is a semi-official LLVM implementation of the compiler: https://github.com/arnetheduck/nlvm |
18:48:37 | FromDiscord | <DeltaPHC> Mm. I was mostly wondering if the 'preferred' default is going to change |
18:49:25 | rayman22201 | There is a long answer to this, but atm, no. |
18:50:10 | * | ng0 joined #nim |
18:50:16 | FromDiscord | <DeltaPHC> Alright. I'm perfectly fine if just the choice is there |
18:50:20 | rayman22201 | C/C++ compilers are pretty damn good these days, and actually provide a lot of advantages. |
18:50:35 | FromGitter | <jrfondren> woah, woah, let's not go that far |
18:54:20 | rayman22201 | @jrfonden, you have to elaborate on that. idk what you mean. Nim is actually pretty well designed in this regard. It was doing the "backend / frontend" compiler split way before LLVM became popular. It's designed to allow for supporting new backends. It's not like anything is written in stone, but there are no plans to change the main implementation right now either. |
18:56:01 | rayman22201 | I mean, Araq has been trying to make the default C++ instead of straight C for a while, and even that has gotten a lot of pushback lol. |
18:56:45 | Araq | that's true but also the C++ target is now in very good shape |
18:57:09 | Araq | the CIs covers bootstrapping with C++ and essentially all tests |
18:58:04 | FromGitter | <jrfondren> I just suggest that you defend Nim without praising C compiler writers. Those guys have been driven insane by undefined behavior. |
18:58:40 | Araq | I blame the C spec, it's insane |
18:59:01 | FromDiscord | <DeltaPHC> The C++ spec is even more insane, to be fair |
18:59:06 | FromGitter | <kinkinkijkin> c WAS specified in the early days of personal computing |
18:59:30 | Araq | the compiler writers are usually down-to-earth, except for the GCC devs which are/were more like "read the spec, we are allowed to do this" |
18:59:46 | rayman22201 | I have much respect for C compiler writers! lol. It's high praise that Nim uses those compilers as the default. :-P |
19:00:41 | FromGitter | <jrfondren> the three worries about transpilation are A) doesn't this mean I'll have to care overly much about the intermediate language? That I can't write Nim but must write Nim with C in mind? B) doesn't this mean Nim's performance can only be as good as frontend C performance with its lesser guarantees on aliasing, etc., and C) I'm sure there's a third one. |
19:01:15 | leorize | A) no, C is just like ASM to Nim :p |
19:01:22 | Araq | are these real worries or something you think others think? |
19:01:44 | * | rnrwashere quit (Remote host closed the connection) |
19:02:22 | FromGitter | <jrfondren> and the answers are A) transpilation can be done poorly or well but Nim does it well so don't worry. B) C compilers can compile C-as-written-by-transpilers even better than C as written by C coders. C) I'm sure there's a thir done |
19:02:36 | Araq | lol |
19:02:41 | * | neceve quit (Read error: Connection reset by peer) |
19:03:05 | Araq | "Oh no, C can never faster than asm because it generates asm" |
19:03:25 | Araq | "oh no, C can never be safer than asm because it generates asm" |
19:03:40 | Araq | "oh no, C can never be more portable than asm because it generates asm" |
19:03:48 | FromGitter | <kinkinkijkin> touting that nim transpiles to C makes people think they have to keep in mind how C works in order to make good code, which isn't really true |
19:03:56 | Araq | people have strange ideas. |
19:04:01 | FromGitter | <kinkinkijkin> yeah |
19:04:29 | leorize | which is why Nim advertises as "compiles to C" instead IMO :p |
19:04:39 | rayman22201 | Sorry. I don't trust anything. I'm going back to flipping bits with magnets by hand. /s |
19:05:26 | FromGitter | <kinkinkijkin> also, asm is inherently non-portable, considering it locks the programmer to the system setup it's being made on, and i've never heard anyone say C isn't as portable as asm |
19:05:27 | narimiran | rayman22201: <C-x> <M-c> <M-butterfly> |
19:05:44 | * | narimiran hopes that somebody will get the reference |
19:06:11 | leorize | xkcd! |
19:06:24 | narimiran | leorize: congrats, 10 points for you! |
19:06:36 | * | leorize pretends that they didn't lookup that one on the web |
19:06:44 | narimiran | :( |
19:06:49 | Araq | I still don't know what 'transpilation' is btw. my dict STILL doesn't have that word |
19:07:12 | leorize | my spell checker doesn't know that word either |
19:07:15 | FromGitter | <jrfondren> people have strange ideas consistently, so have a reply handy. What's more, people are going to worry that they'll get advocacy rather than the truth. "Nim people say it's not a problem but I bet in practice it comes up all the time." |
19:07:21 | rayman22201 | @narimiran https://xkcd.com/378/ |
19:07:57 | rayman22201 | ;-) |
19:07:58 | FromGitter | <kinkinkijkin> turning code of one language to code of another automatically is how people define transpilation |
19:08:15 | FromGitter | <kinkinkijkin> except not when the language is asm |
19:08:24 | leorize | that doesn't make sense :p |
19:08:27 | Araq | or Java bytecode. |
19:08:39 | Araq | pretty sure javac *compiles* to bytecode |
19:09:29 | FromGitter | <kinkinkijkin> java has so many ways to compile, and i don't like the word transpilation but all the hip kiddies nowadays are using it |
19:09:31 | Araq | of course, we all know that is not what Python does because Python is "interpreted" |
19:09:54 | FromGitter | <jrfondren> so I'd rather point to benefits. with Nim you can write a validation function and then run that on the frontend, in JS, and on the backend, in C or C++ or whatever. You get really good FFI. You can compile faster with tcc (maybe). You have infrastructure that lends itself to someone writing a Dalvik backend one day. |
19:10:21 | Araq | and C++ is only a "preprocessor". |
19:11:32 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
19:12:03 | FromGitter | <kinkinkijkin> the formation of natural language is weird, but challenging it doesn't do anything about it |
19:12:09 | leorize | narimiran: was just messing with you :p that strip is why I didn't use emacs lol |
19:12:17 | * | laaron joined #nim |
19:12:51 | FromGitter | <kinkinkijkin> actually can form its own new weird items of natural lingual progress |
19:13:28 | Araq | kinkinkijkin: I do something about it, I tell people it's a term that makes one look like a noob, for good reasons. And in the end I'll win. |
19:14:00 | Araq | Nobody uses 'preprocessor' for C++ anymore, there is hope. |
19:14:19 | Araq | in fact, many programmers do not even know what a "preprocessor" is. |
19:19:42 | Araq | jrfondren: we can update the website to be silent about it, Nim produces native code, that's all that's important |
19:22:14 | FromGitter | <jrfondren> you're going to hide the feature of it also compiling to JS? |
19:23:07 | Araq | no, but it's "native code on the server, JS code on the browser". maybe |
19:25:28 | * | lritter quit (Ping timeout: 245 seconds) |
19:26:31 | FromGitter | <jrfondren> I don't think it's that big of a deal, just that there are some reasonable worries (it's easy to imagine a Nim competitor that does things badly. It's very easy to get masses of C compiler errors from ATS for example, due to how it handles templates) and that they can be answered without committing the faux pas of praising C :) |
19:29:25 | FromGitter | <jrfondren> it's like GC. It's a frequent thing that people worry about and a lot of the worries might not be very well grounded but you may as well take it seriously. |
19:30:41 | FromGitter | <jrfondren> OCaml for example has a page that says "no! this is good! stop worrying about it!" https://ocaml.org/learn/tutorials/garbage_collection.html . That's at least a better response IMO that trying to deemphasize the GC |
19:31:29 | Araq | wait, ATS produces wrong C code? |
19:31:53 | FromGitter | <jrfondren> if you misuse templates it will |
19:32:09 | FromGitter | <kinkinkijkin> the grounding for gc fear was once well-grounded, reminder |
19:32:22 | FromGitter | <jrfondren> for example if you use hash tables in ATS, the stdlib assumes that your hash key will have a certain template defined for it, and if you don't do that you'll get a mass of mysterious compiler errors |
19:34:10 | FromGitter | <jrfondren> ATS's also the language I had in mind for producing C that C compilers optimize better than the C written by C programmers. bad video: https://www.youtube.com/watch?v=dsILVOqYCU0 |
19:35:27 | * | ShalokShalom quit (Remote host closed the connection) |
19:35:44 | * | Trustable quit (Remote host closed the connection) |
19:36:48 | FromGitter | <jrfondren> well sure I'd rather be in Nim's position of having multiple alternative GCs + realistic gc:none with destructors, than just having to persuade the asker to learn to love GC |
19:38:25 | Araq | wise words |
19:38:47 | Araq | I dislike GCs for entirely different reasons than the rest of the world... :-) |
19:40:34 | FromGitter | <kinkinkijkin> bad GC collection timing is a thing, but in that case almost every language with GC that is still in development also has GC-protection and explicit GC calls available |
19:42:02 | FromGitter | <kinkinkijkin> in every case where it's harmful, you can just not use it, and so many people don't realize this, nor do anything that requires any sort of protection from GC |
19:43:57 | * | shashlick quit (Remote host closed the connection) |
19:44:20 | FromDiscord | <DeltaPHC> Nim only invokes the GC on memory allocation, right? |
19:44:46 | * | shashlick joined #nim |
19:46:44 | FromDiscord | <DeltaPHC> In such a case, it doesn't seem like it'd be too hard to avoid GC runs altogether if you make most of your allocations upfront. GC can't pause anything if it doesn't run :P |
19:47:06 | leorize | or you can just set GC timeout to some really low value |
19:48:24 | leorize | IIRC Araq once ran the GC with timeout of 10us |
20:10:46 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:19:38 | * | theelous3 quit (Ping timeout: 245 seconds) |
20:22:49 | * | narimiran quit (Ping timeout: 246 seconds) |
20:24:59 | FromGitter | <kinkinkijkin> alright, getting back to working on this project i haven't touched it half a year |
20:25:05 | FromGitter | <kinkinkijkin> in |
20:29:30 | xace | kinkinkijkin: are you referring to this? https://github.com/kinkinkijkin/kpmmlnim |
20:29:50 | FromGitter | <kinkinkijkin> yeah why ? |
20:30:25 | xace | just got curious, looking for inspiration on what to do sort of... |
20:30:31 | * | disruptek quit (Ping timeout: 246 seconds) |
20:31:24 | FromGitter | <kinkinkijkin> the version on git is outdated, i have to fix that but i'm currently rereading this code |
20:32:08 | xace | yeh, no stress, im reading the nim manual in lack of better things to do ... |
20:34:02 | * | disruptek joined #nim |
20:35:19 | FromGitter | <kinkinkijkin> also my code is a massive mess of forgetting what i was doing and having to redo it when i remember~ |
20:35:26 | FromGitter | <kinkinkijkin> minus tilde |
20:35:32 | FromGitter | <kinkinkijkin> using two keyboards rn |
20:36:07 | xace | lol why? are you an emacs user or something? |
20:36:15 | FromGitter | <kinkinkijkin> no, two computers |
20:40:12 | FromGitter | <kinkinkijkin> one, my main desktop, is in windows and has this chat up; the other, my odroid-xu4, has vim open with a keyboard that's more comfortable |
20:41:54 | xace | have you checked out synergy? 1 keyboard+mouse to rule them all? |
20:46:00 | * | nsf quit (Quit: WeeChat 2.4) |
20:50:22 | FromGitter | <kinkinkijkin> nah, don't need that kind of thing |
20:51:25 | * | jjido joined #nim |
21:02:33 | * | clyybber joined #nim |
21:08:23 | * | theelous3 joined #nim |
21:08:43 | * | xet7 quit (Ping timeout: 248 seconds) |
21:10:31 | shashlick | Synergy is a saving grace |
21:11:22 | shashlick | I finally got around to working on my python proxy which I was slacking off on because of Nim |
21:12:46 | FromGitter | <kinkinkijkin> oh apparently synergy even costs money |
21:14:07 | FromGitter | <kinkinkijkin> yeah i'd rather just put my spare keyboards and mice to use than pay 30 USD for multi-desktop integration software that might not even have a build for the type of processor in the computer it'd be useful with |
21:15:49 | * | laaron- joined #nim |
21:16:40 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
21:16:43 | * | Vladar quit (Remote host closed the connection) |
21:20:43 | * | krux02 quit (Remote host closed the connection) |
21:21:41 | * | xet7 joined #nim |
21:24:43 | * | theelous3 quit (Ping timeout: 255 seconds) |
21:24:45 | * | laaron- quit (Quit: ZNC 1.7.1 - https://znc.in) |
21:25:21 | * | laaron joined #nim |
21:29:13 | * | laaron quit (Remote host closed the connection) |
21:29:30 | * | laaron joined #nim |
21:29:31 | Araq | https://www.cl.cam.ac.uk/~mr10/bcplman.pdf |
21:30:04 | shashlick | @kinkinkijkin - i'm using their last free version |
21:30:18 | shashlick | 1.8.8 |
21:30:18 | Araq | oh look, C got it all wrong, it used to be *n, not \n, these bastards clearly didn't respect established notations |
21:32:51 | * | laaron quit (Remote host closed the connection) |
21:33:14 | * | laaron joined #nim |
21:40:07 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
21:40:34 | * | laaron joined #nim |
21:41:47 | * | laaron quit (Remote host closed the connection) |
21:42:07 | * | laaron joined #nim |
21:45:43 | * | laaron quit (Remote host closed the connection) |
21:46:13 | * | laaron joined #nim |
21:49:37 | * | solitudesf quit (Ping timeout: 246 seconds) |
21:53:37 | * | rnrwashere joined #nim |
21:53:44 | * | laaron quit (Remote host closed the connection) |
21:53:57 | xace | kinkinkijkin there is also https://github.com/debauchee/barrier |
21:54:25 | * | laaron joined #nim |
21:55:44 | xace | shashlick: I guess that link goes for you aswell ^^ |
21:56:12 | FromDiscord | <kiwi> question: in python I can create an "array" of 0 to 100 with range(100). I can assign a variable with `a = list(range(100))`. What's the equivalent in nim? |
21:59:02 | xace | isnt it array[100, int] ? |
21:59:16 | FromGitter | <jrfondren> that initializes the array to a hundred zeroes. |
21:59:44 | xace | well you could also do a empty sequence with a set length/cap of 100 |
21:59:59 | FromDiscord | <kiwi> yep. 😃 I was looking to create sequences without using lc say. |
22:00:09 | xace | !eval var a = newSeq[int](100) |
22:00:10 | NimBot | <no output> |
22:00:12 | FromGitter | <jrfondren> without using what? |
22:01:14 | FromDiscord | <kiwi> a listcomprehension |
22:01:34 | FromGitter | <jrfondren> ah. I don't see an obvious equivalent in stdlib, so I'd just write a loop. |
22:02:10 | FromDiscord | <kiwi> ok. I just thought i must be missing something obvious. thanks. |
22:02:42 | FromGitter | <jrfondren> it's a lot more important to do things the right way in Python, because the wrong way might be less efficient to a shocking or absurd degree. In Nim a simple loop's going to be as efficient as a built-in facility. |
22:03:16 | FromDiscord | <exelotl> I don't see a better way to do it than using a loop |
22:04:22 | FromDiscord | <exelotl> at least if there is one it's impossible to find because the nim docs in a lot of cases really hard to search if you don't already know what you're looking for :') |
22:04:39 | FromDiscord | <exelotl> I was thinking there might be like a map function for ranges |
22:04:40 | jjido | Araq what is BCPL? The PDF is recent |
22:05:06 | FromGitter | <jrfondren> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce324929d64e537bce2459a] |
22:05:24 | FromDiscord | <kiwi> yes, so was I exelotl. the similarities to python are huge so I tend to look for a mapping |
22:06:17 | FromDiscord | <exelotl> hmm, I'm generating some C code and I have a string containing raw binary data, which I want to embed in the output. |
22:06:24 | FromDiscord | <exelotl> In the Nim docs it says for addEscapedChar "This is not correct for producing Ansi C code!"... is there some function that *is* correct for producing ansi C code? |
22:09:15 | FromDiscord | <kiwi> Yes. I'd do it as an lc jrfondren so `var x = lc[ i | (i <- ..20), int ]` |
22:09:42 | FromDiscord | <kiwi> for a sequence of 20 |
22:09:56 | Araq | look at how the compiler does it, it's more tricky than you think |
22:11:12 | FromDiscord | <exelotl> dangit xD |
22:11:34 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:12:55 | FromGitter | <kinkinkijkin> oh dear, I've forgotten if nim lets you echo containers of containers in a formatted way |
22:12:58 | * | theelous3 joined #nim |
22:14:31 | FromGitter | <kinkinkijkin> i have a chunk of code that i need to inspect the results of, and if there's a standard function for it i'd prefer that over writing a small dumper |
22:16:28 | FromGitter | <jrfondren> you'll get the $ that you've defined, all the way down. in one library I have a -d: flag to skip those definitions, as the default stringification's better for debugging. |
22:20:38 | FromDiscord | <exelotl> oh is it just these two functions at the top I'm looking for? |
22:20:42 | FromDiscord | <exelotl> https://github.com/nim-lang/Nim/blob/61380d0a070a4a691e820e18b25e9dd8fb420306/compiler/msgs.nim |
22:25:06 | clyybber | kinkinkijkin: try repr |
22:25:16 | clyybber | good night |
22:25:19 | * | clyybber quit (Quit: WeeChat 2.4) |
22:28:13 | shashlick | xace wish they had a chance log |
22:29:06 | xace | yeah i stopped using multiple machines that way a couple of years ago so i cant speak for the experience. i rely fully on terminals/ssh these days... need to get a friendly browser for terminals... considering browsh |
22:30:38 | xace | but judging from the readme its based on version 1.10 so its a slightly more recent compared to your 1.8.8 |
22:32:10 | skrylar[m] | poopBot: there is |
22:32:24 | skrylar[m] | [a matrix bridge to irc] |
22:32:28 | * | abm joined #nim |
22:33:00 | poopBot | duno myebe i install then nekho or soem other linux client for it |
22:35:25 | * | stefanos82 quit (Remote host closed the connection) |
22:35:33 | skrylar[m] | as for backends i dunno i always used the C one. not really a fan of C++. haxe uses c++ as its native code target and the build times are slow |
22:37:05 | skrylar[m] | @araq have you skimmed over the Be interface stuff at all? seems to be a pretty flat hierarchy, ought to be easy to replace subclass+hook with closures |
22:38:31 | skrylar[m] | might need to smuggle a few bits and pieces from vcl over to modernize it but. eh |
22:41:50 | * | rnrwashere quit (Remote host closed the connection) |
22:42:53 | * | ShalokShalom joined #nim |
22:48:52 | * | rnrwashere joined #nim |
22:48:53 | shashlick | Wonder what's the benefit of barrier |
22:50:36 | Araq | not aware of Be, sorry |
22:51:04 | Araq | but as I said, personally I would go for immediate mode UIs |
23:00:53 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
23:12:46 | * | smitop joined #nim |
23:18:24 | smitop | In this (badly titled) commit: https://github.com/nim-lang/Nim/commit/1c9b4e5d33ff6bca8f345951b72018171d47e251, Araq changed the licence. is there any documentation of all the contributors before that commit agreeing to that? |
23:18:33 | smitop | can't find any |
23:22:13 | smitop | GPL -> MIT |
23:23:01 | * | rnrwashere quit () |
23:35:27 | FromGitter | <jrfondren> https://github.com/nim-lang/Nim/graphs/contributors?from=2008-06-22&to=2013-05-15&type=c -- pretty small group. |
23:39:19 | * | abm quit (Quit: Leaving) |
23:45:13 | * | sz0 joined #nim |