00:03:00 | * | shodan45 joined #nim |
00:03:27 | * | kseg quit (Quit: kseg) |
00:12:03 | * | der-landgraf quit (Ping timeout: 240 seconds) |
00:21:33 | * | der-landgraf joined #nim |
00:28:34 | * | fastrom quit (Quit: Leaving.) |
00:33:08 | cheatfate | Araq_, i have made proper getTimezone() but i think we need to cache calculations in global variable |
00:34:20 | cheatfate | Araq_, https://gist.github.com/cheatfate/57dac3305f65012d83e069eab75137a2 |
00:35:43 | Araq_ | I don't have enough "extended memory" to run a browser |
00:36:16 | cheatfate | lol |
00:36:30 | mcc | so one of the examples for the sdl2 nimble contains this line: var windowEvent = cast[WindowEventPtr](addr(evt)) ... when I run this i get "Error: expression has no address" |
00:36:56 | cheatfate | Araq_, you want me put source here? :) |
00:36:58 | mcc | on the appearance of evt, The only obvious difference I see is that in the example evt is a global var and in my program it is a parameter to a function |
00:37:03 | cheatfate | or we can doo DCC |
00:37:53 | Araq_ | plus I forgot my sound card's baud rate and IRQ |
00:38:54 | Araq_ | mcc: try 'unsafeAddr' |
00:38:55 | cheatfate | sound card via com port :) i think its 115200 :) |
00:39:02 | mcc | Okay actually if I say var evt = evt at the top of the function it does not complain anymore. I suppose this is not surprising? |
00:40:01 | mcc | araq_: Thank you, that fixed it. Is the reason that was required that I am violating a mutability guarantee? |
00:40:22 | Araq_ | exactly. |
00:41:21 | Araq_ | cheatfate: getTimezone() shouldn't cache anything and it needs to moved out of the critical path |
00:41:45 | * | Araq_ is now known as Araq |
00:41:56 | mcc | Cool. Are there any lifetime problems I should be aware of if I say var evt2 = cast[KeyboardEventPtr](unsafeAddr(evt1)) ? Like, will the garbage collector get confused or anything, or if evt2 outlives the function do I need to worry about it pointing to freed memory once evt's scope has ended? |
00:42:08 | mcc | evt1's scope i mean |
00:42:16 | Araq | yup, all that. |
00:42:21 | Araq | it's on the stack |
00:42:40 | Araq | it will disappear when it's stack frame disappears, no checking done. |
00:43:08 | Araq | but usually these things don't live longer. |
00:44:21 | cheatfate | Araq, dont really understand your "it needs to moved out of the critical path" |
00:44:46 | Araq | getTime() etc should not call it. |
00:44:53 | mcc | ok. what should i do if i find myself in a situation where i *want* to create a "copy" of evt2, that is, i want to create a new data item that contains the same bytes as evt:Event but is typed as KeyboardEventObj instead of Event? |
00:45:10 | mcc | (In this situation KeyboardEventPtr* = ptr KeyboardEventObj … the api designer is trying to mimic what in C was a union) |
00:46:15 | Araq | var evt2 = cast[KeyboardEventPtr](unsafeAddr(evt1))[] # [] to deref the pointer |
00:46:42 | mcc | Ah, I see. Thanks again. |
00:56:43 | mcc | hm, it seems like whoever made the sdl2 nimble did not include constants for any of the keycodes… |
01:00:43 | Araq | they are just in its own module, take a look |
01:00:47 | Araq | good night |
01:03:19 | mcc | I will look, thank you. Goodnight |
01:13:45 | * | PMunch quit (Quit: leaving) |
01:20:55 | mcc | What is the scope of a "var" in nim? Like if I say if True: [newline, indent] var x = 3 , does x exist for the entire function or does it exist only for the lexical scope of the if: ? |
01:21:35 | mcc | also if var is scoped to the narrowest block, is there a sensible way to create a "bare block", like doing just { } by itself in C? I found "do:" in the manual and did this but it seemed to confuse the parser. |
01:27:33 | filwit | mcc: the 'x' will be scoped to the 'if' block. And yes, there is a 'block' keyword in Nim (similar to {} in C) |
01:28:02 | mcc | cool. |
01:28:03 | filwit | also, Nim's block statement can be given a name.. then you can 'break' by name as well |
01:28:48 | filwit | http://nim-lang.org/docs/manual.html#statements-and-expressions-block-statement |
01:29:44 | mcc | Oh, good. |
01:30:20 | tautologico | to use dynamic dispatch is it advisable to define ref objects, or value objects will work? |
01:35:39 | mcc | sdl2 nimble contains a: proc drawRect*(renderer: RendererPtr; rect: var Rect): and a : Rect* = tuple[x, y: cint, w, h: cint] . My understanding is the way to make a tuple is to make a (parenthesis,containing,comma,separated,list). How do I call this function? Things that have not worked: render.drawRect( ( 1,2,3,4 ) ) ... render.drawRect( Rect( 1,2,3,4 ) ) |
01:35:39 | mcc | ... var rect = Rect(x,y,10,10); render.drawRect( rect ) |
01:35:53 | mcc | The last one gives me "expression Rect cannot be called" |
01:37:32 | filwit | tautologico: i don't expect it matters.. and fyi, by default 'object' is passed by invisible ptr if it's above a certain size (8 bytes on 64bit machines I think) |
01:38:43 | filwit | mcc: maybe because the Rect uses 'cint'? Try `Rect(x:1.cint, y:2.cint, w:3.cint, h:4.cint)` |
01:38:46 | tautologico | filwit: ok thanks, I ask because the examples in tutorial and manual use ref objects, and in C++ to use dynamic dispatch you have to use a pointer or reference |
01:40:03 | mcc | filwit: "object constructor needs an object type". not sure what that means. |
01:40:30 | filwit | mcc: oh whoops sorry I gave you the object syntax for a tuple type :\ |
01:40:45 | filwit | mcc: just remove the 'x:'/'y:'/etc parts |
01:41:08 | filwit | or do this: (1.cint, 2.cint, 3.cint, 4.cint).Rect |
01:41:18 | mcc | oh… i'm sorry, i said "Rect(x:cint, y:cint, 10:cint, 10:cint)" and i got that error. x and y are variables |
01:41:41 | filwit | it's fine, i understand |
01:41:43 | mcc | oh uh wow that worked flawlessly. what is .typename doing, formally? :O |
01:43:10 | * | LowLifePerv quit (Quit: thinking about getting a znc) |
01:43:37 | filwit | it's just the Universal Call Syntax in Nim.. In this case you're passing the tuple (1,2,3,4) to 'Rect' which is a type so invokes convert |
01:43:56 | filwit | you could do Rect((1.cint,2,3,4)) instead |
01:44:17 | mcc | hm. ok. i may ask some more about that once i've had a moment to think about it :) |
01:45:44 | filwit | in Nim you can call functions in two ways.. the 'procedural' way (eg, `foo(x)`) or the 'oop' way (eg, `x.foo()`) |
01:46:47 | filwit | So `(1.cint, 2, 3, 4).Rect` is seen as `(1.cint, 2, 3, 4).Rect()` is seen as `Rect((1.cint, 2, 3, 4))` |
01:47:13 | mcc | okay... but if i say structname.varname ... what am i doing, am i calling a function or am i looking up an item? |
01:47:28 | mcc | could i say something like "map x [point1, point2, point3]" if "x" is a field of Point? |
01:48:26 | filwit | you're looking up an item if it exist, of you're calling a proc if it exist (and only has one parameter which matches 'structname') |
01:49:34 | filwit | if both exist you have to be more specific about which you're trying to call |
01:49:37 | mcc | okay. so if in the current scope there is a proc x, and Point has a field x, and var point : Point, then saying x(point) will call the function but saying point.x will look up the field? |
01:50:04 | filwit | yes.. and saying point.x() will also call the proc, not lookup the field |
01:51:41 | mcc | iiiinteresting. okay. thanks :O |
01:54:44 | mcc | at the end of my first day of nim coding i find myself setting the tab width in my editor to 4... |
01:54:50 | mcc | hopefully this shall not leave me an outcast from nim society... |
01:57:17 | mcc | Here is another question actually, I see when I declare things I can say like var x,y,z,w = 0 and it will 0-init all of them... i don't guess later on there's a way to just say "x,y,z,w = 0" on a line and initialize several variables at once? |
02:07:32 | filwit | that would be nice, but I don't think so |
02:07:34 | filwit | bbl |
02:08:17 | mcc | thx again |
02:44:35 | * | LowLifePerv joined #nim |
03:11:23 | * | |meta quit (Quit: Connection closed for inactivity) |
03:35:15 | * | LowLifePerv quit (Quit: thinking about getting a znc) |
04:36:59 | * | space-wizard joined #nim |
04:37:40 | * | space-wizard quit (Max SendQ exceeded) |
04:38:22 | * | space-wizard joined #nim |
04:39:05 | * | space-wizard quit (Max SendQ exceeded) |
04:39:44 | * | space-wizard joined #nim |
05:19:32 | * | gokr joined #nim |
05:21:15 | * | Demon_Fox quit (Quit: Leaving) |
05:26:13 | * | LowLifePerv joined #nim |
05:37:28 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:45:28 | * | LowLifePerv quit (Quit: thinking about getting a znc) |
05:58:25 | * | irrequietus joined #nim |
05:59:08 | * | gokr quit (Ping timeout: 244 seconds) |
06:07:06 | * | irrequietus quit () |
06:51:32 | * | girvo joined #nim |
06:55:07 | girvo | Hey all |
06:56:28 | * | mcc quit (Quit: Connection closed for inactivity) |
06:57:36 | girvo | dom96: I finally updated that Unix socket PR with the doc comments as requested |
07:11:19 | * | s4 joined #nim |
07:11:47 | * | gokr joined #nim |
07:15:01 | * | tankfeeder joined #nim |
07:22:45 | * | filwit quit (Quit: Konversation terminated!) |
07:26:05 | * | Trustable joined #nim |
07:33:23 | * | bjz joined #nim |
07:37:24 | * | bjz quit (Max SendQ exceeded) |
07:44:40 | * | gokr left #nim (#nim) |
07:55:42 | * | themagician quit (Ping timeout: 276 seconds) |
08:00:30 | * | themagician joined #nim |
08:02:03 | * | girvo quit (Ping timeout: 240 seconds) |
08:07:04 | * | Gonzih quit (Remote host closed the connection) |
08:08:50 | * | Gonzih joined #nim |
08:10:02 | * | TheLemonMan joined #nim |
08:17:54 | * | Gonzih quit (Read error: Connection reset by peer) |
08:20:29 | * | bjz joined #nim |
08:28:09 | * | filcuc joined #nim |
08:30:11 | cheatfate | Araq, could you please take a look on this code https://github.com/freebsd/freebsd/blob/af3e10e5a78d3af8cef6088748978c6c612757f0/libexec/bootpd/tzone.c |
08:31:54 | Araq | what about it? |
08:33:27 | cheatfate | its emulation of timezone in bsd |
08:33:35 | cheatfate | freebsd |
08:33:46 | cheatfate | but you dont like it |
08:33:49 | cheatfate | for some reason |
08:34:49 | cheatfate | it uses localtime you wan't use for getTimezone() |
08:35:09 | cheatfate | one more way is to write tz zone file parser |
08:35:24 | cheatfate | but ^^^ insane way |
08:36:10 | * | Gonzih joined #nim |
08:38:18 | Araq | by all means use it if it solves the issue |
08:39:55 | cheatfate | yesterday you want me just disable getTimezone for freebsd and netbsd |
08:41:10 | * | tankfeeder left #nim ("Leaving") |
08:45:11 | Araq | no, I want you to fix the issue, but within reasonable bounds of your time. |
08:45:39 | Araq | if at the end you say "ok, let's disable it, fixing it is way too complex" that's fine too. |
08:46:02 | Araq | I trust your judgement. |
08:46:14 | * | girvo joined #nim |
08:46:46 | girvo | dom96: Thanks so much for merging the PR! Currently working on a client for the Docker remote API that needs to work with unix sockets :D |
08:46:57 | dom96 | girvo: np :) |
08:52:11 | * | fastrom joined #nim |
08:53:38 | Araq | I love travis' emails. So convenient it tells me that I broke something. |
08:55:06 | Araq | and now that every test is green all the time, I don't need a diff mechanism either. But nimbuild was superior. |
08:59:03 | * | girvo_ joined #nim |
09:02:13 | * | gokr joined #nim |
09:03:11 | dom96 | yeah, too bad it doesn't support Windows :\ |
09:04:06 | * | girvo_ quit (Ping timeout: 272 seconds) |
09:06:48 | * | girvo_ joined #nim |
09:11:24 | * | Arrrr joined #nim |
09:11:42 | * | girvo_ quit (Ping timeout: 272 seconds) |
09:19:50 | girvo | dom96: Interestingly, with the new Linux userland support that might not be the case for much longer |
09:19:56 | girvo | (in Windows 10, anyway) |
09:20:01 | girvo | Question: "Error: expression 'readLine(sock, result, -1, {SafeDisconn})' has no type (or is ambiguous)" |
09:20:48 | dom96 | you're likely trying to assign its return value to something, but it has no return value |
09:21:02 | girvo | http://hastebin.com/xodavekiwe.nim |
09:21:08 | girvo | I'm `discard`-ing it though? |
09:21:45 | Araq | you cannot discard the 'void' type |
09:22:46 | girvo | Oh. I'm an idiot :) |
09:22:50 | girvo | thanks! |
09:23:37 | * | filcuc_ joined #nim |
09:26:42 | cheatfate | Araq, could you please explain me https://github.com/nim-lang/Nim/blob/devel/lib/pure/times.nim#L420-L429 |
09:26:54 | * | filcuc quit (Ping timeout: 260 seconds) |
09:27:02 | cheatfate | why all members after `second` shifted right |
09:27:25 | cheatfate | and when i'm trying to bring them back i got invalid indentation error |
09:27:43 | Araq | that's because of the commas |
09:27:55 | cheatfate | ahh |
09:27:58 | cheatfate | can i remove them? |
09:28:10 | Araq | ordinary indentation is here only allowed if they don't share the ': cint' |
09:28:46 | Araq | you can remove the commas and add ': cint' everywhere |
09:28:58 | cheatfate | Araq, ahh ok nice hack :) |
09:31:11 | * | fastrom quit (Quit: Leaving.) |
09:32:34 | Arrrr | Araq, crystal added a feature to auto translate proc((int, int)) into proc(int, int) if necessary. Do you think it is a good idea? |
09:33:59 | Araq | we need an 'unpack' macro, but I think it's better to be explicit about it |
09:35:14 | Araq | needless to say 'unpack' is easy to do in Nim. |
09:42:44 | * | girvo quit (Ping timeout: 272 seconds) |
09:45:39 | * | girvo joined #nim |
09:50:17 | cheatfate | Its so fun with this times.nim :) i've got how to get gmt offset in seconds but now i'm looking for how to get proper sign for this value |
09:53:55 | Araq | lib/pure/net.nim(610, 36) Error: undeclared identifier: 'Sockaddr_un' |
09:54:10 | Araq | er ... girvo broke mac OS X? |
10:00:37 | Araq | never mind, my mistake, had an old version of nativesockets.nim |
10:10:00 | cheatfate | Araq, i know you hate solaris but https://gist.github.com/cheatfate/a2f3ff4758cca75cb6da28df634e8cf3 |
10:11:26 | girvo | thanks!http://hastebin.com/doziqihuya.txt |
10:11:54 | girvo | Ta-da, that's nim communicating with Docker via a Unix socket on OS X :) |
10:20:16 | * | bjz_ joined #nim |
10:21:45 | * | bjz quit (Ping timeout: 244 seconds) |
10:25:40 | girvo | Q: whats the best choice for parsing HTTP bodies? |
10:26:28 | flyx | girvo: depends on the content type of the body, I guess |
10:26:43 | girvo | always JSON :) |
10:26:48 | cheatfate | girvo, https://github.com/h2o/picohttpparser |
10:27:38 | girvo | I'm writing a client for the Docker remote API in Nim, now that I've got working Unix sockets happening |
10:27:40 | cheatfate | ouch forget it you need to parse bodies |
10:27:51 | cheatfate | not requests |
10:27:54 | flyx | well, if you want to parse a JSON body, you can just use Nim's json module |
10:29:14 | girvo | thats the plan flyx - gotta pull the body out first. was wondering whether the was an idiomatic way of pulling the body out of the string |
10:30:06 | flyx | well if you *only* need the body. you can just read lines until you stumble upon an empty line |
10:30:18 | flyx | the headers are terminated with an empty line. |
10:30:46 | girvo | Ah right, yeah :) awesome. I've got a buffer for each readLine already, should be simple |
10:30:46 | cheatfate | flyx, but if body will be chunked-encoded? |
10:30:59 | girvo | cheatfate: I don't think it will be, at least for this use-case |
10:31:03 | cheatfate | flyx, or gzipped? |
10:31:08 | flyx | yeah, it is not generally that easy |
10:31:17 | flyx | when in doubt, use a proper HTTP library |
10:31:18 | girvo | Docker API is working over a unix socket, so it's not so fancy. Not even really HTTP heh |
10:32:37 | flyx | if it's not HTTP, what is it? raw TCP? |
10:33:18 | reactormonk | flyx, TCP is the same layer as unix sockets IIRC, http is above that, you might be able to do http over unix sockets |
10:33:38 | flyx | reactormonk: yeah, I know |
10:34:29 | flyx | it is definitely possible to do HTTP over unix sockets, girvo just wrote that it's not really HTTP, so I wondered if it's some custom protocol on top on TCP |
10:35:01 | girvo | flyx: they do expose a raw TCP socket, yeah |
10:35:16 | girvo | I think the Unix socket works the same way, but I'm looking into the docs atm |
10:35:51 | flyx | it does. |
10:36:04 | flyx | unless they explicitly made it work differently |
10:37:07 | flyx | well the Docker API is REST-based, so it *is* proper HTTP |
10:37:22 | flyx | (if we're talking about https://docs.docker.com/engine/reference/api/docker_remote_api/ ) |
10:45:55 | cheatfate | Araq, https://github.com/nim-lang/Nim/pull/4239 |
10:51:47 | * | PMunch joined #nim |
10:52:16 | * | girvo quit (Quit: leaving) |
11:07:38 | * | girvo joined #nim |
11:12:35 | * | girvo quit (Ping timeout: 260 seconds) |
11:15:56 | * | nsf quit (Quit: WeeChat 1.4) |
11:22:29 | Araq | cheatfate: I don't hate Solaris, I just think that more useful software runs on DOS than on Solaris. |
11:23:26 | cheatfate | Araq, i have answered your question on pr |
11:25:32 | Araq | but I accept fixes for Solaris as much as I accept DOS ports ;-) |
11:25:49 | Araq | (seriously, port to DOS!) |
11:26:46 | flyx | which DOS? |
11:27:57 | * | flyx recently tried to compile Nim on a PowerPC Mac, but there weren't any 32bit C sources available |
11:30:31 | * | gokr quit (Ping timeout: 252 seconds) |
11:31:28 | * | gokr joined #nim |
11:33:23 | Araq | FreeDOS? |
11:40:51 | Araq | flyx: you can cross-compile to that setup |
11:44:01 | * | gokr quit (Ping timeout: 240 seconds) |
12:02:37 | * | fastrom joined #nim |
12:03:37 | * | fastrom quit (Read error: Connection reset by peer) |
12:03:44 | * | fastrom joined #nim |
12:11:35 | * | gokr joined #nim |
12:16:25 | * | |meta joined #nim |
12:22:51 | * | gokr quit (Ping timeout: 276 seconds) |
12:44:41 | * | rok joined #nim |
12:44:52 | * | rok is now known as rok_ |
12:45:27 | * | rok_ is now known as rok |
12:53:12 | * | space-wizard joined #nim |
12:53:16 | cheatfate | Araq, its better to port to minix or hurd :) |
12:54:31 | cheatfate | Araq, i have updated PR |
12:55:52 | * | space-wizard quit (Client Quit) |
12:57:02 | Araq | can I play Indy 4 on Minix or Hurd without emulation? There you go then. |
12:59:53 | * | gokr joined #nim |
13:08:08 | cheatfate | I think you can easily write your own `Indy 4` with nim :) |
13:08:24 | * | girvo joined #nim |
13:12:48 | * | girvo quit (Ping timeout: 244 seconds) |
13:18:16 | cheatfate | Araq, is there any problems with my PR? |
13:30:23 | * | gokr quit (Read error: Connection reset by peer) |
13:31:40 | * | s4 quit (Quit: Konversation terminated!) |
13:42:04 | * | TheLemonMan quit (Remote host closed the connection) |
13:43:11 | * | TheLemonMan joined #nim |
13:53:26 | * | nsf joined #nim |
14:22:41 | * | mcc joined #nim |
14:26:39 | mcc | Hi... I am trying to make an SDL2 program in nim. I want to be able to do audio synthesis. I have written a small program which moves a box around and plays a repeating chime. If it matters, it is movable.nim here. https://bitbucket.org/runhello/nim-practice/src |
14:27:12 | mcc | The program works for about five to ten seconds. Then it crashes. I suspect this is because I am not following the thread rules correctly, and the five to ten seconds limit is when the first GC occurs. |
14:27:39 | mcc | I suspect I need to be tagging my audio callback with the {.thread.}, and compiling with --threads:on . |
14:28:29 | mcc | I have two machines at my disposal. One is a very, very old macintosh running a very old Mac OS. It has a very old GCC on it (4.2). This is lacking some atomics primitives that nim's threading mode cannot function without. So if I compile with --threads:on there I get only an error message. |
14:30:11 | Araq | yup, you also need to call GC_setupForeignThread in your audio thread if it's called from SDL |
14:30:31 | Araq | or setupForeignThreadGc cannot remember |
14:31:32 | mcc | Ah! That might answer my next question. Call it only once? |
14:32:02 | mcc | Because on windows it compiles but then when i boot the audio thread it crashes. |
14:41:28 | mcc | Hm. So here is what I am seeing: I am in msys2-shell on win10. I have installed Nim from the installer on the website and mingw-w64/x64_86 plus SDL from msys2's package manager. My audio callback begins with "if didAudioGcInit: [newline indent] setupForeignThreadGc() [newline] didAudioGcInit = true". I run with "nim compile --threads:on --run movable.nim". I |
14:41:28 | mcc | compile and run okay and then the instant it hits pauseAudio(0), it crashes. Actually, it does not crash, it quits. Bash says "Error: execution of an external program failed: 'c:\msys64\home\andi\work\h\nim-practice\movable.exe '" and $? is 1. |
14:42:11 | mcc | If I put `echo "HELLO"` at the start of the audio callback, I never see the echo. |
14:48:07 | mcc | In other words, it appears I am not getting far enough to invoke setupForeignThreadGc(). Again, this is only if I compile with --threads:on. Without --threads:on I run, I see the echo, I am allowed to setupForeignThreadGc() but I do still see the crash after seven seconds. |
15:00:30 | mcc | Okay yeah it is a crash and if I run in GDB, the backtrace looks like this. https://gist.github.com/anonymous/8c3a5e47b8db28a1b4494d16b74874d1 any idea how to proceed? :O |
15:01:33 | Araq | mcc: that's broken thread local storage I think, you need to use 'nim devel' or compile with --stackTraces:off |
15:04:29 | mcc | Hm. What does that mean? "nim devel" and "nim --stackTraces:off" both give argument not recognized errors when I run them. |
15:04:56 | mcc | oh. it accepted --stackTrace:off |
15:05:00 | mcc | but i still get the error |
15:06:20 | mcc | sorry. i mean: i get no command line error with --stackTrace:off, but the crash is unabated |
15:07:34 | mcc | I found the devel branch on github-- can i install this with nimble or should i just try to build it myself? |
15:09:13 | * | girvo joined #nim |
15:10:14 | def- | mcc: build yourself following the github instructions |
15:11:01 | * | space-wizard joined #nim |
15:11:43 | * | space-wizard quit (Max SendQ exceeded) |
15:12:55 | * | space-wizard joined #nim |
15:13:42 | * | space-wizard quit (Max SendQ exceeded) |
15:13:49 | * | girvo quit (Ping timeout: 252 seconds) |
15:14:30 | * | space-wizard joined #nim |
15:15:16 | * | space-wizard quit (Max SendQ exceeded) |
15:17:15 | * | space-wizard joined #nim |
15:20:21 | mcc | Okay! If I build with --threads:on --tlsEmulation:off, and I run with the 0.13.1 in github devel, it works fine and I do not see the crash. (If I run without tlsEmulation:off, calling the setupForeignThreadGc is an error. If I run on the current stable version but --tlsEmulation:off, it limps a few more seconds than it did without the flag then crashes.) |
15:20:45 | mcc | So that solves my problem, thanks. What does --tlsEmulation:off do, exactly? Is it disabling a safety feature or a performance feature? |
15:21:26 | * | space-wizard quit (Ping timeout: 244 seconds) |
15:35:43 | * | rok quit (Quit: rok) |
15:42:26 | Araq | neither, it disables a hack for old GCCs |
15:42:56 | cheatfate | Araq, i think TLS emulation is just a global variable? :) |
15:43:32 | Araq | lol no, it uses OS APIs to access thread local storage |
15:47:18 | cheatfate | Araq, but i think usage of OS API to access TLS its not an emulation? |
15:50:34 | * | girvo joined #nim |
15:52:58 | Araq | it needs to use segment registers for performance, everything else is a hack |
15:54:48 | * | girvo quit (Ping timeout: 246 seconds) |
16:00:17 | * | fastrom quit (Quit: Leaving.) |
16:10:52 | * | arnetheduck quit (Ping timeout: 244 seconds) |
16:14:51 | * | kulelu88 joined #nim |
16:25:31 | * | filcuc_ quit (Read error: Connection reset by peer) |
16:39:57 | mcc | How does that work on OS X? |
16:40:23 | mcc | Everybody says mach-o doesn't support the TLS area that __thread and such in C normally support |
16:40:37 | mcc | but i don't really know what that means in real implementation terms |
16:47:11 | * | Jesin quit (Quit: Leaving) |
16:48:07 | cheatfate | mcc, there not `kernel threads` in unixes... |
16:48:26 | cheatfate | mcc, only usermode threads |
16:48:37 | cheatfate | so its not a problem |
16:49:19 | * | Jesin joined #nim |
16:49:27 | * | Demon_Fox joined #nim |
17:17:01 | * | elrood joined #nim |
17:23:34 | * | Sembei joined #nim |
17:51:26 | * | girvo joined #nim |
17:55:52 | * | girvo quit (Ping timeout: 258 seconds) |
18:01:46 | * | Matthias247 joined #nim |
18:20:01 | * | onionhammer quit (Quit: WeeChat 1.0.1) |
18:20:11 | * | onionhammer joined #nim |
18:33:07 | cheatfate | Araq, for new asyncdispatch we need `cancel` future |
18:33:53 | cheatfate | because operations like `or` on futures dont allow to free system resources |
18:34:28 | cheatfate | And `cancel` is also problem only on windows, because we need to cancel pending io operation |
18:43:54 | * | girvo joined #nim |
18:48:06 | * | Jesin quit (Quit: Leaving) |
18:50:41 | * | girvo quit (Ping timeout: 258 seconds) |
18:50:54 | * | Jesin joined #nim |
19:10:05 | cheatfate | Araq, i think we need to have some variables with compiler version |
19:10:24 | cheatfate | i mean defined variables |
19:11:16 | cheatfate | to have possibility to check compiler version, because "ATOMIC_RELAXED" not compiling on with gcc 4.2.1 but compiling with gcc 4.8.2 |
19:11:23 | * | |meta quit (Quit: Connection closed for inactivity) |
19:11:39 | cheatfate | https://github.com/nim-lang/Nim/issues/4046 |
19:27:27 | * | Arrrr quit (Quit: WeeChat 1.4) |
19:29:37 | Araq | cheatfate: sure, go ahead |
19:29:58 | cheatfate | :) |
19:33:26 | cheatfate | Araq, i can make part for parsing versions but i dont think i can integrate it to compiler |
20:01:59 | * | Trustable quit (Remote host closed the connection) |
20:17:02 | * | xet7 quit (Quit: Leaving) |
20:17:14 | * | irrequietus joined #nim |
20:23:51 | Araq | cheatfate: just make some PR and I'll integrate it properly |
20:27:31 | cheatfate | Araq, is it will be ok if i make something like `proc getCompilerVersion(path: string): tuple[branch: float, version: int]` ? |
20:28:15 | Araq | branch, version? why not major, minor, patch? |
20:28:35 | cheatfate | Araq, names are not a problem :) |
20:30:19 | cheatfate | `proc getCompilerVersion(path: string): tuple[major: int, minor: int, patch: int]` ? |
20:32:12 | Araq | yeah |
20:37:58 | tautologico | is there a way to dump the ast of a source file? (if not, I think this would be a useful command) |
20:41:04 | * | xkapastel joined #nim |
20:47:26 | * | girvo joined #nim |
20:52:07 | * | girvo quit (Ping timeout: 244 seconds) |
21:17:15 | * | gokr joined #nim |
21:33:20 | * | cnu- quit (Ping timeout: 272 seconds) |
21:41:34 | * | ics joined #nim |
21:44:48 | * | xkapastel left #nim (#nim) |
21:47:03 | * | Sembei quit (Ping timeout: 240 seconds) |
21:48:32 | * | PMunch quit (Quit: leaving) |
21:48:51 | * | elrood quit (Quit: Leaving) |
21:57:30 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
22:07:51 | * | irrequietus quit () |
22:16:29 | * | mcc quit (Quit: Connection closed for inactivity) |
22:47:26 | * | girvo joined #nim |
22:52:42 | * | girvo quit (Ping timeout: 276 seconds) |
22:56:24 | * | Sembei joined #nim |
22:58:50 | * | Jesin quit (Quit: Leaving) |
23:15:58 | * | nchambers quit (K-Lined) |
23:17:26 | * | |meta joined #nim |
23:41:57 | * | arnetheduck joined #nim |
23:47:29 | * | girvo joined #nim |
23:49:04 | * | nchambers^ joined #nim |
23:49:10 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:51:44 | * | girvo quit (Ping timeout: 244 seconds) |
23:55:19 | * | girvo joined #nim |
23:55:22 | * | nchambers^ is now known as nchambers |
23:55:35 | * | gokr quit (Ping timeout: 260 seconds) |
23:56:06 | * | nchambers is now known as nchambers_ |
23:56:07 | * | nchambers_ is now known as nchambers |
23:59:52 | * | girvo quit (Ping timeout: 264 seconds) |