<< 20-07-2016 >>

00:06:57*yglukhov joined #nim
00:11:51*yglukhov quit (Ping timeout: 276 seconds)
00:30:54*yglukhov joined #nim
00:35:11*yglukhov quit (Ping timeout: 240 seconds)
00:42:25*brechtm quit (Read error: Connection reset by peer)
00:42:30*brechtm_ joined #nim
00:53:51*gokr quit (Ping timeout: 240 seconds)
00:58:40*ftsf joined #nim
01:03:32*brson quit (Quit: leaving)
01:04:19*gokr joined #nim
01:07:16*yglukhov joined #nim
01:12:18*yglukhov quit (Ping timeout: 276 seconds)
01:16:17*chemist69_ quit (Ping timeout: 258 seconds)
01:21:29*brechtm_ quit (Read error: Connection reset by peer)
01:21:35*brechtm joined #nim
01:29:39*chemist69_ joined #nim
01:43:19*yglukhov joined #nim
01:48:03*yglukhov quit (Ping timeout: 276 seconds)
02:04:58*gokr quit (Ping timeout: 252 seconds)
02:07:48*yglukhov joined #nim
02:12:45*yglukhov quit (Ping timeout: 276 seconds)
02:25:20*brechtm quit (Read error: Connection reset by peer)
02:25:51*brechtm joined #nim
02:43:57*yglukhov joined #nim
02:48:25*Demon_Fox quit (Ping timeout: 252 seconds)
02:49:09*yglukhov quit (Ping timeout: 276 seconds)
02:49:52*Demon_Fox joined #nim
03:04:20*GangstaCat joined #nim
03:08:21*yglukhov joined #nim
03:13:12*yglukhov quit (Ping timeout: 276 seconds)
03:44:29*yglukhov joined #nim
03:49:17*yglukhov quit (Ping timeout: 260 seconds)
03:56:32*fastrom joined #nim
04:06:09*StarBrilliant quit (Ping timeout: 250 seconds)
04:09:00*StarBrilliant joined #nim
04:12:41*ephja quit (Read error: Connection reset by peer)
04:20:52*yglukhov joined #nim
04:26:00*yglukhov quit (Ping timeout: 276 seconds)
04:36:51*brechtm quit (Read error: Connection reset by peer)
04:36:56*brechtm_ joined #nim
04:47:00*endragor joined #nim
04:57:13*yglukhov joined #nim
05:01:37*yglukhov quit (Ping timeout: 260 seconds)
05:30:33*yglukhov joined #nim
05:35:02*GangstaCat quit (Quit: Leaving)
05:35:27*yglukhov quit (Ping timeout: 260 seconds)
06:04:55*pdv joined #nim
06:05:52*jeffc_ joined #nim
06:06:19*hendi__ joined #nim
06:08:03*jeffc quit (Ping timeout: 276 seconds)
06:43:14*yglukhov joined #nim
06:58:07*Flox42 quit (Ping timeout: 252 seconds)
06:58:59*M-max quit (Ping timeout: 258 seconds)
07:00:42*M-Quora quit (Ping timeout: 276 seconds)
07:00:58*brechtm_ quit (Read error: Connection reset by peer)
07:01:16*brechtm joined #nim
07:03:35*Trustable joined #nim
07:05:03*fastrom quit (Quit: Leaving.)
07:11:58*Trustable_2 joined #nim
07:12:01*Trustable_2 quit (Client Quit)
07:23:54*chemist69_ quit (Ping timeout: 258 seconds)
07:46:49yglukhovAraq: can i assume, that closure with env=nil is always a result of conversion of a non-closure proc to a closure?
07:47:01yglukhovor a nil closure obviously
07:50:54*chemist69_ joined #nim
07:56:18*euantor joined #nim
08:00:46*ftsf quit (Remote host closed the connection)
08:13:36*pdv quit (Quit: Ex-Chat)
08:14:21*gokr joined #nim
08:17:03Araqyglukhov: hmm, yes.
08:17:14cheatfateyglukhov, and how to convert non-closure proc to closure? :)
08:28:08*gokr quit (Ping timeout: 244 seconds)
08:31:02*Flox42 joined #nim
08:35:59Araqcheatfate: with an anon helper proc
08:44:07cheatfateAraq, you mean var cb: proc() = closureProc?
08:44:46Araqyes
08:54:10*zodiak_ quit (Ping timeout: 252 seconds)
08:57:09*Demon_Fox quit (Quit: Leaving)
09:05:42*elrood joined #nim
09:10:35*brechtm quit ()
09:15:41*fastrom joined #nim
09:28:38*endragor quit (Quit: endragor)
09:29:13*gernest joined #nim
09:30:53*endragor joined #nim
09:31:23*endragor quit (Client Quit)
09:41:11*brechtm joined #nim
09:55:19*xet7_ quit (Remote host closed the connection)
09:56:20*xet7_ joined #nim
09:56:33*pafmaf joined #nim
10:17:25*nsf quit (Quit: WeeChat 1.5)
10:27:01*gokr joined #nim
10:31:36*gernest quit (Quit: gernest)
10:38:25*CcxCZ joined #nim
10:38:27*gokr quit (Ping timeout: 276 seconds)
10:51:08*gernest joined #nim
10:53:21*M-Quora joined #nim
10:53:28*M-max joined #nim
10:55:50*brechtm quit (Remote host closed the connection)
11:02:33*hendi__ quit (Ping timeout: 240 seconds)
11:19:46*irrequietus joined #nim
11:40:18*hendi__ joined #nim
11:46:20*brechtm joined #nim
11:56:57*irrequietus quit ()
12:07:26*gernest quit (Quit: gernest)
12:11:08*gernest joined #nim
12:13:08*gernest quit (Client Quit)
12:29:47*desophos quit (Read error: Connection reset by peer)
12:39:53yglukhovAraq: if i GC_setMaxPause is there a way to know if gc maganes to keep up?
12:40:04yglukhov*manages
12:43:57Araqcheck if getOccupiedMem stays reasonable?
12:44:37*desophos joined #nim
13:01:34*irrequietus joined #nim
13:04:33*ivan2kh joined #nim
13:12:27yglukhovmax pause time stats seems kinda not informative for a long running process... maybe some average-pause-time-for-last-minute would be better...
13:14:46ivan2khGuys. How to apply user pragma to the whole source file? I need something that will work like http://nim-lang.org/docs/manual.html#pragmas-compilation-option-pragmas
13:15:47yglukhovAraq: do i understand correctly that if i want GC collection on every frame, i just do GC_setMaxPause(1000) in the beginning of the program, and then GC_fullCollect on every frame?
13:16:17yglukhovivan2kh: currently you can't. prs are welcome.
13:16:33reactormonkivan2kh, might be magic pargmas. If you want to apply a pragma to every proc, you can use push/pop
13:17:55yglukhovivan2kh: unless you mean a pragma defined by pragma pragma. in such case you can just push/pop it.
13:18:24yglukhovbut that doesnt make much sense imho
13:19:01ivan2khI need to pass the statement(of file) to my template. So pragma pragma will not work
13:19:56yglukhovivan2kh: then read my first answer, sorry.
13:20:19ivan2khMay I ask for feature request then?
13:20:38ivan2khThat could be killer feature
13:21:23ivan2khFor example you could do mass symbols renaming with it
13:21:26yglukhovi think you can file an issue and it will get a feature request tag on it.
13:22:05yglukhovbut i'm almost sure that its not gonna have high priority
13:22:27yglukhovbut on the other hand, you could do it yourself! ;)
13:23:33Araqivan2kh: just staticRead the .nim module file
13:23:37Araqand parseStmt it
13:23:42Araqno new language feature required
13:23:44ivan2khThat is what I want to do. But for the first I need confirmation from Araq
13:24:14ivan2khAraq, I need to modify stmt
13:24:37yglukhovstaticRead+parseStmt makes the particular module importable in only one obscure way =)
13:25:46yglukhovbtw, dumping nim ast doesnt always produce correct nim code :P
13:26:50yglukhovAraq: do i understand correctly that if i want GC collection on every frame, i just do GC_setMaxPause(1000) in the beginning of the program, and then GC_fullCollect on every frame?
13:28:31yglukhovivan2kh, i bet Araq will love this feature, because otherwise {.cov.}-things are pita to use.
13:28:48yglukhov;)
13:29:23Araqyglukhov: yes about the GC_setMaxPause(1000), no about fullCollect
13:29:44yglukhovAraq: what do i do every frame then?
13:32:46yglukhovGC_step?
13:33:53euantorANy ideas why this doesnt work:
13:34:05euantorlet header: string = await sock.recv(4)
13:34:07euantorlet packetLength = header[0].int32 or shl(header[1].int32, 8.int32) or shl(header[2].int32, 16.int32)
13:34:25euantorThe error is: " Error: type mismatch: got ((int32, int32))"
13:36:38yglukhoveuantor: try using shl as a binary operator
13:37:04euantorHow might I go about doing that?
13:37:30yglukhovlet packetLength = header[0].int32 or (header[1].int32 shl 8.int32) or (header[2].int32 shl 16.int32)
13:37:41euantorAh, cheers
13:37:46*xet7 quit (Ping timeout: 272 seconds)
13:37:57Araqyglukhov: yeah iirc
13:38:16euantorThat fixes that error, thanks
13:39:41*nd quit (Quit: Leaving)
13:55:33*irrequietus quit (Ping timeout: 240 seconds)
13:56:49*kingofoz quit (Ping timeout: 258 seconds)
13:57:53*kingofoz joined #nim
14:00:04*ivan2kh quit (Ping timeout: 250 seconds)
14:20:37*gokr joined #nim
14:20:52*Jesin quit (Quit: Leaving)
14:23:09*Jesin joined #nim
14:32:08*endragor joined #nim
14:35:40*endragor quit (Read error: Connection reset by peer)
14:35:46*endragor_ joined #nim
14:35:54*endragor_ quit (Client Quit)
14:38:51*trusion quit (Ping timeout: 240 seconds)
14:40:54cheatfatei so hate making parsers
14:42:19Araqwhy? it's simple, you have an index variable i and loop through the string
14:42:45Araqthe alternative is to use split and strip and then despair since it doesn't work
14:43:52Araqand then add "maxSplittings" to the split op and then later "ohButHandleQuotesToo"
14:44:27*ephja joined #nim
14:44:53cheatfate:) yeah i know you are parser master :)
14:45:10cheatfatebut i hate making parsers... :)
14:45:31Araquse scanp then, or lexim
14:45:52Araqor come up with your own macro that transforms a grammar desc into code
14:46:40cheatfateAraq, i dont need so complex things to parse http chunked encoded stream, but i need to handle all variants of errors
14:47:18*fvs joined #nim
14:47:49cheatfatethis is most annoying thing in parsers... handle all types of errors
14:47:54fvshi, does nim have enumerate on iters?
14:51:52*trusion joined #nim
14:52:49*irrequietus joined #nim
14:53:15*gokr quit (Ping timeout: 264 seconds)
14:53:35Araqfvs: there is only pairs that also yields the index
15:03:23*irrequietus quit (Ping timeout: 244 seconds)
15:03:33*nsf joined #nim
15:09:27*chemist69_ quit (Ping timeout: 264 seconds)
15:23:25*xet7 joined #nim
15:28:59*irrequietus joined #nim
15:36:05*chemist69_ joined #nim
15:41:51*irrequietus quit (Ping timeout: 264 seconds)
15:42:38*brson joined #nim
15:53:42*shodan45 joined #nim
16:00:24*euantor quit (Quit: Leaving)
16:22:42*brechtm quit (Remote host closed the connection)
16:24:31*brechtm joined #nim
16:28:38*yglukhov quit (Ping timeout: 244 seconds)
16:47:39*ivan2kh joined #nim
16:49:49*irrequietus joined #nim
16:52:58*fastrom quit (Quit: Leaving.)
16:55:08*fvs left #nim ("ERC (IRC client for Emacs 24.5.1)")
17:00:39ephjadom96: is it actually possible to define a "run" nimble task now, as suggested in issue #10?
17:01:11ephjaI'll look through the system module again
17:03:32*nsf quit (Quit: WeeChat 1.5)
17:03:38ephjastaticExec returns the output that has been generated during the lifetime of the application, so that's not always ideal. I'll just do some hardcoding in vscode for now
17:06:30*zodiak joined #nim
17:07:32avsejAraq, what should I do to "fix" this error: https://github.com/nim-lang/Nim/blob/v0.14.2/lib/nimbase.h#L453-L456
17:09:31ephjaavsej https://github.com/nim-lang/Nim/wiki/unofficial-faq#i-get-an-error-trying-to-compile-nim-on-windows
17:10:37avsejephja, I'm using build.sh, which does not have 64bit alternative
17:11:46def-avsej: if you're on a 64bit system, why is your gcc 32bit?
17:11:57def-alternative would be to use a 64bit one
17:12:43avsejmy gcc is 64bit
17:13:05def-then you downloaded 32bit sources?
17:13:29def-hm wait, they are all in one archive. why is it choosing the wrong ones?
17:13:53*elrood quit (Quit: Leaving)
17:13:54ephjadoes "gcc -v" confirm this?
17:14:08def-avsej: uname -m prints x86_64, yes?
17:14:47avsejit prints sun4v
17:14:54avsejTarget: sparcv9-sun-solaris2.11
17:15:02def-oh, so we're not talking about x86/x86_64, my bad
17:15:08avsejhow do you determine 64bit?
17:16:05*Trustable quit (Remote host closed the connection)
17:16:06avsejit is SPARC, and it is 64bit
17:16:18def-avsej: look into the build.sh, I'd guess sparc is only precompiled for 32bit
17:16:35avsejokay, I will try to find and fix that. thanks
17:16:36def-you'd have to build the C sources on another system and add a new arch for sparc64
17:25:06*_stowa joined #nim
17:32:34*_stowa quit (K-Lined)
17:35:37*yglukhov joined #nim
17:37:13*hendi__ quit (Ping timeout: 252 seconds)
17:38:12*irrequietus quit (Ping timeout: 260 seconds)
17:38:39avsejdef-, niminst does not compile because of undefined function
17:38:40avsejniminst.nim(256, 16) Error: undeclared identifier: 'walkPattern'
17:39:47avsejoh, it should be defined in os
17:41:47avsejokay. I'm just using stable nim
17:43:38*yglukhov quit (Remote host closed the connection)
17:47:46*irrequietus joined #nim
17:58:50*nsf joined #nim
18:06:07*yglukhov joined #nim
18:08:44Araqavsej: edit compiler/installer.ini
18:08:55Araqand run 'koch csources -d:release'
18:09:07Araqand then 'koch xz' and look into build/
18:09:29Araqand move the tar.xz to the target machine
18:09:45Araqthe only problem is that I don't know if sparc64 is a known CPU type :-)
18:10:51*yglukhov quit (Ping timeout: 276 seconds)
18:15:50*iamd3vil quit (Quit: WeeChat 0.4.2)
18:16:34kieris exportc supposed to work for ref types?
18:22:13Araqkier: no.
18:22:27*elrood joined #nim
18:22:51kierthought not
18:23:06kiermay be worth making the compiler warn against it
18:23:17kierwill see if there's alraady an issue about it
18:28:57*Jesin quit (Ping timeout: 260 seconds)
18:29:35Araq*shrug* for me these things are obvious
18:29:45Araqexportc only makes sense for nominal types
18:30:46Araqit's like saying "if exported, use this name over there", but it's not exported at all. 'ref' becomes the * in C.
18:31:59*Jesin joined #nim
18:32:41kiereh I thought it was plausible that the codegen could add a "typedef object_type* exported_ref_type", even if the rest of the generated code used object_type* instead of exported_ref_type
18:36:49Araqyeah but the codegen doesn't give a shit instead :P
18:37:31*fastrom joined #nim
18:37:32kierhah fair enough
18:38:12Araq--header is a feature that I implemented for convenience for a single person who then later left Nim
18:38:12ephja--generateCodeNoMatterWhat
18:38:37Araqand now we have one more half-broken feature.
18:38:45Araqlesson learned, don't help people.
18:44:10*wan quit (Quit: WeeChat 1.5)
18:46:39*yglukhov joined #nim
18:47:49ephja+1
18:48:50cheatfateAraq, nOo continue to help people, you are awesome :)
18:51:16*yglukhov quit (Ping timeout: 272 seconds)
18:59:27ephjaI'm sure he'll will stick around until at least 1.0
18:59:51*chemist69_ quit (Ping timeout: 264 seconds)
19:00:21cheatfateits nice because of 86 versions left :)
19:05:02ephjatypo
19:05:31*JStoker quit (Remote host closed the connection)
19:08:29Araqbtw we have a battle plan for v1
19:15:54*JStoker joined #nim
19:17:17*yglukhov joined #nim
19:17:26*Jesin quit (Quit: Leaving)
19:21:09cheatfateAraq, and where i can read this secret plan?
19:21:16*irrequietus quit (Read error: Connection reset by peer)
19:25:26Araqtodo.txt
19:26:56*chemist69_ joined #nim
19:27:53namnguyenAraq, any news to wxnim? you excitedly announced it would be coming in a few days. is that still feasible?
19:28:09*Araq coughs
19:28:24Araqturned out to me messier :P
19:28:32Araqwhy not use libui instead?
19:28:45Araq*to be
19:31:06namnguyenmain advantage is wx offers more widgets
19:33:16Araqjust draw your own widgets :-)
19:35:38namnguyenmight as well do plain GDI
19:36:23namnguyenor bit flipping straight to int 10h, if that's still the thing.
19:36:56Araqnot really. low level stuff is always easier.
19:37:08Araqif it breaks, it's at least your own fault and you can debug it.
19:37:28*Jesin joined #nim
19:37:34AraqI've rewritten matplotlib graphs in pure Python, with SDL and putPixel(...)
19:37:54Araqbecause I couldn't get matplotlib to render it the way I needed and I had deadlines to meet.
19:38:10Araqmy only regret is that I didn't do so from the beginning.
19:38:33*yglukhov quit (Remote host closed the connection)
19:38:59namnguyennow make your graph an SVG
19:41:14Araqlol, that's not hard either when you're in complete control already.
19:41:50Araqbut it also doesn't come up. nobody cares if your generated PDF contains SVGs or PNGs.
19:43:07*yglukhov joined #nim
20:03:55*Matthias247 joined #nim
20:06:12avsejAraq, how I can resolve this? https://github.com/nim-lang/Nim/pull/4504#issuecomment-234065638
20:12:24Araqavsej: 'koch boot -d:release' so that your Nim knows about sparc64
20:15:33*Ven joined #nim
20:15:46*ivan2kh quit (Ping timeout: 250 seconds)
20:17:15dyce_really want to build a docker container, that builds a nim project for every platform
20:20:12Araqare you sure you know what "every platform" means? :P
20:20:38Araqand there is still no FreeDOS port -.-
20:22:16dyce_well well, all popular platforms. let start on with x86/x64( osx, linux, windows, bsd) ARM, mips32,
20:22:23def-talking about "every platform", lazarus has an impressive list: http://wiki.lazarus.freepascal.org/Screenshots
20:22:44jeffc_I keep waiting for VxWorks support ;)
20:23:10Araqwe have VxWorks support, check nimbase.h
20:23:21jeffc_oh? And here I was being snarky :P
20:23:54Araqwell somebody got it to work and submitted a patch
20:24:05Araqnot sure if it bitrot
20:24:10dyce_Araq: but nim should work easily wherever gcc is available?
20:24:59AraqGCC < 4 is not tested all that well, but we try our best to support every niche platform, yes
20:27:17dyce_i was quite angry when i found out go didnt support mips32. so now i am getting all my friends to use nim
20:27:40dyce_yet they support mips64? -_-
20:28:01dyce_besides, go is ugly
20:39:39*gokr joined #nim
20:49:47*irrequietus joined #nim
20:50:09*Jesin quit (Quit: Leaving)
20:52:30avsejAraq, I set number of CPUs to 20
20:52:47Araqsure
20:53:51Araqdyce_: it mips32 still used anywhere? :-)
20:54:09AraqI thought the world is pretty much x86 and ARM by now
20:54:27dyce_Araq: yes, almost every consumer router by netgear/dlink/linksys
20:54:47Araqinteresting.
20:54:56*Trustable joined #nim
20:58:17*gokr quit (Ping timeout: 260 seconds)
21:03:38*chemist69_ quit (Ping timeout: 272 seconds)
21:04:47*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:05:33*chemist69_ joined #nim
21:22:25avsejI've just successfully built sparc64 port of nim. "Nim Compiler Version 0.14.2 (2016-07-20) [Solaris: sparc64]"
21:26:18Araqnice! now you actually need to ensure the GC does the stack scanning properly
21:26:35Araqin gc_common.nim there is code dealing with the register windows
21:28:38*elrood quit (Quit: Leaving)
21:32:24*Jesin joined #nim
21:35:57*Trustable quit (Remote host closed the connection)
21:39:44avsejis there specific test for it?
21:40:52kierfeel like i'm on the brink of solving #4152...
21:45:33*fastrom quit (Quit: Leaving.)
21:46:55*fastrom joined #nim
21:48:12*fastrom quit (Client Quit)
21:49:03*pafmaf quit (Ping timeout: 264 seconds)
21:53:25Araqavsej: not really, but there is tests/testament/tester cat gc
21:54:49Araqyou need to ensure that sparc64 also defines sparc
21:55:15Araqand I think you can also define sparcv9
21:55:58Araq when defined(sparcv9):
21:55:58Araq asm """"flushw \n" """
21:55:58Araq else:
21:56:00Araq asm """"ta 0x3 ! ST_FLUSH_WINDOWS\n" """
21:56:15Araqbut it looks simple enough to enable this piece of inline assembler, right?
21:57:38dyce_Araq: there is custom firmware, openwrt/openlede, tomato, dd-wrt that would let you run this. some cool (and very cheap) devices are: https://wiki.hackerspace.pl/projects:zsun-wifi-card-reader and http://www.ebay.com/itm/Mini-Portable-150Mbps-3G-4G-WiFi-Wireless-Router-Black-/121962287567?hash=item1c6584d1cf:g:42MAAOSwE7RXFv0G
21:58:17dyce_for 7-9 dollars :)
22:13:16cheatfatetomato is dead
22:13:20cheatfatedd-wrt is near dead
22:15:07dyce_cheatfate: what about the shibby fork/mod
22:16:27cheatfatedyce_, there very many forks... but trend is to strip support of old processors with small amount of memory...
22:17:30federico3dyce_: nice, how much memory?
22:17:55dyce_ranges from 16-32mb for the minirouter, depending on factory
22:18:13dyce_zsun has 64mb i think
22:18:31*irrequietus quit ()
22:18:45dyce_nim is perfect for it :)
22:19:07dyce_vs python which eats memory for breakfast
22:28:59*yglukhov quit (Remote host closed the connection)
22:30:40kiernope, #4152 eludes me. I can fix codegen for that code sample, but now it breaks on a different code sample
22:35:42*yglukhov joined #nim
22:36:50kierif I have an object field with a {.importc: "blah".} pragma, whereabouts in the associated TSym for the field is the "blah" string stored?
22:36:57kieror is it somewhere else?
22:40:39*yglukhov quit (Ping timeout: 264 seconds)
22:48:02*Matthias247 quit (Read error: Connection reset by peer)
22:54:03*shodan45 quit (Quit: Konversation terminated!)
23:00:14*yglukhov joined #nim
23:04:36*yglukhov quit (Ping timeout: 258 seconds)
23:36:14*yglukhov joined #nim
23:40:34*yglukhov quit (Ping timeout: 244 seconds)